diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/WEB_FEATURES.yml b/tests/wpt/tests/css/css-view-transitions/parsing/WEB_FEATURES.yml
new file mode 100644
index 00000000000..e011b34e2a0
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/parsing/WEB_FEATURES.yml
@@ -0,0 +1,4 @@
+features:
+- name: view-transition-class
+ files:
+ - view-transition-class-*
diff --git a/tests/wpt/tests/css/css-view-transitions/pseudo-rendering-invalidation.html b/tests/wpt/tests/css/css-view-transitions/pseudo-rendering-invalidation.html
index 4d492c40d87..9624137e754 100644
--- a/tests/wpt/tests/css/css-view-transitions/pseudo-rendering-invalidation.html
+++ b/tests/wpt/tests/css/css-view-transitions/pseudo-rendering-invalidation.html
@@ -28,8 +28,11 @@ div {
background: darkseagreen;
}
-::view-transition-group(*) {
- animation-duration: 50s;
+::view-transition-group(*),
+::view-transition-image-pair(*),
+::view-transition-old(*),
+::view-transition-new(*) {
+ animation-play-state: paused;
}
::view-transition {
diff --git a/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive-ref.html b/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive-ref.html
new file mode 100644
index 00000000000..6a9af3f8286
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive-ref.html
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive.html b/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive.html
new file mode 100644
index 00000000000..411c73c607a
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/view-transition-types-matches-case-sensitive.html
@@ -0,0 +1,76 @@
+
+
+
+
+
View transitions: active-view-transition-type should treat types as case-sensitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/tests/encrypted-media/scripts/playback-temporary-events.js b/tests/wpt/tests/encrypted-media/scripts/playback-temporary-events.js
index d8dac4463df..1d81cf26071 100644
--- a/tests/wpt/tests/encrypted-media/scripts/playback-temporary-events.js
+++ b/tests/wpt/tests/encrypted-media/scripts/playback-temporary-events.js
@@ -111,7 +111,7 @@ function runTest(config,qualifier) {
closeMethodPromise.then(onClosed);
Promise.all([ closedAttributePromise, closeMethodPromise ]).then(function() {
- test.step_func(onAllClosed);
+ test.step_func(onAllClosed)();
}).catch(onFailure);
}
}
diff --git a/tests/wpt/tests/fledge/tentative/resources/additional-bids.py b/tests/wpt/tests/fledge/tentative/resources/additional-bids.py
index 8a947533307..89a47c0e0d0 100644
--- a/tests/wpt/tests/fledge/tentative/resources/additional-bids.py
+++ b/tests/wpt/tests/fledge/tentative/resources/additional-bids.py
@@ -23,7 +23,7 @@ class BadRequestError(Exception):
def main(request, response):
try:
- if fledge_http_server_util.handle_cors_headers_and_preflight(request, response):
+ if fledge_http_server_util.handle_cors_headers_fail_if_preflight(request, response):
return
# Verify that Sec-Ad-Auction-Fetch is present
diff --git a/tests/wpt/tests/fledge/tentative/resources/bidding-logic.sub.py b/tests/wpt/tests/fledge/tentative/resources/bidding-logic.sub.py
index 8c0539d43c8..97d2d80343c 100644
--- a/tests/wpt/tests/fledge/tentative/resources/bidding-logic.sub.py
+++ b/tests/wpt/tests/fledge/tentative/resources/bidding-logic.sub.py
@@ -8,7 +8,7 @@ from fledge.tentative.resources import fledge_http_server_util
# injected in them. generateBid() will by default return a bid of 9 for the
# first ad.
def main(request, response):
- if fledge_http_server_util.handle_cors_headers_and_preflight(request, response):
+ if fledge_http_server_util.handle_cors_headers_fail_if_preflight(request, response):
return
error = request.GET.first(b"error", None)
diff --git a/tests/wpt/tests/fledge/tentative/resources/fledge_http_server_util.py b/tests/wpt/tests/fledge/tentative/resources/fledge_http_server_util.py
index 179262d3392..30889d92d4f 100644
--- a/tests/wpt/tests/fledge/tentative/resources/fledge_http_server_util.py
+++ b/tests/wpt/tests/fledge/tentative/resources/fledge_http_server_util.py
@@ -2,6 +2,17 @@
from collections import namedtuple
from urllib.parse import unquote_plus, urlparse
+def fail(response, body):
+ """Sets up response to fail with the provided response body.
+
+ Args:
+ response: the wptserve Response that was passed to main
+ body: the HTTP response body to use
+ """
+ response.status = (400, "Bad Request")
+ response.headers.set(b"Content-Type", b"text/plain")
+ response.content = body
+
def headers_to_ascii(headers):
"""Converts a header map with binary values to one with ASCII values.
@@ -22,18 +33,15 @@ def headers_to_ascii(headers):
header_map[pair[0].decode("ASCII")] = values
return header_map
-
-def handle_cors_headers_and_preflight(request, response):
- """Applies CORS logic common to many entrypoints.
+def attach_origin_and_credentials_headers(request, response):
+ """Attaches Access-Control-Allow-Origin and Access-Control-Allow-Credentials
+ response headers to a response, if the request indicates they're needed.
+ Only intended for internal use.
Args:
request: the wptserve Request that was passed to main
response: the wptserve Response that was passed to main
-
- Returns True if the request is a CORS preflight, which is entirely handled by
- this function, so that the calling function should immediately return.
"""
- # Append CORS headers if needed
if b"origin" in request.headers:
response.headers.set(b"Access-Control-Allow-Origin",
request.headers.get(b"origin"))
@@ -42,20 +50,50 @@ def handle_cors_headers_and_preflight(request, response):
response.headers.set(b"Access-Control-Allow-Credentials",
request.headers.get(b"credentials"))
+def handle_cors_headers_fail_if_preflight(request, response):
+ """Adds CORS headers if necessary. In the case of CORS preflights, generates
+ a failure response. To be used when CORS preflights are not expected.
+
+ Args:
+ request: the wptserve Request that was passed to main
+ response: the wptserve Response that was passed to main
+
+ Returns True if the request is a CORS preflight, in which case the calling
+ function should immediately return.
+ """
+ # Handle CORS preflight requests.
+ if request.method == u"OPTIONS":
+ fail(response, "CORS preflight unexpectedly received.")
+ return True
+
+ # Append CORS headers if needed
+ attach_origin_and_credentials_headers(request, response)
+ return False
+
+def handle_cors_headers_and_preflight(request, response):
+ """Applies CORS logic, either adding CORS headers to response or generating
+ an entire response to preflights.
+
+ Args:
+ request: the wptserve Request that was passed to main
+ response: the wptserve Response that was passed to main
+
+ Returns True if the request is a CORS preflight, in which case the calling
+ function should immediately return.
+ """
+ # Append CORS headers if needed
+ attach_origin_and_credentials_headers(request, response)
+
# Handle CORS preflight requests.
if not request.method == u"OPTIONS":
return False
if not b"Access-Control-Request-Method" in request.headers:
- response.status = (400, b"Bad Request")
- response.headers.set(b"Content-Type", b"text/plain")
- response.content = "Failed to get access-control-request-method in preflight!"
+ fail(response, "Failed to get access-control-request-method in preflight!")
return True
if not b"Access-Control-Request-Headers" in request.headers:
- response.status = (400, b"Bad Request")
- response.headers.set(b"Content-Type", b"text/plain")
- response.content = "Failed to get access-control-request-headers in preflight!"
+ fail(response, "Failed to get access-control-request-headers in preflight!")
return True
response.headers.set(b"Access-Control-Allow-Methods",
diff --git a/tests/wpt/tests/fledge/tentative/resources/permissions.py b/tests/wpt/tests/fledge/tentative/resources/permissions.py
index eed93c42756..f66e28bb27b 100644
--- a/tests/wpt/tests/fledge/tentative/resources/permissions.py
+++ b/tests/wpt/tests/fledge/tentative/resources/permissions.py
@@ -35,7 +35,7 @@ def get_permissions(request, response):
- 天気の良い日 / élève: allow both join and leave
- anything else (including no subdomain): returns a 404
"""
- if fledge_http_server_util.handle_cors_headers_and_preflight(request, response):
+ if fledge_http_server_util.handle_cors_headers_fail_if_preflight(request, response):
return
first_domain_label = re.search(r"[^.]*", request.url_parts.netloc).group(0)
diff --git a/tests/wpt/tests/fledge/tentative/resources/trusted-bidding-signals.py b/tests/wpt/tests/fledge/tentative/resources/trusted-bidding-signals.py
index 5a89e3b6025..e6e7d660525 100644
--- a/tests/wpt/tests/fledge/tentative/resources/trusted-bidding-signals.py
+++ b/tests/wpt/tests/fledge/tentative/resources/trusted-bidding-signals.py
@@ -20,10 +20,12 @@ def main(request, response):
for param in request.url_parts.query.split("&"):
pair = param.split("=", 1)
if len(pair) != 2:
- return fail(response, "Bad query parameter: " + param)
+ fail(response, "Bad query parameter: " + param)
+ return
# Browsers should escape query params consistently.
if "%20" in pair[1]:
- return fail(response, "Query parameter should escape using '+': " + param)
+ fail(response, "Query parameter should escape using '+': " + param)
+ return
# Hostname can't be empty. The empty string can be a key or interest group name, though.
if pair[0] == "hostname" and hostname == None and len(pair[1]) > 0:
@@ -37,20 +39,22 @@ def main(request, response):
continue
if pair[0] == "slotSize" or pair[0] == "allSlotsRequestedSizes":
continue
- return fail(response, "Unexpected query parameter: " + param)
+ fail(response, "Unexpected query parameter: " + param)
+ return
# If trusted signal keys are passed in, and one of them is "cors",
- # add appropriate Access-Control-* headers to normal requests, and handle
- # CORS preflights.
- if keys and "cors" in keys and fledge_http_server_util.handle_cors_headers_and_preflight(
+ # add appropriate Access-Control-* headers to normal requests.
+ if keys and "cors" in keys and fledge_http_server_util.handle_cors_headers_fail_if_preflight(
request, response):
return
# "interestGroupNames" and "hostname" are mandatory.
if not hostname:
- return fail(response, "hostname missing")
+ fail(response, "hostname missing")
+ return
if not interestGroupNames:
- return fail(response, "interestGroupNames missing")
+ fail(response, "interestGroupNames missing")
+ return
response.status = (200, b"OK")
@@ -153,8 +157,3 @@ def main(request, response):
if body != None:
return body
return json.dumps(responseBody)
-
-def fail(response, body):
- response.status = (400, "Bad Request")
- response.headers.set(b"Content-Type", b"text/plain")
- return body
diff --git a/tests/wpt/tests/fledge/tentative/resources/trusted-scoring-signals.py b/tests/wpt/tests/fledge/tentative/resources/trusted-scoring-signals.py
index 934d2e9129d..bfd23b124cb 100644
--- a/tests/wpt/tests/fledge/tentative/resources/trusted-scoring-signals.py
+++ b/tests/wpt/tests/fledge/tentative/resources/trusted-scoring-signals.py
@@ -13,7 +13,8 @@ def main(request, response):
try:
params = fledge_http_server_util.decode_trusted_scoring_signals_params(request)
except ValueError as ve:
- return fail(response, str(ve))
+ fail(response, str(ve))
+ return
response.status = (200, b"OK")
@@ -36,7 +37,8 @@ def main(request, response):
try:
signalsParams = fledge_http_server_util.decode_render_url_signals_params(renderUrl)
except ValueError as ve:
- return fail(response, str(ve))
+ fail(response, str(ve))
+ return
for signalsParam in signalsParams:
if signalsParam == "close-connection":
@@ -92,8 +94,8 @@ def main(request, response):
responseBody[urlList["type"]][renderUrl] = value
# If the signalsParam embedded inside a render URL calls for CORS, add
- # appropriate response headers, and fully handle preflights.
- if cors and fledge_http_server_util.handle_cors_headers_and_preflight(
+ # appropriate response headers.
+ if cors and fledge_http_server_util.handle_cors_headers_fail_if_preflight(
request, response):
return
@@ -107,8 +109,3 @@ def main(request, response):
if body != None:
return body
return json.dumps(responseBody)
-
-def fail(response, body):
- response.status = (400, "Bad Request")
- response.headers.set(b"Content-Type", b"text/plain")
- return body
diff --git a/tests/wpt/tests/html/browsers/history/the-history-interface/history_pushstate_too_many_calls.optional.html b/tests/wpt/tests/html/browsers/history/the-history-interface/history_pushstate_too_many_calls.optional.html
new file mode 100644
index 00000000000..4242ab488ca
--- /dev/null
+++ b/tests/wpt/tests/html/browsers/history/the-history-interface/history_pushstate_too_many_calls.optional.html
@@ -0,0 +1,20 @@
+
+
+
+
history pushState too many calls
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/tests/html/browsers/history/the-history-interface/history_replacestate_too_many_calls.optional.html b/tests/wpt/tests/html/browsers/history/the-history-interface/history_replacestate_too_many_calls.optional.html
new file mode 100644
index 00000000000..d412983270c
--- /dev/null
+++ b/tests/wpt/tests/html/browsers/history/the-history-interface/history_replacestate_too_many_calls.optional.html
@@ -0,0 +1,20 @@
+
+
+
+
history replaceState too many calls
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-credentialless.https.tentative.window.js b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-credentialless.https.tentative.window.js
new file mode 100644
index 00000000000..cae480526b8
--- /dev/null
+++ b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-credentialless.https.tentative.window.js
@@ -0,0 +1,90 @@
+// META: timeout=long
+// META: variant=?document
+// META: variant=?dedicated_worker
+// META: variant=?shared_worker
+// META: variant=?service_worker
+// META: script=/common/get-host-info.sub.js
+// META: script=/common/utils.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
+// META: script=./resources/common.js
+
+// Fetch a resource and store it into CacheStorage from |storer| context. Then
+// check if it can be retrieved via CacheStorage.match from |retriever| context.
+const cacheStorageTest = (
+ description,
+ dip_storer,
+ dip_retriever,
+ resource_headers,
+ request_credential_mode,
+ expectation
+) => {
+ promise_test(async test => {
+ const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
+ const resource_url = cross_origin + "/common/square.png?pipe=" + resource_headers;
+
+ // Create the storer and retriever contexts.
+ const storage_token = await getTokenFromEnvironment(test, environment, dip_storer);
+ const storage_context = new RemoteContext(storage_token);
+ const retriever_token = await getTokenFromEnvironment(test, environment, dip_retriever);
+ const retriever_context = new RemoteContext(retriever_token);
+
+ // Fetch a request from the storer. Store the opaque response into
+ // CacheStorage.
+ const stored = await storage_context.execute_script(
+ async (url, credential_mode) => {
+ const cache = await caches.open('v1');
+ const fetch_request = new Request(url, {
+ mode: 'no-cors',
+ credentials: credential_mode
+ });
+ const fetch_response = await fetch(fetch_request);
+ await cache.put(fetch_request, fetch_response);
+ return true;
+ }, [resource_url, request_credential_mode]);
+ assert_equals(stored, true);
+
+ // Retrieved it from |retriever|.
+ const was_retrieved = await retriever_context.execute_script(
+ async (url) => {
+ const cache = await caches.open('v1');
+ try {
+ const response = await cache.match(url);
+ return "retrieved";
+ } catch (error) {
+ return "error";
+ }
+ }, [resource_url]);
+ assert_equals(was_retrieved, expectation);
+ }, description);
+};
+
+// Execute the same set of tests for every type of execution contexts:
+// Documents, DedicatedWorkers, SharedWorkers, and ServiceWorkers. The results
+// should be independent of the context.
+const environment = location.search.substr(1);
+
+cacheStorageTest(`[${environment}] isolate-and-credentialless => none`,
+ dip_credentialless,
+ dip_none,
+ "",
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-credentialless`,
+ dip_credentialless,
+ dip_credentialless,
+ "",
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-require-corp`,
+ dip_credentialless,
+ dip_require_corp,
+ "",
+ "include",
+ "error");
+cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-require-corp + CORP`,
+ dip_credentialless,
+ dip_require_corp,
+ corp_cross_origin,
+ "include",
+ "retrieved");
diff --git a/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-none.https.tentative.window.js b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-none.https.tentative.window.js
new file mode 100644
index 00000000000..e2478abeed2
--- /dev/null
+++ b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-none.https.tentative.window.js
@@ -0,0 +1,108 @@
+// META: timeout=long
+// META: variant=?document
+// META: variant=?dedicated_worker
+// META: variant=?shared_worker
+// META: variant=?service_worker
+// META: script=/common/get-host-info.sub.js
+// META: script=/common/utils.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
+// META: script=./resources/common.js
+
+// Fetch a resource and store it into CacheStorage from |storer| context. Then
+// check if it can be retrieved via CacheStorage.match from |retriever| context.
+const cacheStorageTest = (
+ description,
+ dip_storer,
+ dip_retriever,
+ resource_headers,
+ request_credential_mode,
+ expectation
+) => {
+ promise_test(async test => {
+ const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
+ const resource_url = cross_origin + "/common/square.png?pipe=" + resource_headers;
+
+ // Create the storer and retriever contexts.
+ const storage_token = await getTokenFromEnvironment(test, environment, dip_storer);
+ const storage_context = new RemoteContext(storage_token);
+ const retriever_token = await getTokenFromEnvironment(test, environment, dip_retriever);
+ const retriever_context = new RemoteContext(retriever_token);
+
+ // Fetch a request from the storer. Store the opaque response into
+ // CacheStorage.
+ const stored = await storage_context.execute_script(
+ async (url, credential_mode) => {
+ const cache = await caches.open('v1');
+ const fetch_request = new Request(url, {
+ mode: 'no-cors',
+ credentials: credential_mode
+ });
+ const fetch_response = await fetch(fetch_request);
+ await cache.put(fetch_request, fetch_response);
+ return true;
+ }, [resource_url, request_credential_mode]);
+ assert_equals(stored, true);
+
+ // Retrieved it from |retriever|.
+ const was_retrieved = await retriever_context.execute_script(
+ async (url) => {
+ const cache = await caches.open('v1');
+ try {
+ const response = await cache.match(url);
+ return "retrieved";
+ } catch (error) {
+ return "error";
+ }
+ }, [resource_url]);
+ assert_equals(was_retrieved, expectation);
+ }, description);
+};
+
+// Execute the same set of tests for every type of execution contexts:
+// Documents, DedicatedWorkers, SharedWorkers, and ServiceWorkers. The results
+// should be independent of the context.
+const environment = location.search.substr(1);
+
+cacheStorageTest(`[${environment}] none => none`,
+ dip_none,
+ dip_none,
+ "",
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] none => isolate-and-credentialless`,
+ dip_none,
+ dip_credentialless,
+ "",
+ "include",
+ "error");
+cacheStorageTest(`[${environment}] none => isolate-and-credentialless (omit)`,
+ dip_none,
+ dip_credentialless,
+ "",
+ "omit",
+ "retrieved");
+cacheStorageTest(`[${environment}] none => isolate-and-credentialless + CORP`,
+ dip_none,
+ dip_credentialless,
+ corp_cross_origin,
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] none => isolate-and-require-corp`,
+ dip_none,
+ dip_require_corp,
+ "",
+ "include",
+ "error");
+cacheStorageTest(`[${environment}] none => isolate-and-require-corp (omit)`,
+ dip_none,
+ dip_require_corp,
+ "",
+ "include",
+ "error");
+cacheStorageTest(`[${environment}] none => isolate-and-require-corp + CORP`,
+ dip_none,
+ dip_require_corp,
+ corp_cross_origin,
+ "include",
+ "retrieved");
diff --git a/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-require-corp.https.tentative.window.js b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-require-corp.https.tentative.window.js
new file mode 100644
index 00000000000..720fa6a987a
--- /dev/null
+++ b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage-from-require-corp.https.tentative.window.js
@@ -0,0 +1,84 @@
+// META: timeout=long
+// META: variant=?document
+// META: variant=?dedicated_worker
+// META: variant=?shared_worker
+// META: variant=?service_worker
+// META: script=/common/get-host-info.sub.js
+// META: script=/common/utils.js
+// META: script=/common/dispatcher/dispatcher.js
+// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
+// META: script=./resources/common.js
+
+// Fetch a resource and store it into CacheStorage from |storer| context. Then
+// check if it can be retrieved via CacheStorage.match from |retriever| context.
+const cacheStorageTest = (
+ description,
+ dip_storer,
+ dip_retriever,
+ resource_headers,
+ request_credential_mode,
+ expectation
+) => {
+ promise_test(async test => {
+ const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
+ const resource_url = cross_origin + "/common/square.png?pipe=" + resource_headers;
+
+ // Create the storer and retriever contexts.
+ const storage_token = await getTokenFromEnvironment(test, environment, dip_storer);
+ const storage_context = new RemoteContext(storage_token);
+ const retriever_token = await getTokenFromEnvironment(test, environment, dip_retriever);
+ const retriever_context = new RemoteContext(retriever_token);
+
+ // Fetch a request from the storer. Store the opaque response into
+ // CacheStorage.
+ const stored = await storage_context.execute_script(
+ async (url, credential_mode) => {
+ const cache = await caches.open('v1');
+ const fetch_request = new Request(url, {
+ mode: 'no-cors',
+ credentials: credential_mode
+ });
+ const fetch_response = await fetch(fetch_request);
+ await cache.put(fetch_request, fetch_response);
+ return true;
+ }, [resource_url, request_credential_mode]);
+ assert_equals(stored, true);
+
+ // Retrieved it from |retriever|.
+ const was_retrieved = await retriever_context.execute_script(
+ async (url) => {
+ const cache = await caches.open('v1');
+ try {
+ const response = await cache.match(url);
+ return "retrieved";
+ } catch (error) {
+ return "error";
+ }
+ }, [resource_url]);
+ assert_equals(was_retrieved, expectation);
+ }, description);
+};
+
+// Execute the same set of tests for every type of execution contexts:
+// Documents, DedicatedWorkers, SharedWorkers, and ServiceWorkers. The results
+// should be independent of the context.
+const environment = location.search.substr(1);
+
+cacheStorageTest(`[${environment}] isolate-and-require-corp => none`,
+ dip_require_corp,
+ dip_none,
+ corp_cross_origin,
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] isolate-and-require-corp => isolate-and-credentialless`,
+ dip_require_corp,
+ dip_credentialless,
+ corp_cross_origin,
+ "include",
+ "retrieved");
+cacheStorageTest(`[${environment}] isolate-and-require-corp => isolate-and-require-corp`,
+ dip_require_corp,
+ dip_require_corp,
+ corp_cross_origin,
+ "include",
+ "retrieved");
diff --git a/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage.https.tentative.window.js b/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage.https.tentative.window.js
deleted file mode 100644
index cb4b174e945..00000000000
--- a/tests/wpt/tests/html/document-isolation-policy/credentialless-cache-storage.https.tentative.window.js
+++ /dev/null
@@ -1,150 +0,0 @@
-// META: timeout=long
-// META: variant=?document
-// META: variant=?dedicated_worker
-// META: variant=?shared_worker
-// META: variant=?service_worker
-// META: script=/common/get-host-info.sub.js
-// META: script=/common/utils.js
-// META: script=/common/dispatcher/dispatcher.js
-// META: script=./resources/common.js
-
-// Fetch a resource and store it into CacheStorage from |storer| context. Then
-// check if it can be retrieved via CacheStorage.match from |retriever| context.
-const cacheStorageTest = (
- description,
- storer,
- retriever,
- resource_headers,
- request_credential_mode,
- expectation
-) => {
- promise_test_parallel(async test => {
- const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN;
- const url = cross_origin + "/common/square.png?pipe=" + resource_headers +
- `&${token()}`;
- const this_token = token();
-
- // Fetch a request from |stored|. Store the opaque response into
- // CacheStorage.
- send(storer, `
- const cache = await caches.open("v1");
- const fetch_request = new Request("${url}", {
- mode: 'no-cors',
- credentials: '${request_credential_mode}'
- });
- const fetch_response = await fetch(fetch_request);
- await cache.put(fetch_request, fetch_response);
- send("${this_token}", "stored");
- `);
- assert_equals(await receive(this_token), "stored");
-
- // Retrieved it from |retriever|.
- send(retriever, `
- const cache = await caches.open("v1");
- try {
- const response = await cache.match("${url}");
- send("${this_token}", "retrieved");
- } catch (error) {
- send("${this_token}", "error");
- }
- `);
- assert_equals(await receive(this_token), expectation);
- }, description);
-};
-
-// Execute the same set of tests for every type of execution contexts:
-// Documents, DedicatedWorkers, SharedWorkers, and ServiceWorkers. The results
-// should be independent of the context.
-const environment = location.search.substr(1);
-const constructor = environments[environment];
-
-const context_none = constructor(coep_none)[0];
-const context_credentialless = constructor(dip_credentialless)[0];
-const context_require_corp = constructor(dip_require_corp)[0];
-
-cacheStorageTest(`[${environment}] none => none`,
- context_none,
- context_none,
- "",
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] none => isolate-and-credentialless`,
- context_none,
- context_credentialless,
- "",
- "include",
- "error");
-cacheStorageTest(`[${environment}] none => isolate-and-credentialless (omit)`,
- context_none,
- context_credentialless,
- "",
- "omit",
- "retrieved");
-cacheStorageTest(`[${environment}] none => isolate-and-credentialless + CORP`,
- context_none,
- context_credentialless,
- corp_cross_origin,
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] none => isolate-and-require-corp`,
- context_none,
- context_require_corp,
- "",
- "include",
- "error");
-cacheStorageTest(`[${environment}] none => isolate-and-require-corp (omit)`,
- context_none,
- context_require_corp,
- "",
- "include",
- "error");
-cacheStorageTest(`[${environment}] none => isolate-and-require-corp + CORP`,
- context_none,
- context_require_corp,
- corp_cross_origin,
- "include",
- "retrieved");
-
-cacheStorageTest(`[${environment}] isolate-and-credentialless => none`,
- context_credentialless,
- context_none,
- "",
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-credentialless`,
- context_credentialless,
- context_credentialless,
- "",
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-require-corp`,
- context_credentialless,
- context_require_corp,
- "",
- "include",
- "error");
-cacheStorageTest(`[${environment}] isolate-and-credentialless => isolate-and-require-corp + CORP`,
- context_credentialless,
- context_require_corp,
- corp_cross_origin,
- "include",
- "retrieved");
-
-cacheStorageTest(`[${environment}] isolate-and-require-corp => none`,
- context_require_corp,
- context_none,
- corp_cross_origin,
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] isolate-and-require-corp => isolate-and-credentialless`,
- context_require_corp,
- context_credentialless,
- corp_cross_origin,
- "include",
- "retrieved");
-cacheStorageTest(`[${environment}] isolate-and-require-corp => isolate-and-require-corp`,
- context_require_corp,
- context_require_corp,
- corp_cross_origin,
- "include",
- "retrieved");
diff --git a/tests/wpt/tests/html/document-isolation-policy/credentialless-dedicated-worker.https.tentative.window.js b/tests/wpt/tests/html/document-isolation-policy/credentialless-dedicated-worker.https.tentative.window.js
index 748130dfdc2..539ed0a6955 100644
--- a/tests/wpt/tests/html/document-isolation-policy/credentialless-dedicated-worker.https.tentative.window.js
+++ b/tests/wpt/tests/html/document-isolation-policy/credentialless-dedicated-worker.https.tentative.window.js
@@ -2,6 +2,7 @@
// META: script=/common/get-host-info.sub.js
// META: script=/common/utils.js
// META: script=/common/dispatcher/dispatcher.js
+// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
// META: script=./resources/common.js
const same_origin = get_host_info().HTTPS_ORIGIN;
@@ -19,112 +20,63 @@ promise_test(async test => {
cookie_same_site_none),
]);
- // One window with DIP:none. (control)
- const w_control_token = token();
- const w_control_url = same_origin + executor_path +
- coep_none + `&uuid=${w_control_token}`
- const w_control = window.open(w_control_url);
- add_completion_callback(() => w_control.close());
-
- // One window with DIP:isolate-and-credentialless. (experiment)
- const w_credentialless_token = token();
- const w_credentialless_url = same_origin + executor_path +
- dip_credentialless + `&uuid=${w_credentialless_token}`;
- const w_credentialless = window.open(w_credentialless_url);
- add_completion_callback(() => w_credentialless.close());
-
let GetCookie = (response) => {
const headers_credentialless = JSON.parse(response);
return parseCookies(headers_credentialless)[cookie_key];
}
+ async function fetchInRemoteContext(ctx, request_url) {
+ // The fail might fail in when a DedicatedWorker with DIP
+ // isolate-and-require-corp tries to fetch a cross-origin resource. Silently
+ // catch the error as we're only interested in whether the cookies were sent
+ // with the fetch in the first place.
+ try {
+ await ctx.execute_script(
+ async (url) => {
+ await fetch(url, {mode: 'no-cors', credentials: 'include'});
+ }, [request_url]);
+ } catch(error) {}
+ }
+
const dedicatedWorkerTest = function(
- description, origin, coep_for_worker,
- expected_cookies_control,
- expected_cookies_credentialless) {
+ description, origin, dip_for_worker,
+ expected_cookies) {
promise_test_parallel(async t => {
- // Create workers for both window.
- const worker_token_1 = token();
- const worker_token_2 = token();
+ // Create one iframe with the specified DIP isolate-and-credentialless.
+ // Then start a DedicatedWorker. The DedicatedWorker will inherit the DIP
+ // of its creator.
+ const worker = await createDedicatedWorkerContext(test, same_origin, dip_for_worker);
+ const worker_context = new RemoteContext(worker[0]);
- // Used to check for errors creating the DedicatedWorker.
- const worker_error = token();
+ // Fetch resources with the worker.
+ const request_token = token();
+ const request_url = showRequestHeaders(origin, request_token);
- const w_worker_src_1 = same_origin + executor_worker_path +
- coep_for_worker + `&uuid=${worker_token_1}`;
- send(w_control_token, `
- const worker = new Worker("${w_worker_src_1}", {});
- `);
-
- const w_worker_src_2 = same_origin + executor_worker_path +
- coep_for_worker + `&uuid=${worker_token_2}`;
- send(w_credentialless_token, `
- const worker = new Worker("${w_worker_src_2}", {});
- worker.onerror = () => {
- send("${worker_error}", "Worker blocked");
- }
- `);
-
- // Fetch resources with the workers.
- const request_token_1 = token();
- const request_token_2 = token();
- const request_url_1 = showRequestHeaders(origin, request_token_1);
- const request_url_2 = showRequestHeaders(origin, request_token_2);
-
- send(worker_token_1, `
- fetch("${request_url_1}", {mode: 'no-cors', credentials: 'include'})
- `);
- send(worker_token_2, `
- fetch("${request_url_2}", {mode: 'no-cors', credentials: 'include'});
- `);
-
- const response_control = await receive(request_token_1).then(GetCookie);
- assert_equals(response_control,
- expected_cookies_control,
- "coep:none => ");
-
- const response_credentialless = await Promise.race([
- receive(worker_error),
- receive(request_token_2).then(GetCookie)
- ]);
- assert_equals(response_credentialless,
- expected_cookies_credentialless,
- "coep:credentialless => ");
+ await fetchInRemoteContext(worker_context, request_url);
+ const response_worker = await receive(request_token).then(GetCookie);
+ assert_equals(response_worker,
+ expected_cookies,
+ "dip => ");
}, `fetch ${description}`)
};
dedicatedWorkerTest("same-origin + credentialless worker",
same_origin, dip_credentialless,
- cookie_same_origin,
cookie_same_origin);
dedicatedWorkerTest("same-origin + require_corp worker",
same_origin, dip_require_corp,
- cookie_same_origin,
cookie_same_origin);
- dedicatedWorkerTest("same-origin",
- same_origin, dip_none,
- cookie_same_origin,
- "Worker blocked");
-
- dedicatedWorkerTest("cross-origin",
- cross_origin, dip_none,
- cookie_cross_origin,
- "Worker blocked" // Owner's policy is credentialless, so we can't
- // create a worker with coep_none.
- );
-
dedicatedWorkerTest("cross-origin + credentialless worker",
cross_origin, dip_credentialless,
- undefined, // Worker created successfully with credentialless, and fetch doesn't get credentials
undefined // Worker created successfully with credentialless, and fetch doesn't get credentials
);
dedicatedWorkerTest("cross-origin + require_corp worker",
cross_origin, dip_require_corp,
- cookie_cross_origin,
- cookie_cross_origin // The worker's policy is require_corp and doing a
- // fetch within it has nothing to do with the Owner's policy.
+ cookie_cross_origin // The worker's policy is require_corp, so the resource will be requested with cookies
+ // but the load will fail because the response does not
+ // have CORP cross-origin.
);
})
diff --git a/tests/wpt/tests/html/document-isolation-policy/reporting-cache-storage-corp.tentative.https.html b/tests/wpt/tests/html/document-isolation-policy/reporting-cache-storage-corp.tentative.https.html
index 934c87b2abc..0b7c12ac514 100644
--- a/tests/wpt/tests/html/document-isolation-policy/reporting-cache-storage-corp.tentative.https.html
+++ b/tests/wpt/tests/html/document-isolation-policy/reporting-cache-storage-corp.tentative.https.html
@@ -8,22 +8,12 @@
+
+
+
diff --git a/tests/wpt/tests/html/document-isolation-policy/reporting-subresource-corp.tentative.https.html.headers b/tests/wpt/tests/html/document-isolation-policy/reporting-subresource-corp.tentative.https.html.headers
deleted file mode 100644
index bcc6f0734d5..00000000000
--- a/tests/wpt/tests/html/document-isolation-policy/reporting-subresource-corp.tentative.https.html.headers
+++ /dev/null
@@ -1 +0,0 @@
-Document-Isolation-Policy: isolate-and-require-corp
diff --git a/tests/wpt/tests/html/document-isolation-policy/resources/common.js b/tests/wpt/tests/html/document-isolation-policy/resources/common.js
index df4bfcfc7d5..64c1f8df416 100644
--- a/tests/wpt/tests/html/document-isolation-policy/resources/common.js
+++ b/tests/wpt/tests/html/document-isolation-policy/resources/common.js
@@ -1,5 +1,8 @@
+
const executor_path = '/common/dispatcher/executor.html?pipe=';
+const remote_executor_path = '/common/dispatcher/remote-executor.html?pipe=';
const executor_worker_path = '/common/dispatcher/executor-worker.js?pipe=';
+const remote_executor_worker_path = '/common/dispatcher/remote-executor-worker.js?pipe=';
const executor_service_worker_path = '/common/dispatcher/executor-service-worker.js?pipe=';
// COEP
@@ -93,6 +96,79 @@ const newCredentiallessIframe = (parent_token, child_origin) => {
return sub_document_token;
};
+// The following functions create remote execution contexts with the matching
+// origins and headers. The first return value is the uuid that can be used
+// to instantiate a RemoteContext object. The second return value is the URL of
+// the context that was created.
+async function createIframeContext(t, origin, header) {
+ const uuid = token();
+ const frame_url = origin + remote_executor_path + header + '&uuid=' + uuid;
+ const frame = await with_iframe(frame_url);
+ t.add_cleanup(() => frame.remove());
+ return [uuid, frame_url];
+}
+
+async function createDedicatedWorkerContext(t, origin, header) {
+ const iframe_uuid = token();
+ const frame_url = origin + remote_executor_path + header + '&uuid=' + iframe_uuid;
+ const frame = await with_iframe(frame_url);
+ t.add_cleanup(() => frame.remove());
+
+ const uuid = token();
+ const worker_url = origin + remote_executor_worker_path + '&uuid=' + uuid;
+ const ctx = new RemoteContext(iframe_uuid);
+ await ctx.execute_script(
+ (url) => {
+ const worker = new Worker(url);
+ }, [worker_url]);
+ return [uuid, worker_url];
+}
+
+async function createSharedWorkerContext(t, origin, header) {
+ const uuid = token();
+ const worker_url = origin + remote_executor_worker_path + header + '&uuid=' + uuid;
+ const worker = new SharedWorker(worker_url);
+ worker.addEventListener('error', t.unreached_func('Worker.onerror'));
+ return [uuid, worker_url];
+}
+
+async function createIframeWithSWContext(t, origin, header) {
+ // Register a service worker with no headers.
+ const uuid = token();
+ const frame_url = origin + remote_executor_path + header + '&uuid=' + uuid;
+ const service_worker_url = origin + executor_service_worker_path;
+ const reg = await service_worker_unregister_and_register(
+ t, service_worker_url, frame_url);
+ const worker = reg.installing || reg.waiting || reg.active;
+ worker.addEventListener('error', t.unreached_func('Worker.onerror'));
+
+ const frame = await with_iframe(frame_url);
+ t.add_cleanup(() => {
+ reg.unregister();
+ frame.remove();
+ });
+ return [uuid, frame_url];
+}
+
+// A common interface for building the 4 type of execution contexts. Outputs the
+// token needed to create the RemoteContext.
+async function getTokenFromEnvironment(t, environment, headers) {
+ switch(environment) {
+ case "document":
+ const iframe_context = await createIframeContext(t, window.origin, headers);
+ return iframe_context[0];
+ case "dedicated_worker":
+ const dedicated_worker_context = await createDedicatedWorkerContext(t, window.origin, headers);
+ return dedicated_worker_context[0];
+ case "shared_worker":
+ const shared_worker_context = await createSharedWorkerContext(t, window.origin, headers);
+ return shared_worker_context[0];
+ case "service_worker":
+ const sw_context = await createIframeWithSWContext(t, window.origin, headers);
+ return sw_context[0];
+ }
+}
+
// A common interface for building the 4 type of execution contexts:
// It outputs: [
// - The token to communicate with the environment.
diff --git a/tests/wpt/tests/html/document-isolation-policy/resources/report.py b/tests/wpt/tests/html/document-isolation-policy/resources/report.py
new file mode 100644
index 00000000000..3b677a91fdd
--- /dev/null
+++ b/tests/wpt/tests/html/document-isolation-policy/resources/report.py
@@ -0,0 +1,42 @@
+import json
+
+def main(request, response):
+ response.headers.set(b'Access-Control-Allow-Origin', b'*')
+ response.headers.set(b'Access-Control-Allow-Methods', b'OPTIONS, GET, POST')
+ response.headers.set(b'Access-Control-Allow-Headers', b'Content-Type')
+ response.headers.set(b'Cache-Control', b'no-cache, no-store, must-revalidate')
+ response.headers.set(b'Cross-Origin-Resource-Policy', b'cross-origin')
+
+ # CORS preflight
+ if request.method == u'OPTIONS':
+ return u''
+
+ uuidMap = {
+ b'endpoint': b'01234567-0123-0123-0123-0123456789AB',
+ b'report-only-endpoint': b'01234567-0123-0123-0123-0123456789CD'
+ }
+ key = 0
+ if b'endpoint' in request.GET:
+ key = uuidMap.get(request.GET[b'endpoint'], 0)
+
+ if b'key' in request.GET:
+ key = request.GET[b'key']
+
+ if key == 0:
+ response.status = 400
+ return u'invalid endpoint'
+
+ path = u'/'.join(request.url_parts.path.split(u'/')[:-1]) + u'/'
+ if request.method == u'POST':
+ reports = request.server.stash.take(key, path) or []
+ for report in json.loads(request.body):
+ reports.append(report)
+ request.server.stash.put(key, reports, path)
+ return u'done'
+
+ if request.method == u'GET':
+ response.headers.set(b'Content-Type', b'application/json')
+ return json.dumps(request.server.stash.take(key, path) or [])
+
+ response.status = 400
+ return u'invalid method'
diff --git a/tests/wpt/tests/html/semantics/popovers/popover-focus-tabindex.html b/tests/wpt/tests/html/semantics/popovers/popover-focus-tabindex.html
new file mode 100644
index 00000000000..f9c2342ba5e
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/popovers/popover-focus-tabindex.html
@@ -0,0 +1,41 @@
+
+
+
Popover focus behaviors
+
+
+
+
+
+
+
+
+
+
+
+
First other focusable element
+
+
+ Popover with
+
+
Second other focusable element
+
+
diff --git a/tests/wpt/tests/resources/testdriver.js b/tests/wpt/tests/resources/testdriver.js
index 15f3a4b7cc7..460f879878f 100644
--- a/tests/wpt/tests/resources/testdriver.js
+++ b/tests/wpt/tests/resources/testdriver.js
@@ -1437,7 +1437,7 @@
* @param {String} sample - A `virtual pressure state
*
`_
* such as "critical".
- * @param {number} estimate - Optional, A `virtual own contribution estimate`
+ * @param {number} own_contribution_estimate - Optional, A `virtual own contribution estimate`
* `_
* @param {WindowProxy} [context=null] - Browsing context in which to
* run the call, or null for the
@@ -1449,8 +1449,8 @@
* virtual pressure source of the given type does not
* exist).
*/
- update_virtual_pressure_source: function(source_type, sample, estimate, context=null) {
- return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, estimate, context);
+ update_virtual_pressure_source: function(source_type, sample, own_contribution_estimate, context=null) {
+ return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, own_contribution_estimate, context);
},
/**
@@ -1748,7 +1748,7 @@
throw new Error("create_virtual_pressure_source() is not implemented by testdriver-vendor.js");
},
- async update_virtual_pressure_source(source_type, sample, estimate, context=null) {
+ async update_virtual_pressure_source(source_type, sample, own_contribution_estimate, context=null) {
throw new Error("update_virtual_pressure_source() is not implemented by testdriver-vendor.js");
},
diff --git a/tests/wpt/tests/screen-capture/tentative/getdisplaymedia-captured-surface-resolution.https.html b/tests/wpt/tests/screen-capture/tentative/getdisplaymedia-captured-surface-resolution.https.html
index a1e7997ca69..6064bced90b 100644
--- a/tests/wpt/tests/screen-capture/tentative/getdisplaymedia-captured-surface-resolution.https.html
+++ b/tests/wpt/tests/screen-capture/tentative/getdisplaymedia-captured-surface-resolution.https.html
@@ -39,7 +39,7 @@
assert_greater_than(settings.physicalHeight, 0);
assert_equals(settings.physicalWidth / screenDetails.screens[0].devicePixelRatio, settings.logicalWidth);
assert_equals(settings.physicalHeight / screenDetails.screens[0].devicePixelRatio, settings.logicalHeight);
- assert_equals(screenDetails.screens[0].devicePixelRatio, settings.pixelRatio);
+ assert_equals(screenDetails.screens[0].devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
@@ -64,7 +64,7 @@
assert_greater_than(settings.physicalHeight, 0);
assert_equals(settings.physicalWidth / screenDetails.screens[0].devicePixelRatio, settings.logicalWidth);
assert_equals(settings.physicalHeight / screenDetails.screens[0].devicePixelRatio, settings.logicalHeight);
- assert_equals(screenDetails.screens[0].devicePixelRatio, settings.pixelRatio);
+ assert_equals(screenDetails.screens[0].devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
@@ -87,7 +87,7 @@
assert_greater_than(settings.physicalHeight, 0);
assert_equals(settings.physicalWidth / window.devicePixelRatio, settings.logicalWidth);
assert_equals(settings.physicalHeight / window.devicePixelRatio, settings.logicalHeight);
- assert_equals(window.devicePixelRatio, settings.pixelRatio);
+ assert_equals(window.devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
@@ -123,7 +123,7 @@
assert_equals(oldPhysicalHeight, settings.physicalHeight);
assert_equals(oldPhysicalWidth / screenDetails.screens[0].devicePixelRatio, settings.logicalWidth);
assert_equals(oldPhysicalHeight / screenDetails.screens[0].devicePixelRatio, settings.logicalHeight);
- assert_equals(screenDetails.screens[0].devicePixelRatio, settings.pixelRatio);
+ assert_equals(screenDetails.screens[0].devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
@@ -159,7 +159,7 @@
assert_equals(oldPhysicalHeight, settings.physicalHeight);
assert_equals(oldPhysicalWidth / screenDetails.screens[0].devicePixelRatio, settings.logicalWidth);
assert_equals(oldPhysicalHeight / screenDetails.screens[0].devicePixelRatio, settings.logicalHeight);
- assert_equals(screenDetails.screens[0].devicePixelRatio, settings.pixelRatio);
+ assert_equals(screenDetails.screens[0].devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
@@ -193,7 +193,7 @@
assert_equals(oldPhysicalHeight, settings.physicalHeight);
assert_equals(oldPhysicalWidth / window.devicePixelRatio, settings.logicalWidth);
assert_equals(oldPhysicalHeight / window.devicePixelRatio, settings.logicalHeight);
- assert_equals(window.devicePixelRatio, settings.pixelRatio);
+ assert_equals(window.devicePixelRatio, settings.screenPixelRatio);
assert_equals(capabilities.width.max, settings.physicalWidth);
assert_equals(capabilities.height.max, settings.physicalHeight);
};
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-getanimations.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-getanimations.tentative.html
new file mode 100644
index 00000000000..08d509d8cb2
--- /dev/null
+++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-getanimations.tentative.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html
index dd4820dfe5f..7506fb05829 100644
--- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html
+++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html
@@ -24,13 +24,13 @@
.target {
animation: myAnim linear 0.5s forwards;
}
- .scroll_target {
+ #scroll_target {
animation-trigger: repeat scroll(inline) 150px 200px 100px 250px;
}
- .view_target {
+ #view_target {
animation-trigger: state view(x) contain 10% contain 90% cover 10% cover 90%;
}
- .deferred_target {
+ #deferred_target {
animation-trigger: alternate --viewtimeline contain 5% contain 80% cover 5% cover 80%;
}
.scroller {
@@ -108,15 +108,7 @@
promise_test(async() => {
await waitForNextFrame();
- // Grabbing a reference to the animation and *then* adding the class
- // which confers the trigger properties is a workaround to the fact that
- // if the scroll-based trigger were already in place, the animation
- // would be idle, getAnimations would not include it, and we would not
- // be able to get a reference to it.
- // TODO: if the definition for getAnimations changes such that it should
- // include un-triggered animations, we should remove this workaround.
const animation = scroll_target.getAnimations()[0];
- scroll_target.classList.add("scroll_target");
const trigger = animation.trigger;
await waitForNextFrame();
@@ -136,7 +128,6 @@
promise_test(async() => {
await waitForNextFrame();
const animation = view_target.getAnimations()[0];
- view_target.classList.add("view_target");
const trigger = animation.trigger;
await waitForNextFrame();
@@ -157,7 +148,6 @@
promise_test(async() => {
await waitForNextFrame();
const animation = deferred_target.getAnimations()[0];
- deferred_target.classList.add("deferred_target");
const trigger = animation.trigger;
await waitForNextFrame();
diff --git a/tests/wpt/tests/svg/painting/reftests/WEB_FEATURES.yml b/tests/wpt/tests/svg/painting/reftests/WEB_FEATURES.yml
new file mode 100644
index 00000000000..123f8c0419a
--- /dev/null
+++ b/tests/wpt/tests/svg/painting/reftests/WEB_FEATURES.yml
@@ -0,0 +1,4 @@
+features:
+- name: context-fill-stroke
+ files:
+ - paint-context-*
diff --git a/tests/wpt/tests/tools/lint/tests/test_file_lints.py b/tests/wpt/tests/tools/lint/tests/test_file_lints.py
index 92270e38a69..f6311043293 100644
--- a/tests/wpt/tests/tools/lint/tests/test_file_lints.py
+++ b/tests/wpt/tests/tools/lint/tests/test_file_lints.py
@@ -1236,6 +1236,34 @@ def test_invalid_web_features_file():
assert errors == []
+def test_duplicate_keys_invalid_web_features_file():
+ code = b"""\
+features:
+- name: feature1
+ files:
+ - feature1-*
+features:
+- name: feature2
+ files:
+ - "feature2-*"
+"""
+ # Check when the value is named correctly. It should find the error.
+ errors = check_file_contents("", "css/WEB_FEATURES.yml", io.BytesIO(code))
+ check_errors(errors)
+
+ assert errors == [
+ ('INVALID-WEB-FEATURES-FILE',
+ 'The WEB_FEATURES.yml file contains an invalid structure',
+ "css/WEB_FEATURES.yml",
+ None),
+ ]
+
+ # Check when the value is named incorrectly. It should not find the error.
+ errors = check_file_contents("", "css/OTHER_WEB_FEATURES.yml", io.BytesIO(code))
+ check_errors(errors)
+
+ assert errors == []
+
def test_css_missing_file_manual():
errors = check_file_contents("", "css/foo/bar-manual.html", io.BytesIO(b""))
check_errors(errors)
diff --git a/tests/wpt/tests/tools/metadata/yaml/load.py b/tests/wpt/tests/tools/metadata/yaml/load.py
index 831f7e8fff1..c6813f23392 100644
--- a/tests/wpt/tests/tools/metadata/yaml/load.py
+++ b/tests/wpt/tests/tools/metadata/yaml/load.py
@@ -3,9 +3,24 @@ from ..meta.schema import SchemaValue
import yaml
+# PyYaml does not currently handle unique keys.
+# https://github.com/yaml/pyyaml/issues/165#issuecomment-430074049
+# In that issue, there are workarounds to it.
+# https://gist.github.com/pypt/94d747fe5180851196eb?permalink_comment_id=4015118#gistcomment-4015118
+
+class UniqueKeyLoader(yaml.SafeLoader):
+ def construct_mapping(self, node: yaml.MappingNode, deep: bool = False) -> Dict[Any, Any]:
+ mapping = set()
+ for key_node, value_node in node.value:
+ key = self.construct_object(key_node, deep=deep) # type: ignore
+ if key in mapping:
+ raise ValueError(f"Duplicate {key!r} key found in YAML.")
+ mapping.add(key)
+ return super().construct_mapping(node, deep)
+
def load_data_to_dict(f: IO[bytes]) -> Dict[str, Any]:
try:
- raw_data = yaml.safe_load(f)
+ raw_data = yaml.load(f, Loader=UniqueKeyLoader)
return SchemaValue.from_dict(raw_data)
except Exception as e:
raise e
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py
index 06d58e7e87b..10b5eeb6b94 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py
@@ -498,8 +498,8 @@ class UpdateVirtualPressureSourceAction:
def __call__(self, payload):
source_type = payload["source_type"]
sample = payload["sample"]
- estimate = payload["estimate"]
- return self.protocol.pressure.update_virtual_pressure_source(source_type, sample, estimate)
+ own_contribution_estimate = payload["own_contribution_estimate"]
+ return self.protocol.pressure.update_virtual_pressure_source(source_type, sample, own_contribution_estimate)
class RemoveVirtualPressureSourceAction:
name = "remove_virtual_pressure_source"
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
index 67f11aefa00..110466e47ab 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py
@@ -721,7 +721,7 @@ class MarionetteVirtualPressureSourceProtocolPart(VirtualPressureSourceProtocolP
def create_virtual_pressure_source(self, source_type, metadata):
raise NotImplementedError("create_virtual_pressure_source not yet implemented")
- def update_virtual_pressure_source(self, source_type, sample, estimate):
+ def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
raise NotImplementedError("update_virtual_pressure_source not yet implemented")
def remove_virtual_pressure_source(self, source_type):
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
index d0c1f9e64a4..45ddb57c9ae 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
@@ -685,8 +685,8 @@ class WebDriverVirtualPressureSourceProtocolPart(VirtualPressureSourceProtocolPa
body.update(metadata)
return self.webdriver.send_session_command("POST", "pressuresource", body)
- def update_virtual_pressure_source(self, source_type, sample, estimate):
- body = {"sample": sample, "estimate": estimate}
+ def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
+ body = {"sample": sample, "own_contribution_estimate": own_contribution_estimate}
return self.webdriver.send_session_command("POST", "pressuresource/%s" % source_type, body)
def remove_virtual_pressure_source(self, source_type):
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py
index 53a7b437848..5190b266401 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py
@@ -1009,7 +1009,7 @@ class VirtualPressureSourceProtocolPart(ProtocolPart):
pass
@abstractmethod
- def update_virtual_pressure_source(self, source_type, sample, estimate):
+ def update_virtual_pressure_source(self, source_type, sample, own_contribution_estimate):
pass
@abstractmethod
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
index 71c1be2732f..5d37cf5e15f 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
@@ -468,8 +468,8 @@
return create_context_action("create_virtual_pressure_source", context, {source_type, metadata});
};
- window.test_driver_internal.update_virtual_pressure_source = function(source_type, sample, estimate, context=null) {
- return create_context_action("update_virtual_pressure_source", context, {source_type, sample, estimate});
+ window.test_driver_internal.update_virtual_pressure_source = function(source_type, sample, own_contribution_estimate, context=null) {
+ return create_context_action("update_virtual_pressure_source", context, {source_type, sample, own_contribution_estimate});
};
window.test_driver_internal.remove_virtual_pressure_source = function(source_type, context=null) {
diff --git a/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js b/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js
index 9cfd90d17f2..21f39b1fc18 100644
--- a/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js
+++ b/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js
@@ -25,6 +25,12 @@ const gCSSProperties1 = {
{ type: 'discrete', options: [ [ 'flex-start', 'flex-end' ] ] }
]
},
+ 'anchor-name': {
+ // https://drafts.csswg.org/css-anchor-position-1/#name
+ types: [
+ { type: 'discrete', options: [ [ 'none', '--anchor' ] ] }
+ ]
+ },
'anchor-scope': {
// https://drafts.csswg.org/css-anchor-position-1/#anchor-scope
types: [
@@ -1279,6 +1285,30 @@ const gCSSProperties2 = {
{ type: 'discrete', options: [ [ 'absolute', 'fixed' ] ] }
]
},
+ 'position-anchor': {
+ // https://drafts.csswg.org/css-anchor-position-1/#position-anchor
+ types: [
+ { type: 'discrete', options: [ [ 'auto', '--anchor' ] ] }
+ ]
+ },
+ 'position-visibility': {
+ // https://drafts.csswg.org/css-anchor-position-1/#position-visibility
+ types: [
+ { type: 'discrete', options: [ [ 'always', 'anchors-valid' ] ] }
+ ]
+ },
+ 'position-try-fallbacks': {
+ // https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks
+ types: [
+ { type: 'discrete', options: [ [ 'none', 'flip-block' ] ] }
+ ]
+ },
+ 'position-try-order': {
+ // https://drafts.csswg.org/css-anchor-position-1/#position-try-order-property
+ types: [
+ { type: 'discrete', options: [ [ 'normal', 'most-width' ] ] }
+ ]
+ },
'quotes': {
// https://drafts.csswg.org/css-content-3/#propdef-quotes
types: [
diff --git a/tests/wpt/tests/webrtc/rtp-stats-lifetime.https.html b/tests/wpt/tests/webrtc/rtp-stats-lifetime.https.html
new file mode 100644
index 00000000000..4ddd6ad4f16
--- /dev/null
+++ b/tests/wpt/tests/webrtc/rtp-stats-lifetime.https.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+