main_thread_scrolling_reason_unittest.cc 966 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2018 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 "cc/input/main_thread_scrolling_reason.h"
  5. #include "testing/gtest/include/gtest/gtest.h"
  6. namespace cc {
  7. using MainThreadScrollingReasonTest = testing::Test;
  8. TEST_F(MainThreadScrollingReasonTest, AsText) {
  9. EXPECT_EQ("", MainThreadScrollingReason::AsText(0));
  10. EXPECT_EQ(
  11. "Has background-attachment:fixed, "
  12. "Threaded scrolling is disabled, "
  13. "Scrollbar scrolling, "
  14. "Not opaque for text and LCD text, "
  15. "Can't paint scrolling background and LCD text, "
  16. "Non fast scrollable region, "
  17. "Failed hit test, "
  18. "No scrolling layer, "
  19. "Not scrollable, "
  20. "Non-invertible transform, "
  21. "Wheel event handler region, "
  22. "Touch event handler region",
  23. MainThreadScrollingReason::AsText(0xffffffffu));
  24. }
  25. } // namespace cc