4 if (location
.hash
== "#stop")
7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
10 testRunner
.setCanOpenWindows();
11 testRunner
.setCloseRemainingWindowsWhenComplete(true);
14 blankWindow
= open(location
+ "#stop");
15 blankWindow
.onload = function() {
16 blankFunc
= blankWindow
.Function
;
17 blankWindow
.opener
= null;
18 blankWindow
.eval("location = 'about:blank'");
20 setTimeout(function() {
22 blankFunc
= blankFunc("return window.Function")();
26 if (!blankFunc
&& window
.testRunner
) {
27 testRunner
.notifyDone()
30 blankFunc("alertFunc", "(" + function() {
31 targetWindow
= open("http://localhost:8080/security/resources/post-done-to-opener.html");
32 targetFunc
= targetWindow
.Function
;
33 this.alertFunc
= alertFunc
;
35 targetWindow
.addEventListener("load", function() {
36 alertFunc(targetFunc("return document.documentElement.innerHTML")());
38 } + ")()")( function(s
) { alert(s
) });
42 window
.addEventListener('message', function(evt
) {
43 if (evt
.data
== 'done') {
44 if (window
.testRunner
)
45 testRunner
.notifyDone();
51 This test passes if it doesn't alert something ugly.