|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=505783 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 505783</title> |
|
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script> |
|
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.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=505783">Mozilla Bug 505783</a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"> |
|
16 |
|
17 </div> |
|
18 <pre id="test"> |
|
19 <script class="testbody" type="text/javascript"> |
|
20 |
|
21 /** Test for Bug 505783 **/ |
|
22 |
|
23 var a = document.createElementNS("http://www.w3.org/1999/xhtml", "a"); |
|
24 a.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:base", "http://example.org/"); |
|
25 a.href = "page"; |
|
26 is(a.href, "http://example.org/page", "xml:base not used when not in doc"); |
|
27 document.getElementById("content").appendChild(a); |
|
28 is(a.href, "http://example.org/page", "xml:base not used when in doc"); |
|
29 |
|
30 </script> |
|
31 </pre> |
|
32 </body> |
|
33 </html> |