mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
Auto merge of #25865 - servo-wpt-sync:wpt_update_28-02-2020, r=servo-wpt-sync
Sync WPT with upstream (28-02-2020) Automated downstream sync of changes from upstream as of 28-02-2020. [no-wpt-sync] r? @servo-wpt-sync
This commit is contained in:
commit
317568b159
121 changed files with 1089 additions and 673 deletions
|
@ -7,7 +7,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -52880,6 +52880,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"float-paint-relayout.html": [
|
||||
"0499e3e9a260b069adec05f1abc66feccc178bcc",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"floated-table-wider-than-specified.html": [
|
||||
"f93d50e43dd3eb49d5c8964200b7fe4ebb5bd6c8",
|
||||
[
|
||||
|
@ -146204,6 +146217,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"change-list-descendant-display.html": [
|
||||
"18296f8862887eb1b666eb20f1ced0dd4cc78392",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-lists/change-list-descendant-display-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"change-list-style-position-001.html": [
|
||||
"5f56ee76ff70d12738ef6cef2a6f713141c82dec",
|
||||
[
|
||||
|
@ -155102,6 +155128,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"position-sticky-scroll-reposition.html": [
|
||||
"b75275c64fe3b8b1130abade63ea69c575085b80",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-position/position-sticky-scroll-reposition-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"position-sticky-scroll-with-clip-and-abspos.html": [
|
||||
"46085b49b4c405bdc1d0a05eafda3faca8ecf74a",
|
||||
[
|
||||
|
@ -185186,6 +185225,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"outline-023.html": [
|
||||
"ba623d997349aeb5743ad83006257ddcb4a29070",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square-only.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"outline-color-001.html": [
|
||||
"4245b2ceb7393a73850a223e498987e0e1bc4aa3",
|
||||
[
|
||||
|
@ -236017,84 +236069,10 @@
|
|||
[]
|
||||
]
|
||||
},
|
||||
"origin-policy": {
|
||||
"policy-content-security-comma-in-policy": [
|
||||
"42990f93e6d2722d9895e69e66679994f5e8fc36",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-double-content-security": [
|
||||
"be9b3750647d12117d966bbea534db7c41792451",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-double-policies": [
|
||||
"2e625c5c46389b77fbe7ec418dff010e6cd0ed5f",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-noimg": [
|
||||
"cd57b7b21e916b42c2dc74b70d1a4834ff8ee04f",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-noimg-report-only": [
|
||||
"13c662ef2d6e1c754c869ad63cea5a439fde8010",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-non-array": [
|
||||
"b96546c5f88fe77a219822f35ec7c516e3396fec",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-non-object": [
|
||||
"7f6e1383640125115b135ac87bfe0f414628f6ac",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-non-string": [
|
||||
"8649b17c4d8e73e03d3f1231e572a9b34713703e",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-valid": [
|
||||
"d4babb7949eefdf8c7867d5aea268977791c447f",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-valid-with-multi-item-array": [
|
||||
"45ec32200d5f6e3340866d2dc3dff6031aba5a47",
|
||||
[]
|
||||
],
|
||||
"policy-content-security-valid-with-semicolon": [
|
||||
"e777d5c96d5921d4b13b49a223059755f9697881",
|
||||
[]
|
||||
],
|
||||
"policy-csp-1": [
|
||||
"d4babb7949eefdf8c7867d5aea268977791c447f",
|
||||
[]
|
||||
],
|
||||
"policy-csp-2": [
|
||||
"34a6c5c873b5775edaaac2bbb70029d76dc20074",
|
||||
[]
|
||||
],
|
||||
"policy-features-comma-in-policy": [
|
||||
"e991c788f24a160907029a12c747cd70328876d8",
|
||||
[]
|
||||
],
|
||||
"policy-features-double-features": [
|
||||
"583f1eaa2fcda8773d71c94118a4e315844a64d1",
|
||||
[]
|
||||
],
|
||||
"policy-features-double-policy": [
|
||||
"fb216bc47298384a0261ef27b78d412ffc0e383b",
|
||||
[]
|
||||
],
|
||||
"policy-features-non-object": [
|
||||
"b4d255440dc4b30da15dc1e0521f0f64f54570c4",
|
||||
[]
|
||||
],
|
||||
"policy-features-non-string": [
|
||||
"8b758c7f617790b989c62374f850769b259b1e48",
|
||||
[]
|
||||
],
|
||||
"policy-features-valid": [
|
||||
"22ef8992cf7b5e3712fa760d9157c2d464830ef0",
|
||||
[]
|
||||
]
|
||||
}
|
||||
"origin-policy": [
|
||||
"df2b83256c2265fdcf1e48b6f1b06c852412cb23",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"2dcontext": {
|
||||
"2x2.png": [
|
||||
|
@ -291568,6 +291546,10 @@
|
|||
"f7d113d37804f0af90c6496f9e1dcf290860cf3d",
|
||||
[]
|
||||
],
|
||||
"change-list-descendant-display-ref.html": [
|
||||
"1a69ab6ea5404fe127cc8253ea5778ae0a3b3cca",
|
||||
[]
|
||||
],
|
||||
"change-list-style-position-001-ref.html": [
|
||||
"e87702a67b81f9863937d91fba56c0642c06ca6d",
|
||||
[]
|
||||
|
@ -293594,6 +293576,10 @@
|
|||
"a052eae56247143d82ce72a044884ab744ed46a8",
|
||||
[]
|
||||
],
|
||||
"position-sticky-scroll-reposition-ref.html": [
|
||||
"487a2322fc5aad723458a90e40922331b83bb299",
|
||||
[]
|
||||
],
|
||||
"position-sticky-scroll-with-clip-and-abspos-ref.html": [
|
||||
"a36934e38079cfc8fd6e9d36524968675235983e",
|
||||
[]
|
||||
|
@ -328616,101 +328602,109 @@
|
|||
},
|
||||
"origin-policy": {
|
||||
"content-security": {
|
||||
"comma-in-policy.https.html.headers": [
|
||||
"32e453ab20de0c3241e602cdf0af50769f741744",
|
||||
[]
|
||||
],
|
||||
"double-content-security.https.html.headers": [
|
||||
"a380b053c270c6159ff62497179c5a346b703047",
|
||||
[]
|
||||
],
|
||||
"double-policies.https.html.headers": [
|
||||
"23f1d1434057d27edf57fe4108cc7399b01915ff",
|
||||
[]
|
||||
],
|
||||
"helper.js": [
|
||||
"4875977afa4437abf6523426eedf99ee19a62e35",
|
||||
[]
|
||||
],
|
||||
"non-array.https.html.headers": [
|
||||
"31e6f375ef967e2173a0ab49063d22001612449a",
|
||||
[]
|
||||
],
|
||||
"non-object.https.html.headers": [
|
||||
"812ea9445eca18decb01d648fa916203ffea7f0d",
|
||||
[]
|
||||
],
|
||||
"non-string.https.html.headers": [
|
||||
"0b9ce2ee3f84c520fcba14d1267d93f7be48ce41",
|
||||
[]
|
||||
],
|
||||
"trigger-violation-report-report-only.https.html.headers": [
|
||||
"cb27e1500e0b4e484bc83d02ec3f6cc85aab43e1",
|
||||
[]
|
||||
],
|
||||
"trigger-violation-report.https.html.headers": [
|
||||
"08bcb9fa94171eeaf7df9b8c33487968f105e323",
|
||||
[]
|
||||
],
|
||||
"valid-with-multi-item-array.https.html.headers": [
|
||||
"eeddaba7a59b580a7d94599c805fab7ef1297b29",
|
||||
[]
|
||||
],
|
||||
"valid-with-semicolon.https.html.headers": [
|
||||
"eeddaba7a59b580a7d94599c805fab7ef1297b29",
|
||||
[]
|
||||
],
|
||||
"valid.https.html.headers": [
|
||||
"78aeeacd934c90fabddd5ddd7b3a1f6a4e5dd9a3",
|
||||
[]
|
||||
]
|
||||
"resources": {
|
||||
"allow-unsafe-eval-disallow-images.mjs": [
|
||||
"8715e74e5df81959e358fb94802b77965a494e8a",
|
||||
[]
|
||||
],
|
||||
"allow-unsafe-eval.mjs": [
|
||||
"bd6ca6f8bbd1e99dd339107a8817cdb337e6f8c4",
|
||||
[]
|
||||
],
|
||||
"disallow-unsafe-eval-disallow-images.mjs": [
|
||||
"41b25553d56338aea764e48b3eb7eae21bc7464f",
|
||||
[]
|
||||
],
|
||||
"helper.mjs": [
|
||||
"5eff7e16ba04a73464215c62a49409560af32c38",
|
||||
[]
|
||||
],
|
||||
"trigger-violation-report-report-only.mjs": [
|
||||
"9766717e309b5f04187b4e24d5ec7cc6e0fe7ebe",
|
||||
[]
|
||||
],
|
||||
"trigger-violation-report.mjs": [
|
||||
"319c87b0f8a6723ffcdf0cad9308915f6d6eb10c",
|
||||
[]
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"comma-in-policy.https.html.headers": [
|
||||
"c0e68720516a6665ade1b59539f3ff985790ff58",
|
||||
"resources": {
|
||||
"helper.mjs": [
|
||||
"7ced355e645c7bafd96aa55ef175cb995311aff9",
|
||||
[]
|
||||
],
|
||||
"no-camera-no-geolocation.mjs": [
|
||||
"b25d9abcb92ec99fa44b46a12587eb49d84d6a64",
|
||||
[]
|
||||
],
|
||||
"no-camera-yes-geolocation.mjs": [
|
||||
"a961deeb38989b3d19a37033b5fb654979fac03e",
|
||||
[]
|
||||
],
|
||||
"yes-camera-yes-geolocation.mjs": [
|
||||
"9f3b1d8303fe63a86ac9215a563816a54baf4448",
|
||||
[]
|
||||
]
|
||||
}
|
||||
},
|
||||
"policies": {
|
||||
"README.md": [
|
||||
"b07be74035f2dee0f379f0a8c499cd392f81f96a",
|
||||
[]
|
||||
],
|
||||
"double-features.https.html.headers": [
|
||||
"f0a57380a8f570d96a0f9070f55a25641167030f",
|
||||
"op1 cspfp-comma-in-policy.json": [
|
||||
"189d28db8ba80d672799d9402d95f21a87a1e8c7",
|
||||
[]
|
||||
],
|
||||
"double-policy.https.html.headers": [
|
||||
"c1421693e4dafffa69184991110810101f84687c",
|
||||
"op10 cspfp-valid.json": [
|
||||
"0fc1d163f2b61951813eae9ca84f2d4fe7f59703",
|
||||
[]
|
||||
],
|
||||
"helper.js": [
|
||||
"f9c16b58c2cf8bf85e5efb630ca7379ff14d36d3",
|
||||
"op2 cspfp-double-top-level.json": [
|
||||
"26d798b585d96fd29994dc39544a15bd2f6a639d",
|
||||
[]
|
||||
],
|
||||
"non-object.https.html.headers": [
|
||||
"e8f68712ed341e947fb8a85ca8aa0aee40839095",
|
||||
"op3 cspfp-double-second-level.json": [
|
||||
"6665332807bea371939ebbaefef35ea3d412509d",
|
||||
[]
|
||||
],
|
||||
"non-string.https.html.headers": [
|
||||
"4c6c376697b855ca61dc96b8f689675c11cbf769",
|
||||
"op4 csp-non-array.json": [
|
||||
"5916b1ff9b572dd4564916dd9ae50ab8cba3eb69",
|
||||
[]
|
||||
],
|
||||
"valid.https.html.headers": [
|
||||
"9d0e25792c46d4039462ed50070bbed4c5c35269",
|
||||
"op5 cspfp-non-object.json": [
|
||||
"7488f9bfef297e069d10845c2048f1ea261850da",
|
||||
[]
|
||||
],
|
||||
"op6 cspfp-non-string.json": [
|
||||
"5c6941bf8fd18928e6c1d4cea381f625f9923ee5",
|
||||
[]
|
||||
],
|
||||
"op7 csp-noimg-report-only.json": [
|
||||
"fd5c522042a7e06b9947e64594d797a2ddf67483",
|
||||
[]
|
||||
],
|
||||
"op8 csp-noimg.json": [
|
||||
"b88e1f80bf93c9b64007b5991c82b97a8ea2b2cd",
|
||||
[]
|
||||
],
|
||||
"op9 csp-valid-with-multi-item-array.json": [
|
||||
"edd743038db8d48a8f23ae903c8170205119dc2c",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"origin-policy-report-to.https.tentative.sub.html.sub.headers": [
|
||||
"92a90c347d3a7d009bb3a71c586ef598f3770d47",
|
||||
[]
|
||||
],
|
||||
"sec-origin-policy-header.html.py": [
|
||||
"7754e04a313c12957304a3bd3c1a0657eba15151",
|
||||
[]
|
||||
],
|
||||
"sec-origin-policy-subframe.html": [
|
||||
"d716ba11d97ce613b71b9e374ddfd23b35996e25",
|
||||
[]
|
||||
],
|
||||
"sec-origin-policy-subframe.html.sub.headers": [
|
||||
"a046f0096ba1b3005c353f262e6e8619f7e5aa5b",
|
||||
[]
|
||||
]
|
||||
"resources": {
|
||||
"origin-policy-test-runner.js": [
|
||||
"a1c6453debd20d7abc3923a273a0c1890dcab7a6",
|
||||
[]
|
||||
],
|
||||
"subframe-with-origin-policy.py": [
|
||||
"636a649a0e20bebe36ccd013b72b8e1f315d674e",
|
||||
[]
|
||||
]
|
||||
}
|
||||
},
|
||||
"page-visibility": {
|
||||
"META.yml": [
|
||||
|
@ -328793,6 +328787,10 @@
|
|||
"ac3307b619ccfb464a5fa44820cea39befdd8f2e",
|
||||
[]
|
||||
],
|
||||
"app-respond-with-minimal-ui.js": [
|
||||
"0e6b1b78b9197d8d1582c8eb70bbcc15ba3861c4",
|
||||
[]
|
||||
],
|
||||
"app-supports-shipping-contact-delegation.js": [
|
||||
"770e2de64f13eeef8a1ee21783c2997facc8ff0b",
|
||||
[]
|
||||
|
@ -354578,6 +354576,10 @@
|
|||
"1f14334290a3ce8b707cff3b9a01caca952b9863",
|
||||
[]
|
||||
],
|
||||
"post-message-on-load-worker.js": [
|
||||
"e1c547ab6a4d577280442dbfcbec5a5ec9296666",
|
||||
[]
|
||||
],
|
||||
"sandboxed-tests.html": [
|
||||
"811c925f56f11934cf3cb9ec508b73d601525c27",
|
||||
[]
|
||||
|
@ -403576,8 +403578,22 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"CSSStyleSheet-constructable-disabled-regular-sheet-insertion.html": [
|
||||
"ef4ea1480658af9aee9ef3464650893481d8ed46",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"CSSStyleSheet-constructable-duplicate.html": [
|
||||
"30a3ed1d09bbbd779d7b56df91908de948b6bc4b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"CSSStyleSheet-constructable.html": [
|
||||
"539075b47efc8599c3d9147f2e4b417783fb1df5",
|
||||
"c7e215381048eddedcf3c33166790815fc685aea",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -470334,77 +470350,70 @@
|
|||
"origin-policy": {
|
||||
"content-security": {
|
||||
"comma-in-policy.https.html": [
|
||||
"88d72446392e6751253d658edee7b79475af1fc3",
|
||||
"07d10811f0bf853503052458ab76e0049969bdd4",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"double-content-security.https.html": [
|
||||
"99046803c9fe305489a0aba915fc0d2f2aa40eb2",
|
||||
"357bd7669a66865ababa1434f9f2dc5319cdb3d0",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"double-policies.https.html": [
|
||||
"925b9d5a31e10ff865cf6125f677933211627251",
|
||||
"327670fcad0b3aeecd6206f338ae661db62b2b8c",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-array.https.html": [
|
||||
"78a67e16eb9d3058371e4d0dc0b389b007f4ef10",
|
||||
"c95b5a15b0e6414c90adeda7923d4c06372b76cf",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-object.https.html": [
|
||||
"359c6c7692294ebb1bfe0104b3a79c2e924af075",
|
||||
"220136c4d050bea76853b8590ae7f01c11b4d25a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-string.https.html": [
|
||||
"8af3c1c4dff13699d37175590231d40d7bf61e4e",
|
||||
"57c29fe265bebe22f133b3dbd2f3f3e03771cf7a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"trigger-violation-report-report-only.https.html": [
|
||||
"3e5038b501dec9e5fd028018fa832a5144c81b34",
|
||||
"9eb83792852eb563e0da242465928341c915b7b5",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"trigger-violation-report.https.html": [
|
||||
"22beca5a3dbbc9251bbde3580a0a9997488c463b",
|
||||
"f981b2b05cef7e5ff16e2e8530e5c5a4e6d654f8",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"valid-with-multi-item-array.https.html": [
|
||||
"bc9ebd0cccfcbd7d2fa28dfd7bea914de449c725",
|
||||
"36333a1e4b19943fb25032aeb2d9c98925bcf456",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"valid-with-semicolon.https.html": [
|
||||
"82158f1cf7044f8dcf3eeb652e521494a801c667",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"valid.https.html": [
|
||||
"36e5ddbf958b317ef703b1309d037b21a2186596",
|
||||
"9eadc8f89d31ab8f652ce2ebadae8bc96c130f63",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -470413,62 +470422,48 @@
|
|||
},
|
||||
"features": {
|
||||
"comma-in-policy.https.html": [
|
||||
"1b991f0d8b68af01681d9b77a9b21506ffe3fd58",
|
||||
"a9faba4bfd4dd0cf5104a639302fb67e4a0f280b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"double-features.https.html": [
|
||||
"8397f849f30148021f70883d4418591f72d647dc",
|
||||
"aa687d681c66d628e4140abe571021b7f16eb876",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"double-policy.https.html": [
|
||||
"f1d63d6de966b36c0b410a5b62b803b9d7b40885",
|
||||
"d9e544acaaf6a4e1a5c6e8987ed2d72ed777cb4e",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-object.https.html": [
|
||||
"31f632bf0f1fed54666de913dd6a1c9a333e5388",
|
||||
"2bd4b67e600c9bbb655461f161e1ad6da6619663",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"non-string.https.html": [
|
||||
"019014c980a4a3a0565e10288b053c0da86e9f91",
|
||||
"190d224a4cfe05bb1a4ea57b104f7d31d862fdcc",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"valid.https.html": [
|
||||
"6ff2076a7f076e78c73de5a019a52530a033f034",
|
||||
"valid-with-semicolon.https.html": [
|
||||
"8d2d0f4495ff7f401991accc044f21fef115ad75",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"origin-policy-report-to.https.tentative.sub.html": [
|
||||
"dfef7a1d133c267b8a27e5acb6c4ac89cfbc8ee7",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"origin-policy.https.tentative.html": [
|
||||
"34a71fe40a192418a3f9a5792d7ee5fdecf970dd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"page-visibility": {
|
||||
"idlharness.window.js": [
|
||||
|
@ -470825,6 +470820,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"respond-with-minimal-ui.https.html": [
|
||||
"2474185a5ed719115b8afb39eac78584cecbb285",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"same-object-attributes.https.html": [
|
||||
"b9a9dd82d247a80b00e4bc033eeea134d5f900c1",
|
||||
[
|
||||
|
@ -559993,6 +559995,24 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"dedicated-worker-in-data-url-context.window.js": [
|
||||
"1b1ce232a739313d80ef5641aa799c978e53abea",
|
||||
[
|
||||
"workers/dedicated-worker-in-data-url-context.window.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"data URL dedicated worker in data URL context"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"examples": {
|
||||
"fetch_tests_from_worker.html": [
|
||||
"5ac765c7eeae8c03678ca98c2f0d89fd826cf45e",
|
||||
|
@ -561182,6 +561202,24 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"shared-worker-in-data-url-context.window.js": [
|
||||
"f0cc98b75cbfd0d1bc084e445c47f3f6c7dd219c",
|
||||
[
|
||||
"workers/shared-worker-in-data-url-context.window.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"data URL shared worker in data URL context"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"shared-worker-name-via-options.html": [
|
||||
"1914d66db7489f6306c4365a4d7b7b9fb59fe00e",
|
||||
[
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-004.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
[no-transition-from-ua-to-blocking-stylesheet.html]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
[listeners are called when <iframe> is resized]
|
||||
expected: FAIL
|
||||
|
||||
[listeners are called correct number of times]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[elementFromPoint-001.html]
|
||||
[CSSOM View - 5 - extensions to the Document interface]
|
||||
expected: FAIL
|
||||
|
|
@ -21,6 +21,3 @@
|
|||
[test the top of layer]
|
||||
expected: FAIL
|
||||
|
||||
[test some point of the element: top left corner]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -2,6 +2,3 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[elementsFromPoint-invalid-cases.html]
|
||||
[The root element is the last element returned for otherwise empty queries within the viewport]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[CSSStyleSheet-constructable-disabled-regular-sheet-insertion.html]
|
||||
[Shouldn't crash / assert when inserting a stylesheet after there are disabled constructable sheets]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[CSSStyleSheet-constructable-duplicate.html]
|
||||
[Cascade order of a stylesheet for duplicate sheets.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[HTMLMediaElement.html]
|
||||
expected: TIMEOUT
|
|
@ -315,21 +315,21 @@
|
|||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Element with tabindex should support autofocus]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Host element with delegatesFocus including no focusable descendants should be skipped]
|
||||
expected: NOTRUN
|
||||
|
@ -16,5 +16,5 @@
|
|||
expected: NOTRUN
|
||||
|
||||
[Non-HTMLElement should not support autofocus]
|
||||
expected: TIMEOUT
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -17,3 +17,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 42286 more errors.\n\tMax AbsError of 1.9962286949157715e+0 at index of 12332.\n\t[12332\]\t9.9879217147827148e-1\t-9.9743652343750000e-1\t1.9962286949157715e+0\t2.0013591321441684e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 10584.\n\t[10584\]\t-5.8778524398803711e-1\t0.0000000000000000e+0\t5.8778524398803711e-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 44036 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 21168.\n\t[21168\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -140,3 +140,9 @@
|
|||
[X SNR (-591.4728047569859 dB) is not greater than or equal to 65.737. Got -591.4728047569859.]
|
||||
expected: FAIL
|
||||
|
||||
[X SNR (-543.5504687141402 dB) is not greater than or equal to 65.737. Got -543.5504687141402.]
|
||||
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\]\t1.0053343057791861e+29\t-7.3546999692916870e-1\t1.0053343057791861e+29\t1.3669276924643975e+29\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.9958413252754581e+29\t-9.8956179618835449e-1\t1.9958413252754581e+29\t2.0168940767147069e+29\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.9958413252754581e+29 at index of 38059.\n\tMax RelError of 2.0168940767147069e+29 at index of 38059.\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[dedicated-worker-in-data-url-context.window.html]
|
||||
[Create a dedicated worker in a data url dedicated worker]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[shared-worker-in-data-url-context.window.html]
|
||||
[Create a shared worker in a data url frame]
|
||||
expected: FAIL
|
||||
|
||||
[Create a data url shared worker in a data url frame]
|
||||
expected: FAIL
|
||||
|
18
tests/wpt/web-platform-tests/.well-known/origin-policy
Normal file
18
tests/wpt/web-platform-tests/.well-known/origin-policy
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
import glob
|
||||
|
||||
|
||||
def main(request, response):
|
||||
host_piece = request.url_parts.hostname.split(".")[0]
|
||||
|
||||
filepath_pattern = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(
|
||||
__file__)), "../origin-policy/policies/", "{} *.json".format(host_piece)))
|
||||
|
||||
matches = glob.glob(filepath_pattern)
|
||||
|
||||
if len(matches) != 1:
|
||||
return 404, [], '{} origin policies found at a path matching "{}"'.format(len(matches), filepath_pattern)
|
||||
|
||||
with open(matches[0]) as f:
|
||||
data = f.read()
|
||||
return 200, [('Content-Type', 'application/originpolicy+json')], data
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline', img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'"]
|
||||
},
|
||||
"content_security": {
|
||||
"policies": ["img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'"],
|
||||
"policies": ["img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies_report_only": ["img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"content_security": ["script-src 'self' 'unsafe-inline'"]
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": [["script-src 'self' 'unsafe-inline'"]]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'", "img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'; img-src 'none'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'unsafe-inline'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"content_security": {
|
||||
"policies": ["script-src 'self' 'nonce-test'"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"features": {
|
||||
"policy": "camera 'self' https://example.com/, geolocation 'self' https://example.com/"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"features": {
|
||||
"policy": "camera 'self' https://example.com/"
|
||||
},
|
||||
"features": {
|
||||
"policy": "geolocation 'self' https://example.com/"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"features": {
|
||||
"policy": "camera 'self' https://example.com/",
|
||||
"policy": "geolocation 'self' https://example.com/"
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"features": "camera 'self' https://example.com/"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"features": {
|
||||
"policy": ["camera 'self' https://example.com/"]
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"features": {
|
||||
"policy": "camera 'self' https://example.com/; geolocation 'self' https://example.com/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1049973">
|
||||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="width: 100px; height: 100px; background: red; overflow: auto;">
|
||||
<div id="target" style="display: none; float: left; width: 100px; height: 100px; background: green;"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
document.getElementById('target').style.display = 'block';
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: test the change of descendant's display</title>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<style>
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
<ol>
|
||||
<li><div class="target inline">text</div></li>
|
||||
<li><div class="target">text</div></li>
|
||||
<li><div><div class="target inline">text</div></div></li>
|
||||
<li><div><div class="target">text</div></div></li>
|
||||
<li><div><div><div class="target inline">text</div></div></div></li>
|
||||
<li><div><div><div class="target">text</div></div></div></li>
|
||||
</ol>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: test the change of descendant's display</title>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<link rel="match" href="change-list-descendant-display-ref.html">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/generate.html#lists">
|
||||
<meta name="assert" content="Check that an outside marker looks good when
|
||||
the descendant of the list item that contains the 1st line box changes
|
||||
from 'display: block' to 'display: inline' or vice versa.">
|
||||
<style>
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
<ol>
|
||||
<li><div class="target">text</div></li>
|
||||
<li><div class="target inline">text</div></li>
|
||||
<li><div><div class="target">text</div></div></li>
|
||||
<li><div><div class="target inline">text</div></div></li>
|
||||
<li><div><div><div class="target">text</div></div></div></li>
|
||||
<li><div><div><div class="target inline">text</div></div></div></li>
|
||||
</ol>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script>
|
||||
addEventListener("load", async () => {
|
||||
for (let target of document.querySelectorAll(".target")) {
|
||||
await new Promise(resolve => requestAnimationFrame(resolve));
|
||||
target.classList.toggle("inline");
|
||||
}
|
||||
takeScreenshot();
|
||||
}, {once: true});
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<title>Test that style mutation of contain:strict plus position:sticky updates sticky position</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos">
|
||||
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
|
||||
<div id="scroller" style="width: 200px; height: 200px; overflow-y: scroll;
|
||||
will-change: transform;">
|
||||
<div id="scrollbar" style="width: 100px; height: 100px; position: sticky; background: lightblue;
|
||||
top: 5px; left: 50px; contain: strict;"></div>
|
||||
<div style="width: 100px; height: 500px;"></div>
|
||||
</div>
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<title>Test that style mutation of contain:strict plus position:sticky updates sticky position</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos">
|
||||
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
|
||||
<link rel="match" href="position-sticky-scroll-reposition-ref.html">
|
||||
<div id="scroller" style="width: 200px; height: 200px; overflow-y: scroll;
|
||||
will-change: transform;">
|
||||
<div id="sticky" style="width: 100px; height: 100px; position: sticky; background: lightblue;
|
||||
top: 50px; left: 50px; contain: strict;"></div>
|
||||
<div style="width: 100px; height: 500px;"></div>
|
||||
</div>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script>
|
||||
requestAnimationFrame(() =>
|
||||
requestAnimationFrame(() => {
|
||||
sticky.style.top = '5px';
|
||||
takeScreenshot();
|
||||
}));
|
||||
</script>
|
10
tests/wpt/web-platform-tests/css/css-ui/outline-023.html
Normal file
10
tests/wpt/web-platform-tests/css/css-ui/outline-023.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>Tests that a paint clip, clips an outline.</title>
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS21/zindex.html">
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div style="overflow: hidden; width: 100px; height: 100px; background: green;">
|
||||
<div style="display: block; width: 110px; height: 110px; margin: -5px; outline: solid blue 3px;"></div>
|
||||
</div>
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<title>Shouldn't crash / assert when inserting a stylesheet after there are disabled constructable sheets</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://wicg.github.io/construct-stylesheets/">
|
||||
<script src = '/resources/testharness.js'></script>
|
||||
<script src = '/resources/testharnessreport.js'></script>
|
||||
<div id="host"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
let sheet = new CSSStyleSheet({ disabled: true });
|
||||
sheet.replaceSync("div { color: red }");
|
||||
|
||||
let root = document.getElementById("host").attachShadow({ mode: "open" });
|
||||
root.adoptedStyleSheets = [sheet];
|
||||
let style = document.createElement("style");
|
||||
root.innerHTML = `
|
||||
<style>div { color: green }</style>
|
||||
<div>Should be green</div>
|
||||
`;
|
||||
assert_equals(getComputedStyle(root.querySelector("div")).color, "rgb(0, 128, 0)", "Should insert the sheet at the right position and not crash");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<title>Cascade order of a stylesheet for duplicate sheets.</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://wicg.github.io/construct-stylesheets/">
|
||||
<script src = '/resources/testharness.js'></script>
|
||||
<script src = '/resources/testharnessreport.js'></script>
|
||||
<div></div>
|
||||
<script>
|
||||
test(function() {
|
||||
let sheets = [];
|
||||
|
||||
for (let i = 0; i < 2; ++i) {
|
||||
sheets.push(new CSSStyleSheet());
|
||||
sheets[i].replaceSync("div { z-index: " + i + " }");
|
||||
}
|
||||
|
||||
document.adoptedStyleSheets = [sheets[1], sheets[0], sheets[1]];
|
||||
assert_equals(getComputedStyle(document.querySelector("div")).zIndex, "1", "duplicate stylesheet should take right position in the cascade");
|
||||
});
|
||||
</script>
|
|
@ -47,8 +47,8 @@ test(() => {
|
|||
}, "document.adoptedStyleSheets should initially have length 0.");
|
||||
|
||||
test(() => {
|
||||
const sheet = new CSSStyleSheet({title: "Red", disabled: true, media: "screen, print"});
|
||||
assert_equals(sheet.title, "Red");
|
||||
const sheet = new CSSStyleSheet({disabled: true, media: "screen, print"});
|
||||
assert_equals(sheet.title, null);
|
||||
assert_equals(sheet.ownerNode, null);
|
||||
assert_equals(sheet.ownerRule, null);
|
||||
assert_equals(sheet.media.length, 2);
|
||||
|
@ -96,11 +96,16 @@ test(() => {
|
|||
assert_equals(sheet3.cssRules.length, 0);
|
||||
}, 'new CSSStyleSheet produces empty CSSStyleSheet');
|
||||
|
||||
test(() => {
|
||||
const sheet = new CSSStyleSheet({title: "something"});
|
||||
assert_equals(sheet.title, null);
|
||||
}, "title cannot be set in the CSSStyleSheet constructor");
|
||||
|
||||
promise_test(() => {
|
||||
const sheet = new CSSStyleSheet({title: "Red", disabled: true, media: "screen, print"});
|
||||
const sheet = new CSSStyleSheet({disabled: true, media: "screen, print"});
|
||||
const promise_sheet = sheet.replace(redStyleTexts[0]);
|
||||
return promise_sheet.then(function(sheet) {
|
||||
assert_equals(sheet.title, "Red");
|
||||
assert_equals(sheet.title, null);
|
||||
assert_equals(sheet.ownerNode, null);
|
||||
assert_equals(sheet.ownerRule, null);
|
||||
assert_equals(sheet.media.length, 2);
|
||||
|
@ -119,8 +124,8 @@ promise_test(() => {
|
|||
function createAllSheetsPromise() {
|
||||
const greenSheet = new CSSStyleSheet();
|
||||
const redSheet = new CSSStyleSheet({media: "screen, print"});
|
||||
const blueSheet = new CSSStyleSheet({title: "Blue", disabled: true});
|
||||
const whiteSheet = new CSSStyleSheet({title: "White", disabled: true});
|
||||
const blueSheet = new CSSStyleSheet({disabled: true});
|
||||
const whiteSheet = new CSSStyleSheet({disabled: true});
|
||||
const yellowSheet = new CSSStyleSheet({disabled: false});
|
||||
|
||||
const greenPromise = greenSheet.replace(greenStyleText);
|
||||
|
|
|
@ -3,9 +3,14 @@
|
|||
<title>Commas in "content_security/policy" cause parse errors and thus no CSP</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op1",
|
||||
testJS: "resources/allow-unsafe-eval.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-comma-in-policy
|
|
@ -3,11 +3,14 @@
|
|||
<title>Of two "content_security" items only the second counts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true, img: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op2",
|
||||
testJS: "resources/allow-unsafe-eval-disallow-images.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-double-content-security
|
|
@ -3,11 +3,14 @@
|
|||
<title>Of two "content_security/policies" items only the second counts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true, img: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op3",
|
||||
testJS: "resources/allow-unsafe-eval-disallow-images.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-double-policies
|
|
@ -3,9 +3,14 @@
|
|||
<title>Non-array "content_security/policies" member must be ignored</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op4",
|
||||
testJS: "resources/allow-unsafe-eval.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-non-array
|
|
@ -3,9 +3,14 @@
|
|||
<title>Non-object "content_security" member must be ignored</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op5",
|
||||
testJS: "resources/allow-unsafe-eval.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-non-object
|
|
@ -3,9 +3,14 @@
|
|||
<title>Non-string "content_security/policies" array member must be ignored</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op6",
|
||||
testJS: "resources/allow-unsafe-eval.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-non-string
|
|
@ -0,0 +1,3 @@
|
|||
import { runCSPTest } from "./helper.mjs";
|
||||
|
||||
runCSPTest({ unsafeEval: true, img: false });
|
|
@ -0,0 +1,3 @@
|
|||
import { runCSPTest } from "./helper.mjs";
|
||||
|
||||
runCSPTest({ unsafeEval: true });
|
|
@ -0,0 +1,3 @@
|
|||
import { runCSPTest } from "./helper.mjs";
|
||||
|
||||
runCSPTest({ unsafeEval: false, img: false });
|
|
@ -1,4 +1,4 @@
|
|||
window.waitForOneSecurityPolicyViolationEvent = expectedBlockedURI => {
|
||||
export function waitForOneSecurityPolicyViolationEvent(expectedBlockedURI) {
|
||||
return new Promise(resolve => {
|
||||
let eventCount = 0;
|
||||
let blockedURI = null;
|
||||
|
@ -17,9 +17,9 @@ window.waitForOneSecurityPolicyViolationEvent = expectedBlockedURI => {
|
|||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
window.waitForImgFail = imgSrc => {
|
||||
export function waitForImgFail(imgSrc) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = document.createElement("img");
|
||||
img.onload = () => reject(new Error("Must not load the image"));
|
||||
|
@ -28,10 +28,9 @@ window.waitForImgFail = imgSrc => {
|
|||
img.src = imgSrc;
|
||||
document.body.append(img);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
window.waitForImgSuccess = imgSrc => {
|
||||
export function waitForImgSuccess(imgSrc) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const img = document.createElement("img");
|
||||
img.onload = () => resolve();
|
||||
|
@ -40,10 +39,10 @@ window.waitForImgSuccess = imgSrc => {
|
|||
img.src = imgSrc;
|
||||
document.body.append(img);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// Both params are optional; if they are not given as booleans then we will not test that aspect.
|
||||
window.runCSPTest = ({ unsafeEval, img }) => {
|
||||
export function runCSPTest({ unsafeEval, img }) {
|
||||
if (unsafeEval === true) {
|
||||
test(() => {
|
||||
eval("window.evalAllowed = true;");
|
||||
|
@ -70,4 +69,4 @@ window.runCSPTest = ({ unsafeEval, img }) => {
|
|||
"img loading must be disallowed"
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import { waitForOneSecurityPolicyViolationEvent, waitForImgSuccess } from "./helper.mjs";
|
||||
|
||||
promise_test(() => {
|
||||
const imgURL = (new URL("/common/security-features/subresource/image.py", document.location)).href;
|
||||
|
||||
return Promise.all([
|
||||
waitForOneSecurityPolicyViolationEvent(imgURL).then(blockedURI => {
|
||||
assert_equals(blockedURI, imgURL);
|
||||
}),
|
||||
waitForImgSuccess(imgURL)
|
||||
]);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
import { waitForOneSecurityPolicyViolationEvent, waitForImgFail } from "./helper.mjs";
|
||||
|
||||
promise_test(() => {
|
||||
const imgURL = (new URL("/common/security-features/subresource/image.py", document.location)).href;
|
||||
|
||||
return Promise.all([
|
||||
waitForOneSecurityPolicyViolationEvent(imgURL).then(blockedURI => {
|
||||
assert_equals(blockedURI, imgURL);
|
||||
}),
|
||||
waitForImgFail(imgURL)
|
||||
]);
|
||||
});
|
|
@ -3,21 +3,14 @@
|
|||
<title>CSP via origin policy must trigger a securitypolicyviolation event even when the CSP is report-only</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
promise_test(() => {
|
||||
const imgURL = (new URL("/common/security-features/subresource/image.py", document.location)).href;
|
||||
|
||||
return Promise.all([
|
||||
waitForOneSecurityPolicyViolationEvent(imgURL).then(blockedURI => {
|
||||
assert_equals(blockedURI, imgURL);
|
||||
}),
|
||||
waitForImgSuccess(imgURL)
|
||||
]);
|
||||
runTestsInSubframe({
|
||||
hostname: "op7",
|
||||
testJS: "resources/trigger-violation-report-report-only.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-noimg-report-only
|
|
@ -3,21 +3,14 @@
|
|||
<title>CSP via origin policy must trigger a securitypolicyviolation event</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
promise_test(() => {
|
||||
const imgURL = (new URL("/common/security-features/subresource/image.py", document.location)).href;
|
||||
|
||||
return Promise.all([
|
||||
waitForOneSecurityPolicyViolationEvent(imgURL).then(blockedURI => {
|
||||
assert_equals(blockedURI, imgURL);
|
||||
}),
|
||||
waitForImgFail(imgURL)
|
||||
]);
|
||||
runTestsInSubframe({
|
||||
hostname: "op8",
|
||||
testJS: "resources/trigger-violation-report.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-noimg
|
|
@ -3,11 +3,14 @@
|
|||
<title>"content_security/policy" can contain multiple array items to enforce multiple CSPs</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: false, img: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op9",
|
||||
testJS: "resources/disallow-unsafe-eval-disallow-images.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-valid-with-semicolon
|
|
@ -3,11 +3,14 @@
|
|||
<title>"content_security/policy" array items can contain semicolons to enforce multiple CSP directives</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: false, img: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op10",
|
||||
testJS: "resources/disallow-unsafe-eval-disallow-images.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-valid-with-semicolon
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset="utf-8">
|
||||
<title>Valid "content_security" member disallows eval</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runCSPTest({ unsafeEval: false });
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-content-security-valid
|
|
@ -3,9 +3,14 @@
|
|||
<title>Commas in "features/policy" cause parse errors and thus no feature policy</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: false, geolocation: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op1",
|
||||
testJS: "resources/no-camera-no-geolocation.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-comma-in-policy
|
|
@ -3,9 +3,14 @@
|
|||
<title>Of two "features" items only the second counts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: false, geolocation: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op2",
|
||||
testJS: "resources/no-camera-yes-geolocation.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-double-features
|
|
@ -3,9 +3,14 @@
|
|||
<title>Of two "features/policy" items only the second counts</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: false, geolocation: true });
|
||||
runTestsInSubframe({
|
||||
hostname: "op2",
|
||||
testJS: "resources/no-camera-yes-geolocation.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-double-policy
|
|
@ -3,9 +3,14 @@
|
|||
<title>Non-object "features" member must be ignored</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: false, geolocation: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op5",
|
||||
testJS: "resources/no-camera-no-geolocation.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-non-object
|
|
@ -3,9 +3,14 @@
|
|||
<title>Non-string "features/policy" member must be ignored</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: false, geolocation: false });
|
||||
runTestsInSubframe({
|
||||
hostname: "op6",
|
||||
testJS: "resources/no-camera-no-geolocation.mjs"
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-non-string
|
|
@ -1,8 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
window.runFPTest = ({ camera, geolocation }) => {
|
||||
export function runFPTest({ camera, geolocation }) {
|
||||
test(() => {
|
||||
assert_equals(document.featurePolicy.allowsFeature('camera', 'https://example.com/'), camera, 'camera');
|
||||
assert_equals(document.featurePolicy.allowsFeature('geolocation', 'https://example.com/'), geolocation, 'geolocation');
|
||||
});
|
||||
};
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
import { runFPTest } from "./helper.mjs";
|
||||
|
||||
runFPTest({ camera: false, geolocation: false });
|
|
@ -0,0 +1,3 @@
|
|||
import { runFPTest } from "./helper.mjs";
|
||||
|
||||
runFPTest({ camera: false, geolocation: true });
|
|
@ -0,0 +1,3 @@
|
|||
import { runFPTest } from "./helper.mjs";
|
||||
|
||||
runFPTest({ camera: true, geolocation: true });
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset="utf-8">
|
||||
<title>Valid "features" member, with a semicolon</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../resources/origin-policy-test-runner.js"></script>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runTestsInSubframe({
|
||||
hostname: "op10",
|
||||
testJS: "resources/yes-camera-yes-geolocation.mjs"
|
||||
});
|
||||
</script>
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta charset="utf-8">
|
||||
<title>Valid "features" member</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="helper.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
runFPTest({ camera: true, geolocation: true });
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
Sec-Origin-Policy: policy=policy-features-valid
|
|
@ -1,22 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test that Origin Policy report-to are deliverd to the declared reporting group</title>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="frame" src="about:blank"></iframe>
|
||||
<script>
|
||||
// Navigate the frame to a URL that declares an (invalid) origin policy with
|
||||
// a report-to directive.
|
||||
document.getElementById("frame").src =
|
||||
"https://{{hosts[alt][]}}:{{ports[https][0]}}/origin-policy/sec-origin-policy-subframe.html";
|
||||
</script>
|
||||
<script async defer src='/content-security-policy/support/checkReport.sub.js?reportField=policy&reportValue=nonexistingpolicy'>
|
||||
// This re-uses CSP reporting test infrastructure, and contains the actual
|
||||
// test. In addition to sanity checks, it will check whether the report body
|
||||
// contains a key/value pair as indicated by reportField and reportValue.
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1 +0,0 @@
|
|||
Set-Cookie: origin-policy-report-to=5b4d35b6-0771-46fe-8700-ed2bb59ed4be; Path=/origin-policy/
|
|
@ -1,143 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id=log></div>
|
||||
<iframe id=frame></iframe>
|
||||
<script>
|
||||
// Navigate the frame to a test page with the given policy and wait for
|
||||
// postMessage to arrive. Resolve the result promise with the message.
|
||||
function navigate(policy) {
|
||||
return new Promise(resolve => {
|
||||
window.addEventListener("message", event => { resolve(event.data); },
|
||||
{ once: true });
|
||||
document.getElementById("frame").src =
|
||||
"/origin-policy/sec-origin-policy-header.html.py?policy=" + policy;
|
||||
});
|
||||
}
|
||||
|
||||
// Check whether the message returned from the frame meets our expectations.
|
||||
function expect(expect_script, expect_eval, message) {
|
||||
assert_own_property(message, "inline_allowed");
|
||||
assert_own_property(message, "eval_allowed");
|
||||
assert_equals(message.inline_allowed, expect_script);
|
||||
assert_equals(message.eval_allowed, expect_eval);
|
||||
}
|
||||
|
||||
// Generate a more descriptive error message. Re-throw the error.
|
||||
function descriptive_message(policy, expect_inline, expect_eval,
|
||||
index, error) {
|
||||
error.message = `Error occured on entry #${index + 1} ["${policy
|
||||
}", ${expect_inline}, ${expect_eval}]: "${error}".`;
|
||||
throw(error);
|
||||
}
|
||||
|
||||
// Run the navigation + expectation checking for one test case line.
|
||||
function test_case_entry([policy, expect_inline, expect_eval], index) {
|
||||
return navigate(policy)
|
||||
.then(message => expect(expect_inline, expect_eval, message))
|
||||
|
||||
// This catch handler merely logs a more friendly message,
|
||||
// pointing you to the exact line of the failing test.
|
||||
.catch(error => descriptive_message(policy, expect_inline,
|
||||
expect_eval, index, error));
|
||||
}
|
||||
|
||||
function origin_policy_csp_test_case(test_case_list) {
|
||||
return t => {
|
||||
// Setup the promise chain for the test.
|
||||
let chain = Promise.resolve();
|
||||
for ([index, val] of test_case_list.entries())
|
||||
chain = chain.then(test_case_entry.bind(this, val, index));
|
||||
|
||||
// Delete the policy as the last element of the chain, on both
|
||||
// resolve + reject paths, so that a left-over policy won't break
|
||||
// subsequent tests.
|
||||
return chain.then(() => navigate("0"),
|
||||
(error) => { navigate("0"); throw error; });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Sanity check: A request with no policy.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true], // No policy.
|
||||
]), "sanity check");
|
||||
|
||||
// Basic functionality. A policy should have an effect.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true], // No policy.
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["0", true, true], // Delete the policy again.
|
||||
]), "The basics: A policy should have an effect..");
|
||||
|
||||
// Basic functionality. Set a policy. Make sure it "sticks".
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true], // No policy.
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["", true, false], // No policy. Should remember p...-csp-1.
|
||||
["0", true, true], // Delete the policy again.
|
||||
]), "The basics: A policy should stick.");
|
||||
|
||||
// Set, update, and delete a policy.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true],
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["policy-csp-2", false, false], // policy-csp-2, forbids script + eval.
|
||||
["0", true, true], // Delete the policy.
|
||||
]), "Policy set, update, and delete.");
|
||||
|
||||
// Set, update, and delete a policy. Check on each step whether it 'sticks'.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true],
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["", true, false],
|
||||
["policy-csp-2", false, false], // Forbid script + eval.
|
||||
["", false, false],
|
||||
["0", true, true], // Delete the policy.
|
||||
["", true, true],
|
||||
]), "Policy set-update-delete cycle with checks.");
|
||||
|
||||
// Set a policy, update, then revert to the old one.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true],
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["policy-csp-2", false, false], // Forbid script + eval.
|
||||
["policy-csp-1", true, false], // policy-csp-1 again.
|
||||
["0", true, true],
|
||||
]), "Policy set-update-delete cycle.");
|
||||
|
||||
// Set, delete, re-set, and re-delete a policy.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true], // No policy.
|
||||
["policy-csp-1", true, false], // policy-csp-1, which forbids eval.
|
||||
["", true, false],
|
||||
["0", true, true], // Delete the policy.
|
||||
["", true, true],
|
||||
["policy-csp-1", true, false], // Set policy after policy was deleted.
|
||||
["", true, false],
|
||||
["0", true, true], // Delete the policy again.
|
||||
["", true, true],
|
||||
]), "Policy re-set and re-delete.");
|
||||
|
||||
// We've had some bugs with repeated policies being set, so lets just
|
||||
// run through a set-update-delete cycle but with every request being
|
||||
// made twice.
|
||||
promise_test(origin_policy_csp_test_case([
|
||||
["", true, true],
|
||||
["", true, true],
|
||||
["policy-csp-1", true, false],
|
||||
["policy-csp-1", true, false],
|
||||
["policy-csp-2", false, false],
|
||||
["policy-csp-2", false, false],
|
||||
["0", true, true],
|
||||
["0", true, true],
|
||||
["", true, true],
|
||||
["", true, true],
|
||||
]), "Double Trouble");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue