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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable.html
new file mode 100644
index 0000000000000000000000000000000000000000..0c42abd0c1f21fa8c9c27f4391fa2873a7434b22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+
+description("Test OffscreenCanvas transferable with exception cases.");
+window.jsTestIsAsync = true;
+
+var worker = new Worker('./resources/OffscreenCanvas-transferable.js');
+
+var width = 50;
+var height = 50;
+var canvas = document.createElement("canvas");
+canvas.width = width;
+canvas.height = height;
+var newOffscreenCanvas;
+
+var offscreenCanvas = canvas.transferControlToOffscreen();
+shouldBe("offscreenCanvas.width", "width");
+shouldBe("offscreenCanvas.height", "height");
+
+worker.postMessage({data: offscreenCanvas}, [offscreenCanvas]);
+shouldBe("offscreenCanvas.width", "0");
+shouldBe("offscreenCanvas.height", "0");
+
+worker.onmessage = function(e) {
+ newOffscreenCanvas = e.data.data;
+ shouldBe("newOffscreenCanvas.width", "width");
+ shouldBe("newOffscreenCanvas.height", "height");
+ finishJSTest();
+}
+</script>
+</body>
+</html>
« 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