| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Document.createElement</title> | 3 <title>Document.createElement</title> |
| 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-createelement"> | 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-createelement"> |
| 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-localname"> | 5 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-localname"> |
| 6 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-tagname"> | 6 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-tagname"> |
| 7 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-prefix"> | 7 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-prefix"> |
| 8 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-namespaceuri"> | 8 <link rel=help href="https://dom.spec.whatwg.org/#dom-element-namespaceuri"> |
| 9 <script src="../../../../resources/testharness.js"></script> | 9 <script src="/resources/testharness.js"></script> |
| 10 <script src="../../../../resources/testharnessreport.js"></script> | 10 <script src="/resources/testharnessreport.js"></script> |
| 11 <div id="log"></div> | 11 <div id="log"></div> |
| 12 <script> | 12 <script> |
| 13 function toASCIIUppercase(str) { | 13 function toASCIIUppercase(str) { |
| 14 var diff = "a".charCodeAt(0) - "A".charCodeAt(0); | 14 var diff = "a".charCodeAt(0) - "A".charCodeAt(0); |
| 15 var res = ""; | 15 var res = ""; |
| 16 for (var i = 0; i < str.length; ++i) { | 16 for (var i = 0; i < str.length; ++i) { |
| 17 if ("a" <= str[i] && str[i] <= "z") { | 17 if ("a" <= str[i] && str[i] <= "z") { |
| 18 res += String.fromCharCode(str.charCodeAt(i) - diff); | 18 res += String.fromCharCode(str.charCodeAt(i) - diff); |
| 19 } else { | 19 } else { |
| 20 res += str[i]; | 20 res += str[i]; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 assert_equals(elt.namespaceURI, HTMLNS) | 76 assert_equals(elt.namespaceURI, HTMLNS) |
| 77 }, "createElement(" + format_value(t[0]) + ")"); | 77 }, "createElement(" + format_value(t[0]) + ")"); |
| 78 }); | 78 }); |
| 79 invalid.forEach(function(arg) { | 79 invalid.forEach(function(arg) { |
| 80 test(function() { | 80 test(function() { |
| 81 assert_throws("INVALID_CHARACTER_ERR", function() { document.createElement
(arg) }) | 81 assert_throws("INVALID_CHARACTER_ERR", function() { document.createElement
(arg) }) |
| 82 }, "createElement(" + format_value(arg) + ")"); | 82 }, "createElement(" + format_value(arg) + ")"); |
| 83 }); | 83 }); |
| 84 }) | 84 }) |
| 85 </script> | 85 </script> |
| OLD | NEW |