4 <script src=
"../../../resources/js-test.js"></script>
5 <script src=
"../resources/common.js"></script>
9 <select id=select1 size=
3>
10 <option selected
>a
</option>
16 <option selected
>a
</option>
22 <option selected
>a
</option>
26 <option selected
>a
</option>
31 <input id=
"text"></input>
34 description('Tests that user cannot change disabled select by keyboard');
36 var select1
= document
.getElementById('select1');
38 shouldBeEqualToString('select1.value', 'a');
39 eventSender
.keyDown('downArrow');
40 shouldBeEqualToString('select1.value', 'b');
41 select1
.disabled
= true;
42 eventSender
.keyDown('downArrow');
43 shouldBeEqualToString('select1.value', 'b');
44 eventSender
.keyDown('c');
45 shouldBeEqualToString('select1.value', 'b');
47 var select2
= document
.getElementById('select2');
49 shouldBeEqualToString('select2.value', 'a');
50 eventSender
.keyDown('b');
51 shouldBeEqualToString('select2.value', 'b');
52 select2
.disabled
= true;
53 eventSender
.keyDown('downArrow');
54 shouldBeEqualToString('select2.value', 'b');
55 eventSender
.keyDown('c');
56 shouldBeEqualToString('select2.value', 'b');
58 debug('Tests on select disable, popup menu is hidden');
59 var select3
= document
.getElementById('select3');
60 clickElement(select3
);
61 shouldBeTrue("internals.isSelectPopupVisible(select3)");
62 select3
.disabled
= true;
63 shouldBeFalse("internals.isSelectPopupVisible(select3)");
65 debug('Tests on select disable, value cannot be changed');
66 var select4
= document
.getElementById('select4');
68 eventSender
.keyDown('b');
69 shouldBeEqualToString('select4.value', 'b');
70 select4
.disabled
= true;
71 eventSender
.keyDown('c');
72 shouldBeEqualToString('select4.value', 'b');