Commit cf2439b9 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

Make printing/single-line-must-not-be-split-[...].html actually "print".

At some point [1] it ceased to be a printing test, so it didn't really
test anything useful. Make sure that we enter print mode, and turn it
into a PNG test. Reduce the number of lines and use the Ahem font, to
keep the PNG file sizes low.

Mark the test as failing with LayoutNGBlockFragmentation. It used to
pass because there was no block fragmentation involved in the test.

[1] df18d7ad

Change-Id: I5a17d76b53515975c90020bd37639f0af4563130
Reviewed-on: https://chromium-review.googlesource.com/c/1371868Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615976}
parent dbeccd05
......@@ -290,7 +290,6 @@ crbug.com/591099 paint/invalidation/svg/transform-focus-ring-repaint.html [ Fail
crbug.com/591099 paint/invalidation/table/table-extra-bottom-grow.html [ Failure ]
crbug.com/591099 paint/invalidation/table/table-two-pass-layout-overpaint.html [ Failure ]
crbug.com/591099 printing/iframe-svg-in-object-print.html [ Failure ]
crbug.com/591099 printing/single-line-must-not-be-split-into-two-pages.html [ Failure ]
crbug.com/591099 scrollbars/auto-scrollbar-fit-content.html [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
crbug.com/591099 svg/zoom/page/zoom-svg-float-border-padding.xml [ Pass ]
......
......@@ -1492,6 +1492,7 @@ crbug.com/591099 virtual/layout_ng_experimental/printing/page-break-widows.html
crbug.com/591099 virtual/layout_ng_experimental/printing/page-count-relayout-shrink.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/printing/respect-layout-overflow-from-pagination.html [ Failure ]
crbug.com/824918 virtual/layout_ng_experimental/printing/setPrinting.html [ Failure ]
crbug.com/829028 virtual/layout_ng_experimental/printing/single-line-must-not-be-split-into-two-pages.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/printing/tfoot-repeats-at-bottom-of-each-page-multiple-tables.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/printing/thead-repeat-in-nested-table.html [ Failure ]
crbug.com/591099 virtual/layout_ng_experimental/printing/thead-repeats-at-top-of-each-page.html [ Failure ]
......
<html>
<head>
</head>
<!DOCTYPE html>
<script src="../resources/ahem.js"></script>
<style>
/* relative positioning ensures underlying Layer */
.renderingArea {
position: relative;
font: 70px/1 Ahem;
line-height: 100px;
}
</style>
<body>
<p>
A single line must not be split into two pages.
This test checks if a single line is not split into two pages.
To run this test manually, comment out the last two lines of JavaScript
(See the comment in JavaScript) and then print this page.
If no lines are split into two pages, the test passes.
To run this test manually, print this page.
</p>
<div class="renderingArea" id="renderingArea1"></div>
<h2>And now for some really long unbreakable lines:</h2>
<div class="renderingArea" id="renderingArea2"></div>
<p>Non-overflowed lines:</p>
<pre id="nonOverflowedLines"></pre>
<p>Overflowed lines:</p>
<pre id="overflowedLines"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
testRunner.setPrinting();
var str = "";
for (var i = 0; i < 400; i++) {
for (var i = 0; i < 30; i++) {
str += "WWWWWW<br />";
}
document.getElementById("renderingArea1").innerHTML = str;
if (window.internals)
document.getElementById("nonOverflowedLines").innerText = internals.elementLayoutTreeAsText(document.getElementById("renderingArea1"));
str = "";
for (var i = 0; i < 400; i++) {
for (var i = 0; i < 30; i++) {
str += "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW<br />";
}
document.getElementById("renderingArea2").innerHTML = str;
if (window.internals)
document.getElementById("overflowedLines").innerText = internals.elementLayoutTreeAsText(document.getElementById("renderingArea2"));
// To test manually, comment out the following two lines,
// print this page, and check if no lines are split across two pages.
document.getElementById("renderingArea1").innerHTML = "";
document.getElementById("renderingArea2").innerHTML = "";
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment