Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html

Issue 2515623003: Stop OffscreenCanvas resize from changing placeholder attributes (Closed)
Patch Set: report correct intrinsic size Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 var anotherOffscreenCanvas = canvas2b.transferControlToOffscreen(); 42 var anotherOffscreenCanvas = canvas2b.transferControlToOffscreen();
43 }, "canvas.transferControlToOffscreen() is not allowed to called more than o nce for the same canvas."); 43 }, "canvas.transferControlToOffscreen() is not allowed to called more than o nce for the same canvas.");
44 }, "Tests whether transferControlToOffscreen throws exception correctly."); 44 }, "Tests whether transferControlToOffscreen throws exception correctly.");
45 45
46 test(function() { 46 test(function() {
47 var canvas4 = createCanvas(10, 10); 47 var canvas4 = createCanvas(10, 10);
48 var offscreenCanvas4 = canvas4.transferControlToOffscreen(); 48 var offscreenCanvas4 = canvas4.transferControlToOffscreen();
49 assert_throws("InvalidStateError", function() { 49 assert_throws("InvalidStateError", function() {
50 canvas4.getContext("2d"); 50 canvas4.getContext("2d");
51 }, "canvas.getContext() is not allowed after transferring control to offscre en."); 51 }, "canvas.getContext() is not allowed after transferring control to offscre en.");
52 assert_throws("InvalidStateError", function() { 52 }, "Test that getContext throw an exception if called after transferControlToOff screen.");
53 canvas4.height = 20;
54 }, "canvas resizing height is not allowed after transferring control to offs creen.");
55 assert_throws("InvalidStateError", function() {
56 canvas4.width = 20;
57 }, "canvas resizing width is not allowed after transferring control to offsc reen.");
58 }, "Test if modifying canvas after it transfers controls to offscreen throw exce ptions");
59 53
60 </script> 54 </script>
61 </body> 55 </body>
62 </html> 56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698