demo_ash_pixel_diff_test.cc 1022 B

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/test/ash_pixel_diff_test_helper.h"
  5. #include "ash/test/ash_test_base.h"
  6. namespace ash {
  7. class DemoAshPixelDiffTest : public AshTestBase {
  8. public:
  9. DemoAshPixelDiffTest() { PrepareForPixelDiffTest(); }
  10. DemoAshPixelDiffTest(const DemoAshPixelDiffTest&) = delete;
  11. DemoAshPixelDiffTest& operator=(const DemoAshPixelDiffTest&) = delete;
  12. ~DemoAshPixelDiffTest() override = default;
  13. // AshTestBase:
  14. void SetUp() override {
  15. AshTestBase::SetUp();
  16. pixel_test_helper_.InitSkiaGoldPixelDiff(
  17. /*screenshot_prefix=*/"ash_demo_test");
  18. }
  19. AshPixelDiffTestHelper pixel_test_helper_;
  20. };
  21. // Verifies the primary display UI right after the ash pixel test sets up.
  22. TEST_F(DemoAshPixelDiffTest, VerifyDefaultPrimaryDisplay) {
  23. EXPECT_TRUE(pixel_test_helper_.ComparePrimaryFullScreen("primary_display"));
  24. }
  25. } // namespace ash