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

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

Issue 508853002: Context menu should skip any menu construct whose submenu label is the empty string. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/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 17 matching lines...) Expand all
28 </menu> 28 </menu>
29 <menuitem label="Item7"></menuitem> 29 <menuitem label="Item7"></menuitem>
30 <!-- Test child menu without label. --> 30 <!-- Test child menu without label. -->
31 <menu> 31 <menu>
32 <menuitem label="Item8"></menuitem> 32 <menuitem label="Item8"></menuitem>
33 <!-- Test child menu with empty label. --> 33 <!-- Test child menu with empty label. -->
34 <menu label=""> 34 <menu label="">
35 <menuitem label="Item9"></menuitem> 35 <menuitem label="Item9"></menuitem>
36 <menuitem label="Item10"></menuitem> 36 <menuitem label="Item10"></menuitem>
37 </menu> 37 </menu>
38 <!-- Test collapsing two or more adjacent separators. -->
39 <hr>
40 <menuitem label="Item11"></menuitem> 38 <menuitem label="Item11"></menuitem>
41 <menuitem label="Item12"></menuitem> 39 <menuitem label="Item12"></menuitem>
42 </menu> 40 </menu>
43 <!-- Test collapsing two or more adjacent separators. --> 41 <!-- Test collapsing two or more adjacent separators. -->
44 <hr> 42 <hr>
45 <hr> 43 <hr>
46 <hr> 44 <hr>
47 <hr> 45 <hr>
48 <!-- Test menuitem menu without label. --> 46 <!-- Test menuitem menu without label. -->
49 <menuitem></menuitem> 47 <menuitem></menuitem>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 var button3 = document.getElementById("button_3"); 129 var button3 = document.getElementById("button_3");
132 document.getElementById("menu_3").addEventListener("show", removeMenu, false); 130 document.getElementById("menu_3").addEventListener("show", removeMenu, false);
133 var items3 = contextClickAndGetMenuItems(button3); 131 var items3 = contextClickAndGetMenuItems(button3);
134 132
135 // Esc key to hide the context menu. 133 // Esc key to hide the context menu.
136 eventSender.keyDown("escape"); 134 eventSender.keyDown("escape");
137 135
138 var button4 = document.getElementById("button_4"); 136 var button4 = document.getElementById("button_4");
139 var items4 = contextClickAndGetMenuItems(button4); 137 var items4 = contextClickAndGetMenuItems(button4);
140 138
141 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 21); 139 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 17);
142 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1"); 140 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1");
141 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "Item2");
142 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------");
143 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3");
143 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >"); 144 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >");
144 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4"); 145 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4");
145 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >"); 146 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >");
146 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5"); 147 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5");
147 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------"); 148 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------");
149 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6");
148 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7"); 150 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7");
149 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------"); 151 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------");
150 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8"); 152 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8");
151 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "---------"); 153 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11");
152 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item9"); 154 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12");
153 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "---------"); 155 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------");
154 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "---------"); 156 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13");
155 shouldBeEqualToString("itemsWithCustomContextMenu[20]", "Item13");
156 shouldBeEqualToNumber("items1.length - items.length", 0); 157 shouldBeEqualToNumber("items1.length - items.length", 0);
157 shouldBeEqualToNumber("items2.length - items.length", 0); 158 shouldBeEqualToNumber("items2.length - items.length", 0);
158 shouldBeEqualToNumber("items3.length - items.length", 0); 159 shouldBeEqualToNumber("items3.length - items.length", 0);
159 shouldBeEqualToNumber("items4.length - items.length", 0); 160 shouldBeEqualToNumber("items4.length - items.length", 0);
160 161
161 </script> 162 </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