| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 <script src="../dom/resources/event-sender-util.js"></script> | 4 <script src="../dom/resources/event-sender-util.js"></script> |
| 5 <script> | 5 <script> |
| 6 description('This test checks if contextmenu event target is correct when handle
d at the document level and in the' + | 6 description('This test checks if contextmenu event target is correct when handle
d at the document level and in the' + |
| 7 ' presence of pinch-zoom. To test manually, first pinch-zoom into th
e page, scroll away from the origin' + | 7 ' presence of pinch-zoom. To test manually, first pinch-zoom into th
e page, scroll away from the origin' + |
| 8 ' and then then press the menu key. There are three cases to check:
nothing focused (the context menu is' + | 8 ' and then then press the menu key. There are three cases to check:
nothing focused (the context menu is' + |
| 9 ' expected to appear in the top left of the viewport), click on the
orange box to focus it then use the' + | 9 ' expected to appear in the top left of the viewport), click on the
orange box to focus it then use the' + |
| 10 ' menu key, and select some text in the box and use the menu key. No
te: on Mac there is no menu key.'); | 10 ' menu key, and select some text in the box and use the menu key. No
te: on Mac there is no menu key.'); |
| 11 | 11 |
| 12 // Visual Viewport will be at the bottom right quadrant of the page. | 12 // Visual Viewport will be at the bottom right quadrant of the page. |
| 13 var visualViewportContentX = 400; | 13 var visualViewportContentX = 400; |
| 14 var visualViewportContentY = 300; | 14 var visualViewportContentY = 300; |
| 15 var scale = 2; | 15 var scale = 2; |
| 16 | 16 |
| 17 // Should match the static const in EventHandler::sendContextMenuEventForKey | 17 // Should match the static const in EventHandler::ShowNonLocatedContextMenu |
| 18 var kContextMenuMargin = 1; | 18 var kContextMenuMargin = 1; |
| 19 | 19 |
| 20 var expectedX; | 20 var expectedX; |
| 21 var expectedY; | 21 var expectedY; |
| 22 var expectedScreenX; | 22 var expectedScreenX; |
| 23 var expectedScreenY; | 23 var expectedScreenY; |
| 24 var event; | 24 var event; |
| 25 | 25 |
| 26 var anchor; | 26 var anchor; |
| 27 var textbox; | 27 var textbox; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 background-color: orange; | 125 background-color: orange; |
| 126 position: absolute; | 126 position: absolute; |
| 127 top: 380px; | 127 top: 380px; |
| 128 left: 530px; | 128 left: 530px; |
| 129 height: 100px; | 129 height: 100px; |
| 130 width: 100px; | 130 width: 100px; |
| 131 } | 131 } |
| 132 </style> | 132 </style> |
| 133 <div id="anchor" tabindex="0">Target</div> | 133 <div id="anchor" tabindex="0">Target</div> |
| 134 <div id="console"></div> | 134 <div id="console"></div> |
| OLD | NEW |