Skip to content

Commit

Permalink
tighten up custom-style-late test
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Apr 6, 2017
1 parent caafef7 commit 2106f65
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/unit/custom-style-late.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@
<template id="late">
<custom-style>
<style is="custom-style">
:root {
html {
--cs-blue: {
border: 8px solid blue;
}
;
};
}
</style>
</custom-style>
Expand All @@ -52,10 +51,13 @@
});
var template = document.querySelector('template#late');
document.body.appendChild(document.importNode(template.content, true));
setTimeout(function() {
assertComputed(input, '8px');
done();
}, 125);
// wait 2 rounds of `afterNextRender` as `<custom-style>` boots asynchronously
Polymer.RenderStatus.afterNextRender(null, function() {
Polymer.RenderStatus.afterNextRender(null, function() {
assertComputed(input, '8px');
done();
});
});
});

});
Expand Down

0 comments on commit 2106f65

Please sign in to comment.