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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/select-disabled-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script>
5 </head> 6 </head>
6 <body> 7 <body>
7 8
8 <select id=select1 size=3> 9 <select id=select1 size=3>
9 <option selected>a</option> 10 <option selected>a</option>
10 <option>b</option> 11 <option>b</option>
11 <option>c</option> 12 <option>c</option>
12 </select> 13 </select>
13 14
14 <select id=select2> 15 <select id=select2>
15 <option selected>a</option> 16 <option selected>a</option>
16 <option>b</option> 17 <option>b</option>
17 <option>c</option> 18 <option>c</option>
18 </select> 19 </select>
19 20
21 <select id=select3>
22 <option selected>a</option>
23 </select>
24
25 <select id=select4>
26 <option selected>a</option>
27 <option>b</option>
28 <option>c</option>
29 </select>
30
31 <input id="text"></input>
32
20 <script> 33 <script>
21 description('Tests that user cannot change disabled select by keyboard'); 34 description('Tests that user cannot change disabled select by keyboard');
22 35
23 var select1 = document.getElementById('select1'); 36 var select1 = document.getElementById('select1');
24 select1.focus(); 37 select1.focus();
25 shouldBeEqualToString('select1.value', 'a'); 38 shouldBeEqualToString('select1.value', 'a');
26 eventSender.keyDown('downArrow'); 39 eventSender.keyDown('downArrow');
27 shouldBeEqualToString('select1.value', 'b'); 40 shouldBeEqualToString('select1.value', 'b');
28 select1.disabled = true; 41 select1.disabled = true;
29 eventSender.keyDown('downArrow'); 42 eventSender.keyDown('downArrow');
30 shouldBeEqualToString('select1.value', 'b'); 43 shouldBeEqualToString('select1.value', 'b');
31 eventSender.keyDown('c'); 44 eventSender.keyDown('c');
32 shouldBeEqualToString('select1.value', 'b'); 45 shouldBeEqualToString('select1.value', 'b');
33 46
34 var select2 = document.getElementById('select2'); 47 var select2 = document.getElementById('select2');
35 select2.focus(); 48 select2.focus();
36 shouldBeEqualToString('select2.value', 'a'); 49 shouldBeEqualToString('select2.value', 'a');
37 eventSender.keyDown('b'); 50 eventSender.keyDown('b');
38 shouldBeEqualToString('select2.value', 'b'); 51 shouldBeEqualToString('select2.value', 'b');
39 select2.disabled = true; 52 select2.disabled = true;
40 eventSender.keyDown('downArrow'); 53 eventSender.keyDown('downArrow');
41 shouldBeEqualToString('select2.value', 'b'); 54 shouldBeEqualToString('select2.value', 'b');
42 eventSender.keyDown('c'); 55 eventSender.keyDown('c');
43 shouldBeEqualToString('select2.value', 'b'); 56 shouldBeEqualToString('select2.value', 'b');
44 57
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)");
64
65 debug('Tests on select disable, value cannot be changed');
66 var select4 = document.getElementById('select4');
67 select4.focus();
68 eventSender.keyDown('b');
69 shouldBeEqualToString('select4.value', 'b');
70 select4.disabled = true;
71 eventSender.keyDown('c');
72 shouldBeEqualToString('select4.value', 'b');
73
74
45 </script> 75 </script>
46 </body> 76 </body>
47 </html> 77 </html>
OLDNEW
« 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