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

Unified Diff: third_party/WebKit/Source/core/frame/FrameViewTest.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/core/frame/FrameViewTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameViewTest.cpp b/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
index 5438ffa3f6faa0fd4d4b988dacfb5034e893a72a..9993a404f13f7b73e6639e461f427d2feee15ff7 100644
--- a/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameViewTest.cpp
@@ -15,6 +15,7 @@
#include "platform/geometry/IntSize.h"
#include "platform/graphics/paint/PaintArtifact.h"
#include "platform/heap/Handle.h"
+#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <memory>
@@ -38,13 +39,15 @@ public:
bool m_hasScheduledAnimation;
};
+typedef bool TestParamRootLayerScrolling;
class FrameViewTestBase
- : public testing::Test
- , public testing::WithParamInterface<FrameSettingOverrideFunction> {
+ : public testing::WithParamInterface<TestParamRootLayerScrolling>
+ , private ScopedRootLayerScrollingForTest
+ , public testing::Test {
protected:
FrameViewTestBase()
- : m_chromeClient(new MockChromeClient)
- { }
+ : ScopedRootLayerScrollingForTest(GetParam())
+ , m_chromeClient(new MockChromeClient) { }
~FrameViewTestBase()
{
@@ -58,8 +61,6 @@ protected:
clients.chromeClient = m_chromeClient.get();
m_pageHolder = DummyPageHolder::create(IntSize(800, 600), &clients);
m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true);
- if (GetParam())
- (*GetParam())(m_pageHolder->page().settings());
}
Document& document() { return m_pageHolder->document(); }
@@ -104,13 +105,8 @@ private:
RuntimeEnabledFeatures::Backup m_featuresBackup;
};
-INSTANTIATE_TEST_CASE_P(All, FrameViewTest, ::testing::Values(
- nullptr,
- &RootLayerScrollsFrameSettingOverride));
-
-INSTANTIATE_TEST_CASE_P(All, FrameViewSlimmingPaintV2Test, ::testing::Values(
- nullptr,
- &RootLayerScrollsFrameSettingOverride));
+INSTANTIATE_TEST_CASE_P(All, FrameViewTest, ::testing::Bool());
+INSTANTIATE_TEST_CASE_P(All, FrameViewSlimmingPaintV2Test, ::testing::Bool());
// These tests ensure that FrameView informs the ChromeClient of changes to the
// paint artifact so that they can be shown to the user (e.g. via the
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698