Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 858fa42

Browse files
annevkfoolip
authored andcommitted
HTML: do not test IDL specifics in iframe load event test (#19691)
1 parent 9f31d49 commit 858fa42

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

html/semantics/embedded-content/the-iframe-element/iframe-load-event.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88
async_test(function(t) {
99
var obj = document.createElement("iframe");
1010
obj.onload = t.step_func_done(function(e){
11-
assert_true(obj.contentWindow instanceof Window, "The iframe element should represent a nested browsing context.")
11+
assert_not_equals(obj.contentWindow, null, "The iframe element should represent a nested browsing context.")
1212
assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
1313
assert_true(e.isTrusted, "The load event should be a trusted event.");
1414
assert_false(e.cancelable, "The load event should not be a cancelable event.");
1515
assert_false(e.bubbles, "The load event should not be a bubble event.");
1616
assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
1717
});
1818

19-
obj.onerror = t.step_func_done(function(e){
20-
assert_unreached("The error event should not be fired.");
21-
});
19+
obj.onerror = t.unreached_func("The error event should not be fired.");
2220

2321
var url = URL.createObjectURL(new Blob([""], { type: "text/html" }));
2422

@@ -29,20 +27,17 @@
2927
async_test(function(t) {
3028
var obj = document.createElement("iframe");
3129
obj.onload = t.step_func_done(function(e){
32-
assert_true(obj.contentWindow instanceof Window, "The object element should represent a nested browsing context.")
30+
assert_not_equals(obj.contentWindow, null, "The object element should represent a nested browsing context.")
3331
assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
3432
assert_true(e.isTrusted, "The load event should be a trusted event.");
3533
assert_false(e.cancelable, "The load event should not be a cancelable event.");
3634
assert_false(e.bubbles, "The load event should not be a bubble event.");
3735
assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
3836
});
3937

40-
obj.onerror = t.step_func_done(function(e){
41-
assert_unreached("The error event should not be fired.");
42-
});
38+
obj.onerror = t.unreached_func("The error event should not be fired.");
4339

4440
document.body.appendChild(obj);
4541
}, "load event of initial about:blank");
46-
4742
</script>
4843
</body>

0 commit comments

Comments
 (0)