mirror of
https://github.com/servo/servo.git
synced 2025-07-03 13:33:39 +01:00
13 lines
483 B
HTML
13 lines
483 B
HTML
<!DOCTYPE html>
|
|
<title>data URL shared worker</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<div id=log></div>
|
|
<script>
|
|
async_test(t => {
|
|
var worker = new SharedWorker("data:,onconnect = (e) => { fetch('/').then(() => e.ports[0].postMessage('fail'), () => e.ports[0].postMessage('pass')) }") // not same-origin
|
|
worker.port.onmessage = t.step_func_done(e => {
|
|
assert_equals(e.data, "pass")
|
|
})
|
|
})
|
|
</script>
|