Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="/js-test-resources/js-test.js"></script> | |
| 5 <script> | |
| 6 var jsTestIsAsync = true; | |
| 7 function runTest() { | |
| 8 var frame = document.body.appendChild(document.createElement("iframe")); | |
| 9 frame.src = "http://localhost:8000/security/resources/opened-document-security -origin-resets-on-navigation-frame.html"; | |
| 10 frame.onload = function () { | |
|
dcheng
2016/02/05 00:48:08
After this loads, frame tree looks like this:
[ M
| |
| 11 frame.onload = null; | |
| 12 var blob = new Blob(["<script>(" + function () { | |
|
dcheng
2016/02/05 00:48:08
The blob URL has origin 127.0.0.1:8000. Once subfr
| |
| 13 frame = document.documentElement.appendChild(document.createElement("ifram e")); | |
|
dcheng
2016/02/05 00:48:08
After subframe C loads, frame tree looks like this
| |
| 14 frame.contentWindow.setTimeout("parent.document.open()", 0); | |
|
dcheng
2016/02/05 00:48:08
document.open() apparently aliases the parent wind
| |
| 15 setTimeout(function () { | |
|
dcheng
2016/02/05 00:48:08
This setTimeout is set on the context of Subframe
| |
| 16 location = "javascript:'<script>setTimeout(top.finishJSTest, 0); paren t.eval(\"alert(location)\"); top.testFailed(\"context security origin was not up dated!\");</scr" + "ipt>'" }, 0); | |
| 17 } + "())</sc" + "ript>"], {type: "text/html"}); | |
| 18 frame.contentWindow[0].location = URL.createObjectURL(blob); | |
| 19 } | |
| 20 } | |
| 21 </script> | |
| 22 </head> | |
| 23 <body onload="runTest()"> | |
| 24 </body> | |
| 25 </html> | |
| OLD | NEW |