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

Unified Diff: LayoutTests/fast/forms/select/listbox-click-on-scrollbar.html

Issue 16184002: REGRESSION: Select listbox dispatches a change event on scroll. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/listbox-click-on-scrollbar-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/select/listbox-click-on-scrollbar.html
diff --git a/LayoutTests/fast/forms/select/listbox-click-on-scrollbar.html b/LayoutTests/fast/forms/select/listbox-click-on-scrollbar.html
new file mode 100644
index 0000000000000000000000000000000000000000..a63c1cab742d239253a6a97ead525e525c65dfbb
--- /dev/null
+++ b/LayoutTests/fast/forms/select/listbox-click-on-scrollbar.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../js/resources/js-test-pre.js"></script>
+<select id="select1" multiple size="4">
+<option>1</option>
+<option>2</option>
+<option>3</option>
+<option>4</option>
+<option>5</option>
+<option>6</option>
+<option>7</option>
+<option>8</option>
+</select>
+
+<script>
+description('Click on a listbox scrollbar should not dispatch change evnet.');
+jsTestIsAsync = true;
+var select1 = document.getElementById('select1');
+var changeEventCounter = 0;
+select1.onchange = function() {
+ testFailed('A change event was dispatched.');
+ ++changeEventCounter;
+}
+
+window.onload = function() {
+ if (!window.eventSender)
+ debug('Click on the scrollbar. The test passes if nothing is printed.');
+ else {
+ eventSender.mouseMoveTo(select1.offsetLeft + select1.offsetWidth - 2, select1.offsetTop + select1.offsetHeight - 2);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ shouldBe('select1.selectedIndex', '-1');
+ shouldBe('changeEventCounter', '0');
+ finishJSTest();
+ }
+};
+</script>
+
+<script src="../../js/resources/js-test-post.js"></script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/listbox-click-on-scrollbar-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698