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

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: Moved layout test to fast/forms/select 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/multiselect-in-listbox-mouse-release-outside-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698