Commit 68a92870 authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@6aeae52f01c6f1ed528fd03cc1b3832cda9d2a65

Using wpt-import in Chromium a7b2f5dd.
With Chromium commits locally applied on WPT:
2b985496 "Add webgl2 tests for WebXR"
e9e1f3fd "Use visual overflow rect for layout shift tracking"


Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
foolip@chromium.org, lpz@chromium.org, robertma@chromium.org:
  external/wpt/tools
foolip@chromium.org, robertma@chromium.org, smcgruer@chromium.org:
  external/wpt/infrastructure

NOAUTOREVERT=true
TBR=foolip@google.com

No-Export: true
Cq-Include-Trybots: luci.chromium.try:linux-wpt-identity-fyi-rel,linux-wpt-payments-fyi-rel
Change-Id: I355e6ec474e40aa898dbc6e8b5522634b6f9397f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2504091Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#821582}
parent 19ffe544
...@@ -2585,6 +2585,7 @@ crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-20 ...@@ -2585,6 +2585,7 @@ crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-20
crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-206.xht [ Failure ] crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-206.xht [ Failure ]
# ====== New tests from wpt-importer added here ====== # ====== New tests from wpt-importer added here ======
crbug.com/626703 [ Mac10.13 ] external/wpt/webxr/xr_viewport_scale.https.html [ Timeout ]
crbug.com/626703 [ Mac10.13 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Failure Timeout ] crbug.com/626703 [ Mac10.13 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Failure Timeout ]
crbug.com/626703 [ Mac10.14 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Failure Timeout ] crbug.com/626703 [ Mac10.14 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Failure Timeout ]
crbug.com/626703 [ Mac10.15 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Timeout ] crbug.com/626703 [ Mac10.15 ] external/wpt/html/semantics/forms/the-input-element/selection-pointer.html [ Timeout ]
......
...@@ -36,6 +36,9 @@ themselves precede any test type flag, but are otherwise unordered. ...@@ -36,6 +36,9 @@ themselves precede any test type flag, but are otherwise unordered.
`.h2` `.h2`
: Indicates that a test is loaded over HTTP/2. : Indicates that a test is loaded over HTTP/2.
`.www`
: Indicates that a test is run on the `www` subdomain.
`.sub` `.sub`
: Indicates that a test uses the [server-side substitution](server-pipes.html#sub) : Indicates that a test uses the [server-side substitution](server-pipes.html#sub)
feature. feature.
......
This is a testharness.js-based test.
FAIL Use of .www. file name flag implies www subdomain assert_equals: expected "www.web-platform.test" but got "web-platform.test"
Harness: the test ran to completion.
test(() => {
assert_equals(location.hostname, "{{domains[www]}}");
}, "Use of .www. file name flag implies www subdomain");
done();
...@@ -147,6 +147,14 @@ class URLManifestItem(ManifestItem): ...@@ -147,6 +147,14 @@ class URLManifestItem(ManifestItem):
flags = set(urlparse(self.url).path.rsplit("/", 1)[1].split(".")[1:-1]) flags = set(urlparse(self.url).path.rsplit("/", 1)[1].split(".")[1:-1])
return "h2" in flags return "h2" in flags
@property
def subdomain(self):
# type: () -> bool
flags = set(urlparse(self.url).path.rsplit("/", 1)[1].split(".")[1:-1])
# Note: this is currently hard-coded to check for `www`, rather than
# all possible valid subdomains. It can be extended if needed.
return "www" in flags
def to_json(self): def to_json(self):
# type: () -> Tuple[Optional[Text], Dict[Any, Any]] # type: () -> Tuple[Optional[Text], Dict[Any, Any]]
rel_url = None if self._url == self.path.replace(os.path.sep, u"/") else self._url rel_url = None if self._url == self.path.replace(os.path.sep, u"/") else self._url
......
...@@ -307,14 +307,18 @@ class TestExecutor(object): ...@@ -307,14 +307,18 @@ class TestExecutor(object):
self.runner.send_message("test_ended", test, result) self.runner.send_message("test_ended", test, result)
def server_url(self, protocol): def server_url(self, protocol, subdomain=False):
scheme = "https" if protocol == "h2" else protocol scheme = "https" if protocol == "h2" else protocol
return "%s://%s:%s" % (scheme, host = self.server_config["browser_host"]
self.server_config["browser_host"], if subdomain:
self.server_config["ports"][protocol][0]) # The only supported subdomain filename flag is "www".
host = "{subdomain}.{host}".format(subdomain="www", host=host)
return "{scheme}://{host}:{port}".format(scheme=scheme, host=host,
port=self.server_config["ports"][protocol][0])
def test_url(self, test): def test_url(self, test):
return urljoin(self.server_url(test.environment["protocol"]), test.url) return urljoin(self.server_url(test.environment["protocol"],
test.subdomain), test.url)
@abstractmethod @abstractmethod
def do_test(self, test): def do_test(self, test):
......
...@@ -158,13 +158,15 @@ class Test(object): ...@@ -158,13 +158,15 @@ class Test(object):
long_timeout = 60 # seconds long_timeout = 60 # seconds
def __init__(self, tests_root, url, inherit_metadata, test_metadata, def __init__(self, tests_root, url, inherit_metadata, test_metadata,
timeout=None, path=None, protocol="http", quic=False): timeout=None, path=None, protocol="http", subdomain=False,
quic=False):
self.tests_root = tests_root self.tests_root = tests_root
self.url = url self.url = url
self._inherit_metadata = inherit_metadata self._inherit_metadata = inherit_metadata
self._test_metadata = test_metadata self._test_metadata = test_metadata
self.timeout = timeout if timeout is not None else self.default_timeout self.timeout = timeout if timeout is not None else self.default_timeout
self.path = path self.path = path
self.subdomain = subdomain
self.environment = {"protocol": protocol, "prefs": self.prefs, "quic": quic} self.environment = {"protocol": protocol, "prefs": self.prefs, "quic": quic}
def __eq__(self, other): def __eq__(self, other):
...@@ -190,7 +192,8 @@ class Test(object): ...@@ -190,7 +192,8 @@ class Test(object):
test_metadata, test_metadata,
timeout=timeout, timeout=timeout,
path=os.path.join(manifest_file.tests_root, manifest_item.path), path=os.path.join(manifest_file.tests_root, manifest_item.path),
protocol=server_protocol(manifest_item)) protocol=server_protocol(manifest_item),
subdomain=manifest_item.subdomain)
@property @property
def id(self): def id(self):
...@@ -395,9 +398,9 @@ class TestharnessTest(Test): ...@@ -395,9 +398,9 @@ class TestharnessTest(Test):
def __init__(self, tests_root, url, inherit_metadata, test_metadata, def __init__(self, tests_root, url, inherit_metadata, test_metadata,
timeout=None, path=None, protocol="http", testdriver=False, timeout=None, path=None, protocol="http", testdriver=False,
jsshell=False, scripts=None, quic=False): jsshell=False, scripts=None, subdomain=False, quic=False):
Test.__init__(self, tests_root, url, inherit_metadata, test_metadata, timeout, Test.__init__(self, tests_root, url, inherit_metadata, test_metadata, timeout,
path, protocol, quic) path, protocol, subdomain, quic)
self.testdriver = testdriver self.testdriver = testdriver
self.jsshell = jsshell self.jsshell = jsshell
...@@ -422,6 +425,7 @@ class TestharnessTest(Test): ...@@ -422,6 +425,7 @@ class TestharnessTest(Test):
testdriver=testdriver, testdriver=testdriver,
jsshell=jsshell, jsshell=jsshell,
scripts=scripts, scripts=scripts,
subdomain=manifest_item.subdomain,
quic=quic) quic=quic)
@property @property
...@@ -453,8 +457,8 @@ class ReftestTest(Test): ...@@ -453,8 +457,8 @@ class ReftestTest(Test):
test_type = "reftest" test_type = "reftest"
def __init__(self, tests_root, url, inherit_metadata, test_metadata, references, def __init__(self, tests_root, url, inherit_metadata, test_metadata, references,
timeout=None, path=None, viewport_size=None, dpi=None, fuzzy=None, protocol="http", timeout=None, path=None, viewport_size=None, dpi=None, fuzzy=None,
quic=False): protocol="http", quic=False):
Test.__init__(self, tests_root, url, inherit_metadata, test_metadata, timeout, Test.__init__(self, tests_root, url, inherit_metadata, test_metadata, timeout,
path, protocol, quic) path, protocol, quic)
......
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