5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.waitUntilDone();
12 function log(msg
, success
)
14 logDiv
.appendChild(document
.createElement('div')).textContent
= msg
+ ': ' + (!!success
? 'PASS' : 'FAIL');
17 function clickOn(element
)
19 if (!window
.eventSender
)
22 var x
= element
.offsetLeft
+ element
.offsetWidth
/ 2;
23 var y
= element
.offsetTop
+ element
.offsetHeight
/ 2;
24 eventSender
.mouseMoveTo(x
, y
);
25 eventSender
.mouseDown();
26 eventSender
.mouseUp();
31 logDiv
= document
.getElementById('console');
32 var input
= document
.getElementsByTagName('input')[0];
33 setTimeout(function() {
34 input
.disabled
= false;
35 if (!window
.eventSender
)
38 var x
= input
.offsetLeft
+ input
.offsetWidth
/ 2;
39 var y
= input
.offsetTop
+ input
.offsetHeight
/ 2;
40 eventSender
.mouseMoveTo(x
, y
);
41 eventSender
.mouseDown();
42 eventSender
.mouseUp();
43 eventSender
.keyDown('a');
44 log('The inner text element of the search input should never be 0-height', input
.value
== 'a');
45 testRunner
.notifyDone();
51 <body onload=
"runTest()">
53 <input id=
"foo" type=
"search" results=
"0" disabled
>