Bug 1367415 - Test negative pointer-move coordinates for drag-and-drop; r?ato
MozReview-Commit-ID: 6ZGrji4kvfk
--- 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) \