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

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

Issue 1862033002: Make OffscreenCanvas Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need to register, taking the same approach as extractTransferables Created 4 years, 8 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/LayoutTests/fast/canvas/OffscreenCanvas-transferable-exceptions.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 window.jsTestIsAsync = true;
11
12 var worker = new Worker('./resources/OffscreenCanvas-transferable.js');
13
14 var width = 50;
15 var height = 50;
16 var canvas = document.createElement("canvas");
17 canvas.width = width;
18 canvas.height = height;
19 var newOffscreenCanvas;
20
21 var offscreenCanvas = canvas.transferControlToOffscreen();
22 shouldBe("offscreenCanvas.width", "width");
23 shouldBe("offscreenCanvas.height", "height");
24
25 worker.postMessage({data: offscreenCanvas}, [offscreenCanvas]);
26 shouldBe("offscreenCanvas.width", "0");
27 shouldBe("offscreenCanvas.height", "0");
28
29 worker.onmessage = function(e) {
30 newOffscreenCanvas = e.data.data;
31 shouldBe("newOffscreenCanvas.width", "width");
32 shouldBe("newOffscreenCanvas.height", "height");
33 finishJSTest();
34 }
35 </script>
36 </body>
37 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable-exceptions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698