| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <body> | 4 <body> |
| 5 <script> | 5 <script> |
| 6 function createRegisterParameters() { | 6 function createRegisterParameters() { |
| 7 return { | 7 return { |
| 8 prototype: Object.create(HTMLElement.prototype, { thisIsPrototype: { val
ue: true } }) | 8 prototype: Object.create(HTMLElement.prototype, { thisIsPrototype: { val
ue: true } }) |
| 9 }; | 9 }; |
| 10 } | 10 } |
| 11 | 11 |
| 12 test(function () { | 12 test(function () { |
| 13 var invalidNames = [ | 13 var invalidNames = [ |
| 14 // Hyphen missing: | 14 // Hyphen missing: |
| 15 'foo', | 15 'foo', |
| 16 'xfoo', | 16 'xfoo', |
| 17 // Reserved names: | 17 // Reserved names: |
| 18 // hyphen-containing names from the applicable specifications, | 18 // hyphen-containing names from the applicable specifications, |
| 19 // namely the SVG and the MathML. | 19 // namely the SVG and the MathML. |
| 20 'annotation-xml', | 20 'annotation-xml', |
| 21 'color-profile', | |
| 22 'font-face', | 21 'font-face', |
| 23 'font-face-src', | 22 'font-face-src', |
| 24 'font-face-uri', | 23 'font-face-uri', |
| 25 'font-face-format', | 24 'font-face-format', |
| 26 'font-face-name', | 25 'font-face-name', |
| 27 'missing-glyph' | 26 'missing-glyph' |
| 28 ]; | 27 ]; |
| 29 | 28 |
| 30 for (var i = 0; i < invalidNames.length; i++) { | 29 for (var i = 0; i < invalidNames.length; i++) { |
| 31 var invalidName = invalidNames[i]; | 30 var invalidName = invalidNames[i]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 'y--bar' : 'Y--BAR' | 53 'y--bar' : 'Y--BAR' |
| 55 }; | 54 }; |
| 56 for(var elementName in validNameTagMap) { | 55 for(var elementName in validNameTagMap) { |
| 57 var expectedTagName = validNameTagMap[elementName]; | 56 var expectedTagName = validNameTagMap[elementName]; |
| 58 var tagName = (new (document.registerElement(elementName, createRegister
Parameters()))()).tagName; | 57 var tagName = (new (document.registerElement(elementName, createRegister
Parameters()))()).tagName; |
| 59 assert_equals(tagName, expectedTagName, tagName + ' must be treated as a
custom element'); | 58 assert_equals(tagName, expectedTagName, tagName + ' must be treated as a
custom element'); |
| 60 } | 59 } |
| 61 }, 'strange but valid names'); | 60 }, 'strange but valid names'); |
| 62 | 61 |
| 63 </script> | 62 </script> |
| OLD | NEW |