| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <script src="../../resources/testharness.js"></script> |
| 2 <html> | 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <head> | 3 |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <script> | 4 <script> |
| 7 description("This test checks behavior of drawImage on a canvas that failed
to allocate its backing store. This test passes by not crashing."); | 5 test(function(){ |
| 6 |
| 8 var canvas1 = document.createElement("canvas"); | 7 var canvas1 = document.createElement("canvas"); |
| 9 var ctx1 = canvas1.getContext('2d'); | 8 var ctx1 = canvas1.getContext('2d'); |
| 10 var canvas2 = document.createElement("canvas"); | 9 var canvas2 = document.createElement("canvas"); |
| 11 // Terapixel canvas should fail to allocate | 10 // Terapixel canvas should fail to allocate |
| 12 canvas2.width = 1000000; | 11 canvas2.width = 1000000; |
| 13 canvas2.height = 1000000; | 12 canvas2.height = 1000000; |
| 14 var ctx2 = canvas2.getContext('2d'); | 13 var ctx2 = canvas2.getContext('2d'); |
| 15 ctx2.drawImage(canvas1, 0, 0); | 14 ctx2.drawImage(canvas1, 0, 0); |
| 15 |
| 16 }, "This test checks behavior of drawImage on a canvas that failed to allocate i
ts backing store. This test passes by not crashing."); |
| 16 </script> | 17 </script> |
| 17 </body> | |
| 18 </html> | |
| OLD | NEW |