Index: third_party/WebKit/LayoutTests/fast/parser/resources/set-parent-to-javascript-url.html |
diff --git a/third_party/WebKit/LayoutTests/fast/parser/resources/set-parent-to-javascript-url.html b/third_party/WebKit/LayoutTests/fast/parser/resources/set-parent-to-javascript-url.html |
index a64b9a0335b0220a3fcec8697b577df6b1b41946..cae7ee69007a2b40ed3c39aa3d684d75ee4a8247 100644 |
--- a/third_party/WebKit/LayoutTests/fast/parser/resources/set-parent-to-javascript-url.html |
+++ b/third_party/WebKit/LayoutTests/fast/parser/resources/set-parent-to-javascript-url.html |
@@ -1,6 +1,8 @@ |
<script> |
+// Capture window.parent: once this context navigates, window.parent always returns null. |
+var p = parent; |
alert(1); |
parent.document.getElementsByTagName('iframe')[0].src = "javascript:alert(2),'PASS<script>alert(3)<\/script>'"; |
alert(4); |
-parent.setTimeout("done()", 0); |
+p.setTimeout("done()", 0); |
</script> |