docshell/test/navigation/test_bug278916.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
michael@0 5 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
michael@0 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
michael@0 7 <script type="text/javascript" src="NavigationUtils.js"></script>
michael@0 8 <script>
michael@0 9 window.onload = function () {
michael@0 10 document.getElementById("link0").href = target_url;
michael@0 11 sendMouseEvent({type:"click"}, "link0");
michael@0 12
michael@0 13 xpcWaitForFinishedFrames(function() {
michael@0 14 var array_of_frames = xpcGetFramesByName("window0");
michael@0 15 is(array_of_frames.length, 1, "Should only open one window using a fancy hyperlink.");
michael@0 16
michael@0 17 for (var i=0; i < array_of_frames.length; ++i)
michael@0 18 array_of_frames[i].close();
michael@0 19
michael@0 20 xpcCleanupWindows();
michael@0 21 SimpleTest.finish();
michael@0 22 }, 1);
michael@0 23 }
michael@0 24 </script>
michael@0 25 </head>
michael@0 26 <body>
michael@0 27 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=278916">Mozilla Bug 278916</a>
michael@0 28 <div id="links">
michael@0 29 <a id="link0" target="window0" onclick="window.open('', 'window0', 'width=10,height=10');">This is a fancy hyperlink</a>
michael@0 30 </div>
michael@0 31 <pre id="test">
michael@0 32 <script type="text/javascript">
michael@0 33 SimpleTest.waitForExplicitFinish();
michael@0 34 </script>
michael@0 35 </pre>
michael@0 36 </body>
michael@0 37 </html>

mercurial