Bug 894150 - Test.
[gecko.git] / docshell / test / test_bug540462.html
blob65447114f1a8c628345ca7b0c140766204fe7f6f
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=540462
5 -->
6 <head>
7 <title>Test for Bug 540462</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body onload="runTest()">
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=540462">Mozilla Bug 540462</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 540462 **/
22 var win;
23 function runTest() {
24 win = window.open("file_bug540462.html", "", "width=100,height=100");
27 var dwlCount = 0;
28 var originalURL;
29 function documentWriteLoad() {
30 if (++dwlCount == 1) {
31 originalURL = win.document.body.firstChild.href;
32 } else if (dwlCount == 2) {
33 is(win.document.body.firstChild.href, originalURL, "Wrong href!");
34 win.close();
35 SimpleTest.finish();
39 SimpleTest.waitForExplicitFinish();
41 </script>
42 </pre>
43 </body>
44 </html>