Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / click-count.html
blob50ce5c1e8567b1a04e1b4c9764fa3a22762af4d1
1 <html>
2 <head>
3 <script>
4 function log(string)
6 document.getElementById('output').innerHTML += string;
9 function mouseDown(evt)
11 log("<span style='color:green'>[Mouse Down]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
14 function mouseUp(evt)
16 log("<span style='color:green'>[Mouse Up]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
19 function mouseClick(evt)
21 log("<span style='color:green'>[Mouse Click]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
24 function mouseDoubleClick(evt)
26 log("<span style='color:green'>[Mouse Double Click]</span> Button: " + evt.button + " Click Count: " + evt.detail + "<br>");
29 function test()
31 if (window.testRunner) {
32 testRunner.dumpAsText();
33 testRunner.waitUntilDone();
35 if (window.eventSender) {
36 var testEle = document.getElementById("testDiv");
37 eventSender.mouseMoveTo(testEle.offsetLeft+testEle.offsetWidth/2, testEle.offsetTop+testEle.offsetHeight/2);
38 testClick();
42 function testClick()
44 for (var clickCount = 1; clickCount <= 5; clickCount++) {
45 log("Clicking " + clickCount + " times<br>");
46 for (var click = 0; click < clickCount; click++) {
47 eventSender.mouseDown();
48 eventSender.mouseUp();
50 // Skip forward 1 second so that the clicks are counted as distinct.
51 eventSender.leapForward(1000);
53 testRunner.notifyDone();
56 </script>
57 </head>
58 <body onload="test()">
59 <div id="testDiv" style="-webkit-user-select: none; border:1px solid red" onmousedown="mouseDown(event)" onmouseup="mouseUp(event)" onclick="mouseClick(event)" ondblclick="mouseDoubleClick(event)">Click inside this div</div>
60 <p id="output">
61 </p>