Bug 1367415 - Test negative pointer-move coordinates for drag-and-drop; r?ato draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Wed, 24 May 2017 15:33:05 +0200
changeset 583706 6ae6f22c4609bc322b269bc4ed50dfebcba87252
parent 583207 1ce55499e8193d53aeff91546b16e0c580ebd6f1
child 630164 29b862efa25839d2340bcce3ab7e70035d40ded2
push id60506
push userbmo:mjzffr@gmail.com
push dateWed, 24 May 2017 13:37:08 +0000
reviewersato
bugs1367415
milestone55.0a1
Bug 1367415 - Test negative pointer-move coordinates for drag-and-drop; r?ato MozReview-Commit-ID: 6ZGrji4kvfk
testing/web-platform/tests/webdriver/actions/mouse.py
--- a/testing/web-platform/tests/webdriver/actions/mouse.py
+++ b/testing/web-platform/tests/webdriver/actions/mouse.py
@@ -83,17 +83,18 @@ def test_click_navigation(session, url):
     assert session.url == destination
     # repeat steps to check behaviour after document unload
     session.url = start
     click(session.find.css("#link", all=False))
     assert session.url == destination
 
 
 @pytest.mark.parametrize("drag_duration", [0, 300, 800])
-@pytest.mark.parametrize("dx, dy", [(20, 0), (0, 15), (10, 15)])
+@pytest.mark.parametrize("dx, dy",
+    [(20, 0), (0, 15), (10, 15), (-20, 0), (10, -15), (-10, -15)])
 def test_drag_and_drop(session, test_actions_page, mouse_chain, dx, dy, drag_duration):
     drag_target = session.find.css("#dragTarget", all=False)
     initial_rect = drag_target.rect
     initial_center = get_center(initial_rect)
     # Conclude chain with extra move to allow time for last queued
     # coordinate-update of drag_target and to test that drag_target is "dropped".
     mouse_chain \
         .pointer_move(0, 0, origin=drag_target) \