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

Side by Side Diff: LayoutTests/http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open.html

Issue 494343003: Eliminate globalFlag usage from http security layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistify Created 6 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
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../resources/cross-frame-access.js"></script> 3 <script src="../resources/cross-frame-access.js"></script>
4 <script> 4 <script>
5 var openedWindow; 5 var openedWindow;
6 6
7 window.onload = function() 7 window.onload = function()
8 { 8 {
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 testRunner.setCanOpenWindows(); 11 testRunner.setCanOpenWindows();
12 testRunner.waitUntilDone(); 12 testRunner.waitUntilDone();
13 } 13 }
14 14
15 openedWindow = window.open("http://localhost:8000/security/javascrip tURL/resources/foreign-domain-javascript-url-accessor-opened-frame.html"); 15 openedWindow = window.open("http://localhost:8000/security/javascrip tURL/resources/foreign-domain-javascript-url-accessor-opened-frame.html");
16 16
17 if (window.testRunner) { 17 window.addEventListener('message', function ()
18 setTimeout(pollUntilDone, 1); 18 {
19 } 19 closeWindowAndNotifyDone(openedWindow);
20 } 20 });
21
22 pollUntilDone = function()
23 {
24 if (!testRunner.globalFlag) {
25 setTimeout(pollUntilDone, 1);
26 return;
27 }
28 closeWindowAndNotifyDone(openedWindow);
29 } 21 }
30 </script> 22 </script>
31 </head> 23 </head>
32 <body> 24 <body>
33 <p>Opener Frame</p> 25 <p>Opener Frame</p>
34 <p id='accessMe'>Pass: Cross frame access from a javascript: URL on a differ ent domain was denied.</p> 26 <p id='accessMe'>Pass: Cross frame access from a javascript: URL on a differ ent domain was denied.</p>
35 <pre id='console'></pre> 27 <pre id='console'></pre>
36 </body> 28 </body>
37 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698