Skip to content

Commit f09a46e

Browse files
committed
make callbacks test work with SD polyfill.
1 parent 10ee1a6 commit f09a46e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

test/html/callbacks.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@
7272
ready: function() {
7373
this.stuff = [1, 2, 3];
7474
this.onMutation(this.$.container, function() {
75-
var base = this.shadowRoot.querySelector('x-base');
76-
chai.assert.isTrue(base.isReadied, 'template bind stamped element is ready');
77-
chai.assert.isTrue(base.isInserted, 'template bind stamped element is enteredView');
78-
var exts = this.shadowRoot.querySelectorAll('x-exendor');
79-
for (var i=0, e; (i < exts.length) && (e = exts[i]); i++) {
80-
chai.assert.isTrue(e.isReadied, 'template repeat stamped element is ready');
81-
chai.assert.isTrue(e.isInserted, 'template repeat stamped element is enteredView');
82-
}
83-
done();
75+
// TODO(sorvell): SD polyfill mutation observer ordering issue, file bug
76+
setTimeout(function() {
77+
var base = this.shadowRoot.querySelector('x-base');
78+
chai.assert.isTrue(base.isReadied, 'template bind stamped element is ready');
79+
chai.assert.isTrue(base.isInserted, 'template bind stamped element is enteredView');
80+
var exts = this.shadowRoot.querySelectorAll('x-exendor');
81+
for (var i=0, e; (i < exts.length) && (e = exts[i]); i++) {
82+
chai.assert.isTrue(e.isReadied, 'template repeat stamped element is ready');
83+
chai.assert.isTrue(e.isInserted, 'template repeat stamped element is enteredView');
84+
}
85+
done();
86+
}.bind(this));
8487
});
8588
}
8689
});

0 commit comments

Comments
 (0)