mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #27139 - servo-wpt-sync:wpt_update_01-07-2020, r=jdm
Sync WPT with upstream (01-07-2020) Automated downstream sync of changes from upstream as of 01-07-2020. [no-wpt-sync] r? @servo-wpt-sync
This commit is contained in:
commit
81ec205c9d
108 changed files with 950 additions and 432 deletions
|
@ -4,7 +4,7 @@
|
|||
expected: TIMEOUT
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -5,36 +5,9 @@
|
|||
[[data-expected-height\] 7]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 4]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 1]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 10]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 2]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 5]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 6]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 9]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 8]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 13]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 12]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 11]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[border-image-shorthand-001.htm]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[align-items-009.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[HTMLMediaElement.html]
|
||||
expected: TIMEOUT
|
|
@ -315,18 +315,18 @@
|
|||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,3 +53,9 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,3 @@
|
|||
[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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -2,3 +2,9 @@
|
|||
[Test that iframes with loading='lazy' load once they enter the viewport.]
|
||||
expected: FAIL
|
||||
|
||||
[Below-viewport srcdoc iframes load lazily]
|
||||
expected: FAIL
|
||||
|
||||
[Below-viewport iframes load lazily]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[077.html]
|
||||
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[iframe_005.html]
|
||||
[document.write external script into iframe write back into parent]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[module-static-import-delayed.html]
|
||||
[document.write in an imported module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
[promise-job-entry.html]
|
||||
expected: TIMEOUT
|
||||
[Fulfillment handler on fulfilled promise]
|
||||
expected: FAIL
|
||||
|
||||
[Rejection handler on pending-then-rejected promise]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Sanity check: this all works as expected with no promises involved]
|
||||
expected: FAIL
|
||||
|
@ -15,5 +16,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[Fulfillment handler on pending-then-fulfilled promise]
|
||||
expected: FAIL
|
||||
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,5 @@
|
|||
[import-in-moduleworker.html]
|
||||
expected: ERROR
|
||||
[Base URL in module dedicated workers: import]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
|
|
@ -122662,7 +122662,7 @@
|
|||
]
|
||||
],
|
||||
"border-image-shorthand-001.htm": [
|
||||
"0f2c627d05b7b9ccb20ad63cbff04ecce22f25c5",
|
||||
"c767533d0c4d4627a4970d7f19bf748912bde0fe",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -133227,6 +133227,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"align-items-009.html": [
|
||||
"dc89b0aa9effafd3d8ae6e0dab4848499f260bcb",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square-only.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"align-items-baseline-overflow-non-visible.html": [
|
||||
"3c91bc5553084018b2c16cbeb6721077c8db54e2",
|
||||
[
|
||||
|
@ -152742,6 +152755,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"clip-path-filter-radius-clips.html": [
|
||||
"f715f0de787005e60825eb786d12fa5047041f8a",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-masking/clip-path/reference/clip-path-filter-radius-clips-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"clip-path-fixed-nested.html": [
|
||||
"5090bc2aed43e0619eb7b966c2ed46cd43057e40",
|
||||
[
|
||||
|
@ -157576,6 +157602,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"named-page.html": [
|
||||
"c8b486f2806037042afcf1f24835f0cade507b82",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"nested-with-padding-and-spanner.html": [
|
||||
"bea27a95781c3dd4abf0d590fd15d64530fd9154",
|
||||
[
|
||||
|
@ -242200,6 +242239,21 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"scripted": {
|
||||
"script-style-attribute-csp.html": [
|
||||
"a70138d98ac6fcd01ab14830acd833a154d6cf41",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/svg/scripted/script-style-attribute-csp-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"shapes": {
|
||||
"circle-01.svg": [
|
||||
"8eecd6621fb47d0aafc79eed5db00780220b6496",
|
||||
|
@ -249390,7 +249444,7 @@
|
|||
[]
|
||||
],
|
||||
"accept-ch-feature-policy-navigation.https.html.headers": [
|
||||
"1fa9c5cb80064e928b9288ada154ac3c3ccdcd3e",
|
||||
"557140f8f2d821e031e23c10f94aa65a7c283254",
|
||||
[]
|
||||
],
|
||||
"accept-ch-feature-policy.sub.https.html.headers": [
|
||||
|
@ -249402,7 +249456,7 @@
|
|||
[]
|
||||
],
|
||||
"accept-ch-no-feature-policy-navigation.https.html.headers": [
|
||||
"7eb28a000bdde9634e618701e2ba512e4a9ebc49",
|
||||
"7da10731654a70ce6dd95cd319e3f48b4be23ea6",
|
||||
[]
|
||||
],
|
||||
"accept-ch-no-feature-policy.sub.https.html.headers": [
|
||||
|
@ -249666,7 +249720,7 @@
|
|||
[]
|
||||
],
|
||||
"get-host-info.sub.js": [
|
||||
"1f4c0e5bf2a3b3a31f59b5b2e63a8242d8fec0c6",
|
||||
"1c28a7f476f67d513e4627b6133d0c2e0ffc867a",
|
||||
[]
|
||||
],
|
||||
"get-host-info.sub.js.headers": [
|
||||
|
@ -249698,7 +249752,7 @@
|
|||
[]
|
||||
],
|
||||
"redirect-opt-in.py": [
|
||||
"ff5744b181547ab977c3f405bfeb96013a3cc4ce",
|
||||
"b5e674a27fb6e2b459b1815ca86fe3c8f1d9b60f",
|
||||
[]
|
||||
],
|
||||
"redirect.py": [
|
||||
|
@ -249913,6 +249967,10 @@
|
|||
"f3b1c7e2ea61b571bd56cc1c70c5f89bb8e7e4dc",
|
||||
[]
|
||||
],
|
||||
"square.png": [
|
||||
"01c9666a8de9d5535615aff830810e5df4b2156f",
|
||||
[]
|
||||
],
|
||||
"stringifiers.js": [
|
||||
"4ef7a1bfedaba1835bb44cca9207e0748ba83522",
|
||||
[]
|
||||
|
@ -268298,15 +268356,15 @@
|
|||
"embedded-enforcement": {
|
||||
"support": {
|
||||
"echo-allow-csp-from.py": [
|
||||
"fa1064adc84a21029fa2cc8c1afa887018da44ad",
|
||||
"b9422f3e415e5f3a0744d8d8f5543dde0aab12b9",
|
||||
[]
|
||||
],
|
||||
"echo-policy-multiple.py": [
|
||||
"8100086a3d849c6c7d4cf4f4c0c85f9a89a0e40e",
|
||||
"368115015c52fbbc84c5b1eb19c37923abdf8ebe",
|
||||
[]
|
||||
],
|
||||
"echo-required-csp.py": [
|
||||
"03f7ca1eb29a4f7882dc3a3b02a1b0992691be05",
|
||||
"90fc1d1176334b8d1608bc6fbd9a6ba2dea72f76",
|
||||
[]
|
||||
],
|
||||
"executor.html": [
|
||||
|
@ -268442,7 +268500,7 @@
|
|||
],
|
||||
"support": {
|
||||
"304-response.py": [
|
||||
"4980937eab7f7d07c80104fa2e73371781366c76",
|
||||
"f9756555f79ee350f9b86de5b5b221c056265e09",
|
||||
[]
|
||||
],
|
||||
"eval.js": [
|
||||
|
@ -268594,7 +268652,7 @@
|
|||
],
|
||||
"support": {
|
||||
"delayed_frame.py": [
|
||||
"21886c7092a63b77239ba3af92194b5d185ac2d1",
|
||||
"06bcb9b680c5769093d050cc019c54ee6d909dfc",
|
||||
[]
|
||||
],
|
||||
"form_action_navigation.sub.html": [
|
||||
|
@ -268642,7 +268700,7 @@
|
|||
[]
|
||||
],
|
||||
"redirect_to_post_message_to_frame_owner.py": [
|
||||
"d22e9202a2a57fac314b1fee26a9a88d68db6c26",
|
||||
"0f6f6eca7b0d90c947ab83d3b4a42c9ac53e16f4",
|
||||
[]
|
||||
],
|
||||
"spv-test-iframe1.sub.html": [
|
||||
|
@ -268826,7 +268884,7 @@
|
|||
[]
|
||||
],
|
||||
"set-cookie.py": [
|
||||
"7f321a5c39d749d0695866cc497bd861c5e0ba96",
|
||||
"38325f0651be0c315042459d99911694c9e2799a",
|
||||
[]
|
||||
],
|
||||
"throw-function.js": [
|
||||
|
@ -269211,7 +269269,7 @@
|
|||
[]
|
||||
],
|
||||
"echo-policy.py": [
|
||||
"ebde3dc5a4bf75c268d591c33a31cb2d38dfc5f4",
|
||||
"3a4b2f3d2e53eb2bdb8fd67263ac52849aad237e",
|
||||
[]
|
||||
],
|
||||
"fail.asis": [
|
||||
|
@ -269309,11 +269367,11 @@
|
|||
[]
|
||||
],
|
||||
"report.py": [
|
||||
"3b249f30b3e2ca86b2a6d3d43e547cd50bf58ec8",
|
||||
"d3664c63ae759965821976c411699bd89adbe542",
|
||||
[]
|
||||
],
|
||||
"resource.py": [
|
||||
"1e3a0bf7b0e00283e9da45df737e27a892d917ae",
|
||||
"4d73d5bf76a64b47db1fd75b9fa8ddb78962fc63",
|
||||
[]
|
||||
],
|
||||
"service-worker-helper.js": [
|
||||
|
@ -302364,6 +302422,10 @@
|
|||
"5adc91a5c00f27f0d3225c99a6c2534b5b868a8d",
|
||||
[]
|
||||
],
|
||||
"clip-path-filter-radius-clips-ref.html": [
|
||||
"72bdf2202d5eb51b2224bb906b441b38b870742e",
|
||||
[]
|
||||
],
|
||||
"clip-path-path-001-ref.html": [
|
||||
"afc1d18f204e9fd9a26f35711bb3e04ac4473d67",
|
||||
[]
|
||||
|
@ -323171,6 +323233,14 @@
|
|||
"a2836778bc5389fdb65e9f6d5f83c7967200866f",
|
||||
[]
|
||||
],
|
||||
"permissions-policy-feature-policy-coexist.https.html.headers": [
|
||||
"100e68e9ad48014fd9943d1acf77e9e5b794e756",
|
||||
[]
|
||||
],
|
||||
"permissions-policy-header-policy-allowed-for-self.https.sub.html.sub.headers": [
|
||||
"ff7ae4135338e3e525f6f5e0bfe38865c16b30e1",
|
||||
[]
|
||||
],
|
||||
"picture-in-picture-allowed-by-feature-policy.https.sub.html.headers": [
|
||||
"0204b73b18ac3a69e51a545be3a6cbd325ea0361",
|
||||
[]
|
||||
|
@ -323884,7 +323954,7 @@
|
|||
[]
|
||||
],
|
||||
"sniffable-resource.py": [
|
||||
"7a649c224047a1a510f64a12a146c1e8bb5a0afa",
|
||||
"f8150936acbe022be52d2f95f733056a0576856b",
|
||||
[]
|
||||
],
|
||||
"subframe-that-posts-html-containing-blob-url-to-parent.html": [
|
||||
|
@ -323900,11 +323970,11 @@
|
|||
[]
|
||||
],
|
||||
"hello.py": [
|
||||
"2b7cb6c6fc9fa99cfbba33a4dc456770ca2709ba",
|
||||
"2b1cb84bad2de1835dff3e9997715300c6173272",
|
||||
[]
|
||||
],
|
||||
"iframe.py": [
|
||||
"5872842c673ba5fc10ce0aefbab1c114ccaaa56a",
|
||||
"815ecf5927ce370998e3908f8eb49e961e3e1c64",
|
||||
[]
|
||||
],
|
||||
"iframeFetch.html": [
|
||||
|
@ -323912,15 +323982,15 @@
|
|||
[]
|
||||
],
|
||||
"image.py": [
|
||||
"ad9295cf6828740159ffcc8259c25239220d7a7b",
|
||||
"2a779cf11bfb1f1708014bb7d0c4a412f6944168",
|
||||
[]
|
||||
],
|
||||
"redirect.py": [
|
||||
"73793b074272e90226da3919bd3dab95b8173d38",
|
||||
"0dad4dd923b1112b43b8900b7b4e78a0a55b5d5e",
|
||||
[]
|
||||
],
|
||||
"script.py": [
|
||||
"c9bd6b9c9ee8610de543b756591500de852d6755",
|
||||
"58f8d341547e150c9a34aaf5c9800a26458b45f2",
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
@ -324076,23 +324146,23 @@
|
|||
],
|
||||
"resources": {
|
||||
"css.py": [
|
||||
"f283e785d900cd73bf14171c411713202eef00ca",
|
||||
"8afb56991d76abd898074ceccc688cc2873eba16",
|
||||
[]
|
||||
],
|
||||
"image.py": [
|
||||
"a19ff1f3a076c34ea17c00e3cd13a3e6e5f6b6bc",
|
||||
"9fd367c85c5478ace9dd601fe7d8adead247006f",
|
||||
[]
|
||||
],
|
||||
"js.py": [
|
||||
"4fb7fb660086a6665b680ce9abb645e1bdaa510e",
|
||||
"784050a2caf5454d3b537061eeeb32ee7ab0113b",
|
||||
[]
|
||||
],
|
||||
"nosniff.py": [
|
||||
"9b59d35b925ef40195b80c1d866280b185ae63c5",
|
||||
"bc85ea0ec9837cdb71451f7237e46aea5ce6f231",
|
||||
[]
|
||||
],
|
||||
"worker.py": [
|
||||
"a06a3a2237834aed6e03acf9a8f7e14c794ae276",
|
||||
"2d7e3f6c905fe45bf4986aecc5c339e0462e17f9",
|
||||
[]
|
||||
],
|
||||
"x-content-type-options.json": [
|
||||
|
@ -327808,11 +327878,11 @@
|
|||
"cda6ab2272fc4858f8ba4119d13ca07104c7601f",
|
||||
[]
|
||||
],
|
||||
"require-corp-about-blank.html.headers": [
|
||||
"require-corp-about-blank.https.html.headers": [
|
||||
"8df98474b589d070992677cb0134bd47bd0509c4",
|
||||
[]
|
||||
],
|
||||
"require-corp-about-srcdoc.html.headers": [
|
||||
"require-corp-about-srcdoc.https.html.headers": [
|
||||
"8df98474b589d070992677cb0134bd47bd0509c4",
|
||||
[]
|
||||
],
|
||||
|
@ -338153,6 +338223,10 @@
|
|||
"be9365e38936fd414c47ef3ae95772742a658176",
|
||||
[]
|
||||
],
|
||||
"webhid.idl": [
|
||||
"aa699a31ba71135cfa3538a0742078d7d9db5770",
|
||||
[]
|
||||
],
|
||||
"webmidi.idl": [
|
||||
"0e390f8bde70934d9934714d8c6853703dabb2b8",
|
||||
[]
|
||||
|
@ -345854,11 +345928,11 @@
|
|||
[]
|
||||
],
|
||||
"navigation-redirect-scope1.py": [
|
||||
"16850723f968fd3fac51a33c6e983c4f013a8823",
|
||||
"9b90b146955b86b15e828da7111faefaa25699c2",
|
||||
[]
|
||||
],
|
||||
"navigation-redirect-scope2.py": [
|
||||
"16850723f968fd3fac51a33c6e983c4f013a8823",
|
||||
"9b90b146955b86b15e828da7111faefaa25699c2",
|
||||
[]
|
||||
],
|
||||
"navigation-redirect-to-http-iframe.html": [
|
||||
|
@ -345882,7 +345956,7 @@
|
|||
[]
|
||||
],
|
||||
"notification_icon.py": [
|
||||
"517ab0a0dee25aa8d4997e12189551436c1c68be",
|
||||
"da479fcd9b8352e21f95695b990d4efdac3b055b",
|
||||
[]
|
||||
],
|
||||
"object-image-is-not-intercepted-iframe.html": [
|
||||
|
@ -346050,7 +346124,7 @@
|
|||
[]
|
||||
],
|
||||
"redirect.py": [
|
||||
"20521b00c9cae0485678007b83683503512d8356",
|
||||
"ad47e218fcfab5b9b6f66030c92248e637d47774",
|
||||
[]
|
||||
],
|
||||
"referer-iframe.html": [
|
||||
|
@ -346110,7 +346184,7 @@
|
|||
[]
|
||||
],
|
||||
"request-headers.py": [
|
||||
"29897f4ecffb16abec226f87e12ee54ffabdf7b7",
|
||||
"6ab148e22e798cb62f2f84b493b19d66d86a494b",
|
||||
[]
|
||||
],
|
||||
"resource-timing-iframe.sub.html": [
|
||||
|
@ -346142,7 +346216,7 @@
|
|||
[]
|
||||
],
|
||||
"sandboxed-iframe-fetch-event-iframe.py": [
|
||||
"8b2244bf209455e2737482648286953eb784c2a1",
|
||||
"409a15b156e7f40e1c7bd9ebe4fd88be02ddb4bb",
|
||||
[]
|
||||
],
|
||||
"sandboxed-iframe-fetch-event-worker.js": [
|
||||
|
@ -346166,11 +346240,11 @@
|
|||
]
|
||||
},
|
||||
"service-worker-csp-worker.py": [
|
||||
"62c945f82213ffb89d2d84eb93f8d30176738fac",
|
||||
"35a46964a7871a7ab85d4b0b181e5ff2e3f496fc",
|
||||
[]
|
||||
],
|
||||
"service-worker-header.py": [
|
||||
"74f57a72a9041762f9f50732d2ce890d889810c5",
|
||||
"d64a9d2494599afc2747e35a24985db6c73c1ce2",
|
||||
[]
|
||||
],
|
||||
"service-worker-interception-dynamic-import-worker.js": [
|
||||
|
@ -346230,7 +346304,7 @@
|
|||
[]
|
||||
],
|
||||
"success.py": [
|
||||
"bcbb487d2b29d4ef089a6c7dc18e1cc166a262fc",
|
||||
"a0269918ee8f1c8e79896f977c6d9129821ff96e",
|
||||
[]
|
||||
],
|
||||
"svg-target-reftest-001-frame.html": [
|
||||
|
@ -346254,7 +346328,7 @@
|
|||
[]
|
||||
],
|
||||
"test-request-headers-worker.py": [
|
||||
"b128a2a689159af3e71a970be1e199aa0abc2dbd",
|
||||
"78a93356b75f56e43818abafa344f21ec4201aa5",
|
||||
[]
|
||||
],
|
||||
"testharness-helpers.js": [
|
||||
|
@ -346262,7 +346336,7 @@
|
|||
[]
|
||||
],
|
||||
"trickle.py": [
|
||||
"319ecd21f4503ccf2f9326bdf53c010089eee5d2",
|
||||
"5a3f2eb23590a37b415cfe8c2d647ad57878064c",
|
||||
[]
|
||||
],
|
||||
"unregister-controller-page.html": [
|
||||
|
@ -346280,7 +346354,7 @@
|
|||
]
|
||||
},
|
||||
"update-claim-worker.py": [
|
||||
"551246c96abfc88752a2b9695f454dc1b8fdb769",
|
||||
"64914a9dfe5f13d7ae0f6b97ce8d18a5b46c30b4",
|
||||
[]
|
||||
],
|
||||
"update-during-installation-worker.js": [
|
||||
|
@ -346288,35 +346362,35 @@
|
|||
[]
|
||||
],
|
||||
"update-during-installation-worker.py": [
|
||||
"95e4522007c1d2be14045f7582ebe2b5347abd87",
|
||||
"3e15926185642a240ffa0223a2836a12fa45bf6d",
|
||||
[]
|
||||
],
|
||||
"update-fetch-worker.py": [
|
||||
"f28e1c094e501d1837dc7585e44b9b9e938e3344",
|
||||
"02cbb42dc6e8abce2cbfa3de0eb6cc41da1ab61b",
|
||||
[]
|
||||
],
|
||||
"update-max-aged-worker-imported-script.py": [
|
||||
"b9a8a4af079ab3b01300e1a090413594e80b6218",
|
||||
"7cc5a6561e7108286cf8a35e8bc79d80ebadf128",
|
||||
[]
|
||||
],
|
||||
"update-max-aged-worker.py": [
|
||||
"9bdaee795eb7ee20342f2cfabeb62078ff0adc0e",
|
||||
"4f879069ef98ad7ff738cf144fe1fd75fdd1089e",
|
||||
[]
|
||||
],
|
||||
"update-missing-import-scripts-imported-worker.py": [
|
||||
"2d95387fc9233ed12fa26b36f06a99f9775ed08b",
|
||||
"1547cb5235aaa09101872b166565e4b830bc1948",
|
||||
[]
|
||||
],
|
||||
"update-missing-import-scripts-main-worker.py": [
|
||||
"b1d2f6fcb78271bf533ec8ec4aa415c21c8d15c2",
|
||||
"1c447e118ee71765a18a3343c88e0fc0fd12ee27",
|
||||
[]
|
||||
],
|
||||
"update-nocookie-worker.py": [
|
||||
"0f09b7e32c03c3724cbb55e88f19c0b9b4d78db7",
|
||||
"34eff0263c95ae7751199ad9596c5b773e476731",
|
||||
[]
|
||||
],
|
||||
"update-recovery-worker.py": [
|
||||
"8aaa5ca934457714ee0e529ad4b2b1740d9758dd",
|
||||
"9ac7ce7c751c596697c38368573f31d69a2769ee",
|
||||
[]
|
||||
],
|
||||
"update-registration-with-type.py": [
|
||||
|
@ -346340,7 +346414,7 @@
|
|||
[]
|
||||
],
|
||||
"update_shell.py": [
|
||||
"6e89a3a018a1108a802750816259242acb4a2c13",
|
||||
"20705094379bbe1417025ff4ff5f6d9ff4581025",
|
||||
[]
|
||||
],
|
||||
"vtt-frame.html": [
|
||||
|
@ -347679,6 +347753,12 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"scripted": {
|
||||
"script-style-attribute-csp-ref.html": [
|
||||
"a7316213f13a57fa1c3ab5c058bc9d21f14d5055",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"shapes": {
|
||||
"circle-01-ref.svg": [
|
||||
"1d62e8e2af82f8da03937be22d4c3f695111edb8",
|
||||
|
@ -385642,6 +385722,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"remove-float-in-first-line.html": [
|
||||
"56f1c87c9c7512a505317758cafbd63dd9f217d6",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"zero-space-between-floats-001.html": [
|
||||
"a7796011b0191e18ac24dee8ac94d2e878752201",
|
||||
[
|
||||
|
@ -429476,6 +429563,20 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"permissions-policy-feature-policy-coexist.https.html": [
|
||||
"72836b0d1f9c453614a9234569584a50c9cfaecd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"permissions-policy-header-policy-allowed-for-self.https.sub.html": [
|
||||
"5c4c6568f2fc6161de8d5017576c2606acfc11ab",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"picture-in-picture-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
|
||||
"a5ea5139a937984c98f169a088bc6d59f0ba4351",
|
||||
[
|
||||
|
@ -454130,14 +454231,14 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"require-corp-about-blank.html": [
|
||||
"require-corp-about-blank.https.html": [
|
||||
"945333b83d54cf2148070f1a842e11155a14434c",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"require-corp-about-srcdoc.html": [
|
||||
"require-corp-about-srcdoc.https.html": [
|
||||
"5d06286d915aef65355fe6f155176c45b6e179d4",
|
||||
[
|
||||
null,
|
||||
|
@ -461463,7 +461564,7 @@
|
|||
]
|
||||
],
|
||||
"iframe-loading-lazy.tentative.html": [
|
||||
"0a882ef25bc19ad5c3c531cd5a40eed2fa0ced03",
|
||||
"1a5f8f7407e3403888239325c0603b5ec4101ffd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -481678,7 +481779,7 @@
|
|||
]
|
||||
],
|
||||
"fcp-video-frame.html": [
|
||||
"cdfd1670715d42fbefc123a40403096be4dd1bad",
|
||||
"9089883cdfbd0a836a3211e24a0208dd5edf0ee9",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -519556,6 +519657,26 @@
|
|||
]
|
||||
]
|
||||
},
|
||||
"webhid": {
|
||||
"idlharness.https.window.js": [
|
||||
"fa763e0d80ac7e196cd276a9aed5a7a33f9d8331",
|
||||
[
|
||||
"webhid/idlharness.https.window.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"script",
|
||||
"/resources/WebIDLParser.js"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/resources/idlharness.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"webmessaging": {
|
||||
"Channel_postMessage_Blob.htm": [
|
||||
"c8c247ef59dc7b513c54459fc83fd1aa6fcec8dd",
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -8,6 +8,9 @@
|
|||
[[data-expected-height\] 3]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 4]
|
||||
[[data-expected-height\] 1]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 2]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[border-image-shorthand-001.htm]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[HTMLMediaElement.html]
|
||||
expected: TIMEOUT
|
|
@ -315,18 +315,18 @@
|
|||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,3 +53,9 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript error]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,6 +11,3 @@
|
|||
[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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[cross-origin-objects-on-new-window.html]
|
||||
expected: TIMEOUT
|
|
@ -2,3 +2,9 @@
|
|||
[Test that iframes with loading='lazy' load once they enter the viewport.]
|
||||
expected: FAIL
|
||||
|
||||
[Below-viewport srcdoc iframes load lazily]
|
||||
expected: FAIL
|
||||
|
||||
[Below-viewport iframes load lazily]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[077.html]
|
||||
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[iframe_005.html]
|
||||
[document.write external script into iframe write back into parent]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[module-static-import-delayed.html]
|
||||
[document.write in an imported module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
[promise-job-entry.html]
|
||||
expected: TIMEOUT
|
||||
[Fulfillment handler on fulfilled promise]
|
||||
expected: FAIL
|
||||
|
||||
[Rejection handler on pending-then-rejected promise]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Sanity check: this all works as expected with no promises involved]
|
||||
expected: FAIL
|
||||
|
@ -15,5 +16,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[Fulfillment handler on pending-then-fulfilled promise]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
5
tests/wpt/metadata/webmessaging/with-ports/017.html.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
[import-in-moduleworker.html]
|
||||
expected: ERROR
|
||||
[Base URL in module dedicated workers: import]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Accept-CH: Device-Memory, DPR, Viewport-Width
|
||||
Accept-CH-Lifetime: 1
|
||||
Accept-CH-Lifetime: 100
|
||||
Feature-Policy: ch-device-memory *; ch-dpr 'none'; ch-viewport-width 'self'; ch-lang 'none'; ch-ua 'self'; ch-ua-mobile 'none'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Accept-CH: Device-Memory, DPR, Viewport-Width
|
||||
Accept-CH-Lifetime: 1
|
||||
Accept-CH-Lifetime: 100
|
||||
|
|
|
@ -7,7 +7,6 @@ function get_host_info() {
|
|||
var HTTP_PORT = '{{ports[http][0]}}';
|
||||
var HTTP_PORT2 = '{{ports[http][1]}}';
|
||||
var HTTPS_PORT = '{{ports[https][0]}}';
|
||||
var HTTPS_PORT2 = '{{ports[https][1]}}';
|
||||
var PROTOCOL = self.location.protocol;
|
||||
var IS_HTTPS = (PROTOCOL == "https:");
|
||||
var HTTP_PORT_ELIDED = HTTP_PORT == "80" ? "" : (":" + HTTP_PORT);
|
||||
|
|
|
@ -6,15 +6,15 @@ def main(request, response):
|
|||
location - The resource to redirect to.
|
||||
"""
|
||||
status = 302
|
||||
if "status" in request.GET:
|
||||
if b"status" in request.GET:
|
||||
try:
|
||||
status = int(request.GET.first("status"))
|
||||
status = int(request.GET.first(b"status"))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
response.status = status
|
||||
|
||||
location = request.GET.first("location")
|
||||
location = request.GET.first(b"location")
|
||||
|
||||
response.headers.set("Location", location)
|
||||
response.headers.set("Timing-Allow-Origin", "*")
|
||||
response.headers.set(b"Location", location)
|
||||
response.headers.set(b"Timing-Allow-Origin", b"*")
|
||||
|
|
BIN
tests/wpt/web-platform-tests/common/square.png
Normal file
BIN
tests/wpt/web-platform-tests/common/square.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -1,10 +1,10 @@
|
|||
import json
|
||||
def main(request, response):
|
||||
headers = [("Content-Type", "text/html")]
|
||||
if "allow_csp_from" in request.GET:
|
||||
headers.append(("Allow-CSP-From", request.GET["allow_csp_from"]))
|
||||
message = request.GET["id"]
|
||||
return headers, '''
|
||||
headers = [(b"Content-Type", b"text/html")]
|
||||
if b"allow_csp_from" in request.GET:
|
||||
headers.append((b"Allow-CSP-From", request.GET[b"allow_csp_from"]))
|
||||
message = request.GET[b"id"]
|
||||
return headers, b'''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
def main(request, response):
|
||||
headers = [("Content-Type", "text/html")]
|
||||
if "policy" in request.GET:
|
||||
headers.append(("Content-Security-Policy", request.GET["policy"]))
|
||||
if "policy2" in request.GET:
|
||||
headers.append(("Content-Security-Policy", request.GET["policy2"]))
|
||||
if "policy3" in request.GET:
|
||||
headers.append(("Content-Security-Policy", request.GET["policy3"]))
|
||||
message = request.GET["id"]
|
||||
return headers, '''
|
||||
headers = [(b"Content-Type", b"text/html")]
|
||||
if b"policy" in request.GET:
|
||||
headers.append((b"Content-Security-Policy", request.GET[b"policy"]))
|
||||
if b"policy2" in request.GET:
|
||||
headers.append((b"Content-Security-Policy", request.GET[b"policy2"]))
|
||||
if b"policy3" in request.GET:
|
||||
headers.append((b"Content-Security-Policy", request.GET[b"policy3"]))
|
||||
message = request.GET[b"id"]
|
||||
return headers, b'''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
@ -1,30 +1,36 @@
|
|||
import json
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
message = {}
|
||||
|
||||
header = request.headers.get("Test-Header-Injection");
|
||||
message['test_header_injection'] = header if header else None
|
||||
header = request.headers.get(b"Test-Header-Injection");
|
||||
message[u'test_header_injection'] = isomorphic_decode(header) if header else None
|
||||
|
||||
header = request.headers.get("Sec-Required-CSP");
|
||||
message['required_csp'] = header if header else None
|
||||
header = request.headers.get(b"Sec-Required-CSP");
|
||||
message[u'required_csp'] = isomorphic_decode(header) if header else None
|
||||
|
||||
second_level_iframe_code = ""
|
||||
if "include_second_level_iframe" in request.GET:
|
||||
if "second_level_iframe_csp" in request.GET and request.GET["second_level_iframe_csp"] != "":
|
||||
second_level_iframe_code = '''<script>
|
||||
header = request.headers.get(b"Sec-Required-CSP");
|
||||
message[u'required_csp'] = isomorphic_decode(header) if header else None
|
||||
|
||||
second_level_iframe_code = u""
|
||||
if b"include_second_level_iframe" in request.GET:
|
||||
if b"second_level_iframe_csp" in request.GET and request.GET[b"second_level_iframe_csp"] != b"":
|
||||
second_level_iframe_code = u'''<script>
|
||||
var i2 = document.createElement('iframe');
|
||||
i2.src = 'echo-required-csp.py';
|
||||
i2.csp = "{0}";
|
||||
document.body.appendChild(i2);
|
||||
</script>'''.format(request.GET["second_level_iframe_csp"])
|
||||
</script>'''.format(isomorphic_decode(request.GET[b"second_level_iframe_csp"]))
|
||||
else:
|
||||
second_level_iframe_code = '''<script>
|
||||
second_level_iframe_code = u'''<script>
|
||||
var i2 = document.createElement('iframe');
|
||||
i2.src = 'echo-required-csp.py';
|
||||
document.body.appendChild(i2);
|
||||
</script>'''
|
||||
|
||||
return [("Content-Type", "text/html"), ("Allow-CSP-From", "*")], '''
|
||||
return [(b"Content-Type", b"text/html"), (b"Allow-CSP-From", b"*")], u'''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
def main(request, response):
|
||||
if request.headers.get("If-None-Match"):
|
||||
if request.headers.get(b"If-None-Match"):
|
||||
# we are now receing the second request, we will send back a different CSP
|
||||
# with the 304 response
|
||||
response.status = 304
|
||||
headers = [("Content-Type", "text/html"),
|
||||
("Content-Security-Policy", "script-src 'nonce-def' 'sha256-IIB78ZS1RMMrAWpsLg/RrDbVPhI14rKm3sFOeKPYulw=';"),
|
||||
("Cache-Control", "private, max-age=0, must-revalidate"),
|
||||
("ETag", "123456")]
|
||||
return headers, ""
|
||||
headers = [(b"Content-Type", b"text/html"),
|
||||
(b"Content-Security-Policy", b"script-src 'nonce-def' 'sha256-IIB78ZS1RMMrAWpsLg/RrDbVPhI14rKm3sFOeKPYulw=';"),
|
||||
(b"Cache-Control", b"private, max-age=0, must-revalidate"),
|
||||
(b"ETag", b"123456")]
|
||||
return headers, u""
|
||||
else:
|
||||
headers = [("Content-Type", "text/html"),
|
||||
("Content-Security-Policy", "script-src 'nonce-abc' 'sha256-IIB78ZS1RMMrAWpsLg/RrDbVPhI14rKm3sFOeKPYulw=';"),
|
||||
("Cache-Control", "private, max-age=0, must-revalidate"),
|
||||
("Etag", "123456")]
|
||||
return headers, '''
|
||||
headers = [(b"Content-Type", b"text/html"),
|
||||
(b"Content-Security-Policy", b"script-src 'nonce-abc' 'sha256-IIB78ZS1RMMrAWpsLg/RrDbVPhI14rKm3sFOeKPYulw=';"),
|
||||
(b"Cache-Control", b"private, max-age=0, must-revalidate"),
|
||||
(b"Etag", b"123456")]
|
||||
return headers, u'''
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import time
|
||||
def main(request, response):
|
||||
time.sleep(1)
|
||||
headers = [("Content-Type", "text/html")]
|
||||
return headers, '''
|
||||
headers = [(b"Content-Type", b"text/html")]
|
||||
return headers, u'''
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
</head>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
def main(request, response):
|
||||
response.status = 302
|
||||
if "location" in request.GET:
|
||||
response.headers.set("Location", request.GET["location"])
|
||||
if b"location" in request.GET:
|
||||
response.headers.set(b"Location", request.GET[b"location"])
|
||||
else:
|
||||
response.headers.set("Location", "post_message_to_frame_owner.html")
|
||||
response.headers.set(b"Location", b"post_message_to_frame_owner.html")
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
import sys
|
||||
import urlparse
|
||||
|
||||
def main(request, response):
|
||||
"""
|
||||
Returns cookie name and path from query params in a Set-Cookie header.
|
||||
|
@ -19,10 +16,14 @@ def main(request, response):
|
|||
< Date: Tue, 04 Oct 2016 18:16:06 GMT
|
||||
< Content-Length: 80
|
||||
"""
|
||||
params = urlparse.parse_qs(request.url_parts.query)
|
||||
|
||||
name = request.GET[b'name']
|
||||
path = request.GET[b'path']
|
||||
cookie = b"%s=1; Path=%s; Expires=Wed, 09 Jun 2021 10:18:14 GMT" % (name, path)
|
||||
|
||||
headers = [
|
||||
("Content-Type", "application/json"),
|
||||
("Set-Cookie", "{name[0]}={value[0]}; Path={path[0]}; Expires=Wed, 09 Jun 2021 10:18:14 GMT".format(**params))
|
||||
(b"Content-Type", b"application/json"),
|
||||
(b"Set-Cookie", cookie)
|
||||
]
|
||||
body = "{}"
|
||||
body = b"{}"
|
||||
return headers, body
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
def main(request, response):
|
||||
policy = request.GET.first("policy");
|
||||
return [("Content-Type", "text/html"), ("Content-Security-Policy", policy)], "<!DOCTYPE html><title>Echo.</title>"
|
||||
policy = request.GET.first(b"policy")
|
||||
return [(b"Content-Type", b"text/html"), (b"Content-Security-Policy", policy)], b"<!DOCTYPE html><title>Echo.</title>"
|
||||
|
|
|
@ -2,6 +2,8 @@ import time
|
|||
import json
|
||||
import re
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def retrieve_from_stash(request, key, timeout, default_value):
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < timeout:
|
||||
|
@ -13,32 +15,32 @@ def retrieve_from_stash(request, key, timeout, default_value):
|
|||
return default_value
|
||||
|
||||
def main(request, response):
|
||||
op = request.GET.first("op");
|
||||
key = request.GET.first("reportID")
|
||||
cookie_key = re.sub('^....', 'cccc', key)
|
||||
count_key = re.sub('^....', 'dddd', key)
|
||||
op = request.GET.first(b"op")
|
||||
key = request.GET.first(b"reportID")
|
||||
cookie_key = re.sub(b'^....', b'cccc', key)
|
||||
count_key = re.sub(b'^....', b'dddd', key)
|
||||
|
||||
try:
|
||||
timeout = request.GET.first("timeout")
|
||||
timeout = request.GET.first(b"timeout")
|
||||
except:
|
||||
timeout = 0.5
|
||||
timeout = float(timeout)
|
||||
|
||||
if op == "retrieve_report":
|
||||
return [("Content-Type", "application/json")], retrieve_from_stash(request, key, timeout, json.dumps({'error': 'No such report.' , 'guid' : key}))
|
||||
if op == b"retrieve_report":
|
||||
return [(b"Content-Type", b"application/json")], retrieve_from_stash(request, key, timeout, json.dumps({u'error': u'No such report.', u'guid' : isomorphic_decode(key)}))
|
||||
|
||||
if op == "retrieve_cookies":
|
||||
return [("Content-Type", "application/json")], "{ \"reportCookies\" : " + str(retrieve_from_stash(request, cookie_key, timeout, "\"None\"")) + "}"
|
||||
if op == b"retrieve_cookies":
|
||||
return [(b"Content-Type", b"application/json")], u"{ \"reportCookies\" : " + str(retrieve_from_stash(request, cookie_key, timeout, u"\"None\"")) + u"}"
|
||||
|
||||
if op == "retrieve_count":
|
||||
return [("Content-Type", "application/json")], json.dumps({'report_count': str(retrieve_from_stash(request, count_key, timeout, 0))})
|
||||
if op == b"retrieve_count":
|
||||
return [(b"Content-Type", b"application/json")], json.dumps({u'report_count': str(retrieve_from_stash(request, count_key, timeout, 0))})
|
||||
|
||||
# save cookies
|
||||
if hasattr(request, 'cookies') and len(request.cookies.keys()) > 0:
|
||||
if hasattr(request, u'cookies') and len(request.cookies.keys()) > 0:
|
||||
# convert everything into strings and dump it into a dict so it can be jsoned
|
||||
temp_cookies_dict = {}
|
||||
for dict_key in request.cookies.keys():
|
||||
temp_cookies_dict[str(dict_key)] = str(request.cookies.get_list(dict_key))
|
||||
temp_cookies_dict[isomorphic_decode(dict_key)] = str(request.cookies.get_list(dict_key))
|
||||
with request.server.stash.lock:
|
||||
request.server.stash.take(key=cookie_key)
|
||||
request.server.stash.put(key=cookie_key, value=json.dumps(temp_cookies_dict))
|
||||
|
@ -59,4 +61,4 @@ def main(request, response):
|
|||
request.server.stash.put(key=count_key, value=count)
|
||||
|
||||
# return acknowledgement report
|
||||
return [("Content-Type", "text/plain")], "Recorded report " + report
|
||||
return [(b"Content-Type", b"text/plain")], b"Recorded report " + report
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def main(request, response):
|
||||
headers = []
|
||||
headers.append(("Access-Control-Allow-Origin", "*"))
|
||||
headers.append((b"Access-Control-Allow-Origin", b"*"))
|
||||
|
||||
return headers, "{ \"result\": \"success\" }"
|
||||
return headers, b"{ \"result\": \"success\" }"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Removing floats in ::first-line should not crash</title>
|
||||
<link rel="author" href="kojii@chromium.org">
|
||||
<link rel="help" href="https://crbug.com/1100900">
|
||||
<meta name="assert" content="Removing floats in ::first-line should not crash">
|
||||
<style>
|
||||
#container {
|
||||
display: flow-root;
|
||||
}
|
||||
#container::first-line {
|
||||
background: orange;
|
||||
}
|
||||
#float {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<div id="container">text<span id="float"></span></div>
|
||||
</body>
|
||||
<script>
|
||||
test(() => {
|
||||
document.body.offsetTop;
|
||||
let float = document.getElementById('float');
|
||||
float.remove();
|
||||
let container = document.getElementById('container');
|
||||
container.style.color = 'blue';
|
||||
}, 'No crash or DCHECK failure');
|
||||
</script>
|
|
@ -36,6 +36,6 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there are <strong>2 identical images</strong>.
|
||||
<p>Test passes if there are <strong>2 identical images.</strong>
|
||||
<div id="test"></div>
|
||||
<div id="reference"></div>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://crbug.com/1100203">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
#target {
|
||||
font: 100px/1 'Ahem';
|
||||
color: green;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
width: 200px;
|
||||
|
||||
position: relative;
|
||||
left: -50px;
|
||||
}
|
||||
</style>
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div id="target">X</div>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#clipping-paths">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
|
||||
<link rel="match" href="reference/clip-path-filter-radius-clips-ref.html">
|
||||
<meta name="assert" content="For crbug.com/1099234, ensure correct clip hierarchy with clip-path, filter and border radius clips">
|
||||
<div style="width: 400px; height: 400px; border-radius: 10px; contain: paint">
|
||||
<div style="width: 400px; height: 400px; border-radius: 10px; contain: paint">
|
||||
<div style="width: 100px; height: 10px; will-change: transform; clip-path: circle(50%)"></div>
|
||||
<div style="margin-left: 10px; filter: invert(100%); will-change: filter;
|
||||
width: 100px; height: 100px; background: magenta"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<div style="padding: 10px">
|
||||
<div id="blur" style="will-change: filter; width: 100px; height: 100px; background: lime"></div>
|
||||
</div>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1100308">
|
||||
<meta name="assert" content="The 'page' property should only have an effect if we're paginated, i.e. not inside multicol containers (unless we're also paginated)">
|
||||
<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="columns:1; column-fill:auto; width:100px; height:100px; background:red;">
|
||||
<div style="height:50px; background:green;"></div>
|
||||
<div style="page:bogus; height:50px; background:green;"></div>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src=/resources/testharness.js> </script>
|
||||
<script src=/resources/testharnessreport.js> </script>
|
||||
<div>
|
||||
This is a page with following headers: <br>
|
||||
<div>
|
||||
Feature-Policy: geolocation 'none', fullscreen 'none'<br>
|
||||
Permissions-Policy: geolocation=self, payment=()
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const policy = document.featurePolicy;
|
||||
test(() => {
|
||||
assert_true(policy.allowsFeature('geolocation'));
|
||||
}, "When there is conflict in Feature Policy header and Permissions Policy" +
|
||||
"header, Permissions Policy wins.");
|
||||
|
||||
test(() => {
|
||||
assert_false(policy.allowsFeature('fullscreen'));
|
||||
assert_false(policy.allowsFeature('payment'));
|
||||
}, "When there is no conflict, Feature Policy and Permissions Policy should " +
|
||||
"all be able to control each feature by themselves.");
|
||||
</script>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Feature-Policy: geolocation 'none', fullscreen 'none'
|
||||
Permissions-Policy: geolocation=self, payment=()
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/feature-policy/resources/featurepolicy.js></script>
|
||||
<!-- Permissions-Policy: fullscreen=self -->
|
||||
<script>
|
||||
'use strict';
|
||||
var same_origin = 'https://{{domains[]}}:{{ports[https][0]}}';
|
||||
var cross_origin = 'https://{{domains[www]}}:{{ports[https][0]}}';
|
||||
var same_origin_src = '/feature-policy/resources/feature-policy-allowedfeatures.html';
|
||||
var cross_origin_src = cross_origin + same_origin_src;
|
||||
var header_policy = 'Permissions-Policy: fullscreen=self';
|
||||
|
||||
// Test that fullscreen's allowlist is ['same_origin']
|
||||
test(function() {
|
||||
assert_array_equals(
|
||||
document.featurePolicy.getAllowlistForFeature('fullscreen'),
|
||||
[same_origin]);
|
||||
}, header_policy + ' -- test allowlist is [same_origin]');
|
||||
|
||||
// Test that fullscreen is only allowed on same-origin subframe.
|
||||
test_allowed_feature_for_subframe(
|
||||
header_policy + ' -- test fullscreen is allowed on same-origin subframe',
|
||||
'fullscreen',
|
||||
same_origin_src);
|
||||
test_disallowed_feature_for_subframe(
|
||||
header_policy + ' -- test fullscreen is disallowed on cross-origin subframe',
|
||||
'fullscreen',
|
||||
cross_origin_src);
|
||||
|
||||
// Dynamically update sub frame's container policy
|
||||
var allow = "fullscreen 'src';"
|
||||
test_allowed_feature_for_subframe(
|
||||
header_policy + ', iframe.allow = ' + allow + ' -- test fullscreen is allowed on same-origin subframe',
|
||||
'fullscreen',
|
||||
same_origin_src,
|
||||
allow);
|
||||
|
||||
test_allowed_feature_for_subframe(
|
||||
header_policy + ', iframe.allow = ' + allow + ' -- test fullscreen is allowed on cross-origin subframe',
|
||||
'fullscreen',
|
||||
same_origin_src,
|
||||
allow);
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Permissions-Policy: fullscreen=self
|
|
@ -1,11 +1,11 @@
|
|||
def main(request, response):
|
||||
body = request.GET.first("body", None)
|
||||
type = request.GET.first("type", None)
|
||||
body = request.GET.first(b"body", None)
|
||||
type = request.GET.first(b"type", None)
|
||||
|
||||
response.add_required_headers = False
|
||||
response.writer.write_status(200)
|
||||
response.writer.write_header("content-length", len(body))
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-length", len(body))
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
|
||||
response.writer.write(body)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
def main(request, response):
|
||||
headers = [("Cross-Origin-Resource-Policy", request.GET['corp'])]
|
||||
if 'origin' in request.headers:
|
||||
headers.append(('Access-Control-Allow-Origin', request.headers['origin']))
|
||||
headers = [(b"Cross-Origin-Resource-Policy", request.GET[b'corp'])]
|
||||
if b'origin' in request.headers:
|
||||
headers.append((b'Access-Control-Allow-Origin', request.headers[b'origin']))
|
||||
|
||||
return 200, headers, "hello"
|
||||
return 200, headers, b"hello"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def main(request, response):
|
||||
headers = [("Content-Type", "text/html"),
|
||||
("Cross-Origin-Resource-Policy", request.GET['corp'])]
|
||||
return 200, headers, "<body><h3>The iframe</h3><script>window.onmessage = () => { parent.postMessage('pong', '*'); }</script></body>"
|
||||
headers = [(b"Content-Type", b"text/html"),
|
||||
(b"Cross-Origin-Resource-Policy", request.GET[b'corp'])]
|
||||
return 200, headers, b"<body><h3>The iframe</h3><script>window.onmessage = () => { parent.postMessage('pong', '*'); }</script></body>"
|
||||
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
import os.path
|
||||
|
||||
def main(request, response):
|
||||
type = request.GET.first("type", None)
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
body = open(os.path.join(os.path.dirname(__file__), "green.png"), "rb").read()
|
||||
def main(request, response):
|
||||
type = request.GET.first(b"type", None)
|
||||
|
||||
body = open(os.path.join(os.path.dirname(isomorphic_decode(__file__)), u"green.png"), u"rb").read()
|
||||
|
||||
response.add_required_headers = False
|
||||
response.writer.write_status(200)
|
||||
|
||||
if 'corp' in request.GET:
|
||||
response.writer.write_header("cross-origin-resource-policy", request.GET['corp'])
|
||||
if 'acao' in request.GET:
|
||||
response.writer.write_header("access-control-allow-origin", request.GET['acao'])
|
||||
response.writer.write_header("content-length", len(body))
|
||||
if b'corp' in request.GET:
|
||||
response.writer.write_header(b"cross-origin-resource-policy", request.GET[b'corp'])
|
||||
if b'acao' in request.GET:
|
||||
response.writer.write_header(b"access-control-allow-origin", request.GET[b'acao'])
|
||||
response.writer.write_header(b"content-length", len(body))
|
||||
if(type != None):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
|
||||
response.writer.write(body)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
def main(request, response):
|
||||
headers = [("Location", request.GET['redirectTo'])]
|
||||
if 'corp' in request.GET:
|
||||
headers.append(('Cross-Origin-Resource-Policy', request.GET['corp']))
|
||||
headers = [(b"Location", request.GET[b'redirectTo'])]
|
||||
if b'corp' in request.GET:
|
||||
headers.append((b'Cross-Origin-Resource-Policy', request.GET[b'corp']))
|
||||
|
||||
return 302, headers, ""
|
||||
return 302, headers, b""
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
def main(request, response):
|
||||
headers = [("Cross-Origin-Resource-Policy", request.GET['corp'])]
|
||||
if 'origin' in request.headers:
|
||||
headers.append(('Access-Control-Allow-Origin', request.headers['origin']))
|
||||
headers = [(b"Cross-Origin-Resource-Policy", request.GET[b'corp'])]
|
||||
if b'origin' in request.headers:
|
||||
headers.append((b'Access-Control-Allow-Origin', request.headers[b'origin']))
|
||||
|
||||
return 200, headers, ""
|
||||
return 200, headers, b""
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
def main(request, response):
|
||||
type = request.GET.first("type", None)
|
||||
is_revalidation = request.headers.get("If-Modified-Since", None)
|
||||
type = request.GET.first(b"type", None)
|
||||
is_revalidation = request.headers.get(b"If-Modified-Since", None)
|
||||
|
||||
content = "/* nothing to see here */"
|
||||
content = b"/* nothing to see here */"
|
||||
|
||||
response.add_required_headers = False
|
||||
if is_revalidation is not None:
|
||||
response.writer.write_status(304)
|
||||
response.writer.write_header("x-content-type-options", "nosniff")
|
||||
response.writer.write_header("content-length", 0)
|
||||
response.writer.write_header(b"x-content-type-options", b"nosniff")
|
||||
response.writer.write_header(b"content-length", 0)
|
||||
if(type != None):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
response.writer.write("")
|
||||
response.writer.write(b"")
|
||||
else:
|
||||
response.writer.write_status(200)
|
||||
response.writer.write_header("x-content-type-options", "nosniff")
|
||||
response.writer.write_header("content-length", len(content))
|
||||
response.writer.write_header(b"x-content-type-options", b"nosniff")
|
||||
response.writer.write_header(b"content-length", len(content))
|
||||
if(type != None):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
response.writer.write(content)
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
import os.path
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
type = request.GET.first("type", None)
|
||||
type = request.GET.first(b"type", None)
|
||||
|
||||
if type != None and "svg" in type:
|
||||
filename = "green-96x96.svg"
|
||||
if type != None and b"svg" in type:
|
||||
filename = u"green-96x96.svg"
|
||||
else:
|
||||
filename = "blue96x96.png"
|
||||
filename = u"blue96x96.png"
|
||||
|
||||
path = os.path.join(os.path.dirname(__file__), "../../../images", filename)
|
||||
body = open(path, "rb").read()
|
||||
path = os.path.join(os.path.dirname(isomorphic_decode(__file__)), u"../../../images", filename)
|
||||
body = open(path, u"rb").read()
|
||||
|
||||
response.add_required_headers = False
|
||||
response.writer.write_status(200)
|
||||
response.writer.write_header("x-content-type-options", "nosniff")
|
||||
response.writer.write_header("content-length", len(body))
|
||||
response.writer.write_header(b"x-content-type-options", b"nosniff")
|
||||
response.writer.write_header(b"content-length", len(body))
|
||||
if(type != None):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
|
||||
response.writer.write(body)
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
def main(request, response):
|
||||
outcome = request.GET.first("outcome", "f")
|
||||
type = request.GET.first("type", "Content-Type missing")
|
||||
outcome = request.GET.first(b"outcome", b"f")
|
||||
type = request.GET.first(b"type", b"Content-Type missing")
|
||||
|
||||
content = "// nothing to see here"
|
||||
content += "\n"
|
||||
content += "log('FAIL: " + type + "')" if (outcome == "f") else "p()"
|
||||
content = b"// nothing to see here"
|
||||
content += b"\n"
|
||||
content += b"log('FAIL: " + type + b"')" if (outcome == b"f") else b"p()"
|
||||
|
||||
response.add_required_headers = False
|
||||
response.writer.write_status(200)
|
||||
response.writer.write_header("x-content-type-options", "nosniff")
|
||||
response.writer.write_header("content-length", len(content))
|
||||
if(type != "Content-Type missing"):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"x-content-type-options", b"nosniff")
|
||||
response.writer.write_header(b"content-length", len(content))
|
||||
if(type != b"Content-Type missing"):
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
|
||||
response.writer.write(content)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
def main(request, response):
|
||||
response.add_required_headers = False
|
||||
output = "HTTP/1.1 220 YOU HAVE NO POWER HERE\r\n"
|
||||
output += "Content-Length: 22\r\n"
|
||||
output += "Content-Type: x/x\r\n"
|
||||
output += request.GET.first("nosniff") + "\r\n"
|
||||
output += "\r\n"
|
||||
output += "// nothing to see here"
|
||||
output = b"HTTP/1.1 220 YOU HAVE NO POWER HERE\r\n"
|
||||
output += b"Content-Length: 22\r\n"
|
||||
output += b"Content-Type: x/x\r\n"
|
||||
output += request.GET.first(b"nosniff") + b"\r\n"
|
||||
output += b"\r\n"
|
||||
output += b"// nothing to see here"
|
||||
response.writer.write(output)
|
||||
response.close_connection = True
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
def main(request, response):
|
||||
type = request.GET.first("type", None)
|
||||
type = request.GET.first(b"type", None)
|
||||
|
||||
content = "// nothing to see here"
|
||||
content += "\n"
|
||||
content += "this.postMessage('hi')"
|
||||
content = b"// nothing to see here"
|
||||
content += b"\n"
|
||||
content += b"this.postMessage('hi')"
|
||||
|
||||
response.add_required_headers = False
|
||||
response.writer.write_status(200)
|
||||
response.writer.write_header("x-content-type-options", "nosniff")
|
||||
response.writer.write_header("content-length", len(content))
|
||||
response.writer.write_header(b"x-content-type-options", b"nosniff")
|
||||
response.writer.write_header(b"content-length", len(content))
|
||||
if(type != None):
|
||||
response.writer.write_header("content-type", type)
|
||||
response.writer.write_header(b"content-type", type)
|
||||
response.writer.end_headers()
|
||||
|
||||
response.writer.write(content)
|
||||
|
|
|
@ -2,38 +2,56 @@
|
|||
<head>
|
||||
<title>Iframes with loading='lazy' load when in the viewport</title>
|
||||
<link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org">
|
||||
<link rel="help" href="https://github.com/scott-little/lazyload">
|
||||
<link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org">
|
||||
<link rel="help" href="https://github.com/whatwg/html/pull/5579">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<script>
|
||||
const t = async_test("Test that iframes with loading='lazy' load once they " +
|
||||
"enter the viewport.");
|
||||
const t_in_viewport =
|
||||
async_test('In-viewport iframes load eagerly');
|
||||
const t_in_viewport_srcdoc=
|
||||
async_test('In-viewport srcdoc iframes load eagerly');
|
||||
const t_below_viewport =
|
||||
async_test('Below-viewport iframes load lazily');
|
||||
const t_below_viewport_srcdoc =
|
||||
async_test('Below-viewport srcdoc iframes load lazily');
|
||||
|
||||
let has_window_loaded = false;
|
||||
let has_in_viewport_loaded = false;
|
||||
|
||||
const in_viewport_iframe_onload = t.step_func(() => {
|
||||
assert_false(has_in_viewport_loaded,
|
||||
"The in_viewport element should load only once.");
|
||||
has_in_viewport_loaded = true;
|
||||
const in_viewport_iframe_onload = t_in_viewport.step_func_done(() => {
|
||||
assert_false(has_window_loaded,
|
||||
"The in_viewport iframe should not block the load event");
|
||||
});
|
||||
|
||||
window.addEventListener("load", t.step_func(() => {
|
||||
assert_true(has_in_viewport_loaded,
|
||||
"The in_viewport element should have loaded before " +
|
||||
"window.load().");
|
||||
const in_viewport_srcdoc_iframe_onload = t_in_viewport_srcdoc.step_func_done(() => {
|
||||
assert_false(has_window_loaded,
|
||||
"The window.load() event should only fire once.");
|
||||
has_window_loaded = true;
|
||||
document.getElementById("below_viewport").scrollIntoView();
|
||||
}));
|
||||
"The in_viewport srcdoc iframe should not block the load event");
|
||||
});
|
||||
|
||||
const below_viewport_iframe_onload = t.step_func_done(() => {
|
||||
window.addEventListener("load", () => {
|
||||
has_window_loaded = true;
|
||||
document.getElementById("below_viewport_srcdoc").scrollIntoView();
|
||||
});
|
||||
|
||||
const below_viewport_iframe_onload = t_below_viewport.step_func_done(() => {
|
||||
assert_true(has_window_loaded,
|
||||
"The window.load() event should have fired before " +
|
||||
"below_viewport loaded.");
|
||||
"the below-viewport iframe loads");
|
||||
});
|
||||
|
||||
// Must make this accessible to the srcdoc iframe's body.
|
||||
window.below_viewport_srcdoc_iframe_subresource_onload = t_below_viewport_srcdoc.step_func(() => {
|
||||
assert_true(has_window_loaded,
|
||||
"The window.load() event should have fired before " +
|
||||
"the below-viewport srcdoc iframe's subresource loads");
|
||||
});
|
||||
|
||||
const below_viewport_srcdoc_iframe_onload = t_below_viewport_srcdoc.step_func_done(() => {
|
||||
assert_true(has_window_loaded,
|
||||
"The window.load() event should have fired before " +
|
||||
"the below-viewport srcdoc iframe loads");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -41,13 +59,24 @@
|
|||
<iframe id="in_viewport" src="resources/subframe.html?in-viewport"
|
||||
loading="lazy" width="200px" height="100px"
|
||||
onload="in_viewport_iframe_onload();"></iframe>
|
||||
<div style="height:1000vh;"></div>
|
||||
<iframe id="in_viewport_srcdoc"
|
||||
srcdoc="<body><img src='/common/square.png?in-viewport'></body>"
|
||||
loading="lazy" width="200px" height="100px"
|
||||
onload="in_viewport_srcdoc_iframe_onload();"></iframe>
|
||||
|
||||
<div style="height:2000vh;"></div>
|
||||
<iframe id="below_viewport" src="resources/subframe.html?below-viewport"
|
||||
loading="lazy" width="200px" height="100px"
|
||||
onload="below_viewport_iframe_onload();"></iframe>
|
||||
<iframe id="below_viewport_srcdoc"
|
||||
srcdoc="<body><img src='/common/square.png?below-viewport'
|
||||
onload='parent.below_viewport_srcdoc_iframe_subresource_onload();'></body>"
|
||||
loading="lazy" width="200px" height="100px"
|
||||
onload="below_viewport_srcdoc_iframe_onload();"></iframe>
|
||||
|
||||
|
||||
<!-- This async script loads very slowly in order to ensure that, if the
|
||||
below_viewport element has started loading, it has a chance to finish
|
||||
below_viewport* elements have started loading, it has a chance to finish
|
||||
loading before window.load() happens, so that the test will dependably
|
||||
fail in that case instead of potentially passing depending on how long
|
||||
different resource fetches take. -->
|
||||
|
|
112
tests/wpt/web-platform-tests/interfaces/webhid.idl
Normal file
112
tests/wpt/web-platform-tests/interfaces/webhid.idl
Normal file
|
@ -0,0 +1,112 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: WebHID API (https://wicg.github.io/webhid/)
|
||||
|
||||
dictionary HIDDeviceFilter {
|
||||
unsigned long vendorId;
|
||||
unsigned short productId;
|
||||
unsigned short usagePage;
|
||||
unsigned short usage;
|
||||
};
|
||||
|
||||
dictionary HIDDeviceRequestOptions {
|
||||
required sequence<HIDDeviceFilter> filters;
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
interface HID : EventTarget {
|
||||
attribute EventHandler onconnect;
|
||||
attribute EventHandler ondisconnect;
|
||||
Promise<sequence<HIDDevice>> getDevices();
|
||||
Promise<sequence<HIDDevice>> requestDevice(
|
||||
HIDDeviceRequestOptions options);
|
||||
};
|
||||
|
||||
[SecureContext] partial interface Navigator {
|
||||
[SameObject] readonly attribute HID hid;
|
||||
};
|
||||
|
||||
dictionary HIDConnectionEventInit : EventInit {
|
||||
required HIDDevice device;
|
||||
};
|
||||
|
||||
[
|
||||
Constructor(DOMString type, HIDConnectionEventInit eventInitDict),
|
||||
SecureContext
|
||||
] interface HIDConnectionEvent : Event {
|
||||
[SameObject] readonly attribute HIDDevice device;
|
||||
};
|
||||
|
||||
dictionary HIDInputReportEventInit : EventInit {
|
||||
required HIDDevice device;
|
||||
required octet reportId;
|
||||
required DataView data;
|
||||
};
|
||||
|
||||
[
|
||||
Constructor(DOMString type, HIDInputReportEventInit eventInitDict),
|
||||
SecureContext
|
||||
] interface HIDInputReportEvent : Event {
|
||||
[SameObject] readonly attribute HIDDevice device;
|
||||
readonly attribute octet reportId;
|
||||
readonly attribute DataView data;
|
||||
};
|
||||
|
||||
enum HIDUnitSystem {
|
||||
"none", "si-linear", "si-rotation", "english-linear",
|
||||
"english-rotation", "vendor-defined", "reserved"
|
||||
};
|
||||
|
||||
[SecureContext] interface HIDReportItem {
|
||||
readonly attribute boolean isAbsolute;
|
||||
readonly attribute boolean isArray;
|
||||
readonly attribute boolean isRange;
|
||||
readonly attribute boolean hasNull;
|
||||
readonly attribute FrozenArray<unsigned long> usages;
|
||||
readonly attribute unsigned long usageMinimum;
|
||||
readonly attribute unsigned long usageMaximum;
|
||||
readonly attribute unsigned short reportSize;
|
||||
readonly attribute unsigned short reportCount;
|
||||
readonly attribute unsigned long unitExponent;
|
||||
readonly attribute HIDUnitSystem unitSystem;
|
||||
readonly attribute byte unitFactorLengthExponent;
|
||||
readonly attribute byte unitFactorMassExponent;
|
||||
readonly attribute byte unitFactorTimeExponent;
|
||||
readonly attribute byte unitFactorTemperatureExponent;
|
||||
readonly attribute byte unitFactorCurrentExponent;
|
||||
readonly attribute byte unitFactorLuminousIntensityExponent;
|
||||
readonly attribute long logicalMinimum;
|
||||
readonly attribute long logicalMaximum;
|
||||
readonly attribute long physicalMinimum;
|
||||
readonly attribute long physicalMaximum;
|
||||
readonly attribute FrozenArray<DOMString> strings;
|
||||
};
|
||||
|
||||
[SecureContext] interface HIDReportInfo {
|
||||
readonly attribute octet reportId;
|
||||
readonly attribute FrozenArray<HIDReportItem> items;
|
||||
};
|
||||
|
||||
[SecureContext] interface HIDCollectionInfo {
|
||||
readonly attribute unsigned short usagePage;
|
||||
readonly attribute unsigned short usage;
|
||||
readonly attribute FrozenArray<HIDCollectionInfo> children;
|
||||
readonly attribute FrozenArray<HIDReportInfo> inputReports;
|
||||
readonly attribute FrozenArray<HIDReportInfo> outputReports;
|
||||
readonly attribute FrozenArray<HIDReportInfo> featureReports;
|
||||
};
|
||||
|
||||
[SecureContext] interface HIDDevice : EventTarget {
|
||||
attribute EventHandler oninputreport;
|
||||
readonly attribute boolean opened;
|
||||
readonly attribute unsigned short vendorId;
|
||||
readonly attribute unsigned short productId;
|
||||
readonly attribute DOMString productName;
|
||||
readonly attribute FrozenArray<HIDCollectionInfo> collections;
|
||||
Promise<void> open();
|
||||
Promise<void> close();
|
||||
Promise<void> sendReport(octet reportId, BufferSource data);
|
||||
Promise<void> sendFeatureReport(octet reportId, BufferSource data);
|
||||
Promise<DataView> receiveFeatureReport(octet reportId);
|
||||
};
|
|
@ -6,6 +6,7 @@
|
|||
<script src="../resources/utils.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/media.js"></script>
|
||||
<video id="video" autoplay></video>
|
||||
<script>
|
||||
promise_test(async t => {
|
||||
|
@ -14,7 +15,7 @@
|
|||
await assertNoFirstContentfulPaint(t);
|
||||
// Set actual video content to trigger FCP.
|
||||
const video = document.getElementById('video');
|
||||
video.setAttribute('src', '/media/test.mp4');
|
||||
video.src = getVideoURI('/media/test');
|
||||
await new Promise(resolve => {
|
||||
video.oncanplay = resolve;
|
||||
});
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
def main(request, response):
|
||||
if "url" in request.GET:
|
||||
headers = [("Location", request.GET["url"])]
|
||||
return 302, headers, ''
|
||||
if b"url" in request.GET:
|
||||
headers = [(b"Location", request.GET[b"url"])]
|
||||
return 302, headers, b''
|
||||
|
||||
status = 200
|
||||
|
||||
if "noLocationRedirect" in request.GET:
|
||||
if b"noLocationRedirect" in request.GET:
|
||||
status = 302
|
||||
|
||||
return status, [("content-type", "text/html")], '''
|
||||
return status, [(b"content-type", b"text/html")], b'''
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
onmessage = event => {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
def main(request, response):
|
||||
if "url" in request.GET:
|
||||
headers = [("Location", request.GET["url"])]
|
||||
return 302, headers, ''
|
||||
if b"url" in request.GET:
|
||||
headers = [(b"Location", request.GET[b"url"])]
|
||||
return 302, headers, b''
|
||||
|
||||
status = 200
|
||||
|
||||
if "noLocationRedirect" in request.GET:
|
||||
if b"noLocationRedirect" in request.GET:
|
||||
status = 302
|
||||
|
||||
return status, [("content-type", "text/html")], '''
|
||||
return status, [(b"content-type", b"text/html")], b'''
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
onmessage = event => {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import urlparse
|
||||
from six.moves.urllib.parse import parse_qs
|
||||
|
||||
from wptserve.utils import isomorphic_encode
|
||||
|
||||
def main(req, res):
|
||||
qs_cookie_val = urlparse.parse_qs(req.url_parts.query).get('set-cookie-notification')
|
||||
qs_cookie_val = parse_qs(req.url_parts.query).get(u'set-cookie-notification')
|
||||
|
||||
if qs_cookie_val:
|
||||
res.set_cookie('notification', qs_cookie_val[0])
|
||||
res.set_cookie(b'notification', isomorphic_encode(qs_cookie_val[0]))
|
||||
|
||||
return 'not really an icon'
|
||||
return b'not really an icon'
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
def main(request, response):
|
||||
if 'Status' in request.GET:
|
||||
status = int(request.GET["Status"])
|
||||
if b'Status' in request.GET:
|
||||
status = int(request.GET[b"Status"])
|
||||
else:
|
||||
status = 302
|
||||
|
||||
headers = []
|
||||
|
||||
url = request.GET['Redirect']
|
||||
headers.append(("Location", url))
|
||||
url = request.GET[b'Redirect']
|
||||
headers.append((b"Location", url))
|
||||
|
||||
if "ACAOrigin" in request.GET:
|
||||
for item in request.GET["ACAOrigin"].split(","):
|
||||
headers.append(("Access-Control-Allow-Origin", item))
|
||||
if b"ACAOrigin" in request.GET:
|
||||
for item in request.GET[b"ACAOrigin"].split(b","):
|
||||
headers.append((b"Access-Control-Allow-Origin", item))
|
||||
|
||||
for suffix in ["Headers", "Methods", "Credentials"]:
|
||||
query = "ACA%s" % suffix
|
||||
header = "Access-Control-Allow-%s" % suffix
|
||||
for suffix in [b"Headers", b"Methods", b"Credentials"]:
|
||||
query = b"ACA%s" % suffix
|
||||
header = b"Access-Control-Allow-%s" % suffix
|
||||
if query in request.GET:
|
||||
headers.append((header, request.GET[query]))
|
||||
|
||||
if "ACEHeaders" in request.GET:
|
||||
headers.append(("Access-Control-Expose-Headers", request.GET["ACEHeaders"]))
|
||||
if b"ACEHeaders" in request.GET:
|
||||
headers.append((b"Access-Control-Expose-Headers", request.GET[b"ACEHeaders"]))
|
||||
|
||||
return status, headers, ""
|
||||
return status, headers, b""
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import json
|
||||
|
||||
def main(request, response):
|
||||
data = {key:request.headers[key] for key,value in request.headers.iteritems()}
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
return [("Content-Type", "application/json")], json.dumps(data)
|
||||
def main(request, response):
|
||||
data = {isomorphic_decode(key):isomorphic_decode(request.headers[key]) for key, value in request.headers.items()}
|
||||
|
||||
return [(b"Content-Type", b"application/json")], json.dumps(data)
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
import os.path
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
header = [('Content-Type', 'text/html')]
|
||||
if 'test' in request.GET:
|
||||
with open(os.path.join(os.path.dirname(__file__),'blank.html'), 'r') as f:
|
||||
header = [(b'Content-Type', b'text/html')]
|
||||
if b'test' in request.GET:
|
||||
with open(os.path.join(os.path.dirname(isomorphic_decode(__file__)), u'blank.html'), u'r') as f:
|
||||
body = f.read()
|
||||
return (header, body)
|
||||
|
||||
if 'sandbox' in request.GET:
|
||||
header.append(('Content-Security-Policy',
|
||||
'sandbox %s' % request.GET['sandbox']))
|
||||
with open(os.path.join(os.path.dirname(__file__),
|
||||
'sandboxed-iframe-fetch-event-iframe.html'), 'r') as f:
|
||||
if b'sandbox' in request.GET:
|
||||
header.append((b'Content-Security-Policy',
|
||||
b'sandbox %s' % request.GET[b'sandbox']))
|
||||
with open(os.path.join(os.path.dirname(isomorphic_decode(__file__)),
|
||||
u'sandboxed-iframe-fetch-event-iframe.html'), u'r') as f:
|
||||
body = f.read()
|
||||
return (header, body)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
bodyDefault = '''
|
||||
bodyDefault = b'''
|
||||
importScripts('worker-testharness.js');
|
||||
importScripts('test-helpers.sub.js');
|
||||
importScripts('/common/get-host-info.sub.js');
|
||||
|
@ -53,7 +53,7 @@ async_test(function(t) {
|
|||
.catch(unreached_rejection(t));
|
||||
}, 'Redirected fetch test for default-src');'''
|
||||
|
||||
bodyScript = '''
|
||||
bodyScript = b'''
|
||||
importScripts('worker-testharness.js');
|
||||
importScripts('test-helpers.sub.js');
|
||||
importScripts('/common/get-host-info.sub.js');
|
||||
|
@ -108,7 +108,7 @@ async_test(function(t) {
|
|||
.catch(unreached_rejection(t));
|
||||
}, 'Redirected fetch test for script-src');'''
|
||||
|
||||
bodyConnect = '''
|
||||
bodyConnect = b'''
|
||||
importScripts('worker-testharness.js');
|
||||
importScripts('test-helpers.sub.js');
|
||||
importScripts('/common/get-host-info.sub.js');
|
||||
|
@ -168,16 +168,16 @@ async_test(function(t) {
|
|||
|
||||
def main(request, response):
|
||||
headers = []
|
||||
headers.append(('Content-Type', 'application/javascript'))
|
||||
directive = request.GET['directive']
|
||||
body = 'ERROR: Unknown directive'
|
||||
if directive == 'default':
|
||||
headers.append(('Content-Security-Policy', "default-src 'self'"))
|
||||
headers.append((b'Content-Type', b'application/javascript'))
|
||||
directive = request.GET[b'directive']
|
||||
body = b'ERROR: Unknown directive'
|
||||
if directive == b'default':
|
||||
headers.append((b'Content-Security-Policy', b"default-src 'self'"))
|
||||
body = bodyDefault
|
||||
elif directive == 'script':
|
||||
headers.append(('Content-Security-Policy', "script-src 'self'"))
|
||||
elif directive == b'script':
|
||||
headers.append((b'Content-Security-Policy', b"script-src 'self'"))
|
||||
body = bodyScript
|
||||
elif directive == 'connect':
|
||||
headers.append(('Content-Security-Policy', "connect-src 'self'"))
|
||||
elif directive == b'connect':
|
||||
headers.append((b'Content-Security-Policy', b"connect-src 'self'"))
|
||||
body = bodyConnect
|
||||
return headers, body
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
def main(request, response):
|
||||
service_worker_header = request.headers.get('service-worker')
|
||||
service_worker_header = request.headers.get(b'service-worker')
|
||||
|
||||
if 'header' in request.GET and service_worker_header != 'script':
|
||||
return 400, [('Content-Type', 'text/plain')], 'Bad Request'
|
||||
if b'header' in request.GET and service_worker_header != b'script':
|
||||
return 400, [(b'Content-Type', b'text/plain')], b'Bad Request'
|
||||
|
||||
if 'no-header' in request.GET and service_worker_header == 'script':
|
||||
return 400, [('Content-Type', 'text/plain')], 'Bad Request'
|
||||
if b'no-header' in request.GET and service_worker_header == b'script':
|
||||
return 400, [(b'Content-Type', b'text/plain')], b'Bad Request'
|
||||
|
||||
# no-cache itself to ensure the user agent finds a new version for each
|
||||
# update.
|
||||
headers = [('Cache-Control', 'no-cache, must-revalidate'),
|
||||
('Pragma', 'no-cache'),
|
||||
('Content-Type', 'application/javascript')]
|
||||
body = '/* This is a service worker script */\n'
|
||||
headers = [(b'Cache-Control', b'no-cache, must-revalidate'),
|
||||
(b'Pragma', b'no-cache'),
|
||||
(b'Content-Type', b'application/javascript')]
|
||||
body = b'/* This is a service worker script */\n'
|
||||
|
||||
if 'import' in request.GET:
|
||||
body += "importScripts('%s');" % request.GET['import']
|
||||
if b'import' in request.GET:
|
||||
body += b"importScripts('%s');" % request.GET[b'import']
|
||||
|
||||
return 200, headers, body
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
def main(request, response):
|
||||
headers = []
|
||||
|
||||
if "ACAOrigin" in request.GET:
|
||||
for item in request.GET["ACAOrigin"].split(","):
|
||||
headers.append(("Access-Control-Allow-Origin", item))
|
||||
if b"ACAOrigin" in request.GET:
|
||||
for item in request.GET[b"ACAOrigin"].split(b","):
|
||||
headers.append((b"Access-Control-Allow-Origin", item))
|
||||
|
||||
return headers, "{ \"result\": \"success\" }"
|
||||
return headers, b"{ \"result\": \"success\" }"
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
import json
|
||||
import os
|
||||
import uuid
|
||||
import sys
|
||||
|
||||
from wptserve.utils import isomorphic_decode
|
||||
|
||||
def main(request, response):
|
||||
path = os.path.join(os.path.dirname(__file__),
|
||||
"test-request-headers-worker.js")
|
||||
body = open(path, "rb").read()
|
||||
path = os.path.join(os.path.dirname(isomorphic_decode(__file__)),
|
||||
u"test-request-headers-worker.js")
|
||||
body = open(path, u"rb").read()
|
||||
|
||||
data = {key:request.headers[key] for key,value in request.headers.iteritems()}
|
||||
body = body.replace("%HEADERS%", json.dumps(data))
|
||||
body = body.replace("%UUID%", str(uuid.uuid4()))
|
||||
data = {isomorphic_decode(key):isomorphic_decode(request.headers[key]) for key, value in request.headers.items()}
|
||||
body = body.replace(b"%HEADERS%", json.dumps(data).encode("utf-8"))
|
||||
body = body.replace(b"%UUID%", str(uuid.uuid4()).encode("utf-8"))
|
||||
|
||||
headers = []
|
||||
headers.append(("ETag", "etag"))
|
||||
headers.append(("Content-Type", 'text/javascript'))
|
||||
headers.append((b"ETag", b"etag"))
|
||||
headers.append((b"Content-Type", b'text/javascript'))
|
||||
|
||||
return headers, body
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import time
|
||||
|
||||
from six import range
|
||||
|
||||
def main(request, response):
|
||||
delay = float(request.GET.first("ms", 500)) / 1E3
|
||||
count = int(request.GET.first("count", 50))
|
||||
delay = float(request.GET.first(b"ms", 500)) / 1E3
|
||||
count = int(request.GET.first(b"count", 50))
|
||||
# Read request body
|
||||
request.body
|
||||
time.sleep(delay)
|
||||
response.headers.set("Content-type", "text/plain")
|
||||
response.headers.set(b"Content-type", b"text/plain")
|
||||
response.write_status_headers()
|
||||
time.sleep(delay);
|
||||
for i in xrange(count):
|
||||
response.writer.write_content("TEST_TRICKLE\n")
|
||||
time.sleep(delay)
|
||||
for i in range(count):
|
||||
response.writer.write_content(b"TEST_TRICKLE\n")
|
||||
time.sleep(delay)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import time
|
||||
|
||||
script = '''
|
||||
script = u'''
|
||||
// Time stamp: %s
|
||||
// (This ensures the source text is *not* a byte-for-byte match with any
|
||||
// previously-fetched version of this script.)
|
||||
|
@ -21,4 +21,4 @@ addEventListener('activate', event => {
|
|||
|
||||
|
||||
def main(request, response):
|
||||
return [('Content-Type', 'application/javascript')], script % time.time()
|
||||
return [(b'Content-Type', b'application/javascript')], script % time.time()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import time
|
||||
import random
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=0')]
|
||||
# Add timestamp to the worker so update() finds a new worker every time.
|
||||
body = '''
|
||||
headers = [(b'Content-Type', b'application/javascript'),
|
||||
(b'Cache-Control', b'max-age=0')]
|
||||
# Plug in random.random() to the worker so update() finds a new worker every time.
|
||||
body = u'''
|
||||
// %s
|
||||
importScripts('update-during-installation-worker.js');
|
||||
'''.strip() % time.clock()
|
||||
'''.strip() % (random.random())
|
||||
return headers, body
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
import random
|
||||
import time
|
||||
|
||||
def main(request, response):
|
||||
# no-cache itself to ensure the user agent finds a new version for each update.
|
||||
headers = [('Cache-Control', 'no-cache, must-revalidate'),
|
||||
('Pragma', 'no-cache')]
|
||||
headers = [(b'Cache-Control', b'no-cache, must-revalidate'),
|
||||
(b'Pragma', b'no-cache')]
|
||||
|
||||
content_type = ''
|
||||
extra_body = ''
|
||||
content_type = b''
|
||||
extra_body = u''
|
||||
|
||||
content_type = 'application/javascript'
|
||||
headers.append(('Content-Type', content_type))
|
||||
content_type = b'application/javascript'
|
||||
headers.append((b'Content-Type', content_type))
|
||||
|
||||
extra_body = "self.onfetch = (event) => { event.respondWith(fetch(event.request)); };"
|
||||
|
||||
# Return a different script for each access. Use .time() and .clock() for
|
||||
# best time resolution across different platforms.
|
||||
return headers, '/* %s %s */ %s' % (time.time(), time.clock(), extra_body)
|
||||
extra_body = u"self.onfetch = (event) => { event.respondWith(fetch(event.request)); };"
|
||||
|
||||
# Return a different script for each access.
|
||||
return headers, u'/* %s %s */ %s' % (time.time(), random.random(), extra_body)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import time
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=86400'),
|
||||
('Last-Modified', time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()))]
|
||||
from wptserve.utils import isomorphic_encode
|
||||
|
||||
body = '''
|
||||
def main(request, response):
|
||||
headers = [(b'Content-Type', b'application/javascript'),
|
||||
(b'Cache-Control', b'max-age=86400'),
|
||||
(b'Last-Modified', isomorphic_encode(time.strftime(u"%a, %d %b %Y %H:%M:%S GMT", time.gmtime())))]
|
||||
|
||||
body = u'''
|
||||
const importTime = {time:8f};
|
||||
'''.format(time=time.time())
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import time
|
||||
import json
|
||||
|
||||
from wptserve.utils import isomorphic_decode, isomorphic_encode
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=86400'),
|
||||
('Last-Modified', time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()))]
|
||||
headers = [(b'Content-Type', b'application/javascript'),
|
||||
(b'Cache-Control', b'max-age=86400'),
|
||||
(b'Last-Modified', isomorphic_encode(time.strftime(u"%a, %d %b %Y %H:%M:%S GMT", time.gmtime())))]
|
||||
|
||||
test = request.GET['test']
|
||||
test = request.GET[b'test']
|
||||
|
||||
body = '''
|
||||
body = u'''
|
||||
const mainTime = {time:8f};
|
||||
const testName = {test};
|
||||
importScripts('update-max-aged-worker-imported-script.py');
|
||||
|
@ -22,7 +24,7 @@ def main(request, response):
|
|||
}});
|
||||
'''.format(
|
||||
time=time.time(),
|
||||
test=json.dumps(test)
|
||||
test=json.dumps(isomorphic_decode(test))
|
||||
)
|
||||
|
||||
return headers, body
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
def main(request, response):
|
||||
key = request.GET['key']
|
||||
key = request.GET[b'key']
|
||||
already_requested = request.server.stash.take(key)
|
||||
|
||||
if already_requested is None:
|
||||
request.server.stash.put(key, True)
|
||||
return [('Content-Type', 'application/javascript')], '// initial script'
|
||||
return [(b'Content-Type', b'application/javascript')], b'// initial script'
|
||||
|
||||
response.status = (404, 'Not found: should not have been able to import this script twice!')
|
||||
response.status = (404, b'Not found: should not have been able to import this script twice!')
|
||||
|
|
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