Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
index ec9ead85e4a3461a7a62e41e32ca1522336abb1c..688c0b3af8689eabe29bad94957c65d349b4c7bb 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -35,6 +35,10 @@ class ScrollbarThemeWithMockInvalidation : public ScrollbarThemeMock {
class ScrollableAreaTest : public ScrollbarTestSuite {};
TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));
scrollableArea->setScrollOffset(ScrollOffset(0, 10000), CompositorScroll);
@@ -42,6 +46,10 @@ TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync) {
}
TEST_F(ScrollableAreaTest, ScrollbarTrackAndThumbRepaint) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));
@@ -81,6 +89,10 @@ TEST_F(ScrollableAreaTest, ScrollbarTrackAndThumbRepaint) {
}
TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
ScrollbarTheme::setMockScrollbarsEnabled(true);
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));
@@ -104,6 +116,10 @@ TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation) {
}
TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(100, 100));
@@ -144,6 +160,10 @@ TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves) {
}
TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(100, 100));
@@ -222,6 +242,10 @@ TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint) {
}
TEST_F(ScrollableAreaTest, RecalculatesScrollbarOverlayIfBackgroundChanges) {
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
+ const TestingPlatformSupport::Config&>
+ platform(m_config);
+
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));

Powered by Google App Engine
This is Rietveld 408576698