gecko/dom/tests/mochitest/bugs/iframe_bug407839-1.html

68 lines
1.3 KiB
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";
}
try {
storage = globalStorage["test1.example.org"];
}
catch (ex) {
message += "\n failed globalStorage[\"test1.example.org\"]";
}
try {
storage = globalStorage["test1.EXAMPLE.ORG"];
}
catch (ex) {
message += "\n failed globalStorage[\"test1.EXAMPLE.ORG\"]";
}
try {
storage = globalStorage["example.org"];
message += "\n passed globalStorage[\"example.org\"]";
}
catch (ex) {
}
try {
storage = globalStorage["org"];
message += "\n passed globalStorage[\"org\"]";
}
catch (ex) {
}
try {
storage = globalStorage["test2.test1.example.org"];
message += "\n passed globalStorage[\"test2.test1.example.org\"]";
}
catch (ex) {
}
try {
storage = globalStorage[""];
message += "\n passed globalStorage[\"\"]";
}
catch (ex) {
}
window.parent.postMessage(message, "http://mochi.test:8888");
}
window.addEventListener("load", run, false);
</script>
</head>
<body>
</body>
</html>