ambient_animation_background_color_unittest.cc 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/ambient/ui/ambient_animation_background_color.h"
  5. #include "base/memory/scoped_refptr.h"
  6. #include "cc/paint/skottie_wrapper.h"
  7. #include "cc/test/lottie_test_data.h"
  8. #include "cc/test/skia_common.h"
  9. #include "testing/gmock/include/gmock/gmock.h"
  10. #include "testing/gtest/include/gtest/gtest.h"
  11. namespace ash {
  12. namespace {
  13. using ::testing::Eq;
  14. TEST(AmbientAnimationBackgroundColorTest, Basic) {
  15. EXPECT_THAT(
  16. GetAnimationBackgroundColor(*cc::CreateSkottieFromString(
  17. cc::CreateCustomLottieDataWith2ColorNodes(
  18. "background_solid", cc::kLottieDataWithoutAssets1Color2Node))),
  19. Eq(cc::kLottieDataWithoutAssets1Color1));
  20. EXPECT_THAT(
  21. GetAnimationBackgroundColor(*cc::CreateSkottieFromString(
  22. cc::CreateCustomLottieDataWith2ColorNodes(
  23. cc::kLottieDataWithoutAssets1Color1Node, "background_solid"))),
  24. Eq(cc::kLottieDataWithoutAssets1Color2));
  25. }
  26. } // namespace
  27. } // namespace ash