| Index: third_party/WebKit/LayoutTests/printing/page-height-zero.html
|
| diff --git a/third_party/WebKit/LayoutTests/printing/page-height-zero.html b/third_party/WebKit/LayoutTests/printing/page-height-zero.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..938936065711b83e575b6b789e33d91c9efd9a7f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/printing/page-height-zero.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<style>
|
| + @media print {
|
| + /* Need something to trigger multicol layout when entering print mode,
|
| + to trigger the original crash bug (division by zero). */
|
| + #multicol { width: 50%; }
|
| + }
|
| +</style>
|
| +<div id="multicol" style="-webkit-columns:2;"> </div>
|
| +<p id="log">FAIL: Test did not run.</p>
|
| +<script>
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| + if (window.internals) {
|
| + var log = document.getElementById("log");
|
| + log.innerHTML = "";
|
| + try {
|
| + internals.numberOfPages(100, 0);
|
| + log.innerHTML += "FAIL: numberOfPages() with zero height didn't throw any exception.<br>";
|
| + } catch(e) {
|
| + log.innerHTML += "numberOfPages() with zero height threw an exception, as expected.<br>";
|
| + }
|
| +
|
| + try {
|
| + internals.pageNumber(log, 100, 0);
|
| + log.innerHTML += "FAIL: pageNumber() with zero height didn't throw any exception.<br>";
|
| + } catch (e) {
|
| + log.innerHTML += "pageNumber() with zero height threw an exception, as expected.<br>";
|
| + }
|
| + }
|
| +</script>
|
|
|