Update web-platform-tests to revision ead8f8b00d0b68237109f3c93d0ccae076a34f98

This commit is contained in:
WPT Sync Bot 2019-02-07 20:33:07 -05:00
parent d029b1a0ff
commit 2178678b0f
75 changed files with 2476 additions and 391 deletions

View file

@ -26,6 +26,29 @@ onload = function() {
return 'expected substring '+expected+' got '+got;
}
function poll_for_stash(test_obj, uuid, expected) {
var start = new Date();
var poll = test_obj.step_func(function () {
var xhr = new XMLHttpRequest();
xhr.open('GET', stash_take + uuid);
xhr.onload = test_obj.step_func(function(e) {
if (xhr.response == "") {
if (new Date() - start > 10000) {
// If we set the status to TIMEOUT here we avoid a race between the
// page and the test timing out
test_obj.force_timeout();
}
test_obj.step_timeout(poll, 200);
} else {
assert_equals(xhr.response, expected);
test_obj.done();
}
});
xhr.send();
})
test_obj.step_timeout(poll, 200);
}
// loading html (or actually svg to support <embed>)
function test_load_nested_browsing_context(tag, attr, spec_url) {
async_test(function() {