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

Unified Diff: Source/core/paint/LayerClipRecorderTest.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
Index: Source/core/paint/LayerClipRecorderTest.cpp
diff --git a/Source/core/paint/LayerClipRecorderTest.cpp b/Source/core/paint/LayerClipRecorderTest.cpp
index 77449e5af986a5fb3841d9dbd2740104746f02c0..ac48cd642890fd44d2c08ac39b2507a474d7b51d 100644
--- a/Source/core/paint/LayerClipRecorderTest.cpp
+++ b/Source/core/paint/LayerClipRecorderTest.cpp
@@ -20,7 +20,9 @@ namespace {
class LayerClipRecorderTest : public RenderingTest {
public:
- LayerClipRecorderTest() : m_layoutView(nullptr) { }
+ LayerClipRecorderTest()
+ : m_layoutView(nullptr)
+ , m_originalSlimmingPaintEnabled(RuntimeEnabledFeatures::slimmingPaintEnabled()) { }
protected:
LayoutView& layoutView() { return *m_layoutView; }
@@ -37,8 +39,13 @@ private:
m_layoutView = document().view()->layoutView();
ASSERT_TRUE(m_layoutView);
}
+ virtual void TearDown() override
+ {
+ RuntimeEnabledFeatures::setSlimmingPaintEnabled(m_originalSlimmingPaintEnabled);
+ }
LayoutView* m_layoutView;
+ bool m_originalSlimmingPaintEnabled;
};
void drawEmptyClip(GraphicsContext& context, LayoutView& layoutView, PaintPhase phase, const FloatRect& bound)
« no previous file with comments | « Source/core/paint/DisplayItemListPaintTest.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698