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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url.html

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 testRunner.setCanOpenWindows();
8 testRunner.setCloseRemainingWindowsWhenComplete(true);
9 }
10
11 window.onload = function()
12 {
13 victim = document.body.appendChild(document.createElement("iframe"));
14 wnd = victim.contentWindow.open();
15 victim.src = "http://localhost:8080/security/resources/innocent-victim.h tml";
16 victim.onload = function() {
17 victim.onload = null;
18
19 wnd.eval("(" + function() {
20 location = "javascript:(" + function() {
21 a = document.createElement("a");
22 a.href = "about:blank";
23 e = document.createEvent("MouseEvent");
24 e.initMouseEvent("click");
25 a.dispatchEvent(e);
26
27 return "<script>(" + function() {
28 opener.location = "javascript:alert(docu ment.body.innerHTML)";
29
30 if (window.testRunner)
31 setTimeout("testRunner.notifyDon e()", 0);
32 } + ")()<\/script>";
33 } + ")()";
34 } + ")()");
35 }
36 }
37 </script>
38 </head>
39 <body>
40 This test passes if there's no alert dialog.
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698