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

Unified Diff: LayoutTests/fast/forms/select/select-disabled.html

Issue 159743002: Select when disabled should not allow value change and popup is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Different expected file for mac Created 6 years, 10 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/select-disabled-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/select-disabled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698