mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
39 lines
778 B
HTML
39 lines
778 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for BroadcastChannel</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="content"></div>
|
|
|
|
<script type="application/javascript">
|
|
|
|
function runTest() {
|
|
x = new BroadcastChannel('foo');
|
|
y = new BroadcastChannel('foo');
|
|
|
|
function func(e) {
|
|
is(e.target, y, "The target is !x");
|
|
|
|
SimpleTest.executeSoon(function() {
|
|
SimpleTest.finish();
|
|
});
|
|
}
|
|
|
|
x.onmessage = func;
|
|
y.onmessage = func;
|
|
|
|
x.postMessage('foo');
|
|
}
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
SpecialPowers.pushPrefEnv({"set": [["dom.broadcastChannel.enabled", true]]}, runTest);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|