Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / search-hidden-cancel-button.html
blobaf7ce43ed8fe302e75891b1441001d90d389e312
1 <html>
2 <head>
3 <script>
4 var mouseDownCount;
5 var log = function(msg)
7 document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
9 function test()
11 mouseDownCount = 0;
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 var sf = document.getElementById("search");
18 var buttonX = sf.offsetLeft + sf.offsetWidth - 6;
19 var middleX = sf.offsetLeft + sf.offsetWidth / 2;
21 var y = sf.offsetTop + sf.offsetHeight / 2;
23 if (window.testRunner) {
24 eventSender.mouseMoveTo(buttonX, y);
25 eventSender.mouseDown();
26 eventSender.mouseUp();
28 eventSender.mouseMoveTo(middleX, y);
29 eventSender.mouseDown();
30 eventSender.mouseUp();
32 if (mouseDownCount == 2)
33 log("Test Passed");
34 else
35 log("Test Failed");
38 </script>
39 </head>
40 <body onload="test()">
41 This tests that clicking on the hidden cancel button won't start capturing mouse events. To run this test manually, click where the
42 cancel button would be, and then click in the middle of the field. If you see two "onmousedown" strings logged, then the test passes.<br>
43 <input type="search" id="search" onmousedown="mouseDownCount++; log('onmousedown')"/>
44 <pre id="console"></pre>
45 </body>
46 </html>