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

Unified Diff: LayoutTests/fast/forms/select/select-mouseDisabled.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: 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
Index: LayoutTests/fast/forms/select/select-mouseDisabled.html
diff --git a/LayoutTests/fast/forms/select/select-mouseDisabled.html b/LayoutTests/fast/forms/select/select-mouseDisabled.html
new file mode 100644
index 0000000000000000000000000000000000000000..c79f1f534937b5eab0a4659b95a600e3fdaad3d0
--- /dev/null
+++ b/LayoutTests/fast/forms/select/select-mouseDisabled.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/common.js"></script>
+</head>
+
+<body>
+
+<select id=select1 size=4>
+<option selected>a</option>
+<option>b</option>
+<option>c</option>
+<option>d</option>
+</select>
+
+<script>
+description('Test to check when select is element is disabled, value cannot be changed by mouse.');
+
+var select1 = document.getElementById('select1');
+select1.focus();
+shouldBeEqualToString('select1.value', 'a');
+mouseMoveToIndexInListbox(1, 'select1');
+eventSender.mouseDown();
+eventSender.mouseUp();
+shouldBeEqualToString('select1.value', 'b');
+select1.disabled = true;
+mouseMoveToIndexInListbox(2, 'select1');
+eventSender.mouseDown();
+eventSender.mouseUp();
+shouldBeEqualToString('select1.value', 'b');
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/select-mouseDisabled-expected.txt » ('j') | Source/core/html/HTMLOptionElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698