OLD | NEW |
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 <!-- Test collapsing two or more adjacent separators. --> | 42 <!-- Test collapsing two or more adjacent separators. --> |
43 <hr> | 43 <hr> |
44 <hr> | 44 <hr> |
45 <hr> | 45 <hr> |
46 <hr> | 46 <hr> |
47 <!-- Test menuitem menu without label. --> | 47 <!-- Test menuitem menu without label. --> |
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. --> |
| 53 <menuitem type="checkbox" label="Item14"></menuitem> |
| 54 <!-- Test menuitem of type "checkbox" with "checked" attribute. --> |
| 55 <menuitem type="checkbox" label="Item15" checked></menuitem> |
| 56 <!-- Test default menuitem with "checked" attribute. --> |
| 57 <menuitem label="Item16" checked></menuitem> |
52 <!-- Test removal of separator at the end. --> | 58 <!-- Test removal of separator at the end. --> |
53 <hr> | 59 <hr> |
54 </menu> | 60 </menu> |
55 </button> | 61 </button> |
56 <!-- Test with menu element without type attribute specified. --> | 62 <!-- Test with menu element without type attribute specified. --> |
57 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt
h: 100px;"> | 63 <button id="button_1" contextmenu="menu_without_type" style="height: 100px; widt
h: 100px;"> |
58 <menu id="menu_without_type"> | 64 <menu id="menu_without_type"> |
59 <menuitem label="Item1"></menuitem> | 65 <menuitem label="Item1"></menuitem> |
60 <menuitem label="Item2"></menuitem> | 66 <menuitem label="Item2"></menuitem> |
61 <menuitem label="Item3"></menuitem> | 67 <menuitem label="Item3"></menuitem> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 153 |
148 var button4 = document.getElementById("button_4"); | 154 var button4 = document.getElementById("button_4"); |
149 var items4 = contextClickAndGetMenuItems(button4); | 155 var items4 = contextClickAndGetMenuItems(button4); |
150 | 156 |
151 // Esc key to hide the context menu. | 157 // Esc key to hide the context menu. |
152 eventSender.keyDown("escape"); | 158 eventSender.keyDown("escape"); |
153 | 159 |
154 var button5 = document.getElementById("button_5"); | 160 var button5 = document.getElementById("button_5"); |
155 var items5 = contextClickAndGetMenuItems(button5); | 161 var items5 = contextClickAndGetMenuItems(button5); |
156 | 162 |
157 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 17); | 163 shouldBeEqualToNumber("itemsWithCustomContextMenu.length - items.length", 20); |
158 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1"); | 164 shouldBeEqualToString("itemsWithCustomContextMenu[0]", "Item1"); |
159 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2"); | 165 shouldBeEqualToString("itemsWithCustomContextMenu[1]", "#Item2"); |
160 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------"); | 166 shouldBeEqualToString("itemsWithCustomContextMenu[2]", "---------"); |
161 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3"); | 167 shouldBeEqualToString("itemsWithCustomContextMenu[3]", "Item3"); |
162 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >"); | 168 shouldBeEqualToString("itemsWithCustomContextMenu[4]", "Submenu >"); |
163 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4"); | 169 shouldBeEqualToString("itemsWithCustomContextMenu[5]", "_Item4"); |
164 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >"); | 170 shouldBeEqualToString("itemsWithCustomContextMenu[6]", "_Deeper submenu >"); |
165 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5"); | 171 shouldBeEqualToString("itemsWithCustomContextMenu[7]", "__Item5"); |
166 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------"); | 172 shouldBeEqualToString("itemsWithCustomContextMenu[8]", "__---------"); |
167 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6"); | 173 shouldBeEqualToString("itemsWithCustomContextMenu[9]", "__Item6"); |
168 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7"); | 174 shouldBeEqualToString("itemsWithCustomContextMenu[10]", "Item7"); |
169 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------"); | 175 shouldBeEqualToString("itemsWithCustomContextMenu[11]", "---------"); |
170 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8"); | 176 shouldBeEqualToString("itemsWithCustomContextMenu[12]", "Item8"); |
171 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11"); | 177 shouldBeEqualToString("itemsWithCustomContextMenu[13]", "Item11"); |
172 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12"); | 178 shouldBeEqualToString("itemsWithCustomContextMenu[14]", "Item12"); |
173 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------"); | 179 shouldBeEqualToString("itemsWithCustomContextMenu[15]", "---------"); |
174 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13"); | 180 shouldBeEqualToString("itemsWithCustomContextMenu[16]", "Item13"); |
| 181 shouldBeEqualToString("itemsWithCustomContextMenu[17]", "Item14"); |
| 182 shouldBeEqualToString("itemsWithCustomContextMenu[18]", "*Item15"); |
| 183 shouldBeEqualToString("itemsWithCustomContextMenu[19]", "Item16"); |
175 shouldBeEqualToNumber("items1.length - items.length", 0); | 184 shouldBeEqualToNumber("items1.length - items.length", 0); |
176 shouldBeEqualToNumber("items2.length - items.length", 0); | 185 shouldBeEqualToNumber("items2.length - items.length", 0); |
177 shouldBeEqualToNumber("items3.length - items.length", 0); | 186 shouldBeEqualToNumber("items3.length - items.length", 0); |
178 shouldBeEqualToNumber("items4.length - items.length", 0); | 187 shouldBeEqualToNumber("items4.length - items.length", 0); |
179 shouldBeEqualToNumber("items5.length - items.length", 3); | 188 shouldBeEqualToNumber("items5.length - items.length", 3); |
180 shouldBeEqualToString("items5[0]", "Item1"); | 189 shouldBeEqualToString("items5[0]", "Item1"); |
181 shouldBeEqualToString("items5[1]", "Item2"); | 190 shouldBeEqualToString("items5[1]", "Item2"); |
182 shouldBeEqualToString("items5[2]", "Item3"); | 191 shouldBeEqualToString("items5[2]", "Item3"); |
183 | 192 |
184 </script> | 193 </script> |
OLD | NEW |