Auto merge of #9206 - jdm:fonttestintermittent, r=nox

Avoid intermittent failures in mime_sniffing_font_context.html. Fixes…

… #9124.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9206)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-09 02:45:37 +05:30
commit 4bc59e2622
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,2 @@
[mime_sniffing_font_context.html]
prefs: ['net.mime.sniff:true']
disabled: https://github.com/servo/servo/issues/9124

View file

@ -70,6 +70,12 @@ async_test(function() {
function checkFontLoaded() {
var first = document.getElementById('first');
var second = document.getElementById('second');
// Since there's no way to be notified when the page has been marked dirty in response
// to a font having loaded, we'll just keep trying.
if (first.getBoundingClientRect().width == second.getBoundingClientRect().width) {
this.step_timeout(checkFontLoaded, 500);
return;
}
assert_not_equals(first.getBoundingClientRect().width, second.getBoundingClientRect().width);
assert_not_equals(first.getBoundingClientRect().height, second.getBoundingClientRect().height);
this.done();