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..fc532f15c5fb83edfb27c2d9bd31db303d60e3a7 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside.html |
@@ -0,0 +1,49 @@ |
+<html> |
+<body> |
+<script src="../../../resources/js-test.js"></script> |
+<select id="listBoxSelect" 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 select = document.getElementById('listBoxSelect'); |
+select.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 { |
+ var x = select.offsetLeft + 7; |
+ var y = select.offsetTop + 7; |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(x, y + 20); |
+ eventSender.mouseMoveTo(x, y + 600); |
+ eventSender.mouseUp(); |
+ setTimeout(HorizontalTest, 100); |
gnana
2014/01/07 08:35:19
Before running horizontal test we need to give a d
|
+ } |
+} |
+function HorizontalTest() |
+{ |
+ var x = select.offsetLeft + 7; |
+ var y = select.offsetTop + 7; |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(); |
+ eventSender.mouseMoveTo(x + 20, y); |
+ eventSender.mouseMoveTo(x + 600, y); |
+ eventSender.mouseUp(); |
+ finishJSTest(); |
+} |
+</script> |
+</body> |
+</html> |