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> |
+ |