| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/testharness.js"></script> | 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> | 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 function createCanvas(width, height) { | 9 function createCanvas(width, height) { |
| 10 var canvas = document.createElement("canvas"); | 10 var canvas = document.createElement("canvas"); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 offscreenCanvas2 = canvas2.transferControlToOffscreen(); | 35 offscreenCanvas2 = canvas2.transferControlToOffscreen(); |
| 36 assert_false("transferControlToOffscreen from a canvas with context didn
't throw an exception."); | 36 assert_false("transferControlToOffscreen from a canvas with context didn
't throw an exception."); |
| 37 }, "transferControlToOffscreen from a canvas with context throws an exceptio
n"); | 37 }, "transferControlToOffscreen from a canvas with context throws an exceptio
n"); |
| 38 }, "Tests whether transferControlToOffscreen throws exception correctly."); | 38 }, "Tests whether transferControlToOffscreen throws exception correctly."); |
| 39 | 39 |
| 40 test(function() { | 40 test(function() { |
| 41 var canvas3 = createCanvas(10, 10); | 41 var canvas3 = createCanvas(10, 10); |
| 42 var offscreenCanvas3 = canvas3.transferControlToOffscreen(); | 42 var offscreenCanvas3 = canvas3.transferControlToOffscreen(); |
| 43 assert_equals(offscreenCanvas3.width, 10); | 43 assert_equals(offscreenCanvas3.width, 10); |
| 44 assert_equals(offscreenCanvas3.height, 10); | 44 assert_equals(offscreenCanvas3.height, 10); |
| 45 offscreenCanvas3.width = 20; | 45 assert_throws("InvalidStateError", function() { offscreenCanvas3.width = 20;
}); |
| 46 offscreenCanvas3.height = 20; | 46 assert_throws("InvalidStateError", function() { offscreenCanvas3.height = 20
; }); |
| 47 assert_equals(offscreenCanvas3.width, 10); | 47 }, "Test if resizing on offscreencanvas transferred from html canvas has thrown
exceptions."); |
| 48 assert_equals(offscreenCanvas3.height, 10); | |
| 49 }, "Test if resizing on offscreencanvas transferred from html canvas has no effe
ct"); | |
| 50 | 48 |
| 51 </script> | 49 </script> |
| 52 </body> | 50 </body> |
| 53 </html> | 51 </html> |
| OLD | NEW |