Index: LayoutTests/fast/forms/select/select-disabled.html |
diff --git a/LayoutTests/fast/forms/select/select-disabled.html b/LayoutTests/fast/forms/select/select-disabled.html |
index 563edc9d17a61d488c170ccee7efdd9d5b8a7c44..d79c44be6495dd59f97aad041be51ba6159601d9 100644 |
--- a/LayoutTests/fast/forms/select/select-disabled.html |
+++ b/LayoutTests/fast/forms/select/select-disabled.html |
@@ -2,6 +2,7 @@ |
<html> |
<head> |
<script src="../../../resources/js-test.js"></script> |
+<script src="../resources/common.js"></script> |
</head> |
<body> |
@@ -17,6 +18,18 @@ |
<option>c</option> |
</select> |
+<select id=select3> |
+<option selected>a</option> |
+</select> |
+ |
+<select id=select4> |
+<option selected>a</option> |
+<option>b</option> |
+<option>c</option> |
+</select> |
+ |
+<input id="text"></input> |
+ |
<script> |
description('Tests that user cannot change disabled select by keyboard'); |
@@ -42,6 +55,23 @@ shouldBeEqualToString('select2.value', 'b'); |
eventSender.keyDown('c'); |
shouldBeEqualToString('select2.value', 'b'); |
+debug('Tests on select disable, popup menu is hidden'); |
+var select3 = document.getElementById('select3'); |
+clickElement(select3); |
+shouldBeTrue("internals.isSelectPopupVisible(select3)"); |
+select3.disabled = true; |
+shouldBeFalse("internals.isSelectPopupVisible(select3)"); |
+ |
+debug('Tests on select disable, value cannot be changed'); |
+var select4 = document.getElementById('select4'); |
+select4.focus(); |
+eventSender.keyDown('b'); |
+shouldBeEqualToString('select4.value', 'b'); |
+select4.disabled = true; |
+eventSender.keyDown('c'); |
+shouldBeEqualToString('select4.value', 'b'); |
+ |
+ |
</script> |
</body> |
</html> |