Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scrolling / scrollbar-mousedown-mouseup.html
blob220f097114e2242ece68ffc7dece3b6de78535a6
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
8 function initEventHandlers(element) {
9 element.addEventListener('mousedown', handleEvent);
10 element.addEventListener('mouseup', handleEvent);
11 element.addEventListener('click', handleEvent);
14 window.events = [];
15 function handleEvent(e) {
16 window.events.push(e);
19 function finish() {
20 shouldBe("events.length", "4");
21 shouldBeEqualToString("events[0].type", "mousedown");
22 shouldBeEqualToString("events[0].target.id", "scrollme");
23 shouldBe("events[0].which", "1");
24 shouldBeEqualToString("events[1].type", "mouseup");
25 shouldBeEqualToString("events[1].target.id", "scrollme");
26 shouldBe("events[1].which", "1");
27 shouldBeEqualToString("events[2].type", "mousedown");
28 shouldBeEqualToString("events[2].target.id", "scrollme");
29 shouldBe("events[2].which", "2");
30 shouldBeEqualToString("events[3].type", "mouseup");
31 shouldBeEqualToString("events[3].target.id", "scrollme");
32 shouldBe("events[3].which", "2");
33 finishJSTest();
36 window.onload = function () {
37 var d = document.querySelector('#scrollme');
38 initEventHandlers(d);
40 if (window.eventSender) {
41 eventSender.mouseMoveTo(d.offsetLeft + d.offsetWidth - 4, d.offsetTop + 4);
42 eventSender.mouseDown();
43 eventSender.mouseUp();
44 eventSender.mouseDown(1);
45 eventSender.mouseUp(1);
46 finish();
47 } else
48 debug('This test requires eventSender. Click the scrollbar to play manually.');
50 </script>
51 <style>
52 #scrollme {
53 width: 100px;
54 height: 100px;
55 overflow: auto;
57 #scrollme p {
58 height: 1000px;
60 </style>
61 </head>
62 <body>
63 <div id="scrollme"><p>This is a scrollable div.</p></div>
64 <pre id="console"></pre>
65 </body>
66 </html>