gecko/dom/tests/mochitest/bugs/iframe_bug424093.html

43 lines
840 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Child window at test1.example.org</title>
<script type="application/javascript">
function run()
{
var storage;
var message = "child-response";
// This script expects to be loaded as test1.example.org
if (window.location.host != "test1.example.org") {
message += "\n child not loaded as test1.example.org";
}
document.domain = "example.org";
try {
storage = globalStorage["test1.example.org"];
message += "\n passed globalStorage[\"test1.example.org\"]";
}
catch (ex) {
}
try {
storage = globalStorage["example.org"];
}
catch (ex) {
message += "\n failed globalStorage[\"example.org\"]";
}
window.parent.postMessage(message, "http://mochi.test:8888");
}
window.addEventListener("load", run, false);
</script>
</head>
<body>
</body>
</html>