blob: 5c4cd1ac39c0c934e7ba5b77bc78017852caa17a [file] [log] [blame]
<html>
<link rel="import" href="../resources/chai.sky" />
<link rel="import" href="../resources/mocha.sky" />
<body>
<div id="container"></div>
<script>
describe('Custom element constructors', function() {
it('should run the createdCallback synchronously', function() {
var proto = Object.create(HTMLElement.prototype);
var ncallbacks = 0;
proto.createdCallback = function () {
ncallbacks++;
};
var A = document.registerElement('x-a', {prototype: proto});
var x = new A();
assert.equal(ncallbacks, 1);
});
});
</script>
</body>
</html>