3 <script src="../../resources/cross-frame-access.js"></script>
5 window.onload = function()
7 document.getElementsByTagName('h4')[0].innerHTML = document.domain;
8 window.addEventListener('message', runTest);
13 if (!window.testRunner)
16 var event = document.createEvent('MouseEvent');
17 event.initEvent( 'click', true, true );
18 document.getElementById('anchorLink').dispatchEvent(event);
21 myInterval = setInterval(checkIfDone, 1);
24 checkIfDone = function()
26 var numOpenWindows = testRunner.windowCount();
28 if (numOpenWindows == 2) {
30 clearInterval(myInterval);
31 testRunner.notifyDone();
32 } else if (now - start > 10000) {
33 log('TEST FAILED: Window count ' + numOpenWindows);
34 clearInterval(myInterval);
35 testRunner.notifyDone();
41 <h3>Frame-with-link-to-navigate</h3>
43 <pre id='console'></pre>
44 <a id="anchorLink" href="navigation-happened.html" target="toNavigate">Click me</a>