5 if (window
.testRunner
) {
6 window
.testRunner
.dumpAsText();
7 window
.testRunner
.waitUntilDone();
12 document
.write("PASS. WebKit didn't crash");
15 if (window
.testRunner
)
16 testRunner
.notifyDone();
21 document
.body
.removeChild(document
.getElementById("f"));
22 setTimeout("finish()", 0);
25 frame
= document
.createElement("iframe");
27 document
.body
.appendChild(frame
);
28 scriptElement
= frame
.contentDocument
.createElement("script");
29 frame
.contentDocument
.body
.appendChild(scriptElement
);
30 scriptElement
.innerText
= "function handleVisibilityChange() \
34 document.addEventListener('visibilitychange', handleVisibilityChange, false);";
36 if (window
.testRunner
)
37 testRunner
.setPageVisibility("hidden");
39 // Many platforms don't support the page visibility api. For those, just bail out.
40 setTimeout("finish()", 10);