Title: [231841] trunk/WebDriverTests
Revision
231841
Author
carlo...@webkit.org
Date
2018-05-16 01:38:10 -0700 (Wed, 16 May 2018)

Log Message

Unreviewed. Remove W3C deleted files after r231727.

In r231727 W3C WebDriver tests were updated, but only new and modified files, not the deleted (or renamed)
ones. Remove the deleted files and update the test expectations to use the new names.

* TestExpectations.json: Update expectations after test renames in r231727.
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js: Removed.
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js: Removed.
* imported/w3c/webdriver/tests/contexts/json_serialize_windowproxy.py: Removed.
* imported/w3c/webdriver/tests/contexts/maximize_window.py: Removed.
* imported/w3c/webdriver/tests/contexts/resizing_and_positioning.py: Removed.
* imported/w3c/webdriver/tests/cookies/add_cookie.py: Removed.
* imported/w3c/webdriver/tests/cookies/delete_cookie.py: Removed.
* imported/w3c/webdriver/tests/cookies/get_named_cookie.py: Removed.
* imported/w3c/webdriver/tests/document_handling/page_source.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/__init__.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/find_element.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/find_element_from_element.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/find_elements.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/find_elements_from_element.py: Removed.
* imported/w3c/webdriver/tests/element_retrieval/get_active_element.py: Removed.
* imported/w3c/webdriver/tests/fullscreen_window.py: Removed.
* imported/w3c/webdriver/tests/get_window_rect.py: Removed.
* imported/w3c/webdriver/tests/interaction/element_clear.py: Removed.
* imported/w3c/webdriver/tests/interaction/send_keys_content_editable.py: Removed.
* imported/w3c/webdriver/tests/minimize_window.py: Removed.
* imported/w3c/webdriver/tests/navigation/current_url.py: Removed.
* imported/w3c/webdriver/tests/navigation/get_title.py: Removed.
* imported/w3c/webdriver/tests/sessions/get_timeouts.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/conftest.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/create_alwaysMatch.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/create_firstMatch.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/default_values.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/invalid_capabilities.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/merge.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/response.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/support/__init__.py: Removed.
* imported/w3c/webdriver/tests/sessions/new_session/support/create.py: Removed.
* imported/w3c/webdriver/tests/sessions/status.py: Removed.
* imported/w3c/webdriver/tests/set_window_rect.py: Removed.
* imported/w3c/webdriver/tests/state/__init__.py: Removed.
* imported/w3c/webdriver/tests/state/get_element_attribute.py: Removed.
* imported/w3c/webdriver/tests/state/get_element_property.py: Removed.
* imported/w3c/webdriver/tests/state/get_element_tag_name.py: Removed.
* imported/w3c/webdriver/tests/state/is_element_selected.py: Removed.
* imported/w3c/webdriver/tests/state/text/__init__.py: Removed.
* imported/w3c/webdriver/tests/state/text/get_text.py: Removed.
* imported/w3c/webdriver/tests/switch_to_parent_frame.py: Removed.
* imported/w3c/webdriver/tests/user_prompts/accept_alert.py: Removed.
* imported/w3c/webdriver/tests/user_prompts/dismiss_alert.py: Removed.
* imported/w3c/webdriver/tests/user_prompts/get_alert_text.py: Removed.
* imported/w3c/webdriver/tests/user_prompts/send_alert_text.py: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/WebDriverTests/ChangeLog (231840 => 231841)


--- trunk/WebDriverTests/ChangeLog	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/ChangeLog	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,3 +1,58 @@
+2018-05-16  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        Unreviewed. Remove W3C deleted files after r231727.
+
+        In r231727 W3C WebDriver tests were updated, but only new and modified files, not the deleted (or renamed)
+        ones. Remove the deleted files and update the test expectations to use the new names.
+
+        * TestExpectations.json: Update expectations after test renames in r231727.
+        * imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js: Removed.
+        * imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js: Removed.
+        * imported/w3c/webdriver/tests/contexts/json_serialize_windowproxy.py: Removed.
+        * imported/w3c/webdriver/tests/contexts/maximize_window.py: Removed.
+        * imported/w3c/webdriver/tests/contexts/resizing_and_positioning.py: Removed.
+        * imported/w3c/webdriver/tests/cookies/add_cookie.py: Removed.
+        * imported/w3c/webdriver/tests/cookies/delete_cookie.py: Removed.
+        * imported/w3c/webdriver/tests/cookies/get_named_cookie.py: Removed.
+        * imported/w3c/webdriver/tests/document_handling/page_source.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/__init__.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/find_element.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/find_element_from_element.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/find_elements.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/find_elements_from_element.py: Removed.
+        * imported/w3c/webdriver/tests/element_retrieval/get_active_element.py: Removed.
+        * imported/w3c/webdriver/tests/fullscreen_window.py: Removed.
+        * imported/w3c/webdriver/tests/get_window_rect.py: Removed.
+        * imported/w3c/webdriver/tests/interaction/element_clear.py: Removed.
+        * imported/w3c/webdriver/tests/interaction/send_keys_content_editable.py: Removed.
+        * imported/w3c/webdriver/tests/minimize_window.py: Removed.
+        * imported/w3c/webdriver/tests/navigation/current_url.py: Removed.
+        * imported/w3c/webdriver/tests/navigation/get_title.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/get_timeouts.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/conftest.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/create_alwaysMatch.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/create_firstMatch.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/default_values.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/invalid_capabilities.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/merge.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/response.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/support/__init__.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/new_session/support/create.py: Removed.
+        * imported/w3c/webdriver/tests/sessions/status.py: Removed.
+        * imported/w3c/webdriver/tests/set_window_rect.py: Removed.
+        * imported/w3c/webdriver/tests/state/__init__.py: Removed.
+        * imported/w3c/webdriver/tests/state/get_element_attribute.py: Removed.
+        * imported/w3c/webdriver/tests/state/get_element_property.py: Removed.
+        * imported/w3c/webdriver/tests/state/get_element_tag_name.py: Removed.
+        * imported/w3c/webdriver/tests/state/is_element_selected.py: Removed.
+        * imported/w3c/webdriver/tests/state/text/__init__.py: Removed.
+        * imported/w3c/webdriver/tests/state/text/get_text.py: Removed.
+        * imported/w3c/webdriver/tests/switch_to_parent_frame.py: Removed.
+        * imported/w3c/webdriver/tests/user_prompts/accept_alert.py: Removed.
+        * imported/w3c/webdriver/tests/user_prompts/dismiss_alert.py: Removed.
+        * imported/w3c/webdriver/tests/user_prompts/get_alert_text.py: Removed.
+        * imported/w3c/webdriver/tests/user_prompts/send_alert_text.py: Removed.
+
 2018-05-11  Brian Burg  <bb...@apple.com>
 
         Unreviewed. Update W3C WebDriver imported tests.

Modified: trunk/WebDriverTests/TestExpectations.json (231840 => 231841)


--- trunk/WebDriverTests/TestExpectations.json	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/TestExpectations.json	2018-05-16 08:38:10 UTC (rev 231841)
@@ -503,38 +503,23 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/contexts/maximize_window.py": {
+    "imported/w3c/webdriver/tests/maximize_window/maximize.py": {
+        "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
+    },
+    "imported/w3c/webdriver/tests/maximize_window/user_prompts.py": {
         "subtests": {
-            "test_no_browsing_context": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
             "test_handle_prompt_accept": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
             },
             "test_handle_prompt_missing_value": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
-            "test_fully_exit_fullscreen": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
-            "test_restore_the_window": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
-            "test_maximize": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
-            "test_payload": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
-            },
-            "test_maximize_twice_is_idempotent": {
-                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
             }
         }
     },
-    "imported/w3c/webdriver/tests/contexts/json_serialize_windowproxy.py": {
+    "imported/w3c/webdriver/tests/execute_script/json_serialize_windowproxy.py": {
         "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180397"}}
     },
-    "imported/w3c/webdriver/tests/cookies/get_named_cookie.py": {
+    "imported/w3c/webdriver/tests/get_named_cookie/get.py": {
         "subtests": {
             "test_duplicated_cookie": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/182330"}}
@@ -541,7 +526,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/document_handling/page_source.py": {
+    "imported/w3c/webdriver/tests/page_source/source.py": {
         "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180399"}}
     },
     "imported/w3c/webdriver/tests/element_click/bubbling.py": {
@@ -551,7 +536,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/element_retrieval/find_element.py": {
+    "imported/w3c/webdriver/tests/find_element/find.py": {
         "subtests": {
             "test_find_element_link_text[<a href="" {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184964"}}
@@ -567,7 +552,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/element_retrieval/find_elements.py": {
+    "imported/w3c/webdriver/tests/find_elements/find.py": {
         "subtests": {
             "test_find_elements_link_text[<a href="" {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184964"}}
@@ -583,7 +568,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/element_retrieval/find_elements_from_element.py": {
+    "imported/w3c/webdriver/tests/find_elements_from_element/find.py": {
         "subtests": {
             "test_find_elements_link_text[<a href="" {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184964"}}
@@ -599,7 +584,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/element_retrieval/find_element_from_element.py": {
+    "imported/w3c/webdriver/tests/find_element_from_element/find.py": {
         "subtests": {
             "test_find_element_link_text[<a href="" {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/184964"}}
@@ -688,10 +673,10 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/interaction/send_keys_content_editable.py": {
+    "imported/w3c/webdriver/tests/element_send_keys/content_editable.py": {
         "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180403"}}
     },
-    "imported/w3c/webdriver/tests/interaction/element_clear.py": {
+    "imported/w3c/webdriver/tests/element_clear/clear.py": {
         "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180404"}},
         "subtests": {
             "test_no_browsing_context": {
@@ -711,7 +696,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/navigation/current_url.py": {
+    "imported/w3c/webdriver/tests/get_current_url/get.py": {
         "subtests": {
             "test_set_malformed_url": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180405"}}
@@ -724,7 +709,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/sessions/new_session/invalid_capabilities.py": {
+    "imported/w3c/webdriver/tests/new_session/invalid_capabilities.py": {
         "subtests": {
             "test_invalid_values[proxy-1-body0]": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180408"}}
@@ -836,7 +821,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/sessions/new_session/default_values.py": {
+    "imported/w3c/webdriver/tests/new_session/default_values.py": {
         "subtests": {
             "test_valid_but_unmatchable_key": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180410"}}
@@ -843,7 +828,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/state/get_element_property.py": {
+    "imported/w3c/webdriver/tests/get_element_property/get.py": {
         "subtests": {
             "test_element_not_found": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180413"}}
@@ -850,7 +835,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/state/get_element_attribute.py": {
+    "imported/w3c/webdriver/tests/get_element_attribute/get.py": {
         "subtests": {
             "test_element_not_found": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180413"}}
@@ -884,7 +869,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/state/get_element_tag_name.py": {
+    "imported/w3c/webdriver/tests/get_element_tag_name/get.py": {
         "subtests": {
             "test_element_not_found": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180413"}}
@@ -891,7 +876,7 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/state/text/get_text.py": {
+    "imported/w3c/webdriver/tests/get_element_text/get.py": {
         "subtests": {
             "test_getting_text_of_a_non_existant_element_is_an_error": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180413"}}
@@ -898,7 +883,10 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/fullscreen_window.py": {
+    "imported/w3c/webdriver/tests/fullscreen_window/fullscreen.py": {
+        "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
+    },
+    "imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py": {
         "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}},
         "subtests": {
             "test_handle_prompt_dismiss_and_notify": {
@@ -912,21 +900,20 @@
             }
         }
     },
-    "imported/w3c/webdriver/tests/minimize_window.py": {
-        "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}},
+    "imported/w3c/webdriver/tests/minimize_window/minimize.py": {
+        "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
+    },
+    "imported/w3c/webdriver/tests/minimize_window/user_prompts.py": {
         "subtests": {
-            "test_handle_prompt_dismiss_and_notify": {
-                "expected": {"all": {"status": ["PASS"]}}
+            "test_handle_prompt_accept": {
+                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
             },
-            "test_handle_prompt_accept_and_notify": {
-                "expected": {"all": {"status": ["PASS"]}}
-            },
-            "test_handle_prompt_ignore": {
-                "expected": {"all": {"status": ["PASS"]}}
+            "test_handle_prompt_missing_value": {
+                "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}
             }
         }
     },
-    "imported/w3c/webdriver/tests/set_window_rect.py": {
+    "imported/w3c/webdriver/tests/set_window_rect/set.py": {
         "subtests": {
             "test_fully_exit_fullscreen": {
                 "expected": {"all": {"status": ["FAIL"], "bug": "webkit.org/b/180398"}}

Deleted: trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,24 +0,0 @@
-window.timeout_multiplier = %(timeout_multiplier)d;
-window.explicit_timeout = %(explicit_timeout)d;
-
-window.message_queue = [];
-
-window.setMessageListener = function(func) {
-  window.current_listener = func;
-  window.addEventListener(
-    "message",
-    func,
-    false
-  );
-};
-
-window.setMessageListener(function(event) {
-  window.message_queue.push(event);
-});
-
-window.win = window.open("%(abs_url)s", "%(window_id)s");
-
-window.timer = setTimeout(function() {
-  window.win.timeout();
-  window.win.close();
-}, %(timeout)s);

Deleted: trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,46 +0,0 @@
-var callback = arguments[arguments.length - 1];
-
-function process_event(event) {
-  var data = ""
-
-  var payload = undefined;
-
-  switch(data.type) {
-  case "complete":
-    var tests = event.data.tests;
-    var status = event.data.status;
-
-    var subtest_results = tests.map(function(x) {
-      return [x.name, x.status, x.message, x.stack];
-    });
-    payload = [status.status,
-               status.message,
-               status.stack,
-               subtest_results];
-    clearTimeout(window.timer);
-    break;
-
-  case "action":
-    window.setMessageListener(function(event) {
-      window.message_queue.push(event);
-    });
-    payload = data;
-    break;
-  default:
-    return;
-  }
-
-  callback(["%(url)s", data.type, payload]);
-}
-
-window.removeEventListener("message", window.current_listener);
-if (window.message_queue.length) {
-  var next = window.message_queue.shift();
-  process_event(next);
-} else {
-  window.addEventListener(
-    "message", function f(event) {
-      window.removeEventListener("message", f);
-      process_event(event);
-    }, false);
-}

Deleted: trunk/WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window.py (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window.py	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window.py	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,210 +0,0 @@
-# META: timeout=long
-
-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
-
-
-alert_doc = inline("<script>window.alert()</script>")
-
-
-def read_global(session, name):
-    return session.execute_script("return %s;" % name)
-
-
-def fullscreen(session):
-    return session.transport.send("POST", "session/%s/window/fullscreen" % session.session_id)
-
-
-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
-
-
-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_handle_prompt_dismiss_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_accept_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_ignore():
-    """TODO"""
-
-
-def test_handle_prompt_accept(new_session, add_browser_capabilites):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - accept state
-           Accept the current user prompt.
-
-    """
-    _, session = new_session({"capabilities": {"alwaysMatch": add_browser_capabilites({"unhandledPromptBehavior": "accept"})}})
-    session.url = "" doc title</title>")
-    create_dialog(session)("alert", text="accept #1", result_var="accept1")
-
-    response = fullscreen(session)
-
-    assert_dialog_handled(session, "accept #1")
-    assert read_global(session, "accept1") == None
-
-    expected_title = read_global(session, "document.title")
-    create_dialog(session)("confirm", text="accept #2", result_var="accept2")
-
-    response = fullscreen(session)
-
-    assert_dialog_handled(session, "accept #2")
-    assert read_global(session, "accept2"), True
-
-    create_dialog(session)("prompt", text="accept #3", result_var="accept3")
-
-    response = 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):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - missing value default state
-           1. Dismiss the current user prompt.
-           2. Return error with error code unexpected alert open.
-
-    """
-    session.url = "" doc title</title>")
-    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
-
-    response = fullscreen(session)
-
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #1")
-    assert read_global(session, "dismiss1") == None
-
-    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
-
-    response = fullscreen(session)
-
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #2")
-    assert read_global(session, "dismiss2") == False
-
-    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
-
-    response = fullscreen(session)
-
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #3")
-    assert read_global(session, "dismiss3") == None
-
-
-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
-    assert isinstance(value["width"], int)
-    assert isinstance(value["height"], int)
-    assert isinstance(value["x"], int)
-    assert isinstance(value["y"], int)
-
-
-def test_fullscreen_twice_is_idempotent(session):
-    assert is_fullscreen(session) is False
-
-    first_response = fullscreen(session)
-    assert_success(first_response)
-    assert is_fullscreen(session) is True
-
-    second_response = fullscreen(session)
-    assert_success(second_response)
-    assert is_fullscreen(session) is True

Deleted: trunk/WebDriverTests/imported/w3c/webdriver/tests/get_window_rect.py (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/webdriver/tests/get_window_rect.py	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/get_window_rect.py	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,160 +0,0 @@
-from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
-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("GET", "session/%s/window/rect" % session.session_id)
-
-
-# 10.7.1 Get Window Rect
-
-
-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_handle_prompt_dismiss_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_accept_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_ignore():
-    """TODO"""
-
-
-def test_handle_prompt_accept(new_session, add_browser_capabilites):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - accept state
-           Accept the current user prompt.
-
-    """
-    _, session = new_session({"capabilities": {"alwaysMatch": add_browser_capabilites({"unhandledPromptBehavior": "accept"})}})
-    session.url = "" doc title</title>")
-
-    create_dialog(session)("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")
-    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")
-    response = get_window_rect(session)
-    assert response.status == 200
-    assert_dialog_handled(session, "dismiss #3")
-
-
-def test_handle_prompt_missing_value(session, create_dialog):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - missing value default state
-           1. Dismiss the current user prompt.
-           2. Return error with error code unexpected alert open.
-
-    """
-    session.url = "" doc title</title>")
-    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
-
-    response = get_window_rect(session)
-
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #1")
-
-    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
-
-    response = get_window_rect(session)
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #2")
-
-    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
-
-    response = get_window_rect(session)
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #3")
-
-
-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,
-         width: window.outerWidth,
-         height: window.outerHeight
-    }""")
-    assert expected == value

Deleted: trunk/WebDriverTests/imported/w3c/webdriver/tests/minimize_window.py (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/webdriver/tests/minimize_window.py	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/minimize_window.py	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,230 +0,0 @@
-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
-
-
-alert_doc = inline("<script>window.alert()</script>")
-
-
-def minimize(session):
-    return session.transport.send("POST", "session/%s/window/minimize" % session.session_id)
-
-
-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
-
-
-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_handle_prompt_dismiss_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_accept_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_ignore():
-    """TODO"""
-
-
-def test_handle_prompt_accept(new_session, add_browser_capabilites):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - accept state
-           Accept the current user prompt.
-
-    """
-    _, session = new_session({"capabilities": {"alwaysMatch": add_browser_capabilites({"unhandledPromptBehavior": "accept"})}})
-    session.url = "" doc title</title>")
-
-    create_dialog(session)("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")
-    response = minimize(session)
-    assert response.status == 200
-    assert_dialog_handled(session, "dismiss #2")
-
-    create_dialog(session)("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):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - missing value default state
-           1. Dismiss the current user prompt.
-           2. Return error with error code unexpected alert open.
-
-    """
-    session.url = "" doc title</title>")
-    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
-
-    response = minimize(session)
-
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #1")
-
-    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
-
-    response = minimize(session)
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #2")
-
-    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
-
-    response = minimize(session)
-    assert_error(response, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #3")
-
-
-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"]
-    assert "width" in value
-    assert "height" in value
-    assert "x" in value
-    assert "y" in value
-    assert isinstance(value["width"], int)
-    assert isinstance(value["height"], int)
-    assert isinstance(value["x"], int)
-    assert isinstance(value["y"], int)
-
-    assert session.execute_script("return document.hidden")
-
-
-def test_minimize_twice_is_idempotent(session):
-    assert not session.execute_script("return document.hidden")
-
-    first_response = minimize(session)
-    assert_success(first_response)
-    assert session.execute_script("return document.hidden")
-
-    second_response = minimize(session)
-    assert_success(second_response)
-    assert session.execute_script("return document.hidden")

Deleted: trunk/WebDriverTests/imported/w3c/webdriver/tests/set_window_rect.py (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/webdriver/tests/set_window_rect.py	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/set_window_rect.py	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,510 +0,0 @@
-# META: timeout=long
-
-import pytest
-
-from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
-from tests.support.fixtures import create_dialog
-from tests.support.inline import inline
-
-
-alert_doc = inline("<script>window.alert()</script>")
-
-
-def set_window_rect(session, rect):
-    return session.transport.send("POST", "session/%s/window/rect" % session.session_id, 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
-
-
-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")
-
-
-def test_handle_prompt_dismiss():
-    """TODO"""
-
-
-def test_handle_prompt_accept(new_session, add_browser_capabilites):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - accept state
-           Accept the current user prompt.
-
-    """
-    _, session = new_session({"capabilities": {"alwaysMatch": add_browser_capabilites({"unhandledPromptBehavior": "accept"})}})
-    original = session.window.rect
-
-    # step 2
-    create_dialog(session)("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")
-    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")
-    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"""
-
-
-def test_handle_prompt_accept_and_notify():
-    """TODO"""
-
-
-def test_handle_prompt_ignore():
-    """TODO"""
-
-
-def test_handle_prompt_missing_value(session, create_dialog):
-    """
-    2. Handle any user prompts and return its value if it is an error.
-
-    [...]
-
-    In order to handle any user prompts a remote end must take the
-    following steps:
-
-      [...]
-
-      2. Perform the following substeps based on the current session's
-      user prompt handler:
-
-        [...]
-
-        - missing value default state
-           1. Dismiss the current user prompt.
-           2. Return error with error code unexpected alert open.
-
-    """
-
-    original = session.window.rect
-
-    # step 2
-    create_dialog("alert", text="dismiss #1", result_var="dismiss1")
-
-    result = set_window_rect(session, {"x": original["x"],
-                                       "y": original["y"]})
-    assert_error(result, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #1")
-
-    create_dialog("confirm", text="dismiss #2", result_var="dismiss2")
-
-    result = set_window_rect(session, {"x": original["x"],
-                                       "y": original["y"]})
-    assert_error(result, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #2")
-
-    create_dialog("prompt", text="dismiss #3", result_var="dismiss3")
-
-    result = set_window_rect(session, {"x": original["x"],
-                                       "y": original["y"]})
-    assert_error(result, "unexpected alert open")
-    assert_dialog_handled(session, "dismiss #3")
-
-
-@pytest.mark.parametrize("rect", [
-    {"width": "a"},
-    {"height": "b"},
-    {"width": "a", "height": "b"},
-    {"x": "a"},
-    {"y": "b"},
-    {"x": "a", "y": "b"},
-    {"width": "a", "height": "b", "x": "a", "y": "b"},
-
-    {"width": True},
-    {"height": False},
-    {"width": True, "height": False},
-    {"x": True},
-    {"y": False},
-    {"x": True, "y": False},
-    {"width": True, "height": False, "x": True, "y": False},
-
-    {"width": []},
-    {"height": []},
-    {"width": [], "height": []},
-    {"x": []},
-    {"y": []},
-    {"x": [], "y": []},
-    {"width": [], "height": [], "x": [], "y": []},
-
-    {"height": {}},
-    {"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
-    assert value["y"] == 450
-
-
-@pytest.mark.parametrize("rect", [
-    {},
-
-    {"width": None},
-    {"height": None},
-    {"width": None, "height": None},
-
-    {"x": None},
-    {"y": None},
-    {"x": None, "y": None},
-
-    {"width": None, "x": None},
-    {"width": None, "y": None},
-    {"height": None, "x": None},
-    {"height": None, "Y": None},
-
-    {"width": None, "height": None, "x": None, "y": None},
-
-    {"width": 200},
-    {"height": 200},
-    {"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
-
-
-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})
-
-
-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
-    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"]})
-
-
-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"]})
-
-
-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"]
-
-    # On macOS, windows can only be moved off the screen on the
-    # horizontal axis.  The system menu bar also blocks windows from
-    # being moved to (0,0).
-    elif os == "darwin":
-        assert_success(response, {"x": -8,
-                                  "y": 23,
-                                  "width": original["width"],
-                                  "height": original["height"]})
-
-    # It turns out that Windows is the only platform on which the
-    # window can be reliably positioned off-screen.
-    elif os == "windows_nt":
-        assert_success(response, {"x": -8,
-                                  "y": -8,
-                                  "width": original["width"],
-                                  "height": original["height"]})
-
-
-def test_move_to_same_position(session):
-    original_position = session.window.position
-    position = session.window.position = original_position
-    assert position == original_position
-
-
-def test_move_to_same_x(session):
-    original_x = session.window.position[0]
-    position = session.window.position = (original_x, 345)
-    assert position == (original_x, 345)
-
-
-def test_move_to_same_y(session):
-    original_y = session.window.position[1]
-    position = session.window.position = (456, original_y)
-    assert position == (456, original_y)
-
-
-def test_resize_to_same_size(session):
-    original_size = session.window.size
-    size = session.window.size = original_size
-    assert size == original_size
-
-
-def test_resize_to_same_width(session):
-    original_width = session.window.size[0]
-    size = session.window.size = (original_width, 345)
-    assert size == (original_width, 345)
-
-
-def test_resize_to_same_height(session):
-    original_height = session.window.size[1]
-    size = session.window.size = (456, original_height)
-    assert size == (456, original_height)
-
-
-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
-    assert "y" in value
-    assert isinstance(value["width"], int)
-    assert isinstance(value["height"], int)
-    assert isinstance(value["x"], int)
-    assert isinstance(value["y"], int)

Deleted: trunk/WebDriverTests/imported/w3c/webdriver/tests/switch_to_parent_frame.py (231840 => 231841)


--- trunk/WebDriverTests/imported/w3c/webdriver/tests/switch_to_parent_frame.py	2018-05-16 08:27:54 UTC (rev 231840)
+++ trunk/WebDriverTests/imported/w3c/webdriver/tests/switch_to_parent_frame.py	2018-05-16 08:38:10 UTC (rev 231841)
@@ -1,18 +0,0 @@
-import pytest
-from webdriver import StaleElementReferenceException
-
-from tests.support.inline import inline, iframe
-
-
-def switch_to_parent_frame(session):
-    return session.transport.send("POST", "session/%s/frame/parent" % session.session_id)
-
-
-def test_stale_element_from_iframe(session):
-    session.url = ""
-    frame_element = session.find.css("iframe", all=False)
-    session.switch_frame(frame_element)
-    stale_element = session.find.css("p", all=False)
-    switch_to_parent_frame(session)
-    with pytest.raises(StaleElementReferenceException):
-        stale_element.text
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to