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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html

Issue 2792213002: Prevent layout tests from being broken by data URL deprecation. (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html
index d46d826ff22e1431c8708afeccf8d74558d1a5e9..25ce1fddbeb309410f851e1e5ab0c94895e9b3bc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-window-open.html
@@ -18,12 +18,14 @@
t.done();
}));
- window.open("data:text/html,<script>" +
- " var i = document.createElement('img');" +
- " i.onload = _ => opener.postMessage('loaded', '*');" +
- " i.onerror = _ => opener.postMessage('blocked', '*');" +
- " i.src = 'http://example.test:8000/resources/square.png?data-frame'" +
- "</scr" + "ipt>");
+ var win = window.open("about:blank");
+ win.document.write(
+ "<script>" +
+ " var i = document.createElement('img');" +
+ " i.onload = _ => opener.postMessage('loaded', '*');" +
+ " i.onerror = _ => opener.postMessage('blocked', '*');" +
+ " i.src = 'http://example.test:8000/resources/square.png?data-frame'" +
+ "</scr" + "ipt>");
}, "Image loaded via data: window blocked.");
</script>
</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/cascade/cross-origin-with-own-policy-window-open.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698