Bug 1397187 - Split webdriver actions sequence tests into two files; r?jgraham draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Tue, 24 Oct 2017 19:03:30 -0400
changeset 685623 b40c5294dd9c5edabd2c17fb84dc1300fa60e92d
parent 685608 a124f4901430f6db74cfc7fe3b07957a1c691b40
child 737217 dee93e87cb448827b37f4197cbd3601e2195152d
push id86004
push userbmo:mjzffr@gmail.com
push dateTue, 24 Oct 2017 23:21:43 +0000
reviewersjgraham
bugs1397187
milestone58.0a1
Bug 1397187 - Split webdriver actions sequence tests into two files; r?jgraham MozReview-Commit-ID: IYO7uxcFMzR
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/tests/actions/ctrl_click.py
testing/web-platform/tests/webdriver/tests/actions/sequence.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -409320,16 +409320,24 @@
    "css/vendor-imports/mozilla/mozilla-central-reftests/text3/text-align-match-parent-01.html": [
     [
      "/css/vendor-imports/mozilla/mozilla-central-reftests/text3/text-align-match-parent-01.html",
      {}
     ]
    ]
   },
   "wdspec": {
+   "webdriver/tests/actions/ctrl_click.py": [
+    [
+     "/webdriver/tests/actions/ctrl_click.py",
+     {
+      "timeout": "long"
+     }
+    ]
+   ],
    "webdriver/tests/actions/key.py": [
     [
      "/webdriver/tests/actions/key.py",
      {}
     ]
    ],
    "webdriver/tests/actions/mouse.py": [
     [
@@ -417096,17 +417104,17 @@
    "11f3665ec4c491e3c4806c2be17578ccbcaf7840",
    "testharness"
   ],
   "XMLHttpRequest/open-url-base.htm": [
    "d2c5d8d1696112b771a332011c4f33065817ed9a",
    "testharness"
   ],
   "XMLHttpRequest/open-url-encoding.htm": [
-   "ead2b1f6235cdf8e912214ce24f6d23262d2c826",
+   "a36c7b0e5919af7842883582ef9fc415d8f7ef25",
    "testharness"
   ],
   "XMLHttpRequest/open-url-fragment.htm": [
    "79ebcd0817679394df3c8c162fcf56cd91d98c83",
    "testharness"
   ],
   "XMLHttpRequest/open-url-javascript-window-2.htm": [
    "de6712f1db65e2886599d653a253197254b2c0f2",
@@ -614568,33 +614576,33 @@
    "7b2db8cf30a51490b452a5341dd5e067d0d59bf0",
    "manual"
   ],
   "pointerevents/pointerevent_styles.css": [
    "ce90dd7b3d8b71259c0581c8006fa7b93bc2e925",
    "support"
   ],
   "pointerevents/pointerevent_support.js": [
-   "f2ab5ea976ffd62c669fda2db1484a4733ce5b28",
+   "f3e21bc91b635f59e14c40535ad52b5d9d9df46d",
    "support"
   ],
   "pointerevents/pointerevent_suppress_compat_events_on_click-manual.html": [
    "b092020fd1c385777ed8d8dd9ce1c27c75df5d9d",
    "manual"
   ],
   "pointerevents/pointerevent_suppress_compat_events_on_drag_mouse-manual.html": [
    "074ac2e1e75c974a49f4615924986c7695656094",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-auto-css_touch-manual.html": [
    "7f85ab27d3cc8817ed82392224ece53814b359d3",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-button-test_touch-manual.html": [
-   "5da2686dec322631f63640e4699431d7581d2f5f",
+   "a3f832ef68df2d970d74c0ac2f5e45627005b89e",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-illegal.html": [
    "4691ac4c273d8a2bd9aa9f227d5a78b9070def88",
    "testharness"
   ],
   "pointerevents/pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html": [
    "6789c0cb23bd2626beeb74d840c5cdd86e6d8dd8",
@@ -614664,25 +614672,25 @@
    "0d656f37a7307047b07f59ed340a82d9a33a5b87",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-rotated-divs_touch-manual.html": [
    "e34340964c74ac0601911de3ac3b260db6ad620d",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-span-test_touch-manual.html": [
-   "666e92e9be855d1290e97f1c732e021a98c666de",
+   "b5b3785a0063b605b27ae735190e36a06dcd25c3",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-svg-test_touch-manual.html": [
    "6f1f8e4584ee23186f7be95c24e68ab112b9ed73",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-table-test_touch-manual.html": [
-   "a6a9c6da496d34a2e937ace1424120ee790eba24",
+   "5a8575522ab6868dc5235ace1e052a3f8320724d",
    "manual"
   ],
   "pointerevents/pointerevent_touch-action-verification.html": [
    "c2c952d562f601f2104014f6236368a7f6b84801",
    "testharness"
   ],
   "pointerevents/pointerlock/pointerevent_movementxy-manual.html": [
    "09da177c312d4112bc0177221cccaf787455db7e",
@@ -631196,17 +631204,17 @@
    "b01c7c5145c183fdca80dec4ca1966b0f72a7003",
    "testharness"
   ],
   "web-animations/interfaces/Animatable/animate-no-browsing-context.html": [
    "3a5538db728127970721e20e3b2eaea59fac3afc",
    "testharness"
   ],
   "web-animations/interfaces/Animatable/animate.html": [
-   "20339be998b601f34e6b4d676c681ce3a16a464e",
+   "99868d179c69091aa63631a27d98df4ee957a746",
    "testharness"
   ],
   "web-animations/interfaces/Animatable/getAnimations.html": [
    "92503fce725fcffce188df9c8e1da9d9ca281213",
    "testharness"
   ],
   "web-animations/interfaces/Animation/cancel.html": [
    "a28589129c6a2665295695f786b7beb2dd887fb3",
@@ -631324,17 +631332,17 @@
    "3a626b145f4eb77e816b9020f6fc67630088a00b",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/composite.html": [
    "2580086b2da9b29d1645484c5ad4e59636a370e5",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/constructor.html": [
-   "d382ddbbd6d9f84322d1a3e7b29e0c93f921e4fe",
+   "29fec0789ccb59ee62d433056038c14ade0eaa9b",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/copy-constructor.html": [
    "e1dfb5c05807a37974ecce98bb8c683cc291bfe4",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/getComputedTiming.html": [
    "c9dcf7c17010e5495007e000b33aeb4dc89f92b7",
@@ -631348,17 +631356,17 @@
    "83e58d986208b6cbc51e4124a2b17269a26e0520",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html": [
    "38b350320a08cc2a9ae4449944eea427bfbe6f9d",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/setKeyframes.html": [
-   "8ef313bf46f963a5c0497374a058d05b702e7e11",
+   "477e983fcef02361c305918d10a67f2909cfa561",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/setTarget.html": [
    "8c75e6605a134c96e261e5383414b7e15b32d121",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffectReadOnly/copy-constructor.html": [
    "8ef986f13e7fe7ffeb7403f647b4169ac0d6a138",
@@ -631368,21 +631376,21 @@
    "c255d606d00296b4c6957435773a20a9d8d0bd0b",
    "support"
   ],
   "web-animations/resources/effect-tests.js": [
    "aed87c03ac50e534532855612a7bb05092a7e4e7",
    "support"
   ],
   "web-animations/resources/keyframe-tests.js": [
-   "d19e526bb655bc21bbb1434404fa7fc094f3d593",
+   "52ffc50c4ebf0326db8f4e1d0cc1234f6c860dc2",
    "support"
   ],
   "web-animations/resources/keyframe-utils.js": [
-   "486e975e10a00c6e01e9c930ef5581f498a2ddb5",
+   "08da0c81847809328bda0d6e0581711f7838916e",
    "support"
   ],
   "web-animations/resources/xhr-doc.py": [
    "de68c45fc1d38a49946f9046f34031e9278a1531",
    "support"
   ],
   "web-animations/testcommon.js": [
    "d057ad66c4561ef32f83770e4948f2019da89d48",
@@ -631604,17 +631612,17 @@
    "230684ec60fd2e408f9b6014417f3eddfe2dc95a",
    "support"
   ],
   "webaudio/js/buffer-loader.js": [
    "4d564eae0b3d7d1045626d1f144cd2638dba64e5",
    "support"
   ],
   "webaudio/js/helpers.js": [
-   "dff18a7e57adb3847b70fa7f1f3752b591b38d6e",
+   "3cb468605c1fa8e5005bc8552b15f7a37ee9b935",
    "support"
   ],
   "webaudio/js/lodash.js": [
    "58c3eae918fedad54c56d488a14f99ce87943500",
    "support"
   ],
   "webaudio/js/vendor-prefixes.js": [
    "3b7d06164273077415b7fc99652355bcf0e10e17",
@@ -631632,29 +631640,29 @@
    "1bea5d5d8983a3505328f6878bfe09c20c25aa8c",
    "support"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analyser-gain.html": [
-   "c3f5f5969ed0ab58a9df332196e138aef8e693f3",
+   "e2320e33ef1df0155d5fcf536550e0e398b15407",
    "testharness"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analyser-minimum.html": [
-   "cfbeb7283e7375974943ccf689cca73942e6259f",
+   "26282412113f6298a90a2cac963a2b0de03ef43d",
    "testharness"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analyser-output.html": [
-   "f27d081b9b3df8af7449f130a455b90c6e93ca7b",
+   "2d9f397414f8d7b2b4c2da05d4476cd5d2ce9230",
    "testharness"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analyser-scale.html": [
-   "1909a2970f0529ad0433c8e6e75733695d44d3e0",
+   "cb51b46db5e572c52502dc0dce465927fb3a2b87",
    "testharness"
   ],
   "webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [
    "8478aa405a4641a9c47554529762e85a37d7593a",
    "testharness"
   ],
   "webaudio/the-audio-api/the-audiobuffer-interface/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@@ -631879,26 +631887,30 @@
   "webdriver/tests/actions/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/actions/conftest.py": [
    "ebdbe326fd2fc53a3522b846505808496407b5b8",
    "support"
   ],
+  "webdriver/tests/actions/ctrl_click.py": [
+   "3853096d332f4dd3a39436736cb141d5e8e4f348",
+   "wdspec"
+  ],
   "webdriver/tests/actions/key.py": [
    "69542dc107d881bf18dfff3203bfd7a9ec31b4ad",
    "wdspec"
   ],
   "webdriver/tests/actions/mouse.py": [
    "d7af66e45c8e306b4258b92c54ed86073fd21c8d",
    "wdspec"
   ],
   "webdriver/tests/actions/sequence.py": [
-   "4244635ccbab0920eba8a2fa88645fa7333df363",
+   "970be95892e528c60ace38ea09398019019ca8c7",
    "wdspec"
   ],
   "webdriver/tests/actions/special_keys.py": [
    "3b10143dea60567f30b4ab6c544e005d02f31fc3",
    "wdspec"
   ],
   "webdriver/tests/actions/support/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webdriver/tests/actions/ctrl_click.py
@@ -0,0 +1,74 @@
+# META: timeout=long
+
+import pytest
+
+from tests.actions.support.refine import filter_dict, get_events
+from tests.actions.support.keys import Keys
+
+
+@pytest.mark.parametrize("modifier, prop", [
+    (Keys.CONTROL, "ctrlKey"),
+    (Keys.ALT, "altKey"),
+    (Keys.META, "metaKey"),
+    (Keys.SHIFT, "shiftKey"),
+    (Keys.R_CONTROL, "ctrlKey"),
+    (Keys.R_ALT, "altKey"),
+    (Keys.R_META, "metaKey"),
+    (Keys.R_SHIFT, "shiftKey"),
+])
+def test_control_click(session,
+                       test_actions_page,
+                       key_chain,
+                       mouse_chain,
+                       modifier,
+                       prop):
+    key_chain \
+        .pause(0) \
+        .key_down(modifier) \
+        .pause(200) \
+        .key_up(modifier)
+    outer = session.find.css("#outer", all=False)
+    mouse_chain.click(element=outer)
+    session.actions.perform([key_chain.dict, mouse_chain.dict])
+    expected = [
+        {"type": "mousemove"},
+        {"type": "mousedown"},
+        {"type": "mouseup"},
+        {"type": "click"},
+    ]
+    defaults = {
+        "altKey": False,
+        "metaKey": False,
+        "shiftKey": False,
+        "ctrlKey": False
+    }
+    for e in expected:
+        e.update(defaults)
+        if e["type"] != "mousemove":
+            e[prop] = True
+    filtered_events = [filter_dict(e, expected[0]) for e in get_events(session)]
+    assert expected == filtered_events
+
+
+def test_release_control_click(session, key_reporter, key_chain, mouse_chain):
+    key_chain \
+        .pause(0) \
+        .key_down(Keys.CONTROL)
+    mouse_chain \
+        .pointer_move(0, 0, origin=key_reporter) \
+        .pointer_down()
+    session.actions.perform([key_chain.dict, mouse_chain.dict])
+    session.execute_script("""
+        var keyReporter = document.getElementById("keys");
+        ["mousedown", "mouseup"].forEach((e) => {
+            keyReporter.addEventListener(e, recordPointerEvent);
+          });
+        resetEvents();
+    """)
+    session.actions.release()
+    expected = [
+        {"type": "mouseup"},
+        {"type": "keyup"},
+    ]
+    events = [filter_dict(e, expected[0]) for e in get_events(session)]
+    assert events == expected
--- a/testing/web-platform/tests/webdriver/tests/actions/sequence.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/sequence.py
@@ -1,12 +1,10 @@
 # META: timeout=long
 
-import pytest
-
 from tests.actions.support.refine import get_keys, filter_dict, get_events
 from tests.actions.support.keys import Keys
 
 
 def test_no_actions_send_no_events(session, key_reporter, key_chain):
     key_chain.perform()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
@@ -31,84 +29,16 @@ def test_release_char_sequence_sends_key
 
 
 def test_release_no_actions_sends_no_events(session, key_reporter):
     session.actions.release()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
 
 
-@pytest.mark.parametrize("modifier, prop", [
-    (Keys.CONTROL, "ctrlKey"),
-    (Keys.ALT, "altKey"),
-    (Keys.META, "metaKey"),
-    (Keys.SHIFT, "shiftKey"),
-    (Keys.R_CONTROL, "ctrlKey"),
-    (Keys.R_ALT, "altKey"),
-    (Keys.R_META, "metaKey"),
-    (Keys.R_SHIFT, "shiftKey"),
-])
-def test_control_click(session,
-                       test_actions_page,
-                       key_chain,
-                       mouse_chain,
-                       modifier,
-                       prop):
-    key_chain \
-        .pause(0) \
-        .key_down(modifier) \
-        .pause(200) \
-        .key_up(modifier)
-    outer = session.find.css("#outer", all=False)
-    mouse_chain.click(element=outer)
-    session.actions.perform([key_chain.dict, mouse_chain.dict])
-    expected = [
-        {"type": "mousemove"},
-        {"type": "mousedown"},
-        {"type": "mouseup"},
-        {"type": "click"},
-    ]
-    defaults = {
-        "altKey": False,
-        "metaKey": False,
-        "shiftKey": False,
-        "ctrlKey": False
-    }
-    for e in expected:
-        e.update(defaults)
-        if e["type"] != "mousemove":
-            e[prop] = True
-    filtered_events = [filter_dict(e, expected[0]) for e in get_events(session)]
-    assert expected == filtered_events
-
-
-def test_release_control_click(session, key_reporter, key_chain, mouse_chain):
-    key_chain \
-        .pause(0) \
-        .key_down(Keys.CONTROL)
-    mouse_chain \
-        .pointer_move(0, 0, origin=key_reporter) \
-        .pointer_down()
-    session.actions.perform([key_chain.dict, mouse_chain.dict])
-    session.execute_script("""
-        var keyReporter = document.getElementById("keys");
-        ["mousedown", "mouseup"].forEach((e) => {
-            keyReporter.addEventListener(e, recordPointerEvent);
-          });
-        resetEvents();
-    """)
-    session.actions.release()
-    expected = [
-        {"type": "mouseup"},
-        {"type": "keyup"},
-    ]
-    events = [filter_dict(e, expected[0]) for e in get_events(session)]
-    assert events == expected
-
-
 def test_many_modifiers_click(session, test_actions_page, key_chain, mouse_chain):
     outer = session.find.css("#outer", all=False)
     key_chain \
         .pause(0) \
         .key_down(Keys.CONTROL) \
         .key_down(Keys.SHIFT) \
         .pause(0) \
         .key_up(Keys.CONTROL) \