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

Side by Side Diff: LayoutTests/http/tests/misc/custom-context-menu.html

Issue 889343002: Added a test for icon attribute values with leading/trailing spaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a comment to icon string Created 5 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/http/tests/misc/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="/js-test-resources/js-test.js"></script> 3 <script src="/js-test-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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. --> 58 <!-- Test menuitem of type "radio" with "checked" attribute. -->
59 <menuitem type="radio" radiogroup="group" label="Item17"></menuitem> 59 <menuitem type="radio" radiogroup="group" label="Item17"></menuitem>
60 <menuitem type="radio" radiogroup="group" label="Item18" checked></menui tem> 60 <menuitem type="radio" radiogroup="group" label="Item18" checked></menui tem>
61 <menuitem type="radio" radiogroup="group" label="Item19"></menuitem> 61 <menuitem type="radio" radiogroup="group" label="Item19"></menuitem>
62 <!-- Test menuitem of with "icon" attribute. --> 62 <!-- Test menuitem with "icon" attribute. -->
63 <menuitem label="Item20" icon="abc.png" checked></menuitem> 63 <menuitem label="Item20" icon="icon1.png" checked></menuitem>
64 <!-- Test menuitem with "icon" attribute having leading and trailing whi te spaces. -->
65 <menuitem label="Item21" icon=" icon2.png " checked></menuitem>
64 <!-- Test removal of separator at the end. --> 66 <!-- Test removal of separator at the end. -->
65 <hr> 67 <hr>
66 </menu> 68 </menu>
67 </button> 69 </button>
68 <!-- Test with menu element without type attribute specified. --> 70 <!-- Test with menu element without type attribute specified. -->
69 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt h: 100px;"> 71 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt h: 100px;">
70 <menu id="menu_without_type"> 72 <menu id="menu_without_type">
71 <menuitem label="Item1"></menuitem> 73 <menuitem label="Item1"></menuitem>
72 <menuitem label="Item2"></menuitem> 74 <menuitem label="Item2"></menuitem>
73 <menuitem label="Item3"></menuitem> 75 <menuitem label="Item3"></menuitem>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 161
160 var button4 = document.getElementById("button_4"); 162 var button4 = document.getElementById("button_4");
161 var items4 = contextClickAndGetMenuItems(button4); 163 var items4 = contextClickAndGetMenuItems(button4);
162 164
163 // Esc key to hide the context menu. 165 // Esc key to hide the context menu.
164 eventSender.keyDown("escape"); 166 eventSender.keyDown("escape");
165 167
166 var button5 = document.getElementById("button_5"); 168 var button5 = document.getElementById("button_5");
167 var items5 = contextClickAndGetMenuItems(button5); 169 var items5 = contextClickAndGetMenuItems(button5);
168 170
169 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 24); 171 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 25);
170 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1"); 172 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1");
171 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2"); 173 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2");
172 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------"); 174 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------");
173 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3"); 175 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3");
174 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >"); 176 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >");
175 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4"); 177 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4");
176 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >"); 178 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >");
177 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5"); 179 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5");
178 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------"); 180 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------");
179 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6"); 181 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6");
180 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7"); 182 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7");
181 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------"); 183 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------");
182 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8"); 184 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8");
183 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11"); 185 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11");
184 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12"); 186 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12");
185 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------"); 187 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------");
186 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13"); 188 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13");
187 shouldBeEqualToString("itemsWithCustomContextMenu[17]", "Item14"); 189 shouldBeEqualToString("itemsWithCustomContextMenu[17]", "Item14");
188 shouldBeEqualToString("itemsWithCustomContextMenu[18]", "*Item15"); 190 shouldBeEqualToString("itemsWithCustomContextMenu[18]", "*Item15");
189 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "Item16"); 191 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "Item16");
190 shouldBeEqualToString("itemsWithCustomContextMenu[20]", "Item17"); 192 shouldBeEqualToString("itemsWithCustomContextMenu[20]", "Item17");
191 shouldBeEqualToString("itemsWithCustomContextMenu[21]", "*Item18"); 193 shouldBeEqualToString("itemsWithCustomContextMenu[21]", "*Item18");
192 shouldBeEqualToString("itemsWithCustomContextMenu[22]", "Item19"); 194 shouldBeEqualToString("itemsWithCustomContextMenu[22]", "Item19");
193 shouldBeEqualToString("itemsWithCustomContextMenu[23]", "Item20http://127.0.0.1: 8000/misc/abc.png"); 195 shouldBeEqualToString("itemsWithCustomContextMenu[23]", "Item20http://127.0.0.1: 8000/misc/icon1.png");
196 shouldBeEqualToString("itemsWithCustomContextMenu[24]", "Item21http://127.0.0.1: 8000/misc/icon2.png");
194 shouldBeEqualToNumber("items1.length - items.length", 0); 197 shouldBeEqualToNumber("items1.length - items.length", 0);
195 shouldBeEqualToNumber("items2.length - items.length", 0); 198 shouldBeEqualToNumber("items2.length - items.length", 0);
196 shouldBeEqualToNumber("items3.length - items.length", 0); 199 shouldBeEqualToNumber("items3.length - items.length", 0);
197 shouldBeEqualToNumber("items4.length - items.length", 0); 200 shouldBeEqualToNumber("items4.length - items.length", 0);
198 shouldBeEqualToNumber("items5.length - items.length", 3); 201 shouldBeEqualToNumber("items5.length - items.length", 3);
199 shouldBeEqualToString("items5[0]", "Item1"); 202 shouldBeEqualToString("items5[0]", "Item1");
200 shouldBeEqualToString("items5[1]", "Item2"); 203 shouldBeEqualToString("items5[1]", "Item2");
201 shouldBeEqualToString("items5[2]", "Item3"); 204 shouldBeEqualToString("items5[2]", "Item3");
202 205
203 </script> 206 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/misc/custom-context-menu-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698