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

Side by Side Diff: LayoutTests/fast/forms/select/optgroup-clicking.html

Issue 204433002: Selecting OptGroup label does not deselect selected item (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated platform mac expectation file Created 6 years, 8 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/optgroup-clicking-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 <body onload="test()"> 3 <body onload="test()">
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../resources/common.js"></script> 5 <script src="../resources/common.js"></script>
6 6
7 <form id="form"> 7 <form id="form">
8 <select size="10" id="listbox"> 8 <select size="10" id="listbox">
9 <optgroup label="Enabled" id="listbox_optgroup_enabled"> 9 <optgroup label="Enabled" id="listbox_optgroup_enabled">
10 <option value="listbox_e1" id="listbox_option_enabled">One</option> 10 <option value="listbox_e1" id="listbox_option_enabled">One</option>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 testRunner.dumpAsText(); 56 testRunner.dumpAsText();
57 57
58 debug("\nClick enabled option"); 58 debug("\nClick enabled option");
59 $("listbox").selectedIndex = 2; 59 $("listbox").selectedIndex = 2;
60 mouseMoveToIndexInListbox(1 + 1, 'listbox'); // +1 for optgroup 60 mouseMoveToIndexInListbox(1 + 1, 'listbox'); // +1 for optgroup
61 eventSender.mouseDown(); 61 eventSender.mouseDown();
62 eventSender.mouseUp(); 62 eventSender.mouseUp();
63 shouldBe('$("listbox").selectedIndex', '1'); 63 shouldBe('$("listbox").selectedIndex', '1');
64 64
65 debug("\nClick on optgroup, should not deselect selectedIndex");
66 mouseMoveToIndexInListbox(0, 'listbox'); // Select on optgroup
67 eventSender.mouseDown();
68 eventSender.mouseUp();
69 shouldBe('$("listbox").selectedIndex', '1');
70
65 debug("\nClick disabled option - doesn't change selectedIndex"); 71 debug("\nClick disabled option - doesn't change selectedIndex");
66 mouseMoveToIndexInListbox(5 + 2, 'listbox'); // +2 for optgroup's 72 mouseMoveToIndexInListbox(5 + 2, 'listbox'); // +2 for optgroup's
67 eventSender.mouseDown(); 73 eventSender.mouseDown();
68 eventSender.mouseUp(); 74 eventSender.mouseUp();
69 shouldBe('$("listbox").selectedIndex', '1'); 75 shouldBe('$("listbox").selectedIndex', '1');
70 76
71 debug("\nMenu list with arrow key"); 77 debug("\nMenu list with arrow key");
72 $("menulist").selectedIndex = 3; 78 $("menulist").selectedIndex = 3;
73 $("menulist").focus(); 79 $("menulist").focus();
74 eventSender.keyDown("downArrow"); 80 eventSender.keyDown("downArrow");
75 eventSender.keyDown("\n"); 81 eventSender.keyDown("\n");
76 shouldBe('$("menulist").selectedIndex', '8'); 82 shouldBe('$("menulist").selectedIndex', '8');
77 83
78 finishJSTest(); 84 finishJSTest();
79 } 85 }
80 </script> 86 </script>
81 </body> 87 </body>
82 </html> 88 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/optgroup-clicking-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698