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

Unified Diff: Source/core/paint/DisplayItemListPaintTest.cpp

Issue 1175563004: [SP] Save and restore slimming paint enabled state in SP-specific unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/page/PrintContextTest.cpp ('k') | Source/core/paint/LayerClipRecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DisplayItemListPaintTest.cpp
diff --git a/Source/core/paint/DisplayItemListPaintTest.cpp b/Source/core/paint/DisplayItemListPaintTest.cpp
index 3eb3e6f5e8ac61eb81700e6925620d4ce0f1ae42..08843ac49d5da69c012c59e621ac7c248497c5a0 100644
--- a/Source/core/paint/DisplayItemListPaintTest.cpp
+++ b/Source/core/paint/DisplayItemListPaintTest.cpp
@@ -26,7 +26,8 @@ namespace blink {
class DisplayItemListPaintTest : public RenderingTest {
public:
DisplayItemListPaintTest()
- : m_layoutView(nullptr) { }
+ : m_layoutView(nullptr)
+ , m_originalSlimmingPaintEnabled(RuntimeEnabledFeatures::slimmingPaintEnabled()) { }
protected:
LayoutView& layoutView() { return *m_layoutView; }
@@ -47,10 +48,11 @@ private:
virtual void TearDown() override
{
- RuntimeEnabledFeatures::setSlimmingPaintEnabled(false);
+ RuntimeEnabledFeatures::setSlimmingPaintEnabled(m_originalSlimmingPaintEnabled);
}
LayoutView* m_layoutView;
+ bool m_originalSlimmingPaintEnabled;
};
class TestDisplayItem : public DisplayItem {
« no previous file with comments | « Source/core/page/PrintContextTest.cpp ('k') | Source/core/paint/LayerClipRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698