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

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

Issue 1647473002: [Line Layout API] Add LineLayoutItem::resolveColor() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/Source/core/paint/TextPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/TextPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/TextPainterTest.cpp b/third_party/WebKit/Source/core/paint/TextPainterTest.cpp
index 5d9e7abc80b4c936e5337d80847d1d89308251bb..1321af800f0003a3560c983658fef2107757b4bb 100644
--- a/third_party/WebKit/Source/core/paint/TextPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/TextPainterTest.cpp
@@ -9,7 +9,7 @@
#include "core/css/CSSPrimitiveValue.h"
#include "core/frame/Settings.h"
#include "core/layout/LayoutTestHelper.h"
-#include "core/layout/LayoutText.h"
+#include "core/layout/api/LineLayoutText.h"
#include "core/paint/PaintInfo.h"
#include "core/style/ShadowData.h"
#include "core/style/ShadowList.h"
@@ -28,7 +28,7 @@ public:
{ }
protected:
- LayoutText* layoutText() { return m_layoutText; }
+ LineLayoutText lineLayoutText() { return LineLayoutText(m_layoutText); }
PaintInfo createPaintInfo(bool usesTextAsClip, bool isPrinting)
{
@@ -56,7 +56,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_Simple)
document().view()->updateAllLifecyclePhases();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
- *layoutText(), layoutText()->styleRef(), createPaintInfo(false /* usesTextAsClip */, false /* isPrinting */));
+ lineLayoutText(), lineLayoutText().styleRef(), createPaintInfo(false /* usesTextAsClip */, false /* isPrinting */));
EXPECT_EQ(Color(0, 0, 255), textStyle.fillColor);
EXPECT_EQ(Color(0, 0, 255), textStyle.strokeColor);
EXPECT_EQ(Color(0, 0, 255), textStyle.emphasisMarkColor);
@@ -74,7 +74,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_AllProperties)
document().view()->updateAllLifecyclePhases();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
- *layoutText(), layoutText()->styleRef(), createPaintInfo(false /* usesTextAsClip */, false /* isPrinting */));
+ lineLayoutText(), lineLayoutText().styleRef(), createPaintInfo(false /* usesTextAsClip */, false /* isPrinting */));
EXPECT_EQ(Color(255, 0, 0), textStyle.fillColor);
EXPECT_EQ(Color(0, 255, 0), textStyle.strokeColor);
EXPECT_EQ(Color(0, 0, 255), textStyle.emphasisMarkColor);
@@ -97,7 +97,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_UsesTextAsClip)
document().view()->updateAllLifecyclePhases();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
- *layoutText(), layoutText()->styleRef(), createPaintInfo(true /* usesTextAsClip */, false /* isPrinting */));
+ lineLayoutText(), lineLayoutText().styleRef(), createPaintInfo(true /* usesTextAsClip */, false /* isPrinting */));
EXPECT_EQ(Color::black, textStyle.fillColor);
EXPECT_EQ(Color::black, textStyle.strokeColor);
EXPECT_EQ(Color::black, textStyle.emphasisMarkColor);
@@ -116,7 +116,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_ForceBackgroundToWhite_NoAdjustmentNee
document().view()->updateAllLifecyclePhases();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
- *layoutText(), layoutText()->styleRef(), createPaintInfo(false /* usesTextAsClip */, true /* isPrinting */));
+ lineLayoutText(), lineLayoutText().styleRef(), createPaintInfo(false /* usesTextAsClip */, true /* isPrinting */));
EXPECT_EQ(Color(255, 0, 0), textStyle.fillColor);
EXPECT_EQ(Color(0, 255, 0), textStyle.strokeColor);
EXPECT_EQ(Color(0, 0, 255), textStyle.emphasisMarkColor);
@@ -133,7 +133,7 @@ TEST_F(TextPainterTest, TextPaintingStyle_ForceBackgroundToWhite_Darkened)
document().view()->updateAllLifecyclePhases();
TextPainter::Style textStyle = TextPainter::textPaintingStyle(
- *layoutText(), layoutText()->styleRef(), createPaintInfo(false /* usesTextAsClip */, true /* isPrinting */));
+ lineLayoutText(), lineLayoutText().styleRef(), createPaintInfo(false /* usesTextAsClip */, true /* isPrinting */));
EXPECT_EQ(Color(255, 220, 220).dark(), textStyle.fillColor);
EXPECT_EQ(Color(220, 255, 220).dark(), textStyle.strokeColor);
EXPECT_EQ(Color(220, 220, 255).dark(), textStyle.emphasisMarkColor);
« no previous file with comments | « third_party/WebKit/Source/core/paint/TextPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698