[Files app] Fix up fake touch and right click events
Fix fakeTouchClick to only issue touch related events when emulating touch in the integration tests. The test helper function fakeTouchClick was issuing "mousedown" and "contextmenu" to make the only test using it to set the desired state. The actual problem in the test is that the fakeMouseRightClick helper function wasn't issuing "click" to trigger the correct event listener to set the desired state. Fix fakeMouseRightClick to issue all mouse events as it happens if real user interactions: * mouseover * mousedown * mouseup * click * contextmenu Refactor fakeMouseClick to receive an optional button to be able to re-use it for right-click. Test: browser_tests --gtest_filter="ContextMenu/FilesAppBrowserTest.Test/checkContextMenusForInputElements" Change-Id: I4eb6d93f46b5602256dc03fd49400b3e8e8aa6c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642751 Auto-Submit: Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#666143}
Showing
Please register or sign in to comment