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

Unified Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2258523006: Convert Settings::rootLayerScrolls to RuntimeEnabledFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add RAII-style helper to toggle REF. Rebase. Created 4 years, 4 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/web/tests/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 88f794aa9a9c7c3e09b3def79a19a2dd8bcde06d..dbeb0157c38699d12b68f334a10bfda2fc4b1c2d 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -19,6 +19,7 @@
#include "platform/PlatformGestureEvent.h"
#include "platform/geometry/DoublePoint.h"
#include "platform/geometry/DoubleRect.h"
+#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "platform/testing/URLTestHelpers.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCachePolicy.h"
@@ -102,16 +103,10 @@ namespace blink {
namespace {
class VisualViewportTest
- : public testing::Test
- , public FrameTestHelpers::SettingOverrider {
+ : public testing::Test {
public:
VisualViewportTest()
: m_baseURL("http://www.test.com/")
- , m_helper(this)
- {
- }
-
- void overrideSettings(WebSettings *settings) override
{
}
@@ -188,19 +183,17 @@ private:
FrameTestHelpers::WebViewHelper m_helper;
};
+typedef bool TestParamRootLayerScrolling;
class ParameterizedVisualViewportTest
- : public VisualViewportTest
- , public testing::WithParamInterface<FrameTestHelpers::SettingOverrideFunction> {
+ : public testing::WithParamInterface<TestParamRootLayerScrolling>
+ , private ScopedRootLayerScrollingForTest
+ , public VisualViewportTest {
public:
- void overrideSettings(WebSettings *settings) override
- {
- GetParam()(settings);
- }
+ ParameterizedVisualViewportTest()
+ : ScopedRootLayerScrollingForTest(GetParam()) { }
};
-INSTANTIATE_TEST_CASE_P(All, ParameterizedVisualViewportTest, ::testing::Values(
- FrameTestHelpers::DefaultSettingOverride,
- FrameTestHelpers::RootLayerScrollsSettingOverride));
+INSTANTIATE_TEST_CASE_P(All, ParameterizedVisualViewportTest, ::testing::Bool());
// Test that resizing the VisualViewport works as expected and that resizing the
// WebView resizes the VisualViewport.
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698