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

Side by Side 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, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 if (window.testRunner) { 2 if (window.testRunner) {
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 testRunner.waitUntilDone(); 4 testRunner.waitUntilDone();
5 } 5 }
6 6
7 window.onmessage = function(e) { 7 window.onmessage = function(e) {
8 document.documentElement.appendChild(document.createTextNode(e.data)); 8 document.documentElement.appendChild(document.createTextNode(e.data));
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.notifyDone(); 10 testRunner.notifyDone();
11 } 11 }
12 12
13 var i = document.documentElement.appendChild(document.createElement('iframe')); 13 var i = document.documentElement.appendChild(document.createElement('iframe'));
14 var f = frames[0].Function; 14 var f = frames[0].Function("location.replace('javascript:window.top.postMessage( \\'FAIL\\', \\'*\\')')");
15 i.onload = function() { 15 i.onload = function() {
16 f("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')" )(); 16 f();
17 setTimeout(function() { 17 setTimeout(function() {
18 window.postMessage("PASS", "*"); 18 window.postMessage("PASS", "*");
19 }, 0); 19 }, 0);
20 } 20 }
21 i.src = 'https://localhost:8443/security/resources/innocent-victim.html'; 21 i.src = 'https://localhost:8443/security/resources/innocent-victim.html';
22 </script> 22 </script>
OLDNEW
« 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