3 <title>Test for callback invocation for a callback that comes from a
4 no-longer-current window that still has an active document.
</title>
5 <script src=
"/resources/testharness.js"></script>
6 <script src=
"/resources/testharnessreport.js"></script>
8 <iframe srcdoc='
<script>function f() { parent
.callCount
++; }</script>'
></iframe>
10 /* global async_test, assert_equals */
12 var t
= async_test("A test of callback invocation in a no-longer-current window with a still-active document");
13 window
.addEventListener("load", t
.step_func_done(function() {
14 var d
= document
.createElement("div");
15 d
.addEventListener("xyz", frames
[0].f
);
16 frames
[0].document
.open();
17 frames
[0].document
.write("All gone");
18 frames
[0].document
.close();
19 d
.dispatchEvent(new Event("xyz"));
20 assert_equals(callCount
, 1, "Callback should have been called");