diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-08-09 07:34:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-09 07:34:23 -0400 |
commit | 6775c69da128608fa6f7f11e19232c05a3b92365 (patch) | |
tree | 9424c5ed8c468e6d31b6c50e7b1d6235fdc9257b | |
parent | 90fb4c3589718805f0b6d83c5e74222cf6234cb9 (diff) | |
parent | 9f1d1e8b63592f56aaeba2cfa0eb99edab1531be (diff) | |
download | servo-6775c69da128608fa6f7f11e19232c05a3b92365.tar.gz servo-6775c69da128608fa6f7f11e19232c05a3b92365.zip |
Auto merge of #23935 - servo-wpt-sync:wpt_update_08-08-2019, r=servo-wpt-sync
Sync WPT with upstream (08-08-2019)
Automated downstream sync of changes from upstream as of 08-08-2019.
[no-wpt-sync]
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23935)
<!-- Reviewable:end -->
111 files changed, 1735 insertions, 622 deletions
diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini index 947e223fb28..3a3d15b8406 100644 --- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini @@ -14,6 +14,9 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL + [Revoke blob URL after calling fetch, fetch should succeed] + expected: FAIL + [url-with-fetch.any.html] [Untitled] @@ -34,3 +37,6 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL + [Revoke blob URL after calling fetch, fetch should succeed] + expected: FAIL + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 18d6e509efd..06227079f93 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -117921,6 +117921,18 @@ {} ] ], + "css/css-flexbox/fit-content-item-001.html": [ + [ + "css/css-flexbox/fit-content-item-001.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-flexbox/flex-001.htm": [ [ "css/css-flexbox/flex-001.htm", @@ -128179,9 +128191,9 @@ {} ] ], - "css/css-layout-api/fallback-layout-invalid-fragment-request.https.html": [ + "css/css-layout-api/fallback-layout-invalid-fragment.https.html": [ [ - "css/css-layout-api/fallback-layout-invalid-fragment-request.https.html", + "css/css-layout-api/fallback-layout-invalid-fragment.https.html", [ [ "/css/css-layout-api/fallback-ref.html", @@ -128191,9 +128203,9 @@ {} ] ], - "css/css-layout-api/fallback-layout-invalid-fragment.https.html": [ + "css/css-layout-api/fallback-layout-no-promise.https.html": [ [ - "css/css-layout-api/fallback-layout-invalid-fragment.https.html", + "css/css-layout-api/fallback-layout-no-promise.https.html", [ [ "/css/css-layout-api/fallback-ref.html", @@ -128215,6 +128227,18 @@ {} ] ], + "css/css-layout-api/fallback-layout-unresolved-promise.https.html": [ + [ + "css/css-layout-api/fallback-layout-unresolved-promise.https.html", + [ + [ + "/css/css-layout-api/fallback-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-layout-api/fragment-data-function-failure.https.html": [ [ "css/css-layout-api/fragment-data-function-failure.https.html", @@ -142619,6 +142643,82 @@ {} ] ], + "css/css-text-decor/text-decoration-shorthands-001.html": [ + [ + "css/css-text-decor/text-decoration-shorthands-001.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-shorthands-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-shorthands-002.html": [ + [ + "css/css-text-decor/text-decoration-shorthands-002.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-shorthands-002-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-skip-ink-001.html": [ + [ + "css/css-text-decor/text-decoration-skip-ink-001.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html", + "!=" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-skip-ink-002.html": [ + [ + "css/css-text-decor/text-decoration-skip-ink-002.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-skip-ink-003.html": [ + [ + "css/css-text-decor/text-decoration-skip-ink-003.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html", + "==" + ], + [ + "/css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html", + "!=" + ] + ], + {} + ] + ], + "css/css-text-decor/text-decoration-skip-ink-004.html": [ + [ + "css/css-text-decor/text-decoration-skip-ink-004.html", + [ + [ + "/css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html", + "!=" + ] + ], + {} + ] + ], "css/css-text-decor/text-decoration-style-multiple.html": [ [ "css/css-text-decor/text-decoration-style-multiple.html", @@ -254193,6 +254293,27 @@ "css/css-text-decor/reference/text-decoration-line-ref.html": [ [] ], + "css/css-text-decor/reference/text-decoration-shorthands-001-ref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-shorthands-002-ref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html": [ + [] + ], + "css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html": [ + [] + ], "css/css-text-decor/reference/text-decoration-style-multiple-ref.html": [ [] ], @@ -263934,18 +264055,6 @@ "docs/admin/index.md": [ [] ], - "docs/appendix/github-intro.md": [ - [] - ], - "docs/appendix/index.md": [ - [] - ], - "docs/appendix/reverting.md": [ - [] - ], - "docs/appendix/test-templates.md": [ - [] - ], "docs/assets/_reftest_graph_example.dot": [ [] ], @@ -264009,6 +264118,9 @@ "docs/reviewing-tests/index.md": [ [] ], + "docs/reviewing-tests/reverting.md": [ + [] + ], "docs/running-tests/chrome.md": [ [] ], @@ -264054,6 +264166,9 @@ "docs/writing-tests/general-guidelines.md": [ [] ], + "docs/writing-tests/github-intro.md": [ + [] + ], "docs/writing-tests/h2tests.md": [ [] ], @@ -264090,6 +264205,9 @@ "docs/writing-tests/submission-process.md": [ [] ], + "docs/writing-tests/test-templates.md": [ + [] + ], "docs/writing-tests/testdriver-tutorial.md": [ [] ], @@ -264102,6 +264220,9 @@ "docs/writing-tests/testharness.md": [ [] ], + "docs/writing-tests/tools.md": [ + [] + ], "docs/writing-tests/visual.md": [ [] ], @@ -266760,9 +266881,6 @@ "fonts/math/scripts-superscriptshiftupcramped5000.woff": [ [] ], - "fonts/math/stack-axisheight7000.woff": [ - [] - ], "fonts/math/stack-bottomdisplaystyleshiftdown5000-axisheight1000.woff": [ [] ], @@ -311579,6 +311697,12 @@ {} ] ], + "css/css-animations/parsing/animation-name-computed.html": [ + [ + "css/css-animations/parsing/animation-name-computed.html", + {} + ] + ], "css/css-animations/parsing/animation-name-invalid.html": [ [ "css/css-animations/parsing/animation-name-invalid.html", @@ -315455,6 +315579,12 @@ {} ] ], + "css/css-grid/chrome-crash-001.html": [ + [ + "css/css-grid/chrome-crash-001.html", + {} + ] + ], "css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html": [ [ "css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html", @@ -316211,6 +316341,12 @@ {} ] ], + "css/css-layout-api/sync-layout-microtasks.https.html": [ + [ + "css/css-layout-api/sync-layout-microtasks.https.html", + {} + ] + ], "css/css-lists/inheritance.html": [ [ "css/css-lists/inheritance.html", @@ -316247,6 +316383,42 @@ {} ] ], + "css/css-lists/parsing/counter-increment-invalid.html": [ + [ + "css/css-lists/parsing/counter-increment-invalid.html", + {} + ] + ], + "css/css-lists/parsing/counter-increment-valid.html": [ + [ + "css/css-lists/parsing/counter-increment-valid.html", + {} + ] + ], + "css/css-lists/parsing/counter-reset-invalid.html": [ + [ + "css/css-lists/parsing/counter-reset-invalid.html", + {} + ] + ], + "css/css-lists/parsing/counter-reset-valid.html": [ + [ + "css/css-lists/parsing/counter-reset-valid.html", + {} + ] + ], + "css/css-lists/parsing/counter-set-invalid.html": [ + [ + "css/css-lists/parsing/counter-set-invalid.html", + {} + ] + ], + "css/css-lists/parsing/counter-set-valid.html": [ + [ + "css/css-lists/parsing/counter-set-valid.html", + {} + ] + ], "css/css-lists/parsing/list-style-computed.sub.html": [ [ "css/css-lists/parsing/list-style-computed.sub.html", @@ -363978,6 +364150,12 @@ {} ] ], + "mediasession/positionstate.html": [ + [ + "mediasession/positionstate.html", + {} + ] + ], "mediasession/setactionhandler.html": [ [ "mediasession/setactionhandler.html", @@ -377592,7 +377770,8 @@ [ "payment-request/payment-is-showing.https.html", { - "testdriver": true + "testdriver": true, + "timeout": "long" } ] ], @@ -401437,6 +401616,18 @@ {} ] ], + "upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html": [ + [ + "upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html", + {} + ] + ], + "upgrade-insecure-requests/shared-worker-upgrade.https.html": [ + [ + "upgrade-insecure-requests/shared-worker-upgrade.https.html", + {} + ] + ], "upgrade-insecure-requests/websocket-upgrade.https.html": [ [ "upgrade-insecure-requests/websocket-upgrade.https.html", @@ -445803,7 +445994,7 @@ "support" ], "README.md": [ - "5054889dc167880a75bc1b9bd3a49abed666b78f", + "919676ee21356e5c6b0efb3c88957a7baa3289bb", "support" ], "WebCryptoAPI/META.yml": [ @@ -472119,15 +472310,15 @@ "testharness" ], "cookie-store/serviceworker_cookieStore_subscriptions.js": [ - "441573d20e9100943a33efa0e3bb8143e76491fa", + "41cbed01a5be61b6eafa739fe65a97464c34c13d", "support" ], "cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html": [ - "723de2312fe63e158e17a217c355a99838238660", + "2f26094aa2e3de355fa5f5778f4ede1c34b59559", "testharness" ], "cookie-store/serviceworker_cookieStore_subscriptions_basic.js": [ - "c48ad8bb98b02d572edf5080af877302527454a1", + "293969e5b8f86fac896b0fa75f632b31504a9a83", "support" ], "cookie-store/serviceworker_cookieStore_subscriptions_basic.tentative.https.html": [ @@ -472143,7 +472334,7 @@ "testharness" ], "cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js": [ - "228b528985615f8b73d2f5e11452e591873fecbe", + "31e644d50b2a922122cfaeaba4acf41db205ce07", "support" ], "cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.tentative.https.html": [ @@ -472151,7 +472342,7 @@ "testharness" ], "cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js": [ - "43edadd7bb86946400fcb707b2e76eada088b8a1", + "3d07c86492e1a860e97568edcdc277d460de7f6c", "support" ], "cookie-store/serviceworker_cookieStore_subscriptions_mismatch.tentative.https.html": [ @@ -472247,7 +472438,7 @@ "support" ], "cookies/http-state/resources/test-files/0002-test": [ - "a3eaff03ba38303a243a964f2e3bfbeb53533a92", + "94a71188114290a761eef397f42412e13e7909b7", "support" ], "cookies/http-state/resources/test-files/0003-expected": [ @@ -472903,7 +473094,7 @@ "support" ], "cookies/http-state/resources/test-files/comma0006-test": [ - "a3eaff03ba38303a243a964f2e3bfbeb53533a92", + "94a71188114290a761eef397f42412e13e7909b7", "support" ], "cookies/http-state/resources/test-files/comma0007-expected": [ @@ -472911,7 +473102,7 @@ "support" ], "cookies/http-state/resources/test-files/comma0007-test": [ - "29fb0a2695d4fb71115ac1fc6a220216243f8dec", + "6ca8efc711ba1e4d2a42679df8b53db580cc28a1", "support" ], "cookies/http-state/resources/test-files/disabled-chromium0020-expected": [ @@ -535418,6 +535609,10 @@ "be8a83798908a6771b935e38fe7a8608be9821ed", "testharness" ], + "css/css-animations/parsing/animation-name-computed.html": [ + "a20aa7d99896b9ac6e9a5e7e319f278207327c8e", + "testharness" + ], "css/css-animations/parsing/animation-name-invalid.html": [ "77d53f990b1607c07a07648b5f0283f9fb5e4fbf", "testharness" @@ -539163,7 +539358,7 @@ "testharness" ], "css/css-box/inheritance.html": [ - "5047b8b1df07cb1c774b5f579101d69b2482058a", + "22443bf9a94e169a8fce1bd6cfeeead4a12b0ba3", "testharness" ], "css/css-box/parsing/clear-computed.html": [ @@ -544374,6 +544569,10 @@ "7148f26e2770b669dfcc69435e3a506882ffd457", "reftest" ], + "css/css-flexbox/fit-content-item-001.html": [ + "c5dfb74711f5c22c2f12b456f78cd7dd373f1659", + "reftest" + ], "css/css-flexbox/flex-001.htm": [ "df3fbe533aa59a87ba1e7670ac8c7446527c98aa", "reftest" @@ -557018,6 +557217,10 @@ "c1ff70c49ec1e77ba0e794c7537ae90cd503498e", "testharness" ], + "css/css-grid/chrome-crash-001.html": [ + "c9ea9332a1e49f300c0520b798653869ad82b5c6", + "testharness" + ], "css/css-grid/grid-definition/fr-unit-with-percentage.html": [ "82c97abdd5740d466f049d8b45b67e241f204899", "reftest" @@ -558647,7 +558850,7 @@ "support" ], "css/css-layout-api/auto-block-size-absolute.https.html": [ - "c2a58c9a2a375ed5716d3aa783260a7806fb4da3", + "bf81b21a4bbd2ded687b1aa18bc71036550206b2", "reftest" ], "css/css-layout-api/auto-block-size-flex-ref.html": [ @@ -558655,7 +558858,7 @@ "support" ], "css/css-layout-api/auto-block-size-flex.https.html": [ - "fe95c7e23cc7372a305e3ffb5e4694413bbfde71", + "5b152bb645ff21750c8d6b703d4ad6225a6504e0", "reftest" ], "css/css-layout-api/auto-block-size-floats-ref.html": [ @@ -558663,7 +558866,7 @@ "support" ], "css/css-layout-api/auto-block-size-floats.https.html": [ - "67775eb9954e3a503a98432406c12b39d74ac165", + "342c57b5300e257c8fd456489c9c57f9be0913bc", "reftest" ], "css/css-layout-api/auto-block-size-inflow-ref.html": [ @@ -558671,7 +558874,7 @@ "support" ], "css/css-layout-api/auto-block-size-inflow.https.html": [ - "b8bc0d1934ecc0143a55eb41de2c4007a065301b", + "7daef6e4c85c1931d16548720d528e4adfe98589", "reftest" ], "css/css-layout-api/auto-block-size-negative-ref.html": [ @@ -558679,7 +558882,7 @@ "support" ], "css/css-layout-api/auto-block-size-negative.https.html": [ - "4e912ed9f2a17be20046df35db22b086caf5d5cb", + "392edd125aea56db857f39264abf22c6e84b337b", "reftest" ], "css/css-layout-api/box-tree-registered-ref.html": [ @@ -558687,7 +558890,7 @@ "support" ], "css/css-layout-api/box-tree-registered.https.html": [ - "94790c178dbd394e8ccc8c0172d6354b2599cb2b", + "c3024f9f3aac08205f613014d61724aa4f1c40e8", "reftest" ], "css/css-layout-api/box-tree-unregistered-ref.html": [ @@ -558787,15 +558990,15 @@ "testharness" ], "css/css-layout-api/constraints-data-function-failure.https.html": [ - "394f68c614144c449c71cab7a50a0c4b3e802232", + "2d5e5240d794749ec2f9c7ee5eb9c4f9a6e54c9f", "reftest" ], "css/css-layout-api/constraints-data-sab-failure.https.html": [ - "eb652d9a552ed0b4466245f5efba78835e55cf20", + "8659c2edef56aa2fc72d3ba8ba807cb1d80dfe13", "reftest" ], "css/css-layout-api/constraints-data.https.html": [ - "b7b6964acb2cbb2864f5eecec6fbfcc8a622e69f", + "4bea061917ab74c542534e23c33b5135c8a01d15", "reftest" ], "css/css-layout-api/constraints-fixed-block-size-absolute-left-right-vrl.https.html": [ @@ -558971,27 +559174,31 @@ "testharness" ], "css/css-layout-api/fallback-constructor-error.https.html": [ - "590a9d01f9056265799ca2f2bfe8247dacc62c38", + "3f711af2e7ae955ded29895bc64eb52cac7f487e", "reftest" ], "css/css-layout-api/fallback-layout-error.https.html": [ - "54ea80b36b8863386a6411e7c50dee1c479ff28b", + "4c44f2168b2fb1e5c1071f40a355ea9a79714730", "reftest" ], "css/css-layout-api/fallback-layout-invalid-child.https.html": [ - "19b4188a83992f4b330a44331a0f0d638678a382", + "567c3f7f74590eb8fcb9defd724533738f36023f", "reftest" ], - "css/css-layout-api/fallback-layout-invalid-fragment-request.https.html": [ - "ccbf38b4fd2bf4ba3e6b4103387b3289a494133c", + "css/css-layout-api/fallback-layout-invalid-fragment.https.html": [ + "2e33e8761d32118154ced40882a095d30001c0fc", "reftest" ], - "css/css-layout-api/fallback-layout-invalid-fragment.https.html": [ - "e4253ff39352308de046fa4ceff98a8875d6a824", + "css/css-layout-api/fallback-layout-no-promise.https.html": [ + "e7b22a4c5cd21a892799e4f711704bcdc6d57ce3", "reftest" ], "css/css-layout-api/fallback-layout-return.https.html": [ - "42ccfc5c83cde198d1d1da693358e020eac4fde1", + "4c90ae7d336682c948a237937c01475a6fa4cdae", + "reftest" + ], + "css/css-layout-api/fallback-layout-unresolved-promise.https.html": [ + "369c56e4f9483537cf531fc1f20aea6f93fea88b", "reftest" ], "css/css-layout-api/fallback-ref.html": [ @@ -558999,19 +559206,19 @@ "support" ], "css/css-layout-api/fragment-data-function-failure.https.html": [ - "5e21be0bfd6704356d5f5796c1dc2dbd7c9e3dda", + "8496967be06401d5a21d097f4ad9db410758b49d", "reftest" ], "css/css-layout-api/fragment-data-immutable.https.html": [ - "cc1875bd61d88540edca4ff2b7a556ed84b1961f", + "e33a6ff0eea1c8877130493c8897e778ed7d448e", "reftest" ], "css/css-layout-api/fragment-data-sab-failure.https.html": [ - "59a9f835728e767b82cb8f147b856161914c6bf2", + "a6cfcf663dcf36a6d36fa019dc38ec49c6b29a09", "reftest" ], "css/css-layout-api/fragment-data.https.html": [ - "589ee9c76fd77c9e778aa6cba16f33ad90e0b14b", + "ffc360ab35c20327ad40e5445b3a97f9401039fc", "reftest" ], "css/css-layout-api/green-square-ref.html": [ @@ -559087,7 +559294,7 @@ "support" ], "css/css-layout-api/style-map-multi.https.html": [ - "dd0617ce2b515298626de65d6953c6e0a0403752", + "9c49d0f928dd90a657bc21d43343b5f7f5edf7e6", "reftest" ], "css/css-layout-api/style-map-ref.html": [ @@ -559095,7 +559302,7 @@ "support" ], "css/css-layout-api/style-map.https.html": [ - "d16054da3afc0a35340cc3c3eeaf3be093788a4f", + "0300b8dfb4ac2b98c54216b8edb6388e7cb60f2a", "reftest" ], "css/css-layout-api/support/constraints-fixed-block-size-quirky-body-iframe.html": [ @@ -559103,29 +559310,33 @@ "support" ], "css/css-layout-api/support/constraints-fixed-block-size.js": [ - "50f802f47eb6bc4ff0df78798c6b9c33648aa51a", + "25d73ef61568477784a002dfeb591b7f5c8d0b30", "support" ], "css/css-layout-api/support/constraints-fixed-inline-size.js": [ - "4e591f7a7365c38123a2e486445d6d982cacf71b", + "3636f366547342a04253864016bf89ed392ea48a", "support" ], "css/css-layout-api/support/layout-child-sizes-worklet.js": [ - "28546d6e422d42c134f32d78282b5cd20597a85f", + "5956c9a70c2ba650318fd6bbbc859f1cc8002f08", "support" ], "css/css-layout-api/support/layout-child-worklet.js": [ - "db20e2ec76b308544d20553477e0b3b47460aad6", + "70d1b7e4572bd09b2c201705bf643e2979caccf1", "support" ], "css/css-layout-api/support/layout-position-child-worklet.js": [ - "1ccfeab5aeb0f71854e28f1a811751c77533f666", + "7d5c494952d58038a6bc71719be3c6d8d6e363cb", "support" ], "css/css-layout-api/supports.https.html": [ "e269b292146cbab4f87041ab4cd2362010de5cf5", "testharness" ], + "css/css-layout-api/sync-layout-microtasks.https.html": [ + "84457c0c9d9d8808d7d4ccf6a3b1d0db234233d4", + "testharness" + ], "css/css-lists/META.yml": [ "05e60af1d8a558ec87a6c6f8acdeecdc0c7bb78d", "support" @@ -559414,6 +559625,30 @@ "9627ce936ae570325b430a1ac673cd66ae7d4252", "reftest" ], + "css/css-lists/parsing/counter-increment-invalid.html": [ + "262a38d76b57bb786268b42e8a9dc3df5b343f40", + "testharness" + ], + "css/css-lists/parsing/counter-increment-valid.html": [ + "277269000a21118a530f97ca5c2cb1061258933c", + "testharness" + ], + "css/css-lists/parsing/counter-reset-invalid.html": [ + "7a603fffc0d86226e6d56bd0b38c2069593191c4", + "testharness" + ], + "css/css-lists/parsing/counter-reset-valid.html": [ + "a71572289e41375e360b27a7ea7583538a2627d7", + "testharness" + ], + "css/css-lists/parsing/counter-set-invalid.html": [ + "9cc5be7c928305e647f97cdc360249dcba19b263", + "testharness" + ], + "css/css-lists/parsing/counter-set-valid.html": [ + "3a4a16af92690ae1cc462b707c2e059146c0fcc7", + "testharness" + ], "css/css-lists/parsing/list-style-computed.sub.html": [ "611fae5bf93636cd4d3402e91b1cd47148303617", "testharness" @@ -570998,6 +571233,34 @@ "f14d25a70ba3ccfc80a99e924bb6b6a7d4694b1e", "support" ], + "css/css-text-decor/reference/text-decoration-shorthands-001-ref.html": [ + "55436218b83199d3d49accaa9cdcc2e6f0753ef7", + "support" + ], + "css/css-text-decor/reference/text-decoration-shorthands-002-ref.html": [ + "c5f6070b8722c4f490dabd784794487a99c8cb99", + "support" + ], + "css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html": [ + "783a2b2ea3e2f7e69735f75aef5d4092dfffc79d", + "support" + ], + "css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html": [ + "dce958427c59e119eb3fb5d5a88fac09ee9e116d", + "support" + ], + "css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html": [ + "7458b7fe98c70c7bfbfb59e01511a30ff947a6f1", + "support" + ], + "css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html": [ + "e13e52976e2866259f8c291a8cfb59a05d8ec18c", + "support" + ], + "css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html": [ + "2861918d87f3cebaa3fe0d4978668e970424d84e", + "support" + ], "css/css-text-decor/reference/text-decoration-style-multiple-ref.html": [ "f80396930e1bbaf06df7b999cf657cf74af99bc0", "support" @@ -571406,6 +571669,30 @@ "2f7b2f55fea63bbb2c752c4c79e4e3415f1578be", "testharness" ], + "css/css-text-decor/text-decoration-shorthands-001.html": [ + "01654e503aaa8f34c4e0fd8f6fd271412cc61269", + "reftest" + ], + "css/css-text-decor/text-decoration-shorthands-002.html": [ + "2b3bc37192496656478bb737dcf1e84273e6a767", + "reftest" + ], + "css/css-text-decor/text-decoration-skip-ink-001.html": [ + "4c707650868bfdb3c2db5621db18ec31e5a1bf56", + "reftest" + ], + "css/css-text-decor/text-decoration-skip-ink-002.html": [ + "c073cd3d874c8a4d866966d056e282b109f96de1", + "reftest" + ], + "css/css-text-decor/text-decoration-skip-ink-003.html": [ + "74a30481cad3ebc598bcbf2e4c963e402cb36a7c", + "reftest" + ], + "css/css-text-decor/text-decoration-skip-ink-004.html": [ + "9d763f287c42491df3d445d3faf1ae444e4f9702", + "reftest" + ], "css/css-text-decor/text-decoration-skip-ink.html": [ "cd6f7a049c673e3dc92546f557e1813b20448128", "testharness" @@ -598807,7 +599094,7 @@ "reftest" ], "css/filter-effects/inheritance.html": [ - "2bd854ac051d78048e2d83b681d346762d9c5728", + "acb811bfad154e5a0b18eaddb799fc5dc679b114", "testharness" ], "css/filter-effects/interfaces.any.js": [ @@ -611803,7 +612090,7 @@ "support" ], "docs/Makefile": [ - "622e90f955b38d5b26dc83fa14b9dc05af2f4ca7", + "51d4b74a5696ffecbe2614e08b57986eb6b71e56", "support" ], "docs/README.md": [ @@ -611814,22 +612101,6 @@ "aa06e765d7bb14e4adf4cb1be840f7e2a93796cc", "support" ], - "docs/appendix/github-intro.md": [ - "95d9884a29091347e19349698534f1d8de86d7cc", - "support" - ], - "docs/appendix/index.md": [ - "2ab7dd39b8b70f0996ea5a285c4321a672442927", - "support" - ], - "docs/appendix/reverting.md": [ - "277ccb047abb1b54448a3be76722412e0ddb1979", - "support" - ], - "docs/appendix/test-templates.md": [ - "22f8f78920cacf46eb772a179180f23f9d92ca7a", - "support" - ], "docs/assets/_reftest_graph_example.dot": [ "9389f07dc2bd72c957e6bbaca6e3cfcd2a8afd68", "support" @@ -611887,11 +612158,11 @@ "support" ], "docs/index.md": [ - "74d2329422c42e50a26280c1a711a7a509f4badc", + "3bb730b9bf69d3be171fa0c6e762c2fc7eb1b851", "support" ], "docs/make.bat": [ - "9bc48e7c52e1f33d795904b195d08c49b2462de8", + "5373270635259d46ff6e7318b4a596ce10d9162b", "support" ], "docs/requirements.txt": [ @@ -611907,11 +612178,15 @@ "support" ], "docs/reviewing-tests/git.md": [ - "471edff0843ff760294838cbd9b52331c2bb351a", + "b74b4b77ae4c9124bab579b8270071645ffa2f57", "support" ], "docs/reviewing-tests/index.md": [ - "7f0767d22f707e48d7248d39e839d97e3882c155", + "47deed0d6197ab5925b5f69b9fa028bd0f13cb12", + "support" + ], + "docs/reviewing-tests/reverting.md": [ + "277ccb047abb1b54448a3be76722412e0ddb1979", "support" ], "docs/running-tests/chrome.md": [ @@ -611931,7 +612206,7 @@ "support" ], "docs/running-tests/from-local-system.md": [ - "0ee71765891f9493d96e7d788e8dc63383cd4b58", + "97a6b9e940f716877b33e546cb657e1462293c87", "support" ], "docs/running-tests/from-web.md": [ @@ -611939,7 +612214,7 @@ "support" ], "docs/running-tests/index.md": [ - "795e65ef3b82712efeb0ab0fef0f5a2decdcd031", + "7e8a9913132b074556907875f49aa2a9e81905f2", "support" ], "docs/running-tests/safari.md": [ @@ -611974,6 +612249,10 @@ "b39a77d1c7a2eabaa2aa340b832950e92ddc9719", "support" ], + "docs/writing-tests/github-intro.md": [ + "95d9884a29091347e19349698534f1d8de86d7cc", + "support" + ], "docs/writing-tests/h2tests.md": [ "c13295e1fe668af1ed9561463b2ec18719f8deb6", "support" @@ -611983,7 +612262,7 @@ "support" ], "docs/writing-tests/index.md": [ - "8af5aef5fed5a65eb993f596b04e98a7d2bea6f6", + "c4da79c0d8a4832c690fd64cffdebb8da4c23869", "support" ], "docs/writing-tests/lint-tool.md": [ @@ -611999,7 +612278,7 @@ "support" ], "docs/writing-tests/reftest-tutorial.md": [ - "5eabb07089467c8752461827f65017683fdcb86e", + "a51430942ce8853f788715eb2f548435406f520a", "support" ], "docs/writing-tests/reftests.md": [ @@ -612019,7 +612298,11 @@ "support" ], "docs/writing-tests/submission-process.md": [ - "a970f47cf1d64461ed5cbdb01f246b05908ba685", + "dfc73ffadef64e7da6f69443566b8e737ffe4441", + "support" + ], + "docs/writing-tests/test-templates.md": [ + "22f8f78920cacf46eb772a179180f23f9d92ca7a", "support" ], "docs/writing-tests/testdriver-tutorial.md": [ @@ -612038,6 +612321,10 @@ "d2ec64c834fec80f50e5b3d2cd06e05de790d9a5", "support" ], + "docs/writing-tests/tools.md": [ + "0a9a7dcfd59203260dd2411895ee49f2d85fad80", + "support" + ], "docs/writing-tests/visual.md": [ "464b80fd81966e0e0523b0dc04d5a99aae4e0b87", "support" @@ -618907,7 +619194,7 @@ "reftest" ], "fetch/corb/img-mime-types-coverage.tentative.sub.html": [ - "6d7fd60f449ac78f8ff7c07265acb2101b15bd39", + "c2aa93236360de7c34ecdbddac161b381de8ac7d", "testharness" ], "fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub-ref.html": [ @@ -620142,10 +620429,6 @@ "c85e7f65135328f6bea5a9e35bf8c16c4f189ee6", "support" ], - "fonts/math/stack-axisheight7000.woff": [ - "7a9dc5d4cb1bbc758d2ecf34641e331e9ac7acb0", - "support" - ], "fonts/math/stack-bottomdisplaystyleshiftdown5000-axisheight1000.woff": [ "d8f8ae48a6d4c24ba17ed9185b769a8956418002", "support" @@ -641919,7 +642202,7 @@ "support" ], "interfaces/web-nfc.idl": [ - "f082a1e8952cbe6cad0e7e67fa8e7486135f90ba", + "d5fe1c085a2e3a127211c48cca97feb2410349a9", "support" ], "interfaces/web-share.idl": [ @@ -642931,7 +643214,7 @@ "testharness" ], "mathml/presentation-markup/fractions/frac-parameters-2.html": [ - "9c363866de08ab15202cab10e014a25fdd7e2f0d", + "151265787ab3f5c8eb7b80588dc30d3e633d6e79", "testharness" ], "mathml/presentation-markup/fractions/frac-parameters-gap-001-ref.html": [ @@ -643687,7 +643970,7 @@ "support" ], "mathml/tools/stacks.py": [ - "18626291336352157b8b450dfaac77caf37cfd89", + "9a4c291e6ea2412b3ac85b297c8ad1eac3d55109", "support" ], "mathml/tools/stretchstacks.py": [ @@ -644711,7 +644994,7 @@ "support" ], "mediasession/idlharness.window.js": [ - "5fa0d22c10a543f187bcc047fd2a244ec699eba9", + "e4d914544ed5df95b20287f8bd5482fdd7fe1045", "testharness" ], "mediasession/mediametadata.html": [ @@ -644722,6 +645005,10 @@ "63f3548d941a1cec895fc8029eb8f661f9008b67", "testharness" ], + "mediasession/positionstate.html": [ + "2eab2986d4583c1a289b7876010193c8d3d44b3f", + "testharness" + ], "mediasession/setactionhandler.html": [ "6e1bb26c67a828ae847734070024b404138e7932", "testharness" @@ -654967,7 +655254,7 @@ "manual" ], "payment-request/blank.html": [ - "7852a427e861a9be3c9068deb306b67ad909843f", + "edeaa45bb620788242711725cfd8189b681835ae", "support" ], "payment-request/change-shipping-option-manual.https.html": [ @@ -654999,7 +655286,7 @@ "testharness" ], "payment-request/payment-is-showing.https.html": [ - "cb5b2e16dd25af8b01cb9b485490e05a84504dc4", + "618bfe97c1d4367331855f01f6dc9513528360c6", "testharness" ], "payment-request/payment-request-abort-method.https.html": [ @@ -676763,7 +677050,7 @@ "support" ], "tools/certs/README.md": [ - "63119ba7f6c8e8f4a48b99eff62dbe1da0e61089", + "62c9d24685af8c00151b8fc804e6edca6d6c36d5", "support" ], "tools/certs/cacert.key": [ @@ -683402,8 +683689,16 @@ "3f2790a1092267e23e489b2ca181d99286ef0f42", "testharness" ], + "upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html": [ + "5bfcb133b4ca781796c0992641658ac30b0b6c0a", + "testharness" + ], + "upgrade-insecure-requests/shared-worker-upgrade.https.html": [ + "7be1042ff7433aeda678e64e4a01f6e2ebbcb1bf", + "testharness" + ], "upgrade-insecure-requests/support/generate.py": [ - "1b0c2897feed76afb338ba11a93f01022a024550", + "ee27203699707fcf7f48e51ef8a7d541c0791260", "support" ], "upgrade-insecure-requests/support/redirect-cors.py": [ @@ -683411,7 +683706,7 @@ "support" ], "upgrade-insecure-requests/support/testharness-helper.sub.js": [ - "f578e8987a1be5f34fc1fd8b8d8bcc026db4eed7", + "da20d2644b312d6225497081c67fa4b66f12b43a", "support" ], "upgrade-insecure-requests/websocket-upgrade.https.html": [ @@ -687287,7 +687582,7 @@ "support" ], "webdriver/tests/execute_async_script/collections.py": [ - "8376fdfe061ca615ed12f632d878221ec5cb0e78", + "14848da7e2966939c1efb75eb2b66d389f0b3d38", "wdspec" ], "webdriver/tests/execute_async_script/execute_async.py": [ @@ -687311,7 +687606,7 @@ "support" ], "webdriver/tests/execute_script/collections.py": [ - "edee1e5532b81f07f19be09b40fc99c2df9ef6f8", + "f939713c8064d5826e4439acc6b1803ac0a25950", "wdspec" ], "webdriver/tests/execute_script/cyclic.py": [ @@ -687955,7 +688250,7 @@ "support" ], "webdriver/tests/support/inline.py": [ - "639699809c1e3b77af6b1be9e384f2140e7b6630", + "b65b9cb8b11d27ee4c947a5c2ba5b59cd3853c78", "support" ], "webdriver/tests/support/merge_dictionaries.py": [ diff --git a/tests/wpt/metadata/css/css-flexbox/fit-content-item-001.html.ini b/tests/wpt/metadata/css/css-flexbox/fit-content-item-001.html.ini new file mode 100644 index 00000000000..6beee86e999 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/fit-content-item-001.html.ini @@ -0,0 +1,2 @@ +[fit-content-item-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-001.html.ini b/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-001.html.ini new file mode 100644 index 00000000000..06e7dc44afb --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-001.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-004.html.ini b/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-004.html.ini new file mode 100644 index 00000000000..368d9d865f0 --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/text-decoration-skip-ink-004.html.ini @@ -0,0 +1,2 @@ +[text-decoration-skip-ink-004.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth.html.ini b/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth.html.ini index e1a609649d6..ee754ce4aa3 100644 --- a/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth.html.ini +++ b/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth.html.ini @@ -3,3 +3,9 @@ [scroll-behavior: smooth on DIV element] expected: FAIL + [Smooth scrolling while doing history navigation.] + expected: FAIL + + [Instant scrolling while doing history navigation.] + expected: FAIL + diff --git a/tests/wpt/metadata/css/filter-effects/inheritance.html.ini b/tests/wpt/metadata/css/filter-effects/inheritance.html.ini index 8cb328486d6..bb1de8b1667 100644 --- a/tests/wpt/metadata/css/filter-effects/inheritance.html.ini +++ b/tests/wpt/metadata/css/filter-effects/inheritance.html.ini @@ -23,3 +23,9 @@ [Property flood-color has initial value rgb(0, 0, 0)] expected: FAIL + [Property backdrop-filter does not inherit] + expected: FAIL + + [Property backdrop-filter has initial value none] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index a3d8088b086..148d725b0fb 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -315,18 +315,12 @@ [<iframe>: combined response Content-Type: text/html */*] expected: FAIL - [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] + [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] + [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL - [<iframe>: combined response Content-Type: text/html;x=" text/plain] - expected: FAIL - - [<iframe>: combined response Content-Type: text/html;" text/plain] - expected: FAIL - - [<iframe>: separate response Content-Type: text/html;" \\" text/plain] + [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini index 5c001592859..d2df9b78483 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -56,6 +56,3 @@ [separate text/javascript x/x] expected: FAIL - [separate text/javascript;charset=windows-1252 error text/javascript] - expected: FAIL - diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index a6c8ded6195..d4ba399b762 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,9 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL - [X-Content-Type-Options%3A%20%22nosniFF%22] - expected: FAIL - - [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + [X-Content-Type-Options%3A%20'NosniFF'] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini index 75d75b4cda2..385376c7321 100644 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini @@ -1,4 +1,4 @@ -[traverse_the_history_2.html] +[traverse_the_history_4.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini new file mode 100644 index 00000000000..dc2e45516de --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_5.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini index 127392316de..702af61a3c4 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini @@ -1,7 +1,11 @@ [form-submission-algorithm.html] + expected: TIMEOUT [If form's firing submission events is true, then return; 'submit' event] expected: FAIL [If form's firing submission events is true, then return; 'invalid' event] expected: FAIL + [Cannot navigate (after constructing the entry list)] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini new file mode 100644 index 00000000000..9e522297c94 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/toggleEvent.html.ini @@ -0,0 +1,7 @@ +[toggleEvent.html] + [Calling open twice on 'details' fires only one toggle event] + expected: FAIL + + [Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element] + expected: FAIL + diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 0e19a714f0b..c6a7cc5bb41 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -176,3 +176,9 @@ [X 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[30\]\t9.4836157560348511e-1\t9.5236867666244507e-1\t4.0071010589599609e-3\t4.2075103446311962e-3\t3.8985999999999999e-3\n\t[31\]\t9.2646563053131104e-1\t9.3139332532882690e-1\t4.9276947975158691e-3\t5.2906700783754857e-3\t3.8985999999999999e-3\n\t[32\]\t9.0087991952896118e-1\t9.0675884485244751e-1\t5.8789253234863281e-3\t6.4834496590358351e-3\t3.8985999999999999e-3\n\t[33\]\t8.7170630693435669e-1\t8.7856203317642212e-1\t6.8557262420654297e-3\t7.8033490899654511e-3\t3.8985999999999999e-3\n\t[34\]\t8.3906102180480957e-1\t8.4691369533538818e-1\t7.8526735305786133e-3\t9.2721059699818163e-3\t3.8985999999999999e-3\n\t...and 31037 more errors.\n\tMax AbsError of 9.8276454210281394e-1 at index of 39267.\n\t[39267\]\t2.1028969344127294e-16\t-9.8276454210281372e-1\t9.8276454210281394e-1\t1.0000000000000002e+0\t3.8985999999999999e-3\n\tMax RelError of 3.3137802965303198e+0 at index of 1253.\n\t[1253\]\t-4.3022233992815018e-2\t-9.9732093513011932e-3\t3.3049024641513824e-2\t3.3137802965303198e+0\t3.8985999999999999e-3\n] expected: FAIL + [X SNR (-729.5069243798895 dB) is not greater than or equal to 65.737. Got -729.5069243798895.] + 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[30\]\t9.4836157560348511e-1\t9.5236867666244507e-1\t4.0071010589599609e-3\t4.2075103446311962e-3\t3.8985999999999999e-3\n\t[31\]\t9.2646563053131104e-1\t9.3139332532882690e-1\t4.9276947975158691e-3\t5.2906700783754857e-3\t3.8985999999999999e-3\n\t[32\]\t9.0087991952896118e-1\t9.0675884485244751e-1\t5.8789253234863281e-3\t6.4834496590358351e-3\t3.8985999999999999e-3\n\t[33\]\t8.7170630693435669e-1\t8.7856203317642212e-1\t6.8557262420654297e-3\t7.8033490899654511e-3\t3.8985999999999999e-3\n\t[34\]\t8.3906102180480957e-1\t8.4691369533538818e-1\t7.8526735305786133e-3\t9.2721059699818163e-3\t3.8985999999999999e-3\n\t...and 31037 more errors.\n\tMax AbsError of 3.1372149685965721e+38 at index of 20238.\n\t[20238\]\t-3.1372149685965721e+38\t-4.7574958205223083e-1\t3.1372149685965721e+38\t6.5942569094094308e+38\t3.8985999999999999e-3\n\tMax RelError of 6.5942569094094308e+38 at index of 20238.\n\t[20238\]\t-3.1372149685965721e+38\t-4.7574958205223083e-1\t3.1372149685965721e+38\t6.5942569094094308e+38\t3.8985999999999999e-3\n] + expected: FAIL + diff --git a/tests/wpt/metadata/workers/WorkerGlobalScope-close.html.ini b/tests/wpt/metadata/workers/WorkerGlobalScope-close.html.ini deleted file mode 100644 index fe8654e447c..00000000000 --- a/tests/wpt/metadata/workers/WorkerGlobalScope-close.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[WorkerGlobalScope-close.html] - [Test sending a message after closing.] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini index 650c91da4a6..333edb3a26e 100644 --- a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini +++ b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini @@ -1,5 +1,4 @@ [sharedworker-in-worker.html] - expected: ERROR [Base URL in workers: new SharedWorker()] expected: FAIL diff --git a/tests/wpt/web-platform-tests/README.md b/tests/wpt/web-platform-tests/README.md index 5054889dc16..919676ee213 100644 --- a/tests/wpt/web-platform-tests/README.md +++ b/tests/wpt/web-platform-tests/README.md @@ -180,76 +180,6 @@ Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set `git config core.autocrlf false` in your working tree. -Certificates -============ - -By default pre-generated certificates for the web-platform.test domain -are provided in [`tools/certs`](tools/certs). If you wish to generate new -certificates for any reason it's possible to use OpenSSL when starting -the server, or starting a test run, by providing the -`--ssl-type=openssl` argument to the `wpt serve` or `wpt run` -commands. - -If you installed OpenSSL in such a way that running `openssl` at a -command line doesn't work, you also need to adjust the path to the -OpenSSL binary. This can be done by adding a section to `config.json` -like: - -``` -"ssl": {"openssl": {"binary": "/path/to/openssl"}} -``` - -On Windows using OpenSSL typically requires installing an OpenSSL distribution. -[Shining Light](https://slproweb.com/products/Win32OpenSSL.html) -provide a convenient installer that is known to work, but requires a -little extra setup, i.e.: - -Run the installer for Win32_OpenSSL_v1.1.0b (30MB). During installation, -change the default location for where to Copy OpenSSL Dlls from the -System directory to the /bin directory. - -After installation, ensure that the path to OpenSSL (typically, -this will be `C:\OpenSSL-Win32\bin`) is in your `%Path%` -[Environment Variable](http://www.computerhope.com/issues/ch000549.htm). -If you forget to do this part, you will most likely see a 'File Not Found' -error when you start wptserve. - -Finally, set the path value in the server configuration file to the -default OpenSSL configuration file location. To do this create a file -called `config.json`. Then add the OpenSSL configuration below, -ensuring that the key `ssl/openssl/base_conf_path` has a value that is -the path to the OpenSSL config file (typically this will be -`C:\\OpenSSL-Win32\\bin\\openssl.cfg`): - -``` -{ - "ssl": { - "type": "openssl", - "encrypt_after_connect": false, - "openssl": { - "openssl_binary": "openssl", - "base_path: "_certs", - "force_regenerate": false, - "base_conf_path": "C:\\OpenSSL-Win32\\bin\\openssl.cfg" - }, - }, -} -``` - -### Trusting Root CA - -To prevent browser SSL warnings when running HTTPS tests locally, the -web-platform-tests Root CA file `cacert.pem` in [tools/certs](tools/certs) -must be added as a trusted certificate in your OS/browser. - -**NOTE**: The CA should not be installed in any browser profile used -outside of tests, since it may be used to generate fake -certificates. For browsers that use the OS certificate store, tests -should therefore not be run manually outside a dedicated OS instance -(e.g. a VM). To avoid this problem when running tests in Chrome or -Firefox use `wpt run`, which disables certificate checks and therefore -doesn't require the root CA to be trusted. - Publication =========== @@ -339,36 +269,6 @@ For more details, see the [lint-tool documentation][lint-tool]. [lint-tool]: https://web-platform-tests.org/writing-tests/lint-tool.html -Adding command-line scripts ("tools" subdirs) ---------------------------------------------- - -Sometimes you may want to add a script to the repository that's meant -to be used from the command line, not from a browser (e.g., a script -for generating test files). If you want to ensure (e.g., for security -reasons) that such scripts won't be handled by the HTTP server, but -will instead only be usable from the command line, then place them in -either: - -* the `tools` subdir at the root of the repository, or - -* the `tools` subdir at the root of any top-level directory in the - repository which contains the tests the script is meant to be used - with - -Any files in those `tools` directories won't be handled by the HTTP -server; instead the server will return a 404 if a user navigates to -the URL for a file within them. - -If you want to add a script for use with a particular set of tests but -there isn't yet any `tools` subdir at the root of a top-level -directory in the repository containing those tests, you can create a -`tools` subdir at the root of that top-level directory and place your -scripts there. - -For example, if you wanted to add a script for use with tests in the -`notifications` directory, create the `notifications/tools` subdir and -put your script there. - Test Review =========== diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js index 441573d20e9..41cbed01a5b 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js @@ -11,7 +11,7 @@ self.addEventListener('install', (event) => { // cookie change logic that this test aims to cover. try { await cookieStore.subscribeToChanges([ - { name: 'cookie-name1', matchType: 'equals', url: '/scope/path1' }]); + { name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' }]); await cookieStore.subscribeToChanges([ { }, // Test the default values for subscription properties. { name: 'cookie-prefix', matchType: 'starts-with' }, diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html index 723de2312fe..2f26094aa2e 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html @@ -9,13 +9,14 @@ 'use strict'; (async () => { - const scope = 'scope'; + // Not using an explicit scope here in order for script URL to be in scope, + // to cover implicit subscription URL construction. - let registration = await navigator.serviceWorker.getRegistration(scope); + let registration = await navigator.serviceWorker.getRegistration(); if (registration) await registration.unregister(); registration = await navigator.serviceWorker.register( - 'serviceworker_cookieStore_subscriptions.js', {scope}); + 'serviceworker_cookieStore_subscriptions.js'); fetch_tests_from_worker(registration.installing); })(); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js index c48ad8bb98b..293969e5b8f 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js @@ -8,7 +8,8 @@ self.addEventListener('install', (event) => { event.waitUntil((async () => { try { await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]); + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]); // If the worker enters the "redundant" state, the UA may terminate it // before all tests have been reported to the client. Stifle errors in diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js index 228b5289856..31e644d50b2 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js @@ -8,7 +8,8 @@ self.addEventListener('install', (event) => { event.waitUntil((async () => { try { await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]); + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]); // If the worker enters the "redundant" state, the UA may terminate it // before all tests have been reported to the client. Stifle errors in diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js index 43edadd7bb8..3d07c86492e 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js @@ -8,7 +8,8 @@ self.addEventListener('install', (event) => { event.waitUntil((async () => { try { await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]); + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]); // If the worker enters the "redundant" state, the UA may terminate it // before all tests have been reported to the client. Stifle errors in diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test index a3eaff03ba3..94a71188114 100644 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/0002-test @@ -1 +1 @@ -Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT +Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test index a3eaff03ba3..94a71188114 100644 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0006-test @@ -1 +1 @@ -Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT +Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test index 29fb0a2695d..6ca8efc711b 100644 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test +++ b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/comma0007-test @@ -1 +1 @@ -Set-Cookie: foo=bar; Expires=Fri 07 Aug 2019 08:04:19 GMT, baz=qux +Set-Cookie: foo=bar; Expires=Fri 01 Jan 2038 00:00:00 GMT, baz=qux diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-computed.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-computed.html new file mode 100644 index 00000000000..a20aa7d9989 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-name-computed.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Animations: getComputedStyle().animationName</title> +<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-name"> +<meta name="assert" content="animation-name computed value is as specified."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +</head> +<body> +<div id="target"></div> +<script> +test_computed_value("animation-name", 'none'); + +test_computed_value("animation-name", 'foo'); +test_computed_value("animation-name", 'Both'); +test_computed_value("animation-name", 'ease-in'); +test_computed_value("animation-name", 'infinite'); +test_computed_value("animation-name", 'paused'); +test_computed_value("animation-name", 'first, second, third'); + +// TODO: Test strings, after https://github.com/w3c/csswg-drafts/issues/2435 +// is resolved. +// Examples that need testing either here or in animation-name-invalid.html : +// '"Initial"', '"initial"', '"None"', '"Default"', '" x "', "1", '" "', '""', +// '"multi word string"', '"---\\22---"' +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/inheritance.html b/tests/wpt/web-platform-tests/css/css-box/inheritance.html index 5047b8b1df0..22443bf9a94 100644 --- a/tests/wpt/web-platform-tests/css/css-box/inheritance.html +++ b/tests/wpt/web-platform-tests/css/css-box/inheritance.html @@ -4,6 +4,7 @@ <meta charset="utf-8"> <title>Inheritance of CSS Box Model properties</title> <link rel="help" href="https://drafts.csswg.org/css-box-3/#property-index"> +<link rel="help" href="https://www.w3.org/TR/CSS2/"> <meta name="assert" content="Properties do not inherit."> <meta name="assert" content="length-percentage properties have initial value 0."> <script src="/resources/testharness.js"></script> @@ -15,6 +16,9 @@ <div id="target"></div> </div> <script> +assert_not_inherited('clear', 'none', 'right'); +assert_not_inherited('float', 'none', 'right'); + assert_not_inherited('margin-bottom', '0px', '10px'); assert_not_inherited('margin-left', '0px', '10px'); assert_not_inherited('margin-right', '0px', '10px'); diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/fit-content-item-001.html b/tests/wpt/web-platform-tests/css/css-flexbox/fit-content-item-001.html new file mode 100644 index 00000000000..c5dfb74711f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/fit-content-item-001.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-cross-item"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<meta name="flags" content="" /> +<meta name="assert" content="A column flex container shrink wraps items both when determining their flex base sizes and when laying them out after their flexed size has been determined." /> + +<style> + +x-flexbox { + display: flex; + flex-direction: column; +} + +x-item { + display: block; + background: red; + /* Override default alignment of "stretch" because items don't shrink to fit + when they are stretched. */ + align-self: start; +} + +#mainSizeDependsOnCrossSize { + padding-bottom: 50%; + background: green; +} + +#widthSetter { + width: 100px; + height: 50px; + background: green; +} + +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + +<x-flexbox> + <x-item> <!-- If fit-content is skipped when determining flex base size, this item gets a main size of 50px + 100vw / 2. --> + <div id=widthSetter></div> + <div id=mainSizeDependsOnCrossSize></div> + </x-item> +</x-flexbox> diff --git a/tests/wpt/web-platform-tests/css/css-grid/chrome-crash-001.html b/tests/wpt/web-platform-tests/css/css-grid/chrome-crash-001.html new file mode 100644 index 00000000000..c9ea9332a1e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/chrome-crash-001.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=991446"> +<meta name="assert" content="The renderer should not crash."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body style="display: inline-grid; align-items: end;"> + <div style="border-top-color: inherit;"></div> + text +</body> +<script> +test(() => { + document.body.offsetTop; + document.body.style.alignItems = ''; + document.body.offsetTop; +}, 'The renderer should not crash.'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-absolute.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-absolute.https.html index c2a58c9a2a3..bf81b21a4bb 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-absolute.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-absolute.https.html @@ -60,8 +60,8 @@ <script id="code" type="text/worklet"> registerLayout('block-size-100', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 100}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-flex.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-flex.https.html index fe95c7e23cc..5b152bb645f 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-flex.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-flex.https.html @@ -42,14 +42,14 @@ <script id="code" type="text/worklet"> registerLayout('block-size-100', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 100}; } }); registerLayout('block-size-50', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 50}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-floats.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-floats.https.html index 67775eb9954..342c57b5300 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-floats.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-floats.https.html @@ -44,8 +44,8 @@ <script id="code" type="text/worklet"> registerLayout('block-size-100', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 100}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-inflow.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-inflow.https.html index b8bc0d1934e..7daef6e4c85 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-inflow.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-inflow.https.html @@ -50,8 +50,8 @@ <script id="code" type="text/worklet"> registerLayout('block-size-100', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 100}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-negative.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-negative.https.html index 4e912ed9f2a..392edd125ae 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-negative.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/auto-block-size-negative.https.html @@ -38,8 +38,8 @@ <script id="code" type="text/worklet"> registerLayout('block-size-negative', class { - *intrinsicSizes() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: -100}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/box-tree-registered.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/box-tree-registered.https.html index 94790c178db..c3024f9f3aa 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/box-tree-registered.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/box-tree-registered.https.html @@ -55,8 +55,8 @@ <script id="code" type="text/worklet"> registerLayout('registered', class { - *intrinsicSizes() {} - *layout() { throw Error(); } + async intrinsicSizes() {} + async layout() { throw Error(); } }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-function-failure.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-function-failure.https.html index 394f68c6141..2d5e5240d79 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-function-failure.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-function-failure.https.html @@ -29,18 +29,17 @@ <script id="code" type="text/worklet"> registerLayout('parent', class { - *intrinsicSizes() {} - *layout() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { let childFragment = null; try { - childFragment = yield child.layoutNextFragment({ + childFragment = await child.layoutNextFragment({ data: { fn: function() {} } }); } catch(e) { // Success! The structured cloning algorithm should have thrown an error. - childFragment = yield child.layoutNextFragment({}); + childFragment = await child.layoutNextFragment({}); return {autoBlockSize: 100, childFragments: [childFragment]}; } @@ -49,9 +48,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 0}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html index eb652d9a552..8659c2edef5 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html @@ -29,23 +29,17 @@ <script id="code" type="text/worklet"> registerLayout('parent', class { - *intrinsicSizes() {} - *layout() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { let childFragment = null; try { - // We need SABs to be enabled to properly run this test. - if (typeof SharedArrayBuffer !== 'undefined') { - childFragment = yield child.layoutNextFragment({ - data: { sab: new SharedArrayBuffer(4) } - }); - } else { - throw Error(); - } + childFragment = await child.layoutNextFragment({ + data: { sab: new SharedArrayBuffer(4) } + }); } catch(e) { // Success! The structured cloning algorithm should have thrown an error. - childFragment = yield child.layoutNextFragment({}); + childFragment = await child.layoutNextFragment({}); return {autoBlockSize: 100, childFragments: [childFragment]}; } @@ -54,9 +48,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout() { + async intrinsicSizes() {} + async layout() { return {autoBlockSize: 0}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data.https.html index b7b6964acb2..4bea061917a 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data.https.html @@ -35,11 +35,10 @@ const DATA = { }; registerLayout('parent', class { - *intrinsicSizes() {} - *layout() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { - const childFragment = yield child.layoutNextFragment({data: DATA}); + const childFragment = await child.layoutNextFragment({data: DATA}); // If the child's block-size is 100 the structured cloning worked. if (childFragment.blockSize === 100) { @@ -51,9 +50,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { // Use JSON.stringify to make sure the structured cloning worked. if (constraints.data !== DATA && JSON.stringify(constraints.data) === JSON.stringify(DATA)) { diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-constructor-error.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-constructor-error.https.html index 590a9d01f90..3f711af2e7a 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-constructor-error.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-constructor-error.https.html @@ -40,8 +40,8 @@ <script id="code" type="text/worklet"> registerLayout('throwing-ctor', class { constructor() { throw Error('fail!'); } - *intrinsicSizes() {} - *layout() {} + async intrinsicSizes() {} + async layout() {} }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-error.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-error.https.html index 54ea80b36b8..4c44f2168b2 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-error.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-error.https.html @@ -39,8 +39,8 @@ <script id="code" type="text/worklet"> registerLayout('throwing-layout', class { - *intrinsicSizes() {} - *layout() { throw Error('fail!'); } + async intrinsicSizes() {} + async layout() { throw Error('fail!'); } }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html index 19b4188a839..567c3f7f745 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html @@ -32,15 +32,15 @@ registerLayout('bad-child-layout', class { static get inputProperties() { return ['--fail']; } - *intrinsicSizes() {} - *layout(children, _, __, styleMap) { + async intrinsicSizes() {} + async layout(children, _, __, styleMap) { if (styleMap.get('--fail').toString() !== 'true') { this.child = children[0]; } // Try to perform layout on the child. If its invalid (we skipped the if // statement above) we should fallback to block layout. - const fragment = yield this.child.layoutNextFragment({}); + const fragment = await this.child.layoutNextFragment({}); return {autoBlockSize: 0, childFragments: [fragment]}; } diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html deleted file mode 100644 index ccbf38b4fd2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html +++ /dev/null @@ -1,84 +0,0 @@ -<!DOCTYPE html> -<html class=reftest-wait> -<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback"> -<link rel="match" href="fallback-ref.html"> -<meta name="assert" content="This test checks that a layout() class performing layout on an invalid fragment request will fallback to block layout." /> -<style> -.test { - background: red; - border: solid 2px; - width: 100px; -} - -.test > div { - height: 100px; -} - -@supports (display: layout(bad-request)) { - .test { - display: layout(bad-request); - background: green; - } -} -</style> -<script src="/common/reftest-wait.js"></script> -<script src="/common/worklet-reftest.js"></script> - -<div class="test"> - <div></div> -</div> - -<script id="code" type="text/worklet"> -registerLayout('bad-request', class { - static get inputProperties() { return ['--fail']; } - - *intrinsicSizes() {} - *layout(children, _, __, styleMap) { - if (styleMap.get('--fail').toString() !== 'true') { - this.request = children[0].layoutNextFragment({}); - } - - // Try to perform layout on the child. If its invalid (we skipped the if - // statement above) we should fallback to block layout. - const childFragments = yield [this.request]; - - return {autoBlockSize: 0, childFragments}; - } -}); -</script> - -<script> -function raf() { - return new Promise((resolve) => { - requestAnimationFrame(() => { - resolve(); - }); - }); -} - -(async function() { - if (typeof CSS.layoutWorklet === 'undefined') { - takeScreenshot(); - return; - } - - await importWorklet(CSS.layoutWorklet, document.getElementById('code').textContent); - - // Ensure that all instances have a child to perform an invalid layout upon. - const test = document.getElementsByClassName('test')[0]; - for (let i = 0; i < 100; i++) { - test.innerHTML = '<div><div>'; - await raf(); - } - - // The next layout should mean that we will fallback to block. - test.innerHTML = '<div></div>'; - test.style.setProperty('--fail', 'true'); - - // Finish up the test. - await raf(); - await raf(); - takeScreenshot(); -})(); -</script> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html index e4253ff3935..2e33e8761d3 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html @@ -32,10 +32,10 @@ registerLayout('bad-request', class { static get inputProperties() { return ['--fail']; } - *intrinsicSizes() {} - *layout(children, _, __, styleMap) { + async intrinsicSizes() {} + async layout(children, _, __, styleMap) { if (styleMap.get('--fail').toString() !== 'true') { - this.fragment = yield children[0].layoutNextFragment({}); + this.fragment = await children[0].layoutNextFragment({}); } // Return, if the fragment is invalid (we skipped the if statement above) diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-no-promise.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-no-promise.https.html new file mode 100644 index 00000000000..e7b22a4c5cd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-no-promise.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback"> +<link rel="match" href="fallback-ref.html"> +<meta name="assert" content="This test checks that a layout() class with a layout function that doesn't return a promise will fallback to block layout." /> +<style> +.test { + background: red; + border: solid 2px; + width: 100px; +} + +.child { + height: 100px; +} + +@supports (display: layout(no-promise)) { + .test { + display: layout(no-promise); + background: green; + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <div class="child"></div> +</div> + +<script id="code" type="text/worklet"> +registerLayout('no-promise', class { + async intrinsicSizes() {} + layout() { return {autoBlockSize: 50}; } +}); +</script> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-return.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-return.https.html index 42ccfc5c83c..4c90ae7d336 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-return.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-return.https.html @@ -39,8 +39,8 @@ <script id="code" type="text/worklet"> registerLayout('bad-return', class { - *intrinsicSizes() {} - *layout() { return 42; } + async intrinsicSizes() {} + async layout() { return 42; } }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html new file mode 100644 index 00000000000..369c56e4f94 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback"> +<link rel="match" href="fallback-ref.html"> +<meta name="assert" content="This test checks that a layout() class with a layout function that doesn't return a promise will fallback to block layout." /> +<style> +.test { + background: red; + border: solid 2px; + width: 100px; +} + +.child { + height: 100px; +} + +@supports (display: layout(unresolved-promise)) { + .test { + display: layout(unresolved-promise); + background: green; + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <div class="child"></div> +</div> + +<script id="code" type="text/worklet"> +registerLayout('unresolved-promise', class { + async intrinsicSizes() {} + layout() { return new Promise(() => { /* never resolves */ }); } +}); +</script> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-function-failure.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-function-failure.https.html index 5e21be0bfd6..8496967be06 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-function-failure.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-function-failure.https.html @@ -29,10 +29,9 @@ <script id="code" type="text/worklet"> registerLayout('fallback-fn', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { - const childFragments = yield children.map(child => child.layoutNextFragment()); + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { + const childFragments = await children.map(child => child.layoutNextFragment()); return {autoBlockSize: 0, childFragments, data: {fn: function() {}}}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html index cc1875bd61d..e33a6ff0eea 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html @@ -29,18 +29,17 @@ <script id="code" type="text/worklet"> registerLayout('parent', class { - *intrinsicSizes() {} - *layout() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { - const childFragment10 = yield child.layoutNextFragment({fixedInlineSize: 10}); + const childFragment10 = await child.layoutNextFragment({fixedInlineSize: 10}); // First layout data should be "10". if (childFragment10.data.size !== 10) { return {autoBlockSize: 0, childFragments: [childFragment10]}; } - const childFragment20 = yield child.layoutNextFragment({fixedInlineSize: 20}); + const childFragment20 = await child.layoutNextFragment({fixedInlineSize: 20}); // Second layout data should be "20". if (childFragment20.data.size !== 20) { @@ -57,9 +56,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { return {autoBlockSize: 10, data: {size: constraints.fixedInlineSize}}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-sab-failure.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-sab-failure.https.html index 59a9f835728..a6cfcf663dc 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-sab-failure.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-sab-failure.https.html @@ -29,16 +29,11 @@ <script id="code" type="text/worklet"> registerLayout('fallback-sab', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { - const childFragments = yield children.map(child => child.layoutNextFragment()); + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { + const childFragments = await Promise.all(children.map(child => child.layoutNextFragment())); - if (typeof SharedArrayBuffer !== 'undefined') { - return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }}; - } else { - throw Error(); - } + return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }}; } }); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data.https.html index 589ee9c76fd..ffc360ab35c 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data.https.html @@ -35,11 +35,10 @@ const DATA = { }; registerLayout('parent', class { - *intrinsicSizes() {} - *layout() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { - const childFragment = yield child.layoutNextFragment(); + const childFragment = await child.layoutNextFragment(); // Use JSON.stringify to make sure the structured cloning worked. if (childFragment.data !== DATA && @@ -52,9 +51,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { return {autoBlockSize: 10, data: DATA}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/style-map-multi.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/style-map-multi.https.html index dd0617ce2b5..9c49d0f928d 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/style-map-multi.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/style-map-multi.https.html @@ -33,8 +33,8 @@ registerLayout('test', class { return [ '--bar', '--foo', 'empty-cells', 'margin-left']; } - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { const expected = [ {property: '--bar', value: '[CSSUnparsedValue=]'}, {property: '--foo', value: '[CSSUnparsedValue= bar]'}, diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/style-map.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/style-map.https.html index d16054da3af..0300b8dfb4a 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/style-map.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/style-map.https.html @@ -40,8 +40,8 @@ const tmpl = (test, idx) => { registerLayout('test-${idx}', class { static get inputProperties() { return ['${test.property}']; } - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { const value = styleMap.get('${test.property}'); const result = '[' + value.constructor.name + '=' + value.toString() + ']'; if (result != '${test.expected}') diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js index 50f802f47eb..25d73ef6156 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-block-size.js @@ -3,8 +3,8 @@ registerLayout('test', class { return ['--expected-block-size']; } - *intrinsicSizes() {} - *layout([child], edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout([child], edges, constraints, styleMap) { let childFixedInlineSize = 0; let childFixedBlockSize = 0; if (constraints.fixedBlockSize === JSON.parse(styleMap.get('--expected-block-size'))) { @@ -12,7 +12,7 @@ registerLayout('test', class { childFixedBlockSize = 100; } - const childFragments = [yield child.layoutNextFragment({ + const childFragments = [await child.layoutNextFragment({ fixedInlineSize: childFixedInlineSize, fixedBlockSize: childFixedBlockSize, })]; diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js index 4e591f7a736..3636f366547 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/constraints-fixed-inline-size.js @@ -1,6 +1,6 @@ registerLayout('test', class { - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { if (constraints.fixedInlineSize !== 100) return {autoBlockSize: 0}; diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js index 28546d6e422..5956c9a70c2 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js @@ -20,9 +20,9 @@ registerLayout('test', class { ]; } - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { - const childFragments = yield children.map((child) => { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { + const childFragments = await Promise.all(children.map((child) => { const childConstraints = {}; const availableInlineSize = parseNumber(child.styleMap.get('--available-inline-size')); const availableBlockSize = parseNumber(child.styleMap.get('--available-block-size')); @@ -38,7 +38,7 @@ registerLayout('test', class { percentageInlineSize, percentageBlockSize, }); - }); + })); const actual = childFragments.map((childFragment) => { return { diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js index db20e2ec76b..70d1b7e4572 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js @@ -9,14 +9,14 @@ registerLayout('test', class { return [ '--child' ]; } - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { const expected = JSON.parse(styleMap.get('--child-expected').toString()); const actual = children.map((child) => { return child.styleMap.get('--child').toString().trim(); }); - const childFragments = yield children.map((child) => { return child.layoutNextFragment({}); }); + const childFragments = await Promise.all(children.map(child => child.layoutNextFragment({}))); if (!areArraysEqual(expected, actual)) return {autoBlockSize: 0, childFragments}; diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js index 1ccfeab5aeb..7d5c494952d 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-position-child-worklet.js @@ -6,11 +6,9 @@ registerLayout('test', class { ]; } - *intrinsicSizes() {} - *layout(children, edges, constraints, styleMap) { - const childFragments = yield children.map((child) => { - return child.layoutNextFragment({}); - }); + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { + const childFragments = await Promise.all(children.map((child) => child.layoutNextFragment({}))); for (let i = 0; i < children.length; i++) { childFragments[i].inlineOffset = parseInt(children[i].styleMap.get('--inline-offset').toString()); diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/sync-layout-microtasks.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/sync-layout-microtasks.https.html new file mode 100644 index 00000000000..84457c0c9d9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/sync-layout-microtasks.https.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback"> +<meta name="assert" content="This test checks running the microtask queue for a layout() class won't run the main world's microtask queue." /> +<style> +#test { + display: layout(child-layout); + width: 100px; +} + +#test > div { + height: 100px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div id="test"> + <div></div> +</div> + +<script id="code" type="text/worklet"> +registerLayout('child-layout', class { + async intrinsicSizes() {} + async layout([child]) { + const fragment = await child.layoutNextFragment(); + return {autoBlockSize: 50, childFragments: [fragment]}; + } +}); +</script> + +<script> +promise_test(async t => { + if (typeof CSS.layoutWorklet === 'undefined') { + throw Error('CSS Layout API not supported.'); + } + + await importWorklet(CSS.layoutWorklet, document.getElementById('code').textContent); + + let resolved = false; + let p = Promise.resolve().then(() => { + resolved = true; + }); + assert_false(resolved); + + // Running the layout-worklet's microtask queue shouldn't trigger the main + // world's microtask queue. + assert_equals(document.getElementById('test').clientHeight, 50); + assert_false(resolved); + + await p; + assert_true(resolved); +}); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-invalid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-invalid.html new file mode 100644 index 00000000000..262a38d76b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-invalid.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-increment with invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-increment"> +<meta name="assert" content="counter-increment supports only the grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_invalid_value('counter-increment', 'none chapter'); +test_invalid_value('counter-increment', '3'); +test_invalid_value('counter-increment', '99 imagenum'); +test_invalid_value('counter-increment', 'section -1, imagenum 99'); +test_invalid_value('counter-increment', 'section 3.14'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-valid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-valid.html new file mode 100644 index 00000000000..277269000a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-increment-valid.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-increment with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-increment"> +<meta name="assert" content="counter-increment supports the full grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_valid_value('counter-increment', 'none'); +test_valid_value('counter-increment', 'chapter', 'chapter 1'); +test_valid_value('counter-increment', 'section -1'); +test_valid_value('counter-increment', 'first -1 second third 99', 'first -1 second 1 third 99'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-invalid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-invalid.html new file mode 100644 index 00000000000..7a603fffc0d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-invalid.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-reset with invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset"> +<meta name="assert" content="counter-reset supports only the grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_invalid_value('counter-reset', 'none chapter'); +test_invalid_value('counter-reset', '3'); +test_invalid_value('counter-reset', '99 imagenum'); +test_invalid_value('counter-reset', 'section -1, imagenum 99'); +test_invalid_value('counter-reset', 'section 3.14'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-valid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-valid.html new file mode 100644 index 00000000000..a71572289e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-reset-valid.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-reset with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset"> +<meta name="assert" content="counter-reset supports the full grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_valid_value('counter-reset', 'none'); +test_valid_value('counter-reset', 'chapter', 'chapter 0'); +test_valid_value('counter-reset', 'section -1'); +test_valid_value('counter-reset', 'first -1 second third 99', 'first -1 second 0 third 99'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-invalid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-invalid.html new file mode 100644 index 00000000000..9cc5be7c928 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-invalid.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-set with invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set"> +<meta name="assert" content="counter-set supports only the grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_invalid_value('counter-set', 'none chapter'); +test_invalid_value('counter-set', '3'); +test_invalid_value('counter-set', '99 imagenum'); +test_invalid_value('counter-set', 'section -1, imagenum 99'); +test_invalid_value('counter-set', 'section 3.14'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-valid.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-valid.html new file mode 100644 index 00000000000..3a4a16af926 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/counter-set-valid.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Lists: parsing counter-set with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set"> +<meta name="assert" content="counter-set supports the full grammar '[ <counter-name> <integer>? ]+ | none'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_valid_value('counter-set', 'none'); +test_valid_value('counter-set', 'chapter', 'chapter 0'); +test_valid_value('counter-set', 'section -1'); +test_valid_value('counter-set', 'first -1 second third 99', 'first -1 second 0 third 99'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-001-ref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-001-ref.html new file mode 100644 index 00000000000..55436218b83 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-001-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Reference case for text-decoration shorthands</title> + <style> + div{ + text-decoration: green underline; + } + </style> + </head> + <body> + <p>Test passes if a green underline renders</p> + <div>XX XX</div> + </body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-002-ref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-002-ref.html new file mode 100644 index 00000000000..c5f6070b872 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-shorthands-002-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Reference case for text-decoration shorthands</title> + <style> + div{ + text-decoration: green underline; + text-decoration-thickness: 100px; + } + </style> + </head> + <body> + <p>Test passes if a thick green underline is rendered</p> + <div>XX XX</div> + </body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html new file mode 100644 index 00000000000..783a2b2ea3e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-001-notref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Non-reference case for text-decoration-skip-ink</title> + <style> + div{ + text-decoration: green underline; + text-decoration-skip-ink: none; + } + </style> + </head> + <body> + <p>Test passes if the underline skips the p and g's in the text below</p> + <div>ping pong</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html new file mode 100644 index 00000000000..dce958427c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-002-ref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Reference case for text-decoration-skip-ink</title> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + </head> + <body> + <p>Test passes if no underline is visible</p> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html new file mode 100644 index 00000000000..7458b7fe98c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-notref.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Non-reference case for text-decoration-skip-ink</title> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + /* + This non-reference case ensures that the test does + not frivolously pass if the underline is not rendered at all + */ + div{ + font: 20px/1 Ahem; + color: rgba(255,255,0,0.25); + } + </style> + </head> + <body> + <p>Test passes if underline is rendered below the text</p> + <div>XXXX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html new file mode 100644 index 00000000000..e13e52976e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-003-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Reference case for text-decoration-skip-ink</title> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + div{ + font: 20px/1 Ahem; + color: rgba(255,255,0,0.25); + text-decoration: green underline; + text-decoration-skip-ink: none; + text-underline-offset: .5em; + } + </style> + </head> + <body> + <p>Test passes if underline is rendered below the text</p> + <div>XXXX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html new file mode 100644 index 00000000000..2861918d87f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-decoration-skip-ink-004-notref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Non-reference case for text-decoration-skip-ink</title> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + div{ + font: 20px/1 Ahem; + color: rgba(255,255,0,0.25); + text-decoration: green underline; + text-decoration-skip-ink: none; + text-underline-offset: -.3em; + } + </style> + </head> + <body> + <p>Test passes if underline appears only across the 'p' glyph</p> + <div>XXpX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-001.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-001.html new file mode 100644 index 00000000000..01654e503aa --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-001.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration shorthands</title> + <meta name="assert" content="text-decoration: the line should be rendered at a thickness of auto"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property"> + <link rel="match" href="reference/text-decoration-shorthands-001-ref.html"> + <style> + div{ + text-decoration: green underline auto; + } + </style> + </head> + <body> + <p>Test passes if a green underline renders</p> + <div>XX XX</div> + </body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-002.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-002.html new file mode 100644 index 00000000000..2b3bc371924 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-shorthands-002.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration shorthands</title> + <meta name="assert" content="text-decoration: text-decoration-thickness is parsed as part of the text-decoration shorthand"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property"> + <link rel="match" href="reference/text-decoration-shorthands-002-ref.html"> + <style> + /* + This test is designed to make sure the underline is rendered + the same, regardless of whether or not the thickness is set + in the shorthands or the longhands form + */ + div{ + text-decoration: green underline 100px; + } + </style> + </head> + <body> + <p>Test passes if a thick green underline is rendered</p> + <div>XX XX</div> + </body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-001.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-001.html new file mode 100644 index 00000000000..4c707650868 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-001.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration-skip-ink</title> + <meta name="assert" content="text-decoration-skip-ink: descenders are skipped"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property"> + <link rel="mismatch" href="reference/text-decoration-skip-ink-001-notref.html"> + <style> + div{ + text-decoration: green underline; + text-decoration-skip-ink: auto; + } + </style> + </head> + <body> + <p>Test passes if the underline skips the p and g's in the text below</p> + <div>ping pong</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-002.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-002.html new file mode 100644 index 00000000000..c073cd3d874 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-002.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration-skip-ink</title> + <meta name="assert" content="text-decoration-skip-ink: no underline is rendered for transparent Ahem font"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property"> + <link rel="match" href="reference/text-decoration-skip-ink-002-ref.html"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + /* + No underline should be rendered for Ahem text when + text-decoration-skip-ink is applied. + */ + div{ + font: 20px/1 Ahem; + text-decoration: green underline; + text-decoration-skip-ink: auto; + color: transparent; + } + </style> + </head> + <body> + <p>Test passes if no underline is visible</p> + <div>XXXX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-003.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-003.html new file mode 100644 index 00000000000..74a30481cad --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-003.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration-skip-ink</title> + <meta name="assert" content="text-decoration-skip-ink: an uninterrupted underline is rendered below the text"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property"> + <link rel="match" href="reference/text-decoration-skip-ink-003-ref.html"> + <link rel="mismatch" href="reference/text-decoration-skip-ink-003-notref.html"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + /* + This test ensures that the underline offset is taken into account + when calculating the skip-ink. No skip-ink should be applied + because the underline is being moved below the text. + */ + div{ + font: 20px/1 Ahem; + color: rgba(255,255,0,0.25); + text-decoration: green underline; + text-decoration-skip-ink: auto; + text-underline-offset: .5em; + } + </style> + </head> + <body> + <p>Test passes if underline is rendered below the text</p> + <div>XXXX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-004.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-004.html new file mode 100644 index 00000000000..9d763f287c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-decoration-skip-ink-004.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Test case for text-decoration-skip-ink</title> + <meta name="assert" content="text-decoration-skip-ink: a partial underline is rendered above the 'p'"> + <link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property"> + <link rel="mismatch" href="reference/text-decoration-skip-ink-004-notref.html"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <style> + /* + This test ensures that the underline offset is taken into account + when calculating the skip-ink. The underline should skip all + characters except the third. + */ + div{ + font: 20px/1 Ahem; + color: rgba(255,255,0,0.25); + text-decoration: green underline; + text-decoration-skip-ink: auto; + text-underline-offset: -.3em; + } + </style> + </head> + <body> + <p>Test passes if underline appears only across the 'p' glyph</p> + <div>XXpX</div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/filter-effects/inheritance.html b/tests/wpt/web-platform-tests/css/filter-effects/inheritance.html index 2bd854ac051..acb811bfad1 100644 --- a/tests/wpt/web-platform-tests/css/filter-effects/inheritance.html +++ b/tests/wpt/web-platform-tests/css/filter-effects/inheritance.html @@ -4,6 +4,7 @@ <meta charset="utf-8"> <title>Inheritance of Filter Effects properties</title> <link rel="help" href="https://drafts.fxtf.org/filter-effects/#property-index"> +<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#property-index"> <meta name="assert" content="Properties inherit according to the spec."> <meta name="assert" content="Properties have initial values according to the spec."> <script src="/resources/testharness.js"></script> @@ -15,6 +16,7 @@ <div id="target"></div> </div> <script> +assert_not_inherited('backdrop-filter', 'none', 'blur(10px)'); assert_inherited('color-interpolation-filters', 'linearrgb', 'srgb'); assert_not_inherited('filter', 'none', 'blur(10px)'); assert_not_inherited('flood-color', 'rgb(0, 0, 0)', 'rgb(42, 53, 64)'); diff --git a/tests/wpt/web-platform-tests/docs/Makefile b/tests/wpt/web-platform-tests/docs/Makefile index 622e90f955b..51d4b74a569 100644 --- a/tests/wpt/web-platform-tests/docs/Makefile +++ b/tests/wpt/web-platform-tests/docs/Makefile @@ -13,11 +13,12 @@ help: .PHONY: help Makefile -tools/wptserve: +tools/%: mkdir -p $(shell dirname $@) - ln -s ../../tools/wptserve $@ + test -d ../$@ + ln -s ../../$@ $@ # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile tools/wptserve +%: Makefile tools/wptserve tools/certs @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/tests/wpt/web-platform-tests/docs/appendix/index.md b/tests/wpt/web-platform-tests/docs/appendix/index.md deleted file mode 100644 index 2ab7dd39b8b..00000000000 --- a/tests/wpt/web-platform-tests/docs/appendix/index.md +++ /dev/null @@ -1,10 +0,0 @@ -# Appendices - -```eval_rst -.. toctree :: - :maxdepth: 1 - - github-intro - reverting - test-templates -``` diff --git a/tests/wpt/web-platform-tests/docs/index.md b/tests/wpt/web-platform-tests/docs/index.md index 74d2329422c..3bb730b9bf6 100644 --- a/tests/wpt/web-platform-tests/docs/index.md +++ b/tests/wpt/web-platform-tests/docs/index.md @@ -53,10 +53,9 @@ free to add yourself to the META.yml file! writing-tests/index reviewing-tests/index admin/index - appendix/index ``` [public-test-infra]: https://lists.w3.org/Archives/Public/public-test-infra/ [IRC]: irc://irc.w3.org:6667/testing [web irc]: http://irc.w3.org -[github-intro]: appendix/github-intro +[github-intro]: writing-tests/github-intro diff --git a/tests/wpt/web-platform-tests/docs/make.bat b/tests/wpt/web-platform-tests/docs/make.bat index 9bc48e7c52e..53732706352 100644 --- a/tests/wpt/web-platform-tests/docs/make.bat +++ b/tests/wpt/web-platform-tests/docs/make.bat @@ -28,6 +28,7 @@ if errorlevel 9009 ( if not exist tools\ ( mkdir tools )
if not exist tools\wptserve\ ( mklink /d tools\wptserve ..\..\tools\wptserve )
+if not exist tools\certs\ ( mklink /d tools\certs ..\..\tools\certs )
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
diff --git a/tests/wpt/web-platform-tests/docs/reviewing-tests/git.md b/tests/wpt/web-platform-tests/docs/reviewing-tests/git.md index 471edff0843..b74b4b77ae4 100644 --- a/tests/wpt/web-platform-tests/docs/reviewing-tests/git.md +++ b/tests/wpt/web-platform-tests/docs/reviewing-tests/git.md @@ -76,8 +76,8 @@ If you do not expect work with more PRs from the same author, you may also discard your connection to their repo: `git remote remove <author-id>` -[clone]: ../appendix/github-intro.html#clone -[commit]: ../appendix/github-intro.html#commit -[configure]: ../appendix/github-intro.html#configure-remote-upstream -[fork]: ../appendix/github-intro.html#fork-the-test-repository -[submit]: ../appendix/github-intro.html#submit +[clone]: ../writing-tests/github-intro.html#clone +[commit]: ../writing-tests/github-intro.html#commit +[configure]: ../writing-tests/github-intro.html#configure-remote-upstream +[fork]: ../writing-tests/github-intro.html#fork-the-test-repository +[submit]: ../writing-tests/github-intro.html#submit diff --git a/tests/wpt/web-platform-tests/docs/reviewing-tests/index.md b/tests/wpt/web-platform-tests/docs/reviewing-tests/index.md index 7f0767d22f7..47deed0d619 100644 --- a/tests/wpt/web-platform-tests/docs/reviewing-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/reviewing-tests/index.md @@ -10,6 +10,7 @@ suites, test contributions must be reviewed by a peer. checklist email git + reverting ``` ## Test Review Policy diff --git a/tests/wpt/web-platform-tests/docs/appendix/reverting.md b/tests/wpt/web-platform-tests/docs/reviewing-tests/reverting.md index 277ccb047ab..277ccb047ab 100644 --- a/tests/wpt/web-platform-tests/docs/appendix/reverting.md +++ b/tests/wpt/web-platform-tests/docs/reviewing-tests/reverting.md diff --git a/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md b/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md index 0ee71765891..97a6b9e940f 100644 --- a/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md +++ b/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md @@ -104,7 +104,7 @@ https://web-platform.test:8443/tools/runner/index.html * This server has all the capabilities of the publicly-deployed version--see [Running the Tests from the Web](from-web). -\**See [Trusting Root CA](https://github.com/web-platform-tests/wpt/blob/master/README.md#trusting-root-ca)* +\**See [Trusting Root CA](../tools/certs/README.md)* ## Via the command line diff --git a/tests/wpt/web-platform-tests/docs/running-tests/index.md b/tests/wpt/web-platform-tests/docs/running-tests/index.md index 795e65ef3b8..7e8a9913132 100644 --- a/tests/wpt/web-platform-tests/docs/running-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/running-tests/index.md @@ -6,6 +6,7 @@ from-web from-local-system custom-runner + ../tools/certs/README.md ``` The simplest way to run the tests is via the public website. More detail on diff --git a/tests/wpt/web-platform-tests/docs/appendix/github-intro.md b/tests/wpt/web-platform-tests/docs/writing-tests/github-intro.md index 95d9884a290..95d9884a290 100644 --- a/tests/wpt/web-platform-tests/docs/appendix/github-intro.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/github-intro.md diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/index.md b/tests/wpt/web-platform-tests/docs/writing-tests/index.md index 8af5aef5fed..c4da79c0d8a 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/index.md @@ -26,8 +26,11 @@ There's also a load of [general guidelines](general-guidelines) that apply to al testdriver testdriver-tutorial testharness + tools visual wdspec + test-templates + github-intro ``` ## Test Type diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/reftest-tutorial.md b/tests/wpt/web-platform-tests/docs/writing-tests/reftest-tutorial.md index 5eabb070894..a51430942ce 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/reftest-tutorial.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/reftest-tutorial.md @@ -19,7 +19,7 @@ You'll need to [configure your system to use WPT's tools](../running-tests/from-local-system), but you won't need them until towards the end of this tutorial. Although it includes some very brief instructions on using git, you can find more guidance in [the tutorial for git -and GitHub](../appendix/github-intro). +and GitHub](../writing-tests/github-intro). WPT's reftests are great for testing web-platform features that have some visual effect. [The reftests reference page](reftests) describes them in the @@ -264,7 +264,7 @@ And now we can push the commit to our fork of WPT: The last step is to submit the test for review. WPT doesn't actually need the test we wrote in this tutorial, but if we wanted to submit it for inclusion in the repository, we would create a pull request on GitHub. [The guide on git and -GitHub](../appendix/github-intro) has all the details on how to do that. +GitHub](../writing-tests/github-intro) has all the details on how to do that. ## More practice diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/submission-process.md b/tests/wpt/web-platform-tests/docs/writing-tests/submission-process.md index a970f47cf1d..dfc73ffadef 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/submission-process.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/submission-process.md @@ -31,7 +31,7 @@ on, e.g. `git checkout -b topic-name` request will be automatically merged. For detailed guidelines on setup and each of these steps, please refer to the -[Github Test Submission](../appendix/github-intro) documentation. +[Github Test Submission](../writing-tests/github-intro) documentation. Hop on to the [mailing list][public-test-infra] or [IRC][] ([webclient][web irc], join channel `#testing`) if you have an issue. There is diff --git a/tests/wpt/web-platform-tests/docs/appendix/test-templates.md b/tests/wpt/web-platform-tests/docs/writing-tests/test-templates.md index 22f8f78920c..22f8f78920c 100644 --- a/tests/wpt/web-platform-tests/docs/appendix/test-templates.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/test-templates.md diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/tools.md b/tests/wpt/web-platform-tests/docs/writing-tests/tools.md new file mode 100644 index 00000000000..0a9a7dcfd59 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/writing-tests/tools.md @@ -0,0 +1,25 @@ +# Command-line utility scripts + +Sometimes you may want to add a script to the repository that's meant to be +used from the command line, not from a browser (e.g., a script for generating +test files). If you want to ensure (e.g., for security reasons) that such +scripts won't be handled by the HTTP server, but will instead only be usable +from the command line, then place them in either: + +* the `tools` subdir at the root of the repository, or + +* the `tools` subdir at the root of any top-level directory in the repository + which contains the tests the script is meant to be used with + +Any files in those `tools` directories won't be handled by the HTTP server; +instead the server will return a 404 if a user navigates to the URL for a file +within them. + +If you want to add a script for use with a particular set of tests but there +isn't yet any `tools` subdir at the root of a top-level directory in the +repository containing those tests, you can create a `tools` subdir at the root +of that top-level directory and place your scripts there. + +For example, if you wanted to add a script for use with tests in the +`notifications` directory, create the `notifications/tools` subdir and put your +script there. diff --git a/tests/wpt/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub.html b/tests/wpt/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub.html index 6d7fd60f449..c2aa9323636 100644 --- a/tests/wpt/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub.html +++ b/tests/wpt/web-platform-tests/fetch/corb/img-mime-types-coverage.tentative.sub.html @@ -22,6 +22,13 @@ "application/dash+xml", // video format "image/gif;HI=THERE", + // Non-image MIME-types that in practice get used for images on the web. + // + // https://bugzilla.mozilla.org/show_bug.cgi?id=1302539 + "application/octet-stream", + // https://crbug.com/990853 + "application/x-www-form-urlencoded", + // MIME types that may seem to be JSON or XML, but really aren't - i.e. // these MIME types are not covered by: // - https://mimesniff.spec.whatwg.org/#json-mime-type diff --git a/tests/wpt/web-platform-tests/fonts/math/stack-axisheight7000.woff b/tests/wpt/web-platform-tests/fonts/math/stack-axisheight7000.woff Binary files differdeleted file mode 100644 index 7a9dc5d4cb1..00000000000 --- a/tests/wpt/web-platform-tests/fonts/math/stack-axisheight7000.woff +++ /dev/null diff --git a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl index f082a1e8952..d5fe1c085a2 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl @@ -33,13 +33,7 @@ dictionary NDEFRecordInit { NDEFRecordData data; }; -enum NDEFRecordType { - "empty", - "text", - "url", - "json", - "opaque" -}; +typedef DOMString NDEFRecordType; typedef (DOMString or ArrayBuffer or NDEFMessageInit) NDEFMessageSource; diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html index 9c363866de0..151265787ab 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/fractions/frac-parameters-2.html @@ -13,10 +13,6 @@ font-size: 10px; } @font-face { - font-family: axisheight7000; - src: url("/fonts/math/stack-axisheight7000.woff"); - } - @font-face { font-family: bottomdisplaystyleshiftdown5000-axisheight1000; src: url("/fonts/math/stack-bottomdisplaystyleshiftdown5000-axisheight1000.woff"); } @@ -56,13 +52,6 @@ }); function runTests() { - test(function() { - assert_true(MathMLFeatureDetection.has_mspace()); - - var v = 7000 * emToPx; - assert_approx_equals(getBox("ref0001").top - getBox("num0001").bottom, - v, epsilon, "mfrac: axis height"); - }, "AxisHeight"); test(function() { assert_true(MathMLFeatureDetection.has_mspace()); @@ -119,16 +108,6 @@ <body> <div id="log"></div> <p> - <math style="font-family: axisheight7000;"> - <mspace id="ref0001" depth="1em" width="3em" style="background: green"/> - <mfrac linethickness="0px"> - <mspace width="3em" height="1em" id="num0001" style="background: blue"/> - <mspace width="3em"/> - </mfrac> - </math> - </p> - <hr/> - <p> <math display="block" style="font-family: bottomdisplaystyleshiftdown5000-axisheight1000;"> <mspace id="ref0002" width="3em" height="1em" style="background: green"/> <mfrac linethickness="0px"> diff --git a/tests/wpt/web-platform-tests/mathml/tools/stacks.py b/tests/wpt/web-platform-tests/mathml/tools/stacks.py index 18626291336..9a4c291e6ea 100644 --- a/tests/wpt/web-platform-tests/mathml/tools/stacks.py +++ b/tests/wpt/web-platform-tests/mathml/tools/stacks.py @@ -3,17 +3,6 @@ from utils import mathfont import fontforge -v = 7 * mathfont.em -f = mathfont.create("stack-axisheight%d" % v) -f.math.AxisHeight = v -f.math.StackBottomDisplayStyleShiftDown = 0 -f.math.StackBottomShiftDown = 0 -f.math.StackDisplayStyleGapMin = 0 -f.math.StackGapMin = 0 -f.math.StackTopDisplayStyleShiftUp = 0 -f.math.StackTopShiftUp = 0 -mathfont.save(f) - v1 = 5 * mathfont.em v2 = 1 * mathfont.em f = mathfont.create("stack-bottomdisplaystyleshiftdown%d-axisheight%d" % (v1, v2)) diff --git a/tests/wpt/web-platform-tests/mediasession/idlharness.window.js b/tests/wpt/web-platform-tests/mediasession/idlharness.window.js index 5fa0d22c10a..e4d914544ed 100644 --- a/tests/wpt/web-platform-tests/mediasession/idlharness.window.js +++ b/tests/wpt/web-platform-tests/mediasession/idlharness.window.js @@ -1,7 +1,7 @@ // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js -// https://wicg.github.io/mediasession/ +// https://w3c.github.io/mediasession/ 'use strict'; diff --git a/tests/wpt/web-platform-tests/mediasession/positionstate.html b/tests/wpt/web-platform-tests/mediasession/positionstate.html new file mode 100644 index 00000000000..2eab2986d45 --- /dev/null +++ b/tests/wpt/web-platform-tests/mediasession/positionstate.html @@ -0,0 +1,110 @@ +<!DOCTYPE html> +<title>MediaSession.setPositionState</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script> +test(() => { + window.navigator.mediaSession.setPositionState(null); +}, 'Test setPositionState with a null value'); + +test(() => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9, + position: 10.1, + playbackRate: 1.5 + }); +}, 'Test setPositionState with a valid value for forward playback'); + +test(() => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9, + playbackRate: 1.0 + }); +}, 'Test setPositionState with optional position'); + +test(() => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9, + position: 10.1 + }); +}, 'Test setPositionState with optional playback rate'); + +test(() => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9 + }); +}, 'Test setPositionState with only duration'); + +test(() => { + window.navigator.mediaSession.setPositionState({ + duration: 0 + }); +}, 'Test setPositionState with zero duration'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9, + position: 10.1, + playbackRate: -2.0 + }); + }); +}, 'Test setPositionState throws a TypeError if playback rate is negative'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + duration: -1 + }); + }); +}, 'Test setPositionState throws a TypeError if duration is negative'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + duration: 10, + position: -1 + }); + }); +}, 'Test setPositionState throws a TypeError if position is negative'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + duration: 10, + position: 20 + }); + }); +}, 'Test setPositionState throws a TypeError if duration is less than position'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + duration: 60.9, + position: 10.1, + playbackRate: 0.0 + }); + }); +}, 'Test setPositionState throws a TypeError if playback rate is zero'); + +test(() => { + assert_throws( + new TypeError, + _ => { + window.navigator.mediaSession.setPositionState({ + position: 10.1, + playbackRate: 1.0 + }); + }); +}, 'Test setPositionState throws a TypeError if duration is not specified'); +</script> diff --git a/tests/wpt/web-platform-tests/payment-request/blank.html b/tests/wpt/web-platform-tests/payment-request/blank.html index 7852a427e86..edeaa45bb62 100644 --- a/tests/wpt/web-platform-tests/payment-request/blank.html +++ b/tests/wpt/web-platform-tests/payment-request/blank.html @@ -1 +1,16 @@ -<!DOCTYPE html> <meta charset="utf-8" /> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <title>Blank Page</title> + <script> + window.onload = function(event) { + // This is needed to ensure the onload event fires when this page is + // opened as a popup. + // See https://github.com/web-platform-tests/wpt/pull/18157 + }; + </script> + </head> + <body> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/payment-request/payment-is-showing.https.html b/tests/wpt/web-platform-tests/payment-request/payment-is-showing.https.html index cb5b2e16dd2..618bfe97c1d 100644 --- a/tests/wpt/web-platform-tests/payment-request/payment-is-showing.https.html +++ b/tests/wpt/web-platform-tests/payment-request/payment-is-showing.https.html @@ -4,30 +4,31 @@ rel="help" href="https://w3c.github.io/browser-payment-api/#dfn-payment-request-is-showing" /> +<meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/resources/testdriver.js"></script> <body> <script> - 'use strict'; + "use strict"; const applePayMethod = { - supportedMethods: 'https://apple.com/apple-pay', + supportedMethods: "https://apple.com/apple-pay", data: { version: 3, - merchantIdentifier: 'merchant.com.example', - countryCode: 'US', - merchantCapabilities: ['supports3DS'], - supportedNetworks: ['visa'], + merchantIdentifier: "merchant.com.example", + countryCode: "US", + merchantCapabilities: ["supports3DS"], + supportedNetworks: ["visa"], }, }; - const methods = [{supportedMethods: 'basic-card'}, applePayMethod]; + const methods = [{supportedMethods: "basic-card"}, applePayMethod]; const details = { total: { - label: 'Total', + label: "Total", amount: { - currency: 'USD', - value: '1.00', + currency: "USD", + value: "1.00", }, }, }; @@ -38,13 +39,13 @@ * @param {String} src Optional resource URL to load. * @returns {Promise} Resolves when the src loads. */ - async function attachIframe(src = 'blank.html') { - const iframe = document.createElement('iframe'); + async function attachIframe(src = "blank.html") { + const iframe = document.createElement("iframe"); iframe.allowPaymentRequest = true; iframe.src = src; document.body.appendChild(iframe); await new Promise(resolve => { - iframe.addEventListener('load', resolve, {once: true}); + iframe.addEventListener("load", resolve, {once: true}); }); return iframe; } @@ -55,10 +56,10 @@ * @param {String} src Optional resource URL to load. * @returns {Promise} Resolves when the src loads. */ - async function loadPopupInsideUserGesture(src = 'blank.html') { - const popupWindow = window.open(src, '', 'width=400,height=400'); + async function loadPopupInsideUserGesture(src = "blank.html") { + const popupWindow = window.open(src, "", "width=400,height=400"); await new Promise(resolve => { - popupWindow.addEventListener('load', resolve, {once: true}); + popupWindow.addEventListener("load", resolve, {once: true}); }); popupWindow.focus(); return popupWindow; @@ -72,24 +73,24 @@ // showing boolean" to true and then try to show a second payment sheet in // the same window. The second show() should reject. const [showPromise1, showPromise2] = await test_driver.bless( - 'testing one payment sheet per window', + "testing one payment sheet per window", () => { return [request1.show(), request2.show()]; }, ); await promise_rejects( t, - 'AbortError', + "AbortError", showPromise2, - 'Attempting to show a second payment request must reject.', + "Attempting to show a second payment request must reject.", ); await request1.abort(); await promise_rejects( t, - 'AbortError', + "AbortError", showPromise1, - 'request1 was aborted via .abort()', + "request1 was aborted via .abort()", ); // Finally, request2 should have been "closed", so trying to show @@ -98,17 +99,17 @@ const rejectedPromise = request2.show(); await promise_rejects( t, - 'InvalidStateError', + "InvalidStateError", rejectedPromise, - 'Attempting to show a second payment request must reject.', + "Attempting to show a second payment request must reject.", ); // Finally, we confirm that request2's returned promises are unique. assert_not_equals( showPromise2, rejectedPromise, - 'Returned Promises be unique', + "Returned Promises be unique", ); - }, 'The top browsing context can only show one payment sheet at a time.'); + }, "The top browsing context can only show one payment sheet at a time."); promise_test(async t => { const iframe = await attachIframe(); @@ -120,7 +121,7 @@ // Let's get some blessed showPromises const [showPromise] = await test_driver.bless( - 'testing top window show() blocked by payment sheet in iframe', + "testing top window show() blocked by payment sheet in iframe", () => { // iframe sets "is showing boolean", ignore the returned promise. iframeRequest.show(); @@ -131,9 +132,9 @@ await promise_rejects( t, - 'AbortError', + "AbortError", showPromise, - 'iframe is already showing a payment request.', + "iframe is already showing a payment request.", ); // Cleanup @@ -152,25 +153,30 @@ // We first show a payment request via the the top level browsing context, // windowRequest.show() sets "is showing boolean" to true. Then we try to // show a payment request in the iframe, which should reject. - const [iframeShowPromise] = await test_driver.bless( - 'testing iframe show() blocked by payment sheet in top window', + const [windowShowPromise, iframeShowPromise] = await test_driver.bless( + "testing iframe show() blocked by payment sheet in top window", () => { - windowRequest.show(); - return [iframeRequest.show()]; + return [windowRequest.show(), iframeRequest.show()]; }, ); await promise_rejects( t, - 'AbortError', + "AbortError", iframeShowPromise, - 'The top window is already showing a payment request.', + "The top window is already showing a payment request.", ); // Cleanup await windowRequest.abort(); + await promise_rejects( + t, + "AbortError", + windowShowPromise, + "The window payment request should be aborted by test.", + ); iframe.remove(); - }, 'An iframe cannot show a payment request if the top-level window is already showing one.'); + }, "An iframe cannot show a payment request if the top-level window is already showing one."); promise_test(async t => { // Create a PaymentReuqest in top-level window. @@ -185,7 +191,7 @@ popupShowPromise, windowShowPromise, ] = await test_driver.bless( - 'testing top-level show() blocked by payment sheet in popup', + "testing top-level show() blocked by payment sheet in popup", async () => { const popupWindow = await loadPopupInsideUserGesture(); const popupRequest = new popupWindow.PaymentRequest(methods, details); @@ -199,16 +205,23 @@ ]; }, ); - await popupRequest.abort(); - popupWindow.close(); await promise_rejects( t, - 'AbortError', + "AbortError", windowShowPromise, "Expected window's showPromise to reject, request is already showing", ); - }, 'Using a popup window prevents the top-browsing context from showing a payment request'); + + await popupRequest.abort(); + await promise_rejects( + t, + "AbortError", + popupShowPromise, + "Expected popupShowPromise to be aborted by test.", + ); + popupWindow.close(); + }, "Using a popup window prevents the top-browsing context from showing a payment request"); promise_test(async t => { const iframe = await attachIframe(); @@ -221,7 +234,7 @@ // Open a popup window const [popupWindow, popupRequest] = await test_driver.bless( - 'open popup to test multiple context and window calls show() first', + "open popup to test multiple context and window calls show() first", async () => { const popupWindow = await loadPopupInsideUserGesture(); const popupRequest = new popupWindow.PaymentRequest(methods, details); @@ -237,7 +250,7 @@ popupShowPromise, iframeShowPromise, ] = await test_driver.bless( - 'test multiple nested browsing context', + "test multiple nested browsing context", () => { return [ windowRequest.show(), @@ -249,19 +262,25 @@ // popupRequest and iframeRequest will both reject await promise_rejects( t, - 'AbortError', + "AbortError", popupShowPromise, - 'Expected popupShowPromise to reject, request is already showing.', + "Expected popupShowPromise to reject, request is already showing.", ); await promise_rejects( t, - 'AbortError', + "AbortError", iframeShowPromise, - 'Expected iframeShowPromise to reject, request is already showing.', + "Expected iframeShowPromise to reject, request is already showing.", ); await windowRequest.abort(); + await promise_rejects( + t, + "AbortError", + windowShowPromise, + "Expect window promise to be aborted by test." + ); popupWindow.close(); iframe.remove(); }, "Given multiple nested browsing contexts, and window calls show() first, other nested browsing contexts can't show a request."); @@ -282,7 +301,7 @@ windowShowPromise, iframeShowPromise ] = await test_driver.bless( - 'test multiple browsing context and iframe calls show() first', + "test multiple browsing context and iframe calls show() first", async () => { const popupWindow = await loadPopupInsideUserGesture(); const popupRequest = new popupWindow.PaymentRequest(methods, details); @@ -299,19 +318,25 @@ // windowShowPromise and iframeRequest will both reject await promise_rejects( t, - 'AbortError', + "AbortError", windowShowPromise, - 'Expected windowShowPromise to reject, the popup is showing a payment request.', + "Expected windowShowPromise to reject, the popup is showing a payment request.", ); await promise_rejects( t, - 'AbortError', + "AbortError", iframeShowPromise, - 'Expected iframeShowPromise to reject, the popup is showing a payment request.', + "Expected iframeShowPromise to reject, the popup is showing a payment request.", ); await popupRequest.abort(); + await promise_rejects( + t, + "AbortError", + popupShowPromise, + "Expected popupShowPromise to be aborted by test.", + ); popupWindow.close(); iframe.remove(); }, "Given multiple nested browsing contexts, and popup calls show() first, other nested browsing contexts can't show a request."); @@ -325,7 +350,7 @@ const iframeRequest = new iframeWindow.PaymentRequest(methods, details); const [popupWindow, popupRequest] = await test_driver.bless( - 'open popup to test multiple context and iframe calls show() first', + "open popup to test multiple context and iframe calls show() first", async () => { const w = await loadPopupInsideUserGesture(); const r = new w.PaymentRequest(methods, details); @@ -341,7 +366,7 @@ popupShowPromise, windowShowPromise, ] = await test_driver.bless( - 'test multiple browsing context and iframe calls show() first', + "test multiple browsing context and iframe calls show() first", async () => { return [ iframeRequest.show(), @@ -354,19 +379,25 @@ // windowShowPromise and iframeRequest will both reject await promise_rejects( t, - 'AbortError', + "AbortError", windowShowPromise, - 'Expected windowShowPromise to reject, the popup is showing a payment request.', + "Expected windowShowPromise to reject, the popup is showing a payment request.", ); await promise_rejects( t, - 'AbortError', + "AbortError", popupShowPromise, - 'Expected popupShowPromise to reject, the popup is showing a payment request.', + "Expected popupShowPromise to reject, the popup is showing a payment request.", ); await iframeRequest.abort(); + await promise_rejects( + t, + "AbortError", + iframeShowPromise, + "Expected iframeShowPromise to be aborted by test." + ); popupWindow.close(); iframe.remove(); }, "Given multiple nested browsing contexts, and an iframe calls show() first, other nested browsing contexts can't show a request."); @@ -376,54 +407,96 @@ const iframeWindow = iframe.contentWindow; const iframeRequest = new iframeWindow.PaymentRequest(methods, details); const iframeShowPromise = test_driver.bless( - 'test navigating iframe after show()', + "test navigating iframe after show()", () => iframeRequest.show(), ); // We navigate away, causing the payment sheet to close // and the request is showing boolean to become false. - iframe.src = 'blank.html?abc=123'; + iframe.src = "blank.html?abc=123"; await new Promise(resolve => (iframe.onload = resolve)); await promise_rejects( t, - 'AbortError', + "AbortError", iframeShowPromise, - 'Navigating iframe away must cause the iframeShowPromise to reject.', + "Navigating iframe away must cause the iframeShowPromise to reject.", ); iframe.remove(); // Now we should be ok to spin up a new payment request const request = new window.PaymentRequest(methods, details); - const showPromise = request.show(); - await request.abort(); + const [showPromise] = await test_driver.bless( + "start a new payment request", + () => { + return [request.show()]; + }); + + // If a payment sheet fails to show, it should reject immediately. If it + // hasn't rejected in 1 second, then the test has passed. + t.step_timeout(async () => { + // We're done. Clean up. + await request.abort(); + t.done(); + }); + + // If the navigation in iframe failed to close the original payment sheet + // there, |showPromise| should reject immediately and this indicates a + // failure of this test. + await showPromise.then(() => { + assert_true(false, + "Second payment sheet should be pending but is resolved."); + }) + .catch(e => { + assert_true(false, + "Second payment sheet should be pending but is rejected." + e.message); + }); }, "Navigating an iframe as a nested browsing context sets 'payment request is showing boolean' to false."); promise_test(async t => { - const [popupWindow, popupRequest, showPromise] = await test_driver.bless( - 'test navigating popup after show()', - async () => { - const popupWindow = await loadPopupInsideUserGesture(); - const popupRequest = new popupWindow.PaymentRequest(methods, details); - return [popupWindow, popupRequest, popupRequest.show()]; - }, - ); + const [popupWindow, popupRequest, popupShowPromise] = + await test_driver.bless( + "trigger payment in a popup window", + async () => { + const popupWindow = await loadPopupInsideUserGesture(); + const popupRequest = new popupWindow.PaymentRequest(methods, details); + return [popupWindow, popupRequest, popupRequest.show()]; + }); // We navigate away, causing the payment sheet to close // and the request is showing boolean to become false. - popupWindow.location = 'blank.html?abc=123'; + popupWindow.location = "blank.html?abc=123"; await new Promise(resolve => (popupWindow.onload = resolve)); - await promise_rejects( - t, - 'AbortError', - showPromise, - 'Navigating away must cause the showPromise to reject with an AbortError', - ); - popupWindow.close(); - // Now we should be ok to spin up a new payment request. + // Don't wait for |popupShowPromise| to reject because it may never do + // (see https://github.com/w3c/payment-request/issues/872). Instead, try + // to spin up a new payment request and make sure it succeeds. const request = new window.PaymentRequest(methods, details); - request.show(); - await request.abort(); + const [showPromise] = await test_driver.bless( + "trigger payment in main window", + () => { + return [request.show()]; + }); + + // If a payment sheet fails to show, it should reject immediately. If it + // hasn't rejected in 1 second, then the test has passed. + t.step_timeout(async () => { + // We're done. Clean up. + popupWindow.close(); + await request.abort(); + t.done(); + }, 1000); + + // If the navigation in popup window failed to close the original payment + // sheet there, |showPromise| should reject immediately and this indicates + // a failure of this test. + await showPromise.then(() => { + assert_true(false, + "Second payment sheet should be pending but is resolved."); + }) + .catch(e => { + assert_true(false, + "Second payment sheet should be pending but is rejected."); + }); }, "Navigating a popup as a nested browsing context sets 'payment request is showing boolean' to false."); </script> </body> diff --git a/tests/wpt/web-platform-tests/tools/certs/README.md b/tests/wpt/web-platform-tests/tools/certs/README.md index 63119ba7f6c..62c9d24685a 100644 --- a/tests/wpt/web-platform-tests/tools/certs/README.md +++ b/tests/wpt/web-platform-tests/tools/certs/README.md @@ -1,11 +1,76 @@ -To enable https://web-platform.test:8443/, add cacert.pem to your browser as Certificate Authority. +# WPT Test Certificates + +The web-platform-tests project maintains a set of SSL certificates to allow +contributors to execute tests requiring HTTPS locally. + +## Trusting Root CA + +To prevent browser SSL warnings when running HTTPS tests locally, the +web-platform-tests Root CA file `cacert.pem` in the `tools/certs/` directory +must be added as a trusted certificate in your OS/browser. For Firefox, go to about:preferences and search for "certificates". -For browsers that use the Certificate Authorities of the underlying OS, such as Chrome and Safari, -you need to adjust the OS. For macOS, go to Keychain Access and add the certificate under -**login**. +For browsers that use the Certificate Authorities of the underlying OS, such as +Chrome and Safari, you need to adjust the OS. For macOS, go to Keychain Access +and add the certificate under **login**. + +**NOTE**: The CA should not be installed in any browser profile used +outside of tests, since it may be used to generate fake +certificates. For browsers that use the OS certificate store, tests +should therefore not be run manually outside a dedicated OS instance +(e.g. a VM). To avoid this problem when running tests in Chrome or +Firefox, use `wpt run`, which disables certificate checks and therefore +doesn't require the root CA to be trusted. + +## Regenerating certificates + +If you wish to generate new certificates for any reason, it's possible to use +OpenSSL when starting the server, or starting a test run, by providing the +`--ssl-type=openssl` argument to the `wpt serve` or `wpt run` commands. + +If you installed OpenSSL in such a way that running `openssl` at a +command line doesn't work, you also need to adjust the path to the +OpenSSL binary. This can be done by adding a section to `config.json` +like: + +``` +"ssl": {"openssl": {"binary": "/path/to/openssl"}} +``` + +On Windows using OpenSSL typically requires installing an OpenSSL distribution. +[Shining Light](https://slproweb.com/products/Win32OpenSSL.html) +provide a convenient installer that is known to work, but requires a +little extra setup, i.e.: + +Run the installer for Win32_OpenSSL_v1.1.0b (30MB). During installation, +change the default location for where to Copy OpenSSL Dlls from the +System directory to the /bin directory. + +After installation, ensure that the path to OpenSSL (typically, +this will be `C:\OpenSSL-Win32\bin`) is in your `%Path%` +[Environment Variable](http://www.computerhope.com/issues/ch000549.htm). +If you forget to do this part, you will most likely see a 'File Not Found' +error when you start wptserve. -### Updating these certs +Finally, set the path value in the server configuration file to the +default OpenSSL configuration file location. To do this, create a file +called `config.json`. Then add the OpenSSL configuration below, +ensuring that the key `ssl/openssl/base_conf_path` has a value that is +the path to the OpenSSL config file (typically this will be +`C:\\OpenSSL-Win32\\bin\\openssl.cfg`): -From the root, run `./wpt serve --config tools/certs/config.json` and terminate it after it has started up. +``` +{ + "ssl": { + "type": "openssl", + "encrypt_after_connect": false, + "openssl": { + "openssl_binary": "openssl", + "base_path: "_certs", + "force_regenerate": false, + "base_conf_path": "C:\\OpenSSL-Win32\\bin\\openssl.cfg" + }, + }, +} +``` diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html b/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html new file mode 100644 index 00000000000..5bfcb133b4c --- /dev/null +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-redirect-upgrade.https.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<!-- Generated by wpt/upgrade-insecure-requests/support/generate.py --> +<title>Upgrade Insecure Requests: shared-worker.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="./support/testharness-helper.sub.js"></script> +<script src="/common/security-features/resources/common.js"></script> + +<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> +</head> +<body> +<script> +const tests = generateRedirectTests(ResourceType.SHARED_WORKER, true); +tests.forEach(test => testMap['shared-worker'](test)); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-upgrade.https.html b/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-upgrade.https.html new file mode 100644 index 00000000000..7be1042ff74 --- /dev/null +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/shared-worker-upgrade.https.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<!-- Generated by wpt/upgrade-insecure-requests/support/generate.py --> +<title>Upgrade Insecure Requests: shared-worker.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="./support/testharness-helper.sub.js"></script> +<script src="/common/security-features/resources/common.js"></script> + +<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> +</head> +<body> +<script> +const tests = generateTests(ResourceType.SHARED_WORKER, true); +tests.forEach(test => testMap['shared-worker'](test)); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/generate.py b/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/generate.py index 1b0c2897fee..ee272036997 100644 --- a/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/generate.py +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/generate.py @@ -40,11 +40,19 @@ for name, resourceType in [ ('worker', 'WORKER'), ('module-worker', 'WORKER'), ('worker-subresource-xhr', 'FETCH'), - ('worker-subresource-fetch', 'FETCH')]: - sameOriginOnly = 'true' if resourceType == 'WORKER' else 'false' + ('worker-subresource-fetch', 'FETCH'), + ('shared-worker', 'SHARED_WORKER')]: + # TODO(https://crbug.com/989399): Add tests for subresource requests on shared + # workers, and main/subresource requests on service workers. + + sameOriginOnly = 'false' + if resourceType == 'WORKER' or resourceType == 'SHARED_WORKER': + sameOriginOnly = 'true' + types = [('', 'generateTests'), ('-redirect', 'generateRedirectTests')] if name == 'module-worker' or resourceType == 'WORKLET': types.append(('-import', 'generateModuleImportTests')) + for typeName, generatorName in types: filename = '%s%s-upgrade.https.html' % (name, typeName) with open(filename, 'w') as html_file: diff --git a/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/testharness-helper.sub.js b/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/testharness-helper.sub.js index f578e8987a1..da20d2644b3 100644 --- a/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/testharness-helper.sub.js +++ b/tests/wpt/web-platform-tests/upgrade-insecure-requests/support/testharness-helper.sub.js @@ -12,6 +12,7 @@ const ResourceType = { IMAGE: "image", FRAME: "frame", WORKER: "worker", + SHARED_WORKER: "shared-worker", WORKLET: "worklet", WEBSOCKET: "websocket", FETCH: "fetch", @@ -36,6 +37,8 @@ function generateURL(host, protocol, resourceType) { url.pathname = "echo"; } else if (resourceType == ResourceType.WORKER) { url.pathname += "worker.py"; + } else if (resourceType == ResourceType.SHARED_WORKER) { + url.pathname += "shared-worker.py"; } else if (resourceType == ResourceType.WORKLET) { url.pathname += "worker.py"; } else if (resourceType == ResourceType.FETCH) { @@ -184,6 +187,10 @@ const testMap = { {}), test.name), + "shared-worker": + test => promise_test( + () => requestViaSharedWorker(test.url), test.name), + "audio-worklet": test => promise_test( () => requestViaWorklet('audio', test.url), test.name), diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py index 8376fdfe061..14848da7e29 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py @@ -63,6 +63,7 @@ def test_html_all_collection(session): """) html = session.find.css("html", all=False) head = session.find.css("head", all=False) + meta = session.find.css("meta", all=False) body = session.find.css("body", all=False) ps = session.find.css("p") @@ -72,14 +73,15 @@ def test_html_all_collection(session): """) value = assert_success(response) assert isinstance(value, list) - # <html>, <head>, <body>, <p>, <p> - assert len(value) == 5 + # <html>, <head>, <meta>, <body>, <p>, <p> + assert len(value) == 6 assert_same_element(session, html, value[0]) assert_same_element(session, head, value[1]) - assert_same_element(session, body, value[2]) - assert_same_element(session, ps[0], value[3]) - assert_same_element(session, ps[1], value[4]) + assert_same_element(session, meta, value[2]) + assert_same_element(session, body, value[3]) + assert_same_element(session, ps[0], value[4]) + assert_same_element(session, ps[1], value[5]) def test_html_collection(session): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py index edee1e5532b..f939713c806 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py @@ -56,20 +56,22 @@ def test_html_all_collection(session): """) html = session.find.css("html", all=False) head = session.find.css("head", all=False) + meta = session.find.css("meta", all=False) body = session.find.css("body", all=False) ps = session.find.css("p") response = execute_script(session, "return document.all") value = assert_success(response) assert isinstance(value, list) - # <html>, <head>, <body>, <p>, <p> - assert len(value) == 5 + # <html>, <head>, <meta>, <body>, <p>, <p> + assert len(value) == 6 assert_same_element(session, html, value[0]) assert_same_element(session, head, value[1]) - assert_same_element(session, body, value[2]) - assert_same_element(session, ps[0], value[3]) - assert_same_element(session, ps[1], value[4]) + assert_same_element(session, meta, value[2]) + assert_same_element(session, body, value[3]) + assert_same_element(session, ps[0], value[4]) + assert_same_element(session, ps[1], value[5]) def test_html_collection(session): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py index 639699809c1..b65b9cb8b11 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/inline.py @@ -1,18 +1,11 @@ -import urllib +"""Helpers for inlining extracts of documents in tests.""" +import urllib -def inline(doc, - doctype="html", - mime="text/html;charset=utf-8", - **kwargs): - from .fixtures import server_config, url - build_url = url(server_config()) - if doctype == "html": - mime = "text/html;charset=utf-8" - elif doctype == "xhtml": - mime = "application/xhtml+xml" - doc = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +BOILERPLATES = { + "html": "<!doctype html>\n<meta charset={charset}>\n{src}", + "xhtml": """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> @@ -20,35 +13,77 @@ def inline(doc, </head> <body> - {} + {src} </body> -</html>""".format(doc) - elif doctype == "xml": - mime = "text/xml" - doc = """<?xml version="1.0" encoding="UTF-8"?>{}""".format(doc) +</html>""", + "xml": """<?xml version="1.0" encoding="{charset}"?>\n{src}""", +} +MIME_TYPES = { + "html": "text/html", + "xhtml": "application/xhtml+xml", + "xml": "text/xml", +} - query = {"doc": doc} - if mime != "text/html;charset=utf8": - query["content-type"] = mime +def inline(src, doctype="html", mime=None, charset=None, **kwargs): + """ + Takes a source extract and produces well-formed documents. - return build_url("/webdriver/tests/support/inline.py", - query=urllib.urlencode(query), - **kwargs) + Based on the desired document type, the extract is embedded with + predefined boilerplate in order to produce well-formed documents. + The media type and character set may also be individually configured. + This helper function originally used data URLs, but since these + are not universally supported (or indeed standardised!) across + browsers, it now delegates the serving of the document to wptserve. + This file also acts as a wptserve handler (see the main function + below) which configures the HTTP response using query parameters. + + This function returns a URL to the wptserve handler, which in turn + will serve an HTTP response with the requested source extract + inlined in a well-formed document, and the Content-Type header + optionally configured using the desired media type and character set. + + Any additional keyword arguments are passed on to the build_url + function. + """ + from .fixtures import server_config, url + build_url = url(server_config()) -def iframe(doc, **kwargs): - return "<iframe src='%s'></iframe>" % inline(doc, **kwargs) + if mime is None: + mime = MIME_TYPES[doctype] + if charset is None: + charset = "UTF-8" + doc = BOILERPLATES[doctype].format(charset=charset, src=src) + + query = {"doc": doc, "mime": mime, "charset": charset} + return build_url( + "/webdriver/tests/support/inline.py", + query=urllib.urlencode(query), + **kwargs) + + +def iframe(src, **kwargs): + """Inlines document extract as the source document of an <iframe>.""" + return "<iframe src='{}'></iframe>".format(inline(src, **kwargs)) def main(request, response): doc = request.GET.first("doc", None) - content_type = request.GET.first("content-type", "text/html;charset=utf8") + mime = request.GET.first("mime", None) + charset = request.GET.first("charset", None) + if doc is None: - rv = 404, [("Content-Type", "text/plain")], "Missing doc parameter in query" - else: - response.headers.update([ - ("Content-Type", content_type), - ("X-XSS-Protection", "0") - ]) - rv = doc - return rv + return 404, [("Content-Type", + "text/plain")], "Missing doc parameter in query" + + content_type = [] + if mime is not None: + content_type.append(mime) + if charset is not None: + content_type.append("charset={}".format(charset)) + + headers = {"X-XSS-Protection": "0"} + if len(content_type) > 0: + headers["Content-Type"] = ";".join(content_type) + + return 200, headers.items(), doc |