blob: 97522a6c1928b0f0d47ba7eaca77f5bd24332f05 [file] [edit]
<!DOCTYPE html>
<title>"Establish a WebSocket connection", with multiple globals in play</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!-- This is the entry global -->
<iframe src="http://{{hosts[][www]}}:{{ports[http][1]}}/websockets/multi-globals/support/incumbent-cross-origin.sub.html"></iframe>
<script>
"use strict";
setup({ explicit_done: true });
document.domain = "{{hosts[][]}}";
window.onload = () => {
async_test(t => {
frames[0].setupWebSocket(t.step_func_done(event => {
assert_equals(event.data, "http://{{hosts[][www1]}}:{{ports[http][1]}}");
}));
}, "origin should be derived from the relevant window");
done();
};
</script>