Bug 1470530 - [wdspec] Always use the "create_dialog" and "create_window" fixtures. r=ato
authorHenrik Skupin <mail@hskupin.info>
Wed, 27 Jun 2018 16:29:11 +0200
changeset 814142 2732ac33aac97da3f8f6b7d2fd7f8c748edc72fb
parent 814141 1ec59d0783a52165b9d7b8e8c9b57e6ff9fde42b
child 814143 bbccc02967d3eabdc30b32f4b33370c2a2a5d936
push id115123
push userjdescottes@mozilla.com
push dateWed, 04 Jul 2018 17:42:29 +0000
reviewersato
bugs1470530
milestone63.0a1
Bug 1470530 - [wdspec] Always use the "create_dialog" and "create_window" fixtures. r=ato With the WebDriver session created by the "session" fixture, there is no need anymore to pass a session instance to one of those methods. Instead the appropriate fixture can be used. MozReview-Commit-ID: CaveLEICbXD
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webdriver/tests/close_window/user_prompts.py
testing/web-platform/tests/webdriver/tests/delete_cookie/user_prompts.py
testing/web-platform/tests/webdriver/tests/element_send_keys/user_prompts.py
testing/web-platform/tests/webdriver/tests/fullscreen_window/user_prompts.py
testing/web-platform/tests/webdriver/tests/get_current_url/user_prompts.py
testing/web-platform/tests/webdriver/tests/get_element_property/user_prompts.py
testing/web-platform/tests/webdriver/tests/get_element_tag_name/user_prompts.py
testing/web-platform/tests/webdriver/tests/get_title/user_prompts.py
testing/web-platform/tests/webdriver/tests/get_window_rect/user_prompts.py
testing/web-platform/tests/webdriver/tests/is_element_selected/user_prompts.py
testing/web-platform/tests/webdriver/tests/maximize_window/user_prompts.py
testing/web-platform/tests/webdriver/tests/minimize_window/user_prompts.py
testing/web-platform/tests/webdriver/tests/set_window_rect/user_prompts.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -619967,17 +619967,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/close_window/close.py": [
    "8c22860607cb0f3d610888c9816bf2384e2c5445",
    "wdspec"
   ],
   "webdriver/tests/close_window/user_prompts.py": [
-   "ff6cf5341848d15094898cf72a01a1834e142a08",
+   "e263ab43c4fa2525fc252a887f77e7b3eec60fd8",
    "wdspec"
   ],
   "webdriver/tests/conftest.py": [
    "6d40ad141aea1a1ec6458c32694ef72ef5314569",
    "support"
   ],
   "webdriver/tests/delete_all_cookies/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
@@ -619991,17 +619991,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/delete_cookie/delete.py": [
    "e9b90bac0e666ce82b3c0006830febcef726d688",
    "wdspec"
   ],
   "webdriver/tests/delete_cookie/user_prompts.py": [
-   "fa44075d31887e0b20495164053cc0e5ef4ebed0",
+   "62585a63779240b0019db5330f19862f8008a3e5",
    "wdspec"
   ],
   "webdriver/tests/delete_session/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/delete_session/delete.py": [
    "1df6e1bfba0577a591bda8e0e27b96a1abcea1fb",
@@ -620075,17 +620075,17 @@
    "e4a50a53a13c1ab76c6c002bbda1c103f8c32ccf",
    "wdspec"
   ],
   "webdriver/tests/element_send_keys/send_keys.py": [
    "83e4292e0e587a641f73d21cb1ddadc420251a10",
    "wdspec"
   ],
   "webdriver/tests/element_send_keys/user_prompts.py": [
-   "d53c4c750c125ef2f8131b08b7a3ab49c6672811",
+   "46cfac85412cd534ad88f5067d7705a293e2a501",
    "wdspec"
   ],
   "webdriver/tests/execute_async_script/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/execute_async_script/collections.py": [
    "d6c95dfdcbfc3b9cf91cf6f943a17b7cd0fee79d",
@@ -620159,17 +620159,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/fullscreen_window/fullscreen.py": [
    "8a6e06b2fbd2ec80326ab1145e6ddfb35c6995b4",
    "wdspec"
   ],
   "webdriver/tests/fullscreen_window/user_prompts.py": [
-   "3d3c647059d820debf51a8a3a9b8fca9f7104d10",
+   "5c8ddcf7bb73b6d6da5d6a3218a8c648b0b7f51b",
    "wdspec"
   ],
   "webdriver/tests/get_active_element/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_active_element/get.py": [
    "6d48b8577c9edf5f1e39fae461831de742ff9dd8",
@@ -620187,45 +620187,45 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_current_url/get.py": [
    "f65054e80f7ddc9a7b8600765929935355b5f447",
    "wdspec"
   ],
   "webdriver/tests/get_current_url/user_prompts.py": [
-   "8af1c24bc33e4929eb04468993037de43b44ac5c",
+   "4ed666d2c265e0645373a97ce54bab32e8104404",
    "wdspec"
   ],
   "webdriver/tests/get_element_attribute/get.py": [
    "3fdd451b8aa73729f25325cb0e43ae389a223ee7",
    "wdspec"
   ],
   "webdriver/tests/get_element_property/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_element_property/get.py": [
    "2b36e390348a37e2138f480a7f36eb08ef6a2ee5",
    "wdspec"
   ],
   "webdriver/tests/get_element_property/user_prompts.py": [
-   "008b612060309096ad73d06f152817a4c14b7a87",
+   "79079682f52df381334ea17b90c344d36fcbd454",
    "wdspec"
   ],
   "webdriver/tests/get_element_tag_name/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_element_tag_name/get.py": [
    "66a0b57c29a006b1200e63239a4ea5f8cb90c1bd",
    "wdspec"
   ],
   "webdriver/tests/get_element_tag_name/user_prompts.py": [
-   "bd497d5d869593fa6c3533a69e054da523a0ef18",
+   "abbd3d0d1fcb687979cb91fb538952cc4ad0f594",
    "wdspec"
   ],
   "webdriver/tests/get_element_text/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_element_text/get.py": [
    "8edcb5068617b13c808ddc336196a7e0e98a8072",
@@ -620251,69 +620251,69 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_title/get.py": [
    "69a3e55d2f34dc02285af89d78a75d46e7d1282c",
    "wdspec"
   ],
   "webdriver/tests/get_title/user_prompts.py": [
-   "40e39c1cc6bdeed6100d4e35a5dc58ccbfecb8df",
+   "a3b2c8753e374ae1cabbad2e9583ea82f1e149c0",
    "wdspec"
   ],
   "webdriver/tests/get_window_rect/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/get_window_rect/get.py": [
    "8d687026889e601f4c1987996f4e5306b0f627f9",
    "wdspec"
   ],
   "webdriver/tests/get_window_rect/user_prompts.py": [
-   "5524bb3b4d2d43394fa716ab44ce844c996a5561",
+   "c91b4d09f4f76067c159236b016b375c34baa117",
    "wdspec"
   ],
   "webdriver/tests/interface.html": [
    "f7b2c45ff8b1b5790dd390fbe2ab997766f5d9a8",
    "testharness"
   ],
   "webdriver/tests/is_element_selected/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/is_element_selected/selected.py": [
    "afed5bfc86527410e0fb521f7f75d79bee1fb060",
    "wdspec"
   ],
   "webdriver/tests/is_element_selected/user_prompts.py": [
-   "7b02b1737dc4a1fd7ba9d531a883d98e50f1abcd",
+   "f8d1f255cf57cbb5d1074282d3c78975350607bd",
    "wdspec"
   ],
   "webdriver/tests/maximize_window/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/maximize_window/maximize.py": [
    "be54b714b8d6c8f282ee896af4a449ccba4cd060",
    "wdspec"
   ],
   "webdriver/tests/maximize_window/user_prompts.py": [
-   "ffacd9938e07ff12edc95edb2e83cbe514a25858",
+   "c2f6029d8162adc84aca555c1c53587b71b28ee4",
    "wdspec"
   ],
   "webdriver/tests/minimize_window/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/minimize_window/minimize.py": [
    "8b59610ffcbb4ab41a74f149dc74d415edfaf60f",
    "wdspec"
   ],
   "webdriver/tests/minimize_window/user_prompts.py": [
-   "11655bf89646491bc21e20587cac8a26426be3da",
+   "075f1aa4cabff2ab1489891ac1088d62f459b007",
    "wdspec"
   ],
   "webdriver/tests/navigate_to/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/navigate_to/navigate.py": [
    "6274392529489518207961ed5e6b6bb3ff081572",
@@ -620395,17 +620395,17 @@
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/set_window_rect/set.py": [
    "04161b59c5b144dd571dca3ef224595f9d4612f2",
    "wdspec"
   ],
   "webdriver/tests/set_window_rect/user_prompts.py": [
-   "f555a76068004b263f6ed7f0e8410f55b51d2bb5",
+   "a84a453cb9d5fe347f7bec75ef88c3a4f59a3358",
    "wdspec"
   ],
   "webdriver/tests/status/__init__.py": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
   ],
   "webdriver/tests/status/status.py": [
    "8a5e17655c8eca835f113533e8a57a233823cd83",
--- a/testing/web-platform/tests/webdriver/tests/close_window/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/close_window/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog, create_window
 from tests.support.inline import inline
 
 
 def close(session):
     return session.transport.send(
         "DELETE", "session/{session_id}/window".format(**vars(session)))
 
 
@@ -18,47 +17,47 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog, create_window):
     original_handle = session.window_handle
 
-    session.window_handle = create_window(session)()
+    session.window_handle = create_window()
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = close(session)
     assert response.status == 200
 
     # Asserting that the dialog was handled requires valid top-level browsing
     # context, so we must switch to the original window.
     session.window_handle = original_handle
     assert_dialog_handled(session, "dismiss #1")
 
-    session.window_handle = create_window(session)()
+    session.window_handle = create_window()
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = close(session)
     assert response.status == 200
 
     # Asserting that the dialog was handled requires valid top-level browsing
     # context, so we must switch to the original window.
     session.window_handle = original_handle
     assert_dialog_handled(session, "dismiss #2")
 
-    session.window_handle = create_window(session)()
+    session.window_handle = create_window()
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = close(session)
     assert response.status == 200
 
     # Asserting that the dialog was handled requires valid top-level browsing
     # context, so we must switch to the original window.
     session.window_handle = original_handle
     assert_dialog_handled(session, "dismiss #3")
 
--- a/testing/web-platform/tests/webdriver/tests/delete_cookie/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/delete_cookie/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def delete_cookie(session, name):
     return session.transport.send("DELETE", "/session/%s/cookie/%s" % (session.session_id, name))
 
 
 def test_handle_prompt_dismiss_and_notify():
@@ -17,30 +16,30 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = delete_cookie(session, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = delete_cookie(session, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = delete_cookie(session, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
     create_dialog("alert", text="dismiss #1", result_var="dismiss1")
--- a/testing/web-platform/tests/webdriver/tests/element_send_keys/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/element_send_keys/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def element_send_keys(session, element, text):
     return session.transport.send(
         "POST", "/session/{session_id}/element/{element_id}/value".format(
             session_id=session.session_id,
             element_id=element.id),
@@ -21,31 +20,31 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<input>")
     element = session.find.css("input", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = element_send_keys(session, element, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = element_send_keys(session, element, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = element_send_keys(session, element, "foo")
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<input>")
     element = session.find.css("input", all=False)
--- a/testing/web-platform/tests/webdriver/tests/fullscreen_window/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/fullscreen_window/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def read_global(session, name):
     return session.execute_script("return %s;" % name)
 
 
 def fullscreen(session):
@@ -21,34 +20,34 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
-    create_dialog(session)("alert", text="accept #1", result_var="accept1")
+    create_dialog("alert", text="accept #1", result_var="accept1")
 
     fullscreen(session)
 
     assert_dialog_handled(session, "accept #1")
     assert read_global(session, "accept1") is None
 
     read_global(session, "document.title")
-    create_dialog(session)("confirm", text="accept #2", result_var="accept2")
+    create_dialog("confirm", text="accept #2", result_var="accept2")
 
     fullscreen(session)
 
     assert_dialog_handled(session, "accept #2")
     assert read_global(session, "accept2"), True
 
-    create_dialog(session)("prompt", text="accept #3", result_var="accept3")
+    create_dialog("prompt", text="accept #3", result_var="accept3")
 
     fullscreen(session)
 
     assert_dialog_handled(session, "accept #3")
     assert read_global(session, "accept3") == "" or read_global(session, "accept3") == "undefined"
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
--- a/testing/web-platform/tests/webdriver/tests/get_current_url/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/get_current_url/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def read_global(session, name):
     return session.execute_script("return %s;" % name)
 
 
 def get_current_url(session):
@@ -21,34 +20,34 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
-    create_dialog(session)("alert", text="accept #1", result_var="accept1")
+    create_dialog("alert", text="accept #1", result_var="accept1")
 
     get_current_url(session)
 
     assert_dialog_handled(session, "accept #1")
     assert read_global(session, "accept1") is None
 
     read_global(session, "document.title")
-    create_dialog(session)("confirm", text="accept #2", result_var="accept2")
+    create_dialog("confirm", text="accept #2", result_var="accept2")
 
     get_current_url(session)
 
     assert_dialog_handled(session, "accept #2")
     assert read_global(session, "accept2"), True
 
-    create_dialog(session)("prompt", text="accept #3", result_var="accept3")
+    create_dialog("prompt", text="accept #3", result_var="accept3")
 
     get_current_url(session)
 
     assert_dialog_handled(session, "accept #3")
     assert read_global(session, "accept3") == "" or read_global(session, "accept3") == "undefined"
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
--- a/testing/web-platform/tests/webdriver/tests/get_element_property/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/get_element_property/user_prompts.py
@@ -1,86 +1,85 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_success, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def read_global(session, name):
     return session.execute_script("return %s;" % name)
 
 
 def get_property(session, element_id, name):
     return session.transport.send(
         "GET", "session/{session_id}/element/{element_id}/property/{name}".format(
             session_id=session.session_id, element_id=element_id, name=name))
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
-def test_handle_prompt_dismiss(session):
+def test_handle_prompt_dismiss(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #3")
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_property(session, element.id, "id")
     assert_success(result, "foo")
     assert_dialog_handled(session, "dismiss #3")
 
 
-def test_handle_prompt_missing_value(session):
+def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_property(session, element.id, "id")
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_property(session, element.id, "id")
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_property(session, element.id, "id")
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #3")
--- a/testing/web-platform/tests/webdriver/tests/get_element_tag_name/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/get_element_tag_name/user_prompts.py
@@ -1,85 +1,84 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_success, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def read_global(session, name):
     return session.execute_script("return %s;" % name)
 
 
 def get_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))
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
-def test_handle_prompt_dismiss(session):
+def test_handle_prompt_dismiss(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #3")
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_tag_name(session, element.id)
     assert_success(result, "input")
     assert_dialog_handled(session, "dismiss #3")
 
 
-def test_handle_prompt_missing_value(session):
+def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_tag_name(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_tag_name(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_tag_name(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #3")
--- a/testing/web-platform/tests/webdriver/tests/get_title/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/get_title/user_prompts.py
@@ -1,75 +1,74 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_success, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def read_global(session, name):
     return session.execute_script("return %s;" % name)
 
 
 def get_title(session):
     return session.transport.send(
         "GET", "session/{session_id}/title".format(**vars(session)))
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
-def test_title_handle_prompt_dismiss(session):
+def test_title_handle_prompt_dismiss(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
 
     expected_title = read_global(session, "document.title")
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "dismiss #1")
     assert read_global(session, "dismiss1") is None
 
     expected_title = read_global(session, "document.title")
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "dismiss #2")
     assert read_global(session, "dismiss2") is False
 
     expected_title = read_global(session, "document.title")
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "dismiss #3")
     assert read_global(session, "dismiss3") is None
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_title_handle_prompt_accept(session):
+def test_title_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
-    create_dialog(session)("alert", text="accept #1", result_var="accept1")
+    create_dialog("alert", text="accept #1", result_var="accept1")
 
     expected_title = read_global(session, "document.title")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "accept #1")
     assert read_global(session, "accept1") is None
 
     expected_title = read_global(session, "document.title")
-    create_dialog(session)("confirm", text="accept #2", result_var="accept2")
+    create_dialog("confirm", text="accept #2", result_var="accept2")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "accept #2")
     assert read_global(session, "accept2") is True
 
     expected_title = read_global(session, "document.title")
-    create_dialog(session)("prompt", text="accept #3", result_var="accept3")
+    create_dialog("prompt", text="accept #3", result_var="accept3")
 
     result = get_title(session)
     assert_success(result, expected_title)
     assert_dialog_handled(session, "accept #3")
     assert read_global(session, "accept3") == "" or read_global(session, "accept3") == "undefined"
 
 
 def test_title_handle_prompt_missing_value(session, create_dialog):
--- a/testing/web-platform/tests/webdriver/tests/get_window_rect/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/get_window_rect/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 alert_doc = inline("<script>window.alert()</script>")
 
 
 def get_window_rect(session):
     return session.transport.send(
@@ -21,30 +20,30 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = get_window_rect(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = get_window_rect(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = get_window_rect(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
     create_dialog("alert", text="dismiss #1", result_var="dismiss1")
--- a/testing/web-platform/tests/webdriver/tests/is_element_selected/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/is_element_selected/user_prompts.py
@@ -1,84 +1,82 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
 from tests.support.inline import inline
-from tests.support.fixtures import create_dialog
 
 
 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))
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"})
-def test_handle_prompt_dismiss(session):
+def test_handle_prompt_dismiss(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #3")
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = is_element_selected(session, element.id)
     assert_success(result, False)
     assert_dialog_handled(session, "dismiss #3")
 
 
-def test_handle_prompt_missing_value(session):
-    # 13.1 step 2
+def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<input id=foo>")
     element = session.find.css("#foo", all=False)
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
 
     result = is_element_selected(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
 
     result = is_element_selected(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
 
     result = is_element_selected(session, element.id)
     assert_error(result, "unexpected alert open")
     assert_dialog_handled(session, "dismiss #3")
--- a/testing/web-platform/tests/webdriver/tests/maximize_window/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/maximize_window/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def maximize(session):
     return session.transport.send(
         "POST", "session/{session_id}/window/maximize".format(**vars(session)))
 
 
@@ -18,30 +17,30 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = maximize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = maximize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = maximize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
     create_dialog("alert", text="dismiss #1", result_var="dismiss1")
--- a/testing/web-platform/tests/webdriver/tests/minimize_window/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/minimize_window/user_prompts.py
@@ -1,12 +1,11 @@
 import pytest
 
 from tests.support.asserts import assert_error, assert_dialog_handled
-from tests.support.fixtures import create_dialog
 from tests.support.inline import inline
 
 
 def minimize(session):
     return session.transport.send(
         "POST", "session/{session_id}/window/minimize".format(**vars(session)))
 
 
@@ -18,30 +17,30 @@ def test_handle_prompt_accept_and_notify
     """TODO"""
 
 
 def test_handle_prompt_ignore():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
 
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     response = minimize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     response = minimize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     response = minimize(session)
     assert response.status == 200
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_missing_value(session, create_dialog):
     session.url = inline("<title>WD doc title</title>")
     create_dialog("alert", text="dismiss #1", result_var="dismiss1")
--- a/testing/web-platform/tests/webdriver/tests/set_window_rect/user_prompts.py
+++ b/testing/web-platform/tests/webdriver/tests/set_window_rect/user_prompts.py
@@ -1,42 +1,41 @@
 import pytest
 
 from tests.support.asserts import assert_dialog_handled, assert_error, assert_success
-from tests.support.fixtures import create_dialog
 
 
 def set_window_rect(session, rect):
     return session.transport.send(
         "POST", "session/{session_id}/window/rect".format(**vars(session)),
         rect)
 
 
 def test_handle_prompt_dismiss():
     """TODO"""
 
 
 @pytest.mark.capabilities({"unhandledPromptBehavior": "accept"})
-def test_handle_prompt_accept(session):
+def test_handle_prompt_accept(session, create_dialog):
     original = session.window.rect
 
     # step 2
-    create_dialog(session)("alert", text="dismiss #1", result_var="dismiss1")
+    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
     result = set_window_rect(session, {"x": original["x"],
                                        "y": original["y"]})
     assert result.status == 200
     assert_dialog_handled(session, "dismiss #1")
 
-    create_dialog(session)("confirm", text="dismiss #2", result_var="dismiss2")
+    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
     result = set_window_rect(session, {"x": original["x"],
                                        "y": original["y"]})
     assert result.status == 200
     assert_dialog_handled(session, "dismiss #2")
 
-    create_dialog(session)("prompt", text="dismiss #3", result_var="dismiss3")
+    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
     result = set_window_rect(session, {"x": original["x"],
                                        "y": original["y"]})
     assert_success(result)
     assert_dialog_handled(session, "dismiss #3")
 
 
 def test_handle_prompt_dismiss_and_notify():
     """TODO"""