зеркало из https://github.com/mozilla/gecko-dev.git
28 строки
605 B
HTML
28 строки
605 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for BroadcastChannel.postMessage invalid State</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">
|
|
|
|
|
|
let c = new BroadcastChannel("foo");
|
|
|
|
try {
|
|
c.postMessage(Symbol());
|
|
ok(false, "This should throw!");
|
|
} catch(e) {
|
|
ok(true, "This should throw!");
|
|
is(e.name, "DataCloneError", "Correct DataCloneError exception thrown");
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|