OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <script src="testutils.js"></script> | 3 <script src="testutils.js"></script> |
4 <body> | 4 <body> |
5 <x-a></x-a> | 5 <x-a></x-a> |
6 <script> | 6 <script> |
7 if (fork()) { | 7 if (fork()) { |
8 // The controlling parent frame | 8 // The controlling parent frame |
9 description('Tests destroying a context during attributeChanged callback.'); | 9 description('Tests destroying a context during attributeChanged callback.'); |
10 jsTestIsAsync = true; | 10 jsTestIsAsync = true; |
11 successfullyParsed = true; | 11 successfullyParsed = true; |
12 } else { | 12 } else { |
13 // The child frame | 13 // The child frame |
14 | 14 |
15 var proto = Object.create(HTMLElement.prototype); | 15 var proto = Object.create(HTMLElement.prototype); |
16 proto.attributeChangedCallback = function () { | 16 proto.attributeChangedCallback = function () { |
17 destroyContext(); | 17 destroyContext(); |
18 }; | 18 }; |
19 | 19 |
20 var A = document.register('x-a', {prototype: proto}); | 20 var A = document.registerElement('x-a', {prototype: proto}); |
21 var a = new A(); | 21 var a = new A(); |
22 a.id = 'boom'; | 22 a.id = 'boom'; |
23 done(); | 23 done(); |
24 } | 24 } |
25 </script> | 25 </script> |
OLD | NEW |