Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE HTML>
<html>
<!--
If we set domain using document.domain = "...", a page and iframe must be
treated as the same domain if they differ in port number,
e.g. test1.example.org:8000 and test2.example.org:80 are the same domain if
document.domain = "example.org".
-->
<head>
<title>Test for Bug 1292522</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript">
if (navigator.platform.startsWith("Linux")) {
SimpleTest.expectAssertions(0, 1);
}
SimpleTest.waitForExplicitFinish();
window.addEventListener("message", onMessageReceived);
var page;
function onMessageReceived(event)
{
is(event.data, "testiframe", "Must be able to access the variable," +
" because page and iframe are the " +
"same domain.");
page.close();
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>