Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html

Issue 2108503006: Fix layout test to not rely on function ctor from detached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html b/third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html
index f96831021a5b0ada4a2ff459f5e6232ef1a0df7c..1359a3e591950f7ef8f1ef0687679fb557cd6ef4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html
@@ -11,9 +11,9 @@ window.onmessage = function(e) {
}
var i = document.documentElement.appendChild(document.createElement('iframe'));
-var f = frames[0].Function;
+var f = frames[0].Function("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')");
i.onload = function() {
- f("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')")();
+ f();
setTimeout(function() {
window.postMessage("PASS", "*");
}, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698