Commit 766eaa49 authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

Roll in a new version of WPT tools

Mainly for https://github.com/web-platform-tests/wpt/pull/11344

Rebaselined some affected infra tests.
(Note: a SAB test in html/infrastructure is now failing instead of
timing out because of the wptserve change. The failure is expected
because SAB is currently disabled, so we change the expectation
accordingly.)

Bug: 854473
Change-Id: I0f3218328992141033a593be0882c436ec7ff7a6
Reviewed-on: https://chromium-review.googlesource.com/1108744
Commit-Queue: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569200}
parent c2abf730
...@@ -2828,9 +2828,7 @@ crbug.com/849859 external/wpt/web-animations/timing-model/animations/pausing-an- ...@@ -2828,9 +2828,7 @@ crbug.com/849859 external/wpt/web-animations/timing-model/animations/pausing-an-
# ====== New tests from wpt-importer added here ====== # ====== New tests from wpt-importer added here ======
crbug.com/626703 external/wpt/css/css-scoping/shadow-directionality-002.tentative.html [ Failure ] crbug.com/626703 external/wpt/css/css-scoping/shadow-directionality-002.tentative.html [ Failure ]
crbug.com/626703 external/wpt/infrastructure/server/order-of-metas.any.worker.html [ Timeout ]
crbug.com/626703 external/wpt/css/css-scoping/shadow-directionality-001.tentative.html [ Failure ] crbug.com/626703 external/wpt/css/css-scoping/shadow-directionality-001.tentative.html [ Failure ]
crbug.com/626703 external/wpt/infrastructure/server/order-of-metas.any.sharedworker.html [ Timeout ]
crbug.com/626703 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Timeout ] crbug.com/626703 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Timeout ]
crbug.com/626703 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Timeout ] crbug.com/626703 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Timeout ]
crbug.com/626703 external/wpt/screen-orientation/orientation-reading.html [ Timeout ] crbug.com/626703 external/wpt/screen-orientation/orientation-reading.html [ Timeout ]
...@@ -3849,9 +3847,6 @@ crbug.com/709227 external/wpt/user-timing/invoke_with_timing_attributes.worker.h ...@@ -3849,9 +3847,6 @@ crbug.com/709227 external/wpt/user-timing/invoke_with_timing_attributes.worker.h
crbug.com/706804 external/wpt/console/console-tests-historical.any.html [ Skip ] crbug.com/706804 external/wpt/console/console-tests-historical.any.html [ Skip ]
crbug.com/706804 external/wpt/console/console-tests-historical.any.worker.html [ Skip ] crbug.com/706804 external/wpt/console/console-tests-historical.any.worker.html [ Skip ]
# Timeouts
crbug.com/709227 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.worker.html [ Timeout ]
# Crashes # Crashes
crbug.com/709227 external/wpt/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.html [ Crash ] crbug.com/709227 external/wpt/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.html [ Crash ]
...@@ -3920,6 +3915,7 @@ crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-dat ...@@ -3920,6 +3915,7 @@ crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-dat
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-transferring.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-transferring.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.worker.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.worker.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.worker.html [ Failure ]
crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub.html [ Failure ] crbug.com/798864 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.sub.html [ Failure ]
......
This is a testharness.js-based test.
FAIL order of scripts assert_array_equals: value is undefined, expected array
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL order of scripts assert_array_equals: value is undefined, expected array
Harness: the test ran to completion.
...@@ -32,7 +32,7 @@ Local Modifications: None ...@@ -32,7 +32,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: 08725607251e2116a389b878634522905048b4b7 Version: 4321fff7672396a92873a3e4b36cf2305c56369a
License: LICENSES FOR W3C TEST SUITES (http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html) License: LICENSES FOR W3C TEST SUITES (http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.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://chromium.googlesource.com/external/github.com/web-platform-tests/wpt.git" REMOTE_REPO="https://chromium.googlesource.com/external/github.com/web-platform-tests/wpt.git"
WPT_HEAD=08725607251e2116a389b878634522905048b4b7 WPT_HEAD=4321fff7672396a92873a3e4b36cf2305c56369a
function clone { function clone {
# Remove existing repo if already exists. # Remove existing repo if already exists.
......
...@@ -65,7 +65,8 @@ class WrapperHandler(object): ...@@ -65,7 +65,8 @@ class WrapperHandler(object):
if query: if query:
query = "?" + query query = "?" + query
meta = "\n".join(self._get_meta(request)) meta = "\n".join(self._get_meta(request))
response.content = self.wrapper % {"meta": meta, "path": path, "query": query} script = "\n".join(self._get_script(request))
response.content = self.wrapper % {"meta": meta, "script": script, "path": path, "query": query}
wrap_pipeline(path, request, response) wrap_pipeline(path, request, response)
def _get_path(self, path, resource_path): def _get_path(self, path, resource_path):
...@@ -93,7 +94,7 @@ class WrapperHandler(object): ...@@ -93,7 +94,7 @@ class WrapperHandler(object):
return path return path
def _get_metadata(self, request): def _get_metadata(self, request):
"""Get an iterator over script metadata based on //META comments in the """Get an iterator over script metadata based on // META comments in the
associated js file. associated js file.
:param request: The Request being processed. :param request: The Request being processed.
...@@ -105,7 +106,7 @@ class WrapperHandler(object): ...@@ -105,7 +106,7 @@ class WrapperHandler(object):
def _get_meta(self, request): def _get_meta(self, request):
"""Get an iterator over strings to inject into the wrapper document """Get an iterator over strings to inject into the wrapper document
based on //META comments in the associated js file. based on // META comments in the associated js file.
:param request: The Request being processed. :param request: The Request being processed.
""" """
...@@ -114,6 +115,17 @@ class WrapperHandler(object): ...@@ -114,6 +115,17 @@ class WrapperHandler(object):
if replacement: if replacement:
yield replacement yield replacement
def _get_script(self, request):
"""Get an iterator over strings to inject into the wrapper document
based on // META comments in the associated js file.
:param request: The Request being processed.
"""
for key, value in self._get_metadata(request):
replacement = self._script_replacement(key, value)
if replacement:
yield replacement
@abc.abstractproperty @abc.abstractproperty
def path_replace(self): def path_replace(self):
# A list containing a mix of 2 item tuples with (input suffix, output suffix) # A list containing a mix of 2 item tuples with (input suffix, output suffix)
...@@ -159,14 +171,17 @@ class HtmlWrapperHandler(WrapperHandler): ...@@ -159,14 +171,17 @@ class HtmlWrapperHandler(WrapperHandler):
if key == b"timeout": if key == b"timeout":
if value == b"long": if value == b"long":
return '<meta name="timeout" content="long">' return '<meta name="timeout" content="long">'
if key == b"script":
attribute = value.decode('utf-8').replace("&", "&amp;").replace('"', "&quot;")
return '<script src="%s"></script>' % attribute
if key == b"title": if key == b"title":
value = value.decode('utf-8').replace("&", "&amp;").replace("<", "&lt;") value = value.decode('utf-8').replace("&", "&amp;").replace("<", "&lt;")
return '<title>%s</title>' % value return '<title>%s</title>' % value
return None return None
def _script_replacement(self, key, value):
if key == b"script":
attribute = value.decode('utf-8').replace("&", "&amp;").replace('"', "&quot;")
return '<script src="%s"></script>' % attribute
return None
class WorkersHandler(HtmlWrapperHandler): class WorkersHandler(HtmlWrapperHandler):
global_type = b"dedicatedworker" global_type = b"dedicatedworker"
...@@ -191,6 +206,7 @@ class WindowHandler(HtmlWrapperHandler): ...@@ -191,6 +206,7 @@ class WindowHandler(HtmlWrapperHandler):
%(meta)s %(meta)s
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
%(script)s
<div id=log></div> <div id=log></div>
<script src="%(path)s"></script> <script src="%(path)s"></script>
""" """
...@@ -210,6 +226,7 @@ self.GLOBAL = { ...@@ -210,6 +226,7 @@ self.GLOBAL = {
</script> </script>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
%(script)s
<div id=log></div> <div id=log></div>
<script src="%(path)s"></script> <script src="%(path)s"></script>
""" """
...@@ -260,11 +277,15 @@ self.GLOBAL = { ...@@ -260,11 +277,15 @@ self.GLOBAL = {
isWorker: function() { return true; }, isWorker: function() { return true; },
}; };
importScripts("/resources/testharness.js"); importScripts("/resources/testharness.js");
%(script)s
importScripts("%(path)s"); importScripts("%(path)s");
done(); done();
""" """
def _meta_replacement(self, key, value): def _meta_replacement(self, key, value):
return None
def _script_replacement(self, key, value):
if key == b"script": if key == b"script":
attribute = value.decode('utf-8').replace("\\", "\\\\").replace('"', '\\"') attribute = value.decode('utf-8').replace("\\", "\\\\").replace('"', '\\"')
return 'importScripts("%s")' % attribute return 'importScripts("%s")' % attribute
......
...@@ -283,6 +283,28 @@ class Firefox(Browser): ...@@ -283,6 +283,28 @@ class Firefox(Browser):
return m.group(1) return m.group(1)
class Fennec(Browser):
"""Fennec-specific interface."""
product = "fennec"
requirements = "requirements_firefox.txt"
def install(self, dest=None):
raise NotImplementedError
def find_binary(self, venv_path=None):
raise NotImplementedError
def find_webdriver(self):
raise NotImplementedError
def install_webdriver(self, dest=None):
raise NotImplementedError
def version(self, binary=None):
return None
class Chrome(Browser): class Chrome(Browser):
"""Chrome-specific interface. """Chrome-specific interface.
...@@ -345,16 +367,19 @@ class Chrome(Browser): ...@@ -345,16 +367,19 @@ class Chrome(Browser):
def version(self, binary=None): def version(self, binary=None):
binary = binary or self.binary binary = binary or self.binary
try: if uname[0] != "Windows":
version_string = call(binary, "--version").strip() try:
except subprocess.CalledProcessError: version_string = call(binary, "--version").strip()
logger.warn("Failed to call %s", binary) except subprocess.CalledProcessError:
return None logger.warn("Failed to call %s", binary)
m = re.match(r"Google Chrome (.*)", version_string) return None
if not m: m = re.match(r"Google Chrome (.*)", version_string)
logger.warn("Failed to extract version from: s%", version_string) if not m:
return None logger.warn("Failed to extract version from: s%", version_string)
return m.group(1) return None
return m.group(1)
logger.warn("Unable to extract version from binary on Windows.")
return None
class ChromeAndroid(Browser): class ChromeAndroid(Browser):
......
...@@ -204,6 +204,14 @@ Consider installing certutil via your OS package manager or directly.""") ...@@ -204,6 +204,14 @@ Consider installing certutil via your OS package manager or directly.""")
kwargs["prefs_root"] = prefs_root kwargs["prefs_root"] = prefs_root
class Fennec(BrowserSetup):
name = "fennec"
browser_cls = browser.Fennec
def setup_kwargs(self, kwargs):
pass
class Chrome(BrowserSetup): class Chrome(BrowserSetup):
name = "chrome" name = "chrome"
browser_cls = browser.Chrome browser_cls = browser.Chrome
...@@ -374,6 +382,7 @@ class WebKit(BrowserSetup): ...@@ -374,6 +382,7 @@ class WebKit(BrowserSetup):
product_setup = { product_setup = {
"fennec": Fennec,
"firefox": Firefox, "firefox": Firefox,
"chrome": Chrome, "chrome": Chrome,
"chrome_android": ChromeAndroid, "chrome_android": ChromeAndroid,
......
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