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: Source/platform/graphics/paint/DisplayItemListTest.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/paint/LayoutObjectDrawingRecorderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemListTest.cpp
diff --git a/Source/platform/graphics/paint/DisplayItemListTest.cpp b/Source/platform/graphics/paint/DisplayItemListTest.cpp
index 01c5fd6a30d00e21662f307a071bf9b2a634e9d5..d0527e658a51af52625c32770afe89e4338722c9 100644
--- a/Source/platform/graphics/paint/DisplayItemListTest.cpp
+++ b/Source/platform/graphics/paint/DisplayItemListTest.cpp
@@ -15,6 +15,10 @@
namespace blink {
class DisplayItemListTest : public ::testing::Test {
+public:
+ DisplayItemListTest()
+ : m_originalSlimmingPaintEnabled(RuntimeEnabledFeatures::slimmingPaintEnabled()) { }
+
protected:
DisplayItemList& displayItemList() { return m_displayItemList; }
const DisplayItems& newPaintListBeforeUpdate() { return displayItemList().m_newDisplayItems; }
@@ -26,10 +30,11 @@ private:
}
virtual void TearDown() override
{
- RuntimeEnabledFeatures::setSlimmingPaintEnabled(false);
+ RuntimeEnabledFeatures::setSlimmingPaintEnabled(m_originalSlimmingPaintEnabled);
}
DisplayItemList m_displayItemList;
+ bool m_originalSlimmingPaintEnabled;
};
const DisplayItem::Type foregroundDrawingType = static_cast<DisplayItem::Type>(DisplayItem::DrawingPaintPhaseFirst + 4);
« no previous file with comments | « Source/core/paint/LayoutObjectDrawingRecorderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698