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

Side by Side Diff: LayoutTests/http/tests/security/location-change-from-detached-DOMWindow.html

Issue 1311253005: Use Document of callingWindow for access check in isInsecureScriptAccess() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <script>
2 if (window.testRunner) {
3 testRunner.dumpAsText();
4 testRunner.waitUntilDone();
5 }
6
7 window.onmessage = function(e) {
8 document.documentElement.appendChild(document.createTextNode(e.data));
9 if (window.testRunner)
10 testRunner.notifyDone();
11 }
12
13 var i = document.documentElement.appendChild(document.createElement('iframe'));
14 var f = frames[0].Function;
15 i.onload = function() {
16 f("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')" )();
17 setTimeout(function() {
18 window.postMessage("PASS", "*");
19 }, 0);
20 }
21 i.src = 'https://localhost:8443/security/resources/innocent-victim.html';
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698