Skip to content

Commit

Permalink
make callbacks test work with SD polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Nov 7, 2013
1 parent 10ee1a6 commit f09a46e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions test/html/callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@
ready: function() {
this.stuff = [1, 2, 3];
this.onMutation(this.$.container, function() {
var base = this.shadowRoot.querySelector('x-base');
chai.assert.isTrue(base.isReadied, 'template bind stamped element is ready');
chai.assert.isTrue(base.isInserted, 'template bind stamped element is enteredView');
var exts = this.shadowRoot.querySelectorAll('x-exendor');
for (var i=0, e; (i < exts.length) && (e = exts[i]); i++) {
chai.assert.isTrue(e.isReadied, 'template repeat stamped element is ready');
chai.assert.isTrue(e.isInserted, 'template repeat stamped element is enteredView');
}
done();
// TODO(sorvell): SD polyfill mutation observer ordering issue, file bug
setTimeout(function() {
var base = this.shadowRoot.querySelector('x-base');
chai.assert.isTrue(base.isReadied, 'template bind stamped element is ready');
chai.assert.isTrue(base.isInserted, 'template bind stamped element is enteredView');
var exts = this.shadowRoot.querySelectorAll('x-exendor');
for (var i=0, e; (i < exts.length) && (e = exts[i]); i++) {
chai.assert.isTrue(e.isReadied, 'template repeat stamped element is ready');
chai.assert.isTrue(e.isInserted, 'template repeat stamped element is enteredView');
}
done();
}.bind(this));
});
}
});
Expand Down

0 comments on commit f09a46e

Please sign in to comment.