diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index faa00f45ecf..d4f62ed7113 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: TIMEOUT diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 7bd994ff6e9..ded5eff2b11 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -52880,6 +52880,19 @@ {} ] ], + "float-paint-relayout.html": [ + "0499e3e9a260b069adec05f1abc66feccc178bcc", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "floated-table-wider-than-specified.html": [ "f93d50e43dd3eb49d5c8964200b7fe4ebb5bd6c8", [ @@ -146204,6 +146217,19 @@ {} ] ], + "change-list-descendant-display.html": [ + "18296f8862887eb1b666eb20f1ced0dd4cc78392", + [ + null, + [ + [ + "/css/css-lists/change-list-descendant-display-ref.html", + "==" + ] + ], + {} + ] + ], "change-list-style-position-001.html": [ "5f56ee76ff70d12738ef6cef2a6f713141c82dec", [ @@ -155102,6 +155128,19 @@ {} ] ], + "position-sticky-scroll-reposition.html": [ + "b75275c64fe3b8b1130abade63ea69c575085b80", + [ + null, + [ + [ + "/css/css-position/position-sticky-scroll-reposition-ref.html", + "==" + ] + ], + {} + ] + ], "position-sticky-scroll-with-clip-and-abspos.html": [ "46085b49b4c405bdc1d0a05eafda3faca8ecf74a", [ @@ -185186,6 +185225,19 @@ {} ] ], + "outline-023.html": [ + "ba623d997349aeb5743ad83006257ddcb4a29070", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "outline-color-001.html": [ "4245b2ceb7393a73850a223e498987e0e1bc4aa3", [ @@ -236017,84 +236069,10 @@ [] ] }, - "origin-policy": { - "policy-content-security-comma-in-policy": [ - "42990f93e6d2722d9895e69e66679994f5e8fc36", - [] - ], - "policy-content-security-double-content-security": [ - "be9b3750647d12117d966bbea534db7c41792451", - [] - ], - "policy-content-security-double-policies": [ - "2e625c5c46389b77fbe7ec418dff010e6cd0ed5f", - [] - ], - "policy-content-security-noimg": [ - "cd57b7b21e916b42c2dc74b70d1a4834ff8ee04f", - [] - ], - "policy-content-security-noimg-report-only": [ - "13c662ef2d6e1c754c869ad63cea5a439fde8010", - [] - ], - "policy-content-security-non-array": [ - "b96546c5f88fe77a219822f35ec7c516e3396fec", - [] - ], - "policy-content-security-non-object": [ - "7f6e1383640125115b135ac87bfe0f414628f6ac", - [] - ], - "policy-content-security-non-string": [ - "8649b17c4d8e73e03d3f1231e572a9b34713703e", - [] - ], - "policy-content-security-valid": [ - "d4babb7949eefdf8c7867d5aea268977791c447f", - [] - ], - "policy-content-security-valid-with-multi-item-array": [ - "45ec32200d5f6e3340866d2dc3dff6031aba5a47", - [] - ], - "policy-content-security-valid-with-semicolon": [ - "e777d5c96d5921d4b13b49a223059755f9697881", - [] - ], - "policy-csp-1": [ - "d4babb7949eefdf8c7867d5aea268977791c447f", - [] - ], - "policy-csp-2": [ - "34a6c5c873b5775edaaac2bbb70029d76dc20074", - [] - ], - "policy-features-comma-in-policy": [ - "e991c788f24a160907029a12c747cd70328876d8", - [] - ], - "policy-features-double-features": [ - "583f1eaa2fcda8773d71c94118a4e315844a64d1", - [] - ], - "policy-features-double-policy": [ - "fb216bc47298384a0261ef27b78d412ffc0e383b", - [] - ], - "policy-features-non-object": [ - "b4d255440dc4b30da15dc1e0521f0f64f54570c4", - [] - ], - "policy-features-non-string": [ - "8b758c7f617790b989c62374f850769b259b1e48", - [] - ], - "policy-features-valid": [ - "22ef8992cf7b5e3712fa760d9157c2d464830ef0", - [] - ] - } + "origin-policy": [ + "df2b83256c2265fdcf1e48b6f1b06c852412cb23", + [] + ] }, "2dcontext": { "2x2.png": [ @@ -291568,6 +291546,10 @@ "f7d113d37804f0af90c6496f9e1dcf290860cf3d", [] ], + "change-list-descendant-display-ref.html": [ + "1a69ab6ea5404fe127cc8253ea5778ae0a3b3cca", + [] + ], "change-list-style-position-001-ref.html": [ "e87702a67b81f9863937d91fba56c0642c06ca6d", [] @@ -293594,6 +293576,10 @@ "a052eae56247143d82ce72a044884ab744ed46a8", [] ], + "position-sticky-scroll-reposition-ref.html": [ + "487a2322fc5aad723458a90e40922331b83bb299", + [] + ], "position-sticky-scroll-with-clip-and-abspos-ref.html": [ "a36934e38079cfc8fd6e9d36524968675235983e", [] @@ -328616,101 +328602,109 @@ }, "origin-policy": { "content-security": { - "comma-in-policy.https.html.headers": [ - "32e453ab20de0c3241e602cdf0af50769f741744", - [] - ], - "double-content-security.https.html.headers": [ - "a380b053c270c6159ff62497179c5a346b703047", - [] - ], - "double-policies.https.html.headers": [ - "23f1d1434057d27edf57fe4108cc7399b01915ff", - [] - ], - "helper.js": [ - "4875977afa4437abf6523426eedf99ee19a62e35", - [] - ], - "non-array.https.html.headers": [ - "31e6f375ef967e2173a0ab49063d22001612449a", - [] - ], - "non-object.https.html.headers": [ - "812ea9445eca18decb01d648fa916203ffea7f0d", - [] - ], - "non-string.https.html.headers": [ - "0b9ce2ee3f84c520fcba14d1267d93f7be48ce41", - [] - ], - "trigger-violation-report-report-only.https.html.headers": [ - "cb27e1500e0b4e484bc83d02ec3f6cc85aab43e1", - [] - ], - "trigger-violation-report.https.html.headers": [ - "08bcb9fa94171eeaf7df9b8c33487968f105e323", - [] - ], - "valid-with-multi-item-array.https.html.headers": [ - "eeddaba7a59b580a7d94599c805fab7ef1297b29", - [] - ], - "valid-with-semicolon.https.html.headers": [ - "eeddaba7a59b580a7d94599c805fab7ef1297b29", - [] - ], - "valid.https.html.headers": [ - "78aeeacd934c90fabddd5ddd7b3a1f6a4e5dd9a3", - [] - ] + "resources": { + "allow-unsafe-eval-disallow-images.mjs": [ + "8715e74e5df81959e358fb94802b77965a494e8a", + [] + ], + "allow-unsafe-eval.mjs": [ + "bd6ca6f8bbd1e99dd339107a8817cdb337e6f8c4", + [] + ], + "disallow-unsafe-eval-disallow-images.mjs": [ + "41b25553d56338aea764e48b3eb7eae21bc7464f", + [] + ], + "helper.mjs": [ + "5eff7e16ba04a73464215c62a49409560af32c38", + [] + ], + "trigger-violation-report-report-only.mjs": [ + "9766717e309b5f04187b4e24d5ec7cc6e0fe7ebe", + [] + ], + "trigger-violation-report.mjs": [ + "319c87b0f8a6723ffcdf0cad9308915f6d6eb10c", + [] + ] + } }, "features": { - "comma-in-policy.https.html.headers": [ - "c0e68720516a6665ade1b59539f3ff985790ff58", + "resources": { + "helper.mjs": [ + "7ced355e645c7bafd96aa55ef175cb995311aff9", + [] + ], + "no-camera-no-geolocation.mjs": [ + "b25d9abcb92ec99fa44b46a12587eb49d84d6a64", + [] + ], + "no-camera-yes-geolocation.mjs": [ + "a961deeb38989b3d19a37033b5fb654979fac03e", + [] + ], + "yes-camera-yes-geolocation.mjs": [ + "9f3b1d8303fe63a86ac9215a563816a54baf4448", + [] + ] + } + }, + "policies": { + "README.md": [ + "b07be74035f2dee0f379f0a8c499cd392f81f96a", [] ], - "double-features.https.html.headers": [ - "f0a57380a8f570d96a0f9070f55a25641167030f", + "op1 cspfp-comma-in-policy.json": [ + "189d28db8ba80d672799d9402d95f21a87a1e8c7", [] ], - "double-policy.https.html.headers": [ - "c1421693e4dafffa69184991110810101f84687c", + "op10 cspfp-valid.json": [ + "0fc1d163f2b61951813eae9ca84f2d4fe7f59703", [] ], - "helper.js": [ - "f9c16b58c2cf8bf85e5efb630ca7379ff14d36d3", + "op2 cspfp-double-top-level.json": [ + "26d798b585d96fd29994dc39544a15bd2f6a639d", [] ], - "non-object.https.html.headers": [ - "e8f68712ed341e947fb8a85ca8aa0aee40839095", + "op3 cspfp-double-second-level.json": [ + "6665332807bea371939ebbaefef35ea3d412509d", [] ], - "non-string.https.html.headers": [ - "4c6c376697b855ca61dc96b8f689675c11cbf769", + "op4 csp-non-array.json": [ + "5916b1ff9b572dd4564916dd9ae50ab8cba3eb69", [] ], - "valid.https.html.headers": [ - "9d0e25792c46d4039462ed50070bbed4c5c35269", + "op5 cspfp-non-object.json": [ + "7488f9bfef297e069d10845c2048f1ea261850da", + [] + ], + "op6 cspfp-non-string.json": [ + "5c6941bf8fd18928e6c1d4cea381f625f9923ee5", + [] + ], + "op7 csp-noimg-report-only.json": [ + "fd5c522042a7e06b9947e64594d797a2ddf67483", + [] + ], + "op8 csp-noimg.json": [ + "b88e1f80bf93c9b64007b5991c82b97a8ea2b2cd", + [] + ], + "op9 csp-valid-with-multi-item-array.json": [ + "edd743038db8d48a8f23ae903c8170205119dc2c", [] ] }, - "origin-policy-report-to.https.tentative.sub.html.sub.headers": [ - "92a90c347d3a7d009bb3a71c586ef598f3770d47", - [] - ], - "sec-origin-policy-header.html.py": [ - "7754e04a313c12957304a3bd3c1a0657eba15151", - [] - ], - "sec-origin-policy-subframe.html": [ - "d716ba11d97ce613b71b9e374ddfd23b35996e25", - [] - ], - "sec-origin-policy-subframe.html.sub.headers": [ - "a046f0096ba1b3005c353f262e6e8619f7e5aa5b", - [] - ] + "resources": { + "origin-policy-test-runner.js": [ + "a1c6453debd20d7abc3923a273a0c1890dcab7a6", + [] + ], + "subframe-with-origin-policy.py": [ + "636a649a0e20bebe36ccd013b72b8e1f315d674e", + [] + ] + } }, "page-visibility": { "META.yml": [ @@ -328793,6 +328787,10 @@ "ac3307b619ccfb464a5fa44820cea39befdd8f2e", [] ], + "app-respond-with-minimal-ui.js": [ + "0e6b1b78b9197d8d1582c8eb70bbcc15ba3861c4", + [] + ], "app-supports-shipping-contact-delegation.js": [ "770e2de64f13eeef8a1ee21783c2997facc8ff0b", [] @@ -354578,6 +354576,10 @@ "1f14334290a3ce8b707cff3b9a01caca952b9863", [] ], + "post-message-on-load-worker.js": [ + "e1c547ab6a4d577280442dbfcbec5a5ec9296666", + [] + ], "sandboxed-tests.html": [ "811c925f56f11934cf3cb9ec508b73d601525c27", [] @@ -403576,8 +403578,22 @@ {} ] ], + "CSSStyleSheet-constructable-disabled-regular-sheet-insertion.html": [ + "ef4ea1480658af9aee9ef3464650893481d8ed46", + [ + null, + {} + ] + ], + "CSSStyleSheet-constructable-duplicate.html": [ + "30a3ed1d09bbbd779d7b56df91908de948b6bc4b", + [ + null, + {} + ] + ], "CSSStyleSheet-constructable.html": [ - "539075b47efc8599c3d9147f2e4b417783fb1df5", + "c7e215381048eddedcf3c33166790815fc685aea", [ null, {} @@ -470334,77 +470350,70 @@ "origin-policy": { "content-security": { "comma-in-policy.https.html": [ - "88d72446392e6751253d658edee7b79475af1fc3", + "07d10811f0bf853503052458ab76e0049969bdd4", [ null, {} ] ], "double-content-security.https.html": [ - "99046803c9fe305489a0aba915fc0d2f2aa40eb2", + "357bd7669a66865ababa1434f9f2dc5319cdb3d0", [ null, {} ] ], "double-policies.https.html": [ - "925b9d5a31e10ff865cf6125f677933211627251", + "327670fcad0b3aeecd6206f338ae661db62b2b8c", [ null, {} ] ], "non-array.https.html": [ - "78a67e16eb9d3058371e4d0dc0b389b007f4ef10", + "c95b5a15b0e6414c90adeda7923d4c06372b76cf", [ null, {} ] ], "non-object.https.html": [ - "359c6c7692294ebb1bfe0104b3a79c2e924af075", + "220136c4d050bea76853b8590ae7f01c11b4d25a", [ null, {} ] ], "non-string.https.html": [ - "8af3c1c4dff13699d37175590231d40d7bf61e4e", + "57c29fe265bebe22f133b3dbd2f3f3e03771cf7a", [ null, {} ] ], "trigger-violation-report-report-only.https.html": [ - "3e5038b501dec9e5fd028018fa832a5144c81b34", + "9eb83792852eb563e0da242465928341c915b7b5", [ null, {} ] ], "trigger-violation-report.https.html": [ - "22beca5a3dbbc9251bbde3580a0a9997488c463b", + "f981b2b05cef7e5ff16e2e8530e5c5a4e6d654f8", [ null, {} ] ], "valid-with-multi-item-array.https.html": [ - "bc9ebd0cccfcbd7d2fa28dfd7bea914de449c725", + "36333a1e4b19943fb25032aeb2d9c98925bcf456", [ null, {} ] ], "valid-with-semicolon.https.html": [ - "82158f1cf7044f8dcf3eeb652e521494a801c667", - [ - null, - {} - ] - ], - "valid.https.html": [ - "36e5ddbf958b317ef703b1309d037b21a2186596", + "9eadc8f89d31ab8f652ce2ebadae8bc96c130f63", [ null, {} @@ -470413,62 +470422,48 @@ }, "features": { "comma-in-policy.https.html": [ - "1b991f0d8b68af01681d9b77a9b21506ffe3fd58", + "a9faba4bfd4dd0cf5104a639302fb67e4a0f280b", [ null, {} ] ], "double-features.https.html": [ - "8397f849f30148021f70883d4418591f72d647dc", + "aa687d681c66d628e4140abe571021b7f16eb876", [ null, {} ] ], "double-policy.https.html": [ - "f1d63d6de966b36c0b410a5b62b803b9d7b40885", + "d9e544acaaf6a4e1a5c6e8987ed2d72ed777cb4e", [ null, {} ] ], "non-object.https.html": [ - "31f632bf0f1fed54666de913dd6a1c9a333e5388", + "2bd4b67e600c9bbb655461f161e1ad6da6619663", [ null, {} ] ], "non-string.https.html": [ - "019014c980a4a3a0565e10288b053c0da86e9f91", + "190d224a4cfe05bb1a4ea57b104f7d31d862fdcc", [ null, {} ] ], - "valid.https.html": [ - "6ff2076a7f076e78c73de5a019a52530a033f034", + "valid-with-semicolon.https.html": [ + "8d2d0f4495ff7f401991accc044f21fef115ad75", [ null, {} ] ] - }, - "origin-policy-report-to.https.tentative.sub.html": [ - "dfef7a1d133c267b8a27e5acb6c4ac89cfbc8ee7", - [ - null, - {} - ] - ], - "origin-policy.https.tentative.html": [ - "34a71fe40a192418a3f9a5792d7ee5fdecf970dd", - [ - null, - {} - ] - ] + } }, "page-visibility": { "idlharness.window.js": [ @@ -470825,6 +470820,13 @@ {} ] ], + "respond-with-minimal-ui.https.html": [ + "2474185a5ed719115b8afb39eac78584cecbb285", + [ + null, + {} + ] + ], "same-object-attributes.https.html": [ "b9a9dd82d247a80b00e4bc033eeea134d5f900c1", [ @@ -559993,6 +559995,24 @@ {} ] ], + "dedicated-worker-in-data-url-context.window.js": [ + "1b1ce232a739313d80ef5641aa799c978e53abea", + [ + "workers/dedicated-worker-in-data-url-context.window.html", + { + "script_metadata": [ + [ + "title", + "data URL dedicated worker in data URL context" + ], + [ + "script", + "/service-workers/service-worker/resources/test-helpers.sub.js" + ] + ] + } + ] + ], "examples": { "fetch_tests_from_worker.html": [ "5ac765c7eeae8c03678ca98c2f0d89fd826cf45e", @@ -561182,6 +561202,24 @@ {} ] ], + "shared-worker-in-data-url-context.window.js": [ + "f0cc98b75cbfd0d1bc084e445c47f3f6c7dd219c", + [ + "workers/shared-worker-in-data-url-context.window.html", + { + "script_metadata": [ + [ + "title", + "data URL shared worker in data URL context" + ], + [ + "script", + "/service-workers/service-worker/resources/test-helpers.sub.js" + ] + ] + } + ] + ], "shared-worker-name-via-options.html": [ "1914d66db7489f6306c4365a4d7b7b9fb59fe00e", [ diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/css-transitions/no-transition-from-ua-to-blocking-stylesheet.html.ini b/tests/wpt/metadata/css/css-transitions/no-transition-from-ua-to-blocking-stylesheet.html.ini index 70a00a101f6..e35a452a186 100644 --- a/tests/wpt/metadata/css/css-transitions/no-transition-from-ua-to-blocking-stylesheet.html.ini +++ b/tests/wpt/metadata/css/css-transitions/no-transition-from-ua-to-blocking-stylesheet.html.ini @@ -1,2 +1,2 @@ [no-transition-from-ua-to-blocking-stylesheet.html] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 628b1fab770..c884dc82eab 100644 --- a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,3 +2,6 @@ [listeners are called when - - - - diff --git a/tests/wpt/web-platform-tests/origin-policy/origin-policy-report-to.https.tentative.sub.html.sub.headers b/tests/wpt/web-platform-tests/origin-policy/origin-policy-report-to.https.tentative.sub.html.sub.headers deleted file mode 100644 index 92a90c347d3..00000000000 --- a/tests/wpt/web-platform-tests/origin-policy/origin-policy-report-to.https.tentative.sub.html.sub.headers +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: origin-policy-report-to=5b4d35b6-0771-46fe-8700-ed2bb59ed4be; Path=/origin-policy/ diff --git a/tests/wpt/web-platform-tests/origin-policy/origin-policy.https.tentative.html b/tests/wpt/web-platform-tests/origin-policy/origin-policy.https.tentative.html deleted file mode 100644 index 34a71fe40a1..00000000000 --- a/tests/wpt/web-platform-tests/origin-policy/origin-policy.https.tentative.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -
- - - - diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/README.md b/tests/wpt/web-platform-tests/origin-policy/policies/README.md new file mode 100644 index 00000000000..b07be74035f --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/README.md @@ -0,0 +1,5 @@ +These policies are served via the Python script at /.well-known/origin-policy. Their filenames must be in the form `subdomain human-facing-string-with-no-spaces.json`. They will be served in response to requests to that subdomain. + +The human-facing string has no impact on the tests, and just makes it easier to scroll through the list. + +The list of potential hostnames is created by `tools/serve/serve.py`'s `_make_origin_policy_subdomains` function, and can be expanded as necessary. diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op1 cspfp-comma-in-policy.json b/tests/wpt/web-platform-tests/origin-policy/policies/op1 cspfp-comma-in-policy.json new file mode 100644 index 00000000000..189d28db8ba --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op1 cspfp-comma-in-policy.json @@ -0,0 +1,13 @@ +{ + "ids": [ + "cspfp-comma-in-policy" + ], + "content_security": { + "policies": [ + "script-src 'self' 'unsafe-inline', img-src 'none'" + ] + }, + "features": { + "policy": "camera 'self' https://example.com/, geolocation 'self' https://example.com/" + } +} diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json b/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json new file mode 100644 index 00000000000..0fc1d163f2b --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json @@ -0,0 +1,13 @@ +{ + "ids": [ + "cspfp-valid" + ], + "content_security": { + "policies": [ + "script-src 'self' 'unsafe-inline'; img-src 'none'" + ] + }, + "features": { + "policy": "camera 'self' https://example.com/; geolocation 'self' https://example.com/" + } +} diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json b/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json new file mode 100644 index 00000000000..26d798b585d --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json @@ -0,0 +1,21 @@ +{ + "ids": [ + "cspfp-double-top-level" + ], + "content_security": { + "policies": [ + "script-src 'self' 'unsafe-inline'" + ] + }, + "content_security": { + "policies": [ + "img-src 'none'" + ] + }, + "features": { + "policy": "camera 'self' https://example.com/" + }, + "features": { + "policy": "geolocation 'self' https://example.com/" + } +} diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op3 cspfp-double-second-level.json b/tests/wpt/web-platform-tests/origin-policy/policies/op3 cspfp-double-second-level.json new file mode 100644 index 00000000000..6665332807b --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op3 cspfp-double-second-level.json @@ -0,0 +1,17 @@ +{ + "ids": [ + "cspfp-double-second-level" + ], + "content_security": { + "policies": [ + "script-src 'self' 'unsafe-inline'" + ], + "policies": [ + "img-src 'none'" + ] + }, + "features": { + "policy": "camera 'self' https://example.com/", + "policy": "geolocation 'self' https://example.com/" + } +} diff --git a/tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-non-array b/tests/wpt/web-platform-tests/origin-policy/policies/op4 csp-non-array.json similarity index 70% rename from tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-non-array rename to tests/wpt/web-platform-tests/origin-policy/policies/op4 csp-non-array.json index b96546c5f88..5916b1ff9b5 100644 --- a/tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-non-array +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op4 csp-non-array.json @@ -1,4 +1,7 @@ { + "ids": [ + "csp-non-array" + ], "content_security": { "policies": "script-src 'self' 'unsafe-inline'" } diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json b/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json new file mode 100644 index 00000000000..7488f9bfef2 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json @@ -0,0 +1,9 @@ +{ + "ids": [ + "cspfp-non-object" + ], + "content_security": [ + "script-src 'self' 'unsafe-inline'" + ], + "features": "camera 'self' https://example.com/" +} diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json b/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json new file mode 100644 index 00000000000..5c6941bf8fd --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json @@ -0,0 +1,17 @@ +{ + "ids": [ + "csp-non-string" + ], + "content_security": { + "policies": [ + [ + "script-src 'self' 'unsafe-inline'" + ] + ] + }, + "features": { + "policy": [ + "camera 'self' https://example.com/" + ] + } +} diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op7 csp-noimg-report-only.json b/tests/wpt/web-platform-tests/origin-policy/policies/op7 csp-noimg-report-only.json new file mode 100644 index 00000000000..fd5c522042a --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op7 csp-noimg-report-only.json @@ -0,0 +1,10 @@ +{ + "ids": [ + "csp-noimg-report-only" + ], + "content_security": { + "policies_report_only": [ + "img-src 'none'" + ] + } +} diff --git a/tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-noimg b/tests/wpt/web-platform-tests/origin-policy/policies/op8 csp-noimg.json similarity index 67% rename from tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-noimg rename to tests/wpt/web-platform-tests/origin-policy/policies/op8 csp-noimg.json index cd57b7b21e9..b88e1f80bf9 100644 --- a/tests/wpt/web-platform-tests/.well-known/origin-policy/policy-content-security-noimg +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op8 csp-noimg.json @@ -1,4 +1,7 @@ { + "ids": [ + "csp-noimg" + ], "content_security": { "policies": ["img-src 'none'"] } diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op9 csp-valid-with-multi-item-array.json b/tests/wpt/web-platform-tests/origin-policy/policies/op9 csp-valid-with-multi-item-array.json new file mode 100644 index 00000000000..edd743038db --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op9 csp-valid-with-multi-item-array.json @@ -0,0 +1,11 @@ +{ + "ids": [ + "csp-valid-with-multi-item-array" + ], + "content_security": { + "policies": [ + "script-src 'self' 'unsafe-inline'", + "img-src 'none'" + ] + } +} diff --git a/tests/wpt/web-platform-tests/origin-policy/resources/origin-policy-test-runner.js b/tests/wpt/web-platform-tests/origin-policy/resources/origin-policy-test-runner.js new file mode 100644 index 00000000000..a1c6453debd --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/resources/origin-policy-test-runner.js @@ -0,0 +1,28 @@ +window.runTestsInSubframe = ({ hostname, testJS }) => { + test(() => { + assert_equals(location.protocol, "https:"); + }, "Prerequisite check: running on HTTPS"); + + promise_test(() => new Promise((resolve, reject) => { + const url = new URL(window.location.href); + url.hostname = `${hostname}.${document.domain}`; + url.pathname = "/origin-policy/resources/subframe-with-origin-policy.py"; + + // Normalize the URL so that callers can idiomatically give values relative + // to themselves. + url.searchParams.append("test", new URL(testJS, document.baseURI).pathname); + + const iframe = document.createElement("iframe"); + iframe.src = url.href; + + // We need to delegate anything we plan to toggle with FP otherwise it will + // be locked to disallowed. + iframe.allow = "camera *; geolocation *"; + + iframe.onload = resolve; + iframe.onerror = () => reject(new Error(`Could not load ${url.href}`)); + document.body.append(iframe); + + fetch_tests_from_window(iframe.contentWindow); + }), "Test setup of the iframe"); +}; diff --git a/tests/wpt/web-platform-tests/origin-policy/resources/subframe-with-origin-policy.py b/tests/wpt/web-platform-tests/origin-policy/resources/subframe-with-origin-policy.py new file mode 100644 index 00000000000..636a649a0e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-policy/resources/subframe-with-origin-policy.py @@ -0,0 +1,26 @@ +def main(request, response): + """Send a response with the Origin-Policy header asking for the latest + policy, that runs the test JS given by the ?test= argument. This is meant + to be loaded into an iframe by origin-policy-test-runner.js. + + The ?test= argument is best given as an absolute path (starting with /) + since it will otherwise be interpreted relative to where this file is + served. + """ + test_file = request.GET.first("test") + + response.headers.set("Origin-Policy", "allowed=(latest)") + response.headers.set("Content-Type", "text/html") + + return """ + + + Origin policy subframe + + + + +
+ + + """ % test_file diff --git a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-header.html.py b/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-header.html.py deleted file mode 100644 index 7754e04a313..00000000000 --- a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-header.html.py +++ /dev/null @@ -1,64 +0,0 @@ -def main(request, response): - """Send a response with the origin policy indicated by the ?policy= argument. - - Won't send a policy when the browser doesn't indicate support. - The response tests whether inline script and eval are allowed, and will - send a corresponding message to the parent frame. - For easier debugging, we'll also show the results in-page. - """ - origin_policy_header = "Sec-Origin-Policy" - request_policy = request.headers.get(origin_policy_header) - response_policy = request.GET.first("policy", default="") - - if request_policy and response_policy: - response.headers.set(origin_policy_header, "policy=%s" % response_policy) - response.headers.set("Vary", "sec-origin-policy") - - response.headers.set("Content-Type", "text/html"); - return """ - - - Page with an Origin Policy - - - - - -

Reveal whether CSP with "unsafe-inline" or "unsafe-eval" is present:

- - - - - - """ - diff --git a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html b/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html deleted file mode 100644 index d716ba11d97..00000000000 --- a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html +++ /dev/null @@ -1,3 +0,0 @@ -The forbidden frame. -Content shouldn't matter, because this frame shouldn't be loaded. -So there. diff --git a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html.sub.headers b/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html.sub.headers deleted file mode 100644 index a046f0096ba..00000000000 --- a/tests/wpt/web-platform-tests/origin-policy/sec-origin-policy-subframe.html.sub.headers +++ /dev/null @@ -1,3 +0,0 @@ -Report-To: { "group": "report-to-group", "max_age": 1000, "endpoints": [{ "url": "https://{{hosts[alt][]}}:{{ports[https][0]}}/content-security-policy/support/report.py?op=put&reportID=5b4d35b6-0771-46fe-8700-ed2bb59ed4be" }] } -Sec-Origin-Policy: policy=nonexistingpolicy, report-to=report-to-group - diff --git a/tests/wpt/web-platform-tests/payment-handler/app-respond-with-minimal-ui.js b/tests/wpt/web-platform-tests/payment-handler/app-respond-with-minimal-ui.js new file mode 100644 index 00000000000..0e6b1b78b91 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-handler/app-respond-with-minimal-ui.js @@ -0,0 +1,3 @@ +self.addEventListener('canmakepayment', event => { + event.respondWithMinimalUI(event.methodData[0].data.test); +}); diff --git a/tests/wpt/web-platform-tests/payment-handler/respond-with-minimal-ui.https.html b/tests/wpt/web-platform-tests/payment-handler/respond-with-minimal-ui.https.html new file mode 100644 index 00000000000..2474185a5ed --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-handler/respond-with-minimal-ui.https.html @@ -0,0 +1,89 @@ + + +Tests for CanMakePaymentEvent.respondWithMinimalUI + + + + + diff --git a/tests/wpt/web-platform-tests/workers/dedicated-worker-in-data-url-context.window.js b/tests/wpt/web-platform-tests/workers/dedicated-worker-in-data-url-context.window.js new file mode 100644 index 00000000000..1b1ce232a73 --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/dedicated-worker-in-data-url-context.window.js @@ -0,0 +1,109 @@ +// META: title=data URL dedicated worker in data URL context +// META: script=/service-workers/service-worker/resources/test-helpers.sub.js +const mimeType = 'application/javascript'; + +// Tests creating a dedicated worker in a data URL iframe. +promise_test(async t => { + const nestedWorkerScriptURL = + new URL('/workers/support/post-message-on-load-worker.js', location.href); + + // This code will be executed in a data URL iframe. The iframe tries to create + // a dedicated worker from |nestedWorkerScriptURL|, but that should result in + // a failure. This is because the data URL iframe has an opaque origin, and + // script fetch is handled as a cross-origin request. + const frameCode = ` + + `; + + const frame = await with_iframe(`data:text/html;base64,${btoa(frameCode)}`); + const result = await new Promise(r => window.onmessage = e => r(e.data)); + assert_equals(result, 'PASS'); +}, 'Create a dedicated worker in a data url frame'); + +// Tests creating a dedicated worker in a data URL dedicated worker (i.e., +// nested dedicated worker). +promise_test(async t => { + const nestedWorkerScriptURL = + new URL('/workers/support/post-message-on-load-worker.js', location.href); + + // This code will be executed in a data URL dedicated worker. The worker tries + // to create a nested dedicated worker from |nestedWorkerScriptURL|, but that + // should result in a failure. This is because the data URL dedicated worker + // has an opaque origin, and script fetch is handled as a cross-origin + // request. + const workerCode = ` + try { + const worker = new Worker('${nestedWorkerScriptURL}'); + worker.onmessage = + e => postMessage('Worker construction unexpectedly succeeded'); + worker.onerror = e => postMessage('PASS'); + } catch (e) { + // Cross-origin request should asynchronously fail during worker script + // fetch because its request mode is 'same-origin'. + postMessage('Worker construction unexpectedly synchronously failed'); + } + `; + + const result = await new Promise((resolve, reject) => { + const worker = new Worker(`data:${mimeType};base64,${btoa(workerCode)}`); + worker.onmessage = e => resolve(e.data); + worker.onerror = e => reject(e.message); + }); + assert_equals(result, 'PASS'); +}, 'Create a dedicated worker in a data url dedicated worker'); + +// Tests creating a data URL dedicated worker in a data URL iframe. +promise_test(async t => { + // This code will be executed in a data URL iframe. The iframe tries to create + // a data URL dedicated worker. Fetching a data URL from the data URL iframe + // whose origin is opaque is allowed, so the worker construction should + // succeed. The iframe posts the result to the parent frame. + const frameCode = ` + + `; + + const frame = await with_iframe(`data:text/html;base64,${btoa(frameCode)}`); + const result = await new Promise(r => window.onmessage = e => r(e.data)); + assert_equals(result, 'PASS'); +}, 'Create a data url dedicated worker in a data url frame'); + +// Tests creating a data URL dedicated worker in a data URL dedicated worker +// (i.e., nested dedicated worker). +promise_test(async t => { + // This code will be executed in a data URL dedicated worker. The worker tries + // to create a nested data URL dedicated worker. Fetching a data URL from the + // data URL dedicated worker is allowed, so the worker construction should + // succeed. The worker posts the result to the parent frame. + const workerCode = ` + const worker = new Worker('data:${mimeType},postMessage("PASS");'); + worker.onmessage = e => postMessage(e.data); + worker.onerror = e => postMessage('FAIL: ' + e.message); + `; + + const result = await new Promise((resolve, reject) => { + const worker = new Worker(`data:${mimeType};base64,${btoa(workerCode)}`); + worker.onmessage = e => resolve(e.data); + worker.onerror = e => reject(e.message); + }); + assert_equals(result, 'PASS'); +}, 'Create a data url dedicated worker in a data url dedicated worker'); diff --git a/tests/wpt/web-platform-tests/workers/shared-worker-in-data-url-context.window.js b/tests/wpt/web-platform-tests/workers/shared-worker-in-data-url-context.window.js new file mode 100644 index 00000000000..f0cc98b75cb --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/shared-worker-in-data-url-context.window.js @@ -0,0 +1,63 @@ +// META: title=data URL shared worker in data URL context +// META: script=/service-workers/service-worker/resources/test-helpers.sub.js +const mimeType = 'application/javascript'; + +// Tests creating a data URL shared worker in a data URL iframe. +promise_test(async t => { + const nestedWorkerScriptURL = + new URL('/workers/support/post-message-on-load-worker.js', location.href); + + // This code will be executed in a data URL iframe. The iframe tries to create + // a shared worker from |nestedWorkerScriptURL|, but that should result in a + // failure. This is because the data URL iframe has an opaque origin, and + // script fetch is handled as a cross-origin request. + const frameCode = ` + + `; + + const frame = await with_iframe(`data:text/html;base64,${btoa(frameCode)}`); + const result = await new Promise(r => window.onmessage = e => r(e.data)); + assert_equals(result, 'PASS'); +}, 'Create a shared worker in a data url frame'); + +// Tests creating a data URL shared worker in a data URL iframe. +promise_test(async t => { + const workerCode = `onconnect = e => e.ports[0].postMessage("PASS");`; + + // This code will be executed in a data URL iframe. The iframe tries to create + // a data URL shared worker. Fetching a data URL from the data URL shared + // worker is allowed, so the worker construction should succeed. The worker + // posts the result to the parent frame. + const frameCode = ` + + `; + + const frame = await with_iframe(`data:text/html;base64,${btoa(frameCode)}`); + const result = await new Promise(r => window.onmessage = e => r(e.data)); + assert_equals(result, 'PASS'); +}, 'Create a data url shared worker in a data url frame'); diff --git a/tests/wpt/web-platform-tests/workers/support/post-message-on-load-worker.js b/tests/wpt/web-platform-tests/workers/support/post-message-on-load-worker.js new file mode 100644 index 00000000000..e1c547ab6a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/support/post-message-on-load-worker.js @@ -0,0 +1,10 @@ +if ('DedicatedWorkerGlobalScope' in self && + self instanceof DedicatedWorkerGlobalScope) { + postMessage('LOADED'); +} else if ( + 'SharedWorkerGlobalScope' in self && + self instanceof SharedWorkerGlobalScope) { + self.onconnect = e => { + e.ports[0].postMessage('LOADED'); + }; +}