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

Unified Diff: third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h

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/PaintControllerPaintTest.h
diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
index be331873d0639082719fee4c2b3f251d88263591..433ff4dc458dff64c5de396f4b9945fdf4649bbe 100644
--- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
+++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.h
@@ -11,17 +11,16 @@
#include "core/paint/PaintLayer.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
+#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include <gtest/gtest.h>
namespace blink {
-class PaintControllerPaintTestBase : public RenderingTest {
+class PaintControllerPaintTestBase
+ : private ScopedSlimmingPaintV2ForTest
+ , public RenderingTest {
public:
- PaintControllerPaintTestBase(bool enableSlimmingPaintV2)
- : m_originalSlimmingPaintInvalidationEnabled(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
- , m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- , m_enableSlimmingPaintV2(enableSlimmingPaintV2)
- { }
+ PaintControllerPaintTestBase(bool enableSlimmingPaintV2) : ScopedSlimmingPaintV2ForTest(enableSlimmingPaintV2) { }
protected:
LayoutView& layoutView() { return *document().layoutView(); }
@@ -31,12 +30,6 @@ protected:
{
RenderingTest::SetUp();
enableCompositing();
- RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_enableSlimmingPaintV2);
- }
- void TearDown() override
- {
- RuntimeEnabledFeatures::setSlimmingPaintInvalidationEnabled(m_originalSlimmingPaintInvalidationEnabled);
- RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_originalSlimmingPaintV2Enabled);
}
bool paintWithoutCommit(const IntRect* interestRect = nullptr)
@@ -74,11 +67,6 @@ protected:
}
int numCachedNewItems() { return rootPaintController().m_numCachedNewItems; }
-
-private:
- bool m_originalSlimmingPaintInvalidationEnabled;
- bool m_originalSlimmingPaintV2Enabled;
- bool m_enableSlimmingPaintV2;
};
class PaintControllerPaintTest : public PaintControllerPaintTestBase {

Powered by Google App Engine
This is Rietveld 408576698