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 e8b43a0202ed50395b0ad134e2052e4bf37b1859..60ef0a5b6309189b90fd9573fd07e0e765acf005 100644 |
--- a/third_party/WebKit/Source/core/paint/TextPainterTest.cpp |
+++ b/third_party/WebKit/Source/core/paint/TextPainterTest.cpp |
@@ -14,6 +14,7 @@ |
#include "core/paint/PaintInfo.h" |
#include "core/style/ShadowData.h" |
#include "core/style/ShadowList.h" |
+#include "platform/graphics/paint/PaintController.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace blink { |
@@ -21,11 +22,20 @@ namespace { |
class TextPainterTest : public RenderingTest { |
public: |
- TextPainterTest() : m_layoutText(nullptr) { } |
+ TextPainterTest() |
+ : m_layoutText(nullptr) |
+ , m_paintController(PaintController::create()) |
+ , m_context(*m_paintController) |
+ { } |
protected: |
LayoutText* layoutText() { return m_layoutText; } |
+ PaintInfo createPaintInfo(bool usesTextAsClip, bool isPrinting) |
+ { |
+ return PaintInfo(m_context, IntRect(), usesTextAsClip ? PaintPhaseTextClip : PaintPhaseBlockBackground, isPrinting ? GlobalPaintPrinting : GlobalPaintNormalPhase, 0); |
+ } |
+ |
private: |
void SetUp() override |
{ |
@@ -37,13 +47,10 @@ private: |
} |
LayoutText* m_layoutText; |
+ OwnPtr<PaintController> m_paintController; |
+ GraphicsContext m_context; |
}; |
-static PaintInfo createPaintInfo(bool usesTextAsClip, bool isPrinting) |
-{ |
- return PaintInfo(nullptr, IntRect(), usesTextAsClip ? PaintPhaseTextClip : PaintPhaseBlockBackground, isPrinting ? GlobalPaintPrinting : GlobalPaintNormalPhase, 0); |
-} |
- |
TEST_F(TextPainterTest, TextPaintingStyle_Simple) |
{ |
document().body()->setInlineStyleProperty(CSSPropertyColor, CSSValueBlue); |