| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Changing IS attribute of the custom element must not affect this element'
s custom element type, after element is instantiated</title> | 4 <title>Changing IS attribute of the custom element must not affect this element'
s custom element type, after element is instantiated</title> |
| 5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> | 5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru"> |
| 6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru
"> | 6 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru
"> |
| 7 <meta name="assert" content="After a custom element is instantiated, changing th
e value of the IS attribute must not affect this element's custom element type"> | 7 <meta name="assert" content="After a custom element is instantiated, changing th
e value of the IS attribute must not affect this element's custom element type"> |
| 8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#instantiating-custo
m-elements"> | 8 <link rel="help" href="http://www.w3.org/TR/custom-elements/#instantiating-custo
m-elements"> |
| 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 <script src="../testcommon.js"></script> | 11 <script src="../testcommon.js"></script> |
| 12 <link rel="stylesheet" href="../../../../resources/testharness.css"> | |
| 13 </head> | 12 </head> |
| 14 <body> | 13 <body> |
| 15 <div id="log"></div> | 14 <div id="log"></div> |
| 16 <script> | 15 <script> |
| 17 test(function() { | 16 test(function() { |
| 18 var doc = newHTMLDocument(); | 17 var doc = newHTMLDocument(); |
| 19 var GeneratedConstructor = doc.registerElement('x-a'); | 18 var GeneratedConstructor = doc.registerElement('x-a'); |
| 20 var customElement = new GeneratedConstructor(); | 19 var customElement = new GeneratedConstructor(); |
| 21 doc.registerElement('x-b'); | 20 doc.registerElement('x-b'); |
| 22 customElement.setAttribute('is', 'x-b'); | 21 customElement.setAttribute('is', 'x-b'); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 doc.body.innerHTML = '<a id="x-i" is="x-i"></a>'; | 149 doc.body.innerHTML = '<a id="x-i" is="x-i"></a>'; |
| 151 var customElement = doc.querySelector('#x-i'); | 150 var customElement = doc.querySelector('#x-i'); |
| 152 customElement.removeAttribute('is'); | 151 customElement.removeAttribute('is'); |
| 153 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro
totype, | 152 assert_equals(Object.getPrototypeOf(customElement), GeneratedConstructor.pro
totype, |
| 154 'Custom element type should be x-i'); | 153 'Custom element type should be x-i'); |
| 155 }, 'Test custom element type, after removing IS attribute value. ' + | 154 }, 'Test custom element type, after removing IS attribute value. ' + |
| 156 'Element is HTML5 element with IS attribute referring to custom element type
'); | 155 'Element is HTML5 element with IS attribute referring to custom element type
'); |
| 157 </script> | 156 </script> |
| 158 </body> | 157 </body> |
| 159 </html> | 158 </html> |
| OLD | NEW |