Index: third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp |
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp |
index 1b854d9bb0114bb4150fe3ea383cc2717f5b616f..bab26cb9e3c894e934f556aa0264ca0dd856f104 100644 |
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp |
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinatorTest.cpp |
@@ -17,15 +17,26 @@ namespace blink { |
using HTMLNames::styleAttr; |
+typedef bool TestParamRootLayerScrolling; |
class SnapCoordinatorTest |
- : public testing::TestWithParam<FrameSettingOverrideFunction> { |
+ : public testing::TestWithParam<TestParamRootLayerScrolling> { |
protected: |
- SnapCoordinatorTest() {} |
+ SnapCoordinatorTest() |
+ : m_originalRootLayerScrollingEnabled(RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
+ , m_enableRootLayerScrolling(GetParam()) |
+ { |
+ RuntimeEnabledFeatures::setRootLayerScrollingEnabled(m_enableRootLayerScrolling); |
+ } |
+ |
+ ~SnapCoordinatorTest() |
+ { |
+ CHECK_EQ(m_enableRootLayerScrolling, RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
+ RuntimeEnabledFeatures::setRootLayerScrollingEnabled(m_originalRootLayerScrollingEnabled); |
+ } |
void SetUp() override |
{ |
- m_pageHolder = DummyPageHolder::create( |
- IntSize(), nullptr, nullptr, GetParam()); |
+ m_pageHolder = DummyPageHolder::create(); |
setHTML( |
"<style>" |
@@ -83,11 +94,11 @@ protected: |
} |
std::unique_ptr<DummyPageHolder> m_pageHolder; |
+ bool m_originalRootLayerScrollingEnabled; |
+ bool m_enableRootLayerScrolling; |
}; |
-INSTANTIATE_TEST_CASE_P(All, SnapCoordinatorTest, ::testing::Values( |
- nullptr, |
- RootLayerScrollsFrameSettingOverride)); |
+INSTANTIATE_TEST_CASE_P(All, SnapCoordinatorTest, ::testing::Bool()); |
TEST_P(SnapCoordinatorTest, ValidRepeat) |
{ |