test_bug1174521.html (1072B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1174521 5 --> 6 <head> 7 <title>Test for Bug 1174521</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script src="/tests/SimpleTest/EventUtils.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1174521">Mozilla Bug 1174521</a> 14 <div id="content"> 15 <iframe src="bug1174521.html"></iframe> 16 </div> 17 <pre id="test"> 18 <script type="application/javascript"> 19 20 SimpleTest.waitForExplicitFinish(); 21 SimpleTest.waitForFocus(function() { 22 var iframe = document.querySelector("iframe"); 23 var win = iframe.contentWindow; 24 var doc = iframe.contentDocument; 25 var link = doc.querySelector("a"); 26 SimpleTest.waitForFocus(function() { 27 synthesizeMouseAtCenter(link, {}, win); 28 }, win); 29 }); 30 31 onmessage = function(e) { 32 is(e.data.msg, "DONE", "We should be able to click the link"); 33 SimpleTest.finish(); 34 }; 35 36 </script> 37 </pre> 38 </body> 39 </html>