OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/run-after-display.js"></script> |
2 <canvas id="c" width=100 height=100></canvas> | 3 <canvas id="c" width=100 height=100></canvas> |
3 <!-- Tests that resizing a canvas to very large dimensions after a composite doe
s not crash --> | 4 <!-- Tests that resizing a canvas to very large dimensions after a composite doe
s not crash --> |
4 <script> | 5 <script> |
5 if (window.testRunner) | 6 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 testRunner.waitUntilDone(); |
| 9 } |
7 var c = document.getElementById("c"); | 10 var c = document.getElementById("c"); |
8 | 11 |
9 function resize() { | 12 function resize() { |
10 c.width = "5000"; | 13 c.width = "5000"; |
11 c.height = "10000"; | 14 c.height = "10000"; |
| 15 document.write("PASS"); |
| 16 if (window.testRunner) |
| 17 testRunner.notifyDone(); |
12 } | 18 } |
13 | 19 |
14 if (window.testRunner) { | 20 // Force a composite at normal width/height to ensure we have a compositing laye
r for the canvas. |
15 testRunner.display(); // Force a composite at normal width/height to ensure
we have a compositing layer for the canvas. | 21 runAfterDisplay(resize); |
16 resize(); | |
17 } else | |
18 window.setTimeout(resize, 0); | |
19 | |
20 document.write("PASS"); | |
21 </script> | 22 </script> |
22 | 23 |
OLD | NEW |