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

Side by Side Diff: LayoutTests/http/tests/security/frameNavigation/resources/frame-with-link-to-navigate.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 window.onload = function() 5 window.onload = function()
6 { 6 {
7 document.getElementsByTagName('h4')[0].innerHTML = document.domain; 7 document.getElementsByTagName('h4')[0].innerHTML = document.domain;
8 if (window.testRunner) { 8 window.addEventListener('message', runTest);
9 setTimeout(pollForTest, 1);
10 } else {
11 log("Click the link to run the test.");
12 }
13 }
14
15 pollForTest = function()
16 {
17 if (!testRunner.globalFlag) {
18 setTimeout(pollForTest, 1);
19 return;
20 }
21 runTest();
22 } 9 }
23 10
24 runTest = function() 11 runTest = function()
25 { 12 {
26 if (!window.testRunner) 13 if (!window.testRunner)
27 return; 14 return;
28 15
29 var event = document.createEvent('MouseEvent'); 16 var event = document.createEvent('MouseEvent');
30 event.initEvent( 'click', true, true ); 17 event.initEvent( 'click', true, true );
31 document.getElementById('anchorLink').dispatchEvent(event); 18 document.getElementById('anchorLink').dispatchEvent(event);
(...skipping 18 matching lines...) Expand all
50 } 37 }
51 </script> 38 </script>
52 </head> 39 </head>
53 <body> 40 <body>
54 <h3>Frame-with-link-to-navigate</h3> 41 <h3>Frame-with-link-to-navigate</h3>
55 <h4>DOMAIN</h4> 42 <h4>DOMAIN</h4>
56 <pre id='console'></pre> 43 <pre id='console'></pre>
57 <a id="anchorLink" href="navigation-happened.html" target="toNavigate">Click me</a> 44 <a id="anchorLink" href="navigation-happened.html" target="toNavigate">Click me</a>
58 </body> 45 </body>
59 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698