| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> | 3 <head> |
| 4 <script type="text/javascript" src="../security/resources/cross-frame-access.js"
></script> | 4 <script type="text/javascript" src="../security/resources/cross-frame-access.js"
></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <pre id="console"></pre> | 7 <pre id="console"></pre> |
| 8 <script type="text/javascript" id="scriptTag"> | 8 <script type="text/javascript" id="scriptTag"> |
| 9 if (window.testRunner) | 9 if (window.testRunner) |
| 10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
| 11 | 11 |
| 12 log("This test was written to address rdar://problem/4976879. And tests how
namespaceURI's are assigned."); | 12 log("This test was written to address rdar://problem/4976879. And tests how
namespaceURI's are assigned."); |
| 13 log(""); | 13 log(""); |
| 14 | 14 |
| 15 log("Test1: document.namespaceURI") | 15 log("Test1: document.namespaceURI") |
| 16 shouldBe("document.namespaceURI", "null"); | 16 shouldBe("document.namespaceURI", "undefined"); |
| 17 log(""); | 17 log(""); |
| 18 | 18 |
| 19 log("Test2: document.createElement().namespaceURI") | 19 log("Test2: document.createElement().namespaceURI") |
| 20 shouldBe("document.createElement(\"div\").namespaceURI", "'http://www.w3.org
/1999/xhtml'"); | 20 shouldBe("document.createElement(\"div\").namespaceURI", "'http://www.w3.org
/1999/xhtml'"); |
| 21 log(""); | 21 log(""); |
| 22 | 22 |
| 23 var myScriptTag = document.getElementById("scriptTag"); | 23 var myScriptTag = document.getElementById("scriptTag"); |
| 24 log("Test3: script tag.namespaceURI"); | 24 log("Test3: script tag.namespaceURI"); |
| 25 shouldBe("myScriptTag.namespaceURI", "'http://www.w3.org/1999/xhtml'"); | 25 shouldBe("myScriptTag.namespaceURI", "'http://www.w3.org/1999/xhtml'"); |
| 26 log(""); | 26 log(""); |
| 27 | 27 |
| 28 var newDoc = document.implementation.createDocument("http://www.w3.org/1999/
xhtml", "", null); | 28 var newDoc = document.implementation.createDocument("http://www.w3.org/1999/
xhtml", "", null); |
| 29 log("Test4: created document.namespaceURI"); | 29 log("Test4: created document.namespaceURI"); |
| 30 shouldBe("newDoc.namespaceURI", "null"); | 30 shouldBe("newDoc.namespaceURI", "undefined"); |
| 31 log(""); | 31 log(""); |
| 32 | 32 |
| 33 log("Test5: created document.createElement.namespaceURI"); | 33 log("Test5: created document.createElement.namespaceURI"); |
| 34 shouldBe("newDoc.createElement(\"div\").namespaceURI", "'http://www.w3.org/1
999/xhtml'"); | 34 shouldBe("newDoc.createElement(\"div\").namespaceURI", "'http://www.w3.org/1
999/xhtml'"); |
| 35 </script> | 35 </script> |
| 36 </body> | 36 </body> |
| 37 </html> | 37 </html> |
| OLD | NEW |