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

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

Issue 1196223008: ViewPainter should skip background in print economy mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix unittests 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/TextPainterTest.cpp
diff --git a/Source/core/paint/TextPainterTest.cpp b/Source/core/paint/TextPainterTest.cpp
index 1f2e172914462a72c595209e1f77c790b0c2ae85..4aa6eab06a6600341041fa80ff2dcd8eb32138d2 100644
--- a/Source/core/paint/TextPainterTest.cpp
+++ b/Source/core/paint/TextPainterTest.cpp
@@ -100,6 +100,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_ForceBackgroundToWhite_NoAdjustmentNee
document().body()->setInlineStyleProperty(CSSPropertyWebkitTextEmphasisColor, CSSValueBlue);
document().body()->setInlineStyleProperty(CSSPropertyWebkitPrintColorAdjust, CSSValueEconomy);
document().settings()->setShouldPrintBackgrounds(false);
+ document().setPrinting(true);
document().view()->updateLayoutAndStyleForPainting();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
@@ -116,6 +117,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_ForceBackgroundToWhite_Darkened)
document().body()->setInlineStyleProperty(CSSPropertyWebkitTextEmphasisColor, "rgb(220, 220, 255)");
document().body()->setInlineStyleProperty(CSSPropertyWebkitPrintColorAdjust, CSSValueEconomy);
document().settings()->setShouldPrintBackgrounds(false);
+ document().setPrinting(true);
document().view()->updateLayoutAndStyleForPainting();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(

Powered by Google App Engine
This is Rietveld 408576698