Update web-platform-tests to revision 6fa9de7201cd41564d02c3edd62365aeb40e171b

This commit is contained in:
WPT Sync Bot 2019-07-20 10:25:14 +00:00
parent 60f1ffc5a7
commit dc1f7ba3ec
124 changed files with 2052 additions and 849 deletions

View file

@ -10,12 +10,20 @@ async_test(function(t) {
var img = document.getElementById("brokenurl");
img.src = "http://[";
var errorevent = false;
var loadendevent = false;
// The errors should be queued in the event loop, so they should only trigger
// after this block of code finishes, not during the img.src setter itself
img.addEventListener('error', t.step_func(function(){errorevent = true;}));
img.addEventListener('loadend', t.step_func_done(function() {
img.addEventListener('error', t.step_func(function() {
assert_false(loadendevent, "loadend should fire after error");
errorevent = true;
t.step_timeout(t.step_func_done(function() {
assert_true(loadendevent, "loadend event fired");
}), 0);
}));
img.addEventListener('loadend', t.step_func(function() {
assert_true(errorevent, "error event fired");
loadendevent = true;
}));
}, 'src="http://["');
@ -31,8 +39,8 @@ async_test(function(t) {
// Queue this check in the event loop to check there is no loadend event
// fired.
t.step_timeout(t.step_func_done(function() {
assert_false(loadendevent, "loadend event should not fired");
}), 0)
assert_false(loadendevent, "loadend event should not be fired");
}), 0);
}));
img.addEventListener('loadend', t.step_func(function() {
loadendevent = true;