OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <script> |
| 6 t = async_test('parsing callbacks'); |
| 7 t.calls = []; |
| 8 |
| 9 t.step(function () { |
| 10 var proto = Object.create(HTMLElement.prototype); |
| 11 proto.readyCallback = function () { |
| 12 t.calls.push(this.id + ' ready'); |
| 13 }; |
| 14 proto.insertedCallback = function () { |
| 15 t.calls.push(this.id + ' inserted'); |
| 16 }; |
| 17 |
| 18 var ctor = document.register('x-a', {prototype: proto}); |
| 19 }); |
| 20 </script> |
| 21 <x-a id="a"></x-a> |
| 22 <x-a id="b"></x-a> |
| 23 <x-a id="c"></x-a> |
| 24 <script> |
| 25 t.step(function () { |
| 26 assert_array_equals(t.calls, ['c ready', 'b ready', 'a ready', 'a inserted',
'b inserted', 'c inserted'], 'the callbacks should have been invoked at microta
sk checkpoint'); |
| 27 t.done(); |
| 28 t = null; |
| 29 }); |
| 30 </script> |
OLD | NEW |