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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html

Issue 2749503002: [wasm] enable wasm structured cloning in specific cases (Closed)
Patch Set: moved frame.html Created 3 years, 9 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
Index: third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html b/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..0fd77e5eee35da33d9dbf2219918fb791c83aaa8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Service Worker: postMessage with wasm</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../serviceworker/resources/test-helpers.js"></script>
+<script>
+ promise_test(t => {
+ return service_worker_unregister_and_register(t, 'resources/service-worker.js', 'resources/blank.html')
+ .then(r=>{
+ add_completion_callback(() => r.unregister());
+ registration = r;
+ worker = registration.installing;
+
+ var messageChannel = new MessageChannel();
+ port = messageChannel.port1;
+ return new Promise(resolve => {
+ port.onmessage = resolve;
+ worker.postMessage({port: messageChannel.port2}, [messageChannel.port2]);
+ worker.postMessage({compile:true});
+ });
+ })
+ .then(e => {
+ assert_true(e.data == undefined);
+ })
+
+ }, 'postMessaging wasm from a service worker should fail');
+</script>

Powered by Google App Engine
This is Rietveld 408576698