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

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

Issue 2330553002: Disallow resizing on OffscreenCanvas that has been transferred control from canvas (Closed)
Patch Set: test Created 4 years, 3 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24 matching lines...) Expand all
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698