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 460c5ea7182b93ffcc86ae036e984b1f03a008ec..0db42f0b02924ae2655b430b47026b5a8948b281 100644 |
--- a/third_party/WebKit/Source/core/page/PrintContextTest.cpp |
+++ b/third_party/WebKit/Source/core/page/PrintContextTest.cpp |
@@ -301,21 +301,20 @@ TEST_F(PrintContextTest, LinkTargetBoundingBox) { |
} |
TEST_F(PrintContextFrameTest, WithSubframe) { |
- MockCanvas canvas; |
+ setChildFrameHTML( |
+ absoluteBlockHtmlForLink(50, 60, 70, 80, "#fragment") + |
+ absoluteBlockHtmlForLink(150, 160, 170, 180, "http://www.google.com") + |
+ absoluteBlockHtmlForLink(250, 260, 270, 280, |
+ "http://www.google.com#fragment")); |
+ |
document().setBaseURLOverride(KURL(ParsedURLString, "http://a.com/")); |
setBodyInnerHTML( |
"<style>::-webkit-scrollbar { display: none }</style>" |
- "<iframe id='frame' src='http://b.com/' width='500' height='500'" |
+ "<iframe src='http://b.com/' width='500' height='500'" |
" style='border-width: 5px; margin: 5px; position: absolute; top: 90px; " |
"left: 90px'></iframe>"); |
- setupChildIframe( |
- "frame", absoluteBlockHtmlForLink(50, 60, 70, 80, "#fragment") + |
- absoluteBlockHtmlForLink(150, 160, 170, 180, |
- "http://www.google.com") + |
- absoluteBlockHtmlForLink(250, 260, 270, 280, |
- "http://www.google.com#fragment")); |
- |
+ MockCanvas canvas; |
printSinglePage(canvas); |
const Vector<MockCanvas::Operation>& operations = canvas.recordedOperations(); |
@@ -327,28 +326,24 @@ TEST_F(PrintContextFrameTest, WithSubframe) { |
} |
TEST_F(PrintContextFrameTest, WithScrolledSubframe) { |
- MockCanvas canvas; |
+ setChildFrameHTML( |
+ absoluteBlockHtmlForLink(10, 10, 20, 20, "http://invisible.com") + |
+ absoluteBlockHtmlForLink(50, 60, 70, 80, "http://partly.visible.com") + |
+ absoluteBlockHtmlForLink(150, 160, 170, 180, "http://www.google.com") + |
+ absoluteBlockHtmlForLink(250, 260, 270, 280, |
+ "http://www.google.com#fragment") + |
+ absoluteBlockHtmlForLink(850, 860, 70, 80, |
+ "http://another.invisible.com")); |
document().setBaseURLOverride(KURL(ParsedURLString, "http://a.com/")); |
setBodyInnerHTML( |
"<style>::-webkit-scrollbar { display: none }</style>" |
- "<iframe id='frame' src='http://b.com/' width='500' height='500'" |
+ "<iframe src='http://b.com/' width='500' height='500'" |
" style='border-width: 5px; margin: 5px; position: absolute; top: 90px; " |
"left: 90px'></iframe>"); |
- Document& frameDocument = setupChildIframe( |
- "frame", |
- absoluteBlockHtmlForLink(10, 10, 20, 20, "http://invisible.com") + |
- absoluteBlockHtmlForLink(50, 60, 70, 80, |
- "http://partly.visible.com") + |
- absoluteBlockHtmlForLink(150, 160, 170, 180, |
- "http://www.google.com") + |
- absoluteBlockHtmlForLink(250, 260, 270, 280, |
- "http://www.google.com#fragment") + |
- absoluteBlockHtmlForLink(850, 860, 70, 80, |
- "http://another.invisible.com")); |
- |
- frameDocument.domWindow()->scrollTo(100, 100); |
+ childDocument().domWindow()->scrollTo(100, 100); |
+ MockCanvas canvas; |
printSinglePage(canvas); |
const Vector<MockCanvas::Operation>& operations = canvas.recordedOperations(); |