Bug 1353895 - Move all wdspec tests into a package; r?jgraham draft
authorMaja Frydrychowicz <mjzffr@gmail.com>
Thu, 22 Jun 2017 16:45:57 -0400
changeset 603360 eed73cf4be8b49a1b08ebe5b403b3271c1cd2ca1
parent 603312 a3b192dc8344679ce208af42b6246c3c0d42cab3
child 603361 30dad3052cb27bd4a0592b8014ee08f7cb87388a
push id66776
push userbmo:mjzffr@gmail.com
push dateMon, 03 Jul 2017 22:04:21 +0000
reviewersjgraham
bugs1353895
milestone56.0a1
Bug 1353895 - Move all wdspec tests into a package; r?jgraham We need a top-level package for tests and support files so that support modules are importable from subpackages. For example, previously webdriver/support/inline.py could not be imported from webdriver/actions/mouse.py. I'm creating the package in a subdirectory under webdriver in order to avoid a name-clash with webdriver, the WebDriver client library. Part of the motivation for adding the subdirectory rather than renaming the client library is that it's a relatively isolated change. MozReview-Commit-ID: BihAKcNLbXK
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/webdriver/contexts.py.ini
testing/web-platform/meta/webdriver/navigation.py.ini
testing/web-platform/meta/webdriver/tests/contexts.py.ini
testing/web-platform/meta/webdriver/tests/navigation.py.ini
testing/web-platform/tests/webdriver/actions/__init__.py
testing/web-platform/tests/webdriver/actions/conftest.py
testing/web-platform/tests/webdriver/actions/key.py
testing/web-platform/tests/webdriver/actions/mouse.py
testing/web-platform/tests/webdriver/actions/sequence.py
testing/web-platform/tests/webdriver/actions/special_keys.py
testing/web-platform/tests/webdriver/actions/support/__init__.py
testing/web-platform/tests/webdriver/actions/support/keys.py
testing/web-platform/tests/webdriver/actions/support/refine.py
testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html
testing/web-platform/tests/webdriver/conftest.py
testing/web-platform/tests/webdriver/contexts.py
testing/web-platform/tests/webdriver/cookies.py
testing/web-platform/tests/webdriver/navigation.py
testing/web-platform/tests/webdriver/support/__init__.py
testing/web-platform/tests/webdriver/support/asserts.py
testing/web-platform/tests/webdriver/support/fixtures.py
testing/web-platform/tests/webdriver/support/http_request.py
testing/web-platform/tests/webdriver/support/inline.py
testing/web-platform/tests/webdriver/support/merge_dictionaries.py
testing/web-platform/tests/webdriver/tests/__init__.py
testing/web-platform/tests/webdriver/tests/actions/__init__.py
testing/web-platform/tests/webdriver/tests/actions/conftest.py
testing/web-platform/tests/webdriver/tests/actions/key.py
testing/web-platform/tests/webdriver/tests/actions/mouse.py
testing/web-platform/tests/webdriver/tests/actions/sequence.py
testing/web-platform/tests/webdriver/tests/actions/special_keys.py
testing/web-platform/tests/webdriver/tests/actions/support/__init__.py
testing/web-platform/tests/webdriver/tests/actions/support/keys.py
testing/web-platform/tests/webdriver/tests/actions/support/refine.py
testing/web-platform/tests/webdriver/tests/actions/support/test_actions_wdspec.html
testing/web-platform/tests/webdriver/tests/conftest.py
testing/web-platform/tests/webdriver/tests/contexts.py
testing/web-platform/tests/webdriver/tests/cookies.py
testing/web-platform/tests/webdriver/tests/navigation.py
testing/web-platform/tests/webdriver/tests/support/__init__.py
testing/web-platform/tests/webdriver/tests/support/asserts.py
testing/web-platform/tests/webdriver/tests/support/fixtures.py
testing/web-platform/tests/webdriver/tests/support/http_request.py
testing/web-platform/tests/webdriver/tests/support/inline.py
testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py
testing/web-platform/tests/webdriver/tests/window_maximizing.py
testing/web-platform/tests/webdriver/window_maximizing.py
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -67138,77 +67138,82 @@
      {}
     ]
    ],
    "webdriver/README.md": [
     [
      {}
     ]
    ],
-   "webdriver/actions/__init__.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/actions/conftest.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/actions/support/__init__.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/actions/support/keys.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/actions/support/refine.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/actions/support/test_actions_wdspec.html": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/conftest.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/__init__.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/asserts.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/fixtures.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/http_request.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/inline.py": [
-    [
-     {}
-    ]
-   ],
-   "webdriver/support/merge_dictionaries.py": [
+   "webdriver/tests/__init__.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/__init__.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/conftest.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/support/__init__.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/support/keys.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/support/refine.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/support/test_actions_wdspec.html": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/conftest.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/__init__.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/asserts.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/fixtures.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/http_request.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/inline.py": [
+    [
+     {}
+    ]
+   ],
+   "webdriver/tests/support/merge_dictionaries.py": [
     [
      {}
     ]
    ],
    "webgl/OWNERS": [
     [
      {}
     ]
@@ -138496,63 +138501,63 @@
    "workers/shared-worker-name-via-options.html": [
     [
      "/workers/shared-worker-name-via-options.html",
      {}
     ]
    ]
   },
   "wdspec": {
-   "webdriver/actions/key.py": [
-    [
-     "/webdriver/actions/key.py",
-     {}
-    ]
-   ],
-   "webdriver/actions/mouse.py": [
-    [
-     "/webdriver/actions/mouse.py",
-     {}
-    ]
-   ],
-   "webdriver/actions/sequence.py": [
-    [
-     "/webdriver/actions/sequence.py",
-     {}
-    ]
-   ],
-   "webdriver/actions/special_keys.py": [
-    [
-     "/webdriver/actions/special_keys.py",
-     {
-      "timeout": "long"
-     }
-    ]
-   ],
-   "webdriver/contexts.py": [
-    [
-     "/webdriver/contexts.py",
-     {}
-    ]
-   ],
-   "webdriver/cookies.py": [
-    [
-     "/webdriver/cookies.py",
-     {}
-    ]
-   ],
-   "webdriver/navigation.py": [
-    [
-     "/webdriver/navigation.py",
-     {}
-    ]
-   ],
-   "webdriver/window_maximizing.py": [
-    [
-     "/webdriver/window_maximizing.py",
+   "webdriver/tests/actions/key.py": [
+    [
+     "/webdriver/tests/actions/key.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/mouse.py": [
+    [
+     "/webdriver/tests/actions/mouse.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/sequence.py": [
+    [
+     "/webdriver/tests/actions/sequence.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/actions/special_keys.py": [
+    [
+     "/webdriver/tests/actions/special_keys.py",
+     {
+      "timeout": "long"
+     }
+    ]
+   ],
+   "webdriver/tests/contexts.py": [
+    [
+     "/webdriver/tests/contexts.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/cookies.py": [
+    [
+     "/webdriver/tests/cookies.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/navigation.py": [
+    [
+     "/webdriver/tests/navigation.py",
+     {}
+    ]
+   ],
+   "webdriver/tests/window_maximizing.py": [
+    [
+     "/webdriver/tests/window_maximizing.py",
      {}
     ]
    ]
   }
  },
  "paths": {
   "./.codecov.yml": [
    "e2322808739a5977e90896b4755cfc20f4ab2046",
@@ -145514,17 +145519,17 @@
    "258104b78168059e67c84aa49c1b236c200633aa",
    "testharness"
   ],
   "XMLHttpRequest/abort-after-receive.htm": [
    "b3b42e616f1af845a5280e56862d81fcb1491e57",
    "testharness"
   ],
   "XMLHttpRequest/abort-after-send.htm": [
-   "1ec12c1906dd99e9c048925c560ce1b9ac1a4410",
+   "0491be6129a5d78a55d043f3dc0b5322611b9485",
    "testharness"
   ],
   "XMLHttpRequest/abort-after-stop.htm": [
    "3feb39f2451afa624771437337c669865fac29b5",
    "testharness"
   ],
   "XMLHttpRequest/abort-after-timeout.htm": [
    "26252843e67111ee53079bb67619fccde700000d",
@@ -170726,17 +170731,17 @@
    "5f29436964d01c57f61d513cee5b83281643ac54",
    "testharness"
   ],
   "cssom/escape.html": [
    "c9ed57c7ef7a035c25feff4ea60547a57d727f31",
    "testharness"
   ],
   "cssom/getComputedStyle-pseudo.html": [
-   "6c74e57a2e32a13cc3b7e955a2d89dafdf6d1730",
+   "b9d037db577325526d2414270d2ceefcd6587a6d",
    "testharness"
   ],
   "cssom/historical.html": [
    "2c78218b89efb9bdf60cf708920be142051347c7",
    "testharness"
   ],
   "cssom/index-001.html": [
    "ab9e9f102f5909d9b5587f2c0ea54c0c6b59868d",
@@ -193210,25 +193215,25 @@
    "6f0d4c53b5a294ee6ef0bbab0ab4aa456143e2c1",
    "reftest"
   ],
   "mathml/relations/html5-tree/href-click-1-ref.html": [
    "d1e68ba1b9e53d828846fdbc3736be3e08de46c6",
    "support"
   ],
   "mathml/relations/html5-tree/href-click-1.html": [
-   "6f54e8ae0d27ed2e1df922d85da8bf8f939cd88e",
+   "f5986ded6bc98b1866fa2258e10da888ff56ec1f",
    "reftest"
   ],
   "mathml/relations/html5-tree/href-click-2-ref.html": [
    "d1e68ba1b9e53d828846fdbc3736be3e08de46c6",
    "support"
   ],
   "mathml/relations/html5-tree/href-click-2.html": [
-   "0737ec66e9d5421675cfaf3a010eb9acc328b1d4",
+   "12a08c6127f8aedcf886a58b7fb238da437d3122",
    "reftest"
   ],
   "mathml/relations/html5-tree/href-manual.html": [
    "a7ddd45b0063f6b3a29c000ef4142b14cb1e693d",
    "manual"
   ],
   "mathml/relations/html5-tree/integration-point-1-ref.html": [
    "597efefbf428028d27e0e082c8802a76acb92cbd",
@@ -220577,102 +220582,106 @@
   "webdriver/OWNERS": [
    "cbfd094d14a2be6678df83a7bcd8b022922396dd",
    "support"
   ],
   "webdriver/README.md": [
    "a4611303723fa7225d7667a1e4fe2495451b824f",
    "support"
   ],
-  "webdriver/actions/__init__.py": [
-   "da39a3ee5e6b4b0d3255bfef95601890afd80709",
-   "support"
-  ],
-  "webdriver/actions/conftest.py": [
-   "78b6434a88021b7f56e5a7bf3e858fc9558a7c19",
-   "support"
-  ],
-  "webdriver/actions/key.py": [
-   "918bcadf034657dfcb679fd92c8a11efe34bfedf",
+  "webdriver/interface.html": [
+   "d783d0dd370f58b264ef238d8da5cd8601dc3c7f",
+   "testharness"
+  ],
+  "webdriver/tests/__init__.py": [
+   "da39a3ee5e6b4b0d3255bfef95601890afd80709",
+   "support"
+  ],
+  "webdriver/tests/actions/__init__.py": [
+   "da39a3ee5e6b4b0d3255bfef95601890afd80709",
+   "support"
+  ],
+  "webdriver/tests/actions/conftest.py": [
+   "ebdbe326fd2fc53a3522b846505808496407b5b8",
+   "support"
+  ],
+  "webdriver/tests/actions/key.py": [
+   "69542dc107d881bf18dfff3203bfd7a9ec31b4ad",
    "wdspec"
   ],
-  "webdriver/actions/mouse.py": [
-   "9b591d61e353548d0894db281abad0c006e26497",
+  "webdriver/tests/actions/mouse.py": [
+   "fa12c8c7c4883604d221db8cd6b366a5f70ff185",
    "wdspec"
   ],
-  "webdriver/actions/sequence.py": [
-   "67f6d5d359fb5d24a1eab893e38857a3caf17e13",
-   "wdspec"
-  ],
-  "webdriver/actions/special_keys.py": [
-   "a3989b050d0616ee81e9444303508848f1c5459a",
+  "webdriver/tests/actions/sequence.py": [
+   "6a90971de07950c74e54312fc4429074ea1bed21",
    "wdspec"
   ],
-  "webdriver/actions/support/__init__.py": [
-   "da39a3ee5e6b4b0d3255bfef95601890afd80709",
-   "support"
-  ],
-  "webdriver/actions/support/keys.py": [
+  "webdriver/tests/actions/special_keys.py": [
+   "3b10143dea60567f30b4ab6c544e005d02f31fc3",
+   "wdspec"
+  ],
+  "webdriver/tests/actions/support/__init__.py": [
+   "da39a3ee5e6b4b0d3255bfef95601890afd80709",
+   "support"
+  ],
+  "webdriver/tests/actions/support/keys.py": [
    "636991372c21e52b623ed4ada9dfb675dd7f7e14",
    "support"
   ],
-  "webdriver/actions/support/refine.py": [
+  "webdriver/tests/actions/support/refine.py": [
    "0d244bffe67ef57be68aad99f1cbc7440ff80e27",
    "support"
   ],
-  "webdriver/actions/support/test_actions_wdspec.html": [
+  "webdriver/tests/actions/support/test_actions_wdspec.html": [
    "a5a1cbce9f0ef66c19065cb8ba761c8fd27cc4ac",
    "support"
   ],
-  "webdriver/conftest.py": [
-   "6217bd14a1ec72f00d5a6a9014a9dc991e4289db",
-   "support"
-  ],
-  "webdriver/contexts.py": [
+  "webdriver/tests/conftest.py": [
+   "20d9fd603e250068822de4940ba5855354885018",
+   "support"
+  ],
+  "webdriver/tests/contexts.py": [
    "ae157de034d7887d20f2d14fe880779bb1cc1b41",
    "wdspec"
   ],
-  "webdriver/cookies.py": [
-   "2435c4f34a9c5c8296ca775163381d472ca581b9",
+  "webdriver/tests/cookies.py": [
+   "e31177e638269864031e44808945fa1e7c46031c",
+   "wdspec"
+  ],
+  "webdriver/tests/navigation.py": [
+   "cec2987258d9c807a247da9e0216b3af1f171484",
    "wdspec"
   ],
-  "webdriver/interface.html": [
-   "d783d0dd370f58b264ef238d8da5cd8601dc3c7f",
-   "testharness"
-  ],
-  "webdriver/navigation.py": [
-   "dd2f52a3a77497ce8785e698f9ab462390ed0d57",
-   "wdspec"
-  ],
-  "webdriver/support/__init__.py": [
+  "webdriver/tests/support/__init__.py": [
    "5a31a3917a5157516c10951a3b3d5ffb43b992d9",
    "support"
   ],
-  "webdriver/support/asserts.py": [
+  "webdriver/tests/support/asserts.py": [
    "68bde3a7b3e3fe3ecd45e43c9fbc3c1317828e08",
    "support"
   ],
-  "webdriver/support/fixtures.py": [
-   "82f0f3b1c668040fa7a0187f00501a2b0f2e2565",
-   "support"
-  ],
-  "webdriver/support/http_request.py": [
+  "webdriver/tests/support/fixtures.py": [
+   "16e53e6ec366ed455c57845263343ec77e1f3f60",
+   "support"
+  ],
+  "webdriver/tests/support/http_request.py": [
    "01c4b525c27f77d253c75031a9cee3f17aca8df0",
    "support"
   ],
-  "webdriver/support/inline.py": [
+  "webdriver/tests/support/inline.py": [
    "bc85126e5637145e81f27d037f3a9090747130c8",
    "support"
   ],
-  "webdriver/support/merge_dictionaries.py": [
+  "webdriver/tests/support/merge_dictionaries.py": [
    "84a6d3c6f8f4afded0f21264bbaeebec38a7f827",
    "support"
   ],
-  "webdriver/window_maximizing.py": [
-   "87faa1445e9923ccf736bda21f32e52792c35013",
+  "webdriver/tests/window_maximizing.py": [
+   "ba6b9109f5baaf6eb300a3f89f984753e9d5adb9",
    "wdspec"
   ],
   "webgl/OWNERS": [
    "f8e0703fe2cc88edd21ef2c94fcb2e1a8889f5ae",
    "support"
   ],
   "webgl/bufferSubData.html": [
    "526612470551a0eb157b310c587d50080087808d",
rename from testing/web-platform/meta/webdriver/contexts.py.ini
rename to testing/web-platform/meta/webdriver/tests/contexts.py.ini
rename from testing/web-platform/meta/webdriver/navigation.py.ini
rename to testing/web-platform/meta/webdriver/tests/navigation.py.ini
new file mode 100644
rename from testing/web-platform/tests/webdriver/actions/__init__.py
rename to testing/web-platform/tests/webdriver/tests/actions/__init__.py
rename from testing/web-platform/tests/webdriver/actions/conftest.py
rename to testing/web-platform/tests/webdriver/tests/actions/conftest.py
--- a/testing/web-platform/tests/webdriver/actions/conftest.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/conftest.py
@@ -26,9 +26,9 @@ def key_reporter(session, test_actions_p
     """Represents focused input element from `test_keys_page` fixture."""
     input_el = session.find.css("#keys", all=False)
     input_el.click()
     return input_el
 
 
 @pytest.fixture
 def test_actions_page(session, url):
-    session.url = url("/webdriver/actions/support/test_actions_wdspec.html")
+    session.url = url("/webdriver/tests/actions/support/test_actions_wdspec.html")
rename from testing/web-platform/tests/webdriver/actions/key.py
rename to testing/web-platform/tests/webdriver/tests/actions/key.py
--- a/testing/web-platform/tests/webdriver/actions/key.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/key.py
@@ -1,12 +1,12 @@
 import pytest
 
-from support.keys import Keys
-from support.refine import filter_dict, get_keys, get_events
+from tests.actions.support.keys import Keys
+from tests.actions.support.refine import filter_dict, get_keys, get_events
 
 
 def test_lone_keyup_sends_no_events(session, key_reporter, key_chain):
     key_chain.key_up("a").perform()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
     session.actions.release()
     assert len(get_keys(key_reporter)) == 0
rename from testing/web-platform/tests/webdriver/actions/mouse.py
rename to testing/web-platform/tests/webdriver/tests/actions/mouse.py
--- a/testing/web-platform/tests/webdriver/actions/mouse.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/mouse.py
@@ -1,17 +1,12 @@
 import pytest
-import urllib
-
-from support.refine import get_events, filter_dict
 
-
-# TODO use support.inline module once available from upstream
-def inline(doc):
-    return "data:text/html;charset=utf-8,%s" % urllib.quote(doc)
+from tests.support.inline import inline
+from tests.actions.support.refine import get_events, filter_dict
 
 
 def link_doc(dest):
     content = "<a href=\"{}\" id=\"link\">destination</a>".format(dest)
     return inline(content)
 
 
 def get_center(rect):
@@ -65,17 +60,17 @@ def test_click_element_center(session, t
     for e in events:
         if e["type"] != "mousemove":
             assert approx(e["pageX"], center["x"])
             assert approx(e["pageY"], center["y"])
             assert e["target"] == "outer"
 
 
 def test_click_navigation(session, url):
-    destination = url("/webdriver/actions/support/test_actions_wdspec.html")
+    destination = url("/webdriver/tests/actions/support/test_actions_wdspec.html")
     start = link_doc(destination)
 
     def click(link):
         mouse_chain = session.actions.sequence(
             "pointer", "pointer_id", {"pointerType": "mouse"})
         mouse_chain.click(element=link).pause(300).perform()
 
     session.url = start
rename from testing/web-platform/tests/webdriver/actions/sequence.py
rename to testing/web-platform/tests/webdriver/tests/actions/sequence.py
--- a/testing/web-platform/tests/webdriver/actions/sequence.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/sequence.py
@@ -1,12 +1,12 @@
 import pytest
 
-from support.refine import get_keys, filter_dict, get_events
-from support.keys import Keys
+from tests.actions.support.refine import get_keys, filter_dict, get_events
+from tests.actions.support.keys import Keys
 
 
 def test_no_actions_send_no_events(session, key_reporter, key_chain):
     key_chain.perform()
     assert len(get_keys(key_reporter)) == 0
     assert len(get_events(session)) == 0
 
 
rename from testing/web-platform/tests/webdriver/actions/special_keys.py
rename to testing/web-platform/tests/webdriver/tests/actions/special_keys.py
--- a/testing/web-platform/tests/webdriver/actions/special_keys.py
+++ b/testing/web-platform/tests/webdriver/tests/actions/special_keys.py
@@ -1,13 +1,13 @@
 # META: timeout=long
 
 import pytest
-from support.keys import ALL_EVENTS, Keys
-from support.refine import filter_dict, get_keys, get_events
+from tests.actions.support.keys import ALL_EVENTS, Keys
+from tests.actions.support.refine import filter_dict, get_keys, get_events
 
 
 @pytest.mark.parametrize("name,expected", ALL_EVENTS.items())
 def test_webdriver_special_key_sends_keydown(session,
                                              key_reporter,
                                              key_chain,
                                              name,
                                              expected):
rename from testing/web-platform/tests/webdriver/actions/support/__init__.py
rename to testing/web-platform/tests/webdriver/tests/actions/support/__init__.py
rename from testing/web-platform/tests/webdriver/actions/support/keys.py
rename to testing/web-platform/tests/webdriver/tests/actions/support/keys.py
rename from testing/web-platform/tests/webdriver/actions/support/refine.py
rename to testing/web-platform/tests/webdriver/tests/actions/support/refine.py
rename from testing/web-platform/tests/webdriver/actions/support/test_actions_wdspec.html
rename to testing/web-platform/tests/webdriver/tests/actions/support/test_actions_wdspec.html
rename from testing/web-platform/tests/webdriver/conftest.py
rename to testing/web-platform/tests/webdriver/tests/conftest.py
--- a/testing/web-platform/tests/webdriver/conftest.py
+++ b/testing/web-platform/tests/webdriver/tests/conftest.py
@@ -1,10 +1,10 @@
 import pytest
-from support.fixtures import (
+from tests.support.fixtures import (
     configuration, create_frame, create_window, http, new_session, server_config, session,
     url)
 
 pytest.fixture(scope="session")(configuration)
 pytest.fixture()(create_frame)
 pytest.fixture()(create_window)
 pytest.fixture()(http)
 pytest.fixture(scope="function")(new_session)
rename from testing/web-platform/tests/webdriver/contexts.py
rename to testing/web-platform/tests/webdriver/tests/contexts.py
rename from testing/web-platform/tests/webdriver/cookies.py
rename to testing/web-platform/tests/webdriver/tests/cookies.py
rename from testing/web-platform/tests/webdriver/navigation.py
rename to testing/web-platform/tests/webdriver/tests/navigation.py
--- a/testing/web-platform/tests/webdriver/navigation.py
+++ b/testing/web-platform/tests/webdriver/tests/navigation.py
@@ -1,14 +1,14 @@
 import json
 import pytest
 import types
 
-from support.inline import inline
-from support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+from tests.support.asserts import assert_error, assert_success
 
 alert_doc = inline("<script>window.alert()</script>")
 frame_doc = inline("<p>frame")
 one_frame_doc = inline("<iframe src='%s'></iframe>" % frame_doc)
 two_frames_doc = inline("<iframe src='%s'></iframe>" % one_frame_doc)
 
 
 # TODO(ato): 7.1 Get
rename from testing/web-platform/tests/webdriver/support/__init__.py
rename to testing/web-platform/tests/webdriver/tests/support/__init__.py
rename from testing/web-platform/tests/webdriver/support/asserts.py
rename to testing/web-platform/tests/webdriver/tests/support/asserts.py
rename from testing/web-platform/tests/webdriver/support/fixtures.py
rename to testing/web-platform/tests/webdriver/tests/support/fixtures.py
--- a/testing/web-platform/tests/webdriver/support/fixtures.py
+++ b/testing/web-platform/tests/webdriver/tests/support/fixtures.py
@@ -1,16 +1,16 @@
 import json
 import os
 import urlparse
 
 import webdriver
 
-from support.http_request import HTTPRequest
-from support import merge_dictionaries
+from tests.support.http_request import HTTPRequest
+from tests.support import merge_dictionaries
 
 default_host = "http://127.0.0.1"
 default_port = "4444"
 
 def _ensure_valid_window(session):
     """If current window is not open anymore, ensure to have a valid one selected."""
     try:
         session.window_handle
rename from testing/web-platform/tests/webdriver/support/http_request.py
rename to testing/web-platform/tests/webdriver/tests/support/http_request.py
rename from testing/web-platform/tests/webdriver/support/inline.py
rename to testing/web-platform/tests/webdriver/tests/support/inline.py
rename from testing/web-platform/tests/webdriver/support/merge_dictionaries.py
rename to testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py
rename from testing/web-platform/tests/webdriver/window_maximizing.py
rename to testing/web-platform/tests/webdriver/tests/window_maximizing.py
--- a/testing/web-platform/tests/webdriver/window_maximizing.py
+++ b/testing/web-platform/tests/webdriver/tests/window_maximizing.py
@@ -1,10 +1,10 @@
-from support.inline import inline
-from support.asserts import assert_error, assert_success
+from tests.support.inline import inline
+from tests.support.asserts import assert_error, assert_success
 
 alert_doc = inline("<script>window.alert()</script>")
 
 # 10.7.3 Maximize Window
 def test_maximize_no_browsing_context(session, create_window):
     # Step 1
     session.window_handle = create_window()
     session.close()