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

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

Issue 1917733004: Reland of: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address all comments Created 4 years, 7 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8
9 description("Test OffscreenCanvas transferable with exception cases.");
10
11 var worker = new Worker('./resources/OffscreenCanvas-transferable.js');
12
13 var width = 50;
14 var height = 50;
15 var offscreenCanvas1 = new OffscreenCanvas(width, height);
16
17 var ctx;
18 shouldNotThrow("ctx = offscreenCanvas1.getContext('2d')");
19 shouldBeType("ctx", "OffscreenCanvasRenderingContext2D");
20 shouldThrow("worker.postMessage({data: offscreenCanvas1}, [offscreenCanvas1])");
21
22 var offscreenCanvas2 = new OffscreenCanvas(width, height);
23 worker.postMessage({data: offscreenCanvas2}, [offscreenCanvas2]);
24 shouldThrow("offscreenCanvas2.transferToImageBitmap()");
25
26 shouldThrow("worker.postMessage({data: offscreenCanvas2}, [offscreenCanvas2])");
27 shouldThrow("offscreenCanvas2.getContext('2d')");
28
29 finishJSTest();
30 </script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698