Merge pull request #11045 from csnardi/patch-6
Remove CSSStyleDeclaration#setPropertyPriority/setPropertyValue from CSSOM IDL
diff --git a/BackgroundSync/interfaces.any.js b/BackgroundSync/interfaces.any.js
index dd677fc..207a0d5 100644
--- a/BackgroundSync/interfaces.any.js
+++ b/BackgroundSync/interfaces.any.js
@@ -6,24 +6,16 @@
// https://wicg.github.io/BackgroundSync/spec/
promise_test(async () => {
- const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
- const html = await fetch('/interfaces/html.idl').then(r => r.text());
+ const idl = await fetch('/interfaces/BackgroundSync.idl').then(r => r.text());
const sw = await fetch('/interfaces/ServiceWorker.idl').then(r => r.text());
- const idl = await fetch('/interfaces/BackgroundSync.idl').then(response => response.text());
+ const html = await fetch('/interfaces/html.idl').then(r => r.text());
+ const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
const idlArray = new IdlArray();
- idlArray.add_untested_idls(dom, { only: ['Event', 'EventInit', 'EventTarget'] });
- idlArray.add_untested_idls(html, { only: [
- 'WorkerGlobalScope',
- 'WindowOrWorkerGlobalScope'
- ] });
- idlArray.add_untested_idls(sw, { only: [
- 'ServiceWorkerRegistration',
- 'ServiceWorkerGlobalScope',
- 'ExtendableEvent',
- 'ExtendableEventInit',
- ] });
idlArray.add_idls(idl);
+ idlArray.add_dependency_idls(sw);
+ idlArray.add_dependency_idls(html);
+ idlArray.add_dependency_idls(dom);
idlArray.test();
done();
}, 'Background Sync interfaces.');
diff --git a/beacon/beacon-common.sub.js b/beacon/beacon-common.sub.js
index ed7f81a..0a36283 100644
--- a/beacon/beacon-common.sub.js
+++ b/beacon/beacon-common.sub.js
@@ -56,7 +56,8 @@
var bufferSourceMaxTest = [maxBufferSourceTest];
var formDataTests = [emptyFormDataTest, smallFormDataTest, mediumFormDataTest, largeFormDataTest];
var formDataMaxTest = [largeFormDataTest];
-var allTests = [].concat(stringTests, stringMaxTest, blobTests, blobMaxTest, bufferSourceTests, bufferSourceMaxTest, formDataTests, formDataMaxTest);
+var contentTypeTests = [smallSafeContentTypeEncodedTest,smallSafeContentTypeFormTest,smallSafeContentTypeTextTest,smallCORSContentTypeTextTest];
+var allTests = [].concat(stringTests, stringMaxTest, blobTests, blobMaxTest, bufferSourceTests, bufferSourceMaxTest, formDataTests, formDataMaxTest, contentTypeTests);
// This special cross section of test cases is meant to provide a slimmer but reasonably-
// representative set of tests for parameterization across variables (e.g. redirect codes,
diff --git a/beacon/headers/header-content-type.html b/beacon/headers/header-content-type.html
index 9dd8787..e2f2705 100644
--- a/beacon/headers/header-content-type.html
+++ b/beacon/headers/header-content-type.html
@@ -19,8 +19,8 @@
promise_test(async t => {
const id = self.token();
const testUrl = new Request(RESOURCES_DIR + "content-type.py?cmd=put&id=" + id).url;
- assert_true(navigator.sendBeacon(testUrl, what), "SendBeacon Succeeded");
assert_equals(performance.getEntriesByName(testUrl).length, 0);
+ assert_true(navigator.sendBeacon(testUrl, what), "SendBeacon Succeeded");
do {
await wait(50);
diff --git a/client-hints/accept_ch.sub.https.html b/client-hints/accept_ch.sub.https.html
index 4b70e85..78c7ad0 100644
--- a/client-hints/accept_ch.sub.https.html
+++ b/client-hints/accept_ch.sub.https.html
@@ -23,9 +23,20 @@
assert_true(r.headers.has("device-memory-received"), "device-memory-received");
assert_true(r.headers.has("dpr-received"), "dpr-received");
assert_true(r.headers.has("viewport-width-received"), "viewport-width-received");
+
assert_true(r.headers.has("rtt-received"), "rtt-received");
+ var rtt = parseInt(r.headers.get("rtt-received"));
+ assert_greater_than_equal(rtt, 0);
+ assert_less_than_equal(rtt, 3000);
+ assert_equals(rtt % 50, 0, 'rtt must be a multiple of 50 msec');
+
assert_true(r.headers.has("downlink-received"), "downlink-received");
- assert_true(r.headers.has("ect-received"), "ect-received");
+ var downlinkKbps = r.headers.get("downlink-received") * 1000;
+ assert_greater_than_equal(downlinkKbps, 0);
+ assert_less_than_equal(downlinkKbps, 10000);
+
+ assert_in_array(r.headers.get("ect-received"), ["slow-2g", "2g",
+ "3g", "4g"], 'ect-received is unexpected');
});
}, "Accept-CH header test");
diff --git a/client-hints/echo_client_hints_received.py b/client-hints/echo_client_hints_received.py
index 88d1a6b..8f2ccaa 100644
--- a/client-hints/echo_client_hints_received.py
+++ b/client-hints/echo_client_hints_received.py
@@ -1,20 +1,20 @@
def main(request, response):
"""
- Simple handler that sets a response header based on if which client hint
+ Simple handler that sets a response header based on which client hint
request headers were received.
"""
response.headers.append("Access-Control-Allow-Origin", "*")
if "device-memory" in request.headers:
- response.headers.set("device-memory-received", "true")
+ response.headers.set("device-memory-received", request.headers.get("device-memory"))
if "dpr" in request.headers:
- response.headers.set("dpr-received", "true")
+ response.headers.set("dpr-received", request.headers.get("dpr"))
if "viewport-width" in request.headers:
- response.headers.set("viewport-width-received", "true")
+ response.headers.set("viewport-width-received", request.headers.get("viewport-width"))
if "rtt" in request.headers:
- response.headers.set("rtt-received", "true")
+ response.headers.set("rtt-received", request.headers.get("rtt"))
if "downlink" in request.headers:
- response.headers.set("downlink-received", "true")
+ response.headers.set("downlink-received", request.headers.get("downlink"))
if "ect" in request.headers:
- response.headers.set("ect-received", "true")
\ No newline at end of file
+ response.headers.set("ect-received", request.headers.get("ect"))
diff --git a/content-security-policy/navigate-to/child-navigates-parent-allowed.html.headers b/content-security-policy/navigate-to/child-navigates-parent-allowed.html.headers
index 7d5e85e..aced1c6 100644
--- a/content-security-policy/navigate-to/child-navigates-parent-allowed.html.headers
+++ b/content-security-policy/navigate-to/child-navigates-parent-allowed.html.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: navigate-to support/navigate_parent.sub.html
+Content-Security-Policy: navigate-to 'self' support/navigate_parent.sub.html
diff --git a/content-security-policy/navigate-to/child-navigates-parent-blocked.html b/content-security-policy/navigate-to/child-navigates-parent-blocked.html
deleted file mode 100644
index b665b7a..0000000
--- a/content-security-policy/navigate-to/child-navigates-parent-blocked.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-
-<head>
-<meta name="timeout" content="long">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<script>
- var t = async_test("Test that the child can't navigate the parent because the relevant policy belongs to the navigation initiator (in this case the child)");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-
-<iframe srcdoc="<iframe src='support/navigate_parent.sub.html?csp=navigate-to%20%27none%27'>">
-
-</body>
diff --git a/content-security-policy/navigate-to/child-navigates-parent-blocked.sub.html b/content-security-policy/navigate-to/child-navigates-parent-blocked.sub.html
new file mode 100644
index 0000000..2acf417
--- /dev/null
+++ b/content-security-policy/navigate-to/child-navigates-parent-blocked.sub.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+<iframe srcdoc="<iframe src='support/navigate_parent.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}'>"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/child-navigates-parent-blocked.html.headers b/content-security-policy/navigate-to/child-navigates-parent-blocked.sub.html.headers
similarity index 100%
rename from content-security-policy/navigate-to/child-navigates-parent-blocked.html.headers
rename to content-security-policy/navigate-to/child-navigates-parent-blocked.sub.html.headers
diff --git a/content-security-policy/navigate-to/form-allowed.html b/content-security-policy/navigate-to/form-allowed.html
index c1a88b2..aa38d89 100644
--- a/content-security-policy/navigate-to/form-allowed.html
+++ b/content-security-policy/navigate-to/form-allowed.html
@@ -12,5 +12,5 @@
assert_equals(e.data.result, 'success');
});
</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=post_message_to_frame_owner.html">
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=post_message_to_frame_owner.html"></iframe>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-blocked.html b/content-security-policy/navigate-to/form-blocked.html
deleted file mode 100644
index 233db53..0000000
--- a/content-security-policy/navigate-to/form-blocked.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-
-<head>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27none%27&action=post_message_to_frame_owner.html">
-</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-blocked.sub.html b/content-security-policy/navigate-to/form-blocked.sub.html
new file mode 100644
index 0000000..beb2221
--- /dev/null
+++ b/content-security-policy/navigate-to/form-blocked.sub.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&action=post_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-cross-origin-allowed.sub.html b/content-security-policy/navigate-to/form-cross-origin-allowed.sub.html
index a082786..4d0ddc3 100644
--- a/content-security-policy/navigate-to/form-cross-origin-allowed.sub.html
+++ b/content-security-policy/navigate-to/form-cross-origin-allowed.sub.html
@@ -12,5 +12,5 @@
assert_equals(e.data.result, 'success');
});
</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-cross-origin-blocked.sub.html b/content-security-policy/navigate-to/form-cross-origin-blocked.sub.html
index e8e653c..49fe958 100644
--- a/content-security-policy/navigate-to/form-cross-origin-blocked.sub.html
+++ b/content-security-policy/navigate-to/form-cross-origin-blocked.sub.html
@@ -6,12 +6,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-redirected-allowed.html b/content-security-policy/navigate-to/form-redirected-allowed.html
index 7612d20..129b719 100644
--- a/content-security-policy/navigate-to/form-redirected-allowed.html
+++ b/content-security-policy/navigate-to/form-redirected-allowed.html
@@ -12,5 +12,5 @@
assert_equals(e.data.result, 'success');
});
</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=redirect_to_post_message_to_frame_owner.py">
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dpost_message_to_frame_owner.html"></iframe>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/form-redirected-blocked.sub.html b/content-security-policy/navigate-to/form-redirected-blocked.sub.html
index 6f4e1ac..6adc9ef 100644
--- a/content-security-policy/navigate-to/form-redirected-blocked.sub.html
+++ b/content-security-policy/navigate-to/form-redirected-blocked.sub.html
@@ -6,12 +6,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&action=redirect_to_post_message_to_frame_owner.py">
+<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&action=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-allowed.html b/content-security-policy/navigate-to/href-location-allowed.html
index e8896c8..16e11e0 100644
--- a/content-security-policy/navigate-to/href-location-allowed.html
+++ b/content-security-policy/navigate-to/href-location-allowed.html
@@ -14,5 +14,4 @@
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=post_message_to_frame_owner.html", "_blank");
</script>
-
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-blocked.html b/content-security-policy/navigate-to/href-location-blocked.html
deleted file mode 100644
index 5094784..0000000
--- a/content-security-policy/navigate-to/href-location-blocked.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-
-<head>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-
- window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html", "_blank");
-</script>
-
-</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-blocked.sub.html b/content-security-policy/navigate-to/href-location-blocked.sub.html
new file mode 100644
index 0000000..6aef250
--- /dev/null
+++ b/content-security-policy/navigate-to/href-location-blocked.sub.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+<script>
+ window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html", "_blank");
+</script>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-cross-origin-allowed.sub.html b/content-security-policy/navigate-to/href-location-cross-origin-allowed.sub.html
index 0009b6c..a9396fc 100644
--- a/content-security-policy/navigate-to/href-location-cross-origin-allowed.sub.html
+++ b/content-security-policy/navigate-to/href-location-cross-origin-allowed.sub.html
@@ -14,5 +14,4 @@
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
</script>
-
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-cross-origin-blocked.sub.html b/content-security-policy/navigate-to/href-location-cross-origin-blocked.sub.html
index ef0d787..894719b 100644
--- a/content-security-policy/navigate-to/href-location-cross-origin-blocked.sub.html
+++ b/content-security-policy/navigate-to/href-location-cross-origin-blocked.sub.html
@@ -7,13 +7,8 @@
<body>
<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-
- window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
+ window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
</script>
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-redirected-allowed.html b/content-security-policy/navigate-to/href-location-redirected-allowed.html
index 4f535bf..4dbfa7a 100644
--- a/content-security-policy/navigate-to/href-location-redirected-allowed.html
+++ b/content-security-policy/navigate-to/href-location-redirected-allowed.html
@@ -14,5 +14,4 @@
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=redirect_to_post_message_to_frame_owner.py", "_blank");
</script>
-
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/href-location-redirected-blocked.sub.html b/content-security-policy/navigate-to/href-location-redirected-blocked.sub.html
index 8a0047d..b91c473 100644
--- a/content-security-policy/navigate-to/href-location-redirected-blocked.sub.html
+++ b/content-security-policy/navigate-to/href-location-redirected-blocked.sub.html
@@ -7,13 +7,8 @@
<body>
<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-
- window.open("support/href_location_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py", "_blank");
+ window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
</script>
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-allowed.html b/content-security-policy/navigate-to/link-click-allowed.html
index 3f7f678..667a3a5 100644
--- a/content-security-policy/navigate-to/link-click-allowed.html
+++ b/content-security-policy/navigate-to/link-click-allowed.html
@@ -14,4 +14,4 @@
});
</script>
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=post_message_to_frame_owner.html">
-</body>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-blocked.html b/content-security-policy/navigate-to/link-click-blocked.html
deleted file mode 100644
index 65de768..0000000
--- a/content-security-policy/navigate-to/link-click-blocked.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-
-<head>
-<meta name="timeout" content="long">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html">
-</body>
diff --git a/content-security-policy/navigate-to/link-click-blocked.sub.html b/content-security-policy/navigate-to/link-click-blocked.sub.html
new file mode 100644
index 0000000..0ad9826
--- /dev/null
+++ b/content-security-policy/navigate-to/link-click-blocked.sub.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-cross-origin-allowed.sub.html b/content-security-policy/navigate-to/link-click-cross-origin-allowed.sub.html
index 360ede3..2f9f0e2 100644
--- a/content-security-policy/navigate-to/link-click-cross-origin-allowed.sub.html
+++ b/content-security-policy/navigate-to/link-click-cross-origin-allowed.sub.html
@@ -14,4 +14,4 @@
});
</script>
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
-</body>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-cross-origin-blocked.sub.html b/content-security-policy/navigate-to/link-click-cross-origin-blocked.sub.html
index 50f258b..970f5a2 100644
--- a/content-security-policy/navigate-to/link-click-cross-origin-blocked.sub.html
+++ b/content-security-policy/navigate-to/link-click-cross-origin-blocked.sub.html
@@ -7,12 +7,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
-</body>
+<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-redirected-allowed.html b/content-security-policy/navigate-to/link-click-redirected-allowed.html
index e75a7e5..81c4f4e 100644
--- a/content-security-policy/navigate-to/link-click-redirected-allowed.html
+++ b/content-security-policy/navigate-to/link-click-redirected-allowed.html
@@ -14,4 +14,4 @@
});
</script>
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=redirect_to_post_message_to_frame_owner.py">
-</body>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/link-click-redirected-blocked.sub.html b/content-security-policy/navigate-to/link-click-redirected-blocked.sub.html
index 355e2c8..bb61126 100644
--- a/content-security-policy/navigate-to/link-click-redirected-blocked.sub.html
+++ b/content-security-policy/navigate-to/link-click-redirected-blocked.sub.html
@@ -7,12 +7,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py">
-</body>
+<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/meta-refresh-blocked.html b/content-security-policy/navigate-to/meta-refresh-blocked.html
deleted file mode 100644
index 7acf68d..0000000
--- a/content-security-policy/navigate-to/meta-refresh-blocked.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-
-<head>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-
-<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html">
-</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/meta-refresh-blocked.sub.html b/content-security-policy/navigate-to/meta-refresh-blocked.sub.html
new file mode 100644
index 0000000..d4d52a5
--- /dev/null
+++ b/content-security-policy/navigate-to/meta-refresh-blocked.sub.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+
+<body>
+<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
+</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/meta-refresh-cross-origin-blocked.sub.html b/content-security-policy/navigate-to/meta-refresh-cross-origin-blocked.sub.html
index 627744e..2118b27 100644
--- a/content-security-policy/navigate-to/meta-refresh-cross-origin-blocked.sub.html
+++ b/content-security-policy/navigate-to/meta-refresh-cross-origin-blocked.sub.html
@@ -6,12 +6,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
+<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/meta-refresh-redirected-blocked.sub.html b/content-security-policy/navigate-to/meta-refresh-redirected-blocked.sub.html
index 598600f..55e3295 100644
--- a/content-security-policy/navigate-to/meta-refresh-redirected-blocked.sub.html
+++ b/content-security-policy/navigate-to/meta-refresh-redirected-blocked.sub.html
@@ -6,12 +6,7 @@
</head>
<body>
-<script>
- var t = async_test("Test that the child iframe navigation is blocked");
- window.onmessage = t.step_func_done(function(e) {
- assert_equals(e.data.result, 'fail');
- assert_equals(e.data.violatedDirective, 'navigate-to');
- });
-</script>
-<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py">
+<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
+
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/parent-navigates-child-blocked.html b/content-security-policy/navigate-to/parent-navigates-child-blocked.html
index 8353d39..fc549b4 100644
--- a/content-security-policy/navigate-to/parent-navigates-child-blocked.html
+++ b/content-security-policy/navigate-to/parent-navigates-child-blocked.html
@@ -7,12 +7,6 @@
<body>
<script>
- var t = async_test("Test that the parent can't navigate the child because the relevant policy belongs to the navigation initiator (in this case the parent)");
- window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
- assert_equals(e.violatedDirective, 'navigate-to');
- }));
- window.onmessage = t.unreached_func("Should not have received a message from the child");
-
var i = document.createElement('iframe');
var src_changed = false;
i.onload = function() {
@@ -20,7 +14,8 @@
src_changed = true;
i.src = "support/post_message_to_frame_owner.html";
}
- i.src = "support/wait_for_navigation.html?csp=navigate-to%20%self%27";
+ i.src = "support/wait_for_navigation.html?csp=navigate-to%20%27self%27";
document.body.appendChild(i);
</script>
+<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20support%2Fwait_for_navigation.html'></script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/parent-navigates-child-blocked.html.headers b/content-security-policy/navigate-to/parent-navigates-child-blocked.html.headers
deleted file mode 100644
index c2b8cd3..0000000
--- a/content-security-policy/navigate-to/parent-navigates-child-blocked.html.headers
+++ /dev/null
@@ -1,4 +0,0 @@
-Expires: Mon, 26 Jul 1997 05:00:00 GMT
-Cache-Control: no-store, no-cache, must-revalidate
-Pragma: no-cache
-Content-Security-Policy: navigate-to support/wait_for_navigation.html
diff --git a/content-security-policy/navigate-to/parent-navigates-child-blocked.html.sub.headers b/content-security-policy/navigate-to/parent-navigates-child-blocked.html.sub.headers
new file mode 100644
index 0000000..6784a56
--- /dev/null
+++ b/content-security-policy/navigate-to/parent-navigates-child-blocked.html.sub.headers
@@ -0,0 +1,5 @@
+Expires: Mon, 26 Jul 1997 05:00:00 GMT
+Cache-Control: no-store, no-cache, must-revalidate
+Pragma: no-cache
+Set-Cookie: parent-navigates-child-blocked={{$id:uuid()}}; Path=/content-security-policy/navigate-to/
+Content-Security-Policy: navigate-to support/wait_for_navigation.html; report-uri ../support/report.py?op=put&reportID={{$id}}
diff --git a/content-security-policy/navigate-to/support/form_action_navigation.sub.html b/content-security-policy/navigate-to/support/form_action_navigation.sub.html
index be5be01..3e3e2af 100644
--- a/content-security-policy/navigate-to/support/form_action_navigation.sub.html
+++ b/content-security-policy/navigate-to/support/form_action_navigation.sub.html
@@ -13,9 +13,21 @@
<body>
<form action='{{GET[action]}}' target='_self' id='form'>
<input type="text" name="dummy">
+ <div id="form-div"></div>
</form>
<script>
- document.getElementById('form').submit();
+ try {
+ url = new URL("{{GET[action]}}", location.href);
+ for (var p of url.searchParams) {
+ var elem = document.createElement('input');
+ elem.type = 'text';
+ elem.name = p[0];
+ elem.value = p[1];
+ document.getElementById('form-div').appendChild(elem);
+ }
+ } catch(ex) {}
+
+ document.getElementById('form').submit();
</script>
</body>
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/support/form_action_navigation.sub.html.sub.headers b/content-security-policy/navigate-to/support/form_action_navigation.sub.html.sub.headers
index d3c635b..9c572a9 100644
--- a/content-security-policy/navigate-to/support/form_action_navigation.sub.html.sub.headers
+++ b/content-security-policy/navigate-to/support/form_action_navigation.sub.html.sub.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: {{GET[csp]}}
+Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
\ No newline at end of file
diff --git a/content-security-policy/navigate-to/support/href_location_navigation.sub.html b/content-security-policy/navigate-to/support/href_location_navigation.sub.html
index 2e8fad6..c577e93 100644
--- a/content-security-policy/navigate-to/support/href_location_navigation.sub.html
+++ b/content-security-policy/navigate-to/support/href_location_navigation.sub.html
@@ -2,12 +2,6 @@
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-
- <script>
- window.addEventListener('securitypolicyviolation', function(e) {
- window.opener.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
- });
- </script>
</head>
<body>
diff --git a/content-security-policy/navigate-to/support/href_location_navigation.sub.html.sub.headers b/content-security-policy/navigate-to/support/href_location_navigation.sub.html.sub.headers
index d3c635b..d01e267 100644
--- a/content-security-policy/navigate-to/support/href_location_navigation.sub.html.sub.headers
+++ b/content-security-policy/navigate-to/support/href_location_navigation.sub.html.sub.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: {{GET[csp]}}
+Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
diff --git a/content-security-policy/navigate-to/support/link_click_navigation.sub.html b/content-security-policy/navigate-to/support/link_click_navigation.sub.html
index 2469ed6..f1b4242 100644
--- a/content-security-policy/navigate-to/support/link_click_navigation.sub.html
+++ b/content-security-policy/navigate-to/support/link_click_navigation.sub.html
@@ -2,12 +2,6 @@
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-
- <script>
- window.addEventListener('securitypolicyviolation', function(e) {
- top.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
- });
- </script>
</head>
<body>
diff --git a/content-security-policy/navigate-to/support/link_click_navigation.sub.html.sub.headers b/content-security-policy/navigate-to/support/link_click_navigation.sub.html.sub.headers
index d3c635b..d01e267 100644
--- a/content-security-policy/navigate-to/support/link_click_navigation.sub.html.sub.headers
+++ b/content-security-policy/navigate-to/support/link_click_navigation.sub.html.sub.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: {{GET[csp]}}
+Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
diff --git a/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html b/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html
index 3a84141..64bae27 100644
--- a/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html
+++ b/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html
@@ -9,7 +9,7 @@
});
</script>
- <meta http-equiv="refresh" content="1; url={{GET[target]}}">
+ <meta http-equiv="refresh" content="0; url={{GET[target]}}">
</head>
<body>
diff --git a/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html.sub.headers b/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html.sub.headers
index d3c635b..d01e267 100644
--- a/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html.sub.headers
+++ b/content-security-policy/navigate-to/support/meta_refresh_navigation.sub.html.sub.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: {{GET[csp]}}
+Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
diff --git a/content-security-policy/navigate-to/support/navigate_parent.sub.html.sub.headers b/content-security-policy/navigate-to/support/navigate_parent.sub.html.sub.headers
index d3c635b..d01e267 100644
--- a/content-security-policy/navigate-to/support/navigate_parent.sub.html.sub.headers
+++ b/content-security-policy/navigate-to/support/navigate_parent.sub.html.sub.headers
@@ -1,4 +1,4 @@
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
-Content-Security-Policy: {{GET[csp]}}
+Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
diff --git a/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py b/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py
index 77e725b..652f9a5 100644
--- a/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py
+++ b/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py
@@ -1,3 +1,6 @@
def main(request, response):
response.status = 302
- response.headers.set("Location", "post_message_to_frame_owner.html")
\ No newline at end of file
+ if "location" in request.GET:
+ response.headers.set("Location", request.GET["location"])
+ else:
+ response.headers.set("Location", "post_message_to_frame_owner.html")
\ No newline at end of file
diff --git a/content-security-policy/support/checkReport.sub.js b/content-security-policy/support/checkReport.sub.js
index 7e5417b..1ae7d09 100644
--- a/content-security-policy/support/checkReport.sub.js
+++ b/content-security-policy/support/checkReport.sub.js
@@ -24,18 +24,20 @@
reportCookieName = location.pathname.split('/')[location.pathname.split('/').length - 1].split('.')[0];
}
- var reportID = "";
+ var reportID = "{{GET[reportID]}}";
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookieName = cookies[i].split('=')[0].trim();
- var cookieValue = cookies[i].split('=')[1].trim();
+ if (reportID == "") {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookieName = cookies[i].split('=')[0].trim();
+ var cookieValue = cookies[i].split('=')[1].trim();
- if (cookieName == reportCookieName) {
- reportID = cookieValue;
- var cookieToDelete = cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=" + document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1);
- document.cookie = cookieToDelete;
- break;
+ if (cookieName == reportCookieName) {
+ reportID = cookieValue;
+ var cookieToDelete = cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=" + document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1);
+ document.cookie = cookieToDelete;
+ break;
+ }
}
}
diff --git a/css/cssom/cssom-setProperty-shorthand.html b/css/cssom/cssom-setProperty-shorthand.html
index fe2ad47..4c0f9a2 100644
--- a/css/cssom/cssom-setProperty-shorthand.html
+++ b/css/cssom/cssom-setProperty-shorthand.html
@@ -42,8 +42,8 @@
element = document.createElement('span');
- function canSetProperty(propertyName) {
- element.style.setProperty(propertyName, 'initial');
+ function canSetProperty(propertyName, priority) {
+ element.style.setProperty(propertyName, 'initial', priority);
return element.style.getPropertyValue(propertyName) == 'initial';
}
@@ -56,13 +56,21 @@
var propertyName = shorthandProperties[i];
test(function(){
- assert_true(canSetProperty(propertyName), 'can setPropertyValue with shorthand');
+ assert_true(canSetProperty(propertyName, ''), 'can setPropertyValue with shorthand');
}, 'shorthand ' + propertyName + ' can be set with setProperty');
test(function(){
assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand');
}, 'shorthand ' + propertyName + ' can be removed with removeProperty');
+ test(function(){
+ assert_true(canSetProperty(propertyName, 'important'), 'can setPropertyValue with shorthand');
+ }, 'shorthand ' + propertyName + ' can be set with setProperty and priority !important');
+
+ test(function(){
+ assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand');
+ }, 'shorthand ' + propertyName + ' can be removed with removeProperty even when set with !important');
+
}
</script>
</body>
diff --git a/intersection-observer/isIntersecting-change-events.html b/intersection-observer/isIntersecting-change-events.html
new file mode 100644
index 0000000..f9362c3
--- /dev/null
+++ b/intersection-observer/isIntersecting-change-events.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="./resources/intersection-observer-test-utils.js"></script>
+
+<style>
+pre, #log {
+ position: absolute;
+ top: 0;
+ left: 200px;
+}
+#root {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 150px;
+ height: 200px;
+ overflow-y: scroll;
+}
+#target1, #target2, #target3, #target4 {
+ width: 100px;
+ height: 100px;
+}
+#target1 {
+ background-color: green;
+}
+#target2 {
+ background-color: red;
+}
+#target3 {
+ background-color: blue;
+}
+#target4 {
+ background-color: yellow;
+}
+</style>
+
+<div id="root">
+ <div id="target1"></div>
+ <div id="target2"></div>
+ <div id="target3"></div>
+</div>
+
+<script>
+var entries = [];
+var observer;
+
+runTestCycle(function() {
+ var root = document.getElementById('root');
+ var target1 = document.getElementById('target1');
+ var target2 = document.getElementById('target2');
+ var target3 = document.getElementById('target3');
+ assert_true(!!root, "root element exists.");
+ assert_true(!!target1, "target1 element exists.");
+ assert_true(!!target2, "target2 element exists.");
+ assert_true(!!target3, "target3 element exists.");
+ observer = new IntersectionObserver(function(changes) {
+ entries = entries.concat(changes);
+ }, { root: root });
+ observer.observe(target1);
+ observer.observe(target2);
+ observer.observe(target3);
+ entries = entries.concat(observer.takeRecords());
+ assert_equals(entries.length, 0, "No initial notifications.");
+ runTestCycle(step0, "Rects in initial notifications should report initial positions.");
+}, "isIntersecting changes should trigger notifications.");
+
+function step0() {
+ assert_equals(entries.length, 3, "Has 3 initial notifications.");
+ checkRect(entries[0].boundingClientRect, [0, 100, 0, 100], "Check 1st entry rect");
+ assert_equals(entries[0].target.id, 'target1', "Check 1st entry target id.");
+ checkIsIntersecting(entries, 0, true);
+ checkRect(entries[1].boundingClientRect, [0, 100, 100, 200], "Check 2nd entry rect");
+ assert_equals(entries[1].target.id, 'target2', "Check 2nd entry target id.");
+ checkIsIntersecting(entries, 1, true);
+ checkRect(entries[2].boundingClientRect, [0, 100, 200, 300], "Check 3rd entry rect");
+ assert_equals(entries[2].target.id, 'target3', "Check 3rd entry target id.");
+ checkIsIntersecting(entries, 2, true);
+ runTestCycle(step1, "Set scrollTop=100 and check for no new notifications.");
+ root.scrollTop = 100;
+}
+
+function step1() {
+ assert_equals(entries.length, 3, "Has 3 total notifications because isIntersecting did not change.");
+ runTestCycle(step2, "Add 4th target.");
+ root.scrollTop = 0;
+ var target4 = document.createElement('div');
+ target4.setAttribute('id', 'target4');
+ root.appendChild(target4);
+ observer.observe(target4);
+}
+
+function step2() {
+ assert_equals(entries.length, 4, "Has 3 total notifications because 4th element was added.");
+ checkRect(entries[3].boundingClientRect, [0, 100, 300, 400], "Check 4th entry rect");
+ assert_equals(entries[3].target.id, 'target4', "Check 4th entry target id.");
+ checkIsIntersecting(entries, 3, false);
+ assert_equals(entries[3].intersectionRatio, 0, 'target4 initially has intersectionRatio of 0.');
+ runTestCycle(step3, "Set scrollTop=100 and check for one new notification.");
+ root.scrollTop = 100;
+}
+
+function step3() {
+ assert_equals(entries.length, 5, "Has 5 total notifications.");
+ checkRect(entries[4].boundingClientRect, [0, 100, 200, 300], "Check 5th entry rect");
+ assert_equals(entries[4].target.id, 'target4', "Check 5th entry target id.");
+ checkIsIntersecting(entries, 4, true);
+ assert_equals(entries[4].intersectionRatio, 0, 'target4 still has intersectionRatio of 0.');
+ root.scrollTop = 0; // reset to make it easier to refresh and run the test
+}
+
+</script>
diff --git a/intersection-observer/resources/intersection-observer-test-utils.js b/intersection-observer/resources/intersection-observer-test-utils.js
index 48ccbb1..5ad8119 100644
--- a/intersection-observer/resources/intersection-observer-test-utils.js
+++ b/intersection-observer/resources/intersection-observer-test-utils.js
@@ -120,3 +120,8 @@
checkJsonEntry(actual[i], expected[i]);
}, description);
}
+
+function checkIsIntersecting(entries, i, expected) {
+ assert_equals(entries[i].isIntersecting, expected,
+ 'entries[' + i + '].target.isIntersecting equals ' + expected);
+}
\ No newline at end of file
diff --git a/keyboard-lock/OWNERS b/keyboard-lock/OWNERS
new file mode 100644
index 0000000..9e83dd9
--- /dev/null
+++ b/keyboard-lock/OWNERS
@@ -0,0 +1,2 @@
+@garykac
+@joedow-42
diff --git a/pointerevents/pointerlock/pointerevent_movementxy_when_locked-manual.html b/pointerevents/pointerlock/pointerevent_movementxy_when_locked-manual.html
new file mode 100644
index 0000000..ccb8c27
--- /dev/null
+++ b/pointerevents/pointerlock/pointerevent_movementxy_when_locked-manual.html
@@ -0,0 +1,83 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Pointer Events pointer lock tests</title>
+ <meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" type="text/css" href="/external/wpt/pointerevents/pointerevent_styles.css">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script type="text/javascript" src="../pointerevent_support.js"></script>
+ <style>
+ #testContainer {
+ touch-action: none;
+ user-select: none;
+ position: relative;
+ }
+ </style>
+ <script>
+ var lock_change_count = 0;
+ var mouseeventMovements = []
+ var pointereventMovements = []
+
+ function resetTestState() {
+ }
+
+ function run() {
+ var test_pointerEvent = setup_pointerevent_test("pointerevent movementX/Y when lock test", ['mouse']);
+ var div1 = document.getElementById("target");
+
+ on_event(div1, 'pointerdown', function(event) {
+ if (lock_change_count == 0)
+ div1.requestPointerLock();
+ });
+ on_event(div1, 'pointerup', function(event) {
+ if (lock_change_count == 1)
+ document.exitPointerLock();
+ });
+ on_event(div1, 'pointermove', function(event) {
+ if (lock_change_count == 1) {
+ pointereventMovements.push(`${event.movementX}, ${event.movementY}`);
+ }
+ });
+ on_event(div1, 'mousemove', function(event) {
+ if (lock_change_count == 1) {
+ mouseeventMovements.push(`${event.movementX}, ${event.movementY}`);
+ }
+ });
+ on_event(document, 'pointerlockchange', function(event) {
+ lock_change_count++;
+ if (lock_change_count == 1) {
+ test_pointerEvent.step(function() {
+ assert_equals(document.pointerLockElement, div1, "document.pointerLockElement should be div1.");
+ });
+ } else if (lock_change_count == 2) {
+ test_pointerEvent.step(function() {
+ assert_equals(document.pointerLockElement, null, "document.pointerLockElement should be null.");
+ assert_not_equals(mouseeventMovements.length, 0);
+ assert_array_equals(pointereventMovements, mouseeventMovements, "pointermove should have movementX/Y same as mousemove");
+ });
+ test_pointerEvent.done();
+ }
+ });
+ }
+ </script>
+ </head>
+ <body onload="run()">
+ <h1>Pointer Events movement in locked state test</h1>
+ <h2 id="pointerTypeDescription"></h2>
+ <h4>
+ Test Description: This test checks if pointermove.movementX/Y matches mousemove.movementX/Y when pointer is locked.
+ <ol>
+ <li>Press left button down on the green rectangle and hold it.</li>
+ <li>Move the mouse inside the green rectangle.</li>
+ </ol>
+ </ol>
+
+ Test passes if the proper behavior of the events is observed.
+ </h4>
+ <div id="testContainer">
+ <div id="target" style="width:800px;height:250px;background:green"></div>
+ </div>
+ <div class="spacer"></div>
+ </body>
+</html>
diff --git a/resources/idlharness.js b/resources/idlharness.js
index 4664465..d413c51 100644
--- a/resources/idlharness.js
+++ b/resources/idlharness.js
@@ -183,11 +183,19 @@
* A implements C;
* D implements E;
*
- * results in { A: ["B", "C"], D: ["E"] }.
+ * results in this["implements"] = { A: ["B", "C"], D: ["E"] }.
+ *
+ * Similarly,
+ *
+ * interface A : B {};
+ * interface B : C {};
+ *
+ * results in this["inheritance"] = { A: "B", B: "C" }
*/
this.partials = [];
this["implements"] = {};
this["includes"] = {};
+ this["inheritance"] = {};
};
//@}
@@ -204,19 +212,115 @@
{
/** Entry point. See documentation at beginning of file. */
var parsed_idls = WebIDL2.parse(raw_idls);
- for (var i = 0; i < parsed_idls.length; i++)
- {
+ this.mark_as_untested(parsed_idls);
+ this.internal_add_idls(parsed_idls, options);
+};
+
+//@}
+IdlArray.prototype.mark_as_untested = function (parsed_idls)
+//@{
+{
+ for (var i = 0; i < parsed_idls.length; i++) {
parsed_idls[i].untested = true;
- if ("members" in parsed_idls[i])
- {
- for (var j = 0; j < parsed_idls[i].members.length; j++)
- {
+ if ("members" in parsed_idls[i]) {
+ for (var j = 0; j < parsed_idls[i].members.length; j++) {
parsed_idls[i].members[j].untested = true;
}
}
}
- this.internal_add_idls(parsed_idls, options);
};
+//@}
+
+//@}
+IdlArray.prototype.is_excluded_by_options = function (name, options)
+//@{
+{
+ return options &&
+ (options.except && options.except.includes(name)
+ || options.only && !options.only.includes(name));
+};
+//@}
+
+//@}
+IdlArray.prototype.add_dependency_idls = function(raw_idls, options)
+//@{
+{
+ const parsed_idls = WebIDL2.parse(raw_idls);
+ const new_options = { only: [] }
+
+ const all_deps = new Set();
+ Object.values(this.inheritance).forEach(v => all_deps.add(v));
+ Object.values(this.implements).forEach(v => all_deps.add(v));
+ // NOTE: If 'A includes B' for B that we care about, then A is also a dep.
+ Object.keys(this.includes).forEach(k => {
+ all_deps.add(k);
+ this.includes[k].forEach(v => all_deps.add(v));
+ });
+ this.partials.map(p => p.name).forEach(v => all_deps.add(v));
+ // Add the attribute idlTypes of all the nested members of all tested idls.
+ Object.values(this.members).filter(m => !m.untested && m.members).forEach(parsed => {
+ Object.values(parsed.members).filter(m => m.type === 'attribute').forEach(m => {
+ all_deps.add(m.idlType.idlType);
+ });
+ });
+
+ if (options && options.except && options.only) {
+ throw new IdlHarnessError("The only and except options can't be used together.");
+ }
+
+ const should_skip = name => {
+ // NOTE: Deps are untested, so we're lenient, and skip re-encountered definitions.
+ // e.g. for 'idl' containing A:B, B:C, C:D
+ // array.add_idls(idl, {only: ['A','B']}).
+ // array.add_dependency_idls(idl);
+ // B would be encountered as tested, and encountered as a dep, so we ignore.
+ return name in this.members
+ || this.is_excluded_by_options(name, options);
+ }
+ // Record of skipped items, in case we later determine they are a dependency.
+ // Maps name -> [parsed_idl, ...]
+ const skipped = new Map();
+ const process = function(parsed) {
+ let name = parsed.name
+ || parsed.type == "implements" && parsed.target
+ || parsed.type == "includes" && parsed.target;
+ if (!name || should_skip(name) || !all_deps.has(name)) {
+ name &&
+ skipped.has(name)
+ ? skipped.get(name).push(parsed)
+ : skipped.set(name, [parsed]);
+ return;
+ }
+
+ new_options.only.push(name);
+ const follow_up = [];
+ for (const dep_type of ["inheritance", "implements", "includes"]) {
+ if (parsed[dep_type]) {
+ const dep = parsed[dep_type];
+ new_options.only.push(dep);
+ all_deps.add(dep);
+ follow_up.push(dep);
+ }
+ }
+
+ for (const deferred of follow_up) {
+ if (skipped.has(deferred)) {
+ const next = skipped.get(deferred);
+ skipped.delete(deferred);
+ next.forEach(process);
+ }
+ }
+ }
+ for (let parsed of parsed_idls) {
+ process(parsed);
+ }
+
+ this.mark_as_untested(parsed_idls);
+
+ if (new_options.only.length) {
+ this.internal_add_idls(parsed_idls, new_options);
+ }
+}
//@}
IdlArray.prototype.internal_add_idls = function(parsed_idls, options)
@@ -242,17 +346,8 @@
throw new IdlHarnessError("The only and except options can't be used together.");
}
- function should_skip(name)
- {
- if (options && options.only && options.only.indexOf(name) == -1)
- {
- return true;
- }
- if (options && options.except && options.except.indexOf(name) != -1)
- {
- return true;
- }
- return false;
+ var should_skip = name => {
+ return this.is_excluded_by_options(name, options);
}
parsed_idls.forEach(function(parsed_idl)
@@ -304,6 +399,17 @@
{
throw new IdlHarnessError("Duplicate identifier " + parsed_idl.name);
}
+
+ if (parsed_idl["inheritance"]) {
+ // NOTE: Clash should be impossible (would require redefinition of parsed_idl.name).
+ if (parsed_idl.name in this["inheritance"]
+ && parsed_idl["inheritance"] != this["inheritance"][parsed_idl.name]) {
+ throw new IdlHarnessError(
+ `Inheritance for ${parsed_idl.name} was already defined`);
+ }
+ this["inheritance"][parsed_idl.name] = parsed_idl["inheritance"];
+ }
+
switch(parsed_idl.type)
{
case "interface":
diff --git a/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html b/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html
index bffced5..fed6f92 100644
--- a/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html
+++ b/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html
@@ -36,6 +36,14 @@
idl.add_untested_idls('interface B : A { };');
idl.assert_throws('A has a circular dependency: A,B,A', i => i.test());
}, 'should throw when inheritance is circular');
+
+ test(function () {
+ var idl = new IdlArray();
+ idl.add_untested_idls('interface A : B { };');
+ idl.assert_throws(
+ 'Duplicate identifier A',
+ i => i.add_untested_idls('interface A : C { };'));
+ }, 'should throw when multiple inheritances defined');
</script>
</body>
</html>
diff --git a/svg/extensibility/foreignObject/foreign-object-paints-before-rect-expected.html b/svg/extensibility/foreignObject/foreign-object-paints-before-rect-expected.html
new file mode 100644
index 0000000..a0a8692
--- /dev/null
+++ b/svg/extensibility/foreignObject/foreign-object-paints-before-rect-expected.html
@@ -0,0 +1,12 @@
+<!doctype HTML>
+<!doctype HTML>
+<style>
+* {
+ margin: 0
+}
+</style>
+<svg style="width: 500px; height: 500px">
+ <rect x="0" y="0" width="100%" height="100%" style="fill: blue"/>
+ <rect x="0" y="0" width="50%" height="50%"/>
+</svg>
+
diff --git a/svg/extensibility/foreignObject/foreign-object-paints-before-rect.html b/svg/extensibility/foreignObject/foreign-object-paints-before-rect.html
new file mode 100644
index 0000000..928a136
--- /dev/null
+++ b/svg/extensibility/foreignObject/foreign-object-paints-before-rect.html
@@ -0,0 +1,16 @@
+<!doctype HTML>
+<link rel="match" href="foreign-object-paints-before-rect-expected.html">
+<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#embedded-ForeignObjectElement"/>
+<style>
+* {
+ margin: 0
+}
+</style>
+<!-- Test that the <foreignObject> root element paints in element order
+within the SVG, but content within it is atomic. -->
+<svg style="width: 500px; height: 500px">
+ <foreignObject width="100%" height="100%">
+ <div style="width: 500px; height: 500px; background: blue"></div>
+ </foreignObject>
+ <rect x="0" y="0" width="50%" height="50%"/>
+</svg>
diff --git a/tools/wptrunner/wptrunner/vcs.py b/tools/wptrunner/wptrunner/vcs.py
index e4a19aa..ab72cf8 100644
--- a/tools/wptrunner/wptrunner/vcs.py
+++ b/tools/wptrunner/wptrunner/vcs.py
@@ -27,6 +27,10 @@
logger.debug(" ".join(command_line))
try:
return subprocess.check_output(command_line, stderr=subprocess.STDOUT, **proc_kwargs)
+ except OSError as e:
+ if log_error:
+ logger.error(e)
+ raise
except subprocess.CalledProcessError as e:
if log_error:
logger.error(e.output)
diff --git a/tools/wptrunner/wptrunner/wpttest.py b/tools/wptrunner/wptrunner/wpttest.py
index c4eb726..9e4290d 100644
--- a/tools/wptrunner/wptrunner/wpttest.py
+++ b/tools/wptrunner/wptrunner/wpttest.py
@@ -75,7 +75,7 @@
try:
# GitTree.__init__ throws if we are not in a git tree.
rev = GitTree(log_error=False).rev
- except subprocess.CalledProcessError:
+ except (OSError, subprocess.CalledProcessError):
rev = None
if rev:
self["revision"] = rev
diff --git a/web-animations/interfaces/Animation/idlharness.html b/web-animations/interfaces/Animation/idlharness.html
index 0b737a5..4d78ca5 100644
--- a/web-animations/interfaces/Animation/idlharness.html
+++ b/web-animations/interfaces/Animation/idlharness.html
@@ -11,15 +11,16 @@
'use strict';
promise_test(async () => {
- const text = await fetch('/interfaces/web-animations.idl').then(response =>
- response.text(),
- );
- const idlArray = new IdlArray();
- idlArray.add_idls(text, { only: ['Animation', 'AnimationPlayState'] });
+ const idl = await fetch('/interfaces/web-animations.idl').then(r => r.text());
+ const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
+ const html = await fetch('/interfaces/html.idl').then(r => r.text());
- idlArray.add_untested_idls('interface AnimationTimeline {};');
- idlArray.add_untested_idls('interface EventHandler {};');
- idlArray.add_untested_idls('interface EventTarget {};');
+ const idlArray = new IdlArray();
+ idlArray.add_idls(idl, {only: ['Animation', 'AnimationPlayState']});
+ idlArray.add_dependency_idls(idl);
+ idlArray.add_dependency_idls(dom);
+ idlArray.add_dependency_idls(html);
+ idlArray.add_untested_idls('interface CSSPseudoElement {};');
idlArray.add_objects( { Animation: ['new Animation()'] } );
idlArray.test();
done();
diff --git a/worklets/OWNERS b/worklets/OWNERS
new file mode 100644
index 0000000..ddff133
--- /dev/null
+++ b/worklets/OWNERS
@@ -0,0 +1 @@
+@bfgeek