| testRunner.waitUntilDone(); |
| window.frames[0].document.getElementById("textField").focus(); |
| if (window.eventSender) { |
| var frame = document.getElementById("anIFrame"); |
| // center the mouse cursor (NOTE: 2px inset for scrollbars). |
| var x = frame.offsetParent.offsetLeft + frame.contentDocument.body.clientWidth + 8; |
| var y = frame.offsetParent.offsetTop + frame.offsetHeight / 2; |
| // send mouse event to click iframe's scrollbar. |
| eventSender.mouseMoveTo(x, y); |
| var doc = window.frames[0].document; |
| if (doc.hasFocus() && doc.activeElement.getAttribute("id") == "textField") |
| document.getElementById('console').innerHTML = "PASS"; |
| document.getElementById('console').innerHTML = "FAIL"; |
| window.testRunner.notifyDone(); |
| <div id="console" style="left:50px;top:50px;width:200px;height:200px;position:absolute;"> |
| <iframe onload="runTest();" id="anIFrame" style="width:200px;height:200px;position:absolute;" src="resources/scrollable-iframe-with-input-field.html"> |