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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.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/paint/PaintLayerPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
index 00a1f7495079a177cf40c20bd4690cd672274346..06a4a8fe107c721960793ea68d9e27262b94d026 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
@@ -7,31 +7,34 @@
#include "core/layout/compositing/CompositedLayerMapping.h"
#include "core/paint/PaintControllerPaintTest.h"
#include "platform/graphics/GraphicsContext.h"
+#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
namespace blink {
struct PaintLayerPainterTestParam {
- PaintLayerPainterTestParam(FrameSettingOverrideFunction frameSettingOverride, bool slimmingPaintV2)
- : frameSettingOverride(frameSettingOverride), slimmingPaintV2(slimmingPaintV2) { }
+ PaintLayerPainterTestParam(bool rootLayerScrolling, bool slimmingPaintV2)
+ : rootLayerScrolling(rootLayerScrolling), slimmingPaintV2(slimmingPaintV2) { }
- FrameSettingOverrideFunction frameSettingOverride;
+ bool rootLayerScrolling;
bool slimmingPaintV2;
};
class PaintLayerPainterTest
- : public PaintControllerPaintTestBase
- , public testing::WithParamInterface<PaintLayerPainterTestParam> {
+ : public testing::WithParamInterface<PaintLayerPainterTestParam>
+ , private ScopedRootLayerScrollingForTest
+ , public PaintControllerPaintTestBase {
USING_FAST_MALLOC(PaintLayerPainterTest);
public:
- PaintLayerPainterTest() : PaintControllerPaintTestBase(GetParam().slimmingPaintV2) { }
- FrameSettingOverrideFunction settingOverrider() const override { return GetParam().frameSettingOverride; }
+ PaintLayerPainterTest()
+ : ScopedRootLayerScrollingForTest(GetParam().rootLayerScrolling)
+ , PaintControllerPaintTestBase(GetParam().slimmingPaintV2) { }
};
INSTANTIATE_TEST_CASE_P(All, PaintLayerPainterTest, ::testing::Values(
- PaintLayerPainterTestParam(nullptr, false), // non-root-layer-scrolls, slimming-paint-v1
- PaintLayerPainterTestParam(nullptr, true), // non-root-layer-scrolls, slimming-paint-v2
- PaintLayerPainterTestParam(RootLayerScrollsFrameSettingOverride, false), // root-layer-scrolls, slimming-paint-v1
- PaintLayerPainterTestParam(RootLayerScrollsFrameSettingOverride, true))); // root-layer-scrolls, slimming-paint-v2
+ PaintLayerPainterTestParam(false, false), // non-root-layer-scrolls, slimming-paint-v1
+ PaintLayerPainterTestParam(false, true), // non-root-layer-scrolls, slimming-paint-v2
+ PaintLayerPainterTestParam(true, false), // root-layer-scrolls, slimming-paint-v1
+ PaintLayerPainterTestParam(true, true))); // root-layer-scrolls, slimming-paint-v2
TEST_P(PaintLayerPainterTest, CachedSubsequence)
{

Powered by Google App Engine
This is Rietveld 408576698