4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
11 window
.frames
[0].document
.getElementById("textField").focus();
13 if (window
.eventSender
) {
14 var frame
= document
.getElementById("anIFrame");
16 // center the mouse cursor (NOTE: 2px inset for scrollbars).
17 var x
= frame
.offsetParent
.offsetLeft
+ frame
.contentDocument
.body
.clientWidth
+ 8;
18 var y
= frame
.offsetParent
.offsetTop
+ frame
.offsetHeight
/ 2;
20 // send mouse event to click iframe's scrollbar.
21 eventSender
.mouseMoveTo(x
, y
);
22 eventSender
.mouseDown();
23 eventSender
.mouseUp();
30 var doc
= window
.frames
[0].document
;
32 if (doc
.hasFocus() && doc
.activeElement
.getAttribute("id") == "textField")
33 document
.getElementById('console').innerHTML
= "PASS";
35 document
.getElementById('console').innerHTML
= "FAIL";
37 if (window
.testRunner
)
38 window
.testRunner
.notifyDone();
45 <div id=
"console" style=
"left:50px;top:50px;width:200px;height:200px;position:absolute;">
46 <iframe onload=
"runTest();" id=
"anIFrame" style=
"width:200px;height:200px;position:absolute;" src=
"resources/scrollable-iframe-with-input-field.html">