| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <link rel="import" href="../resources/chai.sky" /> | 2 <import src="../resources/chai.sky" /> |
| 3 <link rel="import" href="../resources/mocha.sky" /> | 3 <import src="../resources/mocha.sky" /> |
| 4 <body> | 4 <body> |
| 5 <div id="container"></div> | 5 <div id="container"></div> |
| 6 <script> | 6 <script> |
| 7 describe('Custom element constructors', function() { | 7 describe('Custom element constructors', function() { |
| 8 it('should run the createdCallback synchronously', function() { | 8 it('should run the createdCallback synchronously', function() { |
| 9 var proto = Object.create(HTMLElement.prototype); | 9 var proto = Object.create(HTMLElement.prototype); |
| 10 var ncallbacks = 0; | 10 var ncallbacks = 0; |
| 11 proto.createdCallback = function () { | 11 proto.createdCallback = function () { |
| 12 ncallbacks++; | 12 ncallbacks++; |
| 13 }; | 13 }; |
| 14 var A = document.registerElement('x-a', {prototype: proto}); | 14 var A = document.registerElement('x-a', {prototype: proto}); |
| 15 var x = new A(); | 15 var x = new A(); |
| 16 assert.equal(ncallbacks, 1); | 16 assert.equal(ncallbacks, 1); |
| 17 }); | 17 }); |
| 18 }); | 18 }); |
| 19 </script> | 19 </script> |
| 20 </body> | 20 </body> |
| 21 </html> | 21 </html> |
| OLD | NEW |