Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-multiple-elements-with-mouse-drag.html
blob8a59bf1eded9281e671c0837ecfb83938966e7c4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script>
6 <script>
7 window.jsTestIsAsync = true;
9 function test() {
10 if (window.eventSender) {
11 var selectObject = document.getElementById("selectId");
13 var optionHeight = selectObject.offsetHeight / selectObject.size;
14 var x = selectObject.offsetLeft + selectObject.offsetWidth / 2;
15 var y = selectObject.offsetTop + optionHeight / 2;
17 eventSender.dragMode = false;
18 eventSender.mouseMoveTo(x, y);
19 eventSender.mouseDown();
20 eventSender.mouseMoveTo(x, y + (optionHeight * 3));
22 setTimeout(testSelection, 100);
23 } else {
24 debug("Test manually if options are getting selected by dragging on the select element.");
28 function testSelection()
30 eventSender.mouseUp();
32 for (var i = 0; i < 4; i++) {
33 shouldBeTrue("document.getElementById(\"selectId\").options[" + i + "].selected");
36 finishJSTest();
38 successfullyParsed = true;
39 </script>
40 <title></title>
41 </head>
42 <body onload="test()">
43 <p>Select multiple option with mouse drag</p>
45 <select multiple="multiple" size="4" id="selectId">
46 <option value="P1">P1</option>
47 <option value="P2">P2</option>
48 <option value="P3">P3</option>
49 <option value="P4">P4</option>
50 <option value="P5">P5</option>
51 <option value="P6">P6</option>
52 <option value="P7">P7</option>
53 </select>
55 <div id="console"></div>
56 </body>
57 </html>