Avoid intermittent failures in mime_sniffing_font_context.html. Fixes #9124.

This commit is contained in:
Josh Matthews 2016-01-08 14:11:02 -05:00
parent 083d3e0201
commit ed348e9d4f
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();