|
8 | 8 | async_test(function(t) {
|
9 | 9 | var obj = document.createElement("iframe");
|
10 | 10 | 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.") |
12 | 12 | assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
|
13 | 13 | assert_true(e.isTrusted, "The load event should be a trusted event.");
|
14 | 14 | assert_false(e.cancelable, "The load event should not be a cancelable event.");
|
15 | 15 | assert_false(e.bubbles, "The load event should not be a bubble event.");
|
16 | 16 | assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
|
17 | 17 | });
|
18 | 18 |
|
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."); |
22 | 20 |
|
23 | 21 | var url = URL.createObjectURL(new Blob([""], { type: "text/html" }));
|
24 | 22 |
|
|
29 | 27 | async_test(function(t) {
|
30 | 28 | var obj = document.createElement("iframe");
|
31 | 29 | 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.") |
33 | 31 | assert_equals(Object.getPrototypeOf(e).constructor, Event, "The load event should use the Event interface.");
|
34 | 32 | assert_true(e.isTrusted, "The load event should be a trusted event.");
|
35 | 33 | assert_false(e.cancelable, "The load event should not be a cancelable event.");
|
36 | 34 | assert_false(e.bubbles, "The load event should not be a bubble event.");
|
37 | 35 | assert_equals(e.target, obj, "The load event target should be the corresponding object element.");
|
38 | 36 | });
|
39 | 37 |
|
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."); |
43 | 39 |
|
44 | 40 | document.body.appendChild(obj);
|
45 | 41 | }, "load event of initial about:blank");
|
46 |
| - |
47 | 42 | </script>
|
48 | 43 | </body>
|
0 commit comments