Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> | 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 if (window.testRunner) | 5 if (window.testRunner) |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 | 7 |
| 8 log = function(msg) | 8 log = function(msg) |
| 9 { | 9 { |
| 10 document.getElementById('console').appendChild(document.createTextNo de(msg + "\n")); | 10 document.getElementById('console').appendChild(document.createTextNo de(msg + "\n")); |
| 11 } | 11 } |
| 12 | 12 |
| 13 onload = function() | 13 onload = function() |
| 14 { | 14 { |
| 15 if (document.doctype) | 15 if (document.doctype) |
| 16 log("PASS: a doctype in a XML document is not ignored."); | 16 log("PASS: a doctype in a XML document is not ignored."); |
| 17 else | 17 else |
| 18 log("FAIL: a doctype in a XML document is ignored."); | 18 log("FAIL: a doctype in a XML document is ignored."); |
| 19 | 19 |
| 20 if (document.firstChild == document.doctype) | 20 if (document.firstChild == document.doctype) |
| 21 log("PASS: a doctype in an XML document is correctly set to the first child of the Document."); | 21 log("PASS: a doctype in an XML document is correctly set to the first child of the Document."); |
| 22 else | 22 else |
| 23 log("FAIL: a doctype in an XML document is not correctly set to the first child of the Document."); | 23 log("FAIL: a doctype in an XML document is not correctly set to the first child of the Document."); |
| 24 | |
| 25 if (document.doctype.publicId == '') | |
|
arv (Not doing code reviews)
2014/02/21 15:06:51
Ad-hoc tests :'(
| |
| 26 log("PASS: doctype.publicId correctly defaults to empty string w hen not set."); | |
| 27 else | |
| 28 log("FAIL: doctype.publicId does not default to empty string whe n not set, instead is : " + document.doctype.publicId); | |
| 29 | |
| 30 if (document.doctype.systemId == '') | |
| 31 log("PASS: doctype.systemId correctly defaults to empty string w hen not set."); | |
| 32 else | |
| 33 log("FAIL: doctype.systemId does not default to empty string whe n not set, instead is : " + document.doctype.systemId); | |
| 24 } | 34 } |
| 25 </script> | 35 </script> |
| 26 </head> | 36 </head> |
| 27 <body> | 37 <body> |
| 28 This tests the behavior of a Doctype in an XML document. | 38 This tests the behavior of a Doctype in an XML document. |
| 29 <pre id="console"></pre> | 39 <pre id="console"></pre> |
| 30 </body> | 40 </body> |
| 31 </html> | 41 </html> |
| OLD | NEW |