Index: LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside.html |
diff --git a/LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside.html b/LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside.html |
new file mode 100755 |
index 0000000000000000000000000000000000000000..f41561bc71aabefbbb5735596fec6492015637d1 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside.html |
@@ -0,0 +1,66 @@ |
+<html> |
+<body> |
+<script src="../../../resources/js-test.js"></script> |
+<select id="listBoxInput" size="5" multiple="multiple"> |
+<option value="option 1">Option 1</option> |
+<option value="option 2">Option 2</option> |
+<option value="option 3">Option 3</option> |
+<option value="option 4">Option 4</option> |
+<option value="option 5">Option 5</option> |
+</select> |
+<script> |
+description('should dispatch change event when mouse is released outside.'); |
+jsTestIsAsync = true; |
+var input = document.getElementById('listBoxInput'); |
tkent
2014/01/06 23:33:21
Using a variable name |input| is not reasonable fo
gnana
2014/01/07 08:35:19
I misunderstood it previously. Corrected now.
Done
|
+input.onchange = function() { |
+ testPassed('A change event was dispatched.'); |
+} |
+ |
+window.onload = function() |
+{ |
+ if (!window.eventSender) |
+ debug('Select listbox using mouse and release the mouse pointer outside the listbox. The test passes if "A change event was dispatched." is printed.'); |
+ else |
+ setTimeout(autoscrollTestPart1, 0); |
tkent
2014/01/06 23:33:21
Do we need this setTimeout()?
gnana
2014/01/07 08:35:19
This timeout was not necessary. removed
Done.
|
+} |
+ |
+function autoscrollTestPart1() |
+{ |
+ var input = document.getElementById('listBoxInput'); |
+ var x = input.offsetLeft + 7; |
+ var y = input.offsetTop + 7; |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(x, y + 20); |
+ eventSender.mouseMoveTo(x, y + 600); |
+ setTimeout(autoscrollTestPart2, 100); |
tkent
2014/01/06 23:33:21
How did you choose '100'?
gnana
2014/01/07 08:35:19
This timeout was not necessary. removed
Done.
|
+} |
+ |
+function autoscrollTestPart2() |
+{ |
+ eventSender.mouseUp(); |
+ setTimeout(autoscrollTestPart3, 100); |
tkent
2014/01/06 23:33:21
Do we need this setTimeout()?
gnana
2014/01/07 08:35:19
Before running horizontal test we need to give a d
|
+} |
+ |
+function autoscrollTestPart3() |
+{ |
+ var input = document.getElementById('listBoxInput'); |
+ var x = input.offsetLeft + 7; |
+ var y = input.offsetTop + 7; |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(x + 20, y); |
+ eventSender.mouseMoveTo(x + 600, y); |
+ setTimeout(autoscrollTestPart4, 100); |
tkent
2014/01/06 23:33:21
How did you choose '100'?
gnana
2014/01/07 08:35:19
This timeout was not necessary so removed.
|
+} |
+ |
+function autoscrollTestPart4() |
+{ |
+ eventSender.mouseUp(); |
+ finishJSTest(); |
+} |
+</script> |
+</body> |
+</html> |