Bug 1588729 [wpt PR 19691] - HTML: do not test IDL specifics in iframe load event test, a=testonly

Automatic update from web-platform-tests
HTML: do not test IDL specifics in iframe load event test (#19691)

--

wpt-commits: 858fa42be06f4f4281f4b3f0c48e0f33b5676e89
wpt-pr: 19691
This commit is contained in:
Anne van Kesteren 2019-10-22 09:45:09 +00:00 коммит произвёл James Graham
Родитель 10b066d89b
Коммит 46e9cb095b
1 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -8,7 +8,7 @@
async_test(function(t) {
var obj = document.createElement("iframe");
obj.onload = t.step_func_done(function(e){
assert_true(obj.contentWindow instanceof Window, "The iframe element should represent a nested browsing context.")
assert_not_equals(obj.contentWindow, null, "The iframe element should represent a nested browsing context.")
assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
assert_true(e.isTrusted, "The load event should be a trusted event.");
assert_false(e.cancelable, "The load event should not be a cancelable event.");
@ -16,9 +16,7 @@ async_test(function(t) {
assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
});
obj.onerror = t.step_func_done(function(e){
assert_unreached("The error event should not be fired.");
});
obj.onerror = t.unreached_func("The error event should not be fired.");
var url = URL.createObjectURL(new Blob([""], { type: "text/html" }));
@ -29,7 +27,7 @@ async_test(function(t) {
async_test(function(t) {
var obj = document.createElement("iframe");
obj.onload = t.step_func_done(function(e){
assert_true(obj.contentWindow instanceof Window, "The object element should represent a nested browsing context.")
assert_not_equals(obj.contentWindow, null, "The object element should represent a nested browsing context.")
assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
assert_true(e.isTrusted, "The load event should be a trusted event.");
assert_false(e.cancelable, "The load event should not be a cancelable event.");
@ -37,12 +35,9 @@ async_test(function(t) {
assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
});
obj.onerror = t.step_func_done(function(e){
assert_unreached("The error event should not be fired.");
});
obj.onerror = t.unreached_func("The error event should not be fired.");
document.body.appendChild(obj);
}, "load event of initial about:blank");
</script>
</body>