3 <script src=
"cross-frame-access.js"></script>
9 var customAttributeOld
;
11 receiver = function(e
)
13 if (e
.data
== "settingValuesComplete")
16 addEventListener('message', receiver
, false);
18 window
.onload = function()
20 // Add manuel run buttons if the browser does not support window.postMessage
21 if (!window
.postMessage
) {
22 var button
= document
.createElement("button");
23 button
.appendChild(document
.createTextNode("Step 2 - Set Check"));
24 button
.onclick
= setCheck
;
25 document
.body
.appendChild(button
);
28 window
.location
.customAttribute
= "customAttribute";
30 assignOld
= window
.location
.assign
;
31 replaceOld
= window
.location
.replace
;
32 reloadOld
= window
.location
.reload
;
33 toStringOld
= window
.location
.toString
;
34 customAttributeOld
= window
.location
.customAttribute
;
36 if (window
.postMessage
)
37 window
.parent
.postMessage("storedOldValuesComplete", "*");
42 log("\n----- tests for putting window.history and its properties -----\n");
44 shouldBe("window.location.assign", "assignOld");
45 shouldBe("window.location.replace", "replaceOld");
46 shouldBe("window.location.reload", "reloadOld");
47 shouldBe("window.location.toString", "toStringOld");
48 shouldBe("window.location.customAttribute", "customAttributeOld");
50 if (window
.testRunner
)
51 testRunner
.notifyDone();
56 <pre id=
"console"></pre>