Bug 1475279 - Remove copy-pasted algorithmic steps from wdspec tests. r=automatedtester
authorAndreas Tolfsen <ato@sny.no>
Thu, 12 Jul 2018 17:17:55 +0100
changeset 821994 e9d0102d718ffcb48ecf4882528d69e1c3946893
parent 821993 666d7dc7a32cbcacb8ef4b0120cf849a7ca8a911
child 821995 a7ca17a2c4c7305a37ecddd2f75508b5f419ecb7
child 822019 92ca61f5c4cd30ef7f8c83c96eb523cc573ca004
child 822036 99437134717bb9df35a7b70c493c3166319aad44
push id117242
push userrwood@mozilla.com
push dateTue, 24 Jul 2018 13:33:52 +0000
reviewersautomatedtester
bugs1475279
milestone63.0a1
Bug 1475279 - Remove copy-pasted algorithmic steps from wdspec tests. r=automatedtester We agreed some time ago that it would not be possible to keep the copy-pasted specification algorithm steps up-to-date in the WPT wdspec tests. This patch removes all such steps.
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/tests/accept_alert/accept.py
testing/web-platform/tests/webdriver/tests/dismiss_alert/dismiss.py
testing/web-platform/tests/webdriver/tests/fullscreen_window/fullscreen.py
testing/web-platform/tests/webdriver/tests/get_alert_text/get.py
testing/web-platform/tests/webdriver/tests/get_current_url/get.py
testing/web-platform/tests/webdriver/tests/get_element_tag_name/get.py
testing/web-platform/tests/webdriver/tests/get_timeouts/get.py
testing/web-platform/tests/webdriver/tests/get_window_rect/get.py
testing/web-platform/tests/webdriver/tests/is_element_selected/selected.py
testing/web-platform/tests/webdriver/tests/maximize_window/maximize.py
testing/web-platform/tests/webdriver/tests/minimize_window/minimize.py
testing/web-platform/tests/webdriver/tests/send_alert_text/send.py
testing/web-platform/tests/webdriver/tests/set_window_rect/set.py
testing/web-platform/tests/webdriver/tests/status/status.py
testing/web-platform/tests/webdriver/tests/support/asserts.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -184506,16 +184506,28 @@
       [
        "/svg/linking/reftests/use-descendant-combinator-ref.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "svg/linking/reftests/use-descendant-combinator-003.html": [
+    [
+     "/svg/linking/reftests/use-descendant-combinator-003.html",
+     [
+      [
+       "/svg/linking/reftests/use-descendant-combinator-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "svg/painting/currentColor-override-pserver-fallback.svg": [
     [
      "/svg/painting/currentColor-override-pserver-fallback.svg",
      [
       [
        "/svg/painting/currentColor-override-pserver-fallback-ref.svg",
        "=="
       ]
@@ -184542,28 +184554,16 @@
       [
        "/svg/painting/currentColor-override-pserver-stroke-ref.svg",
        "=="
       ]
      ],
      {}
     ]
    ],
-   "svg/linking/reftests/use-descendant-combinator-003.html": [
-    [
-     "/svg/linking/reftests/use-descendant-combinator-003.html",
-     [
-      [
-       "/svg/linking/reftests/use-descendant-combinator-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "svg/painting/reftests/paint-context-001.svg": [
     [
      "/svg/painting/reftests/paint-context-001.svg",
      [
       [
        "/svg/painting/reftests/paint-context-001-ref.svg",
        "=="
       ]
@@ -439003,17 +439003,17 @@
    "ff8d1c26701d15164bcb549d42937825e1f0edd0",
    "testharness"
   ],
   "content-security-policy/securitypolicyviolation/idl.html": [
    "266180135d8167bc47d6c7a73798e87aa1082bee",
    "testharness"
   ],
   "content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html": [
-   "e338e94ea726419db64ed5b98c95b862c394409e",
+   "f6623c80b2b4be3fd9dd0f5dc0a6417652f1b797",
    "testharness"
   ],
   "content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html.headers": [
    "960ee8a9f7ccf33ea435890e2eae0e68399f32ed",
    "support"
   ],
   "content-security-policy/securitypolicyviolation/inside-dedicated-worker.html": [
    "46d18c97d554716b714856c00bdc49388d211868",
@@ -439055,17 +439055,17 @@
    "b2d6d11fc189d78f5ea623c52e1d1f64fe53a772",
    "testharness"
   ],
   "content-security-policy/securitypolicyviolation/style-sample.html": [
    "e570217f560f6e7a8917e79266ac9d2e8ea078f6",
    "testharness"
   ],
   "content-security-policy/securitypolicyviolation/support/inside-worker.sub.js": [
-   "f425a7ae6c167bfe9857f08f460897e16bf6ca95",
+   "d94662579190653a3b3e9d076b79d7b0f01f2dc7",
    "support"
   ],
   "content-security-policy/securitypolicyviolation/support/inside-worker.sub.js.headers": [
    "ac19897e2693ba3228640d03c770cd5a33c51381",
    "support"
   ],
   "content-security-policy/securitypolicyviolation/support/testharness-helper.sub.js": [
    "71244cc74fa8f8ee8082c876264e053348905fbd",
@@ -619078,16 +619078,20 @@
   "svg/linking/reftests/use-descendant-combinator-001.html": [
    "323fde648ee2d065bfd945a2c4d5be86f1c308ff",
    "reftest"
   ],
   "svg/linking/reftests/use-descendant-combinator-002.html": [
    "3d51ca0fc007d52147e7ea03493cac7ee1bb7903",
    "reftest"
   ],
+  "svg/linking/reftests/use-descendant-combinator-003.html": [
+   "d9155d3b92ecf0735f82ed9a0f2a8fd3fc380d55",
+   "reftest"
+  ],
   "svg/linking/reftests/use-descendant-combinator-ref.html": [
    "fb8aec792684b97151d2964b85d1e70829e141ad",
    "support"
   ],
   "svg/linking/scripted/href-animate-element.html": [
    "c224f6b609079f31c256625417e4677b21b5f71a",
    "testharness"
   ],
@@ -622183,17 +622187,17 @@
    "c95130e1f0226d18fcdd9dc9d5795395d6de586f",
    "support"
   ],
   "webaudio/README.md": [
    "230684ec60fd2e408f9b6014417f3eddfe2dc95a",
    "support"
   ],
   "webaudio/historical.html": [
-   "93068df297042344669093ce899f0230c87ebf54",
+   "c6e3c7d6751731c708edfb0f4e32df8a6a3b80b0",
    "testharness"
   ],
   "webaudio/idlharness.https.html": [
    "0403de985b3346240ba1d4b465a8e0838f3860bc",
    "testharness"
   ],
   "webaudio/js/buffer-loader.js": [
    "4d564eae0b3d7d1045626d1f144cd2638dba64e5",
@@ -623183,17 +623187,17 @@
    "b2ebe4b632b1a75e7334b97c3df7075f494dd5c6",
    "support"
   ],
   "webdriver/tests/accept_alert/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/accept_alert/accept.py": [
-   "528149429fbb7da35a52d4b4c0e6839f170d0fac",
+   "4e7aa9a134f1b0f0c601c76dab0713c90fe99e5d",
    "wdspec"
   ],
   "webdriver/tests/actions/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/actions/conftest.py": [
    "f366a25d9d5e35a2897413a265398bc7a54f7c44",
@@ -623319,17 +623323,17 @@
    "7a0daf0ff25eec988dc0a5260a36cb60c8e13703",
    "wdspec"
   ],
   "webdriver/tests/dismiss_alert/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/dismiss_alert/dismiss.py": [
-   "33b32f41d9078f7d317aed837f1fc05f443bd034",
+   "897eb917255a8de21c592ac67ef4793f83f70b9e",
    "wdspec"
   ],
   "webdriver/tests/element_clear/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/element_clear/clear.py": [
    "aa785499dc4a68650d08c829deef8aa23d073d09",
@@ -623491,17 +623495,17 @@
    "558f686e715eab83f2979c4ac772472b7eb91432",
    "wdspec"
   ],
   "webdriver/tests/fullscreen_window/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/fullscreen_window/fullscreen.py": [
-   "8a6e06b2fbd2ec80326ab1145e6ddfb35c6995b4",
+   "66966ba50de3867b8ff9720ee6f2310af164a5f8",
    "wdspec"
   ],
   "webdriver/tests/fullscreen_window/user_prompts.py": [
    "7b8f39c4d87abf5acaf63ba55ef5ac72b2537a4b",
    "wdspec"
   ],
   "webdriver/tests/get_active_element/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@@ -623511,25 +623515,25 @@
    "6d48b8577c9edf5f1e39fae461831de742ff9dd8",
    "wdspec"
   ],
   "webdriver/tests/get_alert_text/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_alert_text/get.py": [
-   "f3bf7edd86c94e82c4d09973d4a4c7b35c3fa681",
+   "644d1f38dd28a63816c624ad59f2669305c7da33",
    "wdspec"
   ],
   "webdriver/tests/get_current_url/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_current_url/get.py": [
-   "f65054e80f7ddc9a7b8600765929935355b5f447",
+   "dd56543a2c7a713b4a50fb91e12019c571c95050",
    "wdspec"
   ],
   "webdriver/tests/get_current_url/user_prompts.py": [
    "510a4629fcfe5cc08eb4c6f0af4f92b2d3b08452",
    "wdspec"
   ],
   "webdriver/tests/get_element_attribute/get.py": [
    "3fdd451b8aa73729f25325cb0e43ae389a223ee7",
@@ -623547,17 +623551,17 @@
    "cbf65767256f65ac9ea3df09f46fb2b39d5c01b2",
    "wdspec"
   ],
   "webdriver/tests/get_element_tag_name/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_element_tag_name/get.py": [
-   "66a0b57c29a006b1200e63239a4ea5f8cb90c1bd",
+   "ccb051666249b25632abde44473206fc44414d9f",
    "wdspec"
   ],
   "webdriver/tests/get_element_tag_name/user_prompts.py": [
    "9e16c0b4bf7162d67564dbbe950220e63f1c23d3",
    "wdspec"
   ],
   "webdriver/tests/get_element_text/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@@ -623575,17 +623579,17 @@
    "a3116e826f4db0221224ccb9a0e0d71ecb1f9a85",
    "wdspec"
   ],
   "webdriver/tests/get_timeouts/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_timeouts/get.py": [
-   "b1d170df31bf2b715a9da639cc3c833dde0a43d6",
+   "1866835e93f21ce1a194257616342b03d59f50da",
    "wdspec"
   ],
   "webdriver/tests/get_title/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_title/get.py": [
    "69a3e55d2f34dc02285af89d78a75d46e7d1282c",
@@ -623595,57 +623599,57 @@
    "a2510586b8019c9000f1db10a86a9be7314dfe97",
    "wdspec"
   ],
   "webdriver/tests/get_window_rect/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_window_rect/get.py": [
-   "8d687026889e601f4c1987996f4e5306b0f627f9",
+   "e25d580d7cf1e1d47c41f77c9988eafb969d6ac8",
    "wdspec"
   ],
   "webdriver/tests/get_window_rect/user_prompts.py": [
    "4c811c269596378a9a7e174982fae83c57b0edae",
    "wdspec"
   ],
   "webdriver/tests/interface.html": [
    "0b88587deabc7a4577da90bdf6d874e596b9a240",
    "testharness"
   ],
   "webdriver/tests/is_element_selected/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/is_element_selected/selected.py": [
-   "afed5bfc86527410e0fb521f7f75d79bee1fb060",
+   "1344c13161977d3f7c3aa90f70c53e439dfc9d00",
    "wdspec"
   ],
   "webdriver/tests/is_element_selected/user_prompts.py": [
    "da2f9dddbbbed25b575d8053efc6a7cbab3c560d",
    "wdspec"
   ],
   "webdriver/tests/maximize_window/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/maximize_window/maximize.py": [
-   "be54b714b8d6c8f282ee896af4a449ccba4cd060",
+   "421f8e8099df3533dc2e7a0459b3e3505e770f36",
    "wdspec"
   ],
   "webdriver/tests/maximize_window/user_prompts.py": [
    "4613d592ac350d1dafd3e8f761f4e1b417dd4394",
    "wdspec"
   ],
   "webdriver/tests/minimize_window/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/minimize_window/minimize.py": [
-   "8b59610ffcbb4ab41a74f149dc74d415edfaf60f",
+   "5bc7f6f1d4df36a3606d025c2cabc5d82f1a3fb5",
    "wdspec"
   ],
   "webdriver/tests/minimize_window/user_prompts.py": [
    "ddc4ce653a0b7309bb40385a13d22320f7e125c2",
    "wdspec"
   ],
   "webdriver/tests/navigate_to/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@@ -623711,53 +623715,53 @@
    "15f800f47dcc793325dbd920b8253648072503cd",
    "wdspec"
   ],
   "webdriver/tests/send_alert_text/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/send_alert_text/send.py": [
-   "97c85c87bad0a09ec0ac97fb978e049e1b320283",
+   "a2304bcfae6e42a38702ae845a120ae22beb12c2",
    "wdspec"
   ],
   "webdriver/tests/set_timeouts/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/set_timeouts/set.py": [
    "335f9e4ae5c406a90bf6a4431fefb629496ad767",
    "wdspec"
   ],
   "webdriver/tests/set_window_rect/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/set_window_rect/set.py": [
-   "04161b59c5b144dd571dca3ef224595f9d4612f2",
+   "be268f96d8983e4a6d0855e150e56fdd168daa96",
    "wdspec"
   ],
   "webdriver/tests/set_window_rect/user_prompts.py": [
    "0ecb13dd4b57c26178f29dcfa06a1b3917e1299f",
    "wdspec"
   ],
   "webdriver/tests/status/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/status/status.py": [
-   "8a5e17655c8eca835f113533e8a57a233823cd83",
+   "7ca3a29103871a18695e7d64b8ebf5aa572b383f",
    "wdspec"
   ],
   "webdriver/tests/support/__init__.py": [
    "5a31a3917a5157516c10951a3b3d5ffb43b992d9",
    "support"
   ],
   "webdriver/tests/support/asserts.py": [
-   "6ef3c1f75dfafd0291ea0ef3f1e38b500ba91f6d",
+   "1a20207817cea93bb270fcd20568d7e62407f834",
    "support"
   ],
   "webdriver/tests/support/fixtures.py": [
    "e0c7db2a275c39af511cdb74492f6ee8f31cb219",
    "support"
   ],
   "webdriver/tests/support/http_request.py": [
    "cb40c781fea2280b98135522def5e6a116d7b946",
--- a/testing/web-platform/tests/webdriver/tests/accept_alert/accept.py
+++ b/testing/web-platform/tests/webdriver/tests/accept_alert/accept.py
@@ -11,43 +11,38 @@ def test_null_response_value(session, ur
     session.url = inline("<script>window.alert('Hello');</script>")
 
     response = accept_alert(session)
     value = assert_success(response)
     assert value is None
 
 
 def test_no_browsing_context(session, create_window):
-    # 18.2 step 1
     session.window_handle = create_window()
     session.close()
 
     response = accept_alert(session)
     assert_error(response, "no such window")
 
 
 def test_no_user_prompt(session):
-    # 18.2 step 2
     response = accept_alert(session)
     assert_error(response, "no such alert")
 
 
 def test_accept_alert(session):
-    # 18.2 step 3
     session.url = inline("<script>window.alert('Hello');</script>")
     response = accept_alert(session)
     assert_success(response)
 
 
 def test_accept_confirm(session):
-    # 18.2 step 3
     session.url = inline("<script>window.result = window.confirm('Hello');</script>")
     response = accept_alert(session)
     assert_success(response)
     assert session.execute_script("return window.result") is True
 
 
 def test_accept_prompt(session):
-    # 18.2 step 3
     session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Federer');</script>")
     response = accept_alert(session)
     assert_success(response)
     assert session.execute_script("return window.result") == "Federer"
--- a/testing/web-platform/tests/webdriver/tests/dismiss_alert/dismiss.py
+++ b/testing/web-platform/tests/webdriver/tests/dismiss_alert/dismiss.py
@@ -11,43 +11,38 @@ def test_null_response_value(session, ur
     session.url = inline("<script>window.alert('Hello');</script>")
 
     response = dismiss_alert(session)
     value = assert_success(response)
     assert value is None
 
 
 def test_no_browsing_context(session, create_window):
-    # 18.1 step 1
     session.window_handle = create_window()
     session.close()
 
     response = dismiss_alert(session)
     assert_error(response, "no such window")
 
 
 def test_no_user_prompt(session):
-    # 18.1 step 2
     response = dismiss_alert(session)
     assert_error(response, "no such alert")
 
 
 def test_dismiss_alert(session):
-    # 18.1 step 3
     session.url = inline("<script>window.alert('Hello');</script>")
     response = dismiss_alert(session)
     assert_success(response)
 
 
 def test_dismiss_confirm(session):
-    # 18.1 step 3
     session.url = inline("<script>window.result = window.confirm('Hello');</script>")
     response = dismiss_alert(session)
     assert_success(response)
     assert session.execute_script("return window.result;") is False
 
 
 def test_dismiss_prompt(session):
-    # 18.1 step 3
     session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Federer');</script>")
     response = dismiss_alert(session)
     assert_success(response)
     assert session.execute_script("return window.result") is None
--- a/testing/web-platform/tests/webdriver/tests/fullscreen_window/fullscreen.py
+++ b/testing/web-platform/tests/webdriver/tests/fullscreen_window/fullscreen.py
@@ -2,79 +2,43 @@ from tests.support.asserts import assert
 
 
 def fullscreen(session):
     return session.transport.send(
         "POST", "session/{session_id}/window/fullscreen".format(**vars(session)))
 
 
 def is_fullscreen(session):
-    # At the time of writing, WebKit does not conform to the Fullscreen API specification.
-    # Remove the prefixed fallback when https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
-    return session.execute_script("return !!(window.fullScreen || document.webkitIsFullScreen)")
-
-
-# 10.7.5 Fullscreen Window
+    # At the time of writing, WebKit does not conform to the
+    # Fullscreen API specification.
+    #
+    # Remove the prefixed fallback when
+    # https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
+    return session.execute_script("""
+        return !!(window.fullScreen || document.webkitIsFullScreen)
+        """)
 
 
 def test_no_browsing_context(session, create_window):
-    """
-    1. If the current top-level browsing context is no longer open,
-    return error with error code no such window.
-
-    """
     session.window_handle = create_window()
     session.close()
     response = fullscreen(session)
     assert_error(response, "no such window")
 
 
 def test_fullscreen(session):
-    """
-    4. Call fullscreen an element with the current top-level browsing
-    context's active document's document element.
-
-    """
     response = fullscreen(session)
     assert_success(response)
 
     assert is_fullscreen(session) is True
 
 
 def test_payload(session):
-    """
-    5. Return success with the JSON serialization of the current top-level
-    browsing context's window rect.
-
-    [...]
-
-    A top-level browsing context's window rect is defined as a
-    dictionary of the screenX, screenY, width and height attributes of
-    the WindowProxy. Its JSON representation is the following:
-
-    "x"
-        WindowProxy's screenX attribute.
-
-    "y"
-        WindowProxy's screenY attribute.
-
-    "width"
-        Width of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    "height"
-        Height of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    """
     response = fullscreen(session)
 
-    # step 5
     assert response.status == 200
     assert isinstance(response.body["value"], dict)
 
     value = response.body["value"]
     assert "width" in value
     assert "height" in value
     assert "x" in value
     assert "y" in value
--- a/testing/web-platform/tests/webdriver/tests/get_alert_text/get.py
+++ b/testing/web-platform/tests/webdriver/tests/get_alert_text/get.py
@@ -2,59 +2,52 @@ from tests.support.asserts import assert
 from tests.support.inline import inline
 
 
 def get_alert_text(session):
     return session.transport.send(
         "GET", "session/{session_id}/alert/text".format(**vars(session)))
 
 
-# 18.3 Get Alert Text
-
 def test_no_browsing_context(session, create_window):
-    # 18.3 step 1
     session.window_handle = create_window()
     session.close()
 
     response = get_alert_text(session)
     assert_error(response, "no such window")
 
 
 def test_no_user_prompt(session):
-    # 18.3 step 2
     response = get_alert_text(session)
     assert_error(response, "no such alert")
 
 
 def test_get_alert_text(session):
-    # 18.3 step 3
     session.url = inline("<script>window.alert('Hello');</script>")
     response = get_alert_text(session)
     assert_success(response)
     assert isinstance(response.body, dict)
     assert "value" in response.body
     alert_text = response.body["value"]
     assert isinstance(alert_text, basestring)
     assert alert_text == "Hello"
 
 
 def test_get_confirm_text(session):
-    # 18.3 step 3
     session.url = inline("<script>window.confirm('Hello');</script>")
     response = get_alert_text(session)
     assert_success(response)
     assert isinstance(response.body, dict)
     assert "value" in response.body
     confirm_text = response.body["value"]
     assert isinstance(confirm_text, basestring)
     assert confirm_text == "Hello"
 
 
 def test_get_prompt_text(session):
-    # 18.3 step 3
     session.url = inline("<script>window.prompt('Enter Your Name: ', 'Federer');</script>")
     response = get_alert_text(session)
     assert_success(response)
     assert isinstance(response.body, dict)
     assert "value" in response.body
     prompt_text = response.body["value"]
     assert isinstance(prompt_text, basestring)
     assert prompt_text == "Enter Your Name: "
--- a/testing/web-platform/tests/webdriver/tests/get_current_url/get.py
+++ b/testing/web-platform/tests/webdriver/tests/get_current_url/get.py
@@ -12,61 +12,61 @@ one_frame_doc = inline("<iframe src='%s'
 two_frames_doc = inline("<iframe src='%s'></iframe>" % one_frame_doc)
 
 
 def get_current_url(session):
     return session.transport.send(
         "GET", "session/{session_id}/url".format(**vars(session)))
 
 
-# TODO(ato): 7.1 Get
-
-
 def test_get_current_url_no_browsing_context(session, create_window):
-    # 7.2 step 1
     session.window_handle = create_window()
     session.close()
 
     result = get_current_url(session)
     assert_error(result, "no such window")
 
+
 def test_get_current_url_matches_location(session):
-    # 7.2 step 3
     url = session.execute_script("return window.location.href")
 
     result = get_current_url(session)
     assert_success(result, url)
 
+
 def test_get_current_url_payload(session):
-    # 7.2 step 4-5
     session.start()
 
     result = get_current_url(session)
     assert result.status == 200
     assert isinstance(result.body["value"], basestring)
 
+
 def test_get_current_url_special_pages(session):
     session.url = "about:blank"
 
     result = get_current_url(session)
     assert_success(result, "about:blank")
 
+
 # TODO(ato): This test requires modification to pass on Windows
 def test_get_current_url_file_protocol(session):
     # tests that the browsing context remains the same
     # when navigated privileged documents
     session.url = "file:///"
 
     result = get_current_url(session)
     assert_success(result, "file:///")
 
+
 # TODO(ato): Test for http:// and https:// protocols.
 # We need to expose a fixture for accessing
 # documents served by wptserve in order to test this.
 
+
 def test_set_malformed_url(session):
     result = session.transport.send("POST",
                                     "session/%s/url" % session.session_id,
                                     {"url": "foo"})
 
     assert_error(result, "invalid argument")
 
 def test_get_current_url_after_modified_location(session):
--- a/testing/web-platform/tests/webdriver/tests/get_element_tag_name/get.py
+++ b/testing/web-platform/tests/webdriver/tests/get_element_tag_name/get.py
@@ -5,39 +5,35 @@ from tests.support.inline import inline
 def get_element_tag_name(session, element_id):
     return session.transport.send(
         "GET", "session/{session_id}/element/{element_id}/name".format(
             session_id=session.session_id,
             element_id=element_id))
 
 
 def test_no_browsing_context(session, create_window):
-    # 13.6 step 1
     session.window_handle = create_window()
     session.close()
 
     result = get_element_tag_name(session, "foo")
     assert_error(result, "no such window")
 
 
 def test_element_not_found(session):
-    # 13.6 Step 3
     result = get_element_tag_name(session, "foo")
     assert_error(result, "no such element")
 
 
 def test_element_stale(session):
-    # 13.6 step 4
     session.url = inline("<input id=foo>")
     element = session.find.css("input", all=False)
     session.refresh()
 
     result = get_element_tag_name(session, element.id)
     assert_error(result, "stale element reference")
 
 
 def test_get_element_tag_name(session):
-    # 13.6 step 6
     session.url = inline("<input id=foo>")
     element = session.find.css("input", all=False)
 
     result = get_element_tag_name(session, element.id)
     assert_success(result, "input")
--- a/testing/web-platform/tests/webdriver/tests/get_timeouts/get.py
+++ b/testing/web-platform/tests/webdriver/tests/get_timeouts/get.py
@@ -2,17 +2,16 @@ from tests.support.asserts import assert
 
 
 def get_timeouts(session):
     return session.transport.send(
         "GET", "session/{session_id}/timeouts".format(**vars(session)))
 
 
 def test_get_timeouts(session):
-    # 8.4 step 1
     response = get_timeouts(session)
 
     assert_success(response)
     assert "value" in response.body
     assert isinstance(response.body["value"], dict)
 
     value = response.body["value"]
     assert "script" in value
--- a/testing/web-platform/tests/webdriver/tests/get_window_rect/get.py
+++ b/testing/web-platform/tests/webdriver/tests/get_window_rect/get.py
@@ -6,55 +6,23 @@ alert_doc = inline("<script>window.alert
 
 
 def get_window_rect(session):
     return session.transport.send(
         "GET", "session/{session_id}/window/rect".format(**vars(session)))
 
 
 def test_no_browsing_context(session, create_window):
-    """
-    1. If the current top-level browsing context is no longer open,
-    return error with error code no such window.
-
-    """
     session.window_handle = create_window()
     session.close()
     response = get_window_rect(session)
     assert_error(response, "no such window")
 
 
 def test_payload(session):
-    """
-    3. Return success with the JSON serialization of the current top-level
-    browsing context's window rect.
-
-    [...]
-
-    A top-level browsing context's window rect is defined as a
-    dictionary of the screenX, screenY, width and height attributes of
-    the WindowProxy. Its JSON representation is the following:
-
-    "x"
-        WindowProxy's screenX attribute.
-
-    "y"
-        WindowProxy's screenY attribute.
-
-    "width"
-        Width of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    "height"
-        Height of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    """
     response = get_window_rect(session)
 
     assert response.status == 200
     assert isinstance(response.body["value"], dict)
     value = response.body["value"]
     expected = session.execute_script("""return {
          x: window.screenX,
          y: window.screenY,
--- a/testing/web-platform/tests/webdriver/tests/is_element_selected/selected.py
+++ b/testing/web-platform/tests/webdriver/tests/is_element_selected/selected.py
@@ -1,72 +1,70 @@
 from tests.support.asserts import assert_error, assert_success
 from tests.support.inline import inline
 
 
-check_doc = inline("<input id=checked type=checkbox checked/><input id=notChecked type=checkbox/>")
-option_doc = inline("""<select>
-                        <option id=notSelected>r-</option>
-                        <option id=selected selected>r+</option>
-                       </select>
-                    """)
+check_doc = inline("""
+    <input id=checked type=checkbox checked>
+    <input id=notChecked type=checkbox>
+    """)
+option_doc = inline("""
+    <select>
+      <option id=notSelected>r-
+      <option id=selected selected>r+
+    </select>
+    """)
 
 
 def is_element_selected(session, element_id):
     return session.transport.send(
         "GET", "session/{session_id}/element/{element_id}/selected".format(
             session_id=session.session_id,
             element_id=element_id))
 
 
 def test_no_browsing_context(session, create_window):
-    # 13.1 step 1
     session.window_handle = create_window()
     session.close()
 
     result = is_element_selected(session, "foo")
     assert_error(result, "no such window")
 
 
 def test_element_stale(session):
-    # 13.1 step 4
     session.url = check_doc
     element = session.find.css("#checked", all=False)
     session.refresh()
 
     result = is_element_selected(session, element.id)
     assert_error(result, "stale element reference")
 
 
 def test_element_checked(session):
-    # 13.1 step 5
     session.url = check_doc
     element = session.find.css("#checked", all=False)
 
     result = is_element_selected(session, element.id)
     assert_success(result, True)
 
 
 def test_checkbox_not_selected(session):
-    # 13.1 step 5
     session.url = check_doc
     element = session.find.css("#notChecked", all=False)
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
 
 
 def test_element_selected(session):
-    # 13.1 step 5
     session.url = option_doc
     element = session.find.css("#selected", all=False)
 
     result = is_element_selected(session, element.id)
     assert_success(result, True)
 
 
 def test_element_not_selected(session):
-    # 13.1 step 5
     session.url = option_doc
     element = session.find.css("#notSelected", all=False)
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
--- a/testing/web-platform/tests/webdriver/tests/maximize_window/maximize.py
+++ b/testing/web-platform/tests/webdriver/tests/maximize_window/maximize.py
@@ -3,139 +3,64 @@ from tests.support.inline import inline
 
 
 def maximize(session):
     return session.transport.send(
         "POST", "session/{session_id}/window/maximize".format(**vars(session)))
 
 
 def is_fullscreen(session):
-    # At the time of writing, WebKit does not conform to the Fullscreen API specification.
-    # Remove the prefixed fallback when https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
-    return session.execute_script("return !!(window.fullScreen || document.webkitIsFullScreen)")
-
-
-# 10.7.3 Maximize Window
+    # At the time of writing, WebKit does not conform to the
+    # Fullscreen API specification.
+    #
+    # Remove the prefixed fallback when
+    # https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
+    return session.execute_script("""
+        return !!(window.fullScreen || document.webkitIsFullScreen)
+        """)
 
 
 def test_no_browsing_context(session, create_window):
-    """
-    2. If the current top-level browsing context is no longer open,
-    return error with error code no such window.
-
-    """
     session.window_handle = create_window()
     session.close()
     response = maximize(session)
     assert_error(response, "no such window")
 
 
 def test_fully_exit_fullscreen(session):
-    """
-    4. Fully exit fullscreen.
-
-    [...]
-
-    To fully exit fullscreen a document document, run these steps:
-
-      1. If document's fullscreen element is null, terminate these steps.
-
-      2. Unfullscreen elements whose fullscreen flag is set, within
-      document's top layer, except for document's fullscreen element.
-
-      3. Exit fullscreen document.
-
-    """
     session.window.fullscreen()
     assert is_fullscreen(session) is True
 
     response = maximize(session)
     assert_success(response)
     assert is_fullscreen(session) is False
 
 
 def test_restore_the_window(session):
-    """
-    5. Restore the window.
-
-    [...]
-
-    To restore the window, given an operating system level window with
-    an associated top-level browsing context, run implementation-specific
-    steps to restore or unhide the window to the visible screen.  Do not
-    return from this operation until the visibility state of the top-level
-    browsing context's active document has reached the visible state,
-    or until the operation times out.
-
-    """
     session.window.minimize()
     assert session.execute_script("return document.hidden") is True
 
     response = maximize(session)
     assert_success(response)
 
 
 def test_maximize(session):
-    """
-    6. Maximize the window of the current browsing context.
-
-    [...]
-
-    To maximize the window, given an operating system level window with an
-    associated top-level browsing context, run the implementation-specific
-    steps to transition the operating system level window into the
-    maximized window state.  If the window manager supports window
-    resizing but does not have a concept of window maximation, the window
-    dimensions must be increased to the maximum available size permitted
-    by the window manager for the current screen.  Return when the window
-    has completed the transition, or within an implementation-defined
-    timeout.
-
-    """
     before_size = session.window.size
 
     response = maximize(session)
     assert_success(response)
 
     assert before_size != session.window.size
 
 
 def test_payload(session):
-    """
-    7. Return success with the JSON serialization of the current top-level
-    browsing context's window rect.
-
-    [...]
-
-    A top-level browsing context's window rect is defined as a
-    dictionary of the screenX, screenY, width and height attributes of
-    the WindowProxy. Its JSON representation is the following:
-
-    "x"
-        WindowProxy's screenX attribute.
-
-    "y"
-        WindowProxy's screenY attribute.
-
-    "width"
-        Width of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    "height"
-        Height of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    """
     before_size = session.window.size
 
     response = maximize(session)
 
-    # step 5
     assert response.status == 200
     assert isinstance(response.body["value"], dict)
 
     value = response.body["value"]
     assert "width" in value
     assert "height" in value
     assert "x" in value
     assert "y" in value
--- a/testing/web-platform/tests/webdriver/tests/minimize_window/minimize.py
+++ b/testing/web-platform/tests/webdriver/tests/minimize_window/minimize.py
@@ -3,110 +3,52 @@ from tests.support.inline import inline
 
 
 def minimize(session):
     return session.transport.send(
         "POST", "session/{session_id}/window/minimize".format(**vars(session)))
 
 
 def is_fullscreen(session):
-    # At the time of writing, WebKit does not conform to the Fullscreen API specification.
-    # Remove the prefixed fallback when https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
-    return session.execute_script("return !!(window.fullScreen || document.webkitIsFullScreen)")
-
-# 10.7.4 Minimize Window
+    # At the time of writing, WebKit does not conform to the
+    # Fullscreen API specification.
+    #
+    # Remove the prefixed fallback when
+    # https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
+    return session.execute_script("""
+        return !!(window.fullScreen || document.webkitIsFullScreen)
+        """)
 
 
 def test_no_browsing_context(session, create_window):
-    """
-    1. If the current top-level browsing context is no longer open,
-    return error with error code no such window.
-
-    """
     session.window_handle = create_window()
     session.close()
     response = minimize(session)
     assert_error(response, "no such window")
 
 
 def test_fully_exit_fullscreen(session):
-    """
-    4. Fully exit fullscreen.
-
-    [...]
-
-    To fully exit fullscreen a document document, run these steps:
-
-      1. If document's fullscreen element is null, terminate these steps.
-
-      2. Unfullscreen elements whose fullscreen flag is set, within
-      document's top layer, except for document's fullscreen element.
-
-      3. Exit fullscreen document.
-
-    """
     session.window.fullscreen()
     assert is_fullscreen(session) is True
 
     response = minimize(session)
     assert_success(response)
     assert is_fullscreen(session) is False
     assert session.execute_script("return document.hidden") is True
 
 
 def test_minimize(session):
-    """
-    5. Iconify the window.
-
-    [...]
-
-    To iconify the window, given an operating system level window with an
-    associated top-level browsing context, run implementation-specific
-    steps to iconify, minimize, or hide the window from the visible
-    screen. Do not return from this operation until the visibility state
-    of the top-level browsing context's active document has reached the
-    hidden state, or until the operation times out.
-
-    """
     assert not session.execute_script("return document.hidden")
 
     response = minimize(session)
     assert_success(response)
-
     assert session.execute_script("return document.hidden")
 
 
 def test_payload(session):
-    """
-    6. Return success with the JSON serialization of the current top-level
-    browsing context's window rect.
-
-    [...]
-
-    A top-level browsing context's window rect is defined as a
-    dictionary of the screenX, screenY, width and height attributes of
-    the WindowProxy. Its JSON representation is the following:
-
-    "x"
-        WindowProxy's screenX attribute.
-
-    "y"
-        WindowProxy's screenY attribute.
-
-    "width"
-        Width of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    "height"
-        Height of the top-level browsing context's outer dimensions,
-        including any browser chrome and externally drawn window
-        decorations in CSS reference pixels.
-
-    """
     assert not session.execute_script("return document.hidden")
 
     response = minimize(session)
 
     assert response.status == 200
     assert isinstance(response.body["value"], dict)
 
     value = response.body["value"]
--- a/testing/web-platform/tests/webdriver/tests/send_alert_text/send.py
+++ b/testing/web-platform/tests/webdriver/tests/send_alert_text/send.py
@@ -15,68 +15,61 @@ def test_null_response_value(session, ur
 
     response = send_alert_text(session, "Federer")
     value = assert_success(response)
     assert value is None
 
 
 @pytest.mark.parametrize("text", [None, {}, [], 42, True])
 def test_invalid_input(session, text):
-    # 18.4 step 2
     session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
     response = send_alert_text(session, text)
     assert_error(response, "invalid argument")
 
 
 def test_no_browsing_context(session, create_window):
-    # 18.4 step 3
     session.window_handle = create_window()
     session.close()
 
     response = send_alert_text(session, "Federer")
     assert_error(response, "no such window")
 
 
 def test_no_user_prompt(session):
-    # 18.4 step 4
     response = send_alert_text(session, "Federer")
     assert_error(response, "no such alert")
 
 
 def test_alert_element_not_interactable(session):
-    # 18.4 step 5
     session.url = inline("<script>window.alert('Hello');</script>")
 
     response = send_alert_text(session, "Federer")
     assert_error(response, "element not interactable")
 
 
 def test_confirm_element_not_interactable(session):
-    # 18.4 step 5
     session.url = inline("<script>window.confirm('Hello');</script>")
 
     response = send_alert_text(session, "Federer")
     assert_error(response, "element not interactable")
 
 
 def test_send_alert_text(session):
-    # 18.4 step 6
     session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
 
     send_response = send_alert_text(session, "Federer")
     assert_success(send_response)
 
     accept_response = session.transport.send("POST", "session/{session_id}/alert/accept"
                                              .format(session_id=session.session_id))
     assert_success(accept_response)
     assert session.execute_script("return window.result") == "Federer"
 
 
 def test_send_alert_text_with_whitespace(session):
-    # 18.4 step 6
     session.url = inline("<script>window.result = window.prompt('Enter Your Name: ', 'Name');</script>")
 
     send_response = send_alert_text(session, " Fed erer ")
     assert_success(send_response)
 
     accept_response = session.transport.send("POST", "session/{session_id}/alert/accept"
                                              .format(session_id=session.session_id))
     assert_success(accept_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
@@ -7,30 +7,27 @@ from tests.support.asserts import assert
 
 def set_window_rect(session, rect):
     return session.transport.send(
         "POST", "session/{session_id}/window/rect".format(**vars(session)),
         rect)
 
 
 def is_fullscreen(session):
-    # At the time of writing, WebKit does not conform to the Fullscreen API specification.
-    # Remove the prefixed fallback when https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
-    return session.execute_script("return !!(window.fullScreen || document.webkitIsFullScreen)")
-
-
-# 10.7.2 Set Window Rect
+    # At the time of writing, WebKit does not conform to the
+    # Fullscreen API specification.
+    #
+    # Remove the prefixed fallback when
+    # https://bugs.webkit.org/show_bug.cgi?id=158125 is fixed.
+    return session.execute_script("""
+        return !!(window.fullScreen || document.webkitIsFullScreen)
+        """)
 
 
 def test_current_top_level_browsing_context_no_longer_open(session, create_window):
-    """
-    1. If the current top-level browsing context is no longer open,
-    return error with error code no such window.
-
-    """
     session.window_handle = create_window()
     session.close()
     response = set_window_rect(session, {})
     assert_error(response, "no such window")
 
 
 @pytest.mark.parametrize("rect", [
     {"width": "a"},
@@ -61,67 +58,43 @@ def test_current_top_level_browsing_cont
     {"width": {}},
     {"height": {}, "width": {}},
     {"x": {}},
     {"y": {}},
     {"x": {}, "y": {}},
     {"width": {}, "height": {}, "x": {}, "y": {}},
 ])
 def test_invalid_types(session, rect):
-    """
-    8. If width or height is neither null nor a Number from 0 to 2^31 -
-    1, return error with error code invalid argument.
-
-    9. If x or y is neither null nor a Number from -(2^31) to 2^31 - 1,
-    return error with error code invalid argument.
-    """
     response = set_window_rect(session, rect)
     assert_error(response, "invalid argument")
 
 
 @pytest.mark.parametrize("rect", [
     {"width": -1},
     {"height": -2},
     {"width": -1, "height": -2},
 ])
 def test_out_of_bounds(session, rect):
-    """
-    8. If width or height is neither null nor a Number from 0 to 2^31 -
-    1, return error with error code invalid argument.
-
-    9. If x or y is neither null nor a Number from -(2^31) to 2^31 - 1,
-    return error with error code invalid argument.
-    """
     response = set_window_rect(session, rect)
     assert_error(response, "invalid argument")
 
 
 def test_width_height_floats(session):
-    """
-    8. If width or height is neither null nor a Number from 0 to 2^31 -
-    1, return error with error code invalid argument.
-    """
-
     response = set_window_rect(session, {"width": 500.5, "height": 420})
     value = assert_success(response)
     assert value["width"] == 500
     assert value["height"] == 420
 
     response = set_window_rect(session, {"width": 500, "height": 450.5})
     value = assert_success(response)
     assert value["width"] == 500
     assert value["height"] == 450
 
 
 def test_x_y_floats(session):
-    """
-    9. If x or y is neither null nor a Number from -(2^31) to 2^31 - 1,
-    return error with error code invalid argument.
-    """
-
     response = set_window_rect(session, {"x": 0.5, "y": 420})
     value = assert_success(response)
     assert value["x"] == 0
     assert value["y"] == 420
 
     response = set_window_rect(session, {"x": 100, "y": 450.5})
     value = assert_success(response)
     assert value["x"] == 100
@@ -151,101 +124,46 @@ def test_x_y_floats(session):
     {"x": 200},
     {"y": 200},
     {"width": 200, "x": 200},
     {"height": 200, "x": 200},
     {"width": 200, "y": 200},
     {"height": 200, "y": 200},
 ])
 def test_no_change(session, rect):
-    """
-    13. If width and height are not null:
-
-    [...]
-
-    14. If x and y are not null:
-
-    [...]
-
-    15. Return success with the JSON serialization of the current
-    top-level browsing context's window rect.
-    """
-
     original = session.window.rect
     response = set_window_rect(session, rect)
     assert_success(response, original)
 
 
 def test_fully_exit_fullscreen(session):
-    """
-    10. Fully exit fullscreen.
-
-    [...]
-
-    To fully exit fullscreen a document document, run these steps:
-
-      1. If document's fullscreen element is null, terminate these steps.
-
-      2. Unfullscreen elements whose fullscreen flag is set, within
-      document's top layer, except for document's fullscreen element.
-
-      3. Exit fullscreen document.
-    """
     session.window.fullscreen()
     assert is_fullscreen(session) is True
 
     response = set_window_rect(session, {"width": 400, "height": 400})
     value = assert_success(response)
     assert value["width"] == 400
     assert value["height"] == 400
 
     assert is_fullscreen(session) is False
 
 
 def test_restore_from_minimized(session):
-    """
-    12. If the visibility state of the top-level browsing context's
-    active document is hidden, restore the window.
-
-    [...]
-
-    To restore the window, given an operating system level window with
-    an associated top-level browsing context, run implementation-specific
-    steps to restore or unhide the window to the visible screen. Do not
-    return from this operation until the visibility state of the top-level
-    browsing context's active document has reached the visible state,
-    or until the operation times out.
-    """
-
     session.window.minimize()
     assert session.execute_script("return document.hidden") is True
 
     response = set_window_rect(session, {"width": 450, "height": 450})
     value = assert_success(response)
     assert value["width"] == 450
     assert value["height"] == 450
 
     assert session.execute_script("return document.hidden") is False
 
 
 def test_restore_from_maximized(session):
-    """
-    12. If the visibility state of the top-level browsing context's
-    active document is hidden, restore the window.
-
-    [...]
-
-    To restore the window, given an operating system level window with
-    an associated top-level browsing context, run implementation-specific
-    steps to restore or unhide the window to the visible screen. Do not
-    return from this operation until the visibility state of the top-level
-    browsing context's active document has reached the visible state,
-    or until the operation times out.
-    """
-
     original_size = session.window.size
     session.window.maximize()
     assert session.window.size != original_size
 
     response = set_window_rect(session, {"width": 400, "height": 400})
     value = assert_success(response)
     assert value["width"] == 400
     assert value["height"] == 400
@@ -254,79 +172,78 @@ def test_restore_from_maximized(session)
 def test_height_width(session):
     original = session.window.rect
     max = session.execute_script("""
         return {
           width: window.screen.availWidth,
           height: window.screen.availHeight,
         }""")
 
-    # step 12
-    response = set_window_rect(session, {"width": max["width"] - 100,
-                                         "height": max["height"] - 100})
-
-    # step 14
-    assert_success(response, {"x": original["x"],
-                              "y": original["y"],
-                              "width": max["width"] - 100,
-                              "height": max["height"] - 100})
+    response = set_window_rect(session, {
+        "width": max["width"] - 100,
+        "height": max["height"] - 100
+    })
+    assert_success(response, {
+        "x": original["x"],
+        "y": original["y"],
+        "width": max["width"] - 100,
+        "height": max["height"] - 100
+    })
 
 
 def test_height_width_larger_than_max(session):
     max = session.execute_script("""
         return {
           width: window.screen.availWidth,
           height: window.screen.availHeight,
         }""")
 
-    # step 12
-    response = set_window_rect(session, {"width": max["width"] + 100,
-                                         "height": max["height"] + 100})
-
-    # step 14
+    response = set_window_rect(session, {
+        "width": max["width"] + 100,
+        "height": max["height"] + 100
+    })
     rect = assert_success(response)
     assert rect["width"] >= max["width"]
     assert rect["height"] >= max["height"]
 
 
 def test_height_width_as_current(session):
     original = session.window.rect
 
-    # step 12
-    response = set_window_rect(session, {"width": original["width"],
-                                         "height": original["height"]})
-
-    # step 14
-    assert_success(response, {"x": original["x"],
-                              "y": original["y"],
-                              "width": original["width"],
-                              "height": original["height"]})
+    response = set_window_rect(session, {
+        "width": original["width"],
+        "height": original["height"]
+    })
+    assert_success(response, {
+        "x": original["x"],
+        "y": original["y"],
+        "width": original["width"],
+        "height": original["height"]
+    })
 
 
 def test_x_y(session):
     original = session.window.rect
-
-    # step 13
-    response = set_window_rect(session, {"x": original["x"] + 10,
-                                         "y": original["y"] + 10})
-
-    # step 14
-    assert_success(response, {"x": original["x"] + 10,
-                              "y": original["y"] + 10,
-                              "width": original["width"],
-                              "height": original["height"]})
+    response = set_window_rect(session, {
+        "x": original["x"] + 10,
+        "y": original["y"] + 10
+    })
+    assert_success(response, {
+        "x": original["x"] + 10,
+        "y": original["y"] + 10,
+        "width": original["width"],
+        "height": original["height"]
+    })
 
 
 def test_negative_x_y(session):
     original = session.window.rect
 
-    # step 13
     response = set_window_rect(session, {"x": - 8, "y": - 8})
 
-    # step 14
     os = session.capabilities["platformName"]
     # certain WMs prohibit windows from being moved off-screen
     if os == "linux":
         rect = assert_success(response)
         assert rect["x"] <= 0
         assert rect["y"] <= 0
         assert rect["width"] == original["width"]
         assert rect["height"] == original["height"]
@@ -408,17 +325,16 @@ def test_resize_by_script(session):
     while size1 == size2:
         size2 = session.window.size
         assert size2 == (800, 900)
     assert size2 == {"width": 200, "height": 100}
 """
 
 
 def test_payload(session):
-    # step 14
     response = set_window_rect(session, {"x": 400, "y": 400})
 
     assert response.status == 200
     assert isinstance(response.body["value"], dict)
     value = response.body["value"]
     assert "width" in value
     assert "height" in value
     assert "x" in value
--- a/testing/web-platform/tests/webdriver/tests/status/status.py
+++ b/testing/web-platform/tests/webdriver/tests/status/status.py
@@ -7,42 +7,27 @@ def get_status(session):
     return session.transport.send("GET", "/status")
 
 
 def test_get_status_no_session(http):
     with http.get("/status") as response:
         # GET /status should never return an error
         assert response.status == 200
 
-        # parse JSON response and unwrap 'value' property
-        parsed_obj = json.loads(response.read().decode('utf-8'))
+        parsed_obj = json.loads(response.read().decode("utf-8"))
         value = parsed_obj["value"]
 
-        # Let body be a new JSON Object with the following properties:
-        # "ready"
-        #       The remote end's readiness state.
         assert value["ready"] in [True, False]
-        # "message"
-        #       An implementation-defined string explaining the remote end's
-        #       readiness state.
         assert isinstance(value["message"], basestring)
 
 
 def test_status_with_session_running_on_endpoint_node(session):
-    # For an endpoint node, the maximum number of active
-    # sessions is 1: https://www.w3.org/TR/webdriver/#dfn-maximum-active-sessions
-    # A session is open, so we expect `ready` to be False
-    # 8.3 step 1.
-
     response = get_status(session)
     value = assert_success(response)
     assert value["ready"] is False
     assert "message" in value
 
     session.end()
 
-    # Active session count is 0, meaning that the
-    # readiness state of the server should be True
-    # 8.3 step 1. Again
     response = get_status(session)
     value = assert_success(response)
     assert value["ready"] is True
     assert "message" in value
--- a/testing/web-platform/tests/webdriver/tests/support/asserts.py
+++ b/testing/web-platform/tests/webdriver/tests/support/asserts.py
@@ -29,37 +29,16 @@ errors = {
     "unexpected alert open": 500,
     "unknown command": 404,
     "unknown error": 500,
     "unknown method": 405,
     "unsupported operation": 500,
 }
 
 
-# WebDriver specification ID: dfn-send-an-error
-#
-# > When required to send an error, with error code, a remote end must run the
-# > following steps:
-# >
-# > 1. Let http status and name be the error response data for error code.
-# > 2. Let message be an implementation-defined string containing a
-# >    human-readable description of the reason for the error.
-# > 3. Let stacktrace be an implementation-defined string containing a stack
-# >    trace report of the active stack frames at the time when the error
-# >    occurred.
-# > 4. Let data be a new JSON Object initialised with the following properties:
-# >
-# >     error
-# >         name
-# >     message
-# >         message
-# >     stacktrace
-# >         stacktrace
-# >
-# > 5. Send a response with status and data as arguments.
 def assert_error(response, error_code):
     """
     Verify that the provided webdriver.Response instance described
     a valid error response as defined by `dfn-send-an-error` and
     the provided error code.
 
     :param response: ``webdriver.Response`` instance.
     :param error_code: String value of the expected error code