diff options
93 files changed, 2106 insertions, 1286 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index c51c6d3a49f..7bab3216695 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -285,6 +285,15 @@ }, "semantics": { "embedded-content": { + "the-img-element": { + "image-loading-lazy-subframe-detached-crash.html": [ + "86a290d50db16d9f19d08bb8a9ad07b0aa52f66d", + [ + null, + {} + ] + ] + }, "the-object-element": { "block-object-with-ruby-crash.html": [ "481a7408e4a4fa91613556b39c9ddc95d568c50c", @@ -136992,19 +137001,6 @@ {} ] ], - "font-display-feature-policy-01.tentative.html": [ - "56b040d8faf6dee3740a288af5c1bf486b1c9e08", - [ - null, - [ - [ - "/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html", - "==" - ] - ], - {} - ] - ], "font-display-feature-policy-02.tentative.html": [ "65f76b07846faf193e2b0900f45211303aa290f9", [ @@ -143642,7 +143638,7 @@ ] ], "repeat-auto-fill-001.html": [ - "e17fc8274f441835888ff57d12bd985d0ece7623", + "9e57028c4cc2757eb3ec52cc214f902562413474", [ null, [ @@ -143655,7 +143651,7 @@ ] ], "repeat-auto-fill-002.html": [ - "38d0bea0d08e6e1b1691a595ac9a1c2dfea59adb", + "80980f14e9f8ccfced29e252114a4337a0dc5aeb", [ null, [ @@ -143668,7 +143664,7 @@ ] ], "repeat-auto-fill-003.html": [ - "b58799bd86bd1ad1f7875a6c9da7e8247136e6f8", + "3a1d2707c37c6861dc97cd6cdd5f2f3739a431c7", [ null, [ @@ -143681,7 +143677,7 @@ ] ], "repeat-auto-fill-004.html": [ - "beacff588a2c6209ee89b8715eccd374b1847ba8", + "9dd8f33eb9b0e8815ea2a407087cb344b1f870a2", [ null, [ @@ -240235,7 +240231,7 @@ ], "security-features": { "README.md": [ - "387e68334aeaaad68a71c3ffa32cf0ca05345b91", + "fb9a2f108f9faf68bb86f0bd9f848dbd28630ca4", [] ], "resources": { @@ -240370,7 +240366,11 @@ [] ], "generate.py": [ - "3345d6520691de734977a18d73c94f71b446408a", + "057c4d81ef1e110be161360ea3f1ea092702d21d", + [] + ], + "spec.src.json": [ + "7cf6a06c0f53492b7cb0f54b6db90688b649c1fc", [] ], "spec_validator.py": [ @@ -283615,14 +283615,6 @@ "e06a55939995ed04a5745bc0dd4cf28113f918c8", [] ], - "font-display-feature-policy-01.tentative-ref.html": [ - "fc43ebc49b5a84486dff5b3f82134b0b8807d025", - [] - ], - "font-display-feature-policy-01.tentative.html.headers": [ - "0c3e29db99f07ddc1bb3c07cac24e2904e546b1b", - [] - ], "font-display-feature-policy-02.tentative-ref.html": [ "019043fd116d0b9581fc187767b2552558906cf1", [] @@ -283631,14 +283623,6 @@ "e6c4898d5d3d28fa225e834674dfb768dbcf55d7", [] ], - "font-display-feature-policy-report-only.tentative.html.headers": [ - "e6c4898d5d3d28fa225e834674dfb768dbcf55d7", - [] - ], - "font-display-feature-policy-reporting.tentative.html.headers": [ - "0c3e29db99f07ddc1bb3c07cac24e2904e546b1b", - [] - ], "font-display-preload-ref.html": [ "e3ba8caa32f13479896e82afcaab654a3785375f", [] @@ -291082,11 +291066,11 @@ [] ], "repeat-auto-fill-001-ref.html": [ - "bbf5d374589b29c9c0dcb04b941160a94130b3a1", + "8cd0ef66b974e808463b51db603476adee3b5f5d", [] ], "repeat-auto-fill-004-ref.html": [ - "07ba960200b1fe9ba69448da8e5e9ff1ebf547fd", + "ca2729fa3f2af414f8a176b9f162ee0d5f3ebc40", [] ], "repeat-auto-fill-005-ref.html": [ @@ -309661,6 +309645,14 @@ "font-display-document-policy-01.tentative.html.headers": [ "e1387f50deead65859267b376367a5eb2a92482d", [] + ], + "font-display-document-policy-report-only.tentative.html.headers": [ + "e090edd0da42f4e98c400f84fb42232adbe95ab6", + [] + ], + "font-display-document-policy-reporting.tentative.html.headers": [ + "84ad7cbf97bcbfd9f56bfeef5bc5928b8819ae4e", + [] ] }, "required-policy": { @@ -315438,6 +315430,10 @@ "43c44cffd64e01f12a8d0dc22bbddfdd05a79a90", [] ], + "report-only-require-corp.https.html.headers": [ + "289659a41fdf41178781c764643f8946f4ec09b7", + [] + ], "require-corp-about-blank.html.headers": [ "8df98474b589d070992677cb0134bd47bd0509c4", [] @@ -315515,6 +315511,10 @@ "30ddeac2e7a3596de3910def1a7066e817873cbe", [] ], + "report.py": [ + "8adf3009d08e2311cdf9c2008d7a10a0882ce030", + [] + ], "require-corp-sw.js": [ "3e2f069ded033f33528c8f850d330c5b4e84e46c", [] @@ -315527,6 +315527,18 @@ "9db755226020479fd87e87f42ea622c999b38f7d", [] ], + "stash-take.py": [ + "73e0def86caed347bf673b0daa8df46b9a4e074d", + [] + ], + "subresource-corp.html": [ + "4b029700e0e9a7545dae07df489eef7e32256030", + [] + ], + "subresource-corp.html.sub.headers": [ + "00609991031ea5a07c5a3fa802fcc73dcd00863e", + [] + ], "sw-store-to-cache-storage.js": [ "00b9e9395a7ec2171b3fee9d75f6ccb1d46ee60f", [] @@ -325155,6 +325167,10 @@ "2ea3d38240e527f10af7ef392e0c0935a3750572", [] ], + "origin-policy.idl": [ + "e48e0632bd89ff764fa9b3864207b39723a388cf", + [] + ], "page-visibility.idl": [ "6b8bd52a047ce411b968a79e6d0f7d152ab32a57", [] @@ -325268,7 +325284,7 @@ [] ], "shape-detection-api.idl": [ - "51c996959bea2acc1b2d0a3c3be438b0c6182e23", + "5b1c45a773987eb8ce8b59fd5b98c2f0c9ae4ea5", [] ], "speech-api.idl": [ @@ -325288,7 +325304,7 @@ [] ], "trusted-types.tentative.idl": [ - "be58b63b2c3d10e8a53ac2af7388e9a44f8fa3e6", + "5442d8b44e65d21cbfddbef6b5b323390640e6bb", [] ], "uievents.idl": [ @@ -325380,7 +325396,7 @@ [] ], "webrtc-stats.idl": [ - "d1a54898b9a62e85a3c1488704afe736058d5e93", + "f66b0791cb2fae4665a6df8cde1d1c67a18797f6", [] ], "webrtc-svc.idl": [ @@ -326300,16 +326316,20 @@ [] ], "README.md": [ - "641969d932cf827f947d0e70d0f92a40ecab31fd", + "953611f93037cfebe0459d5f67599b727539ae40", [] ], "resources": { + "child.sub.html": [ + "f52b5eefbc5d0cf0dd88ee9103f851d632268f5d", + [] + ], "common.js": [ - "36df1d8c1557ec5e02c1b69dfe2687e1898bb457", + "92ff11b35b1d6ab501a7b7dbac52411c08711a83", [] ], - "iframe.sub.html": [ - "b1a476cff2e8af1550083a57e62fa7a0b2e9af1c", + "grandchild.sub.html": [ + "98522e0649e505d66766b9d8c62946a5513aa5a1", [] ] } @@ -328299,7 +328319,7 @@ [] ], "spec_json.js": [ - "af9cf72857e5d640bad18b441f1d3c81bc44a2de", + "c36a535f45363654bfd7c8b86f3710995f769f63", [] ], "test-case.sub.js": [ @@ -328308,7 +328328,7 @@ ] }, "spec.src.json": [ - "547dc97504029dcac4a006113d538f3813a2c2b6", + "16843700da8f314638aafaa517797152cab6f02f", [] ] }, @@ -337249,7 +337269,7 @@ [] ], "spec_json.js": [ - "a8b723d5a98f9748689faf31e95bd2c7a887b079", + "fbe59a2cc9cc5fec5ddd8a0d35354cca787dd515", [] ], "test-case.sub.js": [ @@ -337258,7 +337278,7 @@ ] }, "spec.src.json": [ - "d32ee80a8d2ce1edd57b09f919732eefa4f6caeb", + "9063428647a33acfefb5bd35a74f0f080de09510", [] ] }, @@ -342485,7 +342505,7 @@ [] ], "test_valid.py": [ - "4573541bf5864badfa39a155c5d62d71a18911e0", + "aa1ce20cd6d36191d96e2080393a70b13d8aa1df", [] ] } @@ -347697,7 +347717,7 @@ ] }, "requirements.txt": [ - "99898d1736daadaca5b422c5c4e80becb742e94e", + "6cd14095d9ba1fcf49b9e403a644008e8fe2ca3b", [] ], "requirements_android_webview.txt": [ @@ -347729,7 +347749,7 @@ [] ], "requirements_firefox.txt": [ - "f2d02e0b8a3f8fcb4eec55bd61ffe70a8c3d05f7", + "ae72940810432bed693c001d4b057a1214fd2dac", [] ], "requirements_ie.txt": [ @@ -348826,7 +348846,7 @@ [] ], "trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers": [ - "30fe3b1df1d8f10ea4eb495f53bf93066a9e5ecd", + "e4147bd2e372e4498f9a6ca138f9f29f4750561f", [] ], "trusted-types-eval-reporting-report-only.tentative.https.html.headers": [ @@ -348834,7 +348854,7 @@ [] ], "trusted-types-eval-reporting.tentative.https.html.headers": [ - "91a2be91ef749e470f8998d7058871484dcb274d", + "3f55bba7d1b8d0965d3f9f29c7db301806f7c1a0", [] ], "trusted-types-report-only.tentative.https.html.headers": [ @@ -349369,7 +349389,7 @@ }, "generic": { "spec_json.js": [ - "0adba4938d47d896fa2d343f58022cfa113615da", + "c0ef97148952f32e7c510b8a485f6d2da0e4a177", [] ], "test-case.sub.js": [ @@ -349462,7 +349482,7 @@ } }, "spec.src.json": [ - "70417038bcccc269cb5fb40df09dfe7ec0f7b578", + "d64315903aa66dd5c9ffd19bf862e96ac26b3a64", [] ], "support": { @@ -384090,7 +384110,7 @@ ] ], "AnimationEffect-updateTiming.tentative.html": [ - "de6953c761facd400a37572419e3c97f42b4cfed", + "e6556dac4bde9fd436237cb78f5e88a1968be7d1", [ null, {} @@ -384118,7 +384138,7 @@ ] ], "CSSAnimation-effect.tentative.html": [ - "95a904187204286a49a17377d3201f4918128566", + "5e2d18b5bf9659e9cf8930c151abcd2a12635fa0", [ null, { @@ -387413,20 +387433,6 @@ null, {} ] - ], - "font-display-feature-policy-report-only.tentative.html": [ - "ff3a7f197835370a2eaaf96cf920b0f09d3d8405", - [ - null, - {} - ] - ], - "font-display-feature-policy-reporting.tentative.html": [ - "6f6a51a28fda5c9f5816bf6c54dc7fba5f462475", - [ - null, - {} - ] ] }, "font-feature-settings-serialization-001.html": [ @@ -392581,21 +392587,21 @@ }, "css-page": { "page-rule-declarations-000.html": [ - "227b9148a3870617ffccff141e1f763a631024b6", + "cbe53855a0a6869dfc49d5997bba7584b04dcbdd", [ null, {} ] ], "page-rule-declarations-001.html": [ - "e57424029ba827862e7be5bd1c7e949b74c58331", + "dc225b5abdc5fb5d4ad27e5c7b251c7b988b31f9", [ null, {} ] ], "page-rule-declarations-002.html": [ - "183072dec676d6e913c3ed35935d5e06f3fd4963", + "b35fa29244cc89ad37c6e988c4cd6d9277061161", [ null, {} @@ -407590,6 +407596,22 @@ ] }, "document-policy": { + "font-display": { + "font-display-document-policy-report-only.tentative.html": [ + "03fa5b68a3ef8a587a72fba5b37fd5145307e1b0", + [ + null, + {} + ] + ], + "font-display-document-policy-reporting.tentative.html": [ + "db871d19f7e9f73419aabadb44e978579678990c", + [ + null, + {} + ] + ] + }, "required-policy": { "document-policy.html": [ "1935be3dd0a961add3d80aa35ded92734d9f8869", @@ -407786,7 +407808,7 @@ ] ], "Event-dispatch-click.html": [ - "2241d57e5118843a37601bd6feae9645a82961a7", + "7690f753d9cd0b47f2c2c25352576caed970cd19", [ null, {} @@ -407799,6 +407821,13 @@ {} ] ], + "Event-dispatch-detached-input-and-change.html": [ + "a53ae71ac2a08d901b9ac8aaf35912cbbdcb7746", + [ + null, + {} + ] + ], "Event-dispatch-handlers-changed.html": [ "24e6fd70cb4ec4d44905ba8624280a526ef888c6", [ @@ -431333,6 +431362,22 @@ } ] ], + "report-only-require-corp.https.html": [ + "ff9e5b64a084eb2d2d990c3a7660633468772ff8", + [ + null, + { + "timeout": "long" + } + ] + ], + "reporting.https.html": [ + "3a0aebe49a7baf67ad2e3fc1ac57eb6bf3fbb5f2", + [ + null, + {} + ] + ], "require-corp-about-blank.html": [ "5c51df71ae5b6a84f5c68c90a4012729a9e9c380", [ @@ -451108,7 +451153,7 @@ }, "measure-memory": { "measure-memory-cross-origin-iframe.tentative.window.js": [ - "15590560ee93b908519794342bfc129509d36893", + "c8dcbb77edd33fd8c29678eeaedd3792dea172bc", [ "measure-memory/measure-memory-cross-origin-iframe.tentative.window.html", { @@ -451131,7 +451176,7 @@ ] ], "measure-memory-same-origin-iframe.tentative.window.js": [ - "519ed85864da59e1965a27371b3184f0a56523b9", + "24700e51c2439671ae10e6fc5a6e2d725906ca59", [ "measure-memory/measure-memory-same-origin-iframe.tentative.window.html", { @@ -451153,30 +451198,10 @@ } ] ], - "measure-memory.tentative.any.js": [ - "22ec66c3460f0bad637eded4a5f8282c5b3081ac", + "measure-memory.tentative.window.js": [ + "0c595eda73a2d8e5dd1b8749e40e120f651dffb4", [ - "measure-memory/measure-memory.tentative.any.html", - { - "script_metadata": [ - [ - "script", - "/common/get-host-info.sub.js" - ], - [ - "script", - "./resources/common.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ], - [ - "measure-memory/measure-memory.tentative.any.worker.html", + "measure-memory/measure-memory.tentative.window.html", { "script_metadata": [ [ @@ -472586,6 +472611,15 @@ } ] ], + "pointerevent_pointercapture-not-lost-in-chorded-buttons.html": [ + "02a6af0a4b89abf1c0c51844ace15b54e91966e9", + [ + null, + { + "testdriver": true + } + ] + ], "pointerevent_pointercapture_in_frame.html": [ "a4107fd707a2ec4cb40d22fcad786db0b42471d6", [ @@ -528772,7 +528806,7 @@ ] ], "idlharness.https.any.js": [ - "e7f2cc8ff862d5b25a7ebf55eb6e2448f79688ad", + "da60edbee630db75d42242b051bda7ea94a12b5b", [ "shape-detection/idlharness.https.any.html", { @@ -528788,10 +528822,6 @@ [ "script", "/resources/idlharness.js" - ], - [ - "script", - "/shape-detection/resources/shapedetection-helpers.js" ] ] } @@ -528811,10 +528841,6 @@ [ "script", "/resources/idlharness.js" - ], - [ - "script", - "/shape-detection/resources/shapedetection-helpers.js" ] ] } @@ -528834,10 +528860,6 @@ [ "script", "/resources/idlharness.js" - ], - [ - "script", - "/shape-detection/resources/shapedetection-helpers.js" ] ] } @@ -528857,10 +528879,6 @@ [ "script", "/resources/idlharness.js" - ], - [ - "script", - "/shape-detection/resources/shapedetection-helpers.js" ] ] } @@ -538130,13 +538148,6 @@ {} ] ], - "TrustedTypePolicy-getPolicyNames.tentative.html": [ - "d1ae9e45c0669a5aadce7c09d1e3c56360583708", - [ - null, - {} - ] - ], "TrustedTypePolicyFactory-constants.tentative.html": [ "0ba2eb62375a57c78f1caba4592e880b92483599", [ @@ -538173,7 +538184,7 @@ ] ], "TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html": [ - "f049484f1199a088db7e60c4b899a1150c70906b", + "9fdafb2ccf04bf2808e3399d64c83a131c8648d2", [ null, {} @@ -538308,7 +538319,7 @@ ] ], "csp-block-eval.tentative.html": [ - "7902ca4040f582427e36941b6779e1bcdc51abf8", + "e3911bf9e6a9340a35906d9ec70f71f6b8152951", [ null, {} @@ -538350,7 +538361,7 @@ ] ], "eval-csp-tt-default-policy.tentative.html": [ - "eaa74eaf4cd03e0aa3da97e26f700317945a87da", + "106a024f2c1a8f4e2b2e99d2f15a81457179d807", [ null, {} @@ -538459,7 +538470,7 @@ ] ], "trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html": [ - "40c1ccc69a1b186f2f8820091c68edade5dceedc", + "081f9becbd09e7875ca3786842b9d2495df7e9ba", [ null, {} @@ -538473,7 +538484,7 @@ ] ], "trusted-types-eval-reporting.tentative.https.html": [ - "dec8a07cfc4bbdf60eda9819bbf6d16a587906a7", + "9621aaba9749a9522703f87bfd23466545f14a70", [ null, {} @@ -547654,7 +547665,7 @@ ] ], "animate.html": [ - "ba10b172c2d4ec20b92a8283740a1045d52d4e54", + "bfe351250ffc28e9681cd2534024eefef33d2fc8", [ null, {} @@ -547885,14 +547896,14 @@ ] ], "processing-a-keyframes-argument-001.html": [ - "87e60a2b1085125040a454763216ed335f249e6c", + "654d4db7c79bd7f94727a38e595ab8d78c2172f2", [ null, {} ] ], "processing-a-keyframes-argument-002.html": [ - "4b0e15c9a2f73a81eb181691c8c096fecc55edae", + "8620f883f98f17a71adcbd7364c6ae942d830a45", [ null, {} @@ -547913,7 +547924,7 @@ ] ], "target.html": [ - "eaef10fcb51050e8279393760cf75f6ea70397c8", + "6951682c4d8af29736e1ec655b65e4147aee9538", [ null, {} @@ -550839,7 +550850,7 @@ ] ], "createcredential-badargs-rp.https.html": [ - "8886cc15c92e0ae98f0c65d6d1daa92cb93acfb7", + "fa4d2264fefe8be7da1de8ecefeeb60da27511e0", [ null, { @@ -550879,7 +550890,7 @@ ] ], "createcredential-passing.https.html": [ - "ab10c7f519a6868c28c233fa6f933da925fe3dc9", + "a94be363da20214ac84950b2bb701d428372dd10", [ null, { @@ -550909,7 +550920,7 @@ ] ], "getcredential-badargs-rpid.https.html": [ - "6e0ef5f201842f878d4cc2cd38a05e1923c992a8", + "3f9d3f2177fd9624da6bebfabedae7c57f3152a8", [ null, { @@ -550939,7 +550950,7 @@ ] ], "getcredential-passing.https.html": [ - "dae05e0993a0358ec77c3c2c7981c39a7483c82e", + "c5237d2cda27e573ee591e95fdad92fae06e56a7", [ null, { diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini deleted file mode 100644 index f64b45fea6b..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-002.html] - [Hit test float] - expected: FAIL - 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/compositing/mix-blend-mode/mix-blend-mode-paragraph.html.ini b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-paragraph.html.ini new file mode 100644 index 00000000000..fb5b6fd0006 --- /dev/null +++ b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-paragraph.html.ini @@ -0,0 +1,2 @@ +[mix-blend-mode-paragraph.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini b/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini deleted file mode 100644 index d19959b9c59..00000000000 --- a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[font-display-feature-policy-01.tentative.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini b/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini deleted file mode 100644 index 64e43bcc512..00000000000 --- a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[font-display-feature-policy-report-only.tentative.html] - expected: ERROR - [font-display-late-swap Report Format] - expected: NOTRUN - diff --git a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini b/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini deleted file mode 100644 index 60bd3dd7e05..00000000000 --- a/tests/wpt/metadata/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[font-display-feature-policy-reporting.tentative.html] - expected: ERROR - [font-display-late-swap Report Format] - expected: NOTRUN - 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 e35a452a186..70a00a101f6 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: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL - 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 <iframe> is resized] expected: FAIL + [listeners are called correct number of times] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini deleted file mode 100644 index e38782d8c85..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[elementFromPoint-001.html] - [CSSOM View - 5 - extensions to the Document interface] - expected: FAIL - diff --git a/tests/wpt/metadata/dom/events/Event-dispatch-detached-input-and-change.html.ini b/tests/wpt/metadata/dom/events/Event-dispatch-detached-input-and-change.html.ini new file mode 100644 index 00000000000..e4a330c1d27 --- /dev/null +++ b/tests/wpt/metadata/dom/events/Event-dispatch-detached-input-and-change.html.ini @@ -0,0 +1,25 @@ +[Event-dispatch-detached-input-and-change.html] + [attached to shadow dom radio should emit input and change events on click().] + expected: FAIL + + [detached checkbox should not emit input or change events on click().] + expected: FAIL + + [attached to shadow dom checkbox should emit input and change events on click().] + expected: FAIL + + [detached radio should not emit input or change events on click().] + expected: FAIL + + [detached radio should not emit input or change events on dispatchEvent(new MouseEvent('click')).] + expected: FAIL + + [detached checkbox should not emit input or change events on dispatchEvent(new MouseEvent('click')).] + expected: FAIL + + [attached to shadow dom checkbox should emit input and change events on dispatchEvent(new MouseEvent('click')).] + expected: FAIL + + [attached to shadow dom radio should emit input and change events on dispatchEvent(new MouseEvent('click')).] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index b01cf71e9c7..41c285bf70b 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -312,24 +312,24 @@ [fetch(): separate response Content-Type: text/plain ] expected: NOTRUN - [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] + [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: combined response Content-Type: text/html;x=" text/plain] + [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] + [<iframe>: separate response Content-Type: text/plain */*] expected: FAIL - [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] + [<iframe>: separate response Content-Type: text/html;x=" text/plain] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL - [<iframe>: separate response Content-Type: text/plain */*] + [<iframe>: combined response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] + [<iframe>: combined response Content-Type: text/html;" \\" text/plain] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini deleted file mode 100644 index 385376c7321..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_4.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 8b743f36e1d..6b68e9094e4 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,20 +1,16 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: TIMEOUT + expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: NOTRUN + expected: FAIL [Area element should support autofocus] - expected: NOTRUN + expected: FAIL [Host element with delegatesFocus should support autofocus] - expected: NOTRUN - - [Non-HTMLElement should not support autofocus] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini index 5f60c78e73c..b3bd9f4c289 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini @@ -1,6 +1,6 @@ [iframe_sandbox_popups_escaping-3.html] type: testharness - expected: TIMEOUT + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index e440b1e38c6..dc856a3d5a3 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,6 +1,5 @@ [iframe_sandbox_popups_nonescaping-3.html] type: testharness - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini index f606d929563..6f2de6204dc 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini @@ -35,3 +35,6 @@ [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44043 more errors.\n\tMax AbsError of 1.9962286949157715e+0 at index of 32177.\n\t[32177\]\t9.9879217147827148e-1\t-9.9743652343750000e-1\t1.9962286949157715e+0\t2.0013591321441684e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 14112.\n\t[14112\]\t-9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] expected: FAIL + [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 42288 more errors.\n\tMax AbsError of 1.9962286949157715e+0 at index of 29972.\n\t[29972\]\t9.9879217147827148e-1\t-9.9743652343750000e-1\t1.9962286949157715e+0\t2.0013591321441684e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] + expected: FAIL + diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 6537c0f6d97..6bd8b1b7e30 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -176,3 +176,9 @@ [X SNR (-447.224261749694 dB) is not greater than or equal to 65.737. Got -447.224261749694.] expected: FAIL + [X SNR (-61.90637588457 dB) is not greater than or equal to 65.737. Got -61.90637588457.] + expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[19030\]\t8.3196109375000000e+4\t-7.3546999692916870e-1\t8.3196844844996929e+4\t1.1312065100190540e+5\t3.8985999999999999e-3\n\t[19031\]\t-3.6017334461212158e-1\t-6.9157749414443970e-1\t3.3140414953231812e-1\t4.7920030992665957e-1\t3.8985999999999999e-3\n\t[38059\]\t1.6516518750000000e+5\t-9.8956179618835449e-1\t1.6516617706179619e+5\t1.6690840096898633e+5\t3.8985999999999999e-3\n\t[38060\]\t-8.8409073650836945e-2\t-9.9664616584777832e-1\t9.0823709219694138e-1\t9.1129341918891205e-1\t3.8985999999999999e-3\n\tMax AbsError of 1.6516617706179619e+5 at index of 38059.\n\tMax RelError of 1.6690840096898633e+5 at index of 38059.\n] + expected: FAIL + diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini index 268949ced5c..f584fce5df1 100644 --- a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini +++ b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini @@ -1,4 +1,5 @@ [005.html] + expected: ERROR [dedicated worker in shared worker in dedicated worker] expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/promise.html.ini b/tests/wpt/mozilla/meta/mozilla/promise.html.ini index 784c666e1b7..e5ac0e78cd9 100644 --- a/tests/wpt/mozilla/meta/mozilla/promise.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/promise.html.ini @@ -1,3 +1,6 @@ [promise.html] type: testharness prefs: [dom.testbinding.enabled:true] + [Native promise from async callback can be resolved] + expected: FAIL + diff --git a/tests/wpt/web-platform-tests/common/security-features/README.md b/tests/wpt/web-platform-tests/common/security-features/README.md index 387e68334ae..fb9a2f108f9 100644 --- a/tests/wpt/web-platform-tests/common/security-features/README.md +++ b/tests/wpt/web-platform-tests/common/security-features/README.md @@ -32,6 +32,7 @@ This is the overview of the project structure: ``` common/security-features/ └── tools/ - the common test generator logic + ├── spec.src.json └── template/ - the test files templates project-directory/ (e.g. referrer-policy/) ├── spec.src.json @@ -57,7 +58,14 @@ path/to/common/security-features/tools/generate.py --spec path/to/project-direct git add path/to/project-directory/gen/ && git commit -m "Add generated tests" ``` -This will parse the spec JSON5 (`project-directory/spec.src.json`) and determine which tests to generate (or skip) while using templates. +This will parse the spec JSON5 files and determine which tests to generate (or skip) while using templates. + +- The default spec JSON5: `common/security-features/tools/spec.src.json`. + - Describes common configurations, such as subresource types, source context types, etc. +- The per-project spec JSON5: `project-directory/spec.src.json`. + - Describes project-specific configurations, particularly those related to test generation patterns (`specification`), policy deliveries (e.g. `delivery_type`, `delivery_value`) and `expectation`. + +For how these two spec JSON5 files are merged, see [Sub projects](#sub-projects) section. Note: `spec.src.json` is transitioning to JSON5 [#21710](https://github.com/web-platform-tests/wpt/issues/21710). diff --git a/tests/wpt/web-platform-tests/common/security-features/tools/generate.py b/tests/wpt/web-platform-tests/common/security-features/tools/generate.py index 3345d652069..057c4d81ef1 100755 --- a/tests/wpt/web-platform-tests/common/security-features/tools/generate.py +++ b/tests/wpt/web-platform-tests/common/security-features/tools/generate.py @@ -3,6 +3,7 @@ from __future__ import print_function import argparse +import collections import copy import json import os @@ -359,8 +360,14 @@ def main(): print('Error: No spec.src.json is found at %s.' % spec_directory) return - spec_json = util.load_spec_json(spec_filenames[0]) - for spec_filename in spec_filenames[1:]: + # Load the default spec JSON file, ... + default_spec_filename = os.path.join(util.script_directory, 'spec.src.json') + spec_json = collections.OrderedDict() + if os.path.exists(default_spec_filename): + spec_json = util.load_spec_json(default_spec_filename) + + # ... and then make spec JSON files in subdirectories override the default. + for spec_filename in spec_filenames: child_spec_json = util.load_spec_json(spec_filename) merge_json(spec_json, child_spec_json) diff --git a/tests/wpt/web-platform-tests/common/security-features/tools/spec.src.json b/tests/wpt/web-platform-tests/common/security-features/tools/spec.src.json new file mode 100644 index 00000000000..7cf6a06c0f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/common/security-features/tools/spec.src.json @@ -0,0 +1,468 @@ +{ + "selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", + "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", + "excluded_tests": [ + { + "name": "Workers are same-origin only", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": [ + "worker-classic", + "worker-module", + "sharedworker-classic", + "sharedworker-module" + ], + "origin": [ + "cross-https", + "cross-http", + "cross-http-downgrade", + "cross-wss", + "cross-ws", + "cross-ws-downgrade" + ], + "expectation": "*" + }, + { + "name": "Workers are same-origin only (redirects)", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": [ + "swap-origin", + "swap-scheme" + ], + "subresource": [ + "worker-classic", + "worker-module", + "sharedworker-classic", + "sharedworker-module" + ], + "origin": "*", + "expectation": "*" + }, + { + "name": "Websockets are ws/wss-only", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": "websocket", + "origin": [ + "same-https", + "same-http", + "same-http-downgrade", + "cross-https", + "cross-http", + "cross-http-downgrade" + ], + "expectation": "*" + }, + { + // Redirects are intentionally forbidden in browsers: + // https://fetch.spec.whatwg.org/#concept-websocket-establish + "name": "Websockets are no-redirect only", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": [ + "keep-origin", + "swap-origin", + "keep-scheme", + "swap-scheme", + "downgrade" + ], + "subresource": "websocket", + "origin": "*", + "expectation": "*" + }, + { + "name": "ws/wss are websocket-only", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": [ + "area-tag", + "a-tag", + "fetch", + "iframe-tag", + "img-tag", + "script-tag", + "sharedworker-classic", + "sharedworker-import-data", + "sharedworker-module", + "worker-classic", + "worker-import-data", + "worker-module", + "worklet-animation", + "worklet-animation-import-data", + "worklet-audio", + "worklet-audio-import-data", + "worklet-layout", + "worklet-layout-import-data", + "worklet-paint", + "worklet-paint-import-data", + "xhr" + ], + "origin": [ + "same-wss", + "same-ws", + "same-ws-downgrade", + "cross-wss", + "cross-ws", + "cross-ws-downgrade" + ], + "expectation": "*" + } + ], + "source_context_schema": { + "supported_subresource": { + "top": "*", + "iframe": "*", + "iframe-blank": "*", + "srcdoc": "*", + "worker-classic": [ + "xhr", + "fetch", + "websocket", + "worker-classic", + "worker-module" + ], + "worker-module": [ + "xhr", + "fetch", + "websocket", + "worker-classic", + "worker-module" + ], + "worker-classic-data": [ + "xhr", + "fetch", + "websocket" + ], + "worker-module-data": [ + "xhr", + "fetch", + "websocket" + ], + "sharedworker-classic": [ + "xhr", + "fetch", + "websocket" + ], + "sharedworker-module": [ + "xhr", + "fetch", + "websocket" + ], + "sharedworker-classic-data": [ + "xhr", + "fetch", + "websocket" + ], + "sharedworker-module-data": [ + "xhr", + "fetch", + "websocket" + ] + } + }, + "source_context_list_schema": { + // Warning: Currently, some nested patterns of contexts have different + // inheritance rules for different kinds of policies. + // For example, an HTTP(S) dedicated worker inherits parent's CSP but not + // parent's referrer policy, and "worker-classic" source_context_list + // value here reflects the referrer policy spec, not CSP. + // Perhaps we have to introduce separate source_context_list entries, + // e.g. "worker-classic-CSP" to test the same nested contexts with + // different policy inheritance expectations. + // The generated tests will be used to test/investigate the policy + // inheritance rules, and eventually the policy inheritance rules will + // be unified (https://github.com/w3ctag/design-principles/issues/111). + "top": { + "description": "Policy set by the top-level Document", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + } + ], + "subresourcePolicyDeliveries": [] + }, + "req": { + "description": "Subresource request's policy should override Document's policy", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "anotherPolicy" + ] + } + ], + "subresourcePolicyDeliveries": [ + "nonNullPolicy" + ] + }, + "srcdoc-inherit": { + "description": "srcdoc iframe without its own policy should inherit parent Document's policy", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "srcdoc" + } + ], + "subresourcePolicyDeliveries": [] + }, + "srcdoc": { + "description": "srcdoc iframe's policy should override parent Document's policy", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "anotherPolicy" + ] + }, + { + "sourceContextType": "srcdoc", + "policyDeliveries": [ + "nonNullPolicy" + ] + } + ], + "subresourcePolicyDeliveries": [] + }, + "iframe": { + "description": "external iframe's policy should override parent Document's policy", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "anotherPolicy" + ] + }, + { + "sourceContextType": "iframe", + "policyDeliveries": [ + "policy" + ] + } + ], + "subresourcePolicyDeliveries": [] + }, + "iframe-blank-inherit": { + "description": "blank iframe should inherit parent Document's policy", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "iframe-blank" + } + ], + "subresourcePolicyDeliveries": [] + }, + "worker-classic": { + // Warning: This is incompatible with the current CSP spec, + // so is not applicable to upgrade-insecure-requests and mixed-content tests. + "description": "dedicated workers shouldn't inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "anotherPolicy" + ] + }, + { + "sourceContextType": "worker-classic", + "policyDeliveries": [ + "policy" + ] + } + ], + "subresourcePolicyDeliveries": [] + }, + "worker-classic-data": { + "description": "data: dedicated workers should inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "worker-classic-data", + "policyDeliveries": [] + } + ], + "subresourcePolicyDeliveries": [] + }, + "worker-module": { + // Warning: This is incompatible with the current CSP spec, + // so is not applicable to upgrade-insecure-requests and mixed-content tests. + "description": "dedicated workers shouldn't inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "anotherPolicy" + ] + }, + { + "sourceContextType": "worker-module", + "policyDeliveries": [ + "policy" + ] + } + ], + "subresourcePolicyDeliveries": [] + }, + "worker-module-data": { + "description": "data: dedicated workers should inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "worker-module-data", + "policyDeliveries": [] + } + ], + "subresourcePolicyDeliveries": [] + }, + "sharedworker-classic-data": { + "description": "data: shared workers should inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "sharedworker-classic-data", + "policyDeliveries": [] + } + ], + "subresourcePolicyDeliveries": [] + }, + "sharedworker-module-data": { + "description": "data: shared workers should inherit its parent's policy.", + "sourceContextList": [ + { + "sourceContextType": "top", + "policyDeliveries": [ + "policy" + ] + }, + { + "sourceContextType": "sharedworker-module-data", + "policyDeliveries": [] + } + ], + "subresourcePolicyDeliveries": [] + } + }, + "test_expansion_schema": { + "expansion": [ + "default", + "override" + ], + "source_scheme": [ + "http", + "https" + ], + "source_context_list": [ + "top", + "req", + "srcdoc-inherit", + "srcdoc", + "iframe", + "iframe-blank-inherit", + "worker-classic", + "worker-classic-data", + "worker-module", + "worker-module-data", + "sharedworker-classic-data", + "sharedworker-module-data" + ], + "redirection": [ + "no-redirect", + "keep-origin", + "swap-origin", + "keep-scheme", + "swap-scheme", + "downgrade" + ], + "origin": [ + "same-https", + "same-http", + "same-http-downgrade", + "cross-https", + "cross-http", + "cross-http-downgrade", + "same-wss", + "same-ws", + "same-ws-downgrade", + "cross-wss", + "cross-ws", + "cross-ws-downgrade" + ], + "subresource": [ + "a-tag", + "area-tag", + "audio-tag", + "beacon", + "fetch", + "iframe-tag", + "img-tag", + "link-css-tag", + "link-prefetch-tag", + "object-tag", + "picture-tag", + "script-tag", + "sharedworker-classic", + "sharedworker-import-data", + "sharedworker-module", + "video-tag", + "websocket", + "worker-classic", + "worker-import-data", + "worker-module", + "worklet-animation", + "worklet-animation-import-data", + "worklet-audio", + "worklet-audio-import-data", + "worklet-layout", + "worklet-layout-import-data", + "worklet-paint", + "worklet-paint-import-data", + "xhr" + ] + } +} diff --git a/tests/wpt/web-platform-tests/css/css-animations/AnimationEffect-updateTiming.tentative.html b/tests/wpt/web-platform-tests/css/css-animations/AnimationEffect-updateTiming.tentative.html index de6953c761f..e6556dac4bd 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/AnimationEffect-updateTiming.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-animations/AnimationEffect-updateTiming.tentative.html @@ -23,7 +23,6 @@ test(t => { div.style.animationDuration = '4s'; div.style.animationDelay = '6s'; - getComputedStyle(div).animationDuration; assert_equals( animation.effect.getTiming().duration, @@ -61,7 +60,6 @@ test(t => { div.style.animationDirection = 'alternate'; div.style.animationDelay = '6s'; div.style.animationFillMode = 'both'; - getComputedStyle(div).animationIterationCount; assert_equals( animation.effect.getTiming().iterations, @@ -97,7 +95,6 @@ test(t => { div.style.animationFillMode = 'forwards'; div.style.animationIterationCount = '6'; div.style.animationDirection = 'reverse'; - getComputedStyle(div).animationDelay; assert_equals( animation.effect.getTiming().delay, @@ -132,7 +129,6 @@ test(t => { }, 'Negative iteration count should cause an error to be thrown'); div.style.animationDuration = '4s'; - getComputedStyle(div).animationDuration; assert_equals( animation.effect.getTiming().duration, @@ -155,7 +151,6 @@ test(t => { div.style.animationDuration = '6s'; div.style.animationTimingFunction = 'ease-in'; - getComputedStyle(div).animationDuration; assert_equals( animation.effect.getTiming().easing, diff --git a/tests/wpt/web-platform-tests/css/css-animations/CSSAnimation-effect.tentative.html b/tests/wpt/web-platform-tests/css/css-animations/CSSAnimation-effect.tentative.html index 95a90418720..5e2d18b5bf9 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/CSSAnimation-effect.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-animations/CSSAnimation-effect.tentative.html @@ -158,7 +158,6 @@ test(t => { div.style.animationDelay = '8s'; div.style.animationFillMode = 'both'; div.style.animationPlayState = 'paused'; - getComputedStyle(div).animationDuration; // Update the keyframes keyframesRule.deleteRule(0); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html deleted file mode 100644 index fc43ebc49b5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html +++ /dev/null @@ -1,30 +0,0 @@ -<!DOCTYPE html> -<title>Test for font-display-late-swap feature policy behavior when set to reporting</title> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> -<style> -.ahem { - font-family: 'Ahem'; -} -.arial { - font-family: 'Arial'; -} -</style> -<p>Tests if font-display is set to optional for each option except for when it is set to fallback</p> -<table id="container"> - <tr> - <th>not-set</th> - <th>auto</th> - <th>block</th> - <th>swap</th> - <th>fallback</th> - <th>optional</th> - </tr> - <tr> - <td class="arial">a</td> - <td class="arial">a</td> - <td class="arial">a</td> - <td class="arial">a</td> - <td class="ahem">a</td> - <td class="arial">a</td> - </tr> -</table> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html b/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html deleted file mode 100644 index 56b040d8faf..00000000000 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html +++ /dev/null @@ -1,46 +0,0 @@ -<!DOCTYPE html> -<html class="reftest-wait"> -<title>Test for font-display-late-swap feature policy behavior when set to reporting</title> -<link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md"> -<link rel="match" href="font-display-feature-policy-01.tentative-ref.html"> -<style> -</style> -<p>Tests if font-display is set to optional for each option except for when it is set to fallback</p> -<table id="container"> - <tr> - <th>not-set</th> - <th>auto</th> - <th>block</th> - <th>swap</th> - <th>fallback</th> - <th>optional</th> - </tr> -</table> -<script> -const fontDisplayValues = ['', 'auto', 'block', 'swap', 'fallback', 'optional']; -const table = document.getElementById('container'); - -function makeFontFaceDeclaration(family, display) { - url = '/fonts/Ahem.ttf?pipe=trickle(d1)'; // Before the swap period is over - return '@font-face { font-family: ' + family + '; src: url("' + url + '"); font-display: ' + display + '; }'; -} - -window.onload = () => { - let tr = document.createElement('tr'); - for (let display of fontDisplayValues) { - const family = display + '-face'; - const rule = makeFontFaceDeclaration(family, display); - document.styleSheets[0].insertRule(rule, 0); - let td = document.createElement('td'); - td.textContent = 'a'; - td.style.fontFamily = family + ', Arial'; - tr.appendChild(td); - } - table.appendChild(tr); - const timeoutMilliSec = 1500; // After the font is loaded - setTimeout(() => { - document.documentElement.classList.remove("reftest-wait"); - }, timeoutMilliSec); -} -</script> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.headers b/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.headers deleted file mode 100644 index 0c3e29db99f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy: font-display-late-swap 'none';
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers b/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers deleted file mode 100644 index e6c4898d5d3..00000000000 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy-Report-Only: font-display-late-swap 'none';
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers b/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers deleted file mode 100644 index 0c3e29db99f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers +++ /dev/null @@ -1 +0,0 @@ -Feature-Policy: font-display-late-swap 'none';
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html index bbf5d374589..8cd0ef66b97 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html @@ -163,6 +163,45 @@ html,body { <div style="grid-column:1"></div> </div></div> +<div class="grid"><div class="subgrid fill-0k"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0l"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0m"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + <div class="grid"><div class="subgrid fill-1a"> <div style="grid-column:4"></div> <div style="grid-column:4"></div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001.html index e17fc8274f4..9e57028c4cc 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-001.html @@ -37,6 +37,9 @@ html,body { .fill-0h { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] [z] } /* [x] [x] [x] [x] [x] */ .fill-0i { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] } /* [x] [x] [x] [x] [x] */ .fill-0j { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ +.fill-0k { grid-template-columns: subgrid repeat(auto-fill, [y]) repeat(100, [z]) } /* [z] [z] [z] [z] [z] */ +.fill-0l { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) repeat(100, [z]) } /* [x] [z] [z] [z] [z] */ +.fill-0m { grid-template-columns: subgrid repeat(100, [x]) repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ .fill-1a { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] [z] [z] [z] } /* [y] [z] [z] [z] [z] */ .fill-1b { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) [z] [z] [z] } /* [x] [y] [z] [z] [z] */ @@ -195,6 +198,45 @@ html,body { <div style="grid-column:y -5"></div> </div></div> +<div class="grid"><div class="subgrid fill-0k"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0l"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0m"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + <div class="grid"><div class="subgrid fill-1a"> <div style="grid-column:y 5"></div> <div style="grid-column:y 4"></div> @@ -402,6 +444,9 @@ html,body { "subgrid [x] [x] [x] [x] [x]", "subgrid [x] [x] [x] [x] [x]", "subgrid [x] [x] [x] [x] [x]", + "subgrid [z] [z] [z] [z] [z]", + "subgrid [x] [z] [z] [z] [z]", + "subgrid [x] [x] [x] [x] [x]", "subgrid [y] [z] [z] [z] [z]", "subgrid [x] [y] [z] [z] [z]", "subgrid [x] [x] [y] [z] [z]", diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-002.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-002.html index 38d0bea0d08..80980f14e9f 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-002.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-002.html @@ -40,6 +40,9 @@ html,body { .fill-0h { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] [z] } /* [x] [x] [x] [x] [x] */ .fill-0i { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] } /* [x] [x] [x] [x] [x] */ .fill-0j { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ +.fill-0k { grid-template-columns: subgrid repeat(auto-fill, [y]) repeat(100, [z]) } /* [z] [z] [z] [z] [z] */ +.fill-0l { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) repeat(100, [z]) } /* [x] [z] [z] [z] [z] */ +.fill-0m { grid-template-columns: subgrid repeat(100, [x]) repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ .fill-1a { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] [z] [z] [z] } /* [y] [z] [z] [z] [z] */ .fill-1b { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) [z] [z] [z] } /* [x] [y] [z] [z] [z] */ @@ -198,6 +201,45 @@ html,body { <div style="grid-column:y -5"></div> </div></div></div> +<div class="grid"><div class="subgrid fill-0k"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0l"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0m"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + <div class="grid"><div class="subgrid fill-1a"><div class="subgrid"> <div style="grid-column:y 5"></div> <div style="grid-column:y 4"></div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html index b58799bd86b..3a1d2707c37 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html @@ -45,6 +45,9 @@ html,body { .fill-0h { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] [z] } /* [x] [x] [x] [x] [x] */ .fill-0i { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] } /* [x] [x] [x] [x] [x] */ .fill-0j { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ +.fill-0k { grid-template-columns: subgrid repeat(auto-fill, [y]) repeat(100, [z]) } /* [z] [z] [z] [z] [z] */ +.fill-0l { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) repeat(100, [z]) } /* [x] [z] [z] [z] [z] */ +.fill-0m { grid-template-columns: subgrid repeat(100, [x]) repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ .fill-1a { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] [z] [z] [z] } /* [y] [z] [z] [z] [z] */ .fill-1b { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) [z] [z] [z] } /* [x] [y] [z] [z] [z] */ @@ -204,6 +207,45 @@ html,body { <div style="grid-row:y -5"></div> </div></div></div> +<div class="grid"><div class="subgrid fill-0k"><div class="subgrid"> + <div style="grid-row:y 5"></div> + <div style="grid-row:y 4"></div> + <div style="grid-row:y 3"></div> + <div style="grid-row:y 2"></div> + <div style="grid-row:y 1"></div> + <div style="grid-row:y -1"></div> + <div style="grid-row:y -2"></div> + <div style="grid-row:y -3"></div> + <div style="grid-row:y -4"></div> + <div style="grid-row:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0l"><div class="subgrid"> + <div style="grid-row:y 5"></div> + <div style="grid-row:y 4"></div> + <div style="grid-row:y 3"></div> + <div style="grid-row:y 2"></div> + <div style="grid-row:y 1"></div> + <div style="grid-row:y -1"></div> + <div style="grid-row:y -2"></div> + <div style="grid-row:y -3"></div> + <div style="grid-row:y -4"></div> + <div style="grid-row:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0m"><div class="subgrid"> + <div style="grid-row:y 5"></div> + <div style="grid-row:y 4"></div> + <div style="grid-row:y 3"></div> + <div style="grid-row:y 2"></div> + <div style="grid-row:y 1"></div> + <div style="grid-row:y -1"></div> + <div style="grid-row:y -2"></div> + <div style="grid-row:y -3"></div> + <div style="grid-row:y -4"></div> + <div style="grid-row:y -5"></div> +</div></div></div> + <div class="grid"><div class="subgrid fill-1a"><div class="subgrid"> <div style="grid-row:y 5"></div> <div style="grid-row:y 4"></div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html index 07ba960200b..ca2729fa3f2 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html @@ -163,6 +163,45 @@ html,body { <div style="grid-column:1"></div> </div></div> +<div class="grid"><div class="subgrid fill-0k"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0l"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + +<div class="grid"><div class="subgrid fill-0m"> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:4"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> + <div style="grid-column:1"></div> +</div></div> + <div class="grid"><div class="subgrid fill-1a"> <div style="grid-column:4"></div> <div style="grid-column:4"></div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004.html index beacff588a2..9dd8f33eb9b 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-004.html @@ -40,6 +40,9 @@ html,body { .fill-0h { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] [z] } /* [x] [x] [x] [x] [x] */ .fill-0i { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) [z] } /* [x] [x] [x] [x] [x] */ .fill-0j { grid-template-columns: subgrid [x] [x] [x] [x] [x] [x] [x] repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ +.fill-0k { grid-template-columns: subgrid repeat(auto-fill, [y]) repeat(100, [z]) } /* [z] [z] [z] [z] [z] */ +.fill-0l { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) repeat(100, [z]) } /* [x] [z] [z] [z] [z] */ +.fill-0m { grid-template-columns: subgrid repeat(100, [x]) repeat(auto-fill, [y]) } /* [x] [x] [x] [x] [x] */ .fill-1a { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] [z] [z] [z] } /* [y] [z] [z] [z] [z] */ .fill-1b { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) [z] [z] [z] } /* [x] [y] [z] [z] [z] */ @@ -198,6 +201,45 @@ html,body { <div style="grid-column:y -5"></div> </div></div></div> +<div class="grid"><div class="subgrid fill-0k"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0l"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + +<div class="grid"><div class="subgrid fill-0m"><div class="subgrid"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div></div> + <div class="grid"><div class="subgrid fill-1a"><div class="subgrid"> <div style="grid-column:y 5"></div> <div style="grid-column:y 4"></div> diff --git a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-000.html b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-000.html index 227b9148a38..cbe53855a0a 100644 --- a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-000.html +++ b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-000.html @@ -80,41 +80,43 @@ </style> <script type="text/javascript"> - test(function(){ - let expectedForSelector = { - "" : "margin-top: 5cm; margin-bottom: 10cm;", - ":left" : "margin-right: 3cm;", - ":right" : "margin-left: 3cm;", - ":first" : "border-width: 1px;", - "hello" : "color: green;", - "world:right" : "background-color: green;", - "auto_page" : "size: auto;", - "square_page" : "size: 4in;", - "letter_page" : "size: letter;", - "page_width_height" : "size: 10cm 15cm;", - "page_size_orientation" : "size: ledger landscape;", - "page_orientation_size" : "size: a4 portrait;", - "page_jis_size_orientation" : "size: jis-b5 portrait;", - "page_orientation_jis_size" : "size: jis-b4 landscape;", - "err_empty_size" : "", - "err_unknow_page_size" : "", - "err_length_and_page_size" : "", - "err_length_and_orientation" : "", - "err_orientations" : "", - "err_too_many_params" : "" - }; - let styleSheets = document.styleSheets; - for (let i = 0; i < styleSheets.length; i++) { - let rules = styleSheets[i].cssRules; - for (let rule of rules) { - if (rule.type == CSSRule.PAGE_RULE) { - let expected = expectedForSelector[rule.selectorText]; + let expectedForSelector = { + "" : "margin-top: 5cm; margin-bottom: 10cm;", + ":left" : "margin-right: 3cm;", + ":right" : "margin-left: 3cm;", + ":first" : "border-width: 1px;", + "hello" : "color: green;", + "world:right" : "background-color: green;", + "auto_page" : "size: auto;", + "square_page" : "size: 4in;", + "letter_page" : "size: letter;", + "page_width_height" : "size: 10cm 15cm;", + "page_size_orientation" : "size: ledger landscape;", + "page_orientation_size" : "size: a4 portrait;", + "page_jis_size_orientation" : "size: jis-b5 portrait;", + "page_orientation_jis_size" : "size: jis-b4 landscape;", + "err_empty_size" : "", + "err_unknow_page_size" : "", + "err_length_and_page_size" : "", + "err_length_and_orientation" : "", + "err_orientations" : "", + "err_too_many_params" : "" + }; + let styleSheets = document.styleSheets; + for (let i = 0; i < styleSheets.length; i++) { + let rules = styleSheets[i].cssRules; + for (let rule of rules) { + if (rule.type == CSSRule.PAGE_RULE) { + let expected = expectedForSelector[rule.selectorText]; + test(function(){ assert_equals(rule.style.cssText, expected, "unexpected @page contents"); - delete expectedForSelector[rule.selectorText]; - } + }, "unexpected contents for selector ['" + rule.selectorText + "']"); + delete expectedForSelector[rule.selectorText]; } } + } + test(function() { assert_equals(Object.keys(expectedForSelector).length, 0, "missing @page selectors"); - }, "test CSS @page declarations"); + }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-001.html b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-001.html index e57424029ba..dc225b5abdc 100644 --- a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-001.html +++ b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-001.html @@ -27,29 +27,31 @@ </style> <script type="text/javascript"> - test(function(){ - let expectedForSelector = { - "" : "margin: 3cm;", - ":first" : "margin-top: 6cm;", - ":left" : "color: red;", - ":right" : "color: blue;" - }; - let styleSheets = document.styleSheets; - for (let i = 0; i < styleSheets.length; i++) { - let rules = styleSheets[i].cssRules; - for (let rule of rules) { - if (rule.type == CSSRule.MEDIA_RULE && rule.conditionText == 'print') { - for (let mediaRule of rule.cssRules) { - if (mediaRule.type == CSSRule.PAGE_RULE) { - let expected = expectedForSelector[mediaRule.selectorText]; + let expectedForSelector = { + "" : "margin: 3cm;", + ":first" : "margin-top: 6cm;", + ":left" : "color: red;", + ":right" : "color: blue;" + }; + let styleSheets = document.styleSheets; + for (let i = 0; i < styleSheets.length; i++) { + let rules = styleSheets[i].cssRules; + for (let rule of rules) { + if (rule.type == CSSRule.MEDIA_RULE && rule.conditionText == 'print') { + for (let mediaRule of rule.cssRules) { + if (mediaRule.type == CSSRule.PAGE_RULE) { + let expected = expectedForSelector[mediaRule.selectorText]; + test(function(){ assert_equals(mediaRule.style.cssText, expected, "unexpected @page contents"); - delete expectedForSelector[mediaRule.selectorText]; - } + }, "unexpected contents for selector ['" + mediaRule.selectorText + "']"); + delete expectedForSelector[mediaRule.selectorText]; } } } } + } + test(function() { assert_equals(Object.keys(expectedForSelector).length, 0, "missing @page selectors in @media"); - }, "test @page inside a @media print rule"); + }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-002.html b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-002.html index 183072dec67..b35fa29244c 100644 --- a/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-002.html +++ b/tests/wpt/web-platform-tests/css/css-page/page-rule-declarations-002.html @@ -23,14 +23,12 @@ </style> <script type="text/javascript"> - test(function(){ - test_valid_value("page", "auto"); - test_valid_value("page", "small_page"); - test_valid_value("page", "large_page"); - test_invalid_value("page", "auto small_page"); - test_invalid_value("page", "large_page auto"); - test_invalid_value("page", "small_page large_page"); - test_invalid_value("page", "1cm"); - }, "test page properties in HTML elements"); + test_valid_value("page", "auto"); + test_valid_value("page", "small_page"); + test_valid_value("page", "large_page"); + test_invalid_value("page", "auto small_page"); + test_invalid_value("page", "large_page auto"); + test_invalid_value("page", "small_page large_page"); + test_invalid_value("page", "1cm"); </script> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-report-only.tentative.html index ff3a7f19783..03fa5b68a3e 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html +++ b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-report-only.tentative.html @@ -2,7 +2,7 @@ <html> <head> <title>Test for font-display-late-swap feature policy set to report-only</title> - <link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#reporting"> + <link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md"> <script src='/resources/testharness.js'></script> <script src='/resources/testharnessreport.js'></script> <style> @@ -52,7 +52,7 @@ let t = async_test('font-display-late-swap Report Format'); let check_report_format = (reports, observer) => { reportCounter -= reports.length; for (let report of reports) { - assert_equals(report.type, 'feature-policy-violation'); + assert_equals(report.type, 'document-policy-violation'); assert_equals(report.url, document.location.href, 'Report URL'); assert_equals(report.body.featureId, 'font-display-late-swap'); assert_equals(report.body.disposition, 'report'); @@ -66,7 +66,7 @@ let check_report_format = (reports, observer) => { }; new ReportingObserver(t.step_func(check_report_format), - {types: ['feature-policy-violation'], buffered: true}).observe(); + {types: ['document-policy-violation'], buffered: true}).observe(); </script> </body> </html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-report-only.tentative.html.headers b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-report-only.tentative.html.headers new file mode 100644 index 00000000000..e090edd0da4 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-report-only.tentative.html.headers @@ -0,0 +1 @@ +Document-Policy-Report-Only: no-font-display-late-swap
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-reporting.tentative.html index 6f6a51a28fd..db871d19f7e 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html +++ b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-reporting.tentative.html @@ -2,7 +2,7 @@ <html> <head> <title>Test for font-display-late-swap feature policy set to reporting</title> - <link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#reporting"> + <link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md"> <script src='/resources/testharness.js'></script> <script src='/resources/testharnessreport.js'></script> <style> @@ -52,7 +52,7 @@ let t = async_test('font-display-late-swap Report Format'); let check_report_format = (reports, observer) => { reportCounter -= reports.length; for (let report of reports) { - assert_equals(report.type, 'feature-policy-violation'); + assert_equals(report.type, 'document-policy-violation'); assert_equals(report.url, document.location.href, 'Report URL'); assert_equals(report.body.featureId, 'font-display-late-swap'); assert_equals(report.body.disposition, 'enforce'); @@ -66,7 +66,7 @@ let check_report_format = (reports, observer) => { }; new ReportingObserver(t.step_func(check_report_format), - {types: ['feature-policy-violation'], buffered: true}).observe(); + {types: ['document-policy-violation'], buffered: true}).observe(); </script> </body> </html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-reporting.tentative.html.headers b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-reporting.tentative.html.headers new file mode 100644 index 00000000000..84ad7cbf97b --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/font-display/font-display-document-policy-reporting.tentative.html.headers @@ -0,0 +1 @@ +Document-Policy: no-font-display-late-swap
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html index 2241d57e511..7690f753d9c 100644 --- a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html +++ b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html @@ -191,6 +191,24 @@ async_test(function(t) { input.click() }, "disconnected radio should be checked") +async_test(t => { + const input = document.createElement('input'); + input.type = 'checkbox'; + input.onclick = t.step_func_done(() => { + assert_true(input.checked); + }); + input.dispatchEvent(new MouseEvent('click')); +}, `disconnected checkbox should be checked from dispatchEvent(new MouseEvent('click'))`); + +async_test(t => { + const input = document.createElement('input'); + input.type = 'radio'; + input.onclick = t.step_func_done(() => { + assert_true(input.checked); + }); + input.dispatchEvent(new MouseEvent('click')); +}, `disconnected radio should be checked from dispatchEvent(new MouseEvent('click'))`); + async_test(function(t) { var form = document.createElement("form") var didSubmit = false diff --git a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-detached-input-and-change.html b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-detached-input-and-change.html new file mode 100644 index 00000000000..a53ae71ac2a --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-detached-input-and-change.html @@ -0,0 +1,190 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org"> +<title>input and change events for detached checkbox and radio elements</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_false(inputEventFired); + assert_false(changeEventFired); +}, 'detached checkbox should not emit input or change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_false(inputEventFired); + assert_false(changeEventFired); +}, 'detached radio should not emit input or change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_false(inputEventFired); + assert_false(changeEventFired); +}, `detached checkbox should not emit input or change events on dispatchEvent(new MouseEvent('click')).`); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_false(inputEventFired); + assert_false(changeEventFired); +}, `detached radio should not emit input or change events on dispatchEvent(new MouseEvent('click')).`); + + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + document.body.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, 'attached checkbox should emit input and change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + document.body.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, 'attached radio should emit input and change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + document.body.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, `attached checkbox should emit input and change events on dispatchEvent(new MouseEvent('click')).`); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + document.body.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, `attached radio should emit input and change events on dispatchEvent(new MouseEvent('click')).`); + + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + const shadowHost = document.createElement('div'); + document.body.appendChild(shadowHost); + const shadowRoot = shadowHost.attachShadow({mode: 'open'}); + shadowRoot.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, 'attached to shadow dom checkbox should emit input and change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + const shadowHost = document.createElement('div'); + document.body.appendChild(shadowHost); + const shadowRoot = shadowHost.attachShadow({mode: 'open'}); + shadowRoot.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.click(); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, 'attached to shadow dom radio should emit input and change events on click().'); + +test(() => { + const input = document.createElement('input'); + input.type = 'checkbox'; + const shadowHost = document.createElement('div'); + document.body.appendChild(shadowHost); + const shadowRoot = shadowHost.attachShadow({mode: 'open'}); + shadowRoot.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, `attached to shadow dom checkbox should emit input and change events on dispatchEvent(new MouseEvent('click')).`); + +test(() => { + const input = document.createElement('input'); + input.type = 'radio'; + const shadowHost = document.createElement('div'); + document.body.appendChild(shadowHost); + const shadowRoot = shadowHost.attachShadow({mode: 'open'}); + shadowRoot.appendChild(input); + + let inputEventFired = false; + input.addEventListener('input', () => inputEventFired = true); + let changeEventFired = false; + input.addEventListener('change', () => changeEventFired = true); + input.dispatchEvent(new MouseEvent('click')); + assert_true(inputEventFired); + assert_true(changeEventFired); +}, `attached to shadow dom radio should emit input and change events on dispatchEvent(new MouseEvent('click')).`); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html new file mode 100644 index 00000000000..ff9e5b64a08 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html @@ -0,0 +1,86 @@ +<!doctype html> +<meta name="timeout" content="long"> +<title>Cross-Origin-Embedder-Policy-Report-Only header does not affect the actual behavior</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/common/utils.js></script> <!-- Use token() to allow running tests in parallel --> +<script src="/common/get-host-info.sub.js"></script> +<div id=log></div> +<script> +const HOST = get_host_info(); +const BASE = new URL("resources", location).pathname; + +async_test(t => { + const frame = document.createElement("iframe"); + t.add_cleanup(() => frame.remove()); + frame.onload = t.step_func_done(() => { + assert_not_equals(frame.contentDocument, null); + }); + frame.src = "/common/blank.html"; + document.body.append(frame); + assert_equals(frame.contentDocument.body.localName, "body"); +}, `"none" top-level: navigating a frame to "none" should succeed`); + +async_test(t => { + const frame = document.createElement("iframe"); + t.add_cleanup(() => frame.remove()); + const blank = "/common/blank.html"; + let firstNavOk = false; + frame.onload = t.step_func(() => { + if (!firstNavOk) { + assert_not_equals(frame.contentDocument, null); + firstNavOk = true; + } else { + assert_not_equals(frame.contentDocument, null); + assert_equals(frame.contentWindow.location.pathname, blank); + t.done(); + } + }); + frame.src = `resources/navigate-require-corp.sub.html?to=${blank}`; + document.body.append(frame); + assert_equals(frame.contentDocument.body.localName, "body"); +}, `"none" top-level: navigating a frame from "require-corp" to "none" should succeed`); + +async_test(t => { + const w = window.open(`resources/navigate-none.sub.html?to=navigate-require-corp.sub.html`, "window_name"); + t.add_cleanup(() => w.close()); + + w.onload = t.step_func(() => { + w.history.back(); + t.step_timeout(() => { + assert_not_equals(w.document, null); + t.done(); + }, 1500); + }); +}, `"none" top-level: navigating a frame back from "require-corp" should succeed`); + +async_test(t => { + let pageLoaded = false; + const bc = new BroadcastChannel(token()); + let finished = false; + let doneCheck = _ => { + if (finished && pageLoaded) { + t.done(); + } + } + bc.onmessage = t.step_func((event) => { + pageLoaded = true; + let payload = event.data; + assert_equals(payload, "loaded"); + + doneCheck(); + }); + + const bc2 = new BroadcastChannel(token()); + bc2.onmessage = t.step_func((event) => { + finished = true; + let payload = event.data; + assert_equals(payload, "loaded"); + + doneCheck(); + }); + + const win = window.open(`resources/navigate-require-corp.sub.html?channelName=${bc.name}&to=navigate-none.sub.html?channelName=${bc2.name}`, "_blank", "noopener"); + assert_equals(win, null); +}, `"require-corp" top-level noopener popup: navigating to "none" should succeed`); +</script> diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html.headers b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html.headers new file mode 100644 index 00000000000..289659a41fd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https.html.headers @@ -0,0 +1 @@ +cross-origin-embedder-policy-report-only: require-corp diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting.https.html new file mode 100644 index 00000000000..3a0aebe49a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting.https.html @@ -0,0 +1,68 @@ +<!doctype html> +<html> +<html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script> +const HOST = get_host_info(); +function getIframeUrl(filename, token1, token2) { + let query = `template=${filename}`; + if (token1) { + query += `&coep=${token1}` + } + if (token2) { + query += `&coep-report-only=${token2}` + } + return `resources/reporting-iframe.py?${query}`; +} + +function checkReports(reports, contextUrl) { + assert_not_equals(reports, null); + assert_equals(reports.length, 2); + assert_equals(reports[0].type, 'coep'); + assert_equals(reports[0].url, contextUrl); + assert_equals(reports[0].body.type, 'corp'); + assert_equals(reports[1].type, 'coep'); + assert_equals(reports[1].url, contextUrl); + assert_equals(reports[1].body.type, 'corp'); + + // The order of the reports is non-deterministic. + const actualBlockedUrls = reports.map((r) => r.body['blocked-url']).sort(); + const expectedBlockedUrls = [ + `${HOST.REMOTE_ORIGIN}/common/text-plain.txt`, + `${HOST.ORIGIN}/common/redirect.py?location=${HOST.REMOTE_ORIGIN}/common/text-plain.txt`, + ]; + assert_array_equals(actualBlockedUrls.sort(), expectedBlockedUrls.sort()); +} + +async_test(async (t) => { + try { + const iframe = document.createElement('iframe'); + t.add_cleanup(() => iframe.remove()); + const token1 = token(); + const token2 = token(); + + iframe.src = `resources/subresource-corp.html?token1=${token1}&token2=${token2}`; + document.body.appendChild(iframe); + + await new Promise(resolve => t.step_timeout(resolve, 3000)); + + const res1 = await fetch(`resources/stash-take.py?key=${token1}`); + const res2 = await fetch(`resources/stash-take.py?key=${token2}`); + + const reports = JSON.parse(await res1.text()); + const reportsForReportOnly = JSON.parse(await res2.text()); + + checkReports(reports, iframe.src); + checkReports(reportsForReportOnly, iframe.src); + + t.done(); + } catch (e) { + t.step(() => { throw e }); + }; +}, 'report-to parameter for COEP and COEP-report-only'); + +</script> diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/report.py b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/report.py new file mode 100644 index 00000000000..8adf3009d08 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/report.py @@ -0,0 +1,19 @@ +import json + + +def main(request, response): + if request.method == 'OPTIONS': + # CORS preflight + response.headers.set('Access-Control-Allow-Origin', '*') + response.headers.set('Access-Control-Allow-Methods', 'POST') + response.headers.set('Access-Control-Allow-Headers', 'content-type') + return '' + + url_dir = '/'.join(request.url_parts.path.split('/')[:-1]) + '/' + key = request.GET.first('key') + reports = request.server.stash.take(key, url_dir) or [] + for report in json.loads(request.body): + reports.append(report) + request.server.stash.put(key, reports, url_dir) + response.headers.set('Access-Control-Allow-Origin', '*') + return 'done' diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/stash-take.py b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/stash-take.py new file mode 100644 index 00000000000..73e0def86ca --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/stash-take.py @@ -0,0 +1,9 @@ +from wptserve.handlers import json_handler + + +@json_handler +def main(request, response): + path = '/'.join(request.url_parts.path.split('/')[:-1]) + '/' + key = request.GET.first('key') + response.headers.set('Access-Control-Allow-Origin', '*') + return request.server.stash.take(key, path) diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html new file mode 100644 index 00000000000..4b029700e0e --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html @@ -0,0 +1,35 @@ +<!doctype html> +<html> +<script src="/common/get-host-info.sub.js"></script> +<script> +const HOST = get_host_info(); +const current = new URL(window.location.href); +const token = current.searchParams.get("token"); + +const cache = 'no-store'; +const mode = 'no-cors'; + +async function run() { + const init = { mode, cache }; + // This is not blocked. + await fetch('/common/text-plain.txt', init); + // This is blocked but not due to COEP. + try { + await fetch('nothing-same-origin-corp.txt', init); + } catch (e) { + } + + try { + await fetch(`${HOST.REMOTE_ORIGIN}/common/text-plain.txt`, init); + } catch (e) { + } + try { + await fetch(`/common/redirect.py?location=${HOST.REMOTE_ORIGIN}/common/text-plain.txt`, init); + } catch (e) { + } +} + +run(); + +</script> +</html> diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html.sub.headers b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html.sub.headers new file mode 100644 index 00000000000..00609991031 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/subresource-corp.html.sub.headers @@ -0,0 +1,4 @@ +cache-control: no-store, no-cache +report-to: { "group": "endpoint", "max_age": 3600, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/html/cross-origin-embedder-policy/resources/report.py?key={{GET[token1]}}" }] }, { "group": "report-only-endpoint", "max_age": 3600, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/html/cross-origin-embedder-policy/resources/report.py?key={{GET[token2]}}" }] } +cross-origin-embedder-policy: require-corp; report-to="endpoint" +cross-origin-embedder-policy-report-only: require-corp; report-to="report-only-endpoint" diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-subframe-detached-crash.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-subframe-detached-crash.html new file mode 100644 index 00000000000..86a290d50db --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-subframe-detached-crash.html @@ -0,0 +1,26 @@ +<!doctype html> +<html class="test-wait"> +<title>Crash when detaching a frame during a lazy-load operation</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1619858"> +<iframe srcdoc=""></iframe> +<script> +onload = function() { + let frame = document.querySelector("iframe"); + frame.contentDocument.body.innerHTML = ` + <div style="height: 300vh"></div> + <img loading="lazy" src="/images/blue96x96.png" width=96 height=96> + `; + let img = frame.contentDocument.querySelector("img"); + new IntersectionObserver(() => { + frame.remove(); + requestAnimationFrame(function() { + requestAnimationFrame(function() { + document.documentElement.className = ""; + }); + }); + }).observe(img); + frame.contentWindow.scrollTo(0, img.getBoundingClientRect().top); +}; +</script> diff --git a/tests/wpt/web-platform-tests/interfaces/origin-policy.idl b/tests/wpt/web-platform-tests/interfaces/origin-policy.idl new file mode 100644 index 00000000000..e48e0632bd8 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/origin-policy.idl @@ -0,0 +1,8 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Origin Policy (https://wicg.github.io/origin-policy/) + +partial interface mixin WindowOrWorkerGlobalScope { + readonly attribute FrozenArray<DOMString> originPolicyIds; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/shape-detection-api.idl b/tests/wpt/web-platform-tests/interfaces/shape-detection-api.idl index 51c996959be..5b1c45a7739 100644 --- a/tests/wpt/web-platform-tests/interfaces/shape-detection-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/shape-detection-api.idl @@ -15,12 +15,9 @@ dictionary FaceDetectorOptions { boolean fastMode; }; -[Exposed=(Window,Worker), - SecureContext, - Serializable] -interface DetectedFace { - [SameObject] readonly attribute DOMRectReadOnly boundingBox; - [SameObject] readonly attribute FrozenArray<Landmark>? landmarks; +dictionary DetectedFace { + required DOMRectReadOnly boundingBox; + required FrozenArray<Landmark>? landmarks; }; dictionary Landmark { @@ -47,14 +44,11 @@ dictionary BarcodeDetectorOptions { sequence<BarcodeFormat> formats; }; -[Exposed=(Window,Worker), - SecureContext, - Serializable] -interface DetectedBarcode { - [SameObject] readonly attribute DOMRectReadOnly boundingBox; - [SameObject] readonly attribute DOMString rawValue; - [SameObject] readonly attribute BarcodeFormat format; - [SameObject] readonly attribute FrozenArray<Point2D> cornerPoints; +dictionary DetectedBarcode { + required DOMRectReadOnly boundingBox; + required DOMString rawValue; + required BarcodeFormat format; + required FrozenArray<Point2D> cornerPoints; }; enum BarcodeFormat { diff --git a/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl b/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl index be58b63b2c3..5442d8b44e6 100644 --- a/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl +++ b/tests/wpt/web-platform-tests/interfaces/trusted-types.tentative.idl @@ -23,7 +23,6 @@ interface TrustedScriptURL { interface TrustedTypePolicyFactory { [Unforgeable] TrustedTypePolicy createPolicy(DOMString policyName, TrustedTypePolicyOptions policyOptions); // All the policy object names that have been created - [Unforgeable] sequence<DOMString> getPolicyNames(); }; [Exposed=(Window, Worker)] diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl index d1a54898b9a..f66b0791cb2 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl @@ -203,7 +203,7 @@ dictionary RTCVideoSourceStats : RTCMediaSourceStats { unsigned long height; unsigned long bitDepth; unsigned long frames; - unsigned long framesPerSecond; + double framesPerSecond; }; dictionary RTCRtpContributingSourceStats : RTCStats { @@ -220,7 +220,7 @@ dictionary RTCPeerConnectionStats : RTCStats { unsigned long dataChannelsAccepted; }; -dictionary RTCRtpTransceiverStats { +dictionary RTCRtpTransceiverStats : RTCStats { DOMString senderId; DOMString receiverId; DOMString mid; @@ -257,7 +257,7 @@ dictionary RTCAudioReceiverStats : RTCAudioHandlerStats { dictionary RTCDataChannelStats : RTCStats { DOMString label; DOMString protocol; - long dataChannelIdentifier; + unsigned short dataChannelIdentifier; DOMString transportId; RTCDataChannelState state; unsigned long messagesSent; @@ -354,95 +354,3 @@ dictionary RTCIceServerStats : RTCStats { unsigned long totalResponsesReceived; double totalRoundTripTime; }; - -dictionary RTCMediaStreamStats : RTCStats { - DOMString streamIdentifier; - sequence<DOMString> trackIds; -}; - -dictionary RTCSenderVideoTrackAttachmentStats : RTCVideoSenderStats { -}; - -dictionary RTCSenderAudioTrackAttachmentStats : RTCAudioSenderStats { -}; - -dictionary RTCReceiverVideoTrackAttachmentStats : RTCVideoReceiverStats {}; - -dictionary RTCReceiverAudioTrackAttachmentStats : RTCAudioReceiverStats {}; - -partial dictionary RTCCodecStats { - DOMString implementation; -}; - -partial dictionary RTCIceCandidateStats { - boolean deleted = false; - boolean isRemote; -}; - -partial dictionary RTCIceCandidatePairStats { - double totalRtt; - double currentRtt; - unsigned long long priority; -}; - -partial dictionary RTCRtpStreamStats { - DOMString mediaType; - double averageRTCPInterval; -}; - -partial dictionary RTCInboundRtpStreamStats { - double fractionLost; -}; - -partial dictionary RTCAudioHandlerStats { - double audioLevel; - double totalAudioEnergy; - double totalSamplesDuration; - boolean voiceActivityFlag; -}; - -partial dictionary RTCAudioSenderStats { - unsigned long long totalSamplesSent; - double echoReturnLoss; - double echoReturnLossEnhancement; -}; - -partial dictionary RTCAudioReceiverStats { - DOMHighResTimeStamp estimatedPlayoutTimestamp; - double jitterBufferDelay; - unsigned long long jitterBufferEmittedCount; - unsigned long long totalSamplesReceived; - unsigned long long concealedSamples; - unsigned long long silentConcealedSamples; - unsigned long long concealmentEvents; - unsigned long long insertedSamplesForDeceleration; - unsigned long long removedSamplesForAcceleration; - double audioLevel; - double totalAudioEnergy; - double totalSamplesDuration; -}; - -partial dictionary RTCVideoHandlerStats { - unsigned long frameWidth; - unsigned long frameHeight; - double framesPerSecond; -}; - -partial dictionary RTCVideoSenderStats { - unsigned long keyFramesSent; - unsigned long framesCaptured; - unsigned long framesSent; - unsigned long hugeFramesSent; -}; - -partial dictionary RTCVideoReceiverStats { - unsigned long keyFramesReceived; - DOMHighResTimeStamp estimatedPlayoutTimestamp; - double jitterBufferDelay; - unsigned long long jitterBufferEmittedCount; - unsigned long framesReceived; - unsigned long framesDecoded; - unsigned long framesDropped; - unsigned long partialFramesLost; - unsigned long fullFramesLost; -}; diff --git a/tests/wpt/web-platform-tests/measure-memory/README.md b/tests/wpt/web-platform-tests/measure-memory/README.md index 641969d932c..953611f9303 100644 --- a/tests/wpt/web-platform-tests/measure-memory/README.md +++ b/tests/wpt/web-platform-tests/measure-memory/README.md @@ -4,5 +4,5 @@ Tests in this directory are for the proposed performance.measureMemory API. This is not yet standardised and browsers should not be expected to pass these tests. -See the explainer at https://github.com/ulan/performance-measure-memory +See the explainer at https://github.com/WICG/performance-measure-memory for more information about the API. diff --git a/tests/wpt/web-platform-tests/measure-memory/measure-memory-cross-origin-iframe.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/measure-memory-cross-origin-iframe.tentative.window.js index 15590560ee9..c8dcbb77edd 100644 --- a/tests/wpt/web-platform-tests/measure-memory/measure-memory-cross-origin-iframe.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/measure-memory-cross-origin-iframe.tentative.window.js @@ -5,12 +5,15 @@ promise_test(async testCase => { const frame = document.createElement("iframe"); - const path = new URL("resources/iframe.sub.html", window.location).pathname; - frame.src = `${CROSS_ORIGIN}${path}`; + const child = getUrl(CROSS_ORIGIN, "resources/child.sub.html"); + const grandchild = getUrl(CROSS_ORIGIN, "resources/grandchild.sub.html"); + frame.src = child; document.body.append(frame); try { let result = await performance.measureMemory(); - checkMeasureMemory(result); + checkMeasureMemory(result, { + allowed: [window.location.href, child] + }); } catch (error) { if (!(error instanceof DOMException)) { throw error; diff --git a/tests/wpt/web-platform-tests/measure-memory/measure-memory-same-origin-iframe.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/measure-memory-same-origin-iframe.tentative.window.js index 519ed85864d..24700e51c24 100644 --- a/tests/wpt/web-platform-tests/measure-memory/measure-memory-same-origin-iframe.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/measure-memory-same-origin-iframe.tentative.window.js @@ -5,12 +5,15 @@ promise_test(async testCase => { const frame = document.createElement("iframe"); - const path = new URL("resources/iframe.sub.html", window.location).pathname; - frame.src = `${SAME_ORIGIN}${path}`; + const child = getUrl(SAME_ORIGIN, "resources/child.sub.html"); + const grandchild = getUrl(SAME_ORIGIN, "resources/grandchild.sub.html"); + frame.src = child; document.body.append(frame); try { let result = await performance.measureMemory(); - checkMeasureMemory(result); + checkMeasureMemory(result, { + allowed: [window.location.href, child, grandchild], + }); } catch (error) { if (!(error instanceof DOMException)) { throw error; diff --git a/tests/wpt/web-platform-tests/measure-memory/measure-memory.tentative.any.js b/tests/wpt/web-platform-tests/measure-memory/measure-memory.tentative.window.js index 22ec66c3460..0c595eda73a 100644 --- a/tests/wpt/web-platform-tests/measure-memory/measure-memory.tentative.any.js +++ b/tests/wpt/web-platform-tests/measure-memory/measure-memory.tentative.window.js @@ -6,7 +6,7 @@ promise_test(async testCase => { try { let result = await performance.measureMemory(); - checkMeasureMemory(result); + checkMeasureMemory(result, {allowed: [window.location.href]}); } catch (error) { if (!(error instanceof DOMException)) { throw error; diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/child.sub.html b/tests/wpt/web-platform-tests/measure-memory/resources/child.sub.html new file mode 100644 index 00000000000..f52b5eefbc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/child.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<html> +<body> + Hello from child iframe. + <iframe src="grandchild.sub.html"></iframe> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/common.js b/tests/wpt/web-platform-tests/measure-memory/resources/common.js index 36df1d8c155..92ff11b35b1 100644 --- a/tests/wpt/web-platform-tests/measure-memory/resources/common.js +++ b/tests/wpt/web-platform-tests/measure-memory/resources/common.js @@ -1,27 +1,33 @@ const SAME_ORIGIN = {origin: get_host_info().HTTPS_ORIGIN, name: "SAME_ORIGIN"}; const CROSS_ORIGIN = {origin: get_host_info().HTTPS_NOTSAMESITE_ORIGIN, name: "CROSS_ORIGIN"} -function checkMeasureMemoryBreakdown(breakdown) { +function checkMeasureMemoryBreakdown(breakdown, options) { + let allowed = new Set(options.allowed); assert_own_property(breakdown, 'bytes'); assert_greater_than_equal(breakdown.bytes, 0); - assert_own_property(breakdown, 'globals'); - assert_greater_than_equal(breakdown.globals, 0); assert_own_property(breakdown, 'type'); assert_equals(typeof breakdown.type, 'string'); - assert_own_property(breakdown, 'origins'); - assert_greater_than_equal(breakdown.origins.length, 1); - for (let origin of breakdown.origins) { - assert_equals(typeof origin, 'string'); + assert_own_property(breakdown, 'attribution'); + for (let attribution of breakdown.attribution) { + assert_equals(typeof attribution, 'string'); + assert_true( + allowed.has(attribution), + `${attribution} must be in ${JSON.stringify(options.allowed)}`); } } -function checkMeasureMemory(result) { +function checkMeasureMemory(result, options) { assert_own_property(result, 'bytes'); assert_own_property(result, 'breakdown'); let bytes = 0; for (let breakdown of result.breakdown) { - checkMeasureMemoryBreakdown(breakdown); + checkMeasureMemoryBreakdown(breakdown, options); bytes += breakdown.bytes; } assert_equals(bytes, result.bytes); +} + +function getUrl(host, relativePath) { + const path = new URL(relativePath, window.location).pathname; + return `${host.origin}/${path}`; }
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/iframe.sub.html b/tests/wpt/web-platform-tests/measure-memory/resources/grandchild.sub.html index b1a476cff2e..98522e0649e 100644 --- a/tests/wpt/web-platform-tests/measure-memory/resources/iframe.sub.html +++ b/tests/wpt/web-platform-tests/measure-memory/resources/grandchild.sub.html @@ -2,6 +2,6 @@ <meta charset=utf-8> <html> <body> - Hello from iframe. + Hello from grandchild iframe. </body> </html> diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/spec_json.js b/tests/wpt/web-platform-tests/mixed-content/generic/spec_json.js index af9cf72857e..c36a535f453 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/spec_json.js +++ b/tests/wpt/web-platform-tests/mixed-content/generic/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Mixed-Content: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Mixed-Content: %(title)s", "specification": [{"name": "optionally-blockable", "title": "Optionally-blockable content", "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "test_expansion": [{"name": "opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "*", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "opt-in-blocks-redirects", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "swap-scheme", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["same-https", "cross-https"], "expectation": "blocked"}, {"name": "no-opt-in-allows", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["cross-http", "same-http"], "expectation": "allowed"}]}, {"name": "blockable", "title": "Blockable content", "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "test_expansion": [{"name": "opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "*", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "opt-in-blocks-redirects", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "swap-scheme", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["same-https", "cross-https"], "expectation": "blocked"}, {"name": "no-opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "ws-downgrade-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["cross-ws", "same-ws"], "expectation": "blocked"}]}, {"name": "allowed", "title": "Allowed content", "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "test_expansion": [{"name": "allowed", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["no-redirect", "keep-scheme"], "subresource": "*", "origin": ["same-https"], "expectation": "allowed"}, {"name": "websocket-allowed", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["no-redirect", "keep-scheme"], "subresource": "websocket", "origin": ["same-wss"], "expectation": "allowed"}]}], "delivery_key": "mixedContent", "excluded_tests": [{"name": "Skip-redundant-no-opt-in", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "http-rp", "delivery_value": null, "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "Redundant-subresources", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "a-tag", "origin": "*", "expectation": "*"}, {"name": "Skip-origins-not-applicable-to-websockets", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["same-https", "same-http", "cross-https", "cross-http"], "expectation": "*"}, {"name": "Websockets are no-redirect only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-scheme", "swap-scheme"], "subresource": "websocket", "origin": "*", "expectation": "*"}, {"name": "Skip-redundant-for-opt-in-method", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "meta", "delivery_value": "opt-in", "redirection": ["keep-scheme", "swap-scheme"], "subresource": "*", "origin": "*", "expectation": "*"}], "source_context_schema": {"supported_delivery_type": {"top": ["http-rp", "meta"], "iframe": ["http-rp", "meta"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": [], "sharedworker-classic": ["http-rp"], "sharedworker-module": ["http-rp"], "sharedworker-classic-data": [], "sharedworker-module-data": []}, "supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "websocket"], "worker-module": ["xhr", "fetch", "websocket"], "worker-classic-data": ["xhr", "fetch", "websocket"], "worker-module-data": ["xhr", "fetch", "websocket"], "sharedworker-classic": ["xhr", "fetch", "websocket"], "sharedworker-module": ["xhr", "fetch", "websocket"], "sharedworker-classic-data": ["xhr", "fetch", "websocket"], "sharedworker-module-data": ["xhr", "fetch", "websocket"]}}, "subresource_schema": {"supported_delivery_type": {"script-tag": [], "link-css-tag": [], "xhr": [], "worker-classic": [], "worker-module": [], "worker-import-data": [], "sharedworker-classic": [], "sharedworker-module": [], "sharedworker-import-data": [], "worklet-animation": [], "worklet-audio": [], "worklet-layout": [], "worklet-paint": [], "worklet-animation-import-data": [], "worklet-audio-import-data": [], "worklet-layout-import-data": [], "worklet-paint-import-data": [], "fetch": [], "a-tag": [], "object-tag": [], "picture-tag": [], "websocket": [], "link-prefetch-tag": [], "beacon": [], "img-tag": [], "audio-tag": [], "video-tag": []}}, "source_context_list_schema": {"top": {"description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "worker-module-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-classic-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-module-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "source_scheme": ["http", "https"], "delivery_type": ["http-rp", "meta"], "delivery_value": [null, "opt-in"], "source_context_list": ["top", "worker-classic-data", "worker-module-data", "sharedworker-classic-data", "sharedworker-module-data"], "redirection": ["no-redirect", "keep-scheme", "swap-scheme"], "origin": ["same-https", "same-http", "cross-https", "cross-http", "same-wss", "same-ws", "cross-wss", "cross-ws"], "subresource": ["script-tag", "link-css-tag", "xhr", "worker-classic", "worker-module", "worker-import-data", "sharedworker-classic", "sharedworker-module", "sharedworker-import-data", "worklet-animation", "worklet-audio", "worklet-layout", "worklet-paint", "worklet-animation-import-data", "worklet-audio-import-data", "worklet-layout-import-data", "worklet-paint-import-data", "fetch", "a-tag", "object-tag", "picture-tag", "websocket", "link-prefetch-tag", "beacon", "img-tag", "audio-tag", "video-tag"], "expectation": ["allowed", "blocked"]}}; +var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "excluded_tests": [{"name": "Workers are same-origin only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": ["cross-https", "cross-http", "cross-http-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Workers are same-origin only (redirects)", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["swap-origin", "swap-scheme"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": "*", "expectation": "*"}, {"name": "Websockets are ws/wss-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade"], "expectation": "*"}, {"name": "Websockets are no-redirect only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "subresource": "websocket", "origin": "*", "expectation": "*"}, {"name": "ws/wss are websocket-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["area-tag", "a-tag", "fetch", "iframe-tag", "img-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Skip-redundant-no-opt-in", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "http-rp", "delivery_value": null, "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "Skip-redundant-for-opt-in-method", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "meta", "delivery_value": "opt-in", "redirection": ["keep-scheme", "swap-scheme"], "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "source_context_list values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": ["req", "srcdoc-inherit", "srcdoc", "iframe", "iframe-blank-inherit", "worker-classic", "worker-module"], "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "subresource values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["a-tag", "area-tag", "iframe-tag"], "origin": "*", "expectation": "*"}, {"name": "redirections that mixed-content tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin", "downgrade"], "origin": "*", "subresource": "*", "expectation": "*"}], "source_context_schema": {"supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-module": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-classic-data": ["xhr", "fetch", "websocket"], "worker-module-data": ["xhr", "fetch", "websocket"], "sharedworker-classic": ["xhr", "fetch", "websocket"], "sharedworker-module": ["xhr", "fetch", "websocket"], "sharedworker-classic-data": ["xhr", "fetch", "websocket"], "sharedworker-module-data": ["xhr", "fetch", "websocket"]}, "supported_delivery_type": {"top": ["http-rp", "meta"], "iframe": ["http-rp", "meta"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": [], "sharedworker-classic": ["http-rp"], "sharedworker-module": ["http-rp"], "sharedworker-classic-data": [], "sharedworker-module-data": []}}, "source_context_list_schema": {"top": {"description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "req": {"description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}], "subresourcePolicyDeliveries": ["nonNullPolicy"]}, "srcdoc-inherit": {"description": "srcdoc iframe without its own policy should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}], "subresourcePolicyDeliveries": []}, "srcdoc": {"description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}], "subresourcePolicyDeliveries": []}, "iframe": {"description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "iframe-blank-inherit": {"description": "blank iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "iframe-blank"}], "subresourcePolicyDeliveries": []}, "worker-classic": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "worker-module": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-module-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-classic-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-module-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "source_scheme": ["http", "https"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "iframe-blank-inherit", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data", "sharedworker-classic-data", "sharedworker-module-data"], "redirection": ["no-redirect", "keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade", "same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "subresource": ["a-tag", "area-tag", "audio-tag", "beacon", "fetch", "iframe-tag", "img-tag", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "video-tag", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "delivery_type": ["http-rp", "meta"], "delivery_value": [null, "opt-in"], "expectation": ["allowed", "blocked"]}, "test_description_template": "Mixed-Content: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Mixed-Content: %(title)s", "specification": [{"name": "optionally-blockable", "title": "Optionally-blockable content", "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "test_expansion": [{"name": "opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "*", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "opt-in-blocks-redirects", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "swap-scheme", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["same-https", "cross-https"], "expectation": "blocked"}, {"name": "no-opt-in-allows", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "subresource": ["audio-tag", "img-tag", "video-tag"], "origin": ["cross-http", "same-http"], "expectation": "allowed"}]}, {"name": "blockable", "title": "Blockable content", "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "test_expansion": [{"name": "opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "*", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "opt-in-blocks-redirects", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "opt-in", "redirection": "swap-scheme", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["same-https", "cross-https"], "expectation": "blocked"}, {"name": "no-opt-in-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "subresource": ["a-tag", "beacon", "fetch", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["cross-http", "same-http"], "expectation": "blocked"}, {"name": "ws-downgrade-blocks", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["cross-ws", "same-ws"], "expectation": "blocked"}]}, {"name": "allowed", "title": "Allowed content", "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "test_expansion": [{"name": "allowed", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["no-redirect", "keep-scheme"], "subresource": "*", "origin": ["same-https"], "expectation": "allowed"}, {"name": "websocket-allowed", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["no-redirect", "keep-scheme"], "subresource": "websocket", "origin": ["same-wss"], "expectation": "allowed"}]}], "delivery_key": "mixedContent", "subresource_schema": {"supported_delivery_type": {"a-tag": [], "area-tag": [], "audio-tag": [], "beacon": [], "fetch": [], "iframe-tag": [], "img-tag": [], "link-css-tag": [], "link-prefetch-tag": [], "object-tag": [], "picture-tag": [], "script-tag": [], "sharedworker-classic": [], "sharedworker-import-data": [], "sharedworker-module": [], "video-tag": [], "websocket": [], "worker-classic": [], "worker-import-data": [], "worker-module": [], "worklet-animation": [], "worklet-animation-import-data": [], "worklet-audio": [], "worklet-audio-import-data": [], "worklet-layout": [], "worklet-layout-import-data": [], "worklet-paint": [], "worklet-paint-import-data": [], "xhr": []}}}; diff --git a/tests/wpt/web-platform-tests/mixed-content/spec.src.json b/tests/wpt/web-platform-tests/mixed-content/spec.src.json index 547dc975040..16843700da8 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec.src.json +++ b/tests/wpt/web-platform-tests/mixed-content/spec.src.json @@ -1,6 +1,4 @@ { - "selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", - "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Mixed-Content: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Mixed-Content: %(title)s", "specification": [ @@ -270,64 +268,72 @@ "expectation": "*" }, { - "name": "Redundant-subresources", + "name": "Skip-redundant-for-opt-in-method", "expansion": "*", "source_scheme": "*", "source_context_list": "*", - "delivery_type": "*", - "delivery_value": "*", - "redirection": "*", - "subresource": "a-tag", + "delivery_type": "meta", + "delivery_value": "opt-in", + "redirection": [ + "keep-scheme", + "swap-scheme" + ], + "subresource": "*", "origin": "*", "expectation": "*" }, { - "name": "Skip-origins-not-applicable-to-websockets", + "name": "source_context_list values not yet tested", "expansion": "*", "source_scheme": "*", - "source_context_list": "*", + "source_context_list": [ + "req", + "srcdoc-inherit", + "srcdoc", + "iframe", + "iframe-blank-inherit", + "worker-classic", + "worker-module", + ], "delivery_type": "*", "delivery_value": "*", "redirection": "*", - "subresource": "websocket", - "origin": [ - "same-https", - "same-http", - "cross-https", - "cross-http" - ], + "subresource": "*", + "origin": "*", "expectation": "*" }, { - "name": "Websockets are no-redirect only", + "name": "subresource values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", - "redirection": [ - "keep-scheme", - "swap-scheme" + "redirection": "*", + "subresource": [ + "a-tag", + "area-tag", + "iframe-tag", ], - "subresource": "websocket", "origin": "*", "expectation": "*" }, { - "name": "Skip-redundant-for-opt-in-method", + "name": "redirections that mixed-content tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", - "delivery_type": "meta", - "delivery_value": "opt-in", + "delivery_type": "*", + "delivery_value": "*", "redirection": [ - "keep-scheme", - "swap-scheme" + "keep-origin", + "swap-origin", + "downgrade" ], - "subresource": "*", "origin": "*", + "subresource": "*", "expectation": "*" - } + }, ], "source_context_schema": { "supported_delivery_type": { @@ -361,168 +367,42 @@ ], "sharedworker-classic-data": [], "sharedworker-module-data": [] - }, - "supported_subresource": { - "top": "*", - "iframe": "*", - "iframe-blank": "*", - "srcdoc": "*", - "worker-classic": [ - "xhr", - "fetch", - "websocket" - ], - "worker-module": [ - "xhr", - "fetch", - "websocket" - ], - "worker-classic-data": [ - "xhr", - "fetch", - "websocket" - ], - "worker-module-data": [ - "xhr", - "fetch", - "websocket" - ], - "sharedworker-classic": [ - "xhr", - "fetch", - "websocket" - ], - "sharedworker-module": [ - "xhr", - "fetch", - "websocket" - ], - "sharedworker-classic-data": [ - "xhr", - "fetch", - "websocket" - ], - "sharedworker-module-data": [ - "xhr", - "fetch", - "websocket" - ] } }, "subresource_schema": { "supported_delivery_type": { - "script-tag": [], + "a-tag": [], + "area-tag": [], + "audio-tag": [], + "beacon": [], + "fetch": [], + "iframe-tag": [], + "img-tag": [], "link-css-tag": [], - "xhr": [], - "worker-classic": [], - "worker-module": [], - "worker-import-data": [], + "link-prefetch-tag": [], + "object-tag": [], + "picture-tag": [], + "script-tag": [], "sharedworker-classic": [], - "sharedworker-module": [], "sharedworker-import-data": [], + "sharedworker-module": [], + "video-tag": [], + "websocket": [], + "worker-classic": [], + "worker-import-data": [], + "worker-module": [], "worklet-animation": [], - "worklet-audio": [], - "worklet-layout": [], - "worklet-paint": [], "worklet-animation-import-data": [], + "worklet-audio": [], "worklet-audio-import-data": [], + "worklet-layout": [], "worklet-layout-import-data": [], + "worklet-paint": [], "worklet-paint-import-data": [], - "fetch": [], - "a-tag": [], - "object-tag": [], - "picture-tag": [], - "websocket": [], - "link-prefetch-tag": [], - "beacon": [], - "img-tag": [], - "audio-tag": [], - "video-tag": [] - } - }, - "source_context_list_schema": { - "top": { - "description": "Policy set by the top-level Document", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "worker-classic-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "worker-classic-data", - "policyDeliveries": [] - } - ], - "subresourcePolicyDeliveries": [] - }, - "worker-module-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "worker-module-data", - "policyDeliveries": [] - } - ], - "subresourcePolicyDeliveries": [] - }, - "sharedworker-classic-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "sharedworker-classic-data", - "policyDeliveries": [] - } - ], - "subresourcePolicyDeliveries": [] - }, - "sharedworker-module-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "sharedworker-module-data", - "policyDeliveries": [] - } - ], - "subresourcePolicyDeliveries": [] + "xhr": [] } }, "test_expansion_schema": { - "expansion": [ - "default", - "override" - ], - "source_scheme": [ - "http", - "https" - ], "delivery_type": [ "http-rp", "meta" @@ -531,57 +411,6 @@ null, "opt-in" ], - "source_context_list": [ - "top", - "worker-classic-data", - "worker-module-data", - "sharedworker-classic-data", - "sharedworker-module-data" - ], - "redirection": [ - "no-redirect", - "keep-scheme", - "swap-scheme" - ], - "origin": [ - "same-https", - "same-http", - "cross-https", - "cross-http", - "same-wss", - "same-ws", - "cross-wss", - "cross-ws" - ], - "subresource": [ - "script-tag", - "link-css-tag", - "xhr", - "worker-classic", - "worker-module", - "worker-import-data", - "sharedworker-classic", - "sharedworker-module", - "sharedworker-import-data", - "worklet-animation", - "worklet-audio", - "worklet-layout", - "worklet-paint", - "worklet-animation-import-data", - "worklet-audio-import-data", - "worklet-layout-import-data", - "worklet-paint-import-data", - "fetch", - "a-tag", - "object-tag", - "picture-tag", - "websocket", - "link-prefetch-tag", - "beacon", - "img-tag", - "audio-tag", - "video-tag" - ], "expectation": [ "allowed", "blocked" diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-not-lost-in-chorded-buttons.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-not-lost-in-chorded-buttons.html new file mode 100644 index 00000000000..02a6af0a4b8 --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-not-lost-in-chorded-buttons.html @@ -0,0 +1,225 @@ +<!doctype html> +<html> + <head> + <title>Set/Release capture when using chorded buttons</title> + <meta name="viewport" content="width=device-width"> + <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1053385"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + + <style> + .container { + height: 500px; + width: 500px; + border: 1px solid black; + overflow: hidden; + position: relative; + } + + #box { + height: 50px; + width: 50px; + background: red; + position: absolute; + } + </style> + </head> + <body> + <h1>Pointer Events Capture Test - capture should not be lost early</h1> + <h4> + Test Description: This test checks if setCapture/pointerup functions + works properly. Complete the following actions: + <ol> + <li> Put your mouse over the red box + <li> Press and hold left mouse button. Box will call setPointerCapture + <li> Press right button and release + <li> Pointer capture should not be lost + <li> Press right button again and release + <li> Pointer capture should not be lost + <li> Release left mouse button. lostpointercapture is called + </ol> + </h4> + Test passes if the proper behavior of the events is observed. + <div class="container"> + <div id="box"></div> + </div> + <div id="log"></div> + </body> + <script> + var PhaseEnum = { + WaitingForDown: "down", + WaitingForUp: "up", + UpDone : "up_done" + }; + + var origin = {x:0, y:0}; + var position = {x:0, y:0}; + var deltaX = 0; + var deltaY = 0; + var box = document.getElementById("box"); + var logDiv = document.getElementById("log"); + + var currentPhase = PhaseEnum.WaitingForDown; + var events = []; + + function slide(event){ + // move the target following the mouse + deltaX = event.clientX - origin.x + deltaY = event.clientY - origin.y + box.style.left = `${position.x + deltaX}px`; + box.style.top = `${position.y + deltaY}px`; + } + + function addLog(message){ + var messageDiv = document.createElement("div"); + var textContent = document.createTextNode(message); + messageDiv.appendChild(textContent); + logDiv.appendChild(messageDiv); + } + + function handle_pointerdown(e){ + box.setPointerCapture(e.pointerId); + if(window.promise_test){ + current_test.step(function(){ + // once receiving a pointer down and the pointer is captured, + // no other mousedown should send pointerdown events during the test + assert_true(currentPhase === PhaseEnum.WaitingForDown, + "Current Phase should be " + PhaseEnum.WaitingForDown); + currentPhase = PhaseEnum.WaitingForUp; + events.push("target@pointerdown"); + }); + } + origin = { x: event.clientX, y: event.clientY }; + box.addEventListener("pointermove", slide); + } + + function handle_pointerup(e){ + box.releasePointerCapture(e.pointerId); + if(window.promise_test){ + current_test.step(function(){ + assert_true(event.buttons === 0, + 'pointerup should happen when all buttons are released.'); + assert_true(currentPhase === PhaseEnum.WaitingForUp, + "Current Phase should be " + PhaseEnum.WaitingForUp); + currentPhase = PhaseEnum.UpDone; + events.push("target@pointerup"); + }); + } + box.removeEventListener("pointermove", slide); + } + + function handle_contextmenu(e){ + e.preventDefault(); + } + + function handle_lostpointercapture(e){ + if(window.promise_test){ + current_test.step(function(){ + events.push("target@lostpointercapture"); + assert_true(currentPhase === PhaseEnum.UpDone, + "Current Phase should be " + PhaseEnum.UpDone + "." + + 'lostpointercapture should happen after pointerup event.'); + assert_true(event.buttons === 0, + 'lostpointercapture should happen when all buttons are released.'); + assert_array_equals(events, ["target@pointerdown", + "target@pointerup", "target@lostpointercapture"]); + resolve_test(); + current_test.done(); + }); + } + if(event.buttons === 0){ + addLog("Test Passed!"); + }else{ + addLog("Test Failed!"); + } + } + + function removeEventListeners(){ + box.removeEventListener('pointerdown', handle_pointerdown); + box.removeEventListener('pointerup', handle_pointerup); + box.removeEventListener('contextmenu', handle_contextmenu); + box.removeEventListener('lostpointercapture', + handle_lostpointercapture); + } + + function addEventListeners(){ + box.addEventListener('pointerdown', handle_pointerdown); + box.addEventListener('pointerup', handle_pointerup); + box.addEventListener('contextmenu', handle_contextmenu); + box.addEventListener('lostpointercapture', + handle_lostpointercapture); + } + + var current_test = null; + var resolve_test = null; + var reject_test = null; + // window.promise_test is only defined when running the + // test using testharness.js + // if window.promise_test is not defined we'll run the manual testing + // path + if(!window.promise_test){ + addEventListeners(); + } + + if(window.promise_test){ + promise_test(function(t){ + addEventListeners(); + t.add_cleanup(function(){ + removeEventListeners(); + currentPhase = PhaseEnum.WaitingForDown; + events = []; + }); + return new Promise(function(resolve, reject){ + current_test = t; + resolve_test = resolve; + reject_test = reject; + var actions = new test_driver.Actions(); + var actions_promise = actions + .pointerMove(0, 0, {origin: box}) + + .pointerDown({button: actions.ButtonType.LEFT}) + // Ensure clicking other buttons while a first button has + // captured the pointer doesn't release the capture + .pointerDown({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.RIGHT}) + .pointerDown({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.LEFT}) + .send(); + }) + }, "Pointer Events Capture Test - capture not lost due to " + + "chorded buttons interaction"); + + promise_test(function(t){ + addEventListeners(); + t.add_cleanup(function(){ + removeEventListeners(); + currentPhase = PhaseEnum.WaitingForDown; + events = []; + }); + return new Promise(function(resolve, reject){ + current_test = t; + resolve_test = resolve; + reject_test = reject; + var actions = new test_driver.Actions(); + var actions_promise = actions + .pointerMove(0, 0, {origin: box}) + + .pointerDown({button: actions.ButtonType.LEFT}) + // Ensure clicking other buttons while a first button has + // captured the pointer doesn't release the capture + .pointerDown({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.LEFT}) + .pointerDown({button: actions.ButtonType.LEFT}) + .pointerUp({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.LEFT}) + .send(); + }) + }, "Pointer Events Capture Test - capture not lost " + + "due to combination of left and right chorded buttons interaction."); + } + </script> +</html> diff --git a/tests/wpt/web-platform-tests/referrer-policy/generic/spec_json.js b/tests/wpt/web-platform-tests/referrer-policy/generic/spec_json.js index a8b723d5a98..fbe59a2cc9c 100644 --- a/tests/wpt/web-platform-tests/referrer-policy/generic/spec_json.js +++ b/tests/wpt/web-platform-tests/referrer-policy/generic/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Referrer Policy: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Referrer-Policy: %(title)s", "specification": [{"name": "unset-referrer-policy", "title": "Referrer Policy is not explicitly defined", "description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}]}, {"name": "no-referrer", "title": "Referrer Policy is set to 'no-referrer'", "description": "Check that sub-resource never gets the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "omitted"}]}, {"name": "no-referrer-when-downgrade", "title": "Referrer Policy is set to 'no-referrer-when-downgrade'", "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}]}, {"name": "origin", "title": "Referrer Policy is set to 'origin'", "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "origin"}]}, {"name": "same-origin", "title": "Referrer Policy is set to 'same-origin'", "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin", "test_expansion": [{"name": "same-origin-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-secure-default", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-insecure", "expansion": "override", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "swap-origin", "origin": ["same-http", "same-https"], "subresource": "*", "expectation": "omitted"}, {"name": "cross-origin", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": ["cross-http", "cross-https"], "subresource": "*", "expectation": "omitted"}]}, {"name": "origin-when-cross-origin", "title": "Referrer Policy is set to 'origin-when-cross-origin'", "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin", "test_expansion": [{"name": "same-origin-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-secure-default", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-upgrade", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "origin"}, {"name": "same-origin-downgrade", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "origin"}, {"name": "same-origin-insecure", "expansion": "override", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "swap-origin", "origin": ["same-http", "same-https"], "subresource": "*", "expectation": "origin"}, {"name": "cross-origin", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": ["cross-http", "cross-https"], "subresource": "*", "expectation": "origin"}]}, {"name": "strict-origin", "title": "Referrer Policy is set to 'strict-origin'", "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "origin"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}]}, {"name": "strict-origin-when-cross-origin", "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'", "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin", "test_expansion": [{"name": "same-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-insecure", "expansion": "override", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "swap-origin", "origin": "same-http", "subresource": "*", "expectation": "origin"}, {"name": "cross-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "cross-http", "subresource": "*", "expectation": "origin"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "same-secure", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-secure", "expansion": "override", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "swap-origin", "origin": "same-https", "subresource": "*", "expectation": "origin"}, {"name": "cross-secure", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "cross-https", "subresource": "*", "expectation": "origin"}]}, {"name": "unsafe-url", "title": "Referrer Policy is set to 'unsafe-url'", "description": "Check that all sub-resources get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "unsafe-url", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "stripped-referrer"}]}], "delivery_key": "referrerPolicy", "excluded_tests": [{"name": "cross-origin-workers", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "redirection": "*", "delivery_type": "*", "delivery_value": "*", "origin": ["cross-http", "cross-https"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "expectation": "*"}, {"name": "upgraded-protocol-workers", "expansion": "*", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "expectation": "*"}, {"name": "mixed-content-insecure-subresources", "expansion": "*", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "*"}, {"name": "area-tag", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": "*", "subresource": "area-tag", "expectation": "*"}, {"name": "worker-requests-with-swap-origin-redirect", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "swap-origin", "origin": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "expectation": "*"}, {"name": "overhead-for-redirection", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin"], "origin": "*", "subresource": ["a-tag", "area-tag"], "expectation": "*"}, {"name": "source-https-unsupported-by-web-platform-tests-runners", "expansion": "*", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "*"}, {"name": "<link rel=noreferrer>'s delivery_value should be no-referrer", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "rel-noref", "delivery_value": [null, "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "redirection": "*", "origin": "*", "subresource": "*", "expectation": "*"}], "source_context_schema": {"supported_delivery_type": {"top": ["meta", "http-rp"], "iframe": ["meta", "http-rp"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": []}, "supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "worker-classic", "worker-module"], "worker-module": ["xhr", "fetch", "worker-classic", "worker-module"], "worker-classic-data": ["xhr", "fetch"], "worker-module-data": ["xhr", "fetch"]}}, "subresource_schema": {"supported_delivery_type": {"iframe-tag": ["attr"], "img-tag": ["attr"], "script-tag": ["attr"], "a-tag": ["attr", "rel-noref"], "area-tag": ["attr"], "xhr": [], "fetch": [], "sharedworker-module": [], "worker-module": [], "sharedworker-classic": [], "worker-classic": []}}, "source_context_list_schema": {"top": {"description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "req": {"description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}], "subresourcePolicyDeliveries": ["nonNullPolicy"]}, "srcdoc-inherit": {"description": "srcdoc iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}], "subresourcePolicyDeliveries": []}, "srcdoc": {"description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}], "subresourcePolicyDeliveries": []}, "iframe": {"description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-module": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-module-data": {"sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "delivery_type": ["attr", "rel-noref", "http-rp", "meta"], "delivery_value": [null, "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "origin": ["same-http", "same-https", "cross-http", "cross-https"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data"], "source_scheme": ["http", "https"], "redirection": ["no-redirect", "keep-origin", "swap-origin"], "subresource": ["iframe-tag", "img-tag", "script-tag", "a-tag", "area-tag", "xhr", "worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module", "fetch"], "expectation": ["omitted", "origin", "stripped-referrer"]}}; +var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "excluded_tests": [{"name": "Workers are same-origin only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": ["cross-https", "cross-http", "cross-http-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Workers are same-origin only (redirects)", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["swap-origin", "swap-scheme"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": "*", "expectation": "*"}, {"name": "Websockets are ws/wss-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade"], "expectation": "*"}, {"name": "Websockets are no-redirect only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "subresource": "websocket", "origin": "*", "expectation": "*"}, {"name": "ws/wss are websocket-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["area-tag", "a-tag", "fetch", "iframe-tag", "img-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "upgraded-protocol-workers", "expansion": "*", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "expectation": "*"}, {"name": "mixed-content-insecure-subresources", "expansion": "*", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-http", "same-http-downgrade", "cross-http", "cross-http-downgrade", "same-ws", "same-ws-downgrade", "cross-ws", "cross-ws-downgrade"], "subresource": "*", "expectation": "*"}, {"name": "overhead-for-redirection", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin"], "origin": "*", "subresource": ["a-tag", "area-tag"], "expectation": "*"}, {"name": "source-https-unsupported-by-web-platform-tests-runners", "expansion": "*", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "*"}, {"name": "<link rel=noreferrer>'s delivery_value should be no-referrer", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "rel-noref", "delivery_value": [null, "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "redirection": "*", "origin": "*", "subresource": "*", "expectation": "*"}, {"name": "redirections that referrer-policy tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-scheme", "swap-scheme", "downgrade"], "origin": "*", "subresource": "*", "expectation": "*"}, {"name": "origins that referrer-policy tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-http-downgrade", "cross-http-downgrade", "same-ws-downgrade", "cross-ws-downgrade"], "subresource": "*", "expectation": "*"}, {"name": "subresource values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["area-tag", "audio-tag", "beacon", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "sharedworker-import-data", "video-tag", "websocket", "worker-import-data", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data"], "origin": "*", "expectation": "*"}, {"name": "source_context_list values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": ["iframe-blank-inherit", "sharedworker-classic-data", "sharedworker-module-data", "worker-classic-data", "worker-module-data"], "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}], "source_context_schema": {"supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-module": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-classic-data": ["xhr", "fetch", "websocket"], "worker-module-data": ["xhr", "fetch", "websocket"], "sharedworker-classic": ["xhr", "fetch", "websocket"], "sharedworker-module": ["xhr", "fetch", "websocket"], "sharedworker-classic-data": ["xhr", "fetch", "websocket"], "sharedworker-module-data": ["xhr", "fetch", "websocket"]}, "supported_delivery_type": {"top": ["meta", "http-rp"], "iframe": ["meta", "http-rp"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": [], "sharedworker-classic": ["http-rp"], "sharedworker-module": ["http-rp"], "sharedworker-classic-data": [], "sharedworker-module-data": []}}, "source_context_list_schema": {"top": {"description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "req": {"description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}], "subresourcePolicyDeliveries": ["nonNullPolicy"]}, "srcdoc-inherit": {"description": "srcdoc iframe without its own policy should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}], "subresourcePolicyDeliveries": []}, "srcdoc": {"description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}], "subresourcePolicyDeliveries": []}, "iframe": {"description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "iframe-blank-inherit": {"description": "blank iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "iframe-blank"}], "subresourcePolicyDeliveries": []}, "worker-classic": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "worker-module": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-module-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-classic-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-module-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "source_scheme": ["http", "https"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "iframe-blank-inherit", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data", "sharedworker-classic-data", "sharedworker-module-data"], "redirection": ["no-redirect", "keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade", "same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "subresource": ["a-tag", "area-tag", "audio-tag", "beacon", "fetch", "iframe-tag", "img-tag", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "video-tag", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "delivery_type": ["attr", "rel-noref", "http-rp", "meta"], "delivery_value": [null, "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "expectation": ["omitted", "origin", "stripped-referrer"]}, "test_description_template": "Referrer Policy: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Referrer-Policy: %(title)s", "specification": [{"name": "unset-referrer-policy", "title": "Referrer Policy is not explicitly defined", "description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": null, "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}]}, {"name": "no-referrer", "title": "Referrer Policy is set to 'no-referrer'", "description": "Check that sub-resource never gets the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "omitted"}]}, {"name": "no-referrer-when-downgrade", "title": "Referrer Policy is set to 'no-referrer-when-downgrade'", "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "no-referrer-when-downgrade", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "stripped-referrer"}]}, {"name": "origin", "title": "Referrer Policy is set to 'origin'", "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "origin"}]}, {"name": "same-origin", "title": "Referrer Policy is set to 'same-origin'", "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin", "test_expansion": [{"name": "same-origin-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-secure-default", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-insecure", "expansion": "override", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "swap-origin", "origin": ["same-http", "same-https"], "subresource": "*", "expectation": "omitted"}, {"name": "cross-origin", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "same-origin", "redirection": "*", "origin": ["cross-http", "cross-https"], "subresource": "*", "expectation": "omitted"}]}, {"name": "origin-when-cross-origin", "title": "Referrer Policy is set to 'origin-when-cross-origin'", "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin", "test_expansion": [{"name": "same-origin-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-secure-default", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-origin-upgrade", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "origin"}, {"name": "same-origin-downgrade", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "origin"}, {"name": "same-origin-insecure", "expansion": "override", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "swap-origin", "origin": ["same-http", "same-https"], "subresource": "*", "expectation": "origin"}, {"name": "cross-origin", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "origin-when-cross-origin", "redirection": "*", "origin": ["cross-http", "cross-https"], "subresource": "*", "expectation": "origin"}]}, {"name": "strict-origin", "title": "Referrer Policy is set to 'strict-origin'", "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin", "test_expansion": [{"name": "insecure-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "origin"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "secure-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}]}, {"name": "strict-origin-when-cross-origin", "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'", "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin", "test_expansion": [{"name": "same-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "same-http", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-insecure", "expansion": "override", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "swap-origin", "origin": "same-http", "subresource": "*", "expectation": "origin"}, {"name": "cross-insecure", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "cross-http", "subresource": "*", "expectation": "origin"}, {"name": "upgrade-protocol", "expansion": "default", "source_scheme": "http", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": ["same-https", "cross-https"], "subresource": "*", "expectation": "origin"}, {"name": "downgrade-protocol", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": ["same-http", "cross-http"], "subresource": "*", "expectation": "omitted"}, {"name": "same-secure", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "same-https", "subresource": "*", "expectation": "stripped-referrer"}, {"name": "same-secure", "expansion": "override", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "swap-origin", "origin": "same-https", "subresource": "*", "expectation": "origin"}, {"name": "cross-secure", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "strict-origin-when-cross-origin", "redirection": "*", "origin": "cross-https", "subresource": "*", "expectation": "origin"}]}, {"name": "unsafe-url", "title": "Referrer Policy is set to 'unsafe-url'", "description": "Check that all sub-resources get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url", "test_expansion": [{"name": "generic", "expansion": "default", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "unsafe-url", "redirection": "*", "origin": "*", "subresource": "*", "expectation": "stripped-referrer"}]}], "delivery_key": "referrerPolicy", "subresource_schema": {"supported_delivery_type": {"a-tag": ["attr", "rel-noref"], "area-tag": ["attr"], "audio-tag": [], "beacon": [], "fetch": [], "iframe-tag": ["attr"], "img-tag": ["attr"], "link-css-tag": [], "link-prefetch-tag": [], "object-tag": [], "picture-tag": [], "script-tag": ["attr"], "sharedworker-classic": [], "sharedworker-import-data": [], "sharedworker-module": [], "video-tag": [], "websocket": [], "worker-classic": [], "worker-import-data": [], "worker-module": [], "worklet-animation": [], "worklet-animation-import-data": [], "worklet-audio": [], "worklet-audio-import-data": [], "worklet-layout": [], "worklet-layout-import-data": [], "worklet-paint": [], "worklet-paint-import-data": [], "xhr": []}}}; diff --git a/tests/wpt/web-platform-tests/referrer-policy/spec.src.json b/tests/wpt/web-platform-tests/referrer-policy/spec.src.json index d32ee80a8d2..9063428647a 100644 --- a/tests/wpt/web-platform-tests/referrer-policy/spec.src.json +++ b/tests/wpt/web-platform-tests/referrer-policy/spec.src.json @@ -1,6 +1,4 @@ { - "selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", - "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Referrer Policy: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Referrer-Policy: %(title)s", "specification": [ @@ -530,26 +528,6 @@ "delivery_key": "referrerPolicy", "excluded_tests": [ { - "name": "cross-origin-workers", - "expansion": "*", - "source_scheme": "*", - "source_context_list": "*", - "redirection": "*", - "delivery_type": "*", - "delivery_value": "*", - "origin": [ - "cross-http", - "cross-https" - ], - "subresource": [ - "worker-classic", - "worker-module", - "sharedworker-classic", - "sharedworker-module" - ], - "expectation": "*" - }, - { "name": "upgraded-protocol-workers", "expansion": "*", "source_scheme": "http", @@ -579,41 +557,18 @@ "redirection": "*", "origin": [ "same-http", - "cross-http" + "same-http-downgrade", + "cross-http", + "cross-http-downgrade", + "same-ws", + "same-ws-downgrade", + "cross-ws", + "cross-ws-downgrade" ], "subresource": "*", "expectation": "*" }, { - "name": "area-tag", - "expansion": "*", - "source_scheme": "*", - "source_context_list": "*", - "delivery_type": "*", - "delivery_value": "*", - "redirection": "*", - "origin": "*", - "subresource": "area-tag", - "expectation": "*" - }, - { - "name": "worker-requests-with-swap-origin-redirect", - "expansion": "*", - "source_scheme": "*", - "source_context_list": "*", - "delivery_type": "*", - "delivery_value": "*", - "redirection": "swap-origin", - "origin": "*", - "subresource": [ - "worker-classic", - "worker-module", - "sharedworker-classic", - "sharedworker-module" - ], - "expectation": "*" - }, - { "name": "overhead-for-redirection", "expansion": "*", "source_scheme": "*", @@ -663,7 +618,90 @@ "origin": "*", "subresource": "*", "expectation": "*" - } + }, + { + "name": "redirections that referrer-policy tests don't care", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": [ + "keep-scheme", + "swap-scheme", + "downgrade" + ], + "origin": "*", + "subresource": "*", + "expectation": "*" + }, + { + "name": "origins that referrer-policy tests don't care", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "origin": [ + "same-http-downgrade", + "cross-http-downgrade", + "same-ws-downgrade", + "cross-ws-downgrade" + ], + "subresource": "*", + "expectation": "*" + }, + { + "name": "subresource values not yet tested", + "expansion": "*", + "source_scheme": "*", + "source_context_list": "*", + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": [ + "area-tag", + "audio-tag", + "beacon", + "link-css-tag", + "link-prefetch-tag", + "object-tag", + "picture-tag", + "sharedworker-import-data", + "video-tag", + "websocket", + "worker-import-data", + "worklet-animation", + "worklet-animation-import-data", + "worklet-audio", + "worklet-audio-import-data", + "worklet-layout", + "worklet-layout-import-data", + "worklet-paint", + "worklet-paint-import-data" + ], + "origin": "*", + "expectation": "*" + }, + { + "name": "source_context_list values not yet tested", + "expansion": "*", + "source_scheme": "*", + "source_context_list": [ + "iframe-blank-inherit", + "sharedworker-classic-data", + "sharedworker-module-data", + "worker-classic-data", + "worker-module-data" + ], + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": "*", + "origin": "*", + "expectation": "*" + }, ], "source_context_schema": { "supported_delivery_type": { @@ -688,46 +726,22 @@ "http-rp" ], "worker-classic-data": [], - "worker-module-data": [] - }, - "supported_subresource": { - "top": "*", - "iframe": "*", - "iframe-blank": "*", - "srcdoc": "*", - "worker-classic": [ - "xhr", - "fetch", - "worker-classic", - "worker-module" - ], - "worker-module": [ - "xhr", - "fetch", - "worker-classic", - "worker-module" + "worker-module-data": [], + "sharedworker-classic": [ + "http-rp" ], - "worker-classic-data": [ - "xhr", - "fetch" + "sharedworker-module": [ + "http-rp" ], - "worker-module-data": [ - "xhr", - "fetch" - ] + "sharedworker-classic-data": [], + "sharedworker-module-data": [] } }, "subresource_schema": { "supported_delivery_type": { - "iframe-tag": [ - "attr" - ], - "img-tag": [ - "attr" - ], - "script-tag": [ - "attr" - ], + // List of elements that support "attr" delivery type can be followed + // from the cross reference of: + // https://html.spec.whatwg.org/C/#referrer-policy-attribute "a-tag": [ "attr", "rel-noref" @@ -735,166 +749,54 @@ "area-tag": [ "attr" ], - "xhr": [], + "audio-tag": [], + "beacon": [], + // Fetch API supports `init["referrerPolicy"]` in `Request`: + // https://fetch.spec.whatwg.org/#dom-request. + // TODO(https://github.com/web-platform-tests/wpt/issues/21815): + // Add support for this. Currently `common.sub.js` doesn't support this. "fetch": [], - "sharedworker-module": [], - "worker-module": [], - "sharedworker-classic": [], - "worker-classic": [] - } - }, - "source_context_list_schema": { - "top": { - "description": "Policy set by the top-level Document", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "req": { - "description": "Subresource request's policy should override Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - } - ], - "subresourcePolicyDeliveries": [ - "nonNullPolicy" - ] - }, - "srcdoc-inherit": { - "description": "srcdoc iframe should inherit parent Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "srcdoc" - } - ], - "subresourcePolicyDeliveries": [] - }, - "srcdoc": { - "description": "srcdoc iframe's policy should override parent Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "srcdoc", - "policyDeliveries": [ - "nonNullPolicy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "iframe": { - "description": "external iframe's policy should override parent Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "iframe", - "policyDeliveries": [ - "policy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "worker-classic": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "worker-classic", - "policyDeliveries": [ - "policy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "worker-classic-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "worker-classic-data", - "policyDeliveries": [ - "policy" - ] - } + "iframe-tag": [ + "attr" ], - "subresourcePolicyDeliveries": [] - }, - "worker-module": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "worker-module", - "policyDeliveries": [ - "policy" - ] - } + "img-tag": [ + "attr" ], - "subresourcePolicyDeliveries": [] - }, - "worker-module-data": { - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "anotherPolicy" - ] - }, - { - "sourceContextType": "worker-module-data", - "policyDeliveries": [ - "policy" - ] - } + // TODO(https://github.com/web-platform-tests/wpt/issues/21815): + // Support "attr" in the following `<link>`-related subresources. + // The current referrrer-policy test helper doesn't support + // checking referrer results via <link> elements. + "link-css-tag": [], + "link-prefetch-tag": [], + "object-tag": [], + // `<img>` supports referrerpolicy attribute, + // so `<img>` inside `<picture>` also supports the attribute. + // TODO(https://github.com/web-platform-tests/wpt/issues/21815): + // Support this. + "picture-tag": [], + "script-tag": [ + "attr" ], - "subresourcePolicyDeliveries": [] + "sharedworker-classic": [], + "sharedworker-import-data": [], + "sharedworker-module": [], + "video-tag": [], + "websocket": [], + "worker-classic": [], + "worker-import-data": [], + "worker-module": [], + "worklet-animation": [], + "worklet-animation-import-data": [], + "worklet-audio": [], + "worklet-audio-import-data": [], + "worklet-layout": [], + "worklet-layout-import-data": [], + "worklet-paint": [], + "worklet-paint-import-data": [], + "xhr": [] } }, "test_expansion_schema": { - "expansion": [ - "default", - "override" - ], "delivery_type": [ "attr", "rel-noref", @@ -912,45 +814,6 @@ "strict-origin-when-cross-origin", "unsafe-url" ], - "origin": [ - "same-http", - "same-https", - "cross-http", - "cross-https" - ], - "source_context_list": [ - "top", - "req", - "srcdoc-inherit", - "srcdoc", - "iframe", - "worker-classic", - "worker-classic-data", - "worker-module", - "worker-module-data" - ], - "source_scheme": [ - "http", - "https" - ], - "redirection": [ - "no-redirect", - "keep-origin", - "swap-origin" - ], - "subresource": [ - "iframe-tag", - "img-tag", - "script-tag", - "a-tag", - "area-tag", - "xhr", - "worker-classic", - "worker-module", - "sharedworker-classic", - "sharedworker-module", - "fetch" - ], "expectation": [ "omitted", "origin", diff --git a/tests/wpt/web-platform-tests/shape-detection/idlharness.https.any.js b/tests/wpt/web-platform-tests/shape-detection/idlharness.https.any.js index e7f2cc8ff86..da60edbee63 100644 --- a/tests/wpt/web-platform-tests/shape-detection/idlharness.https.any.js +++ b/tests/wpt/web-platform-tests/shape-detection/idlharness.https.any.js @@ -1,7 +1,6 @@ // META: global=window,worker // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js -// META: script=/shape-detection/resources/shapedetection-helpers.js // See: https://wicg.github.io/shape-detection-api/ @@ -12,53 +11,8 @@ idl_test( ['dom', 'geometry'], async idl_array => { idl_array.add_objects({ - FaceDetector: ['faceDetector'], - DetectedFace: ['detectedFace'], - BarcodeDetector: ['barcodeDetector'], - DetectedBarcode: ['detectedBarcode'] + FaceDetector: ['new FaceDetector()'], + BarcodeDetector: ['new BarcodeDetector()'], }); - - let faceDetectionTest; - try { - faceDetectionTest = - await initialize_detection_tests("FaceDetectionTest"); - const img = createTestImage(); - const theImageBitmap = await createImageBitmap(img); - - self.faceDetector = new FaceDetector(); - const faceDetectionResult = await faceDetector.detect(theImageBitmap); - self.detectedFace = faceDetectionResult[0]; - } catch (e) { - // Surfaced in idlharness.js's test_object. - } finally { - faceDetectionTest && faceDetectionTest.reset(); - } - - let barcodeDetectionTest; - try { - barcodeDetectionTest = - await initialize_detection_tests("BarcodeDetectionTest"); - const img = createTestImage(); - const theImageBitmap = await createImageBitmap(img); - - self.barcodeDetector = new BarcodeDetector(); - const barcodeDetectionResult = - await barcodeDetector.detect(theImageBitmap); - self.detectedBarcode = barcodeDetectionResult[0]; - } catch (e) { - // Surface in idlharness.js's test_object. - } finally { - barcodeDetectionTest && barcodeDetectionTest.reset(); - } } ); - -function createTestImage() { - const image = new OffscreenCanvas(100, 50); - const imgctx = image.getContext('2d'); - imgctx.fillStyle = "#F00"; - imgctx.fillRect(0, 0, 2, 2); - imgctx.fillStyle = "#0F0"; - imgctx.fillRect(0, 0, 1, 1); - return image; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py index 4573541bf58..aa1ce20cd6d 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py @@ -6,7 +6,6 @@ import jsone import mock import pytest import requests -import sys import yaml from jsonschema import validate @@ -20,9 +19,6 @@ def data_path(filename): return os.path.join(here, "..", "testdata", filename) -@pytest.mark.xfail(sys.version_info.major == 2, - reason="taskcluster library has an encoding bug " - "https://github.com/taskcluster/json-e/issues/338") def test_verify_taskcluster_yml(): """Verify that the json-e in the .taskcluster.yml is valid""" with open(os.path.join(root, ".taskcluster.yml"), encoding="utf8") as f: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index 99898d1736d..6cd14095d9b 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -1,6 +1,6 @@ html5lib==1.0.1 mozinfo==1.1.0 -mozlog==5.0 +mozlog==6.0 mozdebug==0.2 # Pillow 7 requires Python 3 pillow==6.2.2 # pyup: <7.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index f2d02e0b8a3..ae729408104 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -1,5 +1,5 @@ marionette_driver==3.0.0 -mozcrash==1.2.0 +mozcrash==2.0.0 mozdownload==1.26.0 mozinstall==2.0.0 mozleak==0.2 diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicy-getPolicyNames.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicy-getPolicyNames.tentative.html deleted file mode 100644 index d1ae9e45c06..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicy-getPolicyNames.tentative.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js" ></script> -<script src="/resources/testharnessreport.js"></script> -<script src="support/helper.sub.js"></script> - -<meta http-equiv="Content-Security-Policy" content="trusted-types *"> -<body> -<script> - test(t => { - let policy = trustedTypes.createPolicy('thisisaname', {}); - assert_true(policy instanceof TrustedTypePolicy); - assert_equals(policy.name, 'thisisaname'); - }, "policy.name = name"); - - - // Retrieve policy names tests - test(t => { - let policy = trustedTypes.createPolicy('anothername', {}); - let names = trustedTypes.getPolicyNames(); - assert_equals(names.length, 2); - assert_true(names.includes('thisisaname')); - assert_true(names.includes('anothername')); - }, "getPolicyNames returns all policy names"); -</script> diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html index f049484f119..9fdafb2ccf0 100644 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html @@ -20,14 +20,6 @@ }); }, "duplicate policy name attempt throws"); - // Retrieve policy names tests - test(t => { - let policy = trustedTypes.createPolicy('SomeOtherName', {} ); - let names = trustedTypes.getPolicyNames(); - assert_true(names.includes('SomeName')); - assert_true(names.includes('SomeOtherName')); - }, "Retrieving policy names"); - // Check error messages. test(t => { try { diff --git a/tests/wpt/web-platform-tests/trusted-types/csp-block-eval.tentative.html b/tests/wpt/web-platform-tests/trusted-types/csp-block-eval.tentative.html index 7902ca4040f..e3911bf9e6a 100644 --- a/tests/wpt/web-platform-tests/trusted-types/csp-block-eval.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/csp-block-eval.tentative.html @@ -6,7 +6,7 @@ <script nonce="abc" src="support/helper.sub.js"></script> <!-- Note: Trusted Types enforcement, and a CSP that does not blanket-allow eval. --> - <meta http-equiv="Content-Security-Policy" content="script-src 'nonce-abc'; trusted-types *"> + <meta http-equiv="Content-Security-Policy" content="script-src 'nonce-abc'; require-trusted-types-for 'script'"> </head> <body> <script nonce="abc"> diff --git a/tests/wpt/web-platform-tests/trusted-types/eval-csp-tt-default-policy.tentative.html b/tests/wpt/web-platform-tests/trusted-types/eval-csp-tt-default-policy.tentative.html index eaa74eaf4cd..106a024f2c1 100644 --- a/tests/wpt/web-platform-tests/trusted-types/eval-csp-tt-default-policy.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/eval-csp-tt-default-policy.tentative.html @@ -4,7 +4,7 @@ <script nonce="abc" src="/resources/testharness.js"></script> <script nonce="abc" src="/resources/testharnessreport.js"></script> <script nonce="abc" src="support/helper.sub.js"></script> - <meta http-equiv="Content-Security-Policy" content="trusted-types *"> + <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"> </head> <body> <script> @@ -16,7 +16,7 @@ }, "eval of TrustedScript works."); test(t => { - assert_equals(eval('1+1'), 2); + assert_equals(eval('1+1'), 15); // '1+1' + 4 becomes '1+14'. }, "eval of string works."); test(t => { diff --git a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html index 40c1ccc69a1..081f9becbd0 100644 --- a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html +++ b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html @@ -10,9 +10,9 @@ // (rather than as "<meta http-equiv" tags). This test assumes the following // headers are set in the .headers file: // - // Content-Security-Policy: trusted-types * // Content-Security-Policy: script-src 'unsafe-inline'; report-uri ... // Content-Security-Policy: plugin-types bla/blubb + // Content-Security-Policy: require-trusted-types-for 'script' // // The last rule is there so we can provoke a CSP violation report at will. // The intent is that in order to test that a violation has *not* been thrown diff --git a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers index 30fe3b1df1d..e4147bd2e37 100644 --- a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers +++ b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers @@ -1,4 +1,3 @@ -Content-Security-Policy: trusted-types * Content-Security-Policy: script-src http: https: 'nonce-123' 'report-sample' Content-Security-Policy: plugin-types bla/blubb Content-Security-Policy: require-trusted-types-for 'script' diff --git a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html index dec8a07cfc4..9621aaba974 100644 --- a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html +++ b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html @@ -9,9 +9,9 @@ // (rather than as "<meta http-equiv" tags). This test assumes the following // headers are set in the .headers file: // - // Content-Security-Policy: trusted-types * // Content-Security-Policy: script-src 'unsafe-inline' 'unsafe-eval'; report-uri ... // Content-Security-Policy: plugin-types bla/blubb + // Content-Security-Policy: require-trusted-types-for 'script' // // The last rule is there so we can provoke a CSP violation report at will. // The intent is that in order to test that a violation has *not* been thrown diff --git a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html.headers b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html.headers index 91a2be91ef7..3f55bba7d1b 100644 --- a/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html.headers +++ b/tests/wpt/web-platform-tests/trusted-types/trusted-types-eval-reporting.tentative.https.html.headers @@ -1,4 +1,3 @@ -Content-Security-Policy: trusted-types * Content-Security-Policy: script-src http: https: 'nonce-123' 'unsafe-eval' Content-Security-Policy: plugin-types bla/blubb Content-Security-Policy: require-trusted-types-for 'script' diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/generic/spec_json.js b/tests/wpt/web-platform-tests/upgrade-insecure-requests/generic/spec_json.js index 0adba4938d4..c0ef9714895 100644 --- a/tests/wpt/web-platform-tests/upgrade-insecure-requests/generic/spec_json.js +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/generic/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Upgrade-Insecure-Requests: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Upgrade-Insecure-Requests: %(title)s", "specification": [{"name": "No upgrade-insecure-request", "title": "No upgrade-insecure-request", "description": "No upgrade-insecure-request", "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/", "test_expansion": [{"name": "Without upgrade-insecure-request, all requests are blocked ...", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "meta", "delivery_value": null, "redirection": "*", "subresource": "*", "origin": "*", "expectation": "blocked"}, {"name": "... except for the secure requests listed here", "expansion": "override", "source_scheme": "https", "source_context_list": "*", "delivery_type": "meta", "delivery_value": null, "redirection": "no-redirect", "subresource": "*", "origin": ["same-https", "cross-https", "same-wss", "cross-wss"], "expectation": "allowed"}]}, {"name": "With upgrade-insecure-request", "title": "With upgrade-insecure-request", "description": "With upgrade-insecure-request", "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/", "test_expansion": [{"name": "With upgrade-insecure-request, all insecure requests are upgraded and allowed.", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "upgrade", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "allowed"}]}], "delivery_key": "upgradeInsecureRequests", "excluded_tests": [{"name": "Omit secure requests", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "no-redirect", "subresource": "*", "origin": ["same-https", "cross-https", "same-wss", "cross-wss"], "expectation": "allowed"}, {"name": "For inheriting tests skip http-rp because we already have <meta> tests", "expansion": "*", "source_scheme": "*", "source_context_list": ["srcdoc-inherit", "iframe-blank-inherit", "worker-classic-data"], "delivery_type": "http-rp", "delivery_value": "*", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "Workers are same-origin only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": ["cross-https", "cross-http-downgrade", "cross-wss", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Websockets are ws/wss-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["same-https", "same-http-downgrade", "cross-https", "cross-http-downgrade"], "expectation": "*"}, {"name": "Websockets is no-redirect only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["downgrade"], "subresource": "websocket", "origin": "*", "expectation": "*"}, {"name": "ws/wss are websocket-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["iframe-tag", "img-tag", "xhr", "fetch", "worker-classic", "worker-module", "worker-import-data", "sharedworker-classic", "sharedworker-module", "sharedworker-import-data", "worklet-animation", "worklet-audio", "worklet-layout", "worklet-paint", "worklet-animation-import-data", "worklet-audio-import-data", "worklet-layout-import-data", "worklet-paint-import-data"], "origin": ["same-wss", "same-ws-downgrade", "cross-wss", "cross-ws-downgrade"], "expectation": "*"}], "source_context_schema": {"supported_delivery_type": {"top": ["http-rp", "meta"], "iframe": ["http-rp", "meta"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": []}, "supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "websocket"], "worker-module": ["xhr", "fetch", "websocket"], "worker-classic-data": ["xhr", "fetch", "websocket"], "worker-module-data": ["xhr", "fetch", "websocket"]}}, "subresource_schema": {"supported_delivery_type": {"xhr": [], "worker-classic": [], "worker-module": [], "worker-import-data": [], "sharedworker-classic": [], "sharedworker-module": [], "sharedworker-import-data": [], "worklet-animation": [], "worklet-audio": [], "worklet-layout": [], "worklet-paint": [], "worklet-animation-import-data": [], "worklet-audio-import-data": [], "worklet-layout-import-data": [], "worklet-paint-import-data": [], "fetch": [], "websocket": [], "img-tag": [], "iframe-tag": []}}, "source_context_list_schema": {"top": {"description": "CSP set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "srcdoc-inherit": {"description": "srcdoc iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}], "subresourcePolicyDeliveries": []}, "iframe-blank-inherit": {"description": "blank iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "iframe-blank"}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"description": "CSP set by the top-level Document is inherited to dedicated workers", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "source_scheme": ["https"], "delivery_type": ["http-rp", "meta"], "delivery_value": [null, "upgrade"], "source_context_list": ["top", "srcdoc-inherit", "iframe-blank-inherit", "worker-classic-data"], "redirection": ["no-redirect", "downgrade"], "origin": ["same-https", "same-http-downgrade", "cross-https", "cross-http-downgrade", "same-wss", "same-ws-downgrade", "cross-wss", "cross-ws-downgrade"], "subresource": ["iframe-tag", "img-tag", "xhr", "fetch", "websocket", "worker-classic", "worker-module", "worker-import-data", "sharedworker-classic", "sharedworker-module", "sharedworker-import-data", "worklet-animation", "worklet-audio", "worklet-layout", "worklet-paint", "worklet-animation-import-data", "worklet-audio-import-data", "worklet-layout-import-data", "worklet-paint-import-data"], "expectation": ["allowed", "blocked"]}}; +var SPEC_JSON = {"selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "excluded_tests": [{"name": "Workers are same-origin only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": ["cross-https", "cross-http", "cross-http-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Workers are same-origin only (redirects)", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["swap-origin", "swap-scheme"], "subresource": ["worker-classic", "worker-module", "sharedworker-classic", "sharedworker-module"], "origin": "*", "expectation": "*"}, {"name": "Websockets are ws/wss-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "websocket", "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade"], "expectation": "*"}, {"name": "Websockets are no-redirect only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "subresource": "websocket", "origin": "*", "expectation": "*"}, {"name": "ws/wss are websocket-only", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["area-tag", "a-tag", "fetch", "iframe-tag", "img-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "origin": ["same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "expectation": "*"}, {"name": "Omit secure requests", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "no-redirect", "subresource": "*", "origin": ["same-https", "cross-https", "same-wss", "cross-wss"], "expectation": "allowed"}, {"name": "For inheriting tests skip http-rp because we already have <meta> tests", "expansion": "*", "source_scheme": "*", "source_context_list": ["srcdoc-inherit", "iframe-blank-inherit", "worker-classic-data"], "delivery_type": "http-rp", "delivery_value": "*", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "source_context_list values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": ["req", "srcdoc", "iframe", "worker-classic", "worker-module", "worker-module-data", "sharedworker-classic-data", "sharedworker-module-data"], "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "*"}, {"name": "subresource values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "subresource": ["a-tag", "area-tag", "audio-tag", "beacon", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "video-tag"], "origin": "*", "expectation": "*"}, {"name": "origins that upgrade-insecure-requests tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", "origin": ["same-http", "cross-http", "same-ws", "cross-ws"], "subresource": "*", "expectation": "*"}, {"name": "redirections that upgrade-insecure-requests tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": ["keep-origin", "swap-origin", "keep-scheme", "swap-scheme"], "origin": "*", "subresource": "*", "expectation": "*"}], "source_context_schema": {"supported_subresource": {"top": "*", "iframe": "*", "iframe-blank": "*", "srcdoc": "*", "worker-classic": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-module": ["xhr", "fetch", "websocket", "worker-classic", "worker-module"], "worker-classic-data": ["xhr", "fetch", "websocket"], "worker-module-data": ["xhr", "fetch", "websocket"], "sharedworker-classic": ["xhr", "fetch", "websocket"], "sharedworker-module": ["xhr", "fetch", "websocket"], "sharedworker-classic-data": ["xhr", "fetch", "websocket"], "sharedworker-module-data": ["xhr", "fetch", "websocket"]}, "supported_delivery_type": {"top": ["http-rp", "meta"], "iframe": ["http-rp", "meta"], "iframe-blank": ["meta"], "srcdoc": ["meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "worker-classic-data": [], "worker-module-data": [], "sharedworker-classic": ["http-rp"], "sharedworker-module": ["http-rp"], "sharedworker-classic-data": [], "sharedworker-module-data": []}}, "source_context_list_schema": {"top": {"description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "req": {"description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}], "subresourcePolicyDeliveries": ["nonNullPolicy"]}, "srcdoc-inherit": {"description": "srcdoc iframe without its own policy should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}], "subresourcePolicyDeliveries": []}, "srcdoc": {"description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}], "subresourcePolicyDeliveries": []}, "iframe": {"description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "iframe-blank-inherit": {"description": "blank iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "iframe-blank"}], "subresourcePolicyDeliveries": []}, "worker-classic": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-classic-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "worker-module": {"description": "dedicated workers shouldn't inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}], "subresourcePolicyDeliveries": []}, "worker-module-data": {"description": "data: dedicated workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-classic-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-classic-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}, "sharedworker-module-data": {"description": "data: shared workers should inherit its parent's policy.", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "sharedworker-module-data", "policyDeliveries": []}], "subresourcePolicyDeliveries": []}}, "test_expansion_schema": {"expansion": ["default", "override"], "source_scheme": ["http", "https"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "iframe-blank-inherit", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data", "sharedworker-classic-data", "sharedworker-module-data"], "redirection": ["no-redirect", "keep-origin", "swap-origin", "keep-scheme", "swap-scheme", "downgrade"], "origin": ["same-https", "same-http", "same-http-downgrade", "cross-https", "cross-http", "cross-http-downgrade", "same-wss", "same-ws", "same-ws-downgrade", "cross-wss", "cross-ws", "cross-ws-downgrade"], "subresource": ["a-tag", "area-tag", "audio-tag", "beacon", "fetch", "iframe-tag", "img-tag", "link-css-tag", "link-prefetch-tag", "object-tag", "picture-tag", "script-tag", "sharedworker-classic", "sharedworker-import-data", "sharedworker-module", "video-tag", "websocket", "worker-classic", "worker-import-data", "worker-module", "worklet-animation", "worklet-animation-import-data", "worklet-audio", "worklet-audio-import-data", "worklet-layout", "worklet-layout-import-data", "worklet-paint", "worklet-paint-import-data", "xhr"], "delivery_type": ["http-rp", "meta"], "delivery_value": [null, "upgrade"], "expectation": ["allowed", "blocked"]}, "test_description_template": "Upgrade-Insecure-Requests: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Upgrade-Insecure-Requests: %(title)s", "specification": [{"name": "No upgrade-insecure-request", "title": "No upgrade-insecure-request", "description": "No upgrade-insecure-request", "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/", "test_expansion": [{"name": "Without upgrade-insecure-request, all requests are blocked ...", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "meta", "delivery_value": null, "redirection": "*", "subresource": "*", "origin": "*", "expectation": "blocked"}, {"name": "... except for the secure requests listed here", "expansion": "override", "source_scheme": "https", "source_context_list": "*", "delivery_type": "meta", "delivery_value": null, "redirection": "no-redirect", "subresource": "*", "origin": ["same-https", "cross-https", "same-wss", "cross-wss"], "expectation": "allowed"}]}, {"name": "With upgrade-insecure-request", "title": "With upgrade-insecure-request", "description": "With upgrade-insecure-request", "specification_url": "https://w3c.github.io/webappsec-upgrade-insecure-requests/", "test_expansion": [{"name": "With upgrade-insecure-request, all insecure requests are upgraded and allowed.", "expansion": "default", "source_scheme": "https", "source_context_list": "*", "delivery_type": "*", "delivery_value": "upgrade", "redirection": "*", "subresource": "*", "origin": "*", "expectation": "allowed"}]}], "delivery_key": "upgradeInsecureRequests", "subresource_schema": {"supported_delivery_type": {"a-tag": [], "area-tag": [], "audio-tag": [], "beacon": [], "fetch": [], "iframe-tag": [], "img-tag": [], "link-css-tag": [], "link-prefetch-tag": [], "object-tag": [], "picture-tag": [], "script-tag": [], "sharedworker-classic": [], "sharedworker-import-data": [], "sharedworker-module": [], "video-tag": [], "websocket": [], "worker-classic": [], "worker-import-data": [], "worker-module": [], "worklet-animation": [], "worklet-animation-import-data": [], "worklet-audio": [], "worklet-audio-import-data": [], "worklet-layout": [], "worklet-layout-import-data": [], "worklet-paint": [], "worklet-paint-import-data": [], "xhr": []}}}; diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/spec.src.json b/tests/wpt/web-platform-tests/upgrade-insecure-requests/spec.src.json index 70417038bcc..d64315903aa 100644 --- a/tests/wpt/web-platform-tests/upgrade-insecure-requests/spec.src.json +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/spec.src.json @@ -1,6 +1,4 @@ { - "selection_pattern": "%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s", - "test_file_path_pattern": "gen/%(source_context_list)s.%(delivery_type)s/%(delivery_value)s/%(subresource)s/%(origin)s.%(redirection)s.%(source_scheme)s.html", "test_description_template": "Upgrade-Insecure-Requests: Expects %(expectation)s for %(subresource)s to %(origin)s origin and %(redirection)s redirection from %(source_scheme)s context.", "test_page_title_template": "Upgrade-Insecure-Requests: %(title)s", "specification": [ @@ -98,94 +96,83 @@ "expectation": "*" }, { - "name": "Workers are same-origin only", + "name": "source_context_list values not yet tested", "expansion": "*", "source_scheme": "*", - "source_context_list": "*", - "delivery_type": "*", - "delivery_value": "*", - "redirection": "*", - "subresource": [ + "source_context_list": [ + "req", + "srcdoc", + "iframe", "worker-classic", "worker-module", - "sharedworker-classic", - "sharedworker-module" - ], - "origin": [ - "cross-https", - "cross-http-downgrade", - "cross-wss", - "cross-ws-downgrade" + "worker-module-data", + "sharedworker-classic-data", + "sharedworker-module-data" ], + "delivery_type": "*", + "delivery_value": "*", + "redirection": "*", + "subresource": "*", + "origin": "*", "expectation": "*" }, { - "name": "Websockets are ws/wss-only", + "name": "subresource values not yet tested", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", "redirection": "*", - "subresource": "websocket", - "origin": [ - "same-https", - "same-http-downgrade", - "cross-https", - "cross-http-downgrade" + "subresource": [ + "a-tag", + "area-tag", + "audio-tag", + "beacon", + "link-css-tag", + "link-prefetch-tag", + "object-tag", + "picture-tag", + "script-tag", + "video-tag" ], + "origin": "*", "expectation": "*" }, { - "name": "Websockets is no-redirect only", + "name": "origins that upgrade-insecure-requests tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", - "redirection": [ - "downgrade" + "redirection": "*", + "origin": [ + "same-http", + "cross-http", + "same-ws", + "cross-ws" ], - "subresource": "websocket", - "origin": "*", + "subresource": "*", "expectation": "*" }, { - "name": "ws/wss are websocket-only", + "name": "redirections that upgrade-insecure-requests tests don't care", "expansion": "*", "source_scheme": "*", "source_context_list": "*", "delivery_type": "*", "delivery_value": "*", - "redirection": "*", - "subresource": [ - "iframe-tag", - "img-tag", - "xhr", - "fetch", - "worker-classic", - "worker-module", - "worker-import-data", - "sharedworker-classic", - "sharedworker-module", - "sharedworker-import-data", - "worklet-animation", - "worklet-audio", - "worklet-layout", - "worklet-paint", - "worklet-animation-import-data", - "worklet-audio-import-data", - "worklet-layout-import-data", - "worklet-paint-import-data" - ], - "origin": [ - "same-wss", - "same-ws-downgrade", - "cross-wss", - "cross-ws-downgrade" + "redirection": [ + "keep-origin", + "swap-origin", + "keep-scheme", + "swap-scheme" ], + "origin": "*", + "subresource": "*", "expectation": "*" - } + }, ], "source_context_schema": { "supported_delivery_type": { @@ -210,126 +197,51 @@ "http-rp" ], "worker-classic-data": [], - "worker-module-data": [] - }, - "supported_subresource": { - "top": "*", - "iframe": "*", - "iframe-blank": "*", - "srcdoc": "*", - "worker-classic": [ - "xhr", - "fetch", - "websocket" - ], - "worker-module": [ - "xhr", - "fetch", - "websocket" + "worker-module-data": [], + "sharedworker-classic": [ + "http-rp" ], - "worker-classic-data": [ - "xhr", - "fetch", - "websocket" + "sharedworker-module": [ + "http-rp" ], - "worker-module-data": [ - "xhr", - "fetch", - "websocket" - ] + "sharedworker-classic-data": [], + "sharedworker-module-data": [] } }, "subresource_schema": { "supported_delivery_type": { - "xhr": [], - "worker-classic": [], - "worker-module": [], - "worker-import-data": [], + "a-tag": [], + "area-tag": [], + "audio-tag": [], + "beacon": [], + "fetch": [], + "iframe-tag": [], + "img-tag": [], + "link-css-tag": [], + "link-prefetch-tag": [], + "object-tag": [], + "picture-tag": [], + "script-tag": [], "sharedworker-classic": [], - "sharedworker-module": [], "sharedworker-import-data": [], + "sharedworker-module": [], + "video-tag": [], + "websocket": [], + "worker-classic": [], + "worker-import-data": [], + "worker-module": [], "worklet-animation": [], - "worklet-audio": [], - "worklet-layout": [], - "worklet-paint": [], "worklet-animation-import-data": [], + "worklet-audio": [], "worklet-audio-import-data": [], + "worklet-layout": [], "worklet-layout-import-data": [], + "worklet-paint": [], "worklet-paint-import-data": [], - "fetch": [], - "websocket": [], - "img-tag": [], - "iframe-tag": [] - } - }, - "source_context_list_schema": { - "top": { - "description": "CSP set by the top-level Document", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - } - ], - "subresourcePolicyDeliveries": [] - }, - "srcdoc-inherit": { - "description": "srcdoc iframe should inherit parent Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "srcdoc" - } - ], - "subresourcePolicyDeliveries": [] - }, - "iframe-blank-inherit": { - "description": "blank iframe should inherit parent Document's policy", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "iframe-blank" - } - ], - "subresourcePolicyDeliveries": [] - }, - "worker-classic-data": { - "description": "CSP set by the top-level Document is inherited to dedicated workers", - "sourceContextList": [ - { - "sourceContextType": "top", - "policyDeliveries": [ - "policy" - ] - }, - { - "sourceContextType": "worker-classic-data", - "policyDeliveries": [] - } - ], - "subresourcePolicyDeliveries": [] + "xhr": [] } }, "test_expansion_schema": { - "expansion": [ - "default", - "override" - ], - "source_scheme": [ - "https" - ], "delivery_type": [ "http-rp", "meta" @@ -338,47 +250,6 @@ null, "upgrade" ], - "source_context_list": [ - "top", - "srcdoc-inherit", - "iframe-blank-inherit", - "worker-classic-data" - ], - "redirection": [ - "no-redirect", - "downgrade" - ], - "origin": [ - "same-https", - "same-http-downgrade", - "cross-https", - "cross-http-downgrade", - "same-wss", - "same-ws-downgrade", - "cross-wss", - "cross-ws-downgrade" - ], - "subresource": [ - "iframe-tag", - "img-tag", - "xhr", - "fetch", - "websocket", - "worker-classic", - "worker-module", - "worker-import-data", - "sharedworker-classic", - "sharedworker-module", - "sharedworker-import-data", - "worklet-animation", - "worklet-audio", - "worklet-layout", - "worklet-paint", - "worklet-animation-import-data", - "worklet-audio-import-data", - "worklet-layout-import-data", - "worklet-paint-import-data" - ], "expectation": [ "allowed", "blocked" diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html index ba10b172c2d..bfe351250ff 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/animate.html @@ -247,7 +247,6 @@ promise_test(async t => { test(t => { const div = createDiv(t); div.classList.add('pseudo'); - getComputedStyle(div,"::before").content; // Sync style const anim = div.animate(null, {pseudoElement: '::before'}); assert_class_string(anim, 'Animation', 'The returned object is an Animation'); }, 'animate() with pseudoElement parameter creates an Animation object'); @@ -262,7 +261,6 @@ test(t => { const div = createDiv(t); div.classList.add('pseudo'); div.style.display = 'list-item'; - getComputedStyle(div,"::marker").content; // Sync style const anim = div.animate(null, {pseudoElement: '::marker'}); assert_class_string(anim, 'Animation', 'The returned object is an Animation for ::marker'); }, 'animate() with pseudoElement parameter creates an Animation object for ::marker'); @@ -278,7 +276,6 @@ test(t => { test(t => { const div = createDiv(t); div.classList.add('pseudo'); - getComputedStyle(div,"::before").content; // Sync style const anim = div.animate(null, {pseudoElement: '::before'}); assert_equals(anim.effect.target, div, 'The returned element has the correct target element'); assert_equals(anim.effect.pseudoElement, '::before', @@ -299,7 +296,6 @@ test(t => { const div = createDiv(t); div.classList.add('pseudo'); div.style.display = 'list-item'; - getComputedStyle(div,"::marker").content; // Sync style const anim = div.animate(null, {pseudoElement: '::marker'}); assert_equals(anim.effect.target, div, 'The returned element has the correct target element'); assert_equals(anim.effect.pseudoElement, '::marker', diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html index 87e60a2b108..654d4db7c79 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html @@ -344,6 +344,42 @@ test(() => { + ' should throw'); test(() => { + assert_throws_js(TypeError, () => { + new KeyframeEffect(null, createIterable([ + { done: false, value: { left: '100px', easing: '' } }, + { done: false, value: 1234 }, + { done: false, value: { left: '200px' } }, + { done: true }, + ])); + }); +}, 'Reading from a custom iterator that returns a non-object keyframe' + + ' and an invalid easing should throw'); + +test(() => { + assert_throws_js(TypeError, () => { + new KeyframeEffect(null, createIterable([ + { done: false, value: { left: '100px' } }, + { done: false, value: { left: '150px', offset: 'o' } }, + { done: false, value: { left: '200px' } }, + { done: true }, + ])); + }); +}, 'Reading from a custom iterator that returns a keyframe with a non finite' + + ' floating-point offset value should throw'); + +test(() => { + assert_throws_js(TypeError, () => { + new KeyframeEffect(null, createIterable([ + { done: false, value: { left: '100px', easing: '' } }, + { done: false, value: { left: '150px', offset: 'o' } }, + { done: false, value: { left: '200px' } }, + { done: true }, + ])); + }); +}, 'Reading from a custom iterator that returns a keyframe with a non finite' + + ' floating-point offset value and an invalid easing should throw'); + +test(() => { const effect = new KeyframeEffect(null, createIterable([ { done: false, value: { left: '100px' } }, { done: false }, // No value member; keyframe is undefined. diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html index 4b0e15c9a2f..8620f883f98 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html @@ -54,6 +54,29 @@ test(() => { + ' sequence'); test(() => { + let readToEnd = false; + const keyframe_obj = { + *[Symbol.iterator]() { + yield { left: '100px', easing: '' }; + yield { left: '200px' }; + readToEnd = true; + }, + }; + assert_throws_js( + TypeError, + () => { + new KeyframeEffect(null, keyframe_obj); + }, + 'TypeError is thrown for an invalid easing' + ); + assert_true( + readToEnd, + 'Read all the keyframe properties before reporting invalid easing' + ); +}, 'Invalid easing values are correctly rejected after doing all the' + + ' iterating'); + +test(() => { let propAccessCount = 0; const keyframe = {}; const addProp = prop => { diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/target.html b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/target.html index eaef10fcb51..6951682c4d8 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/target.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/KeyframeEffect/target.html @@ -122,7 +122,6 @@ for (const hasContent of [true, false]){ d.classList.add('pseudoa'); if (hasContent) { d.classList.add('before'); - getComputedStyle(d,"::before").content; // Sync style } const effect = new KeyframeEffect(null, gKeyFrames, 100 * MS_PER_SEC); @@ -147,7 +146,6 @@ for (const hasContent of [true, false]){ d.classList.add('pseudoa'); if (hasContent) { d.classList.add('before'); - getComputedStyle(d,"::before").content; // Sync style } const effect = new KeyframeEffect(null, gKeyFrames, 100 * MS_PER_SEC); @@ -172,7 +170,6 @@ for (const hasContent of [true, false]){ d.classList.add('pseudoa'); if (hasContent) { d.classList.add('before'); - getComputedStyle(d,"::before").content; // Sync style } const anim = d.animate(gKeyFrames, {duration: 100 * MS_PER_SEC, pseudoElement: '::before'}); @@ -198,11 +195,9 @@ for (const hasContent of [true, false]){ b.classList.add('pseudob'); if (prevHasContent) { a.classList.add('before'); - getComputedStyle(a,"::before").content; // Sync style } if (hasContent) { b.classList.add('before'); - getComputedStyle(b,"::before").content; // Sync style } const anim = a.animate(gKeyFrames, {duration: 100 * MS_PER_SEC, pseudoElement: '::before'}); @@ -228,11 +223,9 @@ for (const hasContent of [true, false]){ d.classList.add('pseudoc'); if (prevHasContent) { d.classList.add('before'); - getComputedStyle(d,"::before").content; // Sync style } if (hasContent) { d.classList.add('after'); - getComputedStyle(d,"::after").content; // Sync style } const anim = d.animate(gKeyFrames, {duration: 100 * MS_PER_SEC, pseudoElement: '::before'}); diff --git a/tests/wpt/web-platform-tests/webauthn/createcredential-badargs-rp.https.html b/tests/wpt/web-platform-tests/webauthn/createcredential-badargs-rp.https.html index 8886cc15c92..fa4d2264fef 100644 --- a/tests/wpt/web-platform-tests/webauthn/createcredential-badargs-rp.https.html +++ b/tests/wpt/web-platform-tests/webauthn/createcredential-badargs-rp.https.html @@ -27,6 +27,12 @@ standardSetup(function() { new CreateCredentialsTest("options.publicKey.rp.id", "-invaliddomain.com").runTest("Bad rp: id is invalid domain (starts with dash)", "SecurityError"); new CreateCredentialsTest("options.publicKey.rp.id", "0invaliddomain.com").runTest("Bad rp: id is invalid domain (starts with number)", "SecurityError"); + let hostAndPort = window.location.host; + if (!hostAndPort.match(/:\d+$/)) { + hostAndPort += ":443"; + } + new CreateCredentialsTest("options.publicKey.rp.id", hostAndPort).runTest("Bad rp id: id is host + port", "SecurityError"); + // // rp.name new CreateCredentialsTest({path: "options.publicKey.rp.name", value: undefined}).runTest("rp missing name", TypeError); diff --git a/tests/wpt/web-platform-tests/webauthn/createcredential-passing.https.html b/tests/wpt/web-platform-tests/webauthn/createcredential-passing.https.html index ab10c7f519a..a94be363da2 100644 --- a/tests/wpt/web-platform-tests/webauthn/createcredential-passing.https.html +++ b/tests/wpt/web-platform-tests/webauthn/createcredential-passing.https.html @@ -20,7 +20,6 @@ standardSetup(function() { new CreateCredentialsTest().runTest("passing credentials.create() with default arguments"); // rp - new CreateCredentialsTest({path: "options.publicKey.rp.id", value: window.location.host}).runTest("passing credentials.create() with rpId (host and port)"); new CreateCredentialsTest({path: "options.publicKey.rp.id", value: window.location.hostname}).runTest("passing credentials.create() with rpId (hostname)"); new CreateCredentialsTest({path: "options.publicKey.rp.icon", value: undefined}).runTest("passing credentials.create() without rp.icon"); diff --git a/tests/wpt/web-platform-tests/webauthn/getcredential-badargs-rpid.https.html b/tests/wpt/web-platform-tests/webauthn/getcredential-badargs-rpid.https.html index 6e0ef5f2018..3f9d3f2177f 100644 --- a/tests/wpt/web-platform-tests/webauthn/getcredential-badargs-rpid.https.html +++ b/tests/wpt/web-platform-tests/webauthn/getcredential-badargs-rpid.https.html @@ -31,6 +31,14 @@ standardSetup(function() { new GetCredentialsTest("options.publicKey.rpId", "0invaliddomain.com") .addCredential(credPromise) .runTest("Bad rpId: invalid domain (starts with number)", "SecurityError"); + + let hostAndPort = window.location.host; + if (!hostAndPort.match(/:\d+$/)) { + hostAndPort += ":443"; + } + new GetCredentialsTest({path: "options.publicKey.rpId", value: hostAndPort}) + .addCredential(credPromise) + .runTest("Bad rpId: host + port", "SecurityError"); }); /* JSHINT */ diff --git a/tests/wpt/web-platform-tests/webauthn/getcredential-passing.https.html b/tests/wpt/web-platform-tests/webauthn/getcredential-passing.https.html index dae05e0993a..c5237d2cda2 100644 --- a/tests/wpt/web-platform-tests/webauthn/getcredential-passing.https.html +++ b/tests/wpt/web-platform-tests/webauthn/getcredential-passing.https.html @@ -30,9 +30,6 @@ standardSetup(function() { new GetCredentialsTest({path: "options.publicKey.rpId", value: undefined}) .addCredential(credPromise) .runTest("rpId undefined"); - new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.host}) - .addCredential(credPromise) - .runTest("passing credentials.get() with rpId (host and port)"); new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.hostname}) .addCredential(credPromise) .runTest("passing credentials.get() with rpId (hostname)"); |