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

Unified Diff: LayoutTests/fast/forms/select/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: Minor modification and incorporated review comments 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698