Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / closure-access-after-navigation-window.html
blob79315f6bf26208005df7acd06f2ddd555a9f5650
1 <pre id="console"></pre>
2 <script>
3 if (window.testRunner) {
4 testRunner.dumpAsText();
5 testRunner.setCanOpenWindows();
6 testRunner.setCloseRemainingWindowsWhenComplete();
7 testRunner.waitUntilDone();
10 var logString = "";
11 function log(s)
13 logString += s + "<br />";
16 function logTitle(s)
18 log("<b>" + s + "<b>");
21 // Open test window
22 var win = window.open("resources/closure-access-after-navigation-window-child-1.html");
24 function done()
26 document.getElementById("console").innerHTML = logString;
27 if (window.testRunner)
28 testRunner.notifyDone();
31 Object.prototype.myVal = "parent";
32 var myGlobal = {
33 myGlobalVal: "parent"
36 getObjectOfParent = function()
38 return {};
41 getGlobalOfParent = function()
43 return myGlobal;
46 test = function(p, val)
48 try {
49 log(p + "()." + val + " = " + window[p]()[val]);
50 } catch(e) {
51 log(e.message);
54 </script>