Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside.html

Issue 120373005: OnChange event should fire if the multiple selection changes in listbox using mouse (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed not modified file Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
tkent 2014/01/06 03:04:58 I prefer putting this file in LayoutTests/fast/for
gnana 2014/01/06 09:15:25 Done.
2 <head> 2 <head>
3 <script> 3 <script>
4
4 function log(msg) 5 function log(msg)
5 { 6 {
6 document.getElementById('console').appendChild(document.createTextNod e(msg + '\n')); 7 document.getElementById('console').appendChild(document.createTextNod e(msg + '\n'));
7 } 8 }
9
10 function listBoxSelectChange(s, e)
11 {
12 log("PASS");
tkent 2014/01/06 03:04:58 Please use testPassed() defined in LayoutTests/res
gnana 2014/01/06 09:15:25 Done.
13 }
8 14
9 function test() 15 function test()
10 { 16 {
17 var lstSelect = document.getElementById('listBoxSelect');
18 lstSelect.addEventListener('change', listBoxSelectChange, false);
11 if (window.testRunner) { 19 if (window.testRunner) {
12 testRunner.waitUntilDone(); 20 testRunner.waitUntilDone();
tkent 2014/01/06 03:04:58 Please import js-test.js and use jsTestIsAsync=tru
gnana 2014/01/06 09:15:25 Done.
13 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
tkent 2014/01/06 03:04:58 Please import js-test.js and remove this line.
gnana 2014/01/06 09:15:25 Done.
14 setTimeout(autoscrollTestPart1, 0); 22 setTimeout(autoscrollTestPart1, 0);
15 } 23 }
16 } 24 }
17 25
18 function autoscrollTestPart1() 26 function autoscrollTestPart1()
19 { 27 {
20 var input = document.getElementById('shortTextField'); 28 var input = document.getElementById('listBoxSelect');
tkent 2014/01/06 03:04:58 Using the name |input| for <select> looks unreason
gnana 2014/01/06 09:15:25 Done.
21 if (window.eventSender) { 29 if (window.eventSender) {
22 var x = input.offsetLeft + 7; 30 var x = input.offsetLeft + 7;
23 var y = input.offsetTop + 7; 31 var y = input.offsetTop + 7;
24 eventSender.dragMode = false; 32 eventSender.dragMode = false;
25 eventSender.mouseMoveTo(x, y); 33 eventSender.mouseMoveTo(x, y);
26 eventSender.mouseDown(); 34 eventSender.mouseDown();
27 eventSender.mouseMoveTo(x + 20, y); 35 eventSender.mouseMoveTo(x, y + 20);
tkent 2014/01/06 03:04:58 Does this work if we move the mouse pointer horizo
gnana 2014/01/06 09:15:25 yes, it works
28 eventSender.mouseMoveTo(x + 600, y); 36 eventSender.mouseMoveTo(x, y + 600);
29 } 37 }
30 setTimeout(autoscrollTestPart2, 100); 38 setTimeout(autoscrollTestPart2, 100);
31 } 39 }
32 40
33 function autoscrollTestPart2() 41 function autoscrollTestPart2()
34 { 42 {
35 if (window.eventSender) 43 if (window.eventSender)
36 eventSender.mouseUp(); 44 eventSender.mouseUp();
37 45
38 var input = document.getElementById('shortTextField'); 46 var input = document.getElementById('shortTextField');
tkent 2014/01/06 03:04:58 This variable is not used.
gnana 2014/01/06 09:15:25 Done.
39 if (input.scrollLeft == 0) 47
40 log("FAILED the textfield should have been scrolled");
41 else
42 log("PASSED");
43
44 if (window.testRunner) 48 if (window.testRunner)
45 testRunner.notifyDone(); 49 testRunner.notifyDone();
tkent 2014/01/06 03:04:58 Please import js-test.js and use finishJSTest().
gnana 2014/01/06 09:15:25 Done.
46 } 50 }
47 </script> 51 </script>
48 </head> 52 </head>
49 <body onload="test()"> 53 <body onload="test()">
50 <div id="console"> 54 <div id="console">
51 <input id="shortTextField" value="This text should be autoscrollable and if it doesn't then the test failed" size="25"> 55 <select id="listBoxSelect" size="5" multiple="multiple">
52 https://bugs.webkit.org/show_bug.cgi?id=20201 <br> 56 <option value="option 1">Option 1</option>
53 To do the test manually you have to try triggering the autoscroll by star ting the dragging from within the text field and moving to the right. If the aut oscroll occurs the test has PASSED.<br> 57 <option value="option 2">Option 2</option>
58 <option value="option 3">Option 3</option>
59 <option value="option 4">Option 4</option>
60 <option value="option 5">Option 5</option>
61 </select>
54 </div> 62 </div>
55
56 </body> 63 </body>
57 </html> 64 </html>
58 65
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/multiselect-in-listbox-mouse-release-outside-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698