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

Side by Side Diff: LayoutTests/fast/dom/HTMLMenuElement/custom-context-menu.html

Issue 786753003: Implement type=radio and radiogroup attribute for menuitem. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaselined Created 6 years 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/dom/HTMLMenuElement/custom-context-menu-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 <head> 2 <head>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 </head> 4 </head>
5 <button id="button" style="height: 100px; width: 100px;"> 5 <button id="button" style="height: 100px; width: 100px;">
6 </button> 6 </button>
7 <button id="button_with_contextmenu" contextmenu="menu_id" style="height: 100px; width: 100px;"> 7 <button id="button_with_contextmenu" contextmenu="menu_id" style="height: 100px; width: 100px;">
8 <menu id="menu_id" type="PopUp"> 8 <menu id="menu_id" type="PopUp">
9 <!-- Test removal of separator at the start. --> 9 <!-- Test removal of separator at the start. -->
10 <hr> 10 <hr>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 <menuitem></menuitem> 48 <menuitem></menuitem>
49 <!-- Test menuitem menu with empty label. --> 49 <!-- Test menuitem menu with empty label. -->
50 <menuitem label=""></menuitem> 50 <menuitem label=""></menuitem>
51 <menuitem label="Item13"></menuitem> 51 <menuitem label="Item13"></menuitem>
52 <!-- Test menuitem of type "checkbox" without "checked" attribute. --> 52 <!-- Test menuitem of type "checkbox" without "checked" attribute. -->
53 <menuitem type="checkbox" label="Item14"></menuitem> 53 <menuitem type="checkbox" label="Item14"></menuitem>
54 <!-- Test menuitem of type "checkbox" with "checked" attribute. --> 54 <!-- Test menuitem of type "checkbox" with "checked" attribute. -->
55 <menuitem type="checkbox" label="Item15" checked></menuitem> 55 <menuitem type="checkbox" label="Item15" checked></menuitem>
56 <!-- Test default menuitem with "checked" attribute. --> 56 <!-- Test default menuitem with "checked" attribute. -->
57 <menuitem label="Item16" checked></menuitem> 57 <menuitem label="Item16" checked></menuitem>
58 <!-- Test menuitem of type "radio" with "checked" attribute. -->
59 <menuitem type="radio" radiogroup="group" label="Item17"></menuitem>
60 <menuitem type="radio" radiogroup="group" label="Item18" checked></menui tem>
61 <menuitem type="radio" radiogroup="group" label="Item19"></menuitem>
58 <!-- Test removal of separator at the end. --> 62 <!-- Test removal of separator at the end. -->
59 <hr> 63 <hr>
60 </menu> 64 </menu>
61 </button> 65 </button>
62 <!-- Test with menu element without type attribute specified. --> 66 <!-- Test with menu element without type attribute specified. -->
63 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt h: 100px;"> 67 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt h: 100px;">
64 <menu id="menu_without_type"> 68 <menu id="menu_without_type">
65 <menuitem label="Item1"></menuitem> 69 <menuitem label="Item1"></menuitem>
66 <menuitem label="Item2"></menuitem> 70 <menuitem label="Item2"></menuitem>
67 <menuitem label="Item3"></menuitem> 71 <menuitem label="Item3"></menuitem>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 157
154 var button4 = document.getElementById("button_4"); 158 var button4 = document.getElementById("button_4");
155 var items4 = contextClickAndGetMenuItems(button4); 159 var items4 = contextClickAndGetMenuItems(button4);
156 160
157 // Esc key to hide the context menu. 161 // Esc key to hide the context menu.
158 eventSender.keyDown("escape"); 162 eventSender.keyDown("escape");
159 163
160 var button5 = document.getElementById("button_5"); 164 var button5 = document.getElementById("button_5");
161 var items5 = contextClickAndGetMenuItems(button5); 165 var items5 = contextClickAndGetMenuItems(button5);
162 166
163 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 20); 167 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 23);
164 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1"); 168 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1");
165 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2"); 169 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2");
166 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------"); 170 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------");
167 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3"); 171 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3");
168 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >"); 172 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >");
169 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4"); 173 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4");
170 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >"); 174 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >");
171 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5"); 175 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5");
172 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------"); 176 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------");
173 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6"); 177 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6");
174 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7"); 178 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7");
175 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------"); 179 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------");
176 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8"); 180 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8");
177 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11"); 181 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11");
178 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12"); 182 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12");
179 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------"); 183 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------");
180 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13"); 184 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13");
181 shouldBeEqualToString("itemsWithCustomContextMenu[17]", "Item14"); 185 shouldBeEqualToString("itemsWithCustomContextMenu[17]", "Item14");
182 shouldBeEqualToString("itemsWithCustomContextMenu[18]", "*Item15"); 186 shouldBeEqualToString("itemsWithCustomContextMenu[18]", "*Item15");
183 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "Item16"); 187 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "Item16");
188 shouldBeEqualToString("itemsWithCustomContextMenu[20]", "Item17");
189 shouldBeEqualToString("itemsWithCustomContextMenu[21]", "*Item18");
190 shouldBeEqualToString("itemsWithCustomContextMenu[22]", "Item19");
184 shouldBeEqualToNumber("items1.length - items.length", 0); 191 shouldBeEqualToNumber("items1.length - items.length", 0);
185 shouldBeEqualToNumber("items2.length - items.length", 0); 192 shouldBeEqualToNumber("items2.length - items.length", 0);
186 shouldBeEqualToNumber("items3.length - items.length", 0); 193 shouldBeEqualToNumber("items3.length - items.length", 0);
187 shouldBeEqualToNumber("items4.length - items.length", 0); 194 shouldBeEqualToNumber("items4.length - items.length", 0);
188 shouldBeEqualToNumber("items5.length - items.length", 3); 195 shouldBeEqualToNumber("items5.length - items.length", 3);
189 shouldBeEqualToString("items5[0]", "Item1"); 196 shouldBeEqualToString("items5[0]", "Item1");
190 shouldBeEqualToString("items5[1]", "Item2"); 197 shouldBeEqualToString("items5[1]", "Item2");
191 shouldBeEqualToString("items5[2]", "Item3"); 198 shouldBeEqualToString("items5[2]", "Item3");
192 199
193 </script> 200 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLMenuElement/custom-context-menu-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698