forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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] df18d7a Change-Id: I5a17d76b53515975c90020bd37639f0af4563130 Reviewed-on: https://chromium-review.googlesource.com/c/1371868 Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#615976}
- Loading branch information
Showing
12 changed files
with
10 additions
and
12,089 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,411 changes: 0 additions & 2,411 deletions
2,411
...link-features=LayoutNG/printing/single-line-must-not-be-split-into-two-pages-expected.txt
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+22.2 KB
...atform/linux/printing/single-line-must-not-be-split-into-two-pages-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.1 KB
...mac-mac10.12/printing/single-line-must-not-be-split-into-two-pages-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.1 KB
...platform/mac/printing/single-line-must-not-be-split-into-two-pages-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,413 changes: 0 additions & 2,413 deletions
2,413
...web_tests/platform/mac/printing/single-line-must-not-be-split-into-two-pages-expected.txt
This file was deleted.
Oops, something went wrong.
2,413 changes: 0 additions & 2,413 deletions
2,413
...layout_ng_experimental/printing/single-line-must-not-be-split-into-two-pages-expected.txt
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+18.2 KB
...platform/win/printing/single-line-must-not-be-split-into-two-pages-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,413 changes: 0 additions & 2,413 deletions
2,413
...web_tests/platform/win/printing/single-line-must-not-be-split-into-two-pages-expected.txt
This file was deleted.
Oops, something went wrong.
2,413 changes: 0 additions & 2,413 deletions
2,413
...layout_ng_experimental/printing/single-line-must-not-be-split-into-two-pages-expected.txt
This file was deleted.
Oops, something went wrong.
34 changes: 9 additions & 25 deletions
34
third_party/blink/web_tests/printing/single-line-must-not-be-split-into-two-pages.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,34 @@ | ||
<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> |