summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/constructors/Worker/Blob-url.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/workers/constructors/Worker/Blob-url.html')
-rw-r--r--testing/web-platform/tests/workers/constructors/Worker/Blob-url.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/constructors/Worker/Blob-url.html b/testing/web-platform/tests/workers/constructors/Worker/Blob-url.html
new file mode 100644
index 000000000..168fc91ae
--- /dev/null
+++ b/testing/web-platform/tests/workers/constructors/Worker/Blob-url.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Web Workers: Worker - Blob url</title>
+<link rel="author" title="Intel" href="http://www.intel.com">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+
+ async_test(function(t) {
+ var blob = new Blob(["onmessage = function(event) { postMessage(event.data); }"], {type: "text/plain"});
+ var worker = new Worker(window.URL.createObjectURL(blob));
+ var data = "Blob URL";
+ worker.postMessage(data);
+ worker.onmessage = t.step_func(function(event) {
+ assert_equals(event.data, data, "event.data");
+ t.done();
+ });
+ }, "Worker supports Blob url");
+
+</script>