Revision 81aaac8299a4608b990ab472a89a522cdeeb29f7 authored by Geoffrey Sneddon on 30 April 2018, 15:11:48 UTC, committed by Geoffrey Sneddon on 30 April 2018, 15:11:48 UTC
1 parent d1cb0cb
SharedWorker_blobUrl.html
<!DOCTYPE html>
<title>Shared Worker: Blob URL passed over message port</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
</body>
<script>
promise_test(t => {
let worker;
let blob;
let blobUrl;
let blobText = 'Blob URL test';
return new Promise(function(resolve) {
worker = new SharedWorker('support/WorkerFetchURL.js');
blob = new Blob([blobText]);
blobUrl = URL.createObjectURL(blob);
worker.port.postMessage(blobUrl);
worker.port.onmessage = resolve;
})
.then(e => {
assert_equals(e.data, 'Worker reply:' + blobText);
URL.revokeObjectURL(blobUrl);
});
}, 'Blob URL shared by document on SharedWorker');
</script>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...