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

Unified Diff: LayoutTests/fast/forms/select/listbox-disabled-scroll-no-onchange.html

Issue 14931006: Disabled select element should not fire onchange event. When dragging a disabled select element it … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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-disabled-scroll-no-onchange-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-disabled-scroll-no-onchange.html
diff --git a/LayoutTests/fast/forms/select/listbox-disabled-scroll-no-onchange.html b/LayoutTests/fast/forms/select/listbox-disabled-scroll-no-onchange.html
new file mode 100644
index 0000000000000000000000000000000000000000..802cd988fa2a1b3ab65f6727b42cd96d4b8bea1d
--- /dev/null
+++ b/LayoutTests/fast/forms/select/listbox-disabled-scroll-no-onchange.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<select id="test" disabled size=3">
+<option selected>foo1</option>
+<option>foo2</option>
+<option>foo3</option>
+<option>foo4</option>
+<option>foo5</option>
+</select>
+
+
+<div id="result">Success if onchange was not fired.</div>
+<div id="console"></div>
+<script>
+description('Test that scrolling the listbox does not fire onchange event');
+
+function handleChange() {
+ $('result').textContent = 'Failed. A disabled select should not fire onchange event.';
+}
+
+$('test').addEventListener('change', handleChange);
+if (!window.eventSender) {
+ debug('Click and drag the select element using the mouse. It should not fire onchange event.');
+} else {
+ mouseMoveToIndexInListbox(1, 'test');
+ eventSender.mouseDown(0);
+ mouseMoveToIndexInListbox(2, 'test');
+ eventSender.mouseUp(0);
+}
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</html>
+
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/listbox-disabled-scroll-no-onchange-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698