2 <body onload=
"startTest()">
3 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=18595">bug
18595</a>:
4 Setting display:none on an iframe causes the ownerDocument to freeze.
</p>
5 <div id=
"log">Please do what links below say:
</div>
6 <a id=foo
href=
"javascript:pass()"></a>
7 <iframe src=
"about:blank"></iframe>
9 if (window
.testRunner
) {
10 testRunner
.waitUntilDone();
11 testRunner
.dumpAsText();
14 var iframe
= document
.getElementsByTagName("iframe")[0];
18 var doc
= iframe
.contentDocument
;
19 var a
= doc
.createElement('a');
21 a
.onmousedown=function(){
22 document
.getElementById('foo').appendChild(document
.createTextNode('Now click me'));
23 iframe
.style
.display
='none';
25 a
.appendChild(document
.createTextNode('Click me'));
26 doc
.body
.appendChild(a
);
28 if (window
.eventSender
) {
29 var x
= iframe
.offsetLeft
+ a
.offsetLeft
+ 7;
30 var y
= iframe
.offsetTop
+ a
.offsetTop
+ 7;
31 eventSender
.mouseMoveTo(x
, y
);
32 eventSender
.mouseDown();
33 eventSender
.mouseUp();
34 setTimeout(click2
, 10);
40 var foo
= document
.getElementById("foo");
41 var x
= foo
.offsetLeft
+ 7;
42 var y
= foo
.offsetTop
+ 7;
43 eventSender
.mouseMoveTo(x
, y
);
44 eventSender
.mouseDown();
45 eventSender
.mouseUp();
50 document
.getElementById("log").innerHTML
= "PASS";
51 document
.getElementById("foo").innerHTML
= "";
53 if (window
.testRunner
)
54 testRunner
.notifyDone();