Commit 76d6e299 authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[blinkpy] Roll WPT tools

Importantly, this rolls some webdriver/ changes that will fix the
regression in issue 1115609. Removed the related expectations introduced
in the import https://crrev.com/c/2351549 as well.

Bug: 1115609
Change-Id: I5f0ebfc1d657556e166fc6d433b24f3f2ff8a14a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351383Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797422}
parent 0941ac83
...@@ -22,7 +22,7 @@ Local Modifications: None ...@@ -22,7 +22,7 @@ Local Modifications: None
Name: web-platform-tests - Test Suites for Web Platform specifications Name: web-platform-tests - Test Suites for Web Platform specifications
Short Name: wpt Short Name: wpt
URL: https://github.com/web-platform-tests/wpt/ URL: https://github.com/web-platform-tests/wpt/
Version: 6a5c1eb4f386da68adc77c84ac3f6e3fa1cb3033 Version: da260d2136bc4bec547fa7ebe98598d77e0f5841
License: LICENSES FOR W3C TEST SUITES (https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html) License: LICENSES FOR W3C TEST SUITES (https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
License File: wpt/wpt/LICENSE.md License File: wpt/wpt/LICENSE.md
Security Critical: no Security Critical: no
......
...@@ -9,7 +9,7 @@ cd $DIR ...@@ -9,7 +9,7 @@ cd $DIR
TARGET_DIR=$DIR/wpt TARGET_DIR=$DIR/wpt
REMOTE_REPO="https://github.com/web-platform-tests/wpt.git" REMOTE_REPO="https://github.com/web-platform-tests/wpt.git"
WPT_HEAD=6a5c1eb4f386da68adc77c84ac3f6e3fa1cb3033 WPT_HEAD=da260d2136bc4bec547fa7ebe98598d77e0f5841
function clone { function clone {
# Remove existing repo if already exists. # Remove existing repo if already exists.
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"parser": "get_parser", "parser": "get_parser",
"help": "Run wptserve server for WAVE", "help": "Run wptserve server for WAVE",
"virtualenv": true, "virtualenv": true,
"install": ["ua-parser"],
"requirements": ["../wave/requirements.txt"] "requirements": ["../wave/requirements.txt"]
} }
} }
...@@ -242,6 +242,15 @@ class Window(object): ...@@ -242,6 +242,15 @@ class Window(object):
def __init__(self, session): def __init__(self, session):
self.session = session self.session = session
@command
def close(self):
handles = self.session.send_session_command("DELETE", "window")
if handles is not None and len(handles) == 0:
# With no more open top-level browsing contexts, the session is closed.
self.session.session_id = None
return handles
@property @property
@command @command
def rect(self): def rect(self):
...@@ -548,6 +557,13 @@ class Session(object): ...@@ -548,6 +557,13 @@ class Session(object):
def source(self): def source(self):
return self.send_session_command("GET", "source") return self.send_session_command("GET", "source")
@command
def new_window(self, type_hint=None):
body = {"type": type_hint}
value = self.send_session_command("POST", "window/new", body)
return value["handle"]
@property @property
@command @command
def window_handle(self): def window_handle(self):
...@@ -569,15 +585,6 @@ class Session(object): ...@@ -569,15 +585,6 @@ class Session(object):
return self.send_session_command("POST", url, body) return self.send_session_command("POST", url, body)
@command
def close(self):
handles = self.send_session_command("DELETE", "window")
if handles is not None and len(handles) == 0:
# With no more open top-level browsing contexts, the session is closed.
self.session_id = None
return handles
@property @property
@command @command
def handles(self): def handles(self):
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
"help": "Run tests in a browser", "help": "Run tests in a browser",
"virtualenv": true, "virtualenv": true,
"install": [ "install": [
"requests",
"zstandard" "zstandard"
], ],
"requirements": [ "requirements": [
...@@ -25,9 +24,6 @@ ...@@ -25,9 +24,6 @@
"parser": "create_parser_update", "parser": "create_parser_update",
"help": "Update expectations files from raw logs.", "help": "Update expectations files from raw logs.",
"virtualenv": true, "virtualenv": true,
"install": [
"requests"
],
"requirements": [ "requirements": [
"../wptrunner/requirements.txt" "../wptrunner/requirements.txt"
] ]
...@@ -51,6 +47,7 @@ ...@@ -51,6 +47,7 @@
"script": "run", "script": "run",
"parser": "get_parser", "parser": "get_parser",
"help": "Install browser components", "help": "Install browser components",
"virtualenv": true,
"install": [ "install": [
"mozinstall" "mozinstall"
] ]
......
...@@ -38,6 +38,8 @@ def load_commands(): ...@@ -38,6 +38,8 @@ def load_commands():
"requirements": [os.path.join(base_dir, item) "requirements": [os.path.join(base_dir, item)
for item in props.get("requirements", [])] for item in props.get("requirements", [])]
} }
if rv[command]["install"] or rv[command]["requirements"]:
assert rv[command]["virtualenv"]
return rv return rv
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment