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

Unified Diff: third_party/WebKit/Source/core/page/PrintContextTest.cpp

Issue 1592493002: Fix links in inline continuations in printed PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove an extra condition 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
Index: third_party/WebKit/Source/core/page/PrintContextTest.cpp
diff --git a/third_party/WebKit/Source/core/page/PrintContextTest.cpp b/third_party/WebKit/Source/core/page/PrintContextTest.cpp
index 73642f3f858ccb130fad37120e335d180410e6e0..ccd774b1fa546991cce4c109ee51f7b43e507927 100644
--- a/third_party/WebKit/Source/core/page/PrintContextTest.cpp
+++ b/third_party/WebKit/Source/core/page/PrintContextTest.cpp
@@ -264,6 +264,18 @@ TEST_F(PrintContextTest, LinkTargetBoundingBox)
EXPECT_SKRECT_EQ(50, 60, 200, 100, operations[0].rect);
}
+TEST_F(PrintContextTest, InlineContinuation)
+{
+ MockCanvas canvas;
+ setBodyInnerHTML("<a href='http://www.google.com'><div>Target</div></a>");
+ printSinglePage(canvas);
+
+ const Vector<MockCanvas::Operation>& operations = canvas.recordedOperations();
+ ASSERT_EQ(1u, operations.size());
+ EXPECT_EQ(MockCanvas::DrawRect, operations[0].type);
+ EXPECT_FALSE(operations[0].rect.isEmpty());
+}
+
TEST_F(PrintContextFrameTest, WithSubframe)
{
MockCanvas canvas;

Powered by Google App Engine
This is Rietveld 408576698