| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 // Capture window.window and window.parent: once this context is navigated,
these properties |
| 3 // always return null. |
| 4 var w = window; |
| 5 var p = parent; |
| 2 parent.accessFrame = function() | 6 parent.accessFrame = function() |
| 3 { | 7 { |
| 4 function normalizeURL(url) | 8 function normalizeURL(url) |
| 5 { | 9 { |
| 6 return url.substring(url.lastIndexOf("LayoutTests")); | 10 return url.substring(url.lastIndexOf("LayoutTests")); |
| 7 } | 11 } |
| 8 | 12 |
| 9 try { | 13 try { |
| 10 parent.log("document.URL: " + normalizeURL(document.URL)); | 14 p.log("document.URL: " + normalizeURL(document.URL)); |
| 11 parent.log("window.document.URL: " + normalizeURL(window.document.UR
L)); | 15 p.log("window.document.URL: " + normalizeURL(w.document.URL)); |
| 12 parent.log("name: " + name); | 16 p.log("name: " + name); |
| 13 parent.log("window.name: " + window.name); | 17 p.log("window.name: " + w.name); |
| 14 } catch (e) { | 18 } catch (e) { |
| 15 parent.log("An exception was thrown: " + e.message); | 19 p.log("An exception was thrown: " + e.message); |
| 16 } | 20 } |
| 17 } | 21 } |
| 18 | 22 |
| 19 window.location = "notify-parent-done.html"; | 23 window.location = "notify-parent-done.html"; |
| 20 </script> | 24 </script> |
| OLD | NEW |