Bug 1470646 - Update Wd tests to use WebDriver conforming platformName. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Sun, 24 Jun 2018 14:06:21 +0100
changeset 813594 dc59f5acbebf713478a759c3b1fda67327195d65
parent 813593 541f0cc2ef7a707ab605e56269231dc3aaac824f
push id114929
push userbmo:ato@sny.no
push dateTue, 03 Jul 2018 11:58:17 +0000
reviewerswhimboo
bugs1470646
milestone63.0a1
Bug 1470646 - Update Wd tests to use WebDriver conforming platformName. r?whimboo MozReview-Commit-ID: LCi2BgdMQLb
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/tests/actions/control_click.py
testing/web-platform/tests/webdriver/tests/actions/support/keys.py
testing/web-platform/tests/webdriver/tests/new_session/create_alwaysMatch.py
testing/web-platform/tests/webdriver/tests/set_window_rect/set.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -619883,17 +619883,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/actions/conftest.py": [
    "f366a25d9d5e35a2897413a265398bc7a54f7c44",
    "support"
   ],
   "webdriver/tests/actions/control_click.py": [
-   "341a8fbfe64f5231a91999768de0b44bba121122",
+   "cbe7cc08b4a991da0cce1dfefd96b25be3b50138",
    "wdspec"
   ],
   "webdriver/tests/actions/key.py": [
    "0b70d98a4558427666abbe9629a6cf42d69e2597",
    "wdspec"
   ],
   "webdriver/tests/actions/key_shortcuts.py": [
    "dbe27dd0b1625169fc8cc2055f8fb49d5a4a78d2",
@@ -619927,17 +619927,17 @@
    "b021866b542bd6d02171084343f676090378e878",
    "wdspec"
   ],
   "webdriver/tests/actions/support/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/actions/support/keys.py": [
-   "528ab8473914c14f9671d89b8a888d30162714ec",
+   "b06f684335c4ebb18ee8d0dd9e9b757f4cdcd52a",
    "support"
   ],
   "webdriver/tests/actions/support/mouse.py": [
    "bc7da107e5b897105dfa7405aa57cba7355854dc",
    "support"
   ],
   "webdriver/tests/actions/support/refine.py": [
    "0d244bffe67ef57be68aad99f1cbc7440ff80e27",
@@ -620323,17 +620323,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/new_session/conftest.py": [
    "72798e95422e70158c26b60aabc27a480bac8758",
    "support"
   ],
   "webdriver/tests/new_session/create_alwaysMatch.py": [
-   "b2783003e5e1a7d762a4340b33f65d6afd9b0e62",
+   "d0100b96ccdcc99bccd7bd611bd9df2f51c4a728",
    "wdspec"
   ],
   "webdriver/tests/new_session/create_firstMatch.py": [
    "a3f2156bea16ae9eb270794a2b5a0c1a39c3e631",
    "wdspec"
   ],
   "webdriver/tests/new_session/default_values.py": [
    "596830d45fc6c9f8a5ad1e91f79d580adf32ff54",
@@ -620391,17 +620391,17 @@
    "335f9e4ae5c406a90bf6a4431fefb629496ad767",
    "wdspec"
   ],
   "webdriver/tests/set_window_rect/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/set_window_rect/set.py": [
-   "79de443bc251f7effaa7c2ef3b95695f22db01c6",
+   "04161b59c5b144dd571dca3ef224595f9d4612f2",
    "wdspec"
   ],
   "webdriver/tests/set_window_rect/user_prompts.py": [
    "4ed66d05835d3ab229cb90928e0ca2a15ba08c8a",
    "wdspec"
   ],
   "webdriver/tests/status/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
--- a/testing/web-platform/tests/webdriver/tests/actions/control_click.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/control_click.py
@@ -13,17 +13,17 @@ def test_control_click(session, test_act
     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])
-    if os == "windows_nt":
+    if os == "windows":
         expected = [
             {"type": "mousemove"},
             {"type": "mousedown"},
             {"type": "mouseup"},
             {"type": "click"},
         ]
     else:
         expected = [
--- a/testing/web-platform/tests/webdriver/tests/actions/support/keys.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/support/keys.py
@@ -10,29 +10,27 @@
 #
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
 
-"""
-The Keys implementation.
-"""
+"""The Keys implementation."""
 
 from inspect import getmembers
 import sys
 
 
 class Keys(object):
     """
     Set of special keys codes.
 
-    See also https://w3c.github.io/webdriver/webdriver-spec.html#h-keyboard-actions
+    See also https://w3c.github.io/webdriver/#h-keyboard-actions
     """
 
     NULL = u"\ue000"
     CANCEL = u"\ue001"  # ^break
     HELP = u"\ue002"
     BACKSPACE = u"\ue003"
     TAB = u"\ue004"
     CLEAR = u"\ue005"
@@ -737,12 +735,12 @@ ALL_EVENTS = {
         "key": "ZenkakuHankaku",
         "location": 0,
         "meta": False,
         "shift": False,
         "value": u"\ue040",
     }
 }
 
-if sys.platform == 'darwin':
+if sys.platform == "mac":
     MODIFIER_KEY = Keys.META
 else:
     MODIFIER_KEY = Keys.CONTROL
--- a/testing/web-platform/tests/webdriver/tests/new_session/create_alwaysMatch.py
+++ b/testing/web-platform/tests/webdriver/tests/new_session/create_alwaysMatch.py
@@ -8,8 +8,9 @@ from tests.support.asserts import assert
 from tests.new_session.support.create import valid_data
 
 
 @pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data))
 def test_valid(new_session, add_browser_capabilites, key, value):
     response, _ = new_session({"capabilities": {
         "alwaysMatch": add_browser_capabilites({key: value})}})
     assert_success(response)
+
--- a/testing/web-platform/tests/webdriver/tests/set_window_rect/set.py
+++ b/testing/web-platform/tests/webdriver/tests/set_window_rect/set.py
@@ -329,25 +329,25 @@ def test_negative_x_y(session):
         assert rect["x"] <= 0
         assert rect["y"] <= 0
         assert rect["width"] == original["width"]
         assert rect["height"] == original["height"]
 
     # On macOS, windows can only be moved off the screen on the
     # horizontal axis.  The system menu bar also blocks windows from
     # being moved to (0,0).
-    elif os == "darwin":
+    elif os == "mac":
         assert_success(response, {"x": -8,
                                   "y": 23,
                                   "width": original["width"],
                                   "height": original["height"]})
 
     # It turns out that Windows is the only platform on which the
     # window can be reliably positioned off-screen.
-    elif os == "windows_nt":
+    elif os == "windows":
         assert_success(response, {"x": -8,
                                   "y": -8,
                                   "width": original["width"],
                                   "height": original["height"]})
 
 
 def test_move_to_same_position(session):
     original_position = session.window.position