blob: 22113bf0e3455fc54681a42554e0a871feafc7e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.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>
</html>
|