OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 @media print { |
| 4 /* Need something to trigger multicol layout when entering print mode, |
| 5 to trigger the original crash bug (division by zero). */ |
| 6 #multicol { width: 50%; } |
| 7 } |
| 8 </style> |
| 9 <div id="multicol" style="-webkit-columns:2;"> </div> |
| 10 <p id="log">FAIL: Test did not run.</p> |
| 11 <script> |
| 12 if (window.testRunner) |
| 13 testRunner.dumpAsText(); |
| 14 if (window.internals) { |
| 15 var log = document.getElementById("log"); |
| 16 log.innerHTML = ""; |
| 17 try { |
| 18 internals.numberOfPages(100, 0); |
| 19 log.innerHTML += "FAIL: numberOfPages() with zero height didn't thro
w any exception.<br>"; |
| 20 } catch(e) { |
| 21 log.innerHTML += "numberOfPages() with zero height threw an exceptio
n, as expected.<br>"; |
| 22 } |
| 23 |
| 24 try { |
| 25 internals.pageNumber(log, 100, 0); |
| 26 log.innerHTML += "FAIL: pageNumber() with zero height didn't throw a
ny exception.<br>"; |
| 27 } catch (e) { |
| 28 log.innerHTML += "pageNumber() with zero height threw an exception,
as expected.<br>"; |
| 29 } |
| 30 } |
| 31 </script> |
OLD | NEW |