OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <script> | 6 <script> |
7 | 7 |
8 description("Tests the contextmenu attribute."); | 8 description("Tests the contextmenu attribute."); |
9 | 9 |
10 debug("Test with valid contextmenu attribute"); | 10 debug("Test with valid contextmenu attribute"); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 debug("Test setting contextmenu attribute to menu element which is in shadow dom
"); | 117 debug("Test setting contextmenu attribute to menu element which is in shadow dom
"); |
118 document.write("<div id='container10'></div>"); | 118 document.write("<div id='container10'></div>"); |
119 var menu5 = document.createElement('menu'); | 119 var menu5 = document.createElement('menu'); |
120 menu5.id = 'menu_in_shadow_dom'; | 120 menu5.id = 'menu_in_shadow_dom'; |
121 menu5.label = 'menu in shadow dom'; | 121 menu5.label = 'menu in shadow dom'; |
122 var container10 = document.getElementById('container10'); | 122 var container10 = document.getElementById('container10'); |
123 container10.createShadowRoot().appendChild(menu5); | 123 container10.createShadowRoot().appendChild(menu5); |
124 container10.contextMenu = menu5; | 124 container10.contextMenu = menu5; |
125 shouldBeNull("container10.contextMenu"); | 125 shouldBeNull("container10.contextMenu"); |
126 | 126 |
| 127 debug("Test contextmenu attribute of an element with no contextmenu attribute bu
t parent has valid contextmenu"); |
| 128 document.write("<div contextmenu='menu7'><button id='inner'></button><menu id='m
enu7' type='popup' label='menu 7'></menu></div>"); |
| 129 var inner = document.getElementById('inner'); |
| 130 shouldBeNull("inner.contextMenu"); |
127 </script> | 131 </script> |
128 </html> | 132 </html> |
OLD | NEW |