WebCore:
[WebKit-https.git] / LayoutTests / http / tests / security / cross-frame-access-history-put.html
1 <html>
2 <head>
3     <script>
4         if (window.layoutTestController) {
5             layoutTestController.dumpAsText();
6             layoutTestController.dumpChildFramesAsText();
7             layoutTestController.waitUntilDone();
8         }
9
10         receiver = function(e)
11         {
12             if (e.data == "storedOldValuesComplete")
13                 setTest();
14         }
15         document.addEventListener('message', receiver, false);
16
17         setTest = function()
18         {
19             window.targetWindow = frames[0];
20
21             targetWindow.history.back = "FAIL!! CUSTOM back";
22             targetWindow.history.forward = "FAIL!! CUSTOM forward";
23             targetWindow.history.go = "FAIL!! CUSTOM go";
24             targetWindow.history.toString = "FAIL!! CUSTOM toString";
25             targetWindow.history.length = "FAIL!! CUSTOM length";
26
27             targetWindow.postMessage("settingValuesComplete");
28         }
29     </script>
30 </head>
31 <body>
32 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-history-put-test.html"></iframe>
33 </body>
34 </html>