| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.js"></script> |
| 3 <body> | 3 <body> |
| 4 <span is="x-x" id="a"></span> | 4 <span is="x-x" id="a"></span> |
| 5 <script> | 5 <script> |
| 6 description('Test that changing an instantiated custom element\'s \'is\' attribu
te does not affect its element type.'); | 6 description('Test that changing an instantiated custom element\'s \'is\' attribu
te does not affect its element type.'); |
| 7 shouldBeNonNull('window.testRunner', 'This test requires testRunner.'); | 7 shouldBeNonNull('window.testRunner', 'This test requires testRunner.'); |
| 8 | 8 |
| 9 // Some custom definition lookup happens at wrapper generation time so | 9 // Some custom definition lookup happens at wrapper generation time so |
| 10 // do the change in another world to avoid hiding the bug. | 10 // do the change in another world to avoid hiding the bug. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 var protoY = Object.create(HTMLSpanElement.prototype); | 30 var protoY = Object.create(HTMLSpanElement.prototype); |
| 31 protoY.createdCallback = onCreate('Y'); | 31 protoY.createdCallback = onCreate('Y'); |
| 32 var Y = document.register('x-y', {extends: 'span', prototype: protoY}); | 32 var Y = document.register('x-y', {extends: 'span', prototype: protoY}); |
| 33 | 33 |
| 34 var a = document.querySelector('#a'); | 34 var a = document.querySelector('#a'); |
| 35 shouldBe('a.getAttribute("is")', '"x-y"'); | 35 shouldBe('a.getAttribute("is")', '"x-y"'); |
| 36 shouldBeTrue('a instanceof X'); | 36 shouldBeTrue('a instanceof X'); |
| 37 shouldBe('createdBy', '"X"'); | 37 shouldBe('createdBy', '"X"'); |
| 38 shouldBe('createdCallCount', '1'); | 38 shouldBe('createdCallCount', '1'); |
| 39 </script> | 39 </script> |
| 40 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |