OLD | NEW |
1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
2 | 2 |
3 <script type="text/javascript" src="../security/resources/cross-frame-access.js"
></script> | 3 <script type="text/javascript" src="../security/resources/cross-frame-access.js"
></script> |
4 <pre id="console"></pre> | 4 <pre id="console"></pre> |
5 | 5 |
6 <script id="scriptTag"> | 6 <script id="scriptTag"> |
7 if (window.testRunner) | 7 if (window.testRunner) |
8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
9 | 9 |
10 log("This test was written to address rdar://problem/4976879. And tests how
namespaceURI's are assigned."); | 10 log("This test was written to address rdar://problem/4976879. And tests how
namespaceURI's are assigned."); |
11 log(""); | 11 log(""); |
12 | 12 |
13 log("Test1: document.namespaceURI") | 13 log("Test1: document.namespaceURI") |
14 shouldBe("document.namespaceURI", "null"); | 14 shouldBe("document.namespaceURI", "undefined"); |
15 log(""); | 15 log(""); |
16 | 16 |
17 log("Test2: document.createElement().namespaceURI") | 17 log("Test2: document.createElement().namespaceURI") |
18 shouldBe("document.createElement(\"div\").namespaceURI", "null"); | 18 shouldBe("document.createElement(\"div\").namespaceURI", "null"); |
19 log(""); | 19 log(""); |
20 | 20 |
21 var myScriptTag = document.getElementById("scriptTag"); | 21 var myScriptTag = document.getElementById("scriptTag"); |
22 log("Test3: script tag.namespaceURI"); | 22 log("Test3: script tag.namespaceURI"); |
23 shouldBe("myScriptTag.namespaceURI", "'http://www.w3.org/1999/xhtml'"); | 23 shouldBe("myScriptTag.namespaceURI", "'http://www.w3.org/1999/xhtml'"); |
24 </script> | 24 </script> |
25 </html> | 25 </html> |
OLD | NEW |