diff options
403 files changed, 9668 insertions, 1713 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/syntax/malformed-decl-block-001.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/syntax/malformed-decl-block-001.xht.ini new file mode 100644 index 00000000000..ef727f8fcae --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/syntax/malformed-decl-block-001.xht.ini @@ -0,0 +1,2 @@ +[malformed-decl-block-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini new file mode 100644 index 00000000000..eb3cf41a070 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini @@ -0,0 +1,2 @@ +[opacity-animation-ending-correctly-002.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/gap-019.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/gap-019.html.ini new file mode 100644 index 00000000000..b52b65966de --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/gap-019.html.ini @@ -0,0 +1,2 @@ +[gap-019.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-005.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-005.html.ini index 094f63989ea..9ed6fbaeacc 100644 --- a/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-005.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-005.html.ini @@ -19,3 +19,9 @@ [.floating-flexbox 7] expected: FAIL + + [.floating-flexbox 8] + expected: FAIL + + [.floating-flexbox 9] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-compat-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-compat-001.html.ini new file mode 100644 index 00000000000..d15040b1100 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-compat-001.html.ini @@ -0,0 +1,3 @@ +[row-compat-001.html] + [.flex 1] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini new file mode 100644 index 00000000000..e3dcf0ce0bc --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini @@ -0,0 +1,6 @@ +[row-use-cases-001.html] + [left < right] + expected: FAIL + + [no overflow] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini new file mode 100644 index 00000000000..f8a8e27c760 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini @@ -0,0 +1,2 @@ +[row-wrap-002.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini index 208aeeba2c0..145587fab93 100644 --- a/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini @@ -7,3 +7,12 @@ [e.style['flex-flow'\] = "nowrap" should set the property value] expected: FAIL + + [e.style['flex-flow'\] = "row nowrap" should set the property value] + expected: FAIL + + [e.style['flex-flow'\] = "wrap" should set the property value] + expected: FAIL + + [e.style['flex-flow'\] = "row wrap" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-combine-emphasis.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-combine-emphasis.html.ini new file mode 100644 index 00000000000..38f4d7e7574 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-combine-emphasis.html.ini @@ -0,0 +1,2 @@ +[text-combine-emphasis.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryListEvent.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryListEvent.html.ini new file mode 100644 index 00000000000..a49e2ee83fd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryListEvent.html.ini @@ -0,0 +1,3 @@ +[MediaQueryListEvent.html] + [constructor of "change" event] + expected: FAIL diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 8e22e1ee7e1..b9f1e10f2eb 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -126,6 +126,13 @@ {} ] ], + "hidden-textfield-with-combobox.html": [ + "e988c6edb9f0a1fbcb10036aeae8c08e63f88a37", + [ + null, + {} + ] + ], "iframe-owns-child.html": [ "a318e6aba980be76c11b98cca6a6e8b8b463dd44", [ @@ -189,6 +196,13 @@ {} ] ], + "map-update-crash.html": [ + "db7c664251a67e43d0a4dd31eaa8a2b1efd3b938", + [ + null, + {} + ] + ], "move-owned-inside-another-owned.html": [ "babe8dcd1dc77cd8da462d029db7f2d270d4b00a", [ @@ -1357,6 +1371,13 @@ {} ] ], + "size-change-during-transition-crash.html": [ + "80be45b8fd2c79ad5da2c611c50f3e9e0e35372f", + [ + null, + {} + ] + ], "svg-layout-root-crash.html": [ "75a3839add0f0dcc33378ab194f37acdfcc39095", [ @@ -1934,6 +1955,15 @@ ] ] }, + "parsing": { + "grid-template-columns-crash.html": [ + "61bdfd8177a7343ce19cc24f97749cdc3ce3274b", + [ + null, + {} + ] + ] + }, "subgrid": { "contain-strict-nested-subgrid-crash.html": [ "a98e43777eee9347ba1d69a4b133140cea0577fc", @@ -5362,6 +5392,13 @@ {} ] ], + "input-type-number-rtl-invalid-crash.html": [ + "d749d1faad46df9a822a656c493d32bcfec75111", + [ + null, + {} + ] + ], "invalid-datalist-options-crash.html": [ "7cdd55196cecaae8cc64fe7fc86b4f7305e7525d", [ @@ -20856,7 +20893,7 @@ "forms": { "attributes-common-to-form-controls": { "dirname-rtl-manual.html": [ - "cb00f6972df442f486de8a93a0c6078317a4d081", + "c5f683101dcefc0b8f1044a60abdcbba6497b059", [ null, {} @@ -22124,13 +22161,6 @@ {} ] ], - "pointerevent_predicted_events_attributes-manual.html": [ - "1276d3657f8fdbda3ec880ebba07128f65a7876f", - [ - null, - {} - ] - ], "pointerevent_touch-action-rotated-divs_touch-manual.html": [ "1c09b15f1f99eead72a0689ab14a4facb1c61e3f", [ @@ -107437,45 +107467,6 @@ {} ] ], - "core-syntax-002.xht": [ - "606b7aa9f432e4791eb94c40cbabc24aadf78b62", - [ - null, - [ - [ - "/css/CSS2/syntax/core-syntax-002-ref.xht", - "==" - ] - ], - {} - ] - ], - "core-syntax-003.xht": [ - "11c5675d773274124b295123eb495e30bbecff10", - [ - null, - [ - [ - "/css/CSS2/reference/ref-this-text-should-be-green.xht", - "==" - ] - ], - {} - ] - ], - "core-syntax-004.xht": [ - "830017c7c58d18f89992daf4eb2ba05a2b323745", - [ - null, - [ - [ - "/css/CSS2/reference/ref-this-text-should-be-green.xht", - "==" - ] - ], - {} - ] - ], "core-syntax-006.xht": [ "eb5d380af0c7d515771c63e8b39d35f1811ff3d6", [ @@ -108803,7 +108794,7 @@ ] ], "malformed-decl-block-001.xht": [ - "2f375caafa155647be96799d833d65ce71604284", + "8e389615ceca0414d110b9eed2d051ff18d85243", [ null, [ @@ -176156,6 +176147,19 @@ {} ] ], + "gap-019.html": [ + "d55f86e5d2436eaa057ce237e58b9014f8686568", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "grandchild-span-height.html": [ "c087edb68d48036f5b3a45114a62d9db03a5a86e", [ @@ -176559,6 +176563,19 @@ ], {} ] + ], + "row-wrap-002.tentative.html": [ + "7ed61fa8bffa9541de2c9d1c9bcbe902bf5eb010", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] ] }, "item-with-max-height-and-scrollbar.html": [ @@ -181546,6 +181563,19 @@ {} ] ], + "separators.html": [ + "b2ec6a2a53403c987a2ca8841e5dea4f0dd80038", + [ + null, + [ + [ + "/css/css-fonts/separators-ref.html", + "==" + ] + ], + {} + ] + ], "size-adjust-01.html": [ "024a22097e182d6ffdbfd16dd9832e2fe35bb0b9", [ @@ -190216,6 +190246,19 @@ {} ] ], + "auto-track-sizing-003.html": [ + "fdb571c157d0cb8f112c26d9f22de1f95eca14cc", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "baseline-001.html": [ "995b1a8d2ae1aaa7c0230379e5b799b12ac9e93c", [ @@ -211882,6 +211925,19 @@ {} ] ], + "nesting-type-selector.html": [ + "1805896b8df462a31828076d7945e306435444a9", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "supports-is-consistent.html": [ "8be0d666d6e3ca4b4306172b7c33897f9d40a9bc", [ @@ -222850,6 +222906,45 @@ {} ] ], + "scrollbar-width-paint-004.html": [ + "5b9c9c36bc7fe5246fe1746a148f3defb627ce15", + [ + null, + [ + [ + "/css/css-scrollbars/scrollbar-width-paint-004-ref.html", + "==" + ] + ], + {} + ] + ], + "scrollbar-width-paint-005.html": [ + "9ce46d296a6a8300d4c753d52d2d3d2a836e1c8e", + [ + null, + [ + [ + "/css/css-scrollbars/scrollbar-width-paint-005-ref.html", + "==" + ] + ], + {} + ] + ], + "scrollbar-width-paint-006.html": [ + "42dbbd959d41bb3c2e22fc3742927cac25e4fe1b", + [ + null, + [ + [ + "/css/css-scrollbars/scrollbar-width-paint-006-ref.html", + "==" + ] + ], + {} + ] + ], "scrollbars-chrome-bug-001.html": [ "643781bac8079267c21c4c51920c56ab5f6a315a", [ @@ -245075,6 +245170,32 @@ {} ] ], + "object-replacement-1.html": [ + "0192dfef6928b5316d39d65841d0432b01636684", + [ + null, + [ + [ + "/css/css-text/white-space/reference/object-replacement-1-notref.html", + "!=" + ] + ], + {} + ] + ], + "object-replacement-2.html": [ + "14c5e3ba3560d5b5867b01c6c423d7e954ba3f70", + [ + null, + [ + [ + "/css/css-text/white-space/reference/object-replacement-2-notref.html", + "!=" + ] + ], + {} + ] + ], "pre-float-001.html": [ "8dd08d80992e6d6310a6697f84c2533d399c8e5e", [ @@ -250024,6 +250145,19 @@ {} ] ], + "text-combine-emphasis.html": [ + "752e335a1f8c53155e1a805aea678523bd8c532c", + [ + null, + [ + [ + "/css/css-text-decor/reference/text-combine-emphasis-notref.html", + "!=" + ] + ], + {} + ] + ], "text-decoration-color-recalc-002.html": [ "ce5c36dd5b6508c6d34ac0de5a5e65aa1c54fcf5", [ @@ -302564,7 +302698,7 @@ ] ], "offset-path-coord-box-001.html": [ - "d8392607569d045e04aa5474df11310c93b662f8", + "d4e903e69dfc5535a109b84868e77af03a9c27ee", [ null, [ @@ -302573,7 +302707,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 20 + ], + [ + 0, + 200 + ] + ] + ] + ] + } ] ], "offset-path-coord-box-002.html": [ @@ -303205,19 +303355,6 @@ } ] ], - "offset-path-shape.html": [ - "2750fd9f2fc2b63d50df63cbbf071577c8f24438", - [ - null, - [ - [ - "/css/motion/offset-path-shape-ref.html", - "==" - ] - ], - {} - ] - ], "offset-path-string-001.html": [ "79d957d82b8e3c603ed16598f461a805c90681dd", [ @@ -332046,6 +332183,14 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], + "helpers.js": [ + "488e3b33e3e708d45f9a8e085d9e0f846d163cb7", + [] + ], + "reporting_origin.py": [ + "4a5877035e0491bd21f2e027a82080b36deae0fa", + [] + ], "reports.py": [ "2511dd67cd7a2882392fbf695f8e5db91c4702c0", [] @@ -333168,7 +333313,7 @@ [] ], "media.js": [ - "f2dc86126604954f4602ffcb9efbb17ab2587e4a", + "800593f5343ad6d73a3af411ef07065a94009efe", [] ], "media.js.headers": [ @@ -354202,7 +354347,7 @@ ], "fedcm": { "accounts.py": [ - "3dbc7403dc28106b0958bd7b7819037374830a06", + "11c1c32b61af839917e54cc86c8af294dd86c3cf", [] ], "client_metadata.py": [ @@ -354270,7 +354415,7 @@ [] ], "two_accounts.py": [ - "48451740663adab6c35eead23e49cd0174d4cbc8", + "97ee92f676042ad393c872f29e4a4f7c3c283039", [] ], "userinfo-iframe.html": [ @@ -354279,7 +354424,7 @@ ] }, "fedcm-helper.sub.js": [ - "a4d48633f83b3a24793142b929dee52d42f33349", + "270ac1d743ab4c8b679256feba4b9c2f07bdf891", [] ], "fedcm-iframe-level2.html": [ @@ -354287,7 +354432,7 @@ [] ], "fedcm-iframe.html": [ - "c57f54e1dade5d33bfea9f7f8610bc46f43f1e8b", + "f830b4f9124ce9f0f37e98423bd1fbe85ae0a99e", [] ], "fedcm-mock.js": [ @@ -367243,10 +367388,6 @@ "bb4955bfb5e1905f4ee013c69b845ead70386b5f", [] ], - "core-syntax-002-ref.xht": [ - "9328c8bee3e3d519729f0bb58eedfffd13b6b3e2", - [] - ], "core-syntax-006-ref.xht": [ "aadeac2300d3f549d5c7e255ad99d09c189111fc", [] @@ -371288,7 +371429,7 @@ [] ], "datatypes-alt-255uint16-001.woff2": [ - "ab0d8873e9dd91ca88ed0603fb004a12cf9d4cb4", + "4943071f1548cb042345c717b23cf2b205dad05d", [] ], "datatypes-invalid-base128-001.woff2": [ @@ -372392,11 +372533,11 @@ [] ], "tabledata-transform-hmtx-001.woff2": [ - "72fae4dcb5e044d1e16abe4a442d7c5293c4b241", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ], "tabledata-transform-hmtx-002.woff2": [ - "72fae4dcb5e044d1e16abe4a442d7c5293c4b241", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ], "tabledata-transform-hmtx-003.woff2": [ @@ -372428,19 +372569,19 @@ [] ], "valid-005.woff2": [ - "72fae4dcb5e044d1e16abe4a442d7c5293c4b241", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ], "valid-006.woff2": [ - "15d1ce2a877a98ceea226582026a1f8f42ea3497", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ], "valid-007.woff2": [ - "61f2b8f47b1a7a1ab09b89e97afbbfa8f0e549fb", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ], "valid-008.woff2": [ - "dda80b1592d191de6a7fe06fd7c2dd9c4e19e843", + "da5a794ef359ffd2a5686f987905d8799c813c90", [] ] }, @@ -381902,12 +382043,20 @@ "markB.ttf": [ "c683ddf945d8d9161442a7444f40178d6502f94a", [] + ], + "separator-test-font.ttf": [ + "26cc99783d079f91ae9c1627a6af0c56d72d324a", + [] ] }, "rlh-in-monospace-ref.html": [ "e60a59d71916ebef84299552e6524cd823f12e29", [] ], + "separators-ref.html": [ + "d1d56f576f7dbb2ed120454c22396b48fca3bf3a", + [] + ], "size-adjust-01-ref.html": [ "765201d3552d70163bac26bf698218e1b1312f16", [] @@ -396109,6 +396258,24 @@ ] } }, + "css-scroll-snap-2": { + "scroll-start-with-anchor-navigation-inner-frame.html": [ + "c32bac913d2672eaa9976a8e7407566ad9b3224d", + [] + ], + "scroll-start-with-fragment-navigation-inner-frame.html": [ + "736a26a5f0cfc0f34a917b6ec4a99a0c1e2fc996", + [] + ], + "scroll-start-with-text-fragment-navigation-target.html": [ + "4707a730627bc3fc442e4db6e2b54164e44206fc", + [] + ], + "stash.py": [ + "e804b9a2b358729f9ed6166a267777d484535f1e", + [] + ] + }, "css-scrollbars": { "META.yml": [ "f7c0439e202113c9611405ae967b33c2b12cfcee", @@ -396130,6 +396297,18 @@ "b7acab4a8f12ed88806db7ff67995508c4566780", [] ], + "scrollbar-width-paint-004-ref.html": [ + "b2b2d7f2841c6fdf0593c57cb556f6bd58666667", + [] + ], + "scrollbar-width-paint-005-ref.html": [ + "e5c325b85423dda8d07b4a07ae0cd6f8199c9023", + [] + ], + "scrollbar-width-paint-006-ref.html": [ + "731430735347ef8ba4c69fc9ba7862bea02e2f54", + [] + ], "scrollbars-chrome-bug-001-ref.html": [ "1bf59f90e740ae119b87d96855ea0277a6f8afc9", [] @@ -400914,6 +401093,14 @@ "ea1faa2ed1f7af05f932167762f85fc2e5150884", [] ], + "object-replacement-1-notref.html": [ + "c4280f5fdd23abd695d8c82addeb816c7aa0362d", + [] + ], + "object-replacement-2-notref.html": [ + "644dfc4b025e62babeddd3575af5ffee40c77e26", + [] + ], "pre-float-001-ref.html": [ "9753cb37b641f3f25d1045f3149875deffb1613c", [] @@ -401759,6 +401946,10 @@ "c1b08d05c3e29b02fc69625fd6884e2edf8fb61b", [] ], + "text-combine-emphasis-notref.html": [ + "c901600c58bbfa5455ac17d187253708447d523e", + [] + ], "text-decoration-color-recalc-ref.html": [ "7bc557337f371a27c91007699ec1a3cf99c72c81", [] @@ -414916,7 +415107,7 @@ }, "fenced-frame": { "README.md": [ - "6055d17e978fec1d740b2cea1b6ef7723fe245f5", + "e3c486b572e9e2fed96eef4118e19b07232d1ea7", [] ], "client-hints.https.html.headers": [ @@ -415923,6 +416114,10 @@ "de99616ecebe6107c33156c1c5513ef007b4e63d", [] ], + "dummy_video.webm": [ + "c3d433a3e02e86eee1026b6620dc0c50498e61a4", + [] + ], "empty.https.html": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] @@ -416044,11 +416239,11 @@ [] ], "keepalive-helper.js": [ - "c7048d1ff33be6952f666e5e0d6b8b6c9ac4047f", + "ad1d4b2c7c368d076d90fac01cf92f51a377ab79", [] ], "keepalive-iframe.html": [ - "ac00f3a331a1453265ef1825d9cc84a38565d2c6", + "335a1f8e318402781894271147deeaced20d6fa9", [] ], "keepalive-redirect-iframe.html": [ @@ -416088,7 +416283,7 @@ [] ], "stash-put.py": [ - "dbc7ceebb882ebb77a0202b3c9a828e2c70dc3bc", + "0530e1ba5b4206ee3ea138c305fd9fab423cf0e4", [] ], "stash-take.py": [ @@ -416549,6 +416744,26 @@ "d71212951cb63ebd310820d1df7c8789b5fbd316", [] ], + "fenced-frame-fetcher.https.html": [ + "b14601dba51d96e29340a43bde00f7b8af25fd9d", + [] + ], + "fenced-frame-fetcher.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "fenced-frame-local-network-access-target.https.html": [ + "2b55e056f39834bbad4af96d2dc2549fbc400bf7", + [] + ], + "fenced-frame-local-network-access.https.html": [ + "860371f22396477f1af1a8d89aecf04893977222", + [] + ], + "fenced-frame-local-network-access.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], "fetcher.html": [ "000a5cc25bb72b334d41ff05e7b8f22691f48f30", [] @@ -416566,7 +416781,7 @@ [] ], "preflight.py": [ - "4b0bfefd4d6356fad7bf0460a67da4b13fb4930e", + "be3abdbb2a1850c6c68ed0064ee45645fa85496b", [] ], "service-worker-bridge.html": [ @@ -416594,7 +416809,7 @@ [] ], "support.sub.js": [ - "a09c46031f5d4354592b479d10d6d0499ae6418a", + "ca8d2e61ee6406896b8a197296953dba514a7356", [] ], "worker-blob-fetcher.html": [ @@ -418586,7 +418801,7 @@ [] ], "generic-sensor-iframe-tests.sub.js": [ - "1d1a012380f6384fecfd5377b838bb71744a52ae", + "7b816c01c745ab7fb41f4f0d8024d34b377430d6", [] ], "generic-sensor-tests.js": [ @@ -418765,7 +418980,7 @@ "browsing-the-web": { "back-forward-cache": { "README.md": [ - "5f10361d5cffd939d1cc12c73cf49218098d7351", + "afda8f6c8abce451dcf76b6de08476e17f6acb1e", [] ], "resources": { @@ -422620,15 +422835,15 @@ }, "offscreen": { "fill-and-stroke-styles.yaml": [ - "a0eca74922e70b33b709f354a2a037a544bbaddb", + "5f794d61e6f31080804238818c58d14925de9ebc", [] ], "meta.yaml": [ - "43a67d54ab49dd5f5a2822f9fd6e8cc12e261c88", + "bd761937f40e8796f6192e09741c1c2bccf3df2d", [] ], "shadows.yaml": [ - "06e2681c72c3d3832ce07fa85ff0362cd0bd5d03", + "ec1bdd101e7067d3a3fdf101b84f55a2c4d47813", [] ], "text.yaml": [ @@ -434325,6 +434540,10 @@ "40c6ad3da693628efd600f4c8a884a24ec734239", [] ], + "pattern.webm": [ + "7cd3d31155723f61fc8678922c1626e1c7e99500", + [] + ], "red-16x16.png": [ "9038fef784dacafdcfdce03fb12b90647bb52d2e", [] @@ -436645,7 +436864,7 @@ ] }, "lint.ignore": [ - "4e52e323fd9e43652b3a1547857801de3fe6b5f6", + "95354d71e0574a2bc3779f4c2aed0c3c4a381dfa", [] ], "loading": { @@ -438041,6 +438260,10 @@ "29903c0a817352ea3d3ad6abf188e5aec7470173", [] ], + "2x2-green.webm": [ + "0fbb250d398fdfa0e44c023b9c18022fb445707d", + [] + ], "400x300-red-resize-200x150-green.mp4": [ "1058c1bf26a0ae080e199886908ea2572c865f00", [] @@ -438057,6 +438280,10 @@ "de99616ecebe6107c33156c1c5513ef007b4e63d", [] ], + "A4.webm": [ + "b4adbec02b54423c0ea758ee77e9b8cfc1ce8386", + [] + ], "META.yml": [ "69172f5b39f6fa64465785450128220c1be7b2fa", [] @@ -438069,6 +438296,10 @@ "ce03c19e50e5ab7cfa18648ecce49f9084b13053", [] ], + "counting.webm": [ + "56d1f1c8acb2c59db5314893e5da57969a87d721", + [] + ], "foo-no-cors.vtt": [ "b533895c604ed7b039b9cabf16616742fb9ba313", [] @@ -438089,6 +438320,10 @@ "50d59dfb38b065d9250b7c0e43e0cba7eac82904", [] ], + "green-at-15.webm": [ + "023a96bf645b4831ff082de14fd44456d0ae3ab8", + [] + ], "movie_300.mp4": [ "cf59777fb98fab2e46c385fa537b2afddfe138a6", [] @@ -438097,6 +438332,10 @@ "0f83996e5dcf31a32a801b6800315bd91642d29c", [] ], + "movie_300.webm": [ + "bb7edf20d483b198ff193d19f86764f96f1b9da7", + [] + ], "movie_5.mp4": [ "fb5dbca23808bee44003692cb0e139dd6a22e874", [] @@ -438105,6 +438344,10 @@ "e8990d1120abde99d59c24db2af46d5673b1a855", [] ], + "movie_5.webm": [ + "9ae12e84ea5874b4bdc858373a9857a242c8fc82", + [] + ], "poster.png": [ "bf6e253b3df4dcc8981562b126bdfd58459a128d", [] @@ -438157,10 +438400,18 @@ "0c55f6c7226a2cd7b722100b2f0acf74922e88be", [] ], + "test.webm": [ + "5794667d09910c284c192a7506bf007a5d69391f", + [] + ], "video.ogv": [ "5cb5f8784811ff0e20dce16e0726c5dda4aab0f6", [] ], + "video.webm": [ + "0783123f4ef633220d520137333b77200920f946", + [] + ], "white.mp4": [ "ef609e42813b93f644b26d5cede5ee2beb777a0c", [] @@ -443170,7 +443421,7 @@ [] ], "idlharness.js": [ - "46aa11e5ca123c2af1327fce7f9df4a1b7974fdc", + "8f741b09b26bcb5ea63465419fd610fbca9e69b2", [] ], "idlharness.js.headers": [ @@ -445128,6 +445379,10 @@ ] } }, + "postMessage-client-worker.js": [ + "64d944d2b5466a466214ba5be94bab42c07a364e", + [] + ], "resources": { "404.py": [ "1ee4af169e75bd185d91df78ccb51571bc124747", @@ -445313,6 +445568,18 @@ "13e111a2f91464bf17fa8c60fb6f6071443a474f", [] ], + "controlled-frame-postMessage.html": [ + "c4428e88a3da4de69865428393ada5785f336c2e", + [] + ], + "controlled-worker-late-postMessage.js": [ + "41d2db43b1fe158c8455ab3b0db2794d4760375b", + [] + ], + "controlled-worker-postMessage.js": [ + "628dc65db11c6c2b04e4dca97d6d9eda3614a24a", + [] + ], "cors-approved.txt": [ "1cd89bb14d6077f07bad3607737ed8f63268c271", [] @@ -447002,20 +447269,80 @@ }, "shared-storage": { "resources": { + "embedder-context-inner.https.html": [ + "e4b59f7f7a028f55a9511654234200959e18a5e1", + [] + ], + "embedder-context-inner.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "embedder-context-module.js": [ + "782b97aea94edf29d38d62edb87b0119a1b5495b", + [] + ], + "embedder-context-nested-iframe.https.html": [ + "2ba25d1ed992d50971c39d9d16d645b3aa06a7bf", + [] + ], + "embedder-context-nested-inner.https.html": [ + "c704a00b73a8c2666b577a07a77586e84caaa152", + [] + ], + "embedder-context-nested-inner.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "frame0.html": [ + "c9b559fe83a6e04f58364037976e82dbaa44591a", + [] + ], + "frame0.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "frame1.html": [ + "a34990dc0340e9a2da431310af988d6b7754d501", + [] + ], + "frame1.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "report.py": [ + "7d0fa36019ef58c8c7764767f267628cd05bc285", + [] + ], "select-url-permissions-policy-helper.html": [ "b70d763ad457415dd7facc78a003e5a20a1d9c5d", [] ], + "sender0.html": [ + "e3d0475f1220bbcbb71c11451bbd9ba96ec0f3eb", + [] + ], + "sender0.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], "shared-storage-permissions-policy-helper.html": [ "d87092aad1d2efedf5d4245884e28e159880b2df", [] ], "simple-module.js": [ - "ad9a93a7c160f02945911772460eb8a1bcb003db", + "5ebc149fd4a44527116eb71b63a06b9b4817499b", [] ], "util.js": [ - "2ad668c85a108064840519c703c9a8a8ebfb98cb", + "a41b4de3a59f2d401c682cab707dafa40ef23f79", + [] + ], + "verify-get-undefined-module.js": [ + "56bc2f51e2b2a19915f430ce863e398c90ba6e69", + [] + ], + "verify-storage-entries-module.js": [ + "ee0c636cd1366ee359e8079c02a0102fab7c78f7", [] ] }, @@ -447036,6 +447363,18 @@ [] ] }, + "shared-storage-selecturl-limit": { + "resources": { + "run-url-selection-operation-limit-inner.https.html": [ + "c5d057f3e2ffc613c1ae20c19986a3fb13c8c246", + [] + ], + "utils.js": [ + "a7462147d77c829ebda92d792faf664940b5f1c6", + [] + ] + } + }, "signed-exchange": { "META.yml": [ "f56fbab13ecc0256f23133a1086e8925729121f9", @@ -449319,11 +449658,11 @@ [] ], "requirements_macos_color_profile.txt": [ - "c3448a98dfff36a8afdd3f4063e09aa875552be3", + "7505a98d9f3c27add68ed8e1fe17ceae2358e91f", [] ], "requirements_tc.txt": [ - "59a0000a0e4616898740075256467bc861620dbf", + "b5618a8b9ddb25ff1c4f546c9ca377c9b6ba30ca", [] ], "run_tc.py": [ @@ -449834,7 +450173,7 @@ [] ], "requirements_mypy.txt": [ - "19a81dd3a5ca01d3e5fc4cabef73b5911720882f", + "3ccba120882235214683f186caf90ec3ac685365", [] ], "requirements_pytest.txt": [ @@ -449842,7 +450181,7 @@ [] ], "requirements_tests.txt": [ - "614aa3e8625b4543f64daa2d02d3bef225b4a489", + "c07c321de39ffa6ba4e8abc9c4cef7837e3d7291", [] ], "runner": { @@ -458057,7 +458396,7 @@ ] }, "requirements.txt": [ - "3e5467a5f45b11842c5224d31982a38c5a610957", + "32fd3ff8c9a5aaea9f18487d124b2e4973a18870", [] ], "requirements_chromium.txt": [ @@ -458065,7 +458404,7 @@ [] ], "requirements_edge.txt": [ - "d2389eee93c1d03e1d366f0ab76b2a5ce23209d1", + "45f93a3bb967744644b556d054f91522f08b319d", [] ], "requirements_firefox.txt": [ @@ -458073,11 +458412,11 @@ [] ], "requirements_ie.txt": [ - "c3fe460116e332d91fc614387b0124a9f6ef864e", + "788506b4ac3a2cb4bcf939ebacb900520719f8fe", [] ], "requirements_opera.txt": [ - "c3fe460116e332d91fc614387b0124a9f6ef864e", + "788506b4ac3a2cb4bcf939ebacb900520719f8fe", [] ], "requirements_safari.txt": [ @@ -458085,7 +458424,7 @@ [] ], "requirements_sauce.txt": [ - "abc64ec5085debc16a33c92549dd26d42fa5fd48", + "5740883d35167e6716501aac8ba49cc2a2dfcea4", [] ], "setup.py": [ @@ -458159,11 +458498,11 @@ [] ], "firefox.py": [ - "d9c9481f3275a9fdb73d9fdf1c5dbd284f1ebd27", + "880c2bd187ad4da475f8812bf8301e00a49b5cad", [] ], "firefox_android.py": [ - "6e418540b9454b4005aff7c73e2c93e3306035c6", + "7065d07a647f88ed6526856e03ee86ab8635c623", [] ], "ie.py": [ @@ -458231,7 +458570,7 @@ [] ], "base.py": [ - "4b715a1f3171b3581016f3ec6d0ab19cbf449b6a", + "c537e8271c7efe2cb73c81c0e07596346e371e08", [] ], "executorchrome.py": [ @@ -458243,7 +458582,7 @@ [] ], "executormarionette.py": [ - "a18063c98011f7adab5677783ea2f56d1254637d", + "9c9c18735a64caa7614efb431ebe0ee9174896f9", [] ], "executorselenium.py": [ @@ -458259,7 +458598,7 @@ [] ], "executorwebdriver.py": [ - "46b98d4df13c9f1ca5c8436ce8899387f0a2d026", + "b31c84d8e88f3e14a726fcd1725ac2911844e4b3", [] ], "executorwktr.py": [ @@ -458524,7 +458863,7 @@ [] ], "wptcommandline.py": [ - "1e3ae7a0615727c9ea5dca5e4a10f5d9a7a3319d", + "d4950e14c0cb9e555d284993967a4349dfe8d081", [] ], "wptlogging.py": [ @@ -459891,7 +460230,7 @@ [] ], "aria-utils.js": [ - "e6411a9a0eda23b88e0bcc93967a678bc25f2a7c", + "4fbc96aab3b02ce9101137638d7342ba9e24c067", [] ], "manual.css": [ @@ -461156,6 +461495,10 @@ "e447830c5ffb442842bc1c6c6227dd8531d085e0", [] ], + "denormal-test-processor.js": [ + "2b7929437d84a47d69f80d8eb11570fa278b6337", + [] + ], "dummy-processor-globalthis.js": [ "d1b16cc9aaac4a21f8c428d2a1d583fc07914c67", [] @@ -461687,7 +462030,7 @@ }, "network": { "__init__.py": [ - "70f4eb2712f2dbd7e8fad8702286f81b5a01ba16", + "92e88d4e2361e5fa45541966e460b0ad26e16886", [] ], "before_request_sent": { @@ -462958,7 +463301,7 @@ [] ], "RTCPeerConnection-insertable-streams.js": [ - "f1b872294bade2f9bf633238afe30265f133e6ff", + "df01ea239bc48f73458896e6782738a98b10d673", [] ], "RTCPeerConnection-sender-worker-single-frame.js": [ @@ -481586,6 +481929,99 @@ ] ] }, + "attribution-reporting": { + "aggregatable-report-no-contributions.sub.https.html": [ + "b42a61b7bd50a2934b0b7f479618d466047146bc", + [ + null, + { + "timeout": "long" + } + ] + ], + "request-format.sub.https.html": [ + "a9e36dd126771f12089367a2fabf0171a9ace7bf", + [ + "attribution-reporting/request-format.sub.https.html?method=a&expected-eligible=navigation-source", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=fetch", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=fetch&eligible={\"eventSourceEligible\":true,\"triggerEligible\":false}&expected-eligible=event-source", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=img&eligible&expected-eligible=event-source, trigger", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=img&expected-eligible=event-source, trigger", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=open&expected-eligible=navigation-source", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=script&eligible&expected-eligible=event-source, trigger", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=script&expected-eligible=event-source, trigger", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=xhr", + { + "testdriver": true, + "timeout": "long" + } + ], + [ + "attribution-reporting/request-format.sub.https.html?method=xhr&eligible={\"eventSourceEligible\":true,\"triggerEligible\":false}&expected-eligible=event-source", + { + "testdriver": true, + "timeout": "long" + } + ] + ], + "simple-verbose-debug-report.sub.https.html": [ + "8a477f732f494a84e5802ace639d8cbec4e2a6c9", + [ + null, + { + "timeout": "long" + } + ] + ] + }, "audio-output": { "enumerateDevices-permissions-policy.https.html": [ "4e5652e68f5e0e72ae892df46195090206f62185", @@ -501267,14 +501703,14 @@ ] ], "fedcm-cross-origin-policy.https.html": [ - "808b7f6ea775d10e26dfbd48169a3464d87e89b6", + "b2a68b00c8e47a00dbc71534504dc89b62e1448f", [ null, {} ] ], "fedcm-csp.https.html": [ - "59c97e8c38ffd6bf796b34dd266a0adfa6222022", + "59257414383b89d032813b3b732e5079d477af24", [ null, {} @@ -501287,6 +501723,13 @@ {} ] ], + "fedcm-loginhint.https.html": [ + "6db67138167276547fa54db1976300a5c9fcaebc", + [ + null, + {} + ] + ], "fedcm-logout-rps.https.html": [ "51b123003c1e39466a31c68904a4f5633f063697", [ @@ -501381,7 +501824,14 @@ ] }, "fedcm-network-requests.https.html": [ - "62c0791ab48e6ef91ea011531f2f413e50112c2a", + "0084c8b0cfee064aea748b51a7758b37d4f91d1f", + [ + null, + {} + ] + ], + "fedcm-userinfo.https.html": [ + "ff5e432c747c73aa9815bc4302a6c0c2927b731a", [ null, {} @@ -503012,6 +503462,13 @@ {} ] ], + "anchor-position-auto-001.html": [ + "b5e19522b00d8327e2eb1da96a2714ff2c62c60b", + [ + null, + {} + ] + ], "anchor-position-borders-001.html": [ "1e2ecbc909cee0f9f301481c12ab6a8fc9b4ff0c", [ @@ -506522,7 +506979,7 @@ ] ], "color-valid-color-function.html": [ - "ebd7078a62624fa2c9dc18076a4f36c20f791b70", + "2a7750539ca6e8efbcc6724adf79c11180faef83", [ null, {} @@ -507751,7 +508208,7 @@ ] ], "content-visibility-068.html": [ - "844f04e6b26e84546b160297b422f997b323b3e7", + "64ad8546920322417dc17882a4a527f4aa1cbc0a", [ null, {} @@ -507765,7 +508222,7 @@ ] ], "content-visibility-070.html": [ - "a41b513e6269b796ef9ebd0c76fec777681d6cfc", + "f43b60337838f1b5a45c4db4bc3f810abb8000f9", [ null, {} @@ -510163,7 +510620,7 @@ ] ], "row-005.html": [ - "0f34c6fbdb400c35af723c8be56c22bbe1612e96", + "580f9897de0a202b34dd3ac0b0af140b4d0cce93", [ null, {} @@ -510176,6 +510633,20 @@ {} ] ], + "row-compat-001.html": [ + "67e242e60f148052cbcf5143d26374fc64029b49", + [ + null, + {} + ] + ], + "row-use-cases-001.html": [ + "d86bd76b11fd7f2abbcb8fca083667c4d1e47463", + [ + null, + {} + ] + ], "row-wrap-001.html": [ "474005174db31306504522e338e55b6db0993d1f", [ @@ -510375,7 +510846,7 @@ ] ], "flex-flow-valid.html": [ - "8ce254f7b15b768b805e7970bc7896eecb2c286b", + "e4a84fdf7f1a74f8e59501fe0d95893ff4c64789", [ null, {} @@ -515366,6 +515837,13 @@ {} ] ], + "Highlight-multiple-type-attribute.html": [ + "dc8b33045595bc472e41d94e7f040cf610d189af", + [ + null, + {} + ] + ], "Highlight-setlike-tampered-Set-prototype.html": [ "4c23f4850c1507c9fb3fd3c8e46ffa67df655157", [ @@ -515520,7 +515998,7 @@ ] ], "image-set-parsing.html": [ - "2dad36e88179dd3ef3ab5f2e89f8297de93a77cc", + "053ab85422f0ee55f671492cd8e408b84cc7192b", [ null, {} @@ -521018,7 +521496,95 @@ {} ] ] - } + }, + "scroll-start-display-toggled.html": [ + "088c14128e1acbb50e15664d7e5d68ee445de060", + [ + null, + {} + ] + ], + "scroll-start-fieldset.html": [ + "da48c6ce25ecc7d570959f70a0735181200413fc", + [ + null, + {} + ] + ], + "scroll-start-overflow-toggled.html": [ + "8829519024a3ce7e98e8bb1321c6f3f1509c40cd", + [ + null, + {} + ] + ], + "scroll-start-root.html": [ + "a74a1131e363e3d8d1c6a0cf6de7765d9ac50567", + [ + null, + {} + ] + ], + "scroll-start-vertical-lr.html": [ + "7ed152fd9af962825a0a47d40812e0bb73c3247e", + [ + null, + {} + ] + ], + "scroll-start-with-anchor-navigation.html": [ + "ff5c9793918312b9249d4e51c94b3ed75be8742f", + [ + null, + {} + ] + ], + "scroll-start-with-fragment-navigation.html": [ + "6e7730b0dc53852676543b334d03a18922e6329b", + [ + null, + {} + ] + ], + "scroll-start-with-programmatic-scroll.html": [ + "c10746f85495d176e6326b982997c66f4734372f", + [ + null, + {} + ] + ], + "scroll-start-with-scroll-snap.html": [ + "b813fcc750ef5b7c9adff7ef46af5079c8b2c3a7", + [ + null, + {} + ] + ], + "scroll-start-with-text-fragment-navigation.html": [ + "c84bd782543dec3e4069eb11903ae07b9f310ca6", + [ + null, + { + "testdriver": true + } + ] + ], + "scroll-start-with-user-scroll.html": [ + "c122a6ef092fcdea76d19194a23244e590bae22d", + [ + null, + { + "testdriver": true + } + ] + ], + "scroll-start.html": [ + "a35c612d7f4fbcfa06965d496e5b05e1316513b4", + [ + null, + {} + ] + ] }, "css-scrollbars": { "auto-scrollbar-inline-children.html": [ @@ -522479,6 +523045,13 @@ {} ] ], + "auto-013.html": [ + "8f0144077d306e7dd8bb004dc316218241267477", + [ + null, + {} + ] + ], "contain-intrinsic-size-009.html": [ "0aa62eaaeff5d6cc2fd499b1bf6907e11cbe0e37", [ @@ -531188,6 +531761,13 @@ {} ] ], + "calc-infinity-nan-serialize-number.html": [ + "14b69560cadd528175c8267ba4c2fc3755826018", + [ + null, + {} + ] + ], "calc-infinity-nan-serialize-resolution.html": [ "6548ea7ea750c972c51283b76a08fec10823b38f", [ @@ -531223,6 +531803,13 @@ {} ] ], + "calc-linear-radial-conic-gradient-001.html": [ + "ded5f0c37e2860b28e7b876e7f098b4de00129eb", + [ + null, + {} + ] + ], "calc-nesting-002.html": [ "269d4e940ac4dc7d525a6039a27b64193750ca27", [ @@ -531398,6 +531985,13 @@ {} ] ], + "getComputedStyle-calc-mixed-units-002.html": [ + "4be8c292b18b7c1289e9e94b11937d58d98804de", + [ + null, + {} + ] + ], "hypot-pow-sqrt-computed.html": [ "3cc85a5230ca8dfc6310daf76ae89278a364169f", [ @@ -533783,7 +534377,7 @@ ] ], "selectorSerialize.html": [ - "f3a402f5f079fd33683e44157a996df7daa4eec0", + "ab4855181617a47e96d3d685504b300513b89fb5", [ null, {} @@ -535824,7 +536418,7 @@ ] ], "offset-path-computed.html": [ - "c2f9d4bce90f4ca3872c8b961f11d3e4b3cac589", + "7b5a8c16438612737af2a5f4fbc0755e7aa7a291", [ null, {} @@ -537127,7 +537721,7 @@ ] ], "user-action-pseudo-classes-in-has.html": [ - "466e8610fdb91a0fc27fd30cf49a7d675bec39a4", + "f36de7c76fcf3d96a62dc34994b181ac4e0d8175", [ null, { @@ -537476,7 +538070,7 @@ ] ], "CustomElementRegistry.html": [ - "5b75fc651fcf74685e7f6cd6e753c9cbfd44de48", + "b08cd120f631dfa651c04dab8708855f7ab59aaa", [ null, {} @@ -538639,6 +539233,15 @@ ] }, "document-picture-in-picture": { + "beforeunload-is-disabled.https.html": [ + "3dd2b8a6d19fd55d7b2a2d91a9d7557ec8b0bfcd", + [ + null, + { + "testdriver": true + } + ] + ], "clears-session-on-close.https.html": [ "8b1d549dc39ab54713b5f100cd12ca458c1b213d", [ @@ -542249,6 +542852,15 @@ ] ] }, + "parts": { + "basic-dom-part-objects.tentative.html": [ + "175f5d555b9b1ecd8e2d503f0e8e7eb22fdf3b7b", + [ + null, + {} + ] + ] + }, "ranges": { "Range-adopt-test.html": [ "3735fc38fdb122b52c815106891dfc47e85a4fa7", @@ -561527,7 +562139,7 @@ ] ], "history-back-and-forward-should-not-work-in-fenced-tree.https.html": [ - "910b2ba792169b0222742484eb5185b423f65357", + "df50a1d2232c04746df59c70634c76446d6e34fb", [ null, {} @@ -562945,7 +563557,7 @@ ] ], "keepalive.any.js": [ - "4f33284d0c74cbbdedb15ad1954722b5f1457531", + "899d41d676a4286cba49743cf06368545507194c", [ "fetch/api/basic/keepalive.any.html", { @@ -564122,7 +564734,7 @@ }, "cors": { "cors-basic.any.js": [ - "23f5f91c87d49f648dbbe575cc901562a5277c8b", + "95de0af2d8f3b041aa84ebfb00707eb1fb65701a", [ "fetch/api/cors/cors-basic.any.html", { @@ -564278,6 +564890,48 @@ } ] ], + "cors-keepalive.any.js": [ + "2df0c08b17f24adb83986530171b96796a5f9d18", + [ + "fetch/api/cors/cors-keepalive.any.html", + { + "script_metadata": [ + [ + "global", + "window" + ], + [ + "title", + "Fetch API: keepalive handling" + ], + [ + "script", + "/resources/testharness.js" + ], + [ + "script", + "/resources/testharnessreport.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "../resources/keepalive-helper.js" + ], + [ + "script", + "../resources/utils.js" + ] + ] + } + ] + ], "cors-multiple-origins.sub.any.js": [ "b3abb922841c63e5ccbb633d60d29f767f0586ad", [ @@ -572144,6 +572798,216 @@ ] }, "local-network-access": { + "fenced-frame-subresource-fetch.tentative.https.window.js": [ + "2dff325e3e1bcffc885ac59b46dbe278c9d00c42", + [ + "fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.html?include=baseline", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/fenced-frame/resources/utils.js" + ], + [ + "variant", + "?include=baseline" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/fenced-frame/resources/utils.js" + ], + [ + "variant", + "?include=baseline" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.html?include=from-private", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/fenced-frame/resources/utils.js" + ], + [ + "variant", + "?include=baseline" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/fenced-frame/resources/utils.js" + ], + [ + "variant", + "?include=baseline" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "fenced-frame.tentative.https.window.js": [ + "bdef699afc4c9897b4d979b282fe937d5a3403e5", + [ + "fetch/local-network-access/fenced-frame.tentative.https.window.html", + { + "script_metadata": [ + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/fenced-frame/resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "fetch-from-treat-as-public.https.window.js": [ "084e03282f4f78cf10408647ffd7d9a2f274c0e7", [ @@ -572324,7 +573188,7 @@ ] ], "iframe.tentative.https.window.js": [ - "6a83b88d3ff16b1c8a4d3891422936564e8dcb60", + "7d9ee530077779ce8b2a9536cc3a1d174d0cc1ca", [ "fetch/local-network-access/iframe.tentative.https.window.html", { @@ -572346,7 +573210,7 @@ ] ], "iframe.tentative.window.js": [ - "e00cb202bec61b69d5dcd8e6c1f1b519266f9122", + "c0770df83854c2c463febaaef65e073d46b4446a", [ "fetch/local-network-access/iframe.tentative.window.html", { @@ -572476,9 +573340,36 @@ ] ], "service-worker-fetch.https.window.js": [ - "3d0f6d8097a6c44933840d41074fbe7b2713678a", + "cb6d1f79b01f7c3fc7ba13884bd675bfd01d74a2", + [ + "fetch/local-network-access/service-worker-fetch.https.window.html?1-8", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "variant", + "?1-8" + ], + [ + "variant", + "?9-last" + ] + ] + } + ], [ - "fetch/local-network-access/service-worker-fetch.https.window.html", + "fetch/local-network-access/service-worker-fetch.https.window.html?9-last", { "script_metadata": [ [ @@ -572488,6 +573379,18 @@ [ "script", "resources/support.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "variant", + "?1-8" + ], + [ + "variant", + "?9-last" ] ] } @@ -583793,6 +584696,13 @@ {} ] ], + "strict-mode-redefine-readonly-property.html": [ + "ce1da3747a4e564d9b6dabfe0831c101faf26543", + [ + null, + {} + ] + ], "window-named-properties.html": [ "bd3929dd89d40a883b4cd15d71dfafe01e27a32a", [ @@ -591555,168 +592465,168 @@ ], "compositing": { "2d.composite.canvas.clear.html": [ - "453d5e7f3318fa3a90424fd9c8b3d7d9e5ee8d21", + "eac9dbdef9acf93a7be8f7322eba552edff52b16", [ null, {} ] ], "2d.composite.canvas.clear.worker.js": [ - "86407784bdf4a290766c228255ceaf52b5cc69cb", + "2f9fb92da1e9d222482fce249e53307f5c7de8a0", [ "html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.html", {} ] ], "2d.composite.canvas.copy.html": [ - "a54b09bbfc499997e3ada72daed51a7ff80c6002", + "7c9771c10f911e6d76763297e386dc9a60b2a835", [ null, {} ] ], "2d.composite.canvas.copy.worker.js": [ - "42d7ec23c2aa6da083ce7f7659f9ac1568efa934", + "5b071665ce4fb3ae83d357199bd2f082fc79cd88", [ "html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.html", {} ] ], "2d.composite.canvas.destination-atop.html": [ - "d88afa5ded5191b619f0db4677241222f94a7c52", + "d9c34ded0ba57337eff65df454831ebf298bb8ee", [ null, {} ] ], "2d.composite.canvas.destination-atop.worker.js": [ - "96627b03ece79079962e09e463af9d6cb4962e68", + "58828619a32383a43ecd0691c1823abcdc34478c", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.html", {} ] ], "2d.composite.canvas.destination-in.html": [ - "54223ee5fc925948491e26b016d7944b372da969", + "9c1a8dbf471680dc7fb35f7f5c7542cd3c8b6eaa", [ null, {} ] ], "2d.composite.canvas.destination-in.worker.js": [ - "525ca84f478514cbe87f090dd3d9dacfda4e8cff", + "4e2ec058ecabac7a0bb22c008cb75c4ed135a692", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.html", {} ] ], "2d.composite.canvas.destination-out.html": [ - "1b9b88a9188b2ad718bb29f03c8bc74748bb24f2", + "10c5baf48503409da694c5378f3a37ce938fe853", [ null, {} ] ], "2d.composite.canvas.destination-out.worker.js": [ - "aaaadd71851a69f3c25f66f69ad88ce47d3ee563", + "bc7be056a1d63d3fcc7c09b3debb9930facc8b15", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.html", {} ] ], "2d.composite.canvas.destination-over.html": [ - "44d6a5bb02e7a7478799f3953b03fed0a60f1ad2", + "0e2ece9eabd8c49a06394f27fbe20e012ba27f00", [ null, {} ] ], "2d.composite.canvas.destination-over.worker.js": [ - "b13e7b1b68d5a747c49d3cf4ce8558af10265f4f", + "c1d15a0959189c62bd418993c5db8cbe83b52d3b", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.html", {} ] ], "2d.composite.canvas.lighter.html": [ - "65186a7753e295e72060a56f93b18a26f56d68ba", + "392bb855f6fa1844f739312ec67ac8079464a3ff", [ null, {} ] ], "2d.composite.canvas.lighter.worker.js": [ - "e8dd516d2a599ceb4cc3d5b54dbcff87cc182b3e", + "df494f22d333e5fd7cd420c4040126d78c8d2f71", [ "html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.html", {} ] ], "2d.composite.canvas.source-atop.html": [ - "2d0b6a6ab6ff371895ad400812ab5b222a691c99", + "f7d4da4d8413eeb4ca5a6eed5b15f74506979cd0", [ null, {} ] ], "2d.composite.canvas.source-atop.worker.js": [ - "f40ef4493156bbe8c41000edbfaab609ae8e864a", + "781a89c1b6ca5752b865f644ef5eec8f62b50291", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.html", {} ] ], "2d.composite.canvas.source-in.html": [ - "28cdc267236387c6299ed004d217a4f4440c6b5a", + "69e57e2578f6d69661dfbd6166fd29a5c4bf37fd", [ null, {} ] ], "2d.composite.canvas.source-in.worker.js": [ - "4f116ac6224b5a0d077446bad292b4bbf520b833", + "484399acfccf2e3ad96a6f642ced3151e1ffec9d", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.html", {} ] ], "2d.composite.canvas.source-out.html": [ - "25d5e0737a4c951ff27379c898dc931f05854bb1", + "eb9dbd0810a5af97f5b949e084fdff4d0361bd15", [ null, {} ] ], "2d.composite.canvas.source-out.worker.js": [ - "ce1bdd9f359fcb985efbecc4dbf77dd012935553", + "d0d6cc12e95301705e68eb53b8a35c33bdd07822", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.html", {} ] ], "2d.composite.canvas.source-over.html": [ - "8e6b68621c001cc2c40144e7e957d4db710778f4", + "98629de8a4d770680316e2b95725cb50fc5b7c50", [ null, {} ] ], "2d.composite.canvas.source-over.worker.js": [ - "7f4355c483fce333f580c521f3432e69f9f208fe", + "848fbf3beccc89a85d9febc99f930818075ea112", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.html", {} ] ], "2d.composite.canvas.xor.html": [ - "a15811a52ea5761ba42a6803f452bfc35b090aef", + "bc69c8a08b721aa9a4d5ad0d06a33ce4deb3d85c", [ null, {} ] ], "2d.composite.canvas.xor.worker.js": [ - "929f6f7eebb7f691f5d2d27a63584b887fe98363", + "250bba4baccfaf08fd249b694c107ee742790794", [ "html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.html", {} @@ -592017,168 +592927,168 @@ ] ], "2d.composite.image.clear.html": [ - "75115ce7c27bfb46cce405a3a216c49afc0d455d", + "f001c4409c3e2c2ca59b64de64174cf6251624f6", [ null, {} ] ], "2d.composite.image.clear.worker.js": [ - "9a9ff0ec70afe93856143a38d9557b14ac0d81e0", + "f152cee739b5b5e37ab9921c7679a1268d1d0816", [ "html/canvas/offscreen/compositing/2d.composite.image.clear.worker.html", {} ] ], "2d.composite.image.copy.html": [ - "4cb9c4741025db9ec520fbda8cfee6124b7c406d", + "d472a0682d3dec075f441055ed527ee609329dd0", [ null, {} ] ], "2d.composite.image.copy.worker.js": [ - "8fe345da5b439234b7525565b73f6d14f60fa553", + "05ccab1711632032501996d648656ac9de6aae0c", [ "html/canvas/offscreen/compositing/2d.composite.image.copy.worker.html", {} ] ], "2d.composite.image.destination-atop.html": [ - "a86950c04b033dbb60078abf5357d8ec10a086e4", + "753c460ec6a5bba86cbfaa9092cd86f5da3ec401", [ null, {} ] ], "2d.composite.image.destination-atop.worker.js": [ - "8b862a0055600fb0e4586cd10e10e11399d48bab", + "43648142d50c6f27b5c110599a6b5ea3a6878bd7", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.html", {} ] ], "2d.composite.image.destination-in.html": [ - "0415cbc7b57f508d6c5927dda507d7f9dc54ecfb", + "df9f1ae786e0df1b694d1c811e4ce6b468c2f7c2", [ null, {} ] ], "2d.composite.image.destination-in.worker.js": [ - "1f580cd95aaf6bfe49699f4a87f44bedded02995", + "2787237c569cff871385e97ee36b9449670726ad", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.html", {} ] ], "2d.composite.image.destination-out.html": [ - "6c183fdedd4da0832096247c2f33dc3a72bccc9a", + "6981ca1d727a0414be4b61740e3428bea9644002", [ null, {} ] ], "2d.composite.image.destination-out.worker.js": [ - "d364abf8bc95c75d0eab6c99abdbf1cca045eaa6", + "e030f533a051c449883fd85bc6eb04b6639e6da3", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.html", {} ] ], "2d.composite.image.destination-over.html": [ - "3ace58d8d815f90d5d2b2cdd663bc19b67f546ec", + "33601151332123f398b96d5b7f06c8501f089020", [ null, {} ] ], "2d.composite.image.destination-over.worker.js": [ - "7ee7d94069d2c53a0e92630ced7967b901e9d657", + "964df4ae8bc022cfdc2bd64c99106d086f6d9f09", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.html", {} ] ], "2d.composite.image.lighter.html": [ - "9c50789a526d4069ce88dcd7029910adaf4b62e0", + "25f2a7684a892f08c8f506aa6a4b7f82267048a6", [ null, {} ] ], "2d.composite.image.lighter.worker.js": [ - "aa55199d072b9d1eb0d9f95addb340eb35a3519f", + "f3828b6411d8a7b318844a60dbe9f0376de99f38", [ "html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.html", {} ] ], "2d.composite.image.source-atop.html": [ - "a87385b20c3157c33c4da9f4e0773daabfc29986", + "cfa386cfd1d759407fe513efe0ae429b6e56a0b2", [ null, {} ] ], "2d.composite.image.source-atop.worker.js": [ - "b0ee8d8686ae16fa66758e077f69d7c94bdb88fb", + "7b1618e3f96c67d0c77c5f0e6421868204ec93b1", [ "html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.html", {} ] ], "2d.composite.image.source-in.html": [ - "bd1d09f19d37ebc784132132e8f3fb0dd91b84de", + "cc44706b1c7097cb3cb1f467e5ac728e3a6d29f9", [ null, {} ] ], "2d.composite.image.source-in.worker.js": [ - "201c9bc1094cef04b202d398422cf6a860decd54", + "9accfb35c465e541adfe07d1054aa8f530d8ecab", [ "html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.html", {} ] ], "2d.composite.image.source-out.html": [ - "e31cf7342f78305f88ccfc0702f3aa718bd551a6", + "bc2f7f2633935a117fbf9afcc75930f26d404631", [ null, {} ] ], "2d.composite.image.source-out.worker.js": [ - "16ed7c48bb35a32d63a37f13d1d9d362a1de025b", + "8e8d9116bb1b1d286925df83db85ec2d5e562555", [ "html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.html", {} ] ], "2d.composite.image.source-over.html": [ - "f4a871aeec38baef61d41f235db1018e43ba8fc6", + "88a8176f7e2e92f767f5a4b268c25682bcc65ca4", [ null, {} ] ], "2d.composite.image.source-over.worker.js": [ - "a1deadcdd4b67a3c684ad9f70715e9349136f3cb", + "679aa19ef9820aa626309da5ef3bc1607e3455a2", [ "html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.html", {} ] ], "2d.composite.image.xor.html": [ - "91e992e267fe01a27cb7a39765e1d4ee6177ff40", + "ef149b2f99680182760c823b5c18ec438e75684e", [ null, {} ] ], "2d.composite.image.xor.worker.js": [ - "a77191f9f61262b92be588b1359c80c8d213dd9c", + "83a04928b5d417677bdfdcfacf6123828b2b852f", [ "html/canvas/offscreen/compositing/2d.composite.image.xor.worker.html", {} @@ -592727,70 +593637,70 @@ ] ], "2d.composite.uncovered.image.copy.html": [ - "a3f009532b66c08835c3b9755d85d9b6bc5bd6fe", + "0ecb5ed01df69bc3ff3e8d2c77675f1686dd932a", [ null, {} ] ], "2d.composite.uncovered.image.copy.worker.js": [ - "05a208efbbe8a6ba9a2074f3a20d982b93a5a1ec", + "0e56b4f71d499b2935def0be81c8eaaada71c517", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.html", {} ] ], "2d.composite.uncovered.image.destination-atop.html": [ - "e46d8c0c4c8aad7c6f23332a2538ae1a4c74c8c2", + "00a4465d0b95058ac7835964b148aaea5cdf9507", [ null, {} ] ], "2d.composite.uncovered.image.destination-atop.worker.js": [ - "3662f862e9f8afd56a30c7f8250dbb52ad0055ab", + "4c4a0a4c951fa5942df538532f103e8024ea878c", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.image.destination-in.html": [ - "41c1c73b021facdb9c0acc2738943213973ac8d0", + "f5f8c68c51b4fe12d094a9eee556914b69524a35", [ null, {} ] ], "2d.composite.uncovered.image.destination-in.worker.js": [ - "d7cd348e7869743d7cea01d5e76024e52e63ab9c", + "af1dc50c9bbde88c2c68e4bde209b3a9d8ab4588", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.html", {} ] ], "2d.composite.uncovered.image.source-in.html": [ - "51c92d5dbc4a0323132ee7a0a38e61ea4b60a8af", + "2e1fe84b608a26589e1eb53345eda6dc9896ba27", [ null, {} ] ], "2d.composite.uncovered.image.source-in.worker.js": [ - "02397f02ec52795316eec1fea3210dfa5e3f5a20", + "490ce4d0012de3b0d4d8cf3fc57e3846c6b95fce", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.html", {} ] ], "2d.composite.uncovered.image.source-out.html": [ - "29227f2a5ad8318ebbb333d47c33afec3e6f3f45", + "1f5be066eecf5f10cf075420aec36582914b8caf", [ null, {} ] ], "2d.composite.uncovered.image.source-out.worker.js": [ - "70acee3f1592931faf9b006b0fab16caabb9368f", + "3647e34574be8619f860e5e52ccc56ec65cb62c9", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.html", {} @@ -592867,70 +593777,70 @@ ] ], "2d.composite.uncovered.pattern.copy.html": [ - "6d9a23beee1eee9608ef48dd41ed84f837f1c4f3", + "c698c2517c8f0c8311595c2c3dc56442b62e5b60", [ null, {} ] ], "2d.composite.uncovered.pattern.copy.worker.js": [ - "d3b6e07422224b1c1d0ce103725e01514902de57", + "a5944be695407a8c9273b7099398110073386e96", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.html", {} ] ], "2d.composite.uncovered.pattern.destination-atop.html": [ - "e5cb129273367b56a4ec0f8ad59a6af8daed0208", + "887570fad748a9eeedd3c52b13caf230a050e0d5", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-atop.worker.js": [ - "83bd328b3760ed4dffec1156196f9a435ab3a696", + "c34c748059ae242f8c27b534d142545d0d30cac7", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.pattern.destination-in.html": [ - "ef55aa7222f4c930e707b101431fb77183b2302c", + "7aa9e662f665a9c306bd9bfcdc6bb5a1a93a9915", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-in.worker.js": [ - "c599c3dfc6d65a9a039e1f34f32e7c229f536862", + "10042455a79632322abe36fa34f6beb1f7fe957d", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.html", {} ] ], "2d.composite.uncovered.pattern.source-in.html": [ - "98ba8bb12cfe011ae7e8bee2b6a8237f2d6fcec5", + "3830e92f69e329331a1d8bed9d155d971ae5ab3f", [ null, {} ] ], "2d.composite.uncovered.pattern.source-in.worker.js": [ - "10178699f6a5d495e3c825e165819d401364821b", + "c658da8c991f8695b681af07737ca458df41f40c", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.html", {} ] ], "2d.composite.uncovered.pattern.source-out.html": [ - "bdd17f9e0840e45f560509d68b8278918236b677", + "3c202dd55686ea6c33fcb0934a912dabbdb2ff7d", [ null, {} ] ], "2d.composite.uncovered.pattern.source-out.worker.js": [ - "764a09416f39e4d829fbc2df465359be3a939719", + "86baf476febad997d6a63e654d192cfe122d01dd", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.html", {} @@ -596326,14 +597236,14 @@ ] ], "2d.pattern.basic.image.html": [ - "4ffbc6d3ac24db4ccd4aaf68f2e6cfabf42757d7", + "9efa9d6363cc48da1e038b5009b10228d970e53d", [ null, {} ] ], "2d.pattern.basic.image.worker.js": [ - "b9a79d74c9571b3efbac7cdc7bc3e632a2f67102", + "776f1dbabd80bdcc3e3269dd18d132ce97e5dd9a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.html", {} @@ -596368,14 +597278,14 @@ ] ], "2d.pattern.crosscanvas.html": [ - "b040e023d89f0ca4264a1b5aade7bb6492fe1e9b", + "fbb7e5266e8b7842a9868e3fe388999ac3273623", [ null, {} ] ], "2d.pattern.crosscanvas.worker.js": [ - "e7a207447a37997473c71384a989a15f83477903", + "bd24b44b0c9e68592db03123922afc27b2b79ee2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.html", {} @@ -596452,70 +597362,70 @@ ] ], "2d.pattern.paint.norepeat.basic.html": [ - "7ec80af80fd09b676e8b1b347d8f58bbb1fd0266", + "a60a61efc26e4ce591d6a569701d8ad8b7bc422f", [ null, {} ] ], "2d.pattern.paint.norepeat.basic.worker.js": [ - "178be23578fc7abc565af48729b38bf07af3f771", + "13c5dd2815610c52ac1feb21bf0235ae692854c9", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord1.html": [ - "d6ebd24277eba61a3de8c1b1d7074d8f38bce0dc", + "4a254b3afcf0959d7ed239dab5896d2dc20bb39b", [ null, {} ] ], "2d.pattern.paint.norepeat.coord1.worker.js": [ - "8596a460ef189b5c3b9874a3c9aee70b95928376", + "948da3a132acfe01d8b1073293cb0bc0316dd309", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord2.html": [ - "97205f5489a8e148e9beae116558d83bfd6163a5", + "306428a61628860c343f3aa6ef193aac66b25d6e", [ null, {} ] ], "2d.pattern.paint.norepeat.coord2.worker.js": [ - "5c69536d1015cec9c95e5e66d228830f2ceddf87", + "fa90ff652a23a0c9ec904aec545c82a3742d901e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord3.html": [ - "28104abc4e123813420235ee38a3d3e427b6bb69", + "556fca6beffc1bd12fca097ade8f20cc70337b5f", [ null, {} ] ], "2d.pattern.paint.norepeat.coord3.worker.js": [ - "994bcc8a7343d073bf3b8b4b530ddb779a865800", + "834516e96a49526f97597abb4b2591121e62f4e6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.html", {} ] ], "2d.pattern.paint.norepeat.outside.html": [ - "5036f8b6b506b1255e2ab9708da1ae5a49a76daa", + "c049b79aeb9342b981719f543e9cad270685a932", [ null, {} ] ], "2d.pattern.paint.norepeat.outside.worker.js": [ - "f6ccb838ded5f05dd4db53192e07409e69436bc2", + "93e7a312fb50856b8a949c98d9f10284232a2a57", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.html", {} @@ -596536,168 +597446,168 @@ ] ], "2d.pattern.paint.orientation.image.html": [ - "05b278ad81bd5ff9f4e15500132d8f0ed7353bca", + "c5dc174416a5d4c04a53223a11cda328c8d97600", [ null, {} ] ], "2d.pattern.paint.orientation.image.worker.js": [ - "825e12add0942e8300b125c385455b29e89ee807", + "56b072be4dd678958717d8925ee19ff11bacae22", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.html", {} ] ], "2d.pattern.paint.repeat.basic.html": [ - "15b7ff2c308414e50496191e05464a1d7e994b51", + "9327111eb7a46a95ade0c99b083cdb35ef9d5fde", [ null, {} ] ], "2d.pattern.paint.repeat.basic.worker.js": [ - "6bf7392451733af1fd306447aecee6acc7cc93d1", + "6e77679552a819365e7a4cc69fad2f480ba419ae", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.html", {} ] ], "2d.pattern.paint.repeat.coord1.html": [ - "225838972eec509688d75d548ba6d5deb7e2af68", + "098abc71651d2ca23e906b14c2b072f4fde62a87", [ null, {} ] ], "2d.pattern.paint.repeat.coord1.worker.js": [ - "32d1a27b3491a27d3448942f42aebb50464ae477", + "28c8d07b6a4b45c28b3a3b4cfe04baa6330c8386", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.html", {} ] ], "2d.pattern.paint.repeat.coord2.html": [ - "73c31e02b8e2024ceeb301f3dd0e439a4a026377", + "4ee7aac5fa861436445facd5b5c7787892dac649", [ null, {} ] ], "2d.pattern.paint.repeat.coord2.worker.js": [ - "a94f8206407850fef6e021546faf178434264396", + "6b2228e558c67551909dcfe9b1f4882357cbbbdd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.html", {} ] ], "2d.pattern.paint.repeat.coord3.html": [ - "c31528d87a758f152fb2241ca22e4cb1cc61e4b7", + "ed1bb4243d463b08dde2cea67146151c5aada6ad", [ null, {} ] ], "2d.pattern.paint.repeat.coord3.worker.js": [ - "ab7059b7849856de4124543233f3fbc1e5b567d1", + "fc3911fbb136da63179284ef491ca5f9d482cbb1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.html", {} ] ], "2d.pattern.paint.repeat.outside.html": [ - "1230be998aa2b1b255518d7359c8d31b77e35b82", + "420562c5efdd0a874f002724705145e4515af1ba", [ null, {} ] ], "2d.pattern.paint.repeat.outside.worker.js": [ - "1874aa9a30a1b4dcc0d59c227b7276fae327f5b2", + "b4d6774ec732a6388466b6a26ccd3b24e9861889", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.html", {} ] ], "2d.pattern.paint.repeatx.basic.html": [ - "3e7b8b2b5027a604e339fc293d0e5b1a3b933d62", + "ee2c477c936d3c63d05a17d53f23bc02e4b0652d", [ null, {} ] ], "2d.pattern.paint.repeatx.basic.worker.js": [ - "49d343cf9049689944211f9221925d51322212c5", + "157207a7c54733b1ddfdbedb6c2fbd08975520c0", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.html", {} ] ], "2d.pattern.paint.repeatx.coord1.html": [ - "9405b3a583c8eeef080d92112f7e652e082091c4", + "0e9a92e51cbb55bd88b27c9cb5a6ed0a748a7194", [ null, {} ] ], "2d.pattern.paint.repeatx.coord1.worker.js": [ - "69c54c447a580adb33512feb9f1a296bee45f2f9", + "684d2b7b4cbfca33fe968be111756d501067feb9", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.html", {} ] ], "2d.pattern.paint.repeatx.outside.html": [ - "c81e3ce196b1ffa391041fc89633d5255a6b8648", + "83e8ef37dc86e05ff75fa08ee35084e8c5ce2821", [ null, {} ] ], "2d.pattern.paint.repeatx.outside.worker.js": [ - "c4194a369843f93069a6d9aee67341ed4f9d50b7", + "bbb7b9055dd4d856db7e248eddef6c5e660a0baa", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.html", {} ] ], "2d.pattern.paint.repeaty.basic.html": [ - "cef32b3e9d5960fd50716b39890050fe098c4350", + "48948452af0fac0c4f469650d3e0fd727c4daa25", [ null, {} ] ], "2d.pattern.paint.repeaty.basic.worker.js": [ - "b460e240b969930d6032fd34dfae193061c0c217", + "0eec87ca75f771c6a6533e7df9ced2c1161d7a4d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.html", {} ] ], "2d.pattern.paint.repeaty.coord1.html": [ - "490b2a19939ab5ffbebe2647315acb0a52ab7f4a", + "79ca84193e86b65d918ccbcd7ec1fc00186429fa", [ null, {} ] ], "2d.pattern.paint.repeaty.coord1.worker.js": [ - "05fde112be48e9f765476b75120a1643ea734b69", + "c5f0f4bcc24f23902f789b8bca4710961189f966", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.html", {} ] ], "2d.pattern.paint.repeaty.outside.html": [ - "954280620aa33794b8dc0f167ec969f6a75270a4", + "f7fcc3e45a6e52ddad976f1fdfb6cc3e565aea59", [ null, {} ] ], "2d.pattern.paint.repeaty.outside.worker.js": [ - "c421fbc0d105b7a5361207f99aa2a5c5b4db95db", + "7201c3f133c26713812bf20d7fd9005de5bd51a8", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.html", {} @@ -596718,14 +597628,14 @@ ] ], "2d.pattern.repeat.empty.html": [ - "95baf291171ab97e5a3b1ff92c9e1283ef7ce1c0", + "550edecf1e14a46f1bf4a5fe2de66d2e3c63b724", [ null, {} ] ], "2d.pattern.repeat.empty.worker.js": [ - "5187ea44b6cef4dc5f166889912da1b92d8da9e2", + "9777e188fad5b4f2bc06aa5396a7174e679d2290", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.html", {} @@ -601581,84 +602491,84 @@ ] ], "2d.shadow.image.alpha.html": [ - "6a1372eef3fea1452d90aa28e6ee5e4ceafbfffc", + "9d14a7233aae0640241dc79ff6689dcc2c6183dd", [ null, {} ] ], "2d.shadow.image.alpha.worker.js": [ - "726c6d985e0eb7e81416eadef3fbb5c4def033f1", + "5c290b06cb28443802c4d97b613f41b5a695d3e0", [ "html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.html", {} ] ], "2d.shadow.image.basic.html": [ - "043988187a87f5b4bfe61d7c4a5ee3c9a09e9f52", + "b1066aa084f2951ea7ae0d7f6644e43a63be87e1", [ null, {} ] ], "2d.shadow.image.basic.worker.js": [ - "cf8f072b79f790b90bf40b7bc27688caa5137ac7", + "750326c8944aa6165fedafce5ff1537d5f886e00", [ "html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.html", {} ] ], "2d.shadow.image.scale.html": [ - "b53bd89430b293975bae70433b8d1402dadf5aa5", + "a6710d727b053f89f1e587143ddf6fc5d0c057b1", [ null, {} ] ], "2d.shadow.image.scale.worker.js": [ - "51db38d150dc1a7d6b9bc5d871a2b0a2b4a9560d", + "14e4334f0e07e3f208759bd9cd2a7c7b0a5d04ca", [ "html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.html", {} ] ], "2d.shadow.image.section.html": [ - "9b04130ae831f8aab4edba3c2903cef669669811", + "be2e6ed5e69aff4db956f143d39f0df455fc8849", [ null, {} ] ], "2d.shadow.image.section.worker.js": [ - "e5824d9761d865312d7875b7ebd318a22271d5ba", + "c63121c802290056f2f693bcdd2dacbdeb4637a1", [ "html/canvas/offscreen/shadows/2d.shadow.image.section.worker.html", {} ] ], "2d.shadow.image.transparent.1.html": [ - "fef5711055716627a83a4e95ec98d89561cf9b38", + "23cafc60750d59cd55551e4a24de12ed07dc0aa6", [ null, {} ] ], "2d.shadow.image.transparent.1.worker.js": [ - "a52914070d1187e75a4ac902bc7bbd0ac2424955", + "dbae8a5061e3be62f09f075c243cf67753cfe55a", [ "html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.html", {} ] ], "2d.shadow.image.transparent.2.html": [ - "bdd5c12b59bc979fb3f345b50439f030760ad3eb", + "6567dacf523b4d99bfcf2ef26fff936c7058d090", [ null, {} ] ], "2d.shadow.image.transparent.2.worker.js": [ - "26e0afc10d3c49c759d766327a543bdef049be2f", + "c424274bb51828504bf7de4f874d90a1d9ef25d0", [ "html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.html", {} @@ -601735,56 +602645,56 @@ ] ], "2d.shadow.pattern.alpha.html": [ - "f2aebf795e6d5dd2ec769f0305f3c410a00c1513", + "04f6ee2e81a5c1b77be684deb9b77b63a0e70e94", [ null, {} ] ], "2d.shadow.pattern.alpha.worker.js": [ - "2dfa1040941abf4184e78a230669157641d12077", + "8b29bfb064a32c509dd9afe96aaf0445c27cbf53", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.html", {} ] ], "2d.shadow.pattern.basic.html": [ - "b26e476ca03f2404f248e20b7c7f3a0efdc3aac0", + "64d6b59308b32f5e7fd55ab9a238d3d46bb21899", [ null, {} ] ], "2d.shadow.pattern.basic.worker.js": [ - "f972db853a5caad1bdf2e43c918515e13234d606", + "db9aefeaf4d53621a594b3ab049f5eb577ffbfdd", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.html", {} ] ], "2d.shadow.pattern.transparent.1.html": [ - "62dd7ad20f46333fa291a1f72b8431c63ac947a8", + "fe06c3afde10f255a1c5c1b2d5e49b419098fb7b", [ null, {} ] ], "2d.shadow.pattern.transparent.1.worker.js": [ - "120c5e4580f2b3f745db28a61108ec516bcd84fc", + "b2ebc0ae2cfe2bf059bec8586134bc712b033efd", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.html", {} ] ], "2d.shadow.pattern.transparent.2.html": [ - "423f0642d5ecd1bd2b327f1d32f9eb3b1b7e6d05", + "358113f07cddaa9f6873f809bd48331d7aa2b73f", [ null, {} ] ], "2d.shadow.pattern.transparent.2.worker.js": [ - "ef8313a85c44cf579e34db2bd195ec5375246702", + "cb963008f9446d67375cae6de3e2a5a75857807e", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.html", {} @@ -615814,7 +616724,7 @@ ] ], "security.pattern.fillStyle.sub.html": [ - "ea2b126ced85b7990228ee8f99a6ef759231cf96", + "a1053c04a4a58ccbe1ac490ea07ed6d45397ddd1", [ null, {} @@ -618060,7 +618970,7 @@ "forms": { "attributes-common-to-form-controls": { "dirname-ltr.html": [ - "cbdbb72c674eec63e262957937f251fc557d9a6d", + "7bb7aae3b92c8e597dc3b7370ec6e422afefb1fc", [ null, {} @@ -618074,14 +618984,14 @@ ] ], "dirname-rtl-auto.html": [ - "072b85086857ba9d018895dfbc29a66a69b2dbc0", + "02aeb79176d13eecc417d3716ac88a37e227f0d6", [ null, {} ] ], "dirname-rtl-inherited.html": [ - "e7b07288d6b7ab0e0c2f4ce419dc6681760f8ab6", + "0c5331f0ac875a001d515fe69c4cce9b15f29adc", [ null, {} @@ -619618,7 +620528,14 @@ ] ], "pattern_attribute.html": [ - "93cbd2caeca80c51a1b0627b85c7a0b0cc536748", + "ec093425f71e8298a9e139e568032b2e504601b6", + [ + null, + {} + ] + ], + "pattern_attribute_v_flag.html": [ + "5246421e8bd0fdb9c76316b9384b452239b8898c", [ null, {} @@ -620632,7 +621549,7 @@ ] ], "name-attribute.tentative.html": [ - "9aa5ce42e8e5ada6eeddfd4b8c2cff7359402157", + "f283633aab43af3cc854cc25d838f71705264a12", [ null, {} @@ -621635,7 +622552,7 @@ ] ], "popover-top-layer-combinations.html": [ - "8db327d7d1f00952f0b84807410c512f82de0ede", + "8a5d2df8e2770aea93b2f2489b551707850f66cb", [ null, { @@ -628811,25 +629728,6 @@ } ] ], - "consumption-crossorigin.sub.tentative.html": [ - "ebb1661559e84af3437465d38f52649cc5afd60f", - [ - null, - { - "testdriver": true, - "timeout": "long" - } - ] - ], - "consumption-sameorigin.tentative.html": [ - "81cd5d3ca197998e3c839cdf51cd2c682994fd33", - [ - null, - { - "testdriver": true - } - ] - ], "detached-iframe.html": [ "af3d23072b4c9c67dd7d6615051239a91f91cf39", [ @@ -639517,7 +640415,7 @@ ] ], "MediaRecorder-mimetype.html": [ - "07721abfd42cf9a9dc57fa6729f8c5da053d52c8", + "994792790a20ef9fd44eb8a3336f5829965cb76d", [ null, {} @@ -650462,6 +651360,36 @@ "testdriver": true } ] + ], + "predicted_events_attributes.html": [ + "7049447eca1eed53fce2258142895def36701e73", + [ + "pointerevents/predicted_events_attributes.html?mouse", + { + "testdriver": true + } + ], + [ + "pointerevents/predicted_events_attributes.html?pen", + { + "testdriver": true + } + ], + [ + "pointerevents/predicted_events_attributes.html?touch", + { + "testdriver": true + } + ] + ], + "touch-action-with-swipe-dir-change.html": [ + "69d8b099d0040b732bc1423026e593d9fac6ba1b", + [ + "pointerevents/touch-action-with-swipe-dir-change.html?touch", + { + "testdriver": true + } + ] ] }, "pointerlock": { @@ -671937,6 +672865,20 @@ {} ] ], + "controlled-dedicatedworker-postMessage.https.html": [ + "7e2a604621d307b01e6efc14836dacb250dcc19b", + [ + null, + {} + ] + ], + "controlled-iframe-postMessage.https.html": [ + "8f39b7fdbf86acc144c5984c177b533a29f809eb", + [ + null, + {} + ] + ], "controller-on-disconnect.https.html": [ "f23dfe71bac505f1cc396bcab191dbee7a6461f4", [ @@ -675110,6 +676052,27 @@ ] }, "shared-storage": { + "add-module.tentative.https.sub.html": [ + "7859e750c96d7c54bb679f5b66c43b5362713e47", + [ + null, + {} + ] + ], + "combined-setters-and-operations.tentative.https.sub.html": [ + "2c544b9b8e63f7a4c26d36ceea474dc96ac52ca0", + [ + null, + {} + ] + ], + "embedder-context.tentative.https.sub.html": [ + "44f45a7643111f169be1a1b8935720325103099e", + [ + null, + {} + ] + ], "insecure-context.tentative.http.html": [ "7ddf02f861aaba92db75ac47c85dfcab4a7c8861", [ @@ -675117,6 +676080,48 @@ {} ] ], + "run-operation-in-detached-frame.tentative.https.sub.html": [ + "a7ef103d00fe8f707043be171acfc4d206fee749", + [ + null, + {} + ] + ], + "run-operation-keep-alive.tentative.https.sub.html": [ + "2756805485cdfaaba818561c04759c913b176024", + [ + null, + {} + ] + ], + "run-operation.tentative.https.sub.html": [ + "c6c70805f117db5be6af6312810331d6c6c58384", + [ + null, + {} + ] + ], + "run-url-selection-operation-without-add-module.tentative.https.sub.html": [ + "0626684b677a9f17f19699899ec8a226a51d6d30", + [ + null, + {} + ] + ], + "run-url-selection-operation.tentative.https.sub.html": [ + "68f420a8a799fb176480c3c8a60a1915c0a9843a", + [ + null, + {} + ] + ], + "select-url-keep-alive.tentative.https.sub.html": [ + "f3755538b9d4b23e026fec85c161cb730531d4dc", + [ + null, + {} + ] + ], "select-url-permissions-policy-default.tentative.https.sub.html": [ "67911388ec0f41790d8c7c678256f153765a6294", [ @@ -675138,6 +676143,20 @@ {} ] ], + "select-url-report-event.tentative.https.sub.html": [ + "b2ad2d1b2a622c4879effd7dc9ffbd156b627e34", + [ + null, + {} + ] + ], + "setters.tentative.https.sub.html": [ + "ffc4bfbd7d50183d49ce4b7db187938dc28b1b52", + [ + null, + {} + ] + ], "shared-storage-permissions-policy-default.tentative.https.sub.html": [ "87fcdfe18706bf45617428e3092ebdcc4d070098", [ @@ -675165,6 +676184,29 @@ null, {} ] + ], + "verify-get-undefined.tentative.https.sub.html": [ + "501998bf613687b2ae0b588cd114293001d84990", + [ + null, + {} + ] + ] + }, + "shared-storage-selecturl-limit": { + "run-url-selection-operation-limit-multiple-origins.tentative.https.sub.html": [ + "df69597ee8549f9f3652410c680a09b0f8aacc26", + [ + null, + {} + ] + ], + "run-url-selection-operation-limit.tentative.https.sub.html": [ + "b8f8d5a4bf00f536ce5828aaaaca0a9e3348f352", + [ + null, + {} + ] ] }, "signed-exchange": { @@ -679103,8 +680145,55 @@ } ] ], + "general-addition.any.js": [ + "2562b7064338ee607ee878c7ea111fd1df0830f5", + [ + "streams/piping/general-addition.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "streams/piping/general-addition.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "streams/piping/general-addition.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "streams/piping/general-addition.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ] + ], "general.any.js": [ - "faeb8e321af208543472e2d212c0701faeb09eb6", + "bec3480f65394461dea9cbdda84a5fe4c21e8ed5", [ "streams/piping/general.any.html", { @@ -680507,6 +681596,85 @@ } ] ], + "from.any.js": [ + "04a03545ad5fe3ae18be591d8482cf3590ee02c5", + [ + null, + { + "jsshell": true, + "script_metadata": [ + [ + "global", + "window,worker,jsshell" + ], + [ + "script", + "../resources/test-utils.js" + ] + ] + } + ], + [ + "streams/readable-streams/from.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker,jsshell" + ], + [ + "script", + "../resources/test-utils.js" + ] + ] + } + ], + [ + "streams/readable-streams/from.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker,jsshell" + ], + [ + "script", + "../resources/test-utils.js" + ] + ] + } + ], + [ + "streams/readable-streams/from.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker,jsshell" + ], + [ + "script", + "../resources/test-utils.js" + ] + ] + } + ], + [ + "streams/readable-streams/from.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker,jsshell" + ], + [ + "script", + "../resources/test-utils.js" + ] + ] + } + ] + ], "garbage-collection.any.js": [ "e578176777adafe6ec370be6dd88337af083b3f0", [ @@ -686160,7 +687328,7 @@ ] ], "SVGLength-px.html": [ - "65cf97ce518fb8b20d5601b4d6d62c15ea35c4bb", + "321be5912b84c3ad0df8a68231213311171386d5", [ null, {} @@ -691196,7 +692364,7 @@ ] ], "request-video-frame-callback-webrtc.https.html": [ - "dcf97e4ca9105d7e29e579bdb632db554c525933", + "6a1bdae19efdd0f0eec2d1d07ca9f41435a55659", [ null, {} @@ -698646,6 +699814,13 @@ {} ] ], + "audioworklet-denormals.https.window.js": [ + "39b9be56e6484e78fee1e86d4974ef09ec37b4ca", + [ + "webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.html", + {} + ] + ], "audioworklet-messageport.https.html": [ "546bd1d0d0e34480113290bcc5008f0240be8d4a", [ @@ -699119,7 +700294,7 @@ ] ], "realtime-conv.html": [ - "8668e9d5ac9933cf92c6cc84cb22e24f03b6e045", + "505f0f03f54c6292969a510f7eb643340bbf76e3", [ null, {} @@ -708137,7 +709312,7 @@ ] ], "RTCPeerConnection-insertable-streams-video.https.html": [ - "378520c693759bf95d223706a8b3b34988289335", + "f0dc3c90c104ded6bca7efdc60f340ea5eaac577", [ null, { @@ -708318,7 +709493,7 @@ ] ], "RTCRtpReceiver-jitterBufferTarget-stats.html": [ - "98ebea27e43fe990e521cc0f65e8d780d133bc7c", + "e1d59594426d39ea320d3e139cad635118c9d6be", [ null, { @@ -752518,10 +753693,12 @@ ] ], "key_events.py": [ - "8e1075ddc13f1baa9768c85c69c861957f4a81bb", + "79cecce5cedee5d7a63fdba458dfae590760ee26", [ null, - {} + { + "timeout": "long" + } ] ], "key_modifier.py": [ @@ -752539,7 +753716,7 @@ ] ], "pointer_mouse_modifier.py": [ - "8eec30f1a0ce504684bfacaaa391c0d89032759b", + "ea50951f37849991f44d7725611b227f358e6f10", [ null, {} @@ -754303,7 +755480,7 @@ ] ], "pointer_modifier_click.py": [ - "f3e54288474e829bda1c7311dff547e7b4a82f46", + "803113cceb051dc4ed41bf3c4e9d2c63a7d7576c", [ null, {} diff --git a/tests/wpt/metadata/css/CSS2/syntax/malformed-decl-block-001.xht.ini b/tests/wpt/metadata/css/CSS2/syntax/malformed-decl-block-001.xht.ini new file mode 100644 index 00000000000..ef727f8fcae --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/syntax/malformed-decl-block-001.xht.ini @@ -0,0 +1,2 @@ +[malformed-decl-block-001.xht] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/gap-019.html.ini b/tests/wpt/metadata/css/css-flexbox/gap-019.html.ini new file mode 100644 index 00000000000..b52b65966de --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/gap-019.html.ini @@ -0,0 +1,2 @@ +[gap-019.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-005.html.ini b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-005.html.ini index 094f63989ea..828bc2c1dd8 100644 --- a/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-005.html.ini +++ b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-005.html.ini @@ -19,3 +19,6 @@ [.floating-flexbox 7] expected: FAIL + + [.floating-flexbox 8] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-compat-001.html.ini b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-compat-001.html.ini new file mode 100644 index 00000000000..d15040b1100 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-compat-001.html.ini @@ -0,0 +1,3 @@ +[row-compat-001.html] + [.flex 1] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini new file mode 100644 index 00000000000..a3134e796d0 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-use-cases-001.html.ini @@ -0,0 +1,12 @@ +[row-use-cases-001.html] + [left < right] + expected: FAIL + + [no overflow] + expected: FAIL + + [same widths] + expected: FAIL + + [zero width] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini new file mode 100644 index 00000000000..f8a8e27c760 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html.ini @@ -0,0 +1,2 @@ +[row-wrap-002.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini b/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini index 208aeeba2c0..145587fab93 100644 --- a/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini +++ b/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini @@ -7,3 +7,12 @@ [e.style['flex-flow'\] = "nowrap" should set the property value] expected: FAIL + + [e.style['flex-flow'\] = "row nowrap" should set the property value] + expected: FAIL + + [e.style['flex-flow'\] = "wrap" should set the property value] + expected: FAIL + + [e.style['flex-flow'\] = "row wrap" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/separators.html.ini b/tests/wpt/metadata/css/css-fonts/separators.html.ini new file mode 100644 index 00000000000..bfed625f9ff --- /dev/null +++ b/tests/wpt/metadata/css/css-fonts/separators.html.ini @@ -0,0 +1,2 @@ +[separators.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text-decor/text-combine-emphasis.html.ini b/tests/wpt/metadata/css/css-text-decor/text-combine-emphasis.html.ini new file mode 100644 index 00000000000..38f4d7e7574 --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/text-combine-emphasis.html.ini @@ -0,0 +1,2 @@ +[text-combine-emphasis.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/object-replacement-1.html.ini b/tests/wpt/metadata/css/css-text/white-space/object-replacement-1.html.ini new file mode 100644 index 00000000000..f1928d9dce5 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/object-replacement-1.html.ini @@ -0,0 +1,2 @@ +[object-replacement-1.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/object-replacement-2.html.ini b/tests/wpt/metadata/css/css-text/white-space/object-replacement-2.html.ini new file mode 100644 index 00000000000..8c6e4c62de3 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/object-replacement-2.html.ini @@ -0,0 +1,2 @@ +[object-replacement-2.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-number.html.ini b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-number.html.ini new file mode 100644 index 00000000000..24b3bfe3e9e --- /dev/null +++ b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-number.html.ini @@ -0,0 +1,93 @@ +[calc-infinity-nan-serialize-number.html] + ['calc(NaN)' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(infinity)' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(-infinity)' as a specified value should serialize as 'calc(-infinity)'.] + expected: FAIL + + ['calc(1 * NaN)' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * nan)' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * infinity / infinity)' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * 0 * infinity)' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * (infinity + -infinity))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * (-infinity + infinity))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * (infinity - infinity))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * infinity)' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * -infinity)' as a specified value should serialize as 'calc(-infinity)'.] + expected: FAIL + + ['calc(1 * iNFinIty)' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * (infinity + infinity))' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * (-infinity + -infinity))' as a specified value should serialize as 'calc(-infinity)'.] + expected: FAIL + + ['calc(1 * 1/infinity)' as a specified value should serialize as 'calc(0)'.] + expected: FAIL + + ['calc(1 * infinity * infinity)' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * -infinity * -infinity)' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * max(INFinity*3, 0))' as a specified value should serialize as 'calc(infinity)'.] + expected: FAIL + + ['calc(1 * min(inFInity*4, 0))' as a specified value should serialize as 'calc(0)'.] + expected: FAIL + + ['calc(1 * max(nAn*2, 0))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * min(nan*3, 0))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * clamp(-INFINITY*20, 0, infiniTY*10))' as a specified value should serialize as 'calc(0)'.] + expected: FAIL + + ['calc(1 * max(NaN, min(0,10)))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * clamp(NaN, 0, 10))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * max(0, min(10, NaN)))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * clamp(0, 10, NaN))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * max(0, min(NaN, 10)))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * clamp(0, NaN, 10))' as a specified value should serialize as 'calc(NaN)'.] + expected: FAIL + + ['calc(1 * clamp(-Infinity, 0, infinity))' as a specified value should serialize as 'calc(0)'.] + expected: FAIL + + ['calc(1 * clamp(-inFinity, infinity, 10))' as a specified value should serialize as 'calc(10)'.] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/calc-linear-radial-conic-gradient-001.html.ini b/tests/wpt/metadata/css/css-values/calc-linear-radial-conic-gradient-001.html.ini new file mode 100644 index 00000000000..f32894f9178 --- /dev/null +++ b/tests/wpt/metadata/css/css-values/calc-linear-radial-conic-gradient-001.html.ini @@ -0,0 +1,3 @@ +[calc-linear-radial-conic-gradient-001.html] + [testing background-image: conic-gradient(rgb(0, 128, 0) calc(50% + 10%), rgb(0, 0, 255) calc(60% + 20%))] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/getComputedStyle-calc-mixed-units-002.html.ini b/tests/wpt/metadata/css/css-values/getComputedStyle-calc-mixed-units-002.html.ini new file mode 100644 index 00000000000..3b65d5237ab --- /dev/null +++ b/tests/wpt/metadata/css/css-values/getComputedStyle-calc-mixed-units-002.html.ini @@ -0,0 +1,6 @@ +[getComputedStyle-calc-mixed-units-002.html] + [testing width: calc(5% + 4rem)] + expected: FAIL + + [testing width: calc(8lh + 7px)] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/CustomElementRegistry.html.ini b/tests/wpt/metadata/custom-elements/CustomElementRegistry.html.ini index c6783d08d80..c1a805995be 100644 --- a/tests/wpt/metadata/custom-elements/CustomElementRegistry.html.ini +++ b/tests/wpt/metadata/custom-elements/CustomElementRegistry.html.ini @@ -32,3 +32,12 @@ [customElements.define must not throw when defining another custom element in a different global object during Get(constructor, "prototype")] expected: FAIL + + [customElements.getName must return null when the registry does not contain an entry with the given constructor] + expected: FAIL + + [customElements.getName returns the name of the entry with the given constructor when there is a matching entry.] + expected: FAIL + + [customElements.getName returns the name of the entry with the given customized built in constructor when there is a matching entry.] + expected: FAIL diff --git a/tests/wpt/metadata/dom/parts/basic-dom-part-objects.tentative.html.ini b/tests/wpt/metadata/dom/parts/basic-dom-part-objects.tentative.html.ini new file mode 100644 index 00000000000..f43a4de9c4c --- /dev/null +++ b/tests/wpt/metadata/dom/parts/basic-dom-part-objects.tentative.html.ini @@ -0,0 +1,3 @@ +[basic-dom-part-objects.tentative.html] + [Basic imperative DOM Parts object construction] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini b/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini index e9ab91fc80e..4c1c78640bb 100644 --- a/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini +++ b/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini @@ -1,3 +1,4 @@ [keepalive.any.html] + expected: TIMEOUT [keepalive in onunload in nested frame in another window] expected: FAIL diff --git a/tests/wpt/metadata/fetch/api/cors/cors-keepalive.any.js.ini b/tests/wpt/metadata/fetch/api/cors/cors-keepalive.any.js.ini new file mode 100644 index 00000000000..6801d7d88bd --- /dev/null +++ b/tests/wpt/metadata/fetch/api/cors/cors-keepalive.any.js.ini @@ -0,0 +1,2 @@ +[cors-keepalive.any.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini b/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini index 73c79c76452..f61eb5b8e17 100644 --- a/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini +++ b/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini @@ -1,4 +1,5 @@ [redirect-keepalive.any.html] + expected: TIMEOUT [[keepalive\][new window\][unload\] same-origin redirect] expected: FAIL diff --git a/tests/wpt/metadata/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js.ini new file mode 100644 index 00000000000..9a906b3c7c2 --- /dev/null +++ b/tests/wpt/metadata/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js.ini @@ -0,0 +1,120 @@ +[fenced-frame-subresource-fetch.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers on preflight response.] + expected: FAIL + + [private to local: missing PNA header on preflight response.] + expected: FAIL + + [private to local: missing CORS headers on final response.] + expected: FAIL + + [private to local: success.] + expected: FAIL + + [private to local: PUT success.] + expected: FAIL + + [private to local: no-CORS mode failed preflight.] + expected: FAIL + + [private to local: no-CORS mode missing CORS headers on preflight response.] + expected: FAIL + + [private to local: no-CORS mode missing PNA header on preflight response.] + expected: FAIL + + [private to local: no-CORS mode success.] + expected: FAIL + + [private to private: no preflight required.] + expected: FAIL + + [private to public: no preflight required.] + expected: FAIL + + +[fenced-frame-subresource-fetch.tentative.https.window.html?include=from-local] + [local to local: no preflight required.] + expected: FAIL + + [local to private: no preflight required.] + expected: FAIL + + [local to public: no preflight required.] + expected: FAIL + + +[fenced-frame-subresource-fetch.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers on preflight response.] + expected: FAIL + + [public to local: missing PNA header on preflight response.] + expected: FAIL + + [public to local: missing CORS headers on final response.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to local: PUT success.] + expected: FAIL + + [public to local: no-CORS mode failed preflight.] + expected: FAIL + + [public to local: no-CORS mode missing CORS headers on preflight response.] + expected: FAIL + + [public to local: no-CORS mode missing PNA header on preflight response.] + expected: FAIL + + [public to local: no-CORS mode success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers on preflight response.] + expected: FAIL + + [public to private: missing PNA header on preflight response.] + expected: FAIL + + [public to private: missing CORS headers on final response.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + [public to private: PUT success.] + expected: FAIL + + [public to private: no-CORS mode failed preflight.] + expected: FAIL + + [public to private: no-CORS mode missing CORS headers on preflight response.] + expected: FAIL + + [public to private: no-CORS mode missing PNA header on preflight response.] + expected: FAIL + + [public to private: no-CORS mode success.] + expected: FAIL + + [public to public: no preflight required.] + expected: FAIL + + +[fenced-frame-subresource-fetch.tentative.https.window.html?include=baseline] + [local to public: PUT preflight failure.] + expected: FAIL + + [local to public: PUT preflight success.] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/local-network-access/fenced-frame.tentative.https.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/fenced-frame.tentative.https.window.js.ini new file mode 100644 index 00000000000..5fb3f914e11 --- /dev/null +++ b/tests/wpt/metadata/fetch/local-network-access/fenced-frame.tentative.https.window.js.ini @@ -0,0 +1,87 @@ +[fenced-frame.tentative.https.window.html] + [local to local: no preflight required.] + expected: FAIL + + [local to private: no preflight required.] + expected: FAIL + + [local to public: no preflight required.] + expected: FAIL + + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + + [private to local: failed because fenced frames are incompatible with PNA.] + expected: FAIL + + [private to private: no preflight required.] + expected: FAIL + + [private to public: no preflight required.] + expected: FAIL + + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to local: failed because fenced frames are incompatible with PNA.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + + [public to private: failed because fenced frames are incompatible with PNA.] + expected: FAIL + + [public to public: no preflight required.] + expected: FAIL + + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to local: failed because fenced frames are incompatible with PNA.] + expected: FAIL + + [treat-as-public-address to local (same-origin): fenced frame embedder initiated navigation has opaque origin.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: failed because fenced frames are incompatible with PNA.] + expected: FAIL + + [treat-as-public-address to public: no preflight required.] + expected: FAIL + + [treat-as-public-address to local: optional preflight] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/local-network-access/service-worker-fetch.https.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/service-worker-fetch.https.window.js.ini index 5a84eb882ce..5183e578501 100644 --- a/tests/wpt/metadata/fetch/local-network-access/service-worker-fetch.https.window.js.ini +++ b/tests/wpt/metadata/fetch/local-network-access/service-worker-fetch.https.window.js.ini @@ -44,3 +44,54 @@ [treat-as-public to local (same-origin): no preflight required.] expected: NOTRUN + + +[service-worker-fetch.https.window.html?9-last] + expected: TIMEOUT + [public to public: success.] + expected: TIMEOUT + + [treat-as-public to local: failed preflight.] + expected: NOTRUN + + [treat-as-public to local: success.] + expected: NOTRUN + + [treat-as-public to local (same-origin): no preflight required.] + expected: NOTRUN + + [treat-as-public to private: failed preflight.] + expected: NOTRUN + + [treat-as-public to private: success.] + expected: NOTRUN + + [treat-as-public to public: success.] + expected: NOTRUN + + +[service-worker-fetch.https.window.html?1-8] + expected: TIMEOUT + [local to local: success.] + expected: TIMEOUT + + [private to local: failed preflight.] + expected: NOTRUN + + [private to local: success.] + expected: NOTRUN + + [private to private: success.] + expected: NOTRUN + + [public to local: failed preflight.] + expected: NOTRUN + + [public to local: success.] + expected: NOTRUN + + [public to private: failed preflight.] + expected: NOTRUN + + [public to private: success.] + expected: NOTRUN diff --git a/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini index 847d587e25f..4e03d42d068 100644 --- a/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini +++ b/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini @@ -5,9 +5,6 @@ [private to local: failure.] expected: FAIL - [private to private: success.] - expected: FAIL - [public to local: failure.] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini index eaebad750fe..f2dee7b3ea9 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini @@ -1,7 +1,6 @@ [consecutive-srcdoc.html] - expected: TIMEOUT [changing srcdoc does a replace navigation since the URL is still about:srcdoc] expected: FAIL [changing srcdoc to about:srcdoc#yo then another srcdoc does two push navigations and we can navigate back] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini index ab9ac6e835e..1d68034a37d 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini @@ -1,13 +1,12 @@ [failure-check-sequence.https.html] - expected: TIMEOUT [CSP check precedes COEP check - CSP header first] - expected: NOTRUN + expected: FAIL [COEP check precedes X-Frame-Options check] - expected: NOTRUN + expected: FAIL [CSP check precedes COEP check - COEP header first] - expected: NOTRUN + expected: FAIL [CSP check precedes X-Frame-Options check] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini index 1bca09f21d6..d7ccdbdf676 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini @@ -1,9 +1,10 @@ [iframe-src-aboutblank-navigate-immediately.html] + expected: TIMEOUT [Navigating to a different document with window.open] expected: FAIL [Navigating to a different document with link click] - expected: FAIL + expected: TIMEOUT [Navigating to a different document with form submission] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini index 24d2f8ac554..27889a98fb5 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini @@ -1,3 +1,6 @@ [navigate-to-unparseable-url.html] [location.href setter throws a SyntaxError DOMException for unparseable URLs] expected: FAIL + + [<a> tag navigate fails for unparseable URLs] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini new file mode 100644 index 00000000000..4ecd6d9f753 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini @@ -0,0 +1,3 @@ +[navigation-unload-cross-origin.sub.window.html] + [Cross-origin navigation started from unload handler must be ignored] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini deleted file mode 100644 index 49cc2e16746..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigation-unload-same-origin-fragment.html] - [Tests that a fragment navigation in the unload handler will not block the initial navigation] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini deleted file mode 100644 index 7dc346632a4..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigation-unload-same-origin.window.html] - [Same-origin navigation started from unload handler must be ignored] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini deleted file mode 100644 index 60a4fa51f8a..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[a-click.html] - [aElement.click() before the load event must NOT replace] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini deleted file mode 100644 index f5b7b25324f..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse-during-unload.html] - expected: TIMEOUT - [Traversing the history during unload] - expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/navigate-to-about-blank-while-initial-load-pending.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/navigate-to-about-blank-while-initial-load-pending.html.ini deleted file mode 100644 index de713daa8a0..00000000000 --- a/tests/wpt/metadata/html/browsers/the-window-object/navigate-to-about-blank-while-initial-load-pending.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigate-to-about-blank-while-initial-load-pending.html] - [Navigating to about:blank while window.open initial load pending.] - expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini index 9b27c5c1957..add66c12f92 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini @@ -1,7 +1,6 @@ [update-the-rendering.html] - expected: TIMEOUT ["Flush autofocus candidates" should be happen after the first animation frame callbacks, and before a resize event in the next iteration of window event loop.] expected: TIMEOUT ["Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html.ini index 13e875ae8a3..378802a5adb 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html.ini @@ -18,3 +18,41 @@ [redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclear pattern makes the canvas origin-unclean] expected: NOTRUN + [cross-origin SVGImageElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: TIMEOUT + + [cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: NOTRUN + + [redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: NOTRUN + + [redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: NOTRUN + + [unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: NOTRUN + + [unclean ImageBitmap: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean] + expected: NOTRUN + + [cross-origin HTMLImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [cross-origin SVGImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN + + [unclean ImageBitmap: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean] + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 76e34322dca..6bec7a732b8 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,5 +1,4 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini deleted file mode 100644 index 7682a4830bf..00000000000 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[reparent-form-during-planned-navigation-task.html] - expected: TIMEOUT - [reparent-form-during-planned-navigation-task] - expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html.ini new file mode 100644 index 00000000000..3d995d82235 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html.ini @@ -0,0 +1,9 @@ +[pattern_attribute_v_flag.html] + [<input pattern> supports set difference syntax] + expected: FAIL + + [<input pattern> supports string literal syntax] + expected: FAIL + + [<input pattern> enables the RegExp v flag] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html.ini index 202f48ceee9..c6a7a498152 100644 --- a/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html.ini +++ b/tests/wpt/metadata/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html.ini @@ -7,3 +7,6 @@ [mutually exclusive details across multiple names and multiple tree scopes] expected: FAIL + + [mutation event and toggle event order matches order of insertion in set of named elements] + expected: FAIL diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini deleted file mode 100644 index b8bdf33cb65..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DOMContentLoaded-defer.html] - [The end: DOMContentLoaded and defer scripts] - expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index e55f8f2ce3c..8845054116d 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -3,6 +3,3 @@ expected: TIMEOUT [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT - - [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index 7237f5792de..dbe1def99e3 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,10 +1,9 @@ [promise-job-entry-different-function-realm.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Thenable resolution] expected: FAIL @@ -13,4 +12,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 6ab46a7862c..31bfd644df0 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,5 +1,4 @@ [promise-job-entry.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL @@ -7,7 +6,7 @@ expected: FAIL [Sanity check: this all works as expected with no promises involved] - expected: TIMEOUT + expected: FAIL [Thenable resolution] expected: FAIL diff --git a/tests/wpt/metadata/streams/readable-streams/from.any.js.ini b/tests/wpt/metadata/streams/readable-streams/from.any.js.ini new file mode 100644 index 00000000000..ae4b01974cf --- /dev/null +++ b/tests/wpt/metadata/streams/readable-streams/from.any.js.ini @@ -0,0 +1,171 @@ +[from.any.serviceworker.html] + expected: ERROR + +[from.any.html] + [ReadableStream.from accepts an array of values] + expected: FAIL + + [ReadableStream.from accepts an array of promises] + expected: FAIL + + [ReadableStream.from accepts an array iterator] + expected: FAIL + + [ReadableStream.from accepts a string] + expected: FAIL + + [ReadableStream.from accepts a Set] + expected: FAIL + + [ReadableStream.from accepts a Set iterator] + expected: FAIL + + [ReadableStream.from accepts a sync generator] + expected: FAIL + + [ReadableStream.from accepts an async generator] + expected: FAIL + + [ReadableStream.from accepts a sync iterable of values] + expected: FAIL + + [ReadableStream.from accepts a sync iterable of promises] + expected: FAIL + + [ReadableStream.from accepts an async iterable] + expected: FAIL + + [ReadableStream.from accepts a ReadableStream] + expected: FAIL + + [ReadableStream.from accepts a ReadableStream async iterator] + expected: FAIL + + [ReadableStream.from re-throws errors from calling the @@iterator method] + expected: FAIL + + [ReadableStream.from re-throws errors from calling the @@asyncIterator method] + expected: FAIL + + [ReadableStream.from ignores @@iterator if @@asyncIterator exists] + expected: FAIL + + [ReadableStream.from accepts an empty iterable] + expected: FAIL + + [ReadableStream.from: stream errors when next() rejects] + expected: FAIL + + [ReadableStream.from: stream stalls when next() never settles] + expected: FAIL + + [ReadableStream.from: calls next() after first read()] + expected: FAIL + + [ReadableStream.from: cancelling the returned stream calls and awaits return()] + expected: FAIL + + [ReadableStream.from: return() is not called when iterator completes normally] + expected: FAIL + + [ReadableStream.from: cancel() rejects when return() fulfills with a non-object] + expected: FAIL + + [ReadableStream.from: reader.read() inside next()] + expected: FAIL + + [ReadableStream.from: reader.cancel() inside next()] + expected: FAIL + + [ReadableStream.from: reader.cancel() inside return()] + expected: FAIL + + [ReadableStream.from(array), push() to array while reading] + expected: FAIL + + +[from.any.worker.html] + [ReadableStream.from accepts an array of values] + expected: FAIL + + [ReadableStream.from accepts an array of promises] + expected: FAIL + + [ReadableStream.from accepts an array iterator] + expected: FAIL + + [ReadableStream.from accepts a string] + expected: FAIL + + [ReadableStream.from accepts a Set] + expected: FAIL + + [ReadableStream.from accepts a Set iterator] + expected: FAIL + + [ReadableStream.from accepts a sync generator] + expected: FAIL + + [ReadableStream.from accepts an async generator] + expected: FAIL + + [ReadableStream.from accepts a sync iterable of values] + expected: FAIL + + [ReadableStream.from accepts a sync iterable of promises] + expected: FAIL + + [ReadableStream.from accepts an async iterable] + expected: FAIL + + [ReadableStream.from accepts a ReadableStream] + expected: FAIL + + [ReadableStream.from accepts a ReadableStream async iterator] + expected: FAIL + + [ReadableStream.from re-throws errors from calling the @@iterator method] + expected: FAIL + + [ReadableStream.from re-throws errors from calling the @@asyncIterator method] + expected: FAIL + + [ReadableStream.from ignores @@iterator if @@asyncIterator exists] + expected: FAIL + + [ReadableStream.from accepts an empty iterable] + expected: FAIL + + [ReadableStream.from: stream errors when next() rejects] + expected: FAIL + + [ReadableStream.from: stream stalls when next() never settles] + expected: FAIL + + [ReadableStream.from: calls next() after first read()] + expected: FAIL + + [ReadableStream.from: cancelling the returned stream calls and awaits return()] + expected: FAIL + + [ReadableStream.from: return() is not called when iterator completes normally] + expected: FAIL + + [ReadableStream.from: cancel() rejects when return() fulfills with a non-object] + expected: FAIL + + [ReadableStream.from: reader.read() inside next()] + expected: FAIL + + [ReadableStream.from: reader.cancel() inside next()] + expected: FAIL + + [ReadableStream.from: reader.cancel() inside return()] + expected: FAIL + + [ReadableStream.from(array), push() to array while reading] + expected: FAIL + + +[from.any.sharedworker.html] + expected: ERROR diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini index b7537329068..eed03df37f3 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini @@ -1,5 +1,4 @@ [audiocontext-not-fully-active.html] - expected: TIMEOUT [frame in navigated remote-site frame] expected: FAIL diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js.ini new file mode 100644 index 00000000000..d45bbca0fb1 --- /dev/null +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js.ini @@ -0,0 +1,3 @@ +[audioworklet-denormals.https.window.html] + [Test denormal behavior in AudioWorkletGlobalScope] + expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini new file mode 100644 index 00000000000..c7946fc91b4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini @@ -0,0 +1,4 @@ +[017.html] + expected: TIMEOUT + [origin of the script that invoked the method, about:blank] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini new file mode 100644 index 00000000000..c7946fc91b4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini @@ -0,0 +1,4 @@ +[017.html] + expected: TIMEOUT + [origin of the script that invoked the method, about:blank] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini new file mode 100644 index 00000000000..aa6c9e5b826 --- /dev/null +++ b/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini @@ -0,0 +1,4 @@ +[localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html] + expected: TIMEOUT + [StorageKey: test 3P about:blank window opened from a 3P iframe] + expected: TIMEOUT diff --git a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini new file mode 100644 index 00000000000..80f9a4f15b8 --- /dev/null +++ b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini @@ -0,0 +1,2 @@ +[Worker-constructor.html] + expected: ERROR diff --git a/tests/wpt/web-platform-tests/accessibility/crashtests/hidden-textfield-with-combobox.html b/tests/wpt/web-platform-tests/accessibility/crashtests/hidden-textfield-with-combobox.html new file mode 100644 index 00000000000..e988c6edb9f --- /dev/null +++ b/tests/wpt/web-platform-tests/accessibility/crashtests/hidden-textfield-with-combobox.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<div> + <div role="combobox"> + <input id="textfield" role="textbox" aria-hidden="true" tabindex="-1" aria-readonly="true" aria-label="foo" aria-autocomplete="both"> + <div role="listbox"> + </div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/accessibility/crashtests/map-update-crash.html b/tests/wpt/web-platform-tests/accessibility/crashtests/map-update-crash.html new file mode 100644 index 00000000000..db7c664251a --- /dev/null +++ b/tests/wpt/web-platform-tests/accessibility/crashtests/map-update-crash.html @@ -0,0 +1,18 @@ +<!doctype HTML> +<style> + article::after { + content: url(data:text/plain,test);} +</style> +This test passes if it does not crash. +<img usemap="#map2"> +<map id=map name="map2"> + <command id=command> + <article id=article ></article> + </command> +</map> +<script> +command.appendChild(article); +requestAnimationFrame(() => requestAnimationFrame(() => { + map.style.content = "none"; +})); +</script> diff --git a/tests/wpt/web-platform-tests/attribution-reporting/aggregatable-report-no-contributions.sub.https.html b/tests/wpt/web-platform-tests/attribution-reporting/aggregatable-report-no-contributions.sub.https.html new file mode 100644 index 00000000000..b42a61b7bd5 --- /dev/null +++ b/tests/wpt/web-platform-tests/attribution-reporting/aggregatable-report-no-contributions.sub.https.html @@ -0,0 +1,51 @@ +<!doctype html> +<meta charset=utf-8> +<meta name=timeout content=long> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/attribution-reporting/resources/helpers.js"></script> +<script> +attribution_reporting_promise_test(async t => { + const host = 'https://{{host}}'; + + const expectedSourceEventId = generateSourceEventId(); + const expectedSourceDebugKey = '456'; + const expectedTriggerDebugKey = '654'; + + registerAttributionSrcByImg(createRedirectChain([ + { + cookie: attributionDebugCookie, + source: { + aggregation_keys: { + campaignCounts: '0x159', + }, + debug_key: expectedSourceDebugKey, + destination: host, + source_event_id: expectedSourceEventId, + }, + }, + { + trigger : { + aggregatable_values: { + geoValue: 32768, + }, + debug_key: expectedTriggerDebugKey, + debug_reporting: true, + }, + }, + ])); + + const debugPayload = await pollVerboseDebugReports(); + assert_equals(debugPayload.reports.length, 1); + const debugReport = JSON.parse(debugPayload.reports[0].body); + assert_equals(debugReport.length, 1); + assert_equals(debugReport[0].type, 'trigger-aggregate-no-contributions'); + assert_own_property(debugReport[0], 'body'); + const debugReportBody = debugReport[0].body; + assert_equals(debugReportBody.attribution_destination, host); + assert_equals(debugReportBody.source_event_id, expectedSourceEventId); + assert_equals(debugReportBody.source_site, host); + assert_equals(debugReportBody.source_debug_key, expectedSourceDebugKey); + assert_equals(debugReportBody.trigger_debug_key, expectedTriggerDebugKey); +}, 'Aggregatable report is not created due to no contributions.'); +</script> diff --git a/tests/wpt/web-platform-tests/attribution-reporting/request-format.sub.https.html b/tests/wpt/web-platform-tests/attribution-reporting/request-format.sub.https.html new file mode 100644 index 00000000000..a9e36dd1267 --- /dev/null +++ b/tests/wpt/web-platform-tests/attribution-reporting/request-format.sub.https.html @@ -0,0 +1,66 @@ +<!doctype html> +<meta charset=utf-8> +<meta name=timeout content=long> +<meta name=variant content="?method=a&expected-eligible=navigation-source"> +<meta name=variant content="?method=img&expected-eligible=event-source, trigger"> +<meta name=variant content="?method=img&eligible&expected-eligible=event-source, trigger"> +<meta name=variant content="?method=open&expected-eligible=navigation-source"> +<meta name=variant content="?method=script&expected-eligible=event-source, trigger"> +<meta name=variant content="?method=script&eligible&expected-eligible=event-source, trigger"> +<meta name=variant content="?method=fetch"> +<meta name=variant content='?method=fetch&eligible={"eventSourceEligible":true,"triggerEligible":false}&expected-eligible=event-source'> +<meta name=variant content="?method=xhr"> +<meta name=variant content='?method=xhr&eligible={"eventSourceEligible":true,"triggerEligible":false}&expected-eligible=event-source'> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/helpers.js"></script> +<body> +<script> +const waitForRequest = async () => { + const url = blankURL(); + url.searchParams.set('get-requests', 'true'); + + for (let i = 0; i < 20; i++) { + const resp = await fetch(url); + const payload = await resp.json(); + if (payload !== null && payload.length > 0) { + return payload; + } + await delay(100); + } + throw new Error('Timeout polling requests'); +}; + +const searchParams = new URLSearchParams(location.search); +const expected_eligible = + searchParams.get('expected-eligible') === null ? undefined : searchParams.get('expected-eligible'); + +promise_test(async t => { + // Set mixed-case query params to ensure that they are propagated correctly. + await registerAttributionSrc({ + method: 'variant', + extraQueryParams: {'aB': 'Cd', 'store-request': 'true'}, + }); + + const requests = await waitForRequest(); + assert_equals(requests.length, 1); + assert_equals(requests[0].method, 'GET'); + // TODO(apaseltiner): Check header values once WPT can parse structured dictionaries. + if (expected_eligible) { + assert_own_property(requests[0], 'attribution-reporting-eligible'); + } else { + assert_not_own_property(requests[0], 'attribution-reporting-eligible'); + } + assert_equals(requests[0].referer, location.toString()); + + // TODO(apaseltiner): Test various referrer policies. + // TODO(apaseltiner): Test cookie propagation. + + const expectedURL = blankURL(); + expectedURL.searchParams.set('aB', 'Cd'); + expectedURL.searchParams.set('store-request', 'true'); + assert_equals(requests[0].url, expectedURL.toString()); +}, 'attributionsrc request has the proper format.'); +</script> diff --git a/tests/wpt/web-platform-tests/attribution-reporting/resources/helpers.js b/tests/wpt/web-platform-tests/attribution-reporting/resources/helpers.js new file mode 100644 index 00000000000..488e3b33e3e --- /dev/null +++ b/tests/wpt/web-platform-tests/attribution-reporting/resources/helpers.js @@ -0,0 +1,360 @@ +/** + * Helper functions for attribution reporting API tests. + */ + +const blankURL = (base = location.origin) => new URL('/attribution-reporting/resources/reporting_origin.py', base); + +const attribution_reporting_promise_test = (f, name) => + promise_test(async t => { + await resetWptServer(); + return f(t); + }, name); + +const resetWptServer = () => + Promise + .all([ + resetAttributionReports(eventLevelReportsUrl), + resetAttributionReports(aggregatableReportsUrl), + resetAttributionReports(eventLevelDebugReportsUrl), + resetAttributionReports(aggregatableDebugReportsUrl), + resetAttributionReports(verboseDebugReportsUrl), + resetRegisteredSources(), + ]); + +const eventLevelReportsUrl = + '/.well-known/attribution-reporting/report-event-attribution'; +const eventLevelDebugReportsUrl = + '/.well-known/attribution-reporting/debug/report-event-attribution'; +const aggregatableReportsUrl = + '/.well-known/attribution-reporting/report-aggregate-attribution'; +const aggregatableDebugReportsUrl = + '/.well-known/attribution-reporting/debug/report-aggregate-attribution'; +const verboseDebugReportsUrl = + '/.well-known/attribution-reporting/debug/verbose'; + +const attributionDebugCookie = 'ar_debug=1;Secure;HttpOnly;SameSite=None;Path=/'; + +const pipeHeaderPattern = /[,)]/g; + +// , and ) in pipe values must be escaped with \ +const encodeForPipe = urlString => urlString.replace(pipeHeaderPattern, '\\$&'); + +const blankURLWithHeaders = (headers, origin, status) => { + const url = blankURL(origin); + + const parts = headers.map(h => `header(${h.name},${encodeForPipe(h.value)})`); + + if (status !== undefined) { + parts.push(`status(${encodeForPipe(status)})`); + } + + if (parts.length > 0) { + url.searchParams.set('pipe', parts.join('|')); + } + + return url; +}; + +/** + * Clears the source registration stash. + */ +const resetRegisteredSources = () => { + return fetch(`${blankURL()}?clear-stash=true`); +} + +/** + * Method to clear the stash. Takes the URL as parameter. This could be for + * event-level or aggregatable reports. + */ +const resetAttributionReports = url => { + // The view of the stash is path-specific (https://web-platform-tests.org/tools/wptserve/docs/stash.html), + // therefore the origin doesn't need to be specified. + url = `${url}?clear_stash=true`; + const options = { + method: 'POST', + }; + return fetch(url, options); +}; + +const redirectReportsTo = origin => { + return Promise.all([ + fetch(`${eventLevelReportsUrl}?redirect_to=${origin}`, {method: 'POST'}), + fetch(`${aggregatableReportsUrl}?redirect_to=${origin}`, {method: 'POST'}) + ]); +}; + +const getFetchParams = (origin, cookie) => { + let credentials; + const headers = []; + + if (!origin || origin === location.origin) { + return {credentials, headers}; + } + + // https://fetch.spec.whatwg.org/#http-cors-protocol + + const allowOriginHeader = 'Access-Control-Allow-Origin'; + const allowHeadersHeader = 'Access-Control-Allow-Headers'; + + if (cookie) { + credentials = 'include'; + headers.push({ + name: 'Access-Control-Allow-Credentials', + value: 'true', + }); + headers.push({ + name: allowOriginHeader, + value: `${location.origin}`, + }); + } else { + headers.push({ + name: allowOriginHeader, + value: '*', + }); + headers.push({ + name: allowHeadersHeader, + value: '*', + }) + } + return {credentials, headers}; +}; + +const getDefaultReportingOrigin = () => { + // cross-origin means that the reporting origin differs from the source/destination origin. + const crossOrigin = new URLSearchParams(location.search).get('cross-origin'); + return crossOrigin === null ? location.origin : get_host_info().HTTPS_REMOTE_ORIGIN; +}; + +const createRedirectChain = (redirects) => { + let redirectTo; + + for (let i = redirects.length - 1; i >= 0; i--) { + const {source, trigger, cookie, reportingOrigin} = redirects[i]; + const headers = []; + + if (source) { + headers.push({ + name: 'Attribution-Reporting-Register-Source', + value: JSON.stringify(source), + }); + } + + if (trigger) { + headers.push({ + name: 'Attribution-Reporting-Register-Trigger', + value: JSON.stringify(trigger), + }); + } + + if (cookie) { + headers.push({name: 'Set-Cookie', value: cookie}); + } + + let status; + if (redirectTo) { + headers.push({name: 'Location', value: redirectTo.toString()}); + status = '302'; + } + + redirectTo = blankURLWithHeaders( + headers, reportingOrigin || getDefaultReportingOrigin(), status); + } + + return redirectTo; +}; + +const registerAttributionSrcByImg = (attributionSrc) => { + const element = document.createElement('img'); + element.attributionSrc = attributionSrc; +}; + +const registerAttributionSrc = async ({ + source, + trigger, + cookie, + method = 'img', + extraQueryParams = {}, + reportingOrigin, +}) => { + const searchParams = new URLSearchParams(location.search); + + if (method === 'variant') { + method = searchParams.get('method'); + } + + const eligible = searchParams.get('eligible'); + + let headers = []; + + if (source) { + headers.push({ + name: 'Attribution-Reporting-Register-Source', + value: JSON.stringify(source), + }); + } + + if (trigger) { + headers.push({ + name: 'Attribution-Reporting-Register-Trigger', + value: JSON.stringify(trigger), + }); + } + + if (cookie) { + const name = 'Set-Cookie'; + headers.push({name, value: cookie}); + } + + + let credentials; + if (method === 'fetch') { + const params = getFetchParams(reportingOrigin, cookie); + credentials = params.credentials; + headers = headers.concat(params.headers); + } + + const url = blankURLWithHeaders(headers, reportingOrigin); + + Object.entries(extraQueryParams) + .forEach(([key, value]) => url.searchParams.set(key, value)); + + switch (method) { + case 'img': + const img = document.createElement('img'); + if (eligible === null) { + img.attributionSrc = url; + } else { + await new Promise(resolve => { + img.onload = resolve; + // Since the resource being fetched isn't a valid image, onerror will + // be fired, but the browser will still process the + // attribution-related headers, so resolve the promise instead of + // rejecting. + img.onerror = resolve; + img.attributionSrc = ''; + img.src = url; + }); + } + return 'event'; + case 'script': + const script = document.createElement('script'); + if (eligible === null) { + script.attributionSrc = url; + } else { + await new Promise(resolve => { + script.onload = resolve; + script.attributionSrc = ''; + script.src = url; + document.body.appendChild(script); + }); + } + return 'event'; + case 'a': + const a = document.createElement('a'); + a.target = '_blank'; + a.textContent = 'link'; + if (eligible === null) { + a.attributionSrc = url; + a.href = blankURL(); + } else { + a.attributionSrc = ''; + a.href = url; + } + document.body.appendChild(a); + await test_driver.click(a); + return 'navigation'; + case 'open': + await test_driver.bless('open window', () => { + if (eligible === null) { + open( + blankURL(), '_blank', + `attributionsrc=${encodeURIComponent(url)}`); + } else { + open(url, '_blank', 'attributionsrc'); + } + }); + return 'navigation'; + case 'fetch': { + let attributionReporting; + if (eligible !== null) { + attributionReporting = JSON.parse(eligible); + } + await fetch(url, {credentials, attributionReporting}); + return 'event'; + } + case 'xhr': + await new Promise((resolve, reject) => { + const req = new XMLHttpRequest(); + req.open('GET', url); + if (eligible !== null) { + req.setAttributionReporting(JSON.parse(eligible)); + } + req.onload = resolve; + req.onerror = () => reject(req.statusText); + req.send(); + }); + return 'event'; + default: + throw `unknown method "${method}"`; + } +}; + + +/** + * Generates a random pseudo-unique source event id. + */ +const generateSourceEventId = () => { + return `${Math.round(Math.random() * 10000000000000)}`; +} + +/** + * Delay method that waits for prescribed number of milliseconds. + */ +const delay = ms => new Promise(resolve => step_timeout(resolve, ms)); + +/** + * Method that polls a particular URL for reports. Once reports + * are received, returns the payload as promise. Returns null if the + * timeout is reached before a report is available. + */ +const pollAttributionReports = async (url, origin = location.origin, timeout = 60 * 1000 /*ms*/) => { + let startTime = performance.now(); + while (performance.now() - startTime < timeout) { + const resp = await fetch(new URL(url, origin)); + const payload = await resp.json(); + if (payload.reports.length > 0) { + return payload; + } + await delay(/*ms=*/ 100); + } + return null; +}; + +// Verbose debug reporting must have been enabled on the source registration for this to work. +const waitForSourceToBeRegistered = async (sourceId, reportingOrigin) => { + const debugReportPayload = await pollVerboseDebugReports(reportingOrigin); + assert_equals(debugReportPayload.reports.length, 1); + const debugReport = JSON.parse(debugReportPayload.reports[0].body); + assert_equals(debugReport.length, 1); + assert_equals(debugReport[0].type, 'source-success'); + assert_equals(debugReport[0].body.source_event_id, sourceId); +}; + +const pollEventLevelReports = (origin) => + pollAttributionReports(eventLevelReportsUrl, origin); +const pollEventLevelDebugReports = (origin) => + pollAttributionReports(eventLevelDebugReportsUrl, origin); +const pollAggregatableReports = (origin) => + pollAttributionReports(aggregatableReportsUrl, origin); +const pollAggregatableDebugReports = (origin) => + pollAttributionReports(aggregatableDebugReportsUrl, origin); +const pollVerboseDebugReports = (origin) => + pollAttributionReports(verboseDebugReportsUrl, origin); + +const validateReportHeaders = headers => { + assert_array_equals(headers['content-type'], ['application/json']); + assert_array_equals(headers['cache-control'], ['no-cache']); + assert_own_property(headers, 'user-agent'); + assert_not_own_property(headers, 'cookie'); + assert_not_own_property(headers, 'referer'); +}; diff --git a/tests/wpt/web-platform-tests/attribution-reporting/resources/reporting_origin.py b/tests/wpt/web-platform-tests/attribution-reporting/resources/reporting_origin.py new file mode 100644 index 00000000000..4a5877035e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/attribution-reporting/resources/reporting_origin.py @@ -0,0 +1,65 @@ +"""Test reporting origin server used for two reasons: + + 1. It is a workaround for lack of preflight support in the test server. + 2. Stashes requests so they can be inspected by tests. +""" + +from wptserve.stash import Stash +import json + +REQUESTS = "9250f93f-2c05-4aae-83b9-2817b0e18b4d" + + +headers = [ + b"attribution-reporting-eligible", + b"attribution-reporting-support", + b"referer", +] + + +def store_request(request) -> None: + obj = { + "method": request.method, + "url": request.url, + } + for header in headers: + value = request.headers.get(header) + if value is not None: + obj[str(header, "utf-8")] = str(value, "utf-8") + with request.server.stash.lock: + requests = request.server.stash.take(REQUESTS) + if not requests: + requests = [] + requests.append(obj) + request.server.stash.put(REQUESTS, requests) + return None + + +def get_requests(request) -> str: + with request.server.stash.lock: + return json.dumps(request.server.stash.take(REQUESTS)) + + +def main(request, response): + """ + For most requests, simply returns a 200. Actual source/trigger registration + headers are piped using the `pipe` query param. + + If a `clear-stash` param is set, it will clear the stash. + """ + if request.GET.get(b"clear-stash"): + request.stash.take(REQUESTS) + return + + # We dont want to redirect preflight requests. The cors headers are piped + # so we can simply return a 200 and redirect the following request + if request.method == "OPTIONS": + response.status = 200 + return + + if request.GET.get(b"get-requests"): + return get_requests(request) + + if request.GET.get(b"store-request"): + store_request(request) + return "" diff --git a/tests/wpt/web-platform-tests/attribution-reporting/simple-verbose-debug-report.sub.https.html b/tests/wpt/web-platform-tests/attribution-reporting/simple-verbose-debug-report.sub.https.html new file mode 100644 index 00000000000..8a477f732f4 --- /dev/null +++ b/tests/wpt/web-platform-tests/attribution-reporting/simple-verbose-debug-report.sub.https.html @@ -0,0 +1,32 @@ +<!doctype html> +<meta charset=utf-8> +<meta name=timeout content=long> +<script src="/common/get-host-info.sub.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/attribution-reporting/resources/helpers.js"></script> +<script> +attribution_reporting_promise_test(async t => { + const expectedTriggerDebugKey = '456'; + + registerAttributionSrcByImg(createRedirectChain([ + { + cookie: attributionDebugCookie, + trigger: { + debug_reporting: true, + debug_key: expectedTriggerDebugKey, + event_trigger_data: [{}], + }, + }, + ])); + + const payload = await pollVerboseDebugReports(); + assert_equals(payload.reports.length, 1); + const report = JSON.parse(payload.reports[0].body); + assert_equals(report.length, 1); + assert_equals(report[0].type, 'trigger-no-matching-source'); + assert_own_property(report[0], 'body'); + assert_equals(report[0].body.attribution_destination, 'https://{{host}}'); + assert_equals(report[0].body.trigger_debug_key, expectedTriggerDebugKey); +}, 'Verbose debug report is received.'); +</script> diff --git a/tests/wpt/web-platform-tests/common/media.js b/tests/wpt/web-platform-tests/common/media.js index f2dc8612660..800593f5343 100644 --- a/tests/wpt/web-platform-tests/common/media.js +++ b/tests/wpt/web-platform-tests/common/media.js @@ -9,10 +9,15 @@ function getVideoURI(base) var videotag = document.createElement("video"); - if ( videotag.canPlayType && - videotag.canPlayType('video/ogg; codecs="theora, vorbis"') ) + if ( videotag.canPlayType ) { - extension = '.ogv'; + if (videotag.canPlayType('video/webm; codecs="vp9, opus"') ) + { + extension = '.webm'; + } else if ( videotag.canPlayType('video/ogg; codecs="theora, vorbis"') ) + { + extension = '.ogv'; + } } return base + extension; @@ -46,10 +51,11 @@ function getAudioURI(base) function getMediaContentType(url) { var extension = new URL(url, location).pathname.split(".").pop(); var map = { - "mp4": "video/mp4", - "ogv": "application/ogg", - "mp3": "audio/mp3", - "oga": "application/ogg", + "mp4" : "video/mp4", + "ogv" : "application/ogg", + "webm": "video/webm", + "mp3" : "audio/mp3", + "oga" : "application/ogg", }; return map[extension]; } diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-cross-origin-policy.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-cross-origin-policy.https.html index 808b7f6ea77..b2a68b00c8e 100644 --- a/tests/wpt/web-platform-tests/credential-management/fedcm-cross-origin-policy.https.html +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-cross-origin-policy.https.html @@ -7,11 +7,11 @@ <body> <script type="module"> -import {default_request_options, +import {request_options_with_mediation_required, fedcm_test} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - const cred = await navigator.credentials.get(default_request_options()); + const cred = await navigator.credentials.get(request_options_with_mediation_required()); assert_equals(cred.token, 'token'); }, 'Test that COEP policy do not apply to FedCM requests'); diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-csp.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-csp.https.html index 59c97e8c38f..59257414383 100644 --- a/tests/wpt/web-platform-tests/credential-management/fedcm-csp.https.html +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-csp.https.html @@ -7,10 +7,12 @@ <body> <script type="module"> -import {default_request_options, fedcm_test, set_fedcm_cookie} from './support/fedcm-helper.sub.js'; +import {request_options_with_mediation_required, + fedcm_test, + set_fedcm_cookie} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - const cred = navigator.credentials.get(default_request_options()); + const cred = navigator.credentials.get(request_options_with_mediation_required()); return promise_rejects_dom(t, "NetworkError", cred); }, "Provider configURL should honor Content-Security-Policy."); diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-loginhint.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-loginhint.https.html new file mode 100644 index 00000000000..6db67138167 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-loginhint.https.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Federated Credential Management API login hint tests.</title> +<link rel="help" href="https://fedidcg.github.io/FedCM"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> +<body> + +<script type="module"> +import {fedcm_test, + request_options_with_login_hint, + select_manifest} from './support/fedcm-helper.sub.js'; + +fedcm_test(async t => { + let options = request_options_with_login_hint('manifest.py', 'nomatch'); + const cred = navigator.credentials.get(options); + return promise_rejects_dom(t, "NetworkError", cred); +}, "No login hint matches an account."); + +fedcm_test(async t => { + let options = request_options_with_login_hint('manifest.py', 'john_doe'); + const cred = await navigator.credentials.get(options); + assert_equals(cred.token, 'token'); +}, "Login hint matches an account."); + +fedcm_test(async t => { + let options = request_options_with_login_hint('manifest_with_two_accounts.json', 'john_doe'); + await select_manifest(t, options); + + const cred = await navigator.credentials.get(options); + assert_equals(cred.token, 'account_id=john_doe'); +}, "Login hint matches an account from two accounts."); +</script> diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html index 62c0791ab48..0084c8b0cfe 100644 --- a/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html @@ -8,10 +8,9 @@ <body> <script type="module"> -import {alt_manifest_origin, - default_request_options, - default_alt_request_options, - request_options_with_auto_reauthn, +import {request_options_with_mediation_required, + alt_request_options_with_mediation_required, + request_options_with_mediation_optional, fedcm_test, select_manifest, set_fedcm_cookie} from './support/fedcm-helper.sub.js'; @@ -25,24 +24,14 @@ function loadUrlInIframe(url) { }); } -async function createIframeWithPermissionPolicyAndWaitForMessage(test, iframeUrl) { - const messageWatcher = new EventWatcher(test, window, "message"); - let iframe = document.createElement("iframe"); - iframe.src = iframeUrl; - iframe.allow = "identity-credentials-get"; - document.body.appendChild(iframe); - const message = await messageWatcher.wait_for("message"); - return message.data; -} - fedcm_test(async t => { - const cred = await navigator.credentials.get(default_request_options()); + const cred = await navigator.credentials.get(request_options_with_mediation_required()); assert_equals(cred.token, "token"); }, "Successfully obtaining token should resolve the promise."); fedcm_test(async t => { - const first = navigator.credentials.get(default_request_options()); - const second = navigator.credentials.get(default_alt_request_options()); + const first = navigator.credentials.get(request_options_with_mediation_required()); + const second = navigator.credentials.get(alt_request_options_with_mediation_required()); // We have to call promise_rejects_dom here, because if we call it after // the promise gets rejected, the unhandled rejection event handler is called @@ -57,35 +46,35 @@ fedcm_test(async t => { "When there's a pending request, a second `get` call should be rejected. "); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); test_options.identity.providers = []; const cred = navigator.credentials.get(test_options); return promise_rejects_js(t, TypeError, cred); }, "Reject when provider list is empty"); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); delete test_options.identity.providers[0].configURL; const cred = navigator.credentials.get(test_options); return promise_rejects_js(t, TypeError, cred); }, "Reject when configURL is missing" ); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); test_options.identity.providers[0].configURL = 'test'; const cred = navigator.credentials.get(test_options); return promise_rejects_dom(t, "InvalidStateError", cred); }, "Reject when configURL is invalid"); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); test_options.identity.providers[0].clientId = ''; const cred = navigator.credentials.get(test_options); return promise_rejects_dom(t, "InvalidStateError", cred); }, "Reject when clientId is empty"); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); assert_true("nonce" in test_options.identity.providers[0]); delete test_options.identity.providers[0].nonce; const cred = await navigator.credentials.get(test_options); @@ -93,7 +82,7 @@ fedcm_test(async t => { }, "nonce is not required in FederatedIdentityProvider."); fedcm_test(async t => { - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); delete test_options.identity.providers[0].clientId; const cred = navigator.credentials.get(test_options); return promise_rejects_js(t, TypeError, cred); @@ -101,7 +90,7 @@ fedcm_test(async t => { fedcm_test(async t => { let controller = new AbortController(); - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); test_options.signal = controller.signal; const cred = navigator.credentials.get(test_options); controller.abort(); @@ -110,24 +99,24 @@ fedcm_test(async t => { fedcm_test(async t => { let controller = new AbortController(); - let test_options = default_request_options(); + let test_options = request_options_with_mediation_required(); test_options.signal = controller.signal; const first_cred = navigator.credentials.get(test_options); controller.abort(); await promise_rejects_dom(t, 'AbortError', first_cred); - const second_cred = await navigator.credentials.get(default_request_options()); + const second_cred = await navigator.credentials.get(request_options_with_mediation_required()); assert_equals(second_cred.token, "token"); }, "Get after abort should work"); fedcm_test(async t => { - let test_options = default_request_options('manifest-not-in-list.json'); + let test_options = request_options_with_mediation_required('manifest-not-in-list.json'); const cred = navigator.credentials.get(test_options); return promise_rejects_dom(t, 'NetworkError', cred); }, 'Test that the promise is rejected if the manifest is not in the manifest list'); fedcm_test(async t => { - let test_options = default_request_options("manifest_redirect_accounts.json"); + let test_options = request_options_with_mediation_required("manifest_redirect_accounts.json"); await select_manifest(t, test_options); const cred = navigator.credentials.get(test_options); @@ -137,7 +126,7 @@ fedcm_test(async t => { // legitimate IDP in order to get the list of user accounts. fedcm_test(async t => { - let test_options = default_request_options("manifest_redirect_token.json"); + let test_options = request_options_with_mediation_required("manifest_redirect_token.json"); await select_manifest(t, test_options); const cred = navigator.credentials.get(test_options); @@ -151,7 +140,7 @@ fedcm_test(async t => { const clear_metadata_count_path = `support/fedcm/client_metadata_clear_count.py`; await fetch(clear_metadata_count_path); - const cred = await navigator.credentials.get(default_request_options()); + const cred = await navigator.credentials.get(request_options_with_mediation_required()); assert_equals(cred.token, "token"); await new Promise(resolve => { @@ -193,7 +182,7 @@ fedcm_test(async t => { assert_equals(query_sw_iframe.contentDocument.body.textContent, "1"); await set_fedcm_cookie(); - const cred = await navigator.credentials.get(default_request_options()); + const cred = await navigator.credentials.get(request_options_with_mediation_required()); assert_equals(cred.token, "token"); // Use cache buster query parameter to avoid cached response. @@ -202,57 +191,14 @@ fedcm_test(async t => { }, 'Test that service worker cannot observe fetches performed by FedCM API'); fedcm_test(async t => { - const cred = await navigator.credentials.get(default_alt_request_options()); - assert_equals(cred.token, "token"); - - const iframe_in_idp_scope = `${alt_manifest_origin}/\ -credential-management/support/fedcm/userinfo-iframe.html`; - const message = await createIframeWithPermissionPolicyAndWaitForMessage(t, iframe_in_idp_scope); - assert_equals(message.result, "Pass"); - assert_equals(message.numAccounts, 1); - assert_equals(message.firstAccountEmail, "john_doe@idp.example"); - assert_equals(message.firstAccountName, "John Doe"); - assert_equals(message.firstAccountGivenName, "John"); - assert_equals(message.firstAccountPicture, "https://idp.example/profile/123"); -}, 'Test basic User InFo API flow'); - -fedcm_test(async t => { - const cred = await navigator.credentials.get(default_alt_request_options()); - assert_equals(cred.token, "token"); - - const iframe_in_idp_scope = `support/fedcm/userinfo-iframe.html`; - const message = await createIframeWithPermissionPolicyAndWaitForMessage(t, iframe_in_idp_scope); - assert_equals(message.result, "Fail"); -}, 'Test that User Info API only works when invoked from iframe that is same origin as the IDP'); - -fedcm_test(async t => { - const cred = await navigator.credentials.get(default_alt_request_options()); - assert_equals(cred.token, "token"); - - try { - const manifest_path = `${alt_manifest_origin}/\ -credential-management/support/fedcm/manifest.py`; - const user_info = await IdentityProvider.getUserInfo({ - configURL: manifest_path, - // Approved client - clientId: '123', - }); - assert_unreached("Failure message"); - } catch (error) { - assert_equals(error.message, "UserInfo request must be initiated from a frame that is the same origin with the provider."); - // Expect failure - } -}, 'Test that User Info API does not work in the top frame'); - -fedcm_test(async t => { - let test_options = request_options_with_auto_reauthn("manifest_with_single_account.json"); + let test_options = request_options_with_mediation_optional("manifest_with_single_account.json"); await select_manifest(t, test_options); // Signs in john_doe so that they will be a returning user let cred = await navigator.credentials.get(test_options); assert_equals(cred.token, "account_id=john_doe"); - test_options = request_options_with_auto_reauthn("manifest_with_two_accounts.json"); + test_options = request_options_with_mediation_optional("manifest_with_two_accounts.json"); await select_manifest(t, test_options); // There are two accounts "Jane" and "John" returned in that order. Without diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-userinfo.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-userinfo.https.html new file mode 100644 index 00000000000..ff5e432c747 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-userinfo.https.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<title>Federated Credential Management API getUserInfo() tests.</title> +<link rel="help" href="https://fedidcg.github.io/FedCM"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> + +<script type="module"> +import {alt_manifest_origin, + alt_request_options_with_mediation_required, + fedcm_test} from './support/fedcm-helper.sub.js'; + +async function createIframeWithPermissionPolicyAndWaitForMessage(test, iframeUrl) { + const messageWatcher = new EventWatcher(test, window, "message"); + let iframe = document.createElement("iframe"); + iframe.src = iframeUrl; + iframe.allow = "identity-credentials-get"; + document.body.appendChild(iframe); + const message = await messageWatcher.wait_for("message"); + return message.data; +} + +fedcm_test(async t => { + const cred = await navigator.credentials.get(alt_request_options_with_mediation_required()); + assert_equals(cred.token, "token"); + + const iframe_in_idp_scope = `${alt_manifest_origin}/\ +credential-management/support/fedcm/userinfo-iframe.html`; + const message = await createIframeWithPermissionPolicyAndWaitForMessage(t, iframe_in_idp_scope); + assert_equals(message.result, "Pass"); + assert_equals(message.numAccounts, 1); + assert_equals(message.firstAccountEmail, "john_doe@idp.example"); + assert_equals(message.firstAccountName, "John Doe"); + assert_equals(message.firstAccountGivenName, "John"); + assert_equals(message.firstAccountPicture, "https://idp.example/profile/123"); +}, 'Test basic User InFo API flow'); + +fedcm_test(async t => { + const cred = await navigator.credentials.get(alt_request_options_with_mediation_required()); + assert_equals(cred.token, "token"); + + const iframe_in_idp_scope = `support/fedcm/userinfo-iframe.html`; + const message = await createIframeWithPermissionPolicyAndWaitForMessage(t, iframe_in_idp_scope); + assert_equals(message.result, "Fail"); +}, 'Test that User Info API only works when invoked from iframe that is same origin as the IDP'); + +fedcm_test(async t => { + const cred = await navigator.credentials.get(alt_request_options_with_mediation_required()); + assert_equals(cred.token, "token"); + + try { + const manifest_path = `${alt_manifest_origin}/\ +credential-management/support/fedcm/manifest.py`; + const user_info = await IdentityProvider.getUserInfo({ + configURL: manifest_path, + // Approved client + clientId: '123', + }); + assert_unreached("Failure message"); + } catch (error) { + assert_equals(error.message, "UserInfo request must be initiated from a frame that is the same origin with the provider."); + // Expect failure + } +}, 'Test that User Info API does not work in the top frame'); + +</script> diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm-helper.sub.js b/tests/wpt/web-platform-tests/credential-management/support/fedcm-helper.sub.js index a4d48633f83..270ac1d743a 100644 --- a/tests/wpt/web-platform-tests/credential-management/support/fedcm-helper.sub.js +++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm-helper.sub.js @@ -29,7 +29,7 @@ export function set_alt_fedcm_cookie() { // Returns FedCM CredentialRequestOptions for which navigator.credentials.get() // succeeds. -export function default_request_options(manifest_filename) { +export function request_options_with_mediation_required(manifest_filename) { if (manifest_filename === undefined) { manifest_filename = "manifest.py"; } @@ -40,15 +40,16 @@ credential-management/support/fedcm/${manifest_filename}`; providers: [{ configURL: manifest_path, clientId: '1', - nonce: '2', + nonce: '2' }] - } + }, + mediation: 'required' }; } // Returns alternate FedCM CredentialRequestOptions for which navigator.credentials.get() // succeeds. -export function default_alt_request_options(manifest_filename) { +export function alt_request_options_with_mediation_required(manifest_filename) { if (manifest_filename === undefined) { manifest_filename = "manifest.py"; } @@ -59,19 +60,20 @@ credential-management/support/fedcm/${manifest_filename}`; providers: [{ configURL: manifest_path, clientId: '1', - nonce: '2', + nonce: '2' }] - } + }, + mediation: 'required' }; } // Returns FedCM CredentialRequestOptions with auto re-authentication. // succeeds. -export function request_options_with_auto_reauthn(manifest_filename) { - let options = default_request_options(manifest_filename); +export function request_options_with_mediation_optional(manifest_filename) { + let options = alt_request_options_with_mediation_required(manifest_filename); // Approved client options.identity.providers[0].clientId = '123'; - options.identity.autoReauthn = true; + options.mediation = 'optional'; return options; } @@ -108,3 +110,10 @@ export function select_manifest(test, test_options) { const manifest_url = test_options.identity.providers[0].configURL; return select_manifest_impl(manifest_url); } + +export function request_options_with_login_hint(manifest_filename, login_hint) { + let options = request_options_with_mediation_required(manifest_filename); + options.identity.providers[0].loginHint = login_hint; + + return options; +} diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm-iframe.html b/tests/wpt/web-platform-tests/credential-management/support/fedcm-iframe.html index c57f54e1dad..f830b4f9124 100644 --- a/tests/wpt/web-platform-tests/credential-management/support/fedcm-iframe.html +++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm-iframe.html @@ -1,6 +1,6 @@ <!doctype html> <script type="module"> -import {default_request_options} from './fedcm-helper.sub.js'; +import {request_options_with_mediation_required} from './fedcm-helper.sub.js'; // Loading fedcm-iframe.html in the test will make a FedCM call on load, and // trigger a postMessage upon completion. @@ -13,7 +13,7 @@ import {default_request_options} from './fedcm-helper.sub.js'; window.onload = async () => { try { - const cred = await navigator.credentials.get(default_request_options()); + const cred = await navigator.credentials.get(request_options_with_mediation_required()); window.top.postMessage({result: "Pass", token: cred.token}, '*'); } catch (error) { window.top.postMessage({result: "Fail", errorType: error.name}, '*'); diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm/accounts.py b/tests/wpt/web-platform-tests/credential-management/support/fedcm/accounts.py index 3dbc7403dc2..11c1c32b61a 100644 --- a/tests/wpt/web-platform-tests/credential-management/support/fedcm/accounts.py +++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm/accounts.py @@ -20,7 +20,8 @@ def main(request, response): "name": "John Doe", "email": "john_doe@idp.example", "picture": "https://idp.example/profile/123", - "approved_clients": ["123", "456", "789"] + "approved_clients": ["123", "456", "789"], + "login_hints": ["john_doe"] }] } """ diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm/two_accounts.py b/tests/wpt/web-platform-tests/credential-management/support/fedcm/two_accounts.py index 48451740663..97ee92f6760 100644 --- a/tests/wpt/web-platform-tests/credential-management/support/fedcm/two_accounts.py +++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm/two_accounts.py @@ -29,7 +29,8 @@ def main(request, response): "name": "John Doe", "email": "john_doe@idp.example", "picture": "https://idp.example/profile/123", - "approved_clients": ["123", "456", "789"] + "approved_clients": ["123", "456", "789"], + "login_hints": ["john_doe"] } ] } diff --git a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002-ref.xht b/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002-ref.xht deleted file mode 100644 index 9328c8bee3e..00000000000 --- a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002-ref.xht +++ /dev/null @@ -1,16 +0,0 @@ -<!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"> -<head> -<title>CSS Reftest Reference</title> -<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/> -<style type="text/css"> -p.test { - color: green; -} -</style> -</head> -<body> -<p>There must be no red.</p> -<p class="test">This sentence must be green.</p> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002.xht b/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002.xht deleted file mode 100644 index 606b7aa9f43..00000000000 --- a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-002.xht +++ /dev/null @@ -1,24 +0,0 @@ -<!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" lang="en"> - <head> - <title>CSS Test: Nested blocks in unexpected places</title> - <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> - <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/002.html" type="text/html"/> - <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" /> - <link rel="match" href="core-syntax-002-ref.xht"/> - <meta name="flags" content="invalid" /> - <style type="text/css"> - .instruct { color: black; background: white; } - p { - color: green; - /* no "}" */ - span { color: yellow; background: red; } - .test { color: maroon; background: yellow; } - } - </style> - </head> - <body> - <p class="instruct">There must be no red.</p> - <p>This sentence <span>must</span> be <span class="test">green</span>.</p> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-003.xht b/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-003.xht deleted file mode 100644 index 11c5675d773..00000000000 --- a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-003.xht +++ /dev/null @@ -1,15 +0,0 @@ -<!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" lang="en"> - <head> - <title>CSS Test: Nested blocks in unexpected places (with no whitespace)</title> - <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> - <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/003.html" type="text/html"/> - <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" /> - <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/> - <meta name="flags" content="invalid" /> - <style type="text/css">p{color:green;/*no"}"*/span{color:yellow;background:red;}.test{color:maroon;background:yellow;}}</style> - </head> - <body> - <p>This text <span>should</span> be <span class="test">green</span>.</p> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-004.xht b/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-004.xht deleted file mode 100644 index 830017c7c58..00000000000 --- a/tests/wpt/web-platform-tests/css/CSS2/syntax/core-syntax-004.xht +++ /dev/null @@ -1,18 +0,0 @@ -<!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" lang="en"> - <head> - <title>CSS Test: Nested blocks in unexpected places (with no whitespace)</title> - <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> - <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/002-demo.html" type="text/html"/> - <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" /> - <link rel="match" href="../reference/ref-this-text-should-be-green.xht"/> - <meta name="flags" content="invalid" /> - <style type="text/css"> - body { color : green ; p{color : red ; } - span { color : red ; } - </style> - </head> - <body> - <p>This <span>text</span> should be <span>green</span>.</p> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/CSS2/syntax/malformed-decl-block-001.xht b/tests/wpt/web-platform-tests/css/CSS2/syntax/malformed-decl-block-001.xht index 2f375caafa1..8e389615cec 100644 --- a/tests/wpt/web-platform-tests/css/CSS2/syntax/malformed-decl-block-001.xht +++ b/tests/wpt/web-platform-tests/css/CSS2/syntax/malformed-decl-block-001.xht @@ -17,7 +17,7 @@ #p3 {@foo {color: red} color: green} #p4 {12; color: green} #p5 {color: green; 12 color: red} - #p6 {color: green; 12 @page {color: red} color: red} + #p6 {color: orange; 12 @page {color: red} color: green} #p7 {@foo {color: red}; color: green} </style> </head> diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/datatypes-alt-255uint16-001.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/datatypes-alt-255uint16-001.woff2 Binary files differindex ab0d8873e9d..4943071f154 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/datatypes-alt-255uint16-001.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/datatypes-alt-255uint16-001.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-001.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-001.woff2 Binary files differindex 72fae4dcb5e..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-001.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-001.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-002.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-002.woff2 Binary files differindex 72fae4dcb5e..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-002.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/tabledata-transform-hmtx-002.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-005.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-005.woff2 Binary files differindex 72fae4dcb5e..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-005.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-005.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-006.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-006.woff2 Binary files differindex 15d1ce2a877..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-006.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-006.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-007.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-007.woff2 Binary files differindex 61f2b8f47b1..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-007.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-007.woff2 diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-008.woff2 b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-008.woff2 Binary files differindex dda80b1592d..da5a794ef35 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/valid-008.woff2 +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/valid-008.woff2 diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-auto-001.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-auto-001.html new file mode 100644 index 00000000000..b5e19522b00 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-auto-001.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<title>Tests automatic anchor positioning without fallbacks</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-auto"> +<link rel="auto" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script src="support/test-common.js"></script> + +<style> +body { + margin: 0; +} + +#cb { + position: absolute; + width: 500px; + height: 500px; +} + +#anchor { + margin-left: 150px; + margin-top: 250px; + width: 100px; + height: 100px; + background: orange; + anchor-name: --a; +} + +.target { + position: absolute; + width: 100px; + height: 100px; + background: lime; +} + +#target1 { + top: anchor(--a auto); /* should evaluate to `bottom` */ + left: anchor(--a auto-same); /* should evaluate to `left` */ +} + +#target2 { + bottom: anchor(--a auto); /* should evaluate to `top` */ + right: anchor(--a auto-same); /* should evaluate to `right` */ +} + +#target3 { + top: anchor(--a auto-same); /* should evaluate to `top` */ + left: anchor(--a auto); /* should evaluate to `right` */ +} + +#target4 { + bottom: anchor(--a auto-same); /* should evaluate to `bottom` */ + right: anchor(--a auto); /* should evaluate to `left` */ +} +</style> + +<body onload="checkLayoutForAnchorPos('.target')"> + <div id="cb"> + <div id="anchor"></div> + + <div id="target1" class="target" + data-offset-x="150" data-offset-y="350"></div> + <div id="target2" class="target" + data-offset-x="150" data-offset-y="150"></div> + <div id="target3" class="target" + data-offset-x="250" data-offset-y="250"></div> + <div id="target4" class="target" + data-offset-x="50" data-offset-y="250"></div> + </div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-function.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-function.html index ebd7078a626..2a7750539ca 100644 --- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-function.html +++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-function.html @@ -73,10 +73,10 @@ for (const colorSpace of [ "xyz", "xyz-d50", "xyz-d65" ]) { test_valid_value("color", `color(${colorSpace} none none none / 0.5)`, `color(${resultColorSpace} none none none / 0.5)`); test_valid_value("color", `color(${colorSpace} 0 0 0 / none)`, `color(${resultColorSpace} 0 0 0 / none)`); - test_valid_value("color", `color(${colorSpace} 0 calc(infinity) 0)`, `color(${colorSpace} 0 calc(infinity) 0)`); - test_valid_value("color", `color(${colorSpace} 0 calc(-infinity) 0)`, `color(${colorSpace} 0 calc(-infinity) 0)`); - test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`); - test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${colorSpace} calc(NaN) 0 0)`); + test_valid_value("color", `color(${colorSpace} 0 calc(infinity) 0)`, `color(${resultColorSpace} 0 calc(infinity) 0)`); + test_valid_value("color", `color(${colorSpace} 0 calc(-infinity) 0)`, `color(${resultColorSpace} 0 calc(-infinity) 0)`); + test_valid_value("color", `color(${colorSpace} calc(NaN) 0 0)`, `color(${resultColorSpace} calc(NaN) 0 0)`); + test_valid_value("color", `color(${colorSpace} calc(0 / 0) 0 0)`, `color(${resultColorSpace} calc(NaN) 0 0)`); } </script> </body> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/size-change-during-transition-crash.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/size-change-during-transition-crash.html new file mode 100644 index 00000000000..80be45b8fd2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/size-change-during-transition-crash.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Container Queries - Size change during transitions crash</title> +<script src="/common/reftest-wait.js"></script> +<link rel="help" href="https://crbug.com/1451359"> +<style> + #outer { + container-type: inline-size; + width: 100px; + } + #inner { + background-color: black; + transition: background-color 60s; + } + #inner.target { + background-color: white; + } + @container (width > 200px) { + #inner.target { + background-color: lime; + } + } +</style> +<p>Pass if no crash.</p> +<div id="outer"> + <div id="inner">Look at my background</div> +</div> +<script> + inner.offsetTop; + inner.className = "target"; + requestAnimationFrame(() => { + requestAnimationFrame(() => { + outer.style.width = "300px"; + takeScreenshot(); + }); + }); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-068.html b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-068.html index 844f04e6b26..64ad8546920 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-068.html +++ b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-068.html @@ -87,13 +87,13 @@ async_test((t) => { end.focus(); requestAnimationFrame(step5); } - // After blurring the focused element, we should go back to the contained - // height of 100px. + // After blurring the focused element, we keep the last rendered size, see + // https://github.com/w3c/csswg-drafts/issues/8407. function step5() { const r = container.getBoundingClientRect(); t.step(() => { assert_equals(r.y, 3000, "step5 offset"); - assert_equals(r.height, 100, "step5 height"); + assert_equals(r.height, 10, "step5 height"); }); t.done(); } diff --git a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-070.html b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-070.html index a41b513e626..f43b6033783 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-070.html +++ b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-070.html @@ -96,13 +96,13 @@ async_test((t) => { requestAnimationFrame(step6); } - // After removing the selection we should go back to the contained - // height of 100px. + // After removing the selection, we keep the last rendered size, see + // https://github.com/w3c/csswg-drafts/issues/8407. function step6() { const r = container.getBoundingClientRect(); t.step(() => { - assert_equals(r.y, 3000, "step5 offset"); - assert_equals(r.height, 100, "step5 height"); + assert_equals(r.y, 3000, "step6 offset"); + assert_equals(r.height, 10, "step6 height"); }); t.done(); } diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/gap-019.html b/tests/wpt/web-platform-tests/css/css-flexbox/gap-019.html new file mode 100644 index 00000000000..d55f86e5d24 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/gap-019.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Flex gaps</title> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#intrinsic-sizes"> +<link rel="help" href="https://drafts.csswg.org/css-align/#gaps"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" + content="Intrinsic max size of multiline row flex containers includes gaps" /> + +<style> + .item { + flex: 0 0 10px; + } + + #reference-overlapped-red { + position: absolute; + background-color: red; + width: 100px; + height: 100px; + z-index: -1; + } +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> + +<div id=reference-overlapped-red></div> + +<div + style="display: flex; column-gap: 80px; background: green; height: 100px; width: max-content; flex-wrap: wrap;"> + <div class=item></div> + <div class=item></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-005.html b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-005.html index 0f34c6fbdb4..580f9897de0 100644 --- a/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-005.html +++ b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-005.html @@ -4,7 +4,8 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/check-layout-th.js"></script> -<meta name="assert" content="min-content width is calculated correctly in a variety of scenarios with two flex items" /> +<meta name="assert" + content="min-content width is calculated correctly in a variety of scenarios with multiple flex items" /> <style> .zero-width { @@ -28,23 +29,27 @@ background: orange; } + .floating-flexbox>div:nth-child(3) { + background: lightblue; + } + .floating-flexbox>div>div { width: 100px; } </style> <body onload="checkLayout('.floating-flexbox')"> + <div id="log"></div> + <div class="zero-width"> - <div class="floating-flexbox" data-expected-width="300"> + <div class="floating-flexbox" data-expected-width="200"> <!-- min contribution: 100 --> - <!-- fraction: -0.5 --> - <!-- flex base size + product: 200px + -0.5*200px = 100px --> - <div style="flex: 1 1 200px; width:50px;"> + <!-- desired fraction: -0.5 --> + <!-- chosen fraction <=0 and desired fraction <=0 and item can shrink, so it contributes its min-content contribution --> + <div style="flex: 1 1 200px; width:50px; min-width:0px;"> <div></div> </div> - <!-- min contribution: 100 --> - <!-- fraction: -0.75 --> - <!-- flex base size + product: 400px + -0.5*400px = 200px --> + <!-- chosen fraction <=0 and desired fraction <=0 and item can shrink, so it contributes its min-content contribution --> <div style="flex: 1 1 400px; width:50px;"> <div></div> </div> @@ -52,10 +57,18 @@ </div> <div class="zero-width"> - <div class="floating-flexbox" data-expected-width="225"> + <div class="floating-flexbox" data-expected-width="200"> + <!-- min contribution: 100 --> + <!-- min contribution - flex basis: -100 --> + <!-- desired fraction: -0.5 --> + <!-- chosen fraction <=0 and desired fraction <=0 and item can shrink, so it contributes its min-content contribution --> <div style="flex: 1 1 200px; width:50px;"> <div></div> </div> + <!-- min contribution: 100 --> + <!-- min contribution - flex basis: -300 --> + <!-- desired fraction: -300/(2*400) = -0.375 --> + <!-- chosen fraction <=0 and desired fraction <=0 and item can shrink, so it contributes its min-content contribution --> <div style="flex: 1 2 400px; width:50px;"> <div></div> </div> @@ -65,7 +78,7 @@ <!-- This is same as above except for min-width auto is no longer in effect. EdgeHTML renders it differently than the above. --> <div class="zero-width"> - <div class="floating-flexbox" data-expected-width="225"> + <div class="floating-flexbox" data-expected-width="200"> <div style="flex: 1 1 200px; width:50px; min-width: 0px;"> <div></div> </div> @@ -76,16 +89,17 @@ </div> <div class="zero-width"> + <!-- first item contributes 200px. second item contributes 100px --> <div class="floating-flexbox" data-expected-width="300"> <!-- min contribution: 100 --> - <!-- fraction: -inf --> - <!-- flex base size + product: 200px + -0.75*0px = 200px --> + <!-- desired fraction: -inf --> + <!-- chosen fraction <= 0 and item can't shrink, so contribute flex basis --> <div style="flex: 1 0 200px; width:50px;"> <div></div> </div> <!-- min contribution: 100 --> - <!-- fraction: -0.75 --> - <!-- flex base size + product: 400px + -0.75*400px = 100px --> + <!-- desired fraction: -0.75 --> + <!-- chosen fraction <= 0 and item CAN shrink, so contribute min contribution --> <div style="flex: 1 1 400px; width:50px;"> <div></div> </div> @@ -94,9 +108,15 @@ <div class="zero-width"> <div class="floating-flexbox" data-expected-width="200"> + <!-- min contribution: 200 --> + <!-- min contribution - flex basis: 150 --> + <!-- desired fraction: 0 (because flex grow factor is 0) --> + <!-- chosen fraction <= 0 so contribute flex basis 50px --> + <!-- except flex basis is outside of used min/max, so contribute clamped flex basis = 100px --> <div style="flex: 0 0 50px; width: 200px;"> <div></div> </div> + <!-- identical to above --> <div style="flex: 0 0 50px; width: 200px;"> <div></div> </div> @@ -106,14 +126,14 @@ <div class="zero-width"> <!-- 200 + 400 = 600 --> <div class="floating-flexbox" data-expected-width="600"> - <!-- contribution: 200 --> - <!-- fraction: 150 --> + <!-- min contribution: 200 --> + <!-- desired fraction: 150px --> <!-- 50 + 1*150 = 200 --> <div style="flex: 1 0 50px; width: 200px;"> <div></div> </div> - <!-- contribution: 200 --> - <!-- fraction: 100 --> + <!-- min contribution: 200 --> + <!-- desired fraction: 100px --> <!-- 100 + 2*150 = 400 --> <div style="flex: 2 0 100px; width: 200px;"> <div></div> @@ -122,19 +142,60 @@ </div> <div class="zero-width"> + <!-- chosen fraction: 50px --> <div class="floating-flexbox" data-expected-width="400"> <!-- min contribution: 100 --> - <!-- fraction: -0.5 --> - <!-- flex base size + product: = 200px + 50px*0 = 200px --> + <!-- desired fraction: -0.5 --> + <!-- final contribution = flex base size + product = 200px + 50px*0 = 200px --> <div style="flex: 0 1 200px; width: 50px;"> <div></div> </div> <!-- min contribution: 200 --> - <!-- fraction: (200px - 100px) / 2 = 50px --> - <!-- flex base size + product: = 100px + 50px*2 = 200px --> + <!-- desired fraction: (200px - 100px) / 2 = 50px --> + <!-- final contribution = flex base size + product = 100px + 50px*2 = 200px --> <div style="flex: 2 0 100px; width: 200px;"> <div></div> </div> </div> </div> +<div class="zero-width"> + <!-- chosen fraction: 0 --> + <div class="floating-flexbox" data-expected-width="600"> + <!-- min contribution: 250 --> + <!-- wants to grow, but can't --> + <!-- desired fraction: 0 --> + <!-- final contribution: 100 --> + <div style="flex: 0 1 100px; width: 250px;"></div> + <!-- min contribution: 100 --> + <!-- wants to shrink, but can't --> + <!-- desired fraction: -inf --> + <!-- final contribution: 200 --> + <div style="flex: 1 0 200px; width: 100px;"></div> + <!-- min contribution: --> + <!-- doesn't have to change ---> + <!-- desired fraction: 0 --> + <!-- final contribution: 300 --> + <div style="flex: 1 1 300px; width: 300px;"></div> + </div> +</div> + +<div class="zero-width"> + <!-- chosen fraction: 0 --> + <div class="floating-flexbox" data-expected-width="700"> + <!-- min contribution: 100 --> + <!-- wants to shrink, but can't --> + <!-- desired fraction: -inf --> + <!-- final contribution: 200 --> + <!-- In legacy and V2, this item gets 0 width. --> + <div style="flex: 0 10 300px; width: 200px;"></div> + <!-- min contribution: --> + <!-- doesn't have to change ---> + <!-- desired fraction: 0 --> + <!-- final contribution: 300 --> + <!-- In legacy and V2, this item gets all the width. --> + <div style="flex: 0 1 1000px; width: 500px;"> + </div> + </div> +</div> + </body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-compat-001.html b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-compat-001.html new file mode 100644 index 00000000000..67e242e60f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-compat-001.html @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#intrinsic-sizes"> +<link rel="help" href="https://crbug.com/1445937"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<meta name="assert" + content="Virtually all of the compat problems reduced to this case" /> + +<style> + section.bugreport { + outline: 1px solid grey; + margin-bottom: 25px; + padding: 3px; + } + + #gmail .flex { + display: flex; + width: min-content; + outline: 2px solid; + margin-bottom: 10px; + } + + #gmail span.orange100 { + float: left; + height: 25px; + width: 100px; + background: orange; + } +</style> + +<section id="gmail" class="bugreport"> + <p>https://crbug.com/1445937 We need to see a 100x100 orange square, not a + 400x25 orange rectangle.</p> + <div class="flex" data-expected-width="100"> + <!-- one item with very negative desired flex fraction --> + <div> + <span class="orange100"></span> + <span class="orange100"></span> + <span class="orange100"></span> + <span class="orange100"></span> + </div> + <!-- second item with desired flex fraction 0 --> + <div></div> + </div> +</section> + +<script> + checkLayout('.flex'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-use-cases-001.html b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-use-cases-001.html new file mode 100644 index 00000000000..d86bd76b11f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-use-cases-001.html @@ -0,0 +1,282 @@ +<!DOCTYPE html> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#intrinsic-sizes"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" + content="Requested use cases from our issue tracker that were duplicated or included in the bug report for the new algorithm. These are intentionally not very reduced from their original form with liberal pass conditions." /> + +<style> + section.bugreport { + outline: 1px solid grey; + margin-bottom: 25px; + padding: 3px; + } + + #bug423112 .container { + border: 1px solid lightgrey; + margin: 20px; + padding: 8px; + display: flex; + flex-flow: column; + } + + #bug423112 .h-box { + display: flex; + flex-flow: row; + flex: none; + justify-content: flex-start; + align-items: stretch; + } + + #bug423112 .auto { + flex: 0 0 auto; + } + + #bug423112 .none { + flex: none; + } + + #bug423112 .gap1-fails { + flex: 0 0 5px; + } + + #bug423112 .gap2-fails { + flex: 0 0 30px; + } + + #bug423112 .word { + display: inline-block; + height: 10px; + width: 35px; + background: orange; + } + + #bug464210 .FlexOuterContainer { + border: 3px solid black; + display: flex; + margin: 1em; + } + + #bug464210 .FlexInnerContainer { + border: 3px solid red; + display: flex; + flex: 0 0 auto; + } + + #bug464210 .FlexItem { + background: rgba(0, 0, 0, .2); + flex: 0 0 100px; + } + + #bug533627c3 .outer { + display: flex; + padding: 10px; + } + + #bug533627c3 .middle, + #bug533627c3 .middle2 { + display: flex; + flex-shrink: 0; + background: red; + padding: 10px; + } + + #bug533627c3 .inner { + flex-basis: 258px; + flex-shrink: 0; + display: flex; + flex-grow: 0; + background: green; + } + + #bug533627c3 .inner2 { + width: 258px; + flex-shrink: 0; + display: flex; + flex-grow: 0; + background: green; + } + + #bug441768 div { + display: flex; + } + + #bug1144312 .grid-y { + flex-direction: column; + flex-wrap: wrap; + } + + #bug1144312 .grid-x { + flex-direction: row + } + + #bug1144312 .grid-x>* { + flex-basis: 0 + } + + #bug1144312 [class*=grid] { + display: flex; + gap: 1px + } + + #bug1144312 .grid-y { + background: lightblue + } + + #bug1144312 .grid-y:not(:first-child) { + margin-top: 1.5rem + } + + #bug1144312 [class*=grid]>* { + flex-grow: 1; + border: 3px solid blue; + padding: 1px; + } + + #bug1144312 .nowrap div { + border-color: purple + } + + #bug1144312 .nowrap { + background: Thistle; + flex-wrap: nowrap; + } +</style> + +<section id="bug423112" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=423112</p> + <div class="container"> + <div class="h-box"> + <div class="h-box"> + <input type="checkbox" class="none"> + <div class="gap2-fails"></div> + <span class="none" id="left-item"> + first checkbox example + </span> + </div> + <div class="h-box"> + <input type="checkbox" class="none" id="right-item"> + <div class="gap2-fails"></div> + <span class="auto"> + second checkbox example + </span> + </div> + </div> + </div> +</section> + +<section id="bug464210" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=464210</p> + <div class="FlexOuterContainer"> + <div class="FlexInnerContainer"> + <div class="FlexItem">MMMMM</div> + <div id="right-item" class="FlexItem">MMMMM</div> + </div> + </div> +</section> + +<section id="bug533627c3" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=533627#c3</p> + <div class="outer"> + <div class="middle"> + <div class="inner"> + hello + </div> + </div> + </div> + <div class="outer"> + <div class="middle2"> + <div class="inner2"> + hello + </div> + </div> + </div> +</section> + +<section id="bug441768" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=441768 author wants + below space to have height but 0 width</p> + <div> + <div style="height: 100px; background: blue; align-self: flex-start;" + class="middle"> + <div style="width: 200px; flex: 0;"></div> + </div> + </div> +</section> + +<section id="bug1144312" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=1144312</p> + <div class="grid-y" id="top"> + <div class="grid-x"> + <div>phantom whitespace</div> + <div></div> + </div> + </div> + + <div class="grid-y" id="middle"> + <div> + <div class="grid-x"> + <div>also phantom whitespace</div> + <div></div> + </div> + </div> + </div> + + <div class="grid-y nowrap" id="bottom"> + <div class="grid-x"> + <div>no more phantom whitespace</div> + <div></div> + </div> + </div> +</section> + +<section id="bug1154243" class="bugreport"> + <p>https://bugs.chromium.org/p/chromium/issues/detail?id=1154243</p> + <div style="display: flex; width: min-content; border: 2px solid blue; " + id="container"> + <div style="flex-shrink: 0">Test content</div> + <div style="background: yellow; flex-shrink: 0" id="right">Test content + </div> + </div> +</section> + +<script> + test(_ => { + let left = bug423112.querySelector("#left-item"); + let right = bug423112.querySelector("#right-item"); + assert_less_than_equal(left.getBoundingClientRect().right, right.getBoundingClientRect().left); + }, "left < right"); + + test(_ => { + const container = bug464210.querySelector(".FlexInnerContainer"); + const right = bug464210.querySelector("#right-item"); + assert_less_than_equal(right.getBoundingClientRect().right, container.getBoundingClientRect().right); + }, "no overflow"); + + test(_ => { + const middle = bug533627c3.querySelector(".middle"); + const middle2 = bug533627c3.querySelector(".middle2"); + assert_equals(middle.offsetWidth, middle2.offsetWidth); + }, "same widths"); + + test(_ => { + const middle = bug441768.querySelector(".middle"); + assert_equals(middle.offsetWidth, 0); + }, "zero width"); + + test(_ => { + const top = bug1144312.querySelector("#top"); + const middle = bug1144312.querySelector("#middle"); + const bottom = bug1144312.querySelector("#bottom"); + assert_equals(top.offsetHeight, bottom.offsetHeight); + assert_equals(middle.offsetHeight, bottom.offsetHeight); + }, "same heights"); + + test(_ => { + const container = bug1154243.querySelector("#container"); + const right = bug1154243.querySelector("#right"); + assert_less_than_equal(right.getBoundingClientRect().right, container.getBoundingClientRect().right); + }, "no overflow 2"); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html new file mode 100644 index 00000000000..7ed61fa8bff --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/intrinsic-size/row-wrap-002.tentative.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#intrinsic-sizes"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" + content="containers with min-content > max-content increase max-content to match min-content" /> + +<style> + #reference-overlapped-red { + position: absolute; + background-color: red; + width: 100px; + height: 100px; + z-index: -1; + } +</style> + +<p>Test passes if there is a filled green square and <strong>no red</strong>. +</p> + +<div id=reference-overlapped-red></div> + +<!-- Safari 16.4 and Chrome 116 make this container 100px wide. Firefox 114 makes it 90px. --> +<div style="display: flex; flex-wrap: wrap; width: max-content; height: 100px; + background: green;"> + <div style="width: 100px;"></div> + <div style="width: 0px; margin-left: -10px;"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html b/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html index 8ce254f7b15..e4a84fdf7f1 100644 --- a/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html +++ b/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html @@ -16,6 +16,9 @@ test_valid_value("flex-flow", "column nowrap", "column"); test_valid_value("flex-flow", "nowrap column", "column"); test_valid_value("flex-flow", "wrap row-reverse", "row-reverse wrap"); test_valid_value("flex-flow", "nowrap", "row"); +test_valid_value("flex-flow", "row nowrap", "row"); +test_valid_value("flex-flow", "wrap", "wrap"); +test_valid_value("flex-flow", "row wrap", "wrap"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/resources/separator-test-font.ttf b/tests/wpt/web-platform-tests/css/css-fonts/resources/separator-test-font.ttf Binary files differnew file mode 100644 index 00000000000..26cc99783d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/resources/separator-test-font.ttf diff --git a/tests/wpt/web-platform-tests/css/css-fonts/separators-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/separators-ref.html new file mode 100644 index 00000000000..d1d56f576f7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/separators-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Line and paragraph separator rendering</title> +<style> + @font-face { + font-family: test; + src: url(resources/separator-test-font.ttf) format("truetype"); + } + p { + font-size: 30px; + } +</style> +<body> + <p>V O</p> + <p>V
O</p> + <p>V
O</p> + + <p style="font-family: test;">V O</p> + <p style="font-family: test;">V O</p> + <p style="font-family: test;">V O</p> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-fonts/separators.html b/tests/wpt/web-platform-tests/css/css-fonts/separators.html new file mode 100644 index 00000000000..b2ec6a2a534 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/separators.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="match" href="separators-ref.html"> +<link rel="help" href="https://www.unicode.org/faq/unsup_char.html#2"/> +<link rel="assert" title="Line and paragraph separator should be displayed as space"> +<title>Line and paragraph separator rendering</title> +<style> + @font-face { + font-family: test; + src: url(resources/separator-test-font.ttf) format("truetype"); + } + p { + font-size: 30px; + } +</style> +<body> + <p>V O</p> + <p>V
O</p> + <p>V
O</p> + + <p style="font-family: test;">V O</p> + <p style="font-family: test;">V
O</p> + <p style="font-family: test;">V
O</p> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-columns-crash.html b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-columns-crash.html new file mode 100644 index 00000000000..61bdfd8177a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/parsing/grid-template-columns-crash.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1214890"> +<body></body> +<script> +let value = ''; +for (let i = 0; i < 100000; ++i) { + value += ` repeat(1000, ${i}px)`; +} +document.body.style.gridTemplateColumns = value; +document.body.textContent = 'PASS'; +</script> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-003.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-003.html new file mode 100644 index 00000000000..fdb571c157d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-003.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Grid Test: Subgrid auto track sizing</title> +<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#algo-overview"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<style> +.wrapper { + width: 100px; + height: 100px; + background: red; +} +.grid { + display: grid; + width: min-content; + background: green; + color: transparent; + font: 25px/1 Ahem; +} +.subgrid { + display: grid; + grid-row: 1 / -1; + grid-column: 1 / -1; + grid-template: subgrid / subgrid; +} +</style> +</head> +<body> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div class="wrapper"> + <div class="grid"> + <div class="subgrid"> + X XXXX XX XXX + </div> + </div> +</div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/Highlight-multiple-type-attribute.html b/tests/wpt/web-platform-tests/css/css-highlight-api/Highlight-multiple-type-attribute.html new file mode 100644 index 00000000000..dc8b3304559 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/Highlight-multiple-type-attribute.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html> +<head> + <title>Highlight type has a limited set of types</title> + <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <style> + #one::highlight(yellow-highlight) { + background-color: yellow; + } + #two::highlight(green-highlight) { + background-color: green; + } + </style> +</head> +<body> + <span id="one">One </span><span id="two">two </span> + <script> + test(() => { + let highlightYellow = new Highlight(new StaticRange({startContainer: document.body, startOffset: 1, endContainer: document.body, endOffset: 2})); + let highlightGreen = new Highlight(new StaticRange({startContainer: document.body, startOffset: 2, endContainer: document.body, endOffset: 3})); + + CSS.highlights.set("yellow-highlight", highlightYellow); + CSS.highlights.set("green-highlight", highlightGreen); + + assert_equals(highlightYellow.type, "highlight"); + assert_equals(highlightGreen.type, "highlight"); + + highlightGreen.type = "grammar-error"; + + assert_equals(highlightYellow.type, "highlight"); + assert_equals(highlightGreen.type, "grammar-error"); + + highlightGreen.type = "Spelling-error"; + + assert_equals(highlightYellow.type, "highlight"); + assert_equals(highlightGreen.type, "grammar-error"); + + highlightYellow.type = "ergeoirgjgeerror"; + + assert_equals(highlightYellow.type, "highlight"); + assert_equals(highlightGreen.type, "grammar-error"); + }); + </script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html index 2dad36e8817..053ab85422f 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html @@ -161,11 +161,13 @@ function test_non_positive_resolutions_parsing() { ); test_valid_value_variants( 'background-image', - 'image-set(url("example.png") calc(-1 * 1x))' + 'image-set(url("example.png") calc(-1 * 1x))', + 'image-set(url("example.png") calc(-1dppx))', ); test_valid_value_variants( 'background-image', - 'image-set(url("example.png") calc(1x + -1x))' + 'image-set(url("example.png") calc(1x + -1x))', + 'image-set(url("example.png") calc(0dppx))', ); test_invalid_value_variants( diff --git a/tests/wpt/web-platform-tests/css/css-nesting/nesting-type-selector.html b/tests/wpt/web-platform-tests/css/css-nesting/nesting-type-selector.html new file mode 100644 index 00000000000..1805896b8df --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-nesting/nesting-type-selector.html @@ -0,0 +1,18 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Nesting works with bare type selectors</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-nesting-1/"> +<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> +<style> +:root { + div { + width: 100px; + height: 100px; + background: green; + } +} +</style> +<p>Test passes if there is a filled green square.</p> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-display-toggled.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-display-toggled.html new file mode 100644 index 00000000000..088c14128e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-display-toggled.html @@ -0,0 +1,78 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + #scroller { + height: 100px; + width: 100px; + scroll-start: 100px 200px; + border: solid 1px black; + overflow: scroll; + } + + .spacer { + width: 200vw; + height: 200vh; + border: solid 1px green; + } + </style> + <div id="scroller"> + <div class="spacer"></div> + </div> + <script> + async function assertScrollPositionResetOnDisplayNone(scroller) { + return new Promise((resolve) => { + if (getComputedStyle(scroller)["display"] == "none") { + assert_equals(scroller.scrollTop, 0, "scrollTop is reset"); + assert_equals(scroller.scrollLeft, 0, "scrollLeft is reset"); + resolve(); + } else { + requestAnimationFrame(async () => { + await assertScrollPositionResetOnDisplayNone(scroller); + resove(); + }); + } + }); + } + promise_test(async (t) => { + // This tests that toggling the display of a scroller from none to block + // scroll-start does not reset the scroller's scroll position. + assert_equals(scroller.scrollTop, 100, + "scroll-start: <length> sets initial vertical scroll position"); + assert_equals(scroller.scrollLeft, 200, + "scroll-start: <length> sets initial horizontal scroll position"); + + // Scroll to somewhere other than scroll-start position. + scroller.scrollTop = 200; + scroller.scrollLeft = 100; + assert_equals(scroller.scrollTop, 200, + "vertical scroll position is programmatically adjusted"); + assert_equals(scroller.scrollLeft, 100, + "horizontal scroll position is programmatically adjusted"); + + scroller.style.display = "none"; + assert_equals(getComputedStyle(scroller)["display"], "none"); + + await assertScrollPositionResetOnDisplayNone(scroller); + + scroller.style.display = "block"; + assert_equals(getComputedStyle(scroller)["display"], "block"); + + // Verify that we are again scrolled to the position specified by scroll-start. + assert_equals(scroller.scrollTop, 200, + "scroll-start is not applied vertically after display toggle"); + assert_equals(scroller.scrollLeft, 100, + "scroll-start is not applied horizontally after display toggle"); + }, "scroll-start does not interfer with recovering saved scroll position " + + "after display toggle"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-fieldset.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-fieldset.html new file mode 100644 index 00000000000..da48c6ce25e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-fieldset.html @@ -0,0 +1,156 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + .spacer { + width: 500px; + height: 500px; + border: solid 1px green; + } + + legend { + background-color: #000; + color: #fff; + padding: 0px 0px; + } + + input { + margin: 0rem; + } + + .scroller { + width: 100px; + height: 100px; + border: solid 1px black; + overflow: scroll; + padding-block-start: 0px; + padding-block-end: 0px; + } + </style> + <fieldset id="scroller" class="scroller"> + <div class="spacer"></div> + </fieldset> + <script> + let scroller = document.getElementById("scroller"); + const max_vertical_scroll_offset = scroller.scrollHeight - + scroller.clientHeight; + // The fieldset's width is set based on the size of its contents: + // https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element + // "For the purpose of calculating the min-content inline size, use the + // greater of the min-content inline size of the rendered legend and the + // min-content inline size of the anonymous fieldset content box." + // So only bother checking vertical scrolling as the adjusted width might + // not permit horizontal scrolling. + let test_cases = [ + { + scroll_start: "100px 200px", + expectation: { + scrollTop: 100, + msg: "scroll-start: <length> sets initial scroll position", + approx: false + } + }, + { + scroll_start: "25% 75%", + expectation: { + scrollTop: 0.25 * max_vertical_scroll_offset, + msg: "scroll-start: <percent> sets initial scroll position", + approx: true + } + }, + { + scroll_start: "calc(50px) calc(75px)", + expectation: { + scrollTop: 50, + msg: "scroll-start: <calc> sets initial scroll position", + approx: false + } + }, + { + scroll_start: "start", + expectation: { + scrollTop: 0, + msg: "scroll-start: start sets initial scroll position", + approx: false + } + }, + { + scroll_start: "center center", + expectation: { + scrollTop: 0.5 * max_vertical_scroll_offset, + msg: "scroll-start: center sets initial scroll position", + approx: true + } + }, + { + scroll_start: "end end", + expectation: { + scrollTop: max_vertical_scroll_offset, + msg: "scroll-start: end sets initial scroll position", + approx: false + } + }, + { + scroll_start: "top top", + expectation: { + scrollTop: 0, + msg: "scroll-start: top sets initial scroll position", + approx: false + } + }, + { + scroll_start: "bottom bottom", + expectation: { + scrollTop: max_vertical_scroll_offset, + msg: "scroll-start: bottom sets initial scroll position", + approx: false + } + }, + { + scroll_start: "1000px 2000px", + expectation: { + scrollTop: max_vertical_scroll_offset, + msg: "scroll-start is clamped", + approx: false + } + } + ]; + + async function resetScroller(scroll_start) { + scroller.style.display = "none"; + assert_equals(getComputedStyle(scroller)["display"], "none"); + + scroller.style["scroll-start"] = scroll_start; + + scroller.style.display = "block"; + assert_equals(getComputedStyle(scroller)["display"], "block"); + assert_equals(scroller.style.scrollStart, scroll_start); + } + + async function test_scroll_start(scroll_start, expectation) { + await resetScroller(scroll_start); + + if (expectation.approx) { + assert_approx_equals(scroller.scrollTop, expectation.scrollTop, 1, expectation.msg); + } else { + assert_equals(scroller.scrollTop, expectation.scrollTop, expectation.msg); + } + } + + promise_test(async () => { + for (let test_case of test_cases) { + await test_scroll_start(test_case.scroll_start, + test_case.expectation); + } + }, "scroll-start sets default position of fieldset element"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-overflow-toggled.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-overflow-toggled.html new file mode 100644 index 00000000000..8829519024a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-overflow-toggled.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + #scroller { + height: 100px; + width: 100px; + scroll-start: 100px 200px; + border: solid 1px black; + overflow: scroll; + } + + .spacer { + width: 200vw; + height: 200vh; + border: solid 1px green; + } + </style> + <div id="scroller"> + <div class="spacer"></div> + </div> + <script> + promise_test(async (t) => { + // This tests that toggling the overflow of a scroller from visible to + // scroll doesn't change the scroll position to scroll-start (since + // overflow:visible to overflow:scroll doesn't cause the scroller to be laid + // out again.) + assert_equals(scroller.scrollTop, 100, + "scroll-start: <length> sets initial vertical scroll position"); + assert_equals(scroller.scrollLeft, 200, + "scroll-start: <length> sets initial horizontal scroll position"); + + // Scroll to somewhere other than scroll-start position. + scroller.scrollTop = 200; + scroller.scrollLeft = 100; + // Allow for an animation frame that might be needed for the update to take + // place. + await requestAnimationFrame(() => { }); + assert_equals(scroller.scrollTop, 200, + "vertical scroll position is programmatically adjusted"); + assert_equals(scroller.scrollLeft, 100, + "horizontal scroll position is programmatically adjusted"); + + scroller.style.overflow = "visible"; + assert_equals(getComputedStyle(scroller)["overflow"], "visible"); + scroller.style.overflow = "scroll"; + assert_equals(getComputedStyle(scroller)["overflow"], "scroll"); + + // Verify that the scroll position is not changed. + assert_equals(scroller.scrollTop, 200, + "scroll-start does not reset vertical scroll position on overflow " + + "toggle."); + assert_equals(scroller.scrollLeft, 100, + "scroll-start does not reset vertical scroll position on overflow " + + "toggle."); + }, "scroll-start sets scroller position if overflow is not visible"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-root.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-root.html new file mode 100644 index 00000000000..a74a1131e36 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-root.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + :root { + scroll-start: 10vh 200px; + } + + .spacer { + width: 200vw; + height: 200vh; + border: solid 1px green; + } + </style> + <div class="spacer"></div> + <script> + promise_test(async (t) => { + assert_equals(window.scrollX, 200, + "scroll-start: <length> sets initial scroll position"); + assert_equals(window.scrollY, 0.1 * window.innerHeight, + "scroll-start: <length> sets initial scroll position"); + }, "scroll-start sets the initial scroll position of the document"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-vertical-lr.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-vertical-lr.html new file mode 100644 index 00000000000..7ed152fd9af --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-vertical-lr.html @@ -0,0 +1,133 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + .spacer { + width: 500px; + height: 500px; + border: solid 1px green; + } + + .scroller { + width: 100px; + height: 100px; + border: solid 1px black; + overflow: scroll; + writing-mode: vertical-lr; + } + </style> + <div id="lengthscroller" class="scroller" style="scroll-start: 100px"> + <div class="spacer"></div> + </div> + <div id="percentscroller" class="scroller" style="scroll-start: 25%"> + <div class="spacer"></div> + </div> + <div id="calcscroller" class="scroller" style="scroll-start: calc(50px)"> + <div class="spacer"></div> + </div> + <div id="startscroller" class="scroller" style="scroll-start: start"> + <div class="spacer"></div> + </div> + <div id="centerscroller" class="scroller" style="scroll-start: center"> + <div class="spacer"></div> + </div> + <div id="endscroller" class="scroller" style="scroll-start: end"> + <div class="spacer"></div> + </div> + <div id="topscroller" class="scroller" style="scroll-start: 100px top"> + <div class="spacer"></div> + </div> + <div id="bottomscroller" class="scroller" style="scroll-start: 100px bottom"> + <div class="spacer"></div> + </div> + <div id="leftscroller" class="scroller" style="scroll-start: left 100px"> + <div class="spacer"></div> + </div> + <div id="rightscroller" class="scroller" style="scroll-start: right 100px"> + <div class="spacer"></div> + </div> + <div id="clampedscroller" class="scroller" style="scroll-start: 1000px 1000px"> + <div class="spacer"></div> + </div> + <script> + promise_test(async (t) => { + let length_scroller = document.getElementById("lengthscroller"); + assert_equals(length_scroller.scrollLeft, 100, + "scroll-start: <length> sets initial scroll position"); + + let percent_scroller = document.getElementById("percentscroller"); + const percent_scroll_left = 0.25 * (percent_scroller.scrollWidth - + percent_scroller.clientWidth); + assert_approx_equals(percent_scroller.scrollLeft, percent_scroll_left, 1, + "scroll-start: <percent> sets initial scroll position"); + + let calc_scroller = document.getElementById("calcscroller"); + assert_equals(calc_scroller.scrollLeft, 50, + "scroll-start: <calc> sets initial scroll position"); + + let start_scroller = document.getElementById("startscroller"); + assert_equals(start_scroller.scrollLeft, 0, + "scroll-start: start sets initial scroll position"); + + let center_scroller = document.getElementById("centerscroller"); + const center_scroll_top = 0.5 * (center_scroller.scrollHeight - + center_scroller.clientHeight); + assert_approx_equals(center_scroller.scrollLeft, center_scroll_top, 1, + "scroll-start: center sets initial scroll position"); + + let end_scroller = document.getElementById("endscroller"); + const end_scroll_top = end_scroller.scrollWidth - + end_scroller.clientWidth; + assert_equals(end_scroller.scrollLeft, end_scroll_top, + "scroll-start: end sets initial scroll position"); + + let top_scroller = document.getElementById("topscroller"); + assert_equals(top_scroller.scrollLeft, 100, + "scroll-start: top sets initial scroll position"); + assert_equals(top_scroller.scrollTop, 0, + "scroll-start: top sets initial scroll position"); + + let bottom_scroller = document.getElementById("bottomscroller"); + const bottom_scroll_top = bottom_scroller.scrollHeight - + bottom_scroller.clientHeight; + assert_equals(bottom_scroller.scrollLeft, 100, + "scroll-start: bottom sets initial scroll position"); + assert_equals(bottom_scroller.scrollTop, bottom_scroll_top, + "scroll-start: top sets initial scroll position"); + + let left_scroller = document.getElementById("leftscroller"); + assert_equals(left_scroller.scrollTop, 100, + "scroll-start: left sets initial scroll position"); + assert_equals(left_scroller.scrollLeft, 0, + "scroll-start: left sets initial scroll position"); + + let right_scroller = document.getElementById("rightscroller"); + const right_scroll_top = right_scroller.scrollWidth - + right_scroller.clientWidth; + assert_equals(right_scroller.scrollTop, 100, + "scroll-start: right sets initial scroll position"); + assert_equals(right_scroller.scrollLeft, right_scroll_top, + "scroll-start: right sets initial scroll position"); + + let clamped_scroller = document.getElementById("clampedscroller"); + const clamped_scroll_top = clamped_scroller.scrollWidth - + clamped_scroller.clientWidth; + const clamped_scroll_left = clamped_scroller.scrollHeight - + clamped_scroller.clientHeight; + assert_equals(clamped_scroller.scrollTop, clamped_scroll_top, + "scroll-start is clamped to max vertical scroll offset"); + assert_equals(clamped_scroller.scrollLeft, clamped_scroll_left, + "scroll-start is clamped to max horizontal scroll offset"); + }, "scroll-start sets initial scroll offset correctly in vertical " + + "writing modes"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation-inner-frame.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation-inner-frame.html new file mode 100644 index 00000000000..c32bac913d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation-inner-frame.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + +<head> +</head> + +<body> + <style> + :root { + margin: 0px; + scroll-start: 100px; + } + + #spacer { + height: 100vh; + width: 100vw; + } + + #scroll_start_target { + width: 100px; + height: 100px; + background-color: blue; + } + + #anchor_target { + width: 100px; + height: 100px; + background-color: red; + } + </style> + <a id="anchor_target_link" href="#anchor_target"></a> + <div id="spacer"></div> + <div id="scroll_start_target"></div> + <div id="anchor_target"> + </div> +</body> + +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation.html new file mode 100644 index 00000000000..ff5c9793918 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-anchor-navigation.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start interaction with anchor navigation</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/html/browsers/browsing-the-web/resources/helpers.js"></script> + <script src="/dom/events/scrolling/scroll_support.js"></script> +</head> + +<body> + <iframe id="frame" src="scroll-start-with-anchor-navigation-inner-frame.html" onload="runTest()"></iframe> + <script> + function runTest() { + promise_test(async (t) => { + let scroller = frame.contentDocument.scrollingElement; + // anchor_target is at the bottom of the frame so the frame should be + // fully scrolled down to bring it into view. + let anchor_target_scrolltop = scroller.scrollHeight - scroller.clientHeight; + let anchor_target_link = frame.contentDocument.getElementById("anchor_target_link"); + + // Expect scroll offset of 100px per scroll-start. + assert_equals(scroller.scrollTop, 100, + "scroll-start sets initial scroll offset"); + + // Scroll away from start position. + scroller.scrollTop = 200; + await waitForCompositorCommit(); + assert_equals(scroller.scrollTop, 200, + "scroll-start sets initial scroll offset"); + + anchor_target_link.click(); + await waitForHashchange(frame.contentWindow); + assert_equals(frame.contentWindow.location.hash, "#anchor_target", + "clicking anchor link navigates to target"); + + // Expect page to be fully scrolled as anchor_target is at the bottom of + // the document. + assert_equals(scroller.scrollTop, anchor_target_scrolltop, + "anchor navigation sets scroll offset"); + + frame.contentWindow.history.back(); + await waitForHashchange(frame.contentWindow); + assert_equals(frame.contentWindow.location.hash, ""); + + scroller = frame.contentDocument.scrollingElement; + assert_equals(scroller.scrollTop, 200, + "scroller returns to previous scroll position, not " + + "scroll-start"); + }, "scroll-start does not override anchor navigation."); + } + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation-inner-frame.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation-inner-frame.html new file mode 100644 index 00000000000..736a26a5f0c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation-inner-frame.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> + +<head> +</head> + +<body> + <style> + :root { + margin: 0px; + scroll-start: 100px; + } + + #spacer { + height: 100vh; + width: 100vw; + } + + #box { + width: 100px; + height: 100px; + background-color: blue; + } + + #fragment_target { + width: 100px; + height: 100px; + background-color: red; + } + </style> + <div id="spacer"></div> + <div id="box"></div> + <div id="fragment_target"></div> +</body> + +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation.html new file mode 100644 index 00000000000..6e7730b0dc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-fragment-navigation.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start interaction with fragment-navigation</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <iframe id="frame" src="scroll-start-with-fragment-navigation-inner-frame.html#fragment_target" + onload="runTest()"></iframe> + <script> + function runTest() { + test((t) => { + let scroller = frame.contentDocument.scrollingElement; + // fragment_target is at the bottom of the frame so the frame should be + // fully scrolled down to bring it into view. + let expected_scroll_top = scroller.scrollHeight - scroller.clientHeight; + + assert_equals(frame.contentWindow.location.hash, "#fragment_target"); + assert_not_equals(100, expected_scroll_top); + assert_equals(frame.contentDocument.scrollingElement.scrollTop, + expected_scroll_top); + }, "scroll-start does not override hash fragment navigation"); + } + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-programmatic-scroll.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-programmatic-scroll.html new file mode 100644 index 00000000000..c10746f8549 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-programmatic-scroll.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body onload="runTest()"> + <style> + #scroller { + height: 100px; + width: 100px; + overflow: scroll; + scroll-start: 10vh 200px; + } + + .spacer { + width: 200vw; + height: 200vh; + border: solid 1px green; + } + </style> + <div id="scroller"> + <div class="spacer" id="spacer"></div> + </div> + <script> + function runTest() { + // scroll position declared by scroll-start. + const scroll_start_top = 0.1 * window.innerHeight; + const scroll_start_left = 200; + + // target position of the programmatic scroll. + const target_scroll_top = 100; + const target_scroll_left = 100; + + promise_test(async (t) => { + // verify that we are starting from the offsets indicated by scroll start. + assert_equals(scroller.scrollTop, scroll_start_top, + "scroll-start: <length> sets initial scroll position vertically"); + assert_equals(scroller.scrollLeft, scroll_start_left, + "scroll-start: <length> sets initial scroll position horizontally"); + + // verify that the programmatic scroll should result in an actual scroll. + assert_not_equals(target_scroll_top, scroll_start_top, + "programmatic scroll should not be a nop vertically"); + assert_not_equals(target_scroll_left, scroll_start_left, + "programmatic scroll should not be a nop horizontally"); + + scroller.scrollTop = target_scroll_top; + scroller.scrollLeft = target_scroll_left; + // verify that programmtic scroll succeeded. + assert_equals(scroller.scrollTop, target_scroll_top, + "programmatic scroll succeeds vertically"); + assert_equals(scroller.scrollLeft, target_scroll_left, + "programmatic scroll succeeds horizontally"); + + // Trigger a layout change. + scroller.style.height = "200px"; + scroller.style.width = "200px"; + let spacer = document.getElementById("spacer"); + spacer.style.height = "300vh"; + spacer.style.width = "300vw"; + assert_equals(getComputedStyle(spacer)["height"], + `${3 * window.innerHeight}px`); + assert_equals(getComputedStyle(spacer)["width"], + `${3 * window.innerWidth}px`); + + // Verify that the layout change did not affect the scroll position. + assert_equals(scroller.scrollTop, target_scroll_top, + "layout change after programmatic scroll doesn't apply scroll-start " + + "vertically"); + assert_equals(scroller.scrollLeft, target_scroll_left, + "layout change after programmatic scroll doesn't apply scroll-start " + + "horizontally"); + }, "scroll-start is not applied after a programmatic scroll"); + } + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-scroll-snap.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-scroll-snap.html new file mode 100644 index 00000000000..b813fcc750e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-scroll-snap.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start interaction with scroll-snap</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + + +<body> + <style> + body { + margin: 0px; + } + + .spacer { + height: 100px; + width: 100px; + } + + .scroller { + height: 100px; + width: 100px; + overflow: scroll; + scroll-start: 200px; + scroll-snap-type: both mandatory; + } + + .snap_point { + width: 100px; + height: 100px; + scroll-snap-align: start; + } + </style> + <div id="single_snap_scroller" class="scroller"> + <div id="top_spacer" class="spacer"></div> + <div id="lone_snap_point" class="snap_point"></div> + <div id="bottom_spacer" class="spacer"></div> + </div> + <div id="multi_snap_scroller" class="scroller"> + <div id="snap_point_1" class="snap_point"></div> + <div id="snap_point_2" class="snap_point"></div> + <div id="snap_point_3" class="snap_point"></div> + </div> + <script> + test((t) => { + assert_equals(single_snap_scroller.scrollTop, + top_spacer.getBoundingClientRect().height, + "scroller snaps to top of snap point"); + }, "snap overrides scroll-start position"); + + test((t) => { + // scroll-start sets the initial scroll offset to the top of the third + // snap_point, so the scroller snaps to the third snap_point. + assert_equals(multi_snap_scroller.scrollTop, + snap_point_1.getBoundingClientRect().height + + snap_point_2.getBoundingClientRect().height, + "scroller snaps to snap point closer to start position."); + }, "scroller snaps based on scroll-start position"); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation-target.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation-target.html new file mode 100644 index 00000000000..4707a730627 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation-target.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html> + +<head> +</head> + +<body> + <div id="spacer"></div> + <div id="box"></div> + <div id="text_fragment_target"> + <p>Target</p> + </div> + <style> + :root { + margin: 0px; + scroll-start: 100px; + } + + #spacer { + height: 100vh; + width: 100vw; + } + + #box { + width: 100px; + height: 100px; + background-color: blue; + } + + #fragment_target { + width: 100px; + height: 100px; + background-color: red; + } + </style> + <script> + function stashResult(key, results) { + fetch(`/css/css-scroll-snap-2/stash.py?key=${key}`, { + method: "POST", + body: JSON.stringify(results) + }).then(() => { + window.close(); + }); + } + function record() { + let scroll_position = "UNKNOWN"; + // Expect page is scrolled all the way down as the text is at the bottom of + // the page. + const expected_scroll_top = document.scrollingElement.scrollHeight - + document.scrollingElement.clientHeight; + + if (document.scrollingElement.scrollTop == 100) { + scroll_position = "AT_SCROLL_START"; + } else if (document.scrollingElement.scrollTop == expected_scroll_top) { + scroll_position = "AT_TEXT_FRAGMENT"; + } + + const result = { + scroll_position: scroll_position + }; + + let key = (new URL(document.location)).searchParams.get("key"); + stashResult(key, result); + } + + window.onload = () => { + window.requestAnimationFrame(function () { + window.requestAnimationFrame(record); + }) + } + </script> +</body> + +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation.html new file mode 100644 index 00000000000..c84bd782543 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start interaction with text-fragment navigation</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/common/utils.js"></script> +</head> + +<body onload="runTest()"> + <script> + function fetchResult(key, resolve, reject) { + fetch(`/css/css-scroll-snap-2/stash.py?key=${key}`).then(response => { + return response.text(); + }).then(text => { + if (text) { + try { + let result = JSON.parse(text); + resolve(result); + } catch (e) { + reject(); + } + } else { + fetchResult(key, resolve, reject); + } + }); + } + + function runTest() { + promise_test(t => new Promise(async (resolve, reject) => { + let key = token(); + + test_driver.bless("Open a URL with a text fragment directive", () => { + window.open(`scroll-start-with-text-fragment-navigation-target.html?key=${key}#:~:text=Target`, "_blank", "noopener"); + }); + + fetchResult(key, resolve, reject); + }).then(result => { + assert_equals(result.scroll_position, "AT_TEXT_FRAGMENT"); + }), "scroll-start doesn't override text fragment navigation"); + } + </script> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-user-scroll.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-user-scroll.html new file mode 100644 index 00000000000..c122a6ef092 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start-with-user-scroll.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/resources/testdriver-vendor.js"></script> +</head> + +<body onload="runTest()"> + <style> + #scroller { + height: 100px; + width: 100px; + overflow: scroll; + scroll-start: 10vh 200px; + } + + .spacer { + width: 200vw; + height: 200vh; + border: solid 1px green; + } + </style> + <script> + function runTest() { + // scroll position declared by scroll-start. + const scroll_start_top = 0.1 * window.innerHeight; + const scroll_start_left = 200; + + // target position of the user scroll. + const target_scroll_delta = 100; + const target_scroll_top = scroll_start_top + target_scroll_delta; + const target_scroll_left = scroll_start_left + target_scroll_delta; + + promise_test(async (t) => { + // verify that we are starting from the offsets indicated by scroll start. + assert_equals(scroller.scrollTop, scroll_start_top, + "scroll-start: <length> sets initial scroll position vertically"); + assert_equals(scroller.scrollLeft, scroll_start_left, + "scroll-start: <length> sets initial scroll position horizontally"); + + // verify that the user scroll should result in an actual scroll. + assert_not_equals(target_scroll_top, scroll_start_top, + "user scroll should not be nop vertically"); + assert_not_equals(target_scroll_left, scroll_start_left, + "user scroll should not be nop horizontally"); + + let scrollend_promise = new Promise((resolve) => { + scroller.onscrollend = () => { resolve(); } + }); + await new test_driver.Actions().scroll(0, 0, + target_scroll_delta, + target_scroll_delta, + { origin: scroller }).send(); + + await scrollend_promise; + assert_equals(scroller.scrollTop, target_scroll_top, + "user scroll succeeds vertically"); + assert_equals(scroller.scrollLeft, target_scroll_left, + "user scroll succeeds horizontally"); + + // Trigger a layout change. + scroller.style.height = "200px"; + scroller.style.width = "200px"; + let spacer = document.getElementById("spacer"); + spacer.style.height = "300vh"; + spacer.style.width = "300vw"; + assert_equals(getComputedStyle(spacer)["height"], + `${3 * window.innerHeight}px`); + assert_equals(getComputedStyle(spacer)["width"], + `${3 * window.innerWidth}px`); + // Verify that the layout change did not affect the scroll position. + assert_equals(scroller.scrollTop, target_scroll_top, + "layout change after user scroll does not apply scroll-start " + + "vertically"); + assert_equals(scroller.scrollLeft, target_scroll_left, + "layout change after user scroll does not apply scroll-start " + + "horizontally"); + }, "scroll-start is not applied after user a scroll"); + } + </script> + <div id="scroller"> + <div class="spacer" id="spacer"></div> + </div> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start.html b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start.html new file mode 100644 index 00000000000..a35c612d7f4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/scroll-start.html @@ -0,0 +1,122 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title> CSS Scroll Snap 2 Test: scroll-start-*</title> + <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<body> + <style> + .spacer { + width: 500px; + height: 500px; + border: solid 1px green; + } + + .scroller { + width: 100px; + height: 100px; + border: solid 1px black; + overflow: scroll; + } + </style> + <div id="lengthscroller" class="scroller" style="scroll-start: 100px"> + <div class="spacer"></div> + </div> + <div id="percentscroller" class="scroller" style="scroll-start: 25%"> + <div class="spacer"></div> + </div> + <div id="calcscroller" class="scroller" style="scroll-start: calc(50px)"> + <div class="spacer"></div> + </div> + <div id="startscroller" class="scroller" style="scroll-start: start"> + <div class="spacer"></div> + </div> + <div id="centerscroller" class="scroller" style="scroll-start: center"> + <div class="spacer"></div> + </div> + <div id="endscroller" class="scroller" style="scroll-start: end"> + <div class="spacer"></div> + </div> + <div id="topscroller" class="scroller" style="scroll-start: top"> + <div class="spacer"></div> + </div> + <div id="bottomscroller" class="scroller" style="scroll-start: bottom"> + <div class="spacer"></div> + </div> + <div id="leftscroller" class="scroller" style="scroll-start: auto left"> + <div class="spacer"></div> + </div> + <div id="rightscroller" class="scroller" style="scroll-start: auto right"> + <div class="spacer"></div> + </div> + <div id="clampedscroller" class="scroller" style="scroll-start: 1000px 1000px"> + <div class="spacer"></div> + </div> + <script>promise_test(async (t) => { + let length_scroller = document.getElementById("lengthscroller"); + assert_equals(length_scroller.scrollTop, 100, + "scroll-start: <length> sets initial scroll position"); + + let percent_scroller = document.getElementById("percentscroller"); + const percent_scroll_top = 0.25 * (percent_scroller.scrollHeight - + percent_scroller.clientHeight); + assert_approx_equals(percent_scroller.scrollTop, percent_scroll_top, 1, + "scroll-start: <percent> sets initial scroll position"); + + let calc_scroller = document.getElementById("calcscroller"); + assert_equals(calc_scroller.scrollTop, 50, + "scroll-start: <calc> sets initial scroll position"); + + let start_scroller = document.getElementById("startscroller"); + assert_equals(start_scroller.scrollTop, 0, + "scroll-start: start sets initial scroll position"); + + let center_scroller = document.getElementById("centerscroller"); + const center_scroll_top = 0.5 * (center_scroller.scrollHeight - + center_scroller.clientHeight); + assert_approx_equals(center_scroller.scrollTop, center_scroll_top, 1, + "scroll-start: center sets initial scroll position"); + + let end_scroller = document.getElementById("endscroller"); + const end_scroll_top = end_scroller.scrollHeight - + end_scroller.clientHeight; + assert_equals(end_scroller.scrollTop, end_scroll_top, + "scroll-start: end sets initial scroll position"); + + let top_scroller = document.getElementById("topscroller"); + assert_equals(top_scroller.scrollTop, 0, + "scroll-start: top sets initial scroll position"); + + let bottom_scroller = document.getElementById("bottomscroller"); + const bottom_scroll_top = bottom_scroller.scrollHeight - + bottom_scroller.clientHeight; + assert_equals(bottom_scroller.scrollTop, bottom_scroll_top, + "scroll-start: bottom sets initial scroll position"); + + let left_scroller = document.getElementById("leftscroller"); + assert_equals(left_scroller.scrollLeft, 0, + "scroll-start: left sets initial scroll position"); + + let right_scroller = document.getElementById("rightscroller"); + const right_scroll_top = right_scroller.scrollWidth - + right_scroller.clientWidth; + assert_equals(right_scroller.scrollLeft, right_scroll_top, + "scroll-start: right sets initial scroll position"); + + let clamped_scroller = document.getElementById("clampedscroller"); + const clamped_scroll_top = clamped_scroller.scrollHeight - + clamped_scroller.clientHeight; + const clamped_scroll_left = clamped_scroller.scrollWidth - + clamped_scroller.clientWidth; + assert_equals(clamped_scroller.scrollTop, clamped_scroll_top, + "scroll-start is clamped to max vertical scroll offset"); + assert_equals(clamped_scroller.scrollLeft, clamped_scroll_left, + "scroll-start is clamped to max horizontal scroll offset"); + }); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap-2/stash.py b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/stash.py new file mode 100644 index 00000000000..e804b9a2b35 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap-2/stash.py @@ -0,0 +1,27 @@ +# Copyright 2023 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +""" +This file allows the different windows created by +css/css-scroll-snap-2/scroll-start-with-text-fragment-navigation.html +to store and retrieve data. + +scroll-start-with-text-fragment-navigation.html (test file) opens a window to +scroll-start-with-text-fragment-navigation-target.html which writes some data +which the test file will eventually read. This file handles the requests from +both windows. +""" + +import time + +def main(request, response): + key = request.GET.first(b"key") + + if request.method == u"POST": + # Received result data from target page + request.server.stash.put(key, request.body, u'/css/css-scroll-snap-2/') + return u"ok" + else: + # Request for result data from test page + value = request.server.stash.take(key, u'/css/css-scroll-snap-2/') + return value diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004-ref.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004-ref.html new file mode 100644 index 00000000000..b2b2d7f2841 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004-ref.html @@ -0,0 +1,5 @@ +<!doctype html> +<title>CSS Test Reference</title> +<style> + :root { overflow: scroll; scrollbar-width: thin; } +</style> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004.html new file mode 100644 index 00000000000..5b9c9c36bc7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004.html @@ -0,0 +1,20 @@ +<!doctype html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Scrollbars: scrollbar-width on viewport none -> thin</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev"> +<link rel="match" href="scrollbar-width-paint-004-ref.html"> +<link rel="help" href="https://www.w3.org/TR/css-scrollbars-1/"> +<script src="/common/reftest-wait.js"></script> +<style> + :root { + overflow: scroll; + scrollbar-width: none; + } +</style> +<script> + requestAnimationFrame(() => requestAnimationFrame(() => { + document.documentElement.style.scrollbarWidth = 'thin'; + takeScreenshot(); + })); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005-ref.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005-ref.html new file mode 100644 index 00000000000..e5c325b8542 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005-ref.html @@ -0,0 +1,5 @@ +<!doctype html> +<title>CSS Test Reference</title> +<style> + :root { overflow: hidden; } +</style> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005.html new file mode 100644 index 00000000000..9ce46d296a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005.html @@ -0,0 +1,25 @@ +<!doctype html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Scrollbars: scrollbar-width multiple-updates on viewport thin -> auto -> none</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev"> +<link rel="match" href="scrollbar-width-paint-005-ref.html"> +<link rel="help" href="https://www.w3.org/TR/css-scrollbars-1/"> +<script src="/common/reftest-wait.js"></script> +<style> + :root { + overflow: scroll; + scrollbar-width: thin; + } +</style> +<script> + requestAnimationFrame(() => requestAnimationFrame(() => { + document.documentElement.style.scrollbarWidth = 'auto'; + + requestAnimationFrame(() => requestAnimationFrame(() => { + document.documentElement.style.scrollbarWidth = 'none'; + + takeScreenshot(); + })); + })); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006-ref.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006-ref.html new file mode 100644 index 00000000000..73143073534 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006-ref.html @@ -0,0 +1,62 @@ +<!doctype html> +<style> + body { + display: flex; + flex-wrap: wrap; + } + + .container { + scrollbar-gutter: stable; + flex: 0 0; + overflow: auto; + height: 200px; + min-width: 200px; + margin: 1px; + padding: 0px; + border: none; + background: deepskyblue; + } + + .content { + height: 300px; + width: 300px; + } + + .container.auto { + scrollbar-width: auto; + } + + .container.thin { + scrollbar-width: thin; + } + + .container.none { + scrollbar-width: none; + } + + .content.plain { + background: red; + } + + .content.gradient { + background: linear-gradient(135deg, red, blue); + } +</style> +<div id="one" class="container none"> + <div class="content plain"></div> +</div> +<div id="two" class="container none"> + <div class="content plain"></div> +</div> +<div id="three" class="container thin"> + <div class="content plain"></div> +</div> +<div id="four" class="container thin"> + <div class="content gradient"></div> +</div> +<div id="five" class="container auto"> + <div class="content gradient"></div> +</div> +<div id="six" class="container auto"> + <div class="content gradient"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006.html new file mode 100644 index 00000000000..42dbbd959d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006.html @@ -0,0 +1,89 @@ +<!doctype html> +<html class="reftest-wait"> +<title>CSS Scrollbars: paint test when updating scrollbar-width twice, with scrolling content</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev"> +<link rel="match" href="scrollbar-width-paint-006-ref.html"> +<link rel="help" href="https://www.w3.org/TR/css-scrollbars-1/" /> +<script src="/common/reftest-wait.js"></script> +<style> + body { + display: flex; + flex-wrap: wrap; + } + + .container { + scrollbar-gutter: stable; + overflow: auto; + flex: 0 0; + height: 200px; + min-width: 200px; + margin: 1px; + padding: 0px; + border: none; + background: deepskyblue; + } + + .content { + height: 300px; + width: 300px; + } + + .container.auto { + scrollbar-width: auto; + } + + .container.thin { + scrollbar-width: thin; + } + + .container.none { + scrollbar-width: none; + } + + .content.plain { + background: red; + } + + .content.gradient { + background: linear-gradient(135deg, red, blue); + } +</style> +<div id="one" class="container auto"> + <div class="content plain"></div> +</div> +<div id="two" class="container thin"> + <div class="content plain"></div> +</div> +<div id="three" class="container none"> + <div class="content plain"></div> +</div> +<div id="four" class="container auto"> + <div class="content gradient"></div> +</div> +<div id="five" class="container thin"> + <div class="content gradient"></div> +</div> +<div id="six" class="container none"> + <div class="content gradient"></div> +</div> +<script> +requestAnimationFrame(() => requestAnimationFrame(() => { + document.getElementById('one').style.scrollbarWidth = 'thin'; + document.getElementById('two').style.scrollbarWidth = 'auto'; + document.getElementById('three').style.scrollbarWidth = 'auto'; + document.getElementById('four').style.scrollbarWidth = 'none'; + document.getElementById('five').style.scrollbarWidth = 'none'; + document.getElementById('six').style.scrollbarWidth = 'thin'; + + requestAnimationFrame(() => requestAnimationFrame(() => { + document.getElementById('one').style.scrollbarWidth = 'none'; + document.getElementById('two').style.scrollbarWidth = 'none'; + document.getElementById('three').style.scrollbarWidth = 'thin'; + document.getElementById('four').style.scrollbarWidth = 'thin'; + document.getElementById('five').style.scrollbarWidth = 'auto'; + document.getElementById('six').style.scrollbarWidth = 'auto'; + + takeScreenshot(); + })); +})); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-013.html b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-013.html new file mode 100644 index 00000000000..8f0144077d3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/auto-013.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Last remembered size</title> +<link rel="author" title="Jihye Hong" href="mailto:jihye@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#last-remembered"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override"> +<link rel="help" href="https://drafts.csswg.org/css-contain-2/#content-visibility"> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/8407"> +<meta name="assert" content="Tests that content-visibility: auto forces contain-intrinsic-size to gain an auto value." /> + +<style> + #t1 { + position: absolute; + left: 0vmax; + content-visibility: auto; + contain-intrinsic-size: 1000vmax 1000vmax; + background: red; + } + #t1::before { + content: ""; + display: block; + width: 10px; + height: 10px; + } +</style> +<div id="t1"></div> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +function nextRendering() { + return new Promise(resolve => { + requestAnimationFrame(() => requestAnimationFrame(() => resolve())); + }); +} + +promise_test(async () => { + // Size normally. + await nextRendering(); + + assert_equals(t1.clientWidth, 10, "Sizing normally: clientWidth"); + assert_equals(t1.clientHeight, 10, "Sizing normally: clientHeight"); + + await nextRendering(); + + // Move off-screen the target. Same size as in previous step! + t1.style.left = "-200vmax"; + + assert_true(window.getComputedStyle(t1).containIntrinsicSize.includes("auto"), "containIntrinsicSize should be adjusted to auto"); + + await nextRendering(); + + assert_equals(t1.clientWidth, 10, "Sizing with new last remembered size: clientWidth"); + assert_equals(t1.clientHeight, 10, "Sizing with new last remembered size: clientHeight"); +}, 'content-visibility: auto forces contain-intrinsic-size to gain an auto value'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-combine-emphasis-notref.html b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-combine-emphasis-notref.html new file mode 100644 index 00000000000..c901600c58b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/reference/text-combine-emphasis-notref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +<style> +.foo { + font-size: 100px; + writing-mode: vertical-lr; + text-combine-upright: all; +} +</style> +</head> +<body> +This test makes sure that, when <code>text-combine-upright</code> and <code>text-emphasis</code> are used together, the emphasis mark doesn't disappear. The test passes if you see an emphasis mark to the right of the letter X below. +<p class="foo">X</p> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-combine-emphasis.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-combine-emphasis.html new file mode 100644 index 00000000000..752e335a1f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-combine-emphasis.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +<link rel="mismatch" href="reference/text-combine-emphasis-notref.html"> +<style> +.foo { + font-size: 100px; + writing-mode: vertical-lr; + text-combine-upright: all; + text-emphasis: filled; +} +</style> +</head> +<body> +This test makes sure that, when <code>text-combine-upright</code> and <code>text-emphasis</code> are used together, the emphasis mark doesn't disappear. The test passes if you see an emphasis mark to the right of the letter X below. +<p class="foo">X</p> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-1.html b/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-1.html new file mode 100644 index 00000000000..0192dfef692 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-1.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +<link rel="mismatch" href="reference/object-replacement-1-notref.html"> +</head> +<body> +This test makes sure that the U+FFFC OBJECT REPLACEMENT CHARACTER doesn't get deleted. The test passes if the letter below isn't at the left edge of the green box. +<div style="background: green; font-size: 100px; height: 300px;">é<span style="display: inline-block; height: 200px; width: 1px;"></span></div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-2.html b/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-2.html new file mode 100644 index 00000000000..14c5e3ba356 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/object-replacement-2.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +<link rel="mismatch" href="reference/object-replacement-2-notref.html"> +</head> +<body> +This test makes sure that the U+FFFC OBJECT REPLACEMENT CHARACTER doesn't get deleted. The test passes if the letter below isn't at the left edge of the green box. +<div style="background: green; font-size: 100px; height: 300px;">e<span style="display: inline-block; height: 200px; width: 1px;"></span></div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-1-notref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-1-notref.html new file mode 100644 index 00000000000..c4280f5fdd2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-1-notref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +</head> +<body> +This test makes sure that the U+FFFC OBJECT REPLACEMENT CHARACTER doesn't get deleted. The test passes if the letter below isn't at the left edge of the green box. +<div style="background: green; font-size: 100px; height: 300px;">é<span style="display: inline-block; height: 200px; width: 1px;"></span></div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-2-notref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-2-notref.html new file mode 100644 index 00000000000..644dfc4b025 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/object-replacement-2-notref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>CSS Text: U+FFFC OBJECT REPLACEMENT CHARACTER presence</title> +<link rel="author" title="Myles C. Maxfield" href="mailto:mmaxfield@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/"> +</head> +<body> +This test makes sure that the U+FFFC OBJECT REPLACEMENT CHARACTER doesn't get deleted. The test passes if the letter below isn't at the left edge of the green box. +<div style="background: green; font-size: 100px; height: 300px;">e<span style="display: inline-block; height: 200px; width: 1px;"></span></div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-number.html b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-number.html new file mode 100644 index 00000000000..14b69560cad --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-number.html @@ -0,0 +1,55 @@ +<!DOCTYPE HTML> +<title>Infinity and NaN: calc() serialization for number values.</title> +<link rel="help" href="https://drafts.csswg.org/css-values/#calc-type-checking"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../support/serialize-testcommon.js"></script> +<div id="target"></div> +<div id="log"></div> +<script> +function test_serialization(t,s, {prop="opacity"}={}) { + test_specified_serialization(prop, t, s) +} +//TEST CASE | EXPECTED +var test_map = { + "NaN" :"calc(NaN)", + "infinity" :"calc(infinity)", + "-infinity" :"calc(-infinity)", + "1 * NaN" :"calc(NaN)", + "1 * nan" :"calc(NaN)", + "1 * infinity / infinity" :"calc(NaN)", + "1 * 0 * infinity" :"calc(NaN)", + "1 * (infinity + -infinity)" :"calc(NaN)", + "1 * (-infinity + infinity)" :"calc(NaN)", + "1 * (infinity - infinity)" :"calc(NaN)", + "1 * infinity" :"calc(infinity)", + "1 * -infinity" :"calc(-infinity)", + "1 * iNFinIty" :"calc(infinity)", + "1 * (infinity + infinity)" :"calc(infinity)", + "1 * (-infinity + -infinity)" :"calc(-infinity)", + "1 * 1/infinity" :"calc(0)", + "1 * infinity * infinity" :"calc(infinity)", + "1 * -infinity * -infinity" :"calc(infinity)", + "1 * max(INFinity*3, 0)" :"calc(infinity)", + "1 * min(inFInity*4, 0)" :"calc(0)", + "1 * max(nAn*2, 0)" :"calc(NaN)", + "1 * min(nan*3, 0)" :"calc(NaN)", + "1 * clamp(-INFINITY*20, 0, infiniTY*10)" :"calc(0)", + + "1 * max(NaN, min(0,10))" :"calc(NaN)", + "1 * clamp(NaN, 0, 10)" :"calc(NaN)", + + "1 * max(0, min(10, NaN))" :"calc(NaN)", + "1 * clamp(0, 10, NaN)" :"calc(NaN)", + + "1 * max(0, min(NaN, 10))" :"calc(NaN)", + "1 * clamp(0, NaN, 10)" :"calc(NaN)", + + "1 * clamp(-Infinity, 0, infinity)" :"calc(0)", + "1 * clamp(-inFinity, infinity, 10)" :"calc(10)", +}; + +for (var exp in test_map) { + test_serialization("calc("+exp+")", test_map[exp]); +} +</script> diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-linear-radial-conic-gradient-001.html b/tests/wpt/web-platform-tests/css/css-values/calc-linear-radial-conic-gradient-001.html new file mode 100644 index 00000000000..ded5f0c37e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/calc-linear-radial-conic-gradient-001.html @@ -0,0 +1,131 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values and Units Test: computed value of 'background-image: [ linear | radial | conic ]-gradient()' with calc() function</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-computed-value"> + + <meta name="flags" content=""> + <meta content="This test verifies how calc() functions inside 6 linear-gradient(), 1 radial-gradient() and 1 conic-gradient() are computed for 'background-image'." name="assert"> + + <!-- + + Blink (Chromium) Bug report 947377: [css-values-3] Values inside <image>s are not computed correctly / reflected correctly from getComputedStyle + https://bugs.chromium.org/p/chromium/issues/detail?id=947377 + + WebKit (Safari) Bug report 196389: [css-values-3] Computed value of calc() expression in linear-gradient function incorrect + https://bugs.webkit.org/show_bug.cgi?id=196389 + + --> + + <style> + div#target + { + background-image: linear-gradient(yellow, red); + height: 100px; + } + </style> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <div id="target"></div> + + <script> + function startTesting() + { + + var targetElement = document.getElementById("target"); + + function verifyComputedStyle(property_name, specified_value, expected_value, description) + { + + test(function() + { + + targetElement.style.setProperty(property_name, "initial"); + + /* + The purpose of setting to the initial is to act as a fallback + value in case the calc() function in the specified value + fails or in case it generates an invalid value. Since we + are running 6 consecutive tests on the same element, + then it is necessary to 'reset' its property to the + initial value. + */ + + targetElement.style.setProperty(property_name, specified_value); + + assert_equals(getComputedStyle(targetElement)[property_name], expected_value); + + }, description); + } + + /* verifyComputedStyle(property_name, specified_value, expected_value, description) */ + + /* LINEAR */ + + verifyComputedStyle( + "background-image", + "linear-gradient(rgb(0, 128, 0) calc(0%), rgb(0, 0, 255))", + "linear-gradient(rgb(0, 128, 0) 0%, rgb(0, 0, 255))", + "testing background-image: linear-gradient(rgb(0, 128, 0) calc(0%), rgb(0, 0, 255))"); + + verifyComputedStyle( + "background-image", + "linear-gradient(calc(90deg), rgb(0, 128, 0), rgb(0, 0, 255))", + "linear-gradient(90deg, rgb(0, 128, 0), rgb(0, 0, 255))", + "testing background-image: linear-gradient(calc(90deg), rgb(0, 128, 0), rgb(0, 0, 255))"); + + verifyComputedStyle( + "background-image", + "linear-gradient(calc(90deg), rgb(0, 128, 0) calc(0%), rgb(0, 0, 255))", + "linear-gradient(90deg, rgb(0, 128, 0) 0%, rgb(0, 0, 255))", + "testing background-position: linear-gradient(calc(90deg), rgb(0, 128, 0) calc(0%), rgb(0, 0, 255))"); + + verifyComputedStyle( + "background-image", + "linear-gradient(calc(0.1turn + 0.15turn), rgb(0, 128, 0), rgb(0, 0, 255))", + "linear-gradient(90deg, rgb(0, 128, 0), rgb(0, 0, 255))", + "testing background-image: linear-gradient(calc(0.1turn + 0.15turn), rgb(0, 128, 0), rgb(0, 0, 255))"); + + verifyComputedStyle( + "background-image", + "linear-gradient(calc(150grad - 50grad), rgb(0, 128, 0), rgb(0, 0, 255))", + "linear-gradient(90deg, rgb(0, 128, 0), rgb(0, 0, 255))", + "testing background-image: linear-gradient(calc(150grad - 50grad), rgb(0, 128, 0), rgb(0, 0, 255))"); + + verifyComputedStyle( + "background-image", + "linear-gradient(calc(200grad - 90deg), rgb(0, 128, 0), rgb(0, 0, 255))", + "linear-gradient(90deg, rgb(0, 128, 0), rgb(0, 0, 255))", + "testing background-image: linear-gradient(calc(200grad - 90deg), rgb(0, 128, 0), rgb(0, 0, 255))"); + + + /* RADIAL */ + + verifyComputedStyle( + "background-image", + "radial-gradient(rgb(0, 128, 0) calc(10% + 20%), rgb(0, 0, 255) calc(30% + 40%))", + "radial-gradient(rgb(0, 128, 0) 30%, rgb(0, 0, 255) 70%)", + "testing background-image: radial-gradient(rgb(0, 128, 0) calc(10% + 20%), rgb(0, 0, 255) calc(30% + 40%))"); + + + /* CONIC */ + + verifyComputedStyle( + "background-image", + "conic-gradient(rgb(0, 128, 0) calc(50% + 10%), rgb(0, 0, 255) calc(60% + 20%))", + "conic-gradient(rgb(0, 128, 0) 60%, rgb(0, 0, 255) 80%)", + "testing background-image: conic-gradient(rgb(0, 128, 0) calc(50% + 10%), rgb(0, 0, 255) calc(60% + 20%))"); + + /* verifyComputedStyle(property_name, specified_value, expected_value, description) */ + + } + + startTesting(); + + </script> diff --git a/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-002.html b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-002.html new file mode 100644 index 00000000000..4be8c292b18 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-calc-mixed-units-002.html @@ -0,0 +1,222 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values Test: computed value of 8 calc() values that involve mixed units</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-computed-value"> + + <meta name="flags" content=""> + <meta content="This meta-test verifies that terms with a length value that can be resolved at computed-value time must be resolved and must be absolutized to 'px'. In this meta-test, we test percentage unit (%), three font-relative length units (em, rem, lh) and some absolute length units (pc, pt, px, cm, mm, Q, in). " name="assert"> + + <!-- + + NOT Tested in this test are: + + Viewport-percentage Length units: + vh, svh, lvh, dvh, + vw, svw, lvw, dvw, + vmin, svmin, lvmin, dvmin, + vmax, svmax, lvmax, dvmax, + vi, svi, lvi, dvi, + vb, svb, lvb, dvb + + and these of font-relative length units: + ex, rex, + cap, rcap, + ch, rch, + ic, ric, + rlh + + --> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <style> + html + { + font-size: 30px; /* for checking rem unit */ + } + + body + { + font-size: 16px; + line-height: 1.25; /* computed value: 20px; for checking lh unit */ + height: 500px; + margin: 20px; + width: 520px; + } + + div#target + { + height: 100px; + width: 100px; + } + </style> + + <div id="target"></div> + + <script> + function startTesting() + { + + var targetElement = document.getElementById("target"); + + function verifyComputedStyle(property_name, specified_value, expected_value, description) + { + + test(function() + { + + targetElement.style.setProperty(property_name, "initial"); + + targetElement.style.setProperty(property_name, specified_value); + + assert_equals(getComputedStyle(targetElement)[property_name], expected_value); + + }, description); + } + + verifyComputedStyle("width", "calc(10% + 2em)", "84px", "testing width: calc(10% + 2em)"); + + /* + + 520px mult 10% == 52px + + + + + 16px mult 2 == 32px + + ======= + + 84px + + */ + + + verifyComputedStyle("width", "calc(5% + 4rem)", "146px", "testing width: calc(5% + 4rem)"); + + /* + + 520px mult 5% == 26px + + + + + 30px mult 4 == 120px + + ======= + + 146px + + */ + + + verifyComputedStyle("width", "calc(8lh + 7px)", "167px", "testing width: calc(8lh + 7px)"); + + /* + + 8 mult 20px == 160px + + + + + 7px + + ======= + + 167px + + */ + + + verifyComputedStyle("height", "calc(10% + 6pt)", "58px", "testing height: calc(10% + 6pt)"); + + /* + + 10% mult 500 == 50px + + + + + 6pt == 8px + + ======== + + 58px + + */ + + + verifyComputedStyle("width", "calc(4em + 2.6458333cm)", "164px", "testing width: calc(4em + 2.6458333cm)"); + + /* + + 4 mult 16px == 64px + + + + + 2.6458333cm == 100px + + ======== + + 164px + + */ + + + verifyComputedStyle("height", "calc(5em + 26.458333mm)", "180px", "testing height: calc(5em + 26.458333mm)"); + + /* + + 5 mult 16px == 80px + + + + + 26.458333mm == 100px + + ======== + + 180px + + */ + + + verifyComputedStyle("width", "calc(2in + 101.6Q)", "288px", "testing width: calc(2in + 101.6Q)"); + + /* + + 2 mult 96px == 192px + + + + + 101.6Q == 96px + + ======== + + 288px + + */ + + + verifyComputedStyle("height", "calc(1pc + 3pt)", "20px", "testing height: calc(1pc + 3pt)"); + + /* + + 1pc == 16px + + + + + 3pt == 4px + + ======= + + 20px + + */ + + } + + startTesting(); + + </script> diff --git a/tests/wpt/web-platform-tests/css/cssom/selectorSerialize.html b/tests/wpt/web-platform-tests/css/cssom/selectorSerialize.html index f3a402f5f07..ab485518161 100644 --- a/tests/wpt/web-platform-tests/css/cssom/selectorSerialize.html +++ b/tests/wpt/web-platform-tests/css/cssom/selectorSerialize.html @@ -97,7 +97,7 @@ assert_selector_serializes_to(' :not( :hover ) ', ':not(:hover)'); }, 'single pseudo (simple) selector ":not" which accepts arguments in the sequence of simple selectors that is not a universal selector') - var escaped_ns_rule = "@namespace ns\\:odd url(ns);"; + const escaped_ns_rule = "@namespace ns\\:odd url(ns);"; test(function() { assert_selector_serializes_to("[ns\\:foo]", "[ns\\:foo]"); }, "escaped character in attribute name"); @@ -116,6 +116,26 @@ test(function() { assert_selector_serializes_to(escaped_ns_rule + "[ns\\:odd|odd\\:name]", "[ns\\:odd|odd\\:name]"); }, "escaped character in both attribute prefix and name"); + + test(() => { + assert_selector_serializes_to("\\\\", "\\\\"); + }, "escaped character (\\) in element name"); + test(() => { + assert_selector_serializes_to("*|\\\\", "\\\\"); + }, "escaped character (\\) in element name with any namespace without default"); + test(() => { + assert_selector_serializes_to("@namespace 'blah'; *|\\\\", "*|\\\\"); + }, "escaped character (\\) in element name with any namespace with default"); + test(() => { + assert_selector_serializes_to("|\\\\", "|\\\\"); + }, "escaped character (\\) in element name with no namespace"); + + const element_escaped_ns_rule = "@namespace x\\* 'blah';"; + test(() => { + assert_selector_serializes_to(element_escaped_ns_rule + "x\\*|test", "x\\*|test"); + }, "escaped character (*) in element prefix"); + + // TODO: https://github.com/w3c/csswg-drafts/issues/8911 </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001.html index d8392607569..d4e903e69df 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <coord-box> <border-box></title> +<meta name=fuzzy content="0-20;0-200"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-coord-box-001-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-coord-box"> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape.html deleted file mode 100644 index 2750fd9f2fc..00000000000 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-shape.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>CSS Motion Path: path(basic-shape) paths</title> - <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-path-property"> - <link rel="match" href="offset-path-shape-ref.html"> - <meta name="assert" content="This tests that path(<basic-shape>) generates a rotation and translation."> - <style> - #target { - position: absolute; - left: 300px; - top: 0px; - width: 300px; - height: 200px; - background-color: lime; - transform-origin: 0px 0px; - offset-path: inset(22% 12% 15px 35px); - } - </style> - </head> - <body> - <div id="target"></div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-computed.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-computed.html index c2f9d4bce90..7b5a8c16438 100644 --- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-computed.html +++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-computed.html @@ -21,6 +21,11 @@ test_computed_value("offset-path", "ray(200grad farthest-side)", "ray(180deg far test_computed_value("offset-path", "ray(270deg farthest-corner contain)"); test_computed_value("offset-path", "ray(-720deg sides)"); test_computed_value("offset-path", "ray(calc(180deg - 45deg) farthest-side)", "ray(135deg farthest-side)"); +test_computed_value("offset-path", "ray(0deg at 100px 100px)"); +test_computed_value("offset-path", "ray(0deg sides at center center)", "ray(0deg sides at 50% 50%)"); +test_computed_value("offset-path", "ray(0deg at center center sides)", "ray(0deg sides at 50% 50%)"); +test_computed_value("offset-path", "ray(0deg at center center contain)", "ray(0deg contain at 50% 50%)"); +test_computed_value("offset-path", "ray(at 10px 10px 0deg contain)", "ray(0deg contain at 10px 10px)"); // It's unclear about the normalization at computed time, so we accept both // cases for now. diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html index 466e8610fdb..f36de7c76fc 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html @@ -104,12 +104,14 @@ assert_equals(getComputedStyle(subject2).color, "rgb(0, 0, 0)"); }, "ancestor should be black"); + let hovermeRect = hoverme.getBoundingClientRect(); + let focusme1Rect = focusme1.getBoundingClientRect(); new test_driver.Actions() - .pointerMove(0, 0, {origin: hoverme}) + .pointerMove(hovermeRect.x + 1, hovermeRect.y + 1, {origin: "viewport"}) .pointerDown() .pointerUp() - .pointerMove(0, 0, {origin: focusme1}) + .pointerMove(focusme1Rect.x + 1, focusme1Rect.y + 1, {origin: "viewport"}) .pointerDown() .pointerUp() .send(); -</script>
\ No newline at end of file +</script> diff --git a/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html b/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html index 5b75fc651fc..b08cd120f63 100644 --- a/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html +++ b/tests/wpt/web-platform-tests/custom-elements/CustomElementRegistry.html @@ -624,6 +624,45 @@ test(function () { }, 'customElements.get return the constructor of the entry with the given name when there is a matching entry.'); test(function () { + assert_equals(customElements.getName(class extends HTMLElement {}), null); +}, 'customElements.getName must return null when the registry does not contain an entry with the given constructor'); + +test(function () { + assert_throws_js(TypeError, function () { customElements.getName(undefined); }, + 'customElements.getName must throw a TypeError when the element interface is undefined'); + assert_throws_js(TypeError, function () { customElements.getName(null); }, + 'customElements.getName must throw a TypeError when the element interface is null'); + assert_throws_js(TypeError, function () { customElements.getName('foo-bar'); }, + 'customElements.getName must throw a TypeError when the element interface is a string'); + assert_throws_js(TypeError, function () { customElements.getName(1); }, + 'customElements.getName must throw a TypeError when the element interface is a number'); + assert_throws_js(TypeError, function () { customElements.getName({}); }, + 'customElements.getName must throw a TypeError when the element interface is an object'); + assert_throws_js(TypeError, function () { customElements.getName([]) }, + 'customElements.getName must throw a TypeError when the element interface is an array'); +}, 'customElements.getName must throw when the element interface is not a constructor'); + +test(function () { + class OtherExistingCustomElement extends HTMLElement {}; + class SecondExistingCustomElement extends HTMLElement {}; + assert_throws_js(TypeError, function () { customElements.getName(customElements.getName(OtherExistingCustomElement)); }, + 'customElements.getName must throw a TypeError when the element interface is undefined'); + customElements.define('other-existing-custom-element', OtherExistingCustomElement); + customElements.define('second-existing-custom-element', SecondExistingCustomElement); + assert_equals(customElements.getName(OtherExistingCustomElement), 'other-existing-custom-element'); + assert_equals(customElements.getName(SecondExistingCustomElement), 'second-existing-custom-element'); +}, 'customElements.getName returns the name of the entry with the given constructor when there is a matching entry.'); + +test(function () { + class ButtonCustomBuiltInElement extends HTMLButtonElement {}; + class InputCustomBuiltInElement extends HTMLInputElement {}; + customElements.define('button-custom-built-in-element', ButtonCustomBuiltInElement, { extends: 'button' }); + customElements.define('input-custom-built-in-element', InputCustomBuiltInElement, { extends: 'input' }); + assert_equals(customElements.getName(ButtonCustomBuiltInElement), 'button-custom-built-in-element'); + assert_equals(customElements.getName(InputCustomBuiltInElement), 'input-custom-built-in-element'); +}, 'customElements.getName returns the name of the entry with the given customized built in constructor when there is a matching entry.'); + +test(function () { assert_true(customElements.whenDefined('some-name') instanceof Promise); }, 'customElements.whenDefined must return a promise for a valid custom element name'); diff --git a/tests/wpt/web-platform-tests/document-picture-in-picture/beforeunload-is-disabled.https.html b/tests/wpt/web-platform-tests/document-picture-in-picture/beforeunload-is-disabled.https.html new file mode 100644 index 00000000000..3dd2b8a6d19 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-picture-in-picture/beforeunload-is-disabled.https.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<title>Test that onbeforeunload is disabled for document picture in picture</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<body> + <script> + promise_test(async (t) => { + await test_driver.bless('request PiP window from top window'); + const pipWindow = await documentPictureInPicture.requestWindow(); + var onbeforeunloadDisabled = true; + pipWindow.window.onbeforeunload = () => { + onbeforeunloadDisabled = false; + return "This is a test"; + } + pipWindow.close(); + assert_true(onbeforeunloadDisabled, 'onbeforeunload should be disabled for document picture in picture'); + }); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/dom/parts/basic-dom-part-objects.tentative.html b/tests/wpt/web-platform-tests/dom/parts/basic-dom-part-objects.tentative.html new file mode 100644 index 00000000000..175f5d555b9 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/parts/basic-dom-part-objects.tentative.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>DOM Parts: Basic object structure</title> +<meta name="author" href="mailto:masonf@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<div id=target style="display:none"> + Imperative test element + <span></span> A + <span></span> B + <span></span> C +</div> + +<div style="display:none"> + Declarative syntax + <h1 id="name">First<?child-node-part name?>Middle<?/child-node-part?>Last</h1> + Email: <?node-part email-link?><a id="link"></a> +</div> + +<script> +test(() => { + const target = document.getElementById('target'); + assert_true(target.children.length >= 3); + const documentPart = document.getDocumentPart(); + assert_true(documentPart instanceof DocumentPart,'document should have a DocumentPart'); + const parts = documentPart.getParts(); + assert_true(!!parts,'getParts should return something'); + const nodePart = new NodePart(target); + assert_true(!!nodePart); + assert_equals(nodePart.node,target); + const childNodePart = new ChildNodePart(target.children[0], target.children[1]); + assert_true(!!childNodePart); + assert_equals(childNodePart.previousSibling,target.children[0]); + assert_equals(childNodePart.nextSibling,target.children[1]); +}, 'Basic imperative DOM Parts object construction'); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/README.md b/tests/wpt/web-platform-tests/fenced-frame/README.md index 6055d17e978..e3c486b572e 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/README.md +++ b/tests/wpt/web-platform-tests/fenced-frame/README.md @@ -2,12 +2,7 @@ This directory contains [Web Platform Tests](third_party/blink/web_tests/external/wpt) for the [Fenced -Frames](https://github.com/shivanigithub/fenced-frame) feature. - -These tests are generally intended to be upstreamed to the Web Platform Tests -repository (i.e., moved from `wpt_internal/fenced_frame/` to `external/wpt/`). -There are a few reasons why we're holding off doing that right now, see [Fenced -Frames Testing Plan > Web Platform Tests](https://docs.google.com/document/d/1A4Dkw8PesXSqmRLy2Xa-KxpXgIZUT4rPocbxMBuP_3E/edit#heading=h.3plnzof3mgvv). +Frames](https://github.com/shivanigithub/fenced-frame) feature.). In general, these tests should follow Chromium's [web tests guidelines](docs/testing/web_tests_tips.md) and [web-platform-tests @@ -16,14 +11,11 @@ how to use the specific fenced frame testing infrastructure. ## How to run tests Fenced frames feature needs to be enabled to run tests. A convenient way to -do this is to define the following variables for fenced frames [virtual test +do this is to define the following variable for fenced frames [virtual test suites](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_tests.md#virtual-test-suites) directories. ```bash -# Fenced frame MPArch implementation -export MPTEST=virtual/fenced-frame-mparch/wpt_internal/fenced_frame -# Fenced frame ShadowDOM implementation -export SDTEST=virtual/fenced-frame-shadow-dom/wpt_internal/fenced_frame +export MPTEST=virtual/fenced-frame-mparch/external/wpt/fenced-frame ``` Then run tests under the virtual test suite. This will include necessary diff --git a/tests/wpt/web-platform-tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html b/tests/wpt/web-platform-tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html index 910b2ba7921..df50a1d2232 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html +++ b/tests/wpt/web-platform-tests/fenced-frame/history-back-and-forward-should-not-work-in-fenced-tree.https.html @@ -8,6 +8,8 @@ <body> <script> + // TODO(crbug.com/1262022): Remove references to ShadowDOM now that the + // implementation is obsolete. const test_desc = "history.back() and history.forward() should be " + "restricted within a fenced tree in shadowDOM thus have" + " no effect when called within a fenced tree scope."; diff --git a/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js b/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js index 4f33284d0c7..899d41d676a 100644 --- a/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js @@ -14,16 +14,30 @@ const { HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT } = get_host_info(); -for (const method of ['GET', 'POST']) { - promise_test(async (test) => { - const token1 = token(); - const iframe = document.createElement('iframe'); - iframe.src = getKeepAliveIframeUrl(token1, method); - document.body.appendChild(iframe); - await iframeLoaded(iframe); - assert_equals(await getTokenFromMessage(), token1); - iframe.remove(); +/** + * In a different-site iframe, test to fetch a keepalive URL on the specified + * document event. + */ +function keepaliveSimpleRequestTest(method) { + for (const evt of ['load', 'pagehide', 'unload']) { + const desc = + `[keepalive] simple ${method} request on '${evt}' [no payload]`; + promise_test(async (test) => { + const token1 = token(); + const iframe = document.createElement('iframe'); + iframe.src = getKeepAliveIframeUrl(token1, method, {sendOn: evt}); + document.body.appendChild(iframe); + await iframeLoaded(iframe); + if (evt != 'load') { + iframe.remove(); + } + assert_equals(await getTokenFromMessage(), token1); + + assertStashedTokenAsync(desc, token1); + }, `${desc}; setting up`); + } +} - assertStashedTokenAsync(`simple ${method} request: no payload`, token1); - }, `simple ${method} request: no payload; setting up`); +for (const method of ['GET', 'POST']) { + keepaliveSimpleRequestTest(method); } diff --git a/tests/wpt/web-platform-tests/fetch/api/cors/cors-basic.any.js b/tests/wpt/web-platform-tests/fetch/api/cors/cors-basic.any.js index 23f5f91c87d..95de0af2d8f 100644 --- a/tests/wpt/web-platform-tests/fetch/api/cors/cors-basic.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/cors/cors-basic.any.js @@ -1,37 +1,43 @@ // META: script=../resources/utils.js // META: script=/common/get-host-info.sub.js +const { + HTTPS_ORIGIN, + HTTP_ORIGIN_WITH_DIFFERENT_PORT, + HTTP_REMOTE_ORIGIN, + HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, + HTTPS_REMOTE_ORIGIN, +} = get_host_info(); + function cors(desc, origin) { - var url = origin + dirname(location.pathname); - var urlParameters = "?pipe=header(Access-Control-Allow-Origin,*)"; + const url = `${origin}${dirname(location.pathname)}${RESOURCES_DIR}top.txt`; + const urlAllowCors = `${url}?pipe=header(Access-Control-Allow-Origin,*)`; - promise_test(function(test) { - return fetch(url + RESOURCES_DIR + "top.txt" + urlParameters, {"mode": "no-cors"} ).then(function(resp) { + promise_test((test) => { + return fetch(urlAllowCors, {'mode': 'no-cors'}).then((resp) => { assert_equals(resp.status, 0, "Opaque filter: status is 0"); assert_equals(resp.statusText, "", "Opaque filter: statusText is \"\""); assert_equals(resp.type , "opaque", "Opaque filter: response's type is opaque"); - return resp.text().then(function(value) { + return resp.text().then((value) => { assert_equals(value, "", "Opaque response should have an empty body"); }); }); - }, desc + " [no-cors mode]"); + }, `${desc} [no-cors mode]`); - promise_test(function(test) { - return promise_rejects_js(test, TypeError, fetch(url + RESOURCES_DIR + "top.txt", {"mode": "cors"})); - }, desc + " [server forbid CORS]"); + promise_test((test) => { + return promise_rejects_js(test, TypeError, fetch(url, {'mode': 'cors'})); + }, `${desc} [server forbid CORS]`); - promise_test(function(test) { - return fetch(url + RESOURCES_DIR + "top.txt" + urlParameters, {"mode": "cors"} ).then(function(resp) { + promise_test((test) => { + return fetch(urlAllowCors, {'mode': 'cors'}).then((resp) => { assert_equals(resp.status, 200, "Fetch's response's status is 200"); assert_equals(resp.type , "cors", "CORS response's type is cors"); }); - }, desc + " [cors mode]"); + }, `${desc} [cors mode]`); } -var host_info = get_host_info(); - -cors("Same domain different port", host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT); -cors("Same domain different protocol different port", host_info.HTTPS_ORIGIN); -cors("Cross domain basic usage", host_info.HTTP_REMOTE_ORIGIN); -cors("Cross domain different port", host_info.HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT); -cors("Cross domain different protocol", host_info.HTTPS_REMOTE_ORIGIN); +cors('Same domain different port', HTTP_ORIGIN_WITH_DIFFERENT_PORT); +cors('Same domain different protocol different port', HTTPS_ORIGIN); +cors('Cross domain basic usage', HTTP_REMOTE_ORIGIN); +cors('Cross domain different port', HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT); +cors('Cross domain different protocol', HTTPS_REMOTE_ORIGIN); diff --git a/tests/wpt/web-platform-tests/fetch/api/cors/cors-keepalive.any.js b/tests/wpt/web-platform-tests/fetch/api/cors/cors-keepalive.any.js new file mode 100644 index 00000000000..2df0c08b17f --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/api/cors/cors-keepalive.any.js @@ -0,0 +1,117 @@ +// META: global=window +// META: title=Fetch API: keepalive handling +// META: script=/resources/testharness.js +// META: script=/resources/testharnessreport.js +// META: script=/common/utils.js +// META: script=/common/get-host-info.sub.js +// META: script=../resources/keepalive-helper.js +// META: script=../resources/utils.js + +'use strict'; + +const { + HTTP_NOTSAMESITE_ORIGIN, + HTTPS_ORIGIN, + HTTP_ORIGIN_WITH_DIFFERENT_PORT, + HTTP_REMOTE_ORIGIN, + HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, + HTTPS_REMOTE_ORIGIN, +} = get_host_info(); + +/** + * Tests to cover the basic behaviors of keepalive + cors/no-cors mode requests + * to different `origin` when the initiator document is still alive. They should + * behave the same as without setting keepalive. + */ +function keepaliveCorsBasicTest(desc, origin) { + const url = `${origin}${dirname(location.pathname)}${RESOURCES_DIR}top.txt`; + const urlAllowCors = `${url}?pipe=header(Access-Control-Allow-Origin,*)`; + + promise_test((test) => { + return fetch(urlAllowCors, {keepalive: true, 'mode': 'no-cors'}) + .then((resp) => { + assert_equals(resp.status, 0, 'Opaque filter: status is 0'); + assert_equals(resp.statusText, '', 'Opaque filter: statusText is ""'); + assert_equals( + resp.type, 'opaque', 'Opaque filter: response\'s type is opaque'); + return resp.text().then((value) => { + assert_equals( + value, '', 'Opaque response should have an empty body'); + }); + }); + }, `${desc} [no-cors mode]`); + + promise_test((test) => { + return promise_rejects_js( + test, TypeError, fetch(url, {keepalive: true, 'mode': 'cors'})); + }, `${desc} [cors mode, server forbid CORS]`); + + promise_test((test) => { + return fetch(urlAllowCors, {keepalive: true, 'mode': 'cors'}) + .then((resp) => { + assert_equals(resp.status, 200, 'Fetch\'s response\'s status is 200'); + assert_equals(resp.type, 'cors', 'CORS response\'s type is cors'); + }); + }, `${desc} [cors mode]`); +} + +keepaliveCorsBasicTest( + `[keepalive] Same domain different port`, HTTP_ORIGIN_WITH_DIFFERENT_PORT); +keepaliveCorsBasicTest( + `[keepalive] Same domain different protocol different port`, HTTPS_ORIGIN); +keepaliveCorsBasicTest( + `[keepalive] Cross domain basic usage`, HTTP_REMOTE_ORIGIN); +keepaliveCorsBasicTest( + `[keepalive] Cross domain different port`, + HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT); +keepaliveCorsBasicTest( + `[keepalive] Cross domain different protocol`, HTTPS_REMOTE_ORIGIN); + +/** + * In a same-site iframe, and in `unload` event handler, test to fetch + * a keepalive URL that involves in different cors modes. + */ +function keepaliveCorsInUnloadTest(description, origin, method) { + const evt = 'unload'; + for (const mode of ['no-cors', 'cors']) { + for (const disallowOrigin of [false, true]) { + const desc = `${description} ${method} request in ${evt} [${mode} mode` + + (disallowOrigin ? `, server forbid CORS]` : `]`); + const shouldPass = !disallowOrigin || mode === 'no-cors'; + promise_test(async (test) => { + const token1 = token(); + const iframe = document.createElement('iframe'); + iframe.src = getKeepAliveIframeUrl(token1, method, { + frameOrigin: '', + requestOrigin: origin, + sendOn: evt, + mode: mode, + disallowOrigin + }); + document.body.appendChild(iframe); + await iframeLoaded(iframe); + iframe.remove(); + assert_equals(await getTokenFromMessage(), token1); + + assertStashedTokenAsync(desc, token1, {shouldPass}); + }, `${desc}; setting up`); + } + } +} + +for (const method of ['GET', 'POST']) { + keepaliveCorsInUnloadTest( + '[keepalive] Same domain different port', HTTP_ORIGIN_WITH_DIFFERENT_PORT, + method); + keepaliveCorsInUnloadTest( + `[keepalive] Same domain different protocol different port`, HTTPS_ORIGIN, + method); + keepaliveCorsInUnloadTest( + `[keepalive] Cross domain basic usage`, HTTP_REMOTE_ORIGIN, method); + keepaliveCorsInUnloadTest( + `[keepalive] Cross domain different port`, + HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, method); + keepaliveCorsInUnloadTest( + `[keepalive] Cross domain different protocol`, HTTPS_REMOTE_ORIGIN, + method); +} diff --git a/tests/wpt/web-platform-tests/fetch/api/request/destination/resources/dummy_video.webm b/tests/wpt/web-platform-tests/fetch/api/request/destination/resources/dummy_video.webm Binary files differnew file mode 100644 index 00000000000..c3d433a3e02 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/api/request/destination/resources/dummy_video.webm diff --git a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js index c7048d1ff33..ad1d4b2c7c3 100644 --- a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js +++ b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js @@ -1,19 +1,35 @@ // Utility functions to help testing keepalive requests. -// Returns a different-site URL to an iframe that loads a keepalive URL. +// Returns a URL to an iframe that loads a keepalive URL on iframe loaded. // // The keepalive URL points to a target that stores `token`. The token will then -// be posted back to parent document. +// be posted back on iframe loaded to the parent document. // `method` defaults to GET. -// `sendOnPagehide` to tell if request should be sent on pagehide instead. -function getKeepAliveIframeUrl(token, method, sendOnPagehide = false) { +// `frameOrigin` to specify the origin of the iframe to load. If not set, +// default to a different site origin. +// `requestOrigin` to specify the origin of the fetch request target. +// `sendOn` to specify the name of the event when the keepalive request should +// be sent instead of the default 'load'. +// `mode` to specify the fetch request's CORS mode. +// `disallowOrigin` to ask the iframe to set up a server that forbids CORS +// requests. +function getKeepAliveIframeUrl(token, method, { + frameOrigin = 'DEFAULT', + requestOrigin = '', + sendOn = 'load', + mode = 'cors', + disallowOrigin = false +} = {}) { const https = location.protocol.startsWith('https'); - const frameOrigin = - get_host_info()[https ? 'HTTPS_NOTSAMESITE_ORIGIN' : 'HTTP_NOTSAMESITE_ORIGIN']; + frameOrigin = frameOrigin === 'DEFAULT' ? + get_host_info()[https ? 'HTTPS_NOTSAMESITE_ORIGIN' : 'HTTP_NOTSAMESITE_ORIGIN'] : + frameOrigin; return `${frameOrigin}/fetch/api/resources/keepalive-iframe.html?` + `token=${token}&` + `method=${method}&` + - `sendOnPagehide=${sendOnPagehide}`; + `sendOn=${sendOn}&` + + `mode=${mode}&` + (disallowOrigin ? `disallowOrigin=1&` : ``) + + `origin=${requestOrigin}`; } // Returns a different-site URL to an iframe that loads a keepalive URL. diff --git a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-iframe.html b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-iframe.html index ac00f3a331a..335a1f8e318 100644 --- a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-iframe.html +++ b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-iframe.html @@ -3,12 +3,18 @@ <meta charset="utf-8"> <script> const SEARCH_PARAMS = new URL(location.href).searchParams; +const ORIGIN = SEARCH_PARAMS.get('origin') || ''; const TOKEN = SEARCH_PARAMS.get('token') || ''; const METHOD = SEARCH_PARAMS.get('method') || 'GET'; -const url = `/fetch/api/resources/stash-put.py?key=${TOKEN}&value=on`; +const SEND_ON_EVENT = SEARCH_PARAMS.get('sendOn') || 'load'; +const MODE = SEARCH_PARAMS.get('mode') || 'cors'; +const DISALLOW_ORIGIN = SEARCH_PARAMS.get('disallow_origin') || ''; +// CORS requests are allowed by this URL by default. +const url = `${ORIGIN}/fetch/api/resources/stash-put.py?key=${TOKEN}&value=on` + +(DISALLOW_ORIGIN ? `&disallow_origin=1` : ''); -addEventListener('load', () => { - let p = fetch(url, {keepalive: true, method: METHOD}); +addEventListener(SEND_ON_EVENT, () => { + let p = fetch(url, {keepalive: true, method: METHOD, mode: MODE}); window.parent.postMessage(TOKEN, '*'); }); </script> diff --git a/tests/wpt/web-platform-tests/fetch/api/resources/stash-put.py b/tests/wpt/web-platform-tests/fetch/api/resources/stash-put.py index dbc7ceebb88..0530e1ba5b4 100644 --- a/tests/wpt/web-platform-tests/fetch/api/resources/stash-put.py +++ b/tests/wpt/web-platform-tests/fetch/api/resources/stash-put.py @@ -1,17 +1,19 @@ from wptserve.utils import isomorphic_decode def main(request, response): - if request.method == u'OPTIONS': - # CORS preflight - response.headers.set(b'Access-Control-Allow-Origin', b'*') - response.headers.set(b'Access-Control-Allow-Methods', b'*') - response.headers.set(b'Access-Control-Allow-Headers', b'*') - return 'done' + if request.method == u'OPTIONS': + # CORS preflight + response.headers.set(b'Access-Control-Allow-Origin', b'*') + response.headers.set(b'Access-Control-Allow-Methods', b'*') + response.headers.set(b'Access-Control-Allow-Headers', b'*') + return 'done' + + url_dir = u'/'.join(request.url_parts.path.split(u'/')[:-1]) + u'/' + key = request.GET.first(b'key') + value = request.GET.first(b'value') + # value here must be a text string. It will be json.dump()'ed in stash-take.py. + request.server.stash.put(key, isomorphic_decode(value), url_dir) - url_dir = u'/'.join(request.url_parts.path.split(u'/')[:-1]) + u'/' - key = request.GET.first(b"key") - value = request.GET.first(b"value") - # value here must be a text string. It will be json.dump()'ed in stash-take.py. - request.server.stash.put(key, isomorphic_decode(value), url_dir) + if b'disallow_origin' not in request.GET: response.headers.set(b'Access-Control-Allow-Origin', b'*') - return "done" + return 'done' diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js b/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js new file mode 100644 index 00000000000..2dff325e3e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame-subresource-fetch.tentative.https.window.js @@ -0,0 +1,330 @@ +// META: script=/common/subset-tests-by-key.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: script=/fenced-frame/resources/utils.js +// META: variant=?include=baseline +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: timeout=long +// +// Spec: https://wicg.github.io/private-network-access/#integration-fetch +// +// These tests verify that secure contexts can fetch subresources in fenced +// frames from all address spaces, provided that the target server, if more +// private than the initiator, respond affirmatively to preflight requests. +// + +setup(() => { + // Making sure we are in a secure context, as expected. + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +subsetTestByKey( + 'from-local', promise_test, t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_LOCAL}, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'local to local: no preflight required.'); + +subsetTestByKey( + 'from-local', promise_test, + t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: { + server: Server.HTTPS_PRIVATE, + behavior: {response: ResponseBehavior.allowCrossOrigin()}, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'local to private: no preflight required.'); + + +subsetTestByKey( + 'from-local', promise_test, + t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: { + server: Server.HTTPS_PUBLIC, + behavior: {response: ResponseBehavior.allowCrossOrigin()}, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'local to public: no preflight required.'); + +// Strictly speaking, the following two tests do not exercise PNA-specific +// logic, but they serve as a baseline for comparison, ensuring that non-PNA +// preflight requests are sent and handled as expected. + +subsetTestByKey( + 'baseline', promise_test, + t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: { + server: Server.HTTPS_PUBLIC, + behavior: { + preflight: PreflightBehavior.failure(), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'PUT', mode: 'cors'}, + expected: FetchTestResult.FAILURE, + }), + 'local to public: PUT preflight failure.'); + +subsetTestByKey( + 'baseline', promise_test, + t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: { + server: Server.HTTPS_PUBLIC, + behavior: { + preflight: PreflightBehavior.success(token()), + response: ResponseBehavior.allowCrossOrigin(), + } + }, + fetchOptions: {method: 'PUT', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'local to public: PUT preflight success.'); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - cors mode: +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - final response is missing CORS headers +// - success +// - success with PUT method (non-"simple" request) +// - no-cors mode: +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - success +// +function makePreflightTests({ + subsetKey, + source, + sourceDescription, + targetServer, + targetDescription, +}) { + const prefix = `${sourceDescription} to ${targetDescription}: `; + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.failure(), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'failed preflight.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.noCorsHeader(token()), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'missing CORS headers on preflight response.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.noPnaHeader(token()), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'missing PNA header on preflight response.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.success(token())}, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'missing CORS headers on final response.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.success(token()), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + prefix + 'success.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.success(token()), + response: ResponseBehavior.allowCrossOrigin(), + }, + }, + fetchOptions: {method: 'PUT', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + prefix + 'PUT success.'); + + subsetTestByKey( + subsetKey, promise_test, t => fencedFrameFetchTest(t, { + source, + target: {server: targetServer}, + fetchOptions: {method: 'GET', mode: 'no-cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'no-CORS mode failed preflight.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.noCorsHeader(token())}, + }, + fetchOptions: {method: 'GET', mode: 'no-cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'no-CORS mode missing CORS headers on preflight response.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.noPnaHeader(token())}, + }, + fetchOptions: {method: 'GET', mode: 'no-cors'}, + expected: FetchTestResult.FAILURE, + }), + prefix + 'no-CORS mode missing PNA header on preflight response.'); + + subsetTestByKey( + subsetKey, promise_test, + t => fencedFrameFetchTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.success(token())}, + }, + fetchOptions: {method: 'GET', mode: 'no-cors'}, + expected: FetchTestResult.OPAQUE, + }), + prefix + 'no-CORS mode success.'); +} + +// Source: private secure context. +// +// Fetches to the local address space require a successful preflight response +// carrying a PNA-specific header. + +makePreflightTests({ + subsetKey: 'from-private', + source: {server: Server.HTTPS_PRIVATE}, + sourceDescription: 'private', + targetServer: Server.HTTPS_LOCAL, + targetDescription: 'local', +}); + +subsetTestByKey( + 'from-private', promise_test, t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: {server: Server.HTTPS_PRIVATE}, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'private to private: no preflight required.'); + +subsetTestByKey( + 'from-private', promise_test, + t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: { + server: Server.HTTPS_PRIVATE, + behavior: {response: ResponseBehavior.allowCrossOrigin()}, + }, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'private to public: no preflight required.'); + +// Source: public secure context. +// +// Fetches to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +makePreflightTests({ + subsetKey: 'from-public', + source: {server: Server.HTTPS_PUBLIC}, + sourceDescription: 'public', + targetServer: Server.HTTPS_LOCAL, + targetDescription: 'local', +}); + +makePreflightTests({ + subsetKey: 'from-public', + source: {server: Server.HTTPS_PUBLIC}, + sourceDescription: 'public', + targetServer: Server.HTTPS_PRIVATE, + targetDescription: 'private', +}); + +subsetTestByKey( + 'from-public', promise_test, t => fencedFrameFetchTest(t, { + source: {server: Server.HTTPS_PUBLIC}, + target: {server: Server.HTTPS_PUBLIC}, + fetchOptions: {method: 'GET', mode: 'cors'}, + expected: FetchTestResult.SUCCESS, + }), + 'public to public: no preflight required.'); diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame.tentative.https.window.js b/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame.tentative.https.window.js new file mode 100644 index 00000000000..bdef699afc4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/fenced-frame.tentative.https.window.js @@ -0,0 +1,227 @@ +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: script=/fenced-frame/resources/utils.js +// META: timeout=long +// +// Spec: https://wicg.github.io/private-network-access/#integration-fetch +// +// These tests verify that contexts can navigate fenced frames to less-public +// address spaces iff the target server responds affirmatively to preflight +// requests. + +setup(() => { + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_LOCAL}, + expected: FrameTestResult.SUCCESS, + }), + 'local to local: no preflight required.'); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_PRIVATE}, + expected: FrameTestResult.SUCCESS, + }), + 'local to private: no preflight required.'); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_PUBLIC}, + expected: FrameTestResult.SUCCESS, + }), + 'local to public: no preflight required.'); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - parent navigates child: +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - preflight response has the required PNA related headers, but still fails +// because of the limitation of fenced frame that subjects to PNA checks. +// +function makePreflightTests({ + sourceName, + sourceServer, + sourceTreatAsPublic, + targetName, + targetServer, +}) { + const prefix = `${sourceName} to ${targetName}: `; + + const source = { + server: sourceServer, + treatAsPublic: sourceTreatAsPublic, + }; + + promise_test_parallel( + t => fencedFrameTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.failure()}, + }, + expected: FrameTestResult.FAILURE, + }), + prefix + 'failed preflight.'); + + promise_test_parallel( + t => fencedFrameTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.noCorsHeader(token())}, + }, + expected: FrameTestResult.FAILURE, + }), + prefix + 'missing CORS headers.'); + + promise_test_parallel( + t => fencedFrameTest(t, { + source, + target: { + server: targetServer, + behavior: {preflight: PreflightBehavior.noPnaHeader(token())}, + }, + expected: FrameTestResult.FAILURE, + }), + prefix + 'missing PNA header.'); + + promise_test_parallel( + t => fencedFrameTest(t, { + source, + target: { + server: targetServer, + behavior: { + preflight: PreflightBehavior.success(token()), + response: ResponseBehavior.allowCrossOrigin() + }, + }, + expected: FrameTestResult.FAILURE, + }), + prefix + 'failed because fenced frames are incompatible with PNA.'); +} + +// Source: private secure context. +// +// Fetches to the local address space require a successful preflight response +// carrying a PNA-specific header. + +makePreflightTests({ + sourceServer: Server.HTTPS_PRIVATE, + sourceName: 'private', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: {server: Server.HTTPS_PRIVATE}, + expected: FrameTestResult.SUCCESS, + }), + 'private to private: no preflight required.'); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: {server: Server.HTTPS_PUBLIC}, + expected: FrameTestResult.SUCCESS, + }), + 'private to public: no preflight required.'); + +// Source: public secure context. +// +// Fetches to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +makePreflightTests({ + sourceServer: Server.HTTPS_PUBLIC, + sourceName: 'public', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +makePreflightTests({ + sourceServer: Server.HTTPS_PUBLIC, + sourceName: 'public', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: {server: Server.HTTPS_PUBLIC}, + target: {server: Server.HTTPS_PUBLIC}, + expected: FrameTestResult.SUCCESS, + }), + 'public to public: no preflight required.'); + +// The following tests verify that `CSP: treat-as-public-address` makes +// documents behave as if they had been served from a public IP address. + +makePreflightTests({ + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.OTHER_HTTPS_LOCAL, + targetName: 'local', +}); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_LOCAL}, + expected: FrameTestResult.FAILURE, + }), + 'treat-as-public-address to local (same-origin): fenced frame embedder ' + + 'initiated navigation has opaque origin.'); + +makePreflightTests({ + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_PUBLIC}, + expected: FrameTestResult.SUCCESS, + }), + 'treat-as-public-address to public: no preflight required.'); + +promise_test_parallel( + t => fencedFrameTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: { + server: Server.HTTPS_PUBLIC, + behavior: {preflight: PreflightBehavior.optionalSuccess(token())} + }, + expected: FrameTestResult.SUCCESS, + }), + 'treat-as-public-address to local: optional preflight'); diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window.js b/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window.js index 6a83b88d3ff..7d9ee530077 100644 --- a/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window.js @@ -21,19 +21,19 @@ setup(() => { promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to local: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_PRIVATE }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to private: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to public: no preflight required."); // Generates tests of preflight behavior for a single (source, target) pair. @@ -67,7 +67,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.failure() }, }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), prefix + "failed preflight."); promise_test_parallel(t => iframeTest(t, { @@ -76,7 +76,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), prefix + "missing CORS headers."); promise_test_parallel(t => iframeTest(t, { @@ -85,7 +85,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), prefix + "missing PNA header."); promise_test_parallel(t => iframeTest(t, { @@ -94,7 +94,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.success(token()) }, }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), prefix + "success."); } @@ -113,13 +113,13 @@ makePreflightTests({ promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_PRIVATE }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "private to private: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "private to public: no preflight required."); // Source: public secure context. @@ -144,7 +144,7 @@ makePreflightTests({ promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "public to public: no preflight required."); // The following tests verify that `CSP: treat-as-public-address` makes @@ -164,7 +164,7 @@ promise_test_parallel(t => iframeTest(t, { treatAsPublic: true, }, target: { server: Server.HTTPS_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "treat-as-public-address to local (same-origin): no preflight required."); makePreflightTests({ @@ -181,7 +181,7 @@ promise_test_parallel(t => iframeTest(t, { treatAsPublic: true, }, target: { server: Server.HTTPS_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "treat-as-public-address to public: no preflight required."); promise_test_parallel(t => iframeTest(t, { @@ -193,7 +193,7 @@ promise_test_parallel(t => iframeTest(t, { server: Server.HTTPS_PUBLIC, behavior: { preflight: PreflightBehavior.optionalSuccess(token()) } }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "treat-as-public-address to local: optional preflight"); // The following tests verify that when a grandparent frame navigates its @@ -206,7 +206,7 @@ iframeGrandparentTest({ grandparentServer: Server.HTTPS_LOCAL, child: { server: Server.HTTPS_PUBLIC }, grandchild: { server: Server.OTHER_HTTPS_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }); iframeGrandparentTest({ @@ -214,7 +214,7 @@ iframeGrandparentTest({ grandparentServer: Server.HTTPS_LOCAL, child: { server: Server.HTTPS_PUBLIC }, grandchild: { server: Server.HTTPS_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }); iframeGrandparentTest({ @@ -228,7 +228,7 @@ iframeGrandparentTest({ server: Server.HTTPS_LOCAL, behavior: { preflight: PreflightBehavior.failure() }, }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }); iframeGrandparentTest({ @@ -242,5 +242,5 @@ iframeGrandparentTest({ server: Server.HTTPS_LOCAL, behavior: { preflight: PreflightBehavior.success(token()) }, }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }); diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.window.js b/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.window.js index e00cb202bec..c0770df8385 100644 --- a/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.window.js +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/iframe.tentative.window.js @@ -18,55 +18,55 @@ setup(() => { promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to local: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_PRIVATE }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to private: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "local to public: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_LOCAL }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), "private to local: failure."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_PRIVATE }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "private to private: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "private to public: no preflight required."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_LOCAL }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), "public to local: failure."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_PRIVATE }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), "public to private: failure."); promise_test_parallel(t => iframeTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "public to public: no preflight required."); promise_test_parallel(t => iframeTest(t, { @@ -75,7 +75,7 @@ promise_test_parallel(t => iframeTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_LOCAL }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), "treat-as-public-address to local: failure."); promise_test_parallel(t => iframeTest(t, { @@ -84,7 +84,7 @@ promise_test_parallel(t => iframeTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_PRIVATE }, - expected: IframeTestResult.FAILURE, + expected: FrameTestResult.FAILURE, }), "treat-as-public-address to private: failure."); promise_test_parallel(t => iframeTest(t, { @@ -93,7 +93,7 @@ promise_test_parallel(t => iframeTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_PUBLIC }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }), "treat-as-public-address to public: no preflight required."); // The following test verifies that when a grandparent frame navigates its @@ -106,5 +106,5 @@ iframeGrandparentTest({ grandparentServer: Server.HTTP_LOCAL, child: { server: Server.HTTP_PUBLIC }, grandchild: { server: Server.HTTP_LOCAL }, - expected: IframeTestResult.SUCCESS, + expected: FrameTestResult.SUCCESS, }); diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html new file mode 100644 index 00000000000..b14601dba51 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="../../../fenced-frame/resources/utils.js"></script> +<title>Fetcher</title> +<script> + const url = new URL(location.href).searchParams.get("url"); + const mode = new URL(location.href).searchParams.get("mode"); + const method = new URL(location.href).searchParams.get("method"); + const [error_token, ok_token, body_token, type_token] = parseKeylist(); + + fetch(url, {mode: mode, method: method}) + .then(async function(response) { + const body = await response.text(); + writeValueToServer(ok_token, response.ok); + writeValueToServer(body_token, body); + writeValueToServer(type_token, response.type); + writeValueToServer(error_token, ""); + }) + .catch(error => { + writeValueToServer(ok_token, ""); + writeValueToServer(body_token, ""); + writeValueToServer(type_token, ""); + writeValueToServer(error_token, error.toString()); + }); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html.headers b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-fetcher.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access-target.https.html b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access-target.https.html new file mode 100644 index 00000000000..2b55e056f39 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access-target.https.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="../../../fenced-frame/resources/utils.js"></script> +<title>Fenced frame target</title> +<script> + const [frame_loaded_key] = parseKeylist(); + writeValueToServer(frame_loaded_key, 'loaded'); +</script> diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html new file mode 100644 index 00000000000..860371f2239 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Fenced frame</title> +<body></body> +<script> + const fenced_frame = document.createElement("fencedframe"); + const target = new URL(location.href).searchParams.get("fenced_frame_url"); + const config = new FencedFrameConfig(target); + fenced_frame.config = config; + document.body.appendChild(fenced_frame); + +</script> diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html.headers b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/fenced-frame-local-network-access.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/preflight.py b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/preflight.py index 4b0bfefd4d6..be3abdbb2a1 100644 --- a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/preflight.py +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/preflight.py @@ -85,6 +85,9 @@ def _is_preflight_optional(request): def _get_preflight_uuid(request): return request.GET.get(b"preflight-uuid") +def _is_loaded_in_fenced_frame(request): + return request.GET.get(b"is-loaded-in-fenced-frame") + def _should_treat_as_public_once(request): uuid = request.GET.get(b"treat-as-public-once") if uuid is None: @@ -155,6 +158,9 @@ def _handle_final_request(request, response): if mime_type is not None: headers.append(("Content-Type", mime_type),) + if _is_loaded_in_fenced_frame(request): + headers.append(("Supports-Loading-Mode", "fenced-frame")) + body = _final_response_body(request) return (headers, body) diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/support.sub.js b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/support.sub.js index a09c46031f5..ca8d2e61ee6 100644 --- a/tests/wpt/web-platform-tests/fetch/local-network-access/resources/support.sub.js +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/resources/support.sub.js @@ -341,6 +341,41 @@ async function fetchTest(t, { source, target, fetchOptions, expected }) { } } +// Similar to `fetchTest`, but replaced iframes with fenced frames. +async function fencedFrameFetchTest(t, { source, target, fetchOptions, expected }) { + const fetcher_url = + resolveUrl("resources/fenced-frame-fetcher.https.html", sourceResolveOptions(source)); + + const target_url = preflightUrl(target); + target_url.searchParams.set("is-loaded-in-fenced-frame", true); + + fetcher_url.searchParams.set("mode", fetchOptions.mode); + fetcher_url.searchParams.set("method", fetchOptions.method); + fetcher_url.searchParams.set("url", target_url); + + const error_token = token(); + const ok_token = token(); + const body_token = token(); + const type_token = token(); + const source_url = generateURL(fetcher_url, [error_token, ok_token, body_token, type_token]); + + const fenced_frame = document.createElement('fencedframe'); + fenced_frame.config = new FencedFrameConfig(source_url); + document.body.append(fenced_frame); + + const error = await nextValueFromServer(error_token); + const ok = await nextValueFromServer(ok_token); + const body = await nextValueFromServer(body_token); + const type = await nextValueFromServer(type_token); + + assert_equals(error, expected.error || "" , "error"); + assert_equals(body, expected.body || "", "response body"); + assert_equals(ok, expected.ok !== undefined ? expected.ok.toString() : "", "response ok"); + if (expected.type !== undefined) { + assert_equals(type, expected.type, "response type"); + } +} + const XhrTestResult = { SUCCESS: { loaded: true, @@ -393,7 +428,7 @@ async function xhrTest(t, { source, target, method, expected }) { assert_equals(body, expected.body, "response body"); } -const IframeTestResult = { +const FrameTestResult = { SUCCESS: "loaded", FAILURE: "timeout", }; @@ -429,6 +464,36 @@ async function iframeTest(t, { source, target, expected }) { assert_equals(result, expected); } +// Similar to `iframeTest`, but replaced iframes with fenced frames. +async function fencedFrameTest(t, { source, target, expected }) { + // Allows running tests in parallel. + const target_url = preflightUrl(target); + target_url.searchParams.set("file", "fenced-frame-local-network-access-target.https.html"); + target_url.searchParams.set("is-loaded-in-fenced-frame", true); + + const frame_loaded_key = token(); + const child_frame_target = generateURL(target_url, [frame_loaded_key]); + + const source_url = + resolveUrl("resources/fenced-frame-local-network-access.https.html", sourceResolveOptions(source)); + source_url.searchParams.set("fenced_frame_url", child_frame_target); + + const fenced_frame = document.createElement('fencedframe'); + fenced_frame.config = new FencedFrameConfig(source_url); + document.body.append(fenced_frame); + + // The grandchild fenced frame writes a value to the server iff it loads + // successfully. + const result = await Promise.race([ + nextValueFromServer(frame_loaded_key), + new Promise((resolve) => { + t.step_timeout(() => resolve("timeout"), 10000 /* ms */); + }), + ]); + + assert_equals(result, expected); +} + const iframeGrandparentTest = ({ name, grandparentServer, diff --git a/tests/wpt/web-platform-tests/fetch/local-network-access/service-worker-fetch.https.window.js b/tests/wpt/web-platform-tests/fetch/local-network-access/service-worker-fetch.https.window.js index 3d0f6d8097a..cb6d1f79b01 100644 --- a/tests/wpt/web-platform-tests/fetch/local-network-access/service-worker-fetch.https.window.js +++ b/tests/wpt/web-platform-tests/fetch/local-network-access/service-worker-fetch.https.window.js @@ -1,5 +1,8 @@ // META: script=/common/utils.js // META: script=resources/support.sub.js +// META: script=/common/subset-tests.js +// META: variant=?1-8 +// META: variant=?9-last // // Spec: https://wicg.github.io/private-network-access/#integration-fetch // @@ -75,13 +78,13 @@ async function makeTest(t, { source, target, expected }) { } } -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_LOCAL }, expected: TestResult.SUCCESS, }), "local to local: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_LOCAL, @@ -90,7 +93,7 @@ promise_test(t => makeTest(t, { expected: TestResult.FAILURE, }), "private to local: failed preflight."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_LOCAL, @@ -102,13 +105,13 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "private to local: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_PRIVATE }, expected: TestResult.SUCCESS, }), "private to private: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_LOCAL, @@ -117,7 +120,7 @@ promise_test(t => makeTest(t, { expected: TestResult.FAILURE, }), "public to local: failed preflight."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_LOCAL, @@ -129,7 +132,7 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "public to local: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_PRIVATE, @@ -138,7 +141,7 @@ promise_test(t => makeTest(t, { expected: TestResult.FAILURE, }), "public to private: failed preflight."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_PRIVATE, @@ -150,13 +153,13 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "public to private: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_PUBLIC }, expected: TestResult.SUCCESS, }), "public to public: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, @@ -168,7 +171,7 @@ promise_test(t => makeTest(t, { expected: TestResult.FAILURE, }), "treat-as-public to local: failed preflight."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, @@ -183,7 +186,7 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "treat-as-public to local: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, @@ -192,7 +195,7 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "treat-as-public to local (same-origin): no preflight required."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, @@ -204,7 +207,7 @@ promise_test(t => makeTest(t, { expected: TestResult.FAILURE, }), "treat-as-public to private: failed preflight."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, @@ -219,7 +222,7 @@ promise_test(t => makeTest(t, { expected: TestResult.SUCCESS, }), "treat-as-public to private: success."); -promise_test(t => makeTest(t, { +subsetTest(promise_test, t => makeTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, diff --git a/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js index 1d1a012380f..7b816c01c74 100644 --- a/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js +++ b/tests/wpt/web-platform-tests/generic-sensor/generic-sensor-iframe-tests.sub.js @@ -135,23 +135,28 @@ function run_generic_sensor_iframe_tests(sensorName) { iframe.allow = featurePolicies.join(';') + ';'; iframe.src = 'https://{{host}}:{{ports[https][0]}}/generic-sensor/resources/iframe_sensor_handler.html'; - // Create sensor in the iframe (we do not care whether this is a - // cross-origin nested context in this test). + // Create sensor in the iframe. const iframeLoadWatcher = new EventWatcher(t, iframe, 'load'); document.body.appendChild(iframe); await iframeLoadWatcher.wait_for('load'); + // This is required for the JS Mojo backend to be initialized in the + // iframe. await send_message_to_iframe(iframe, {command: 'create_sensor', type: sensorName}); iframe.contentWindow.focus(); - await send_message_to_iframe(iframe, {command: 'start_sensor'}); + const iframeSensor = new iframe.contentWindow[sensorName](); + t.add_cleanup(() => { + iframeSensor.stop(); + }); + const sensorWatcher = new EventWatcher(t, iframeSensor, ['activate']); + iframeSensor.start(); + await sensorWatcher.wait_for('activate'); // Remove iframe from main document and change focus. When focus changes, // we need to determine whether a sensor must have its execution suspended // or resumed (section 4.2.3, "Focused Area" of the Generic Sensor API // spec). In Blink, this involves querying a frame, which might no longer // exist at the time of the check. - // Note that we cannot send the "reset_sensor_backend" command because the - // iframe is discarded with the removeChild call. iframe.parentNode.removeChild(iframe); window.focus(); }, `${sensorName}: losing a document's frame with an active sensor does not crash`); diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/README.md b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/README.md index 5f10361d5cf..afda8f6c8ab 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/README.md +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/README.md @@ -46,7 +46,15 @@ as in [events.html](./events.html) and `runEventTest()` in # Asserting PRECONDITION_FAILED for unexpected BFCache eligibility -To distinguish failures due to unexpected BFCache ineligibility (which might be -acceptable due to different BFCache eligibility criteria across browsers), -`assert_bfcached()` and `assert_not_bfcached()` results in -`PRECONDITION_FAILED` rather than ordinal failures. +Browsers are not actually obliged to put pages in BFCache after navigations, so +BFCache WPTs shouldn't result in `FAILED` if it expects a certain case to be +supported by BFCache. But, it is still useful to test those cases in the +browsers that do support BFCache for that case. + +To distinguish genuine failures from just not using BFCache, we use +`assert_bfcached()` and `assert_not_bfcached()` which result in +`PRECONDITION_FAILED` rather than `FAILED`. that should be put in the +expectations for the failing tests (instead of marking it as `FAILED` or +skipping the test). This means if the test starts passing (e.g. if we start +BFCaching in the case being tested), we will notice that the output changed from +`PRECONDITION_FAILED` to `PASS`. diff --git a/tests/wpt/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/strict-mode-redefine-readonly-property.html b/tests/wpt/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/strict-mode-redefine-readonly-property.html new file mode 100644 index 00000000000..ce1da3747a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/strict-mode-redefine-readonly-property.html @@ -0,0 +1,17 @@ +<!doctype html> +<link rel="help" href="https://crbug.com/1448846"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<script> +test(() => { + "use strict"; + const pathname = document.location.pathname; + const form = document.createElement('form'); + form.name = 'location'; + document.body.appendChild(form); + assert_equals(document.location?.pathname, pathname); + form.remove(); +}, "Adding/removing form with a name referring to a non-configurable property"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html index 453d5e7f331..eac9dbdef9a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'clear'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js index 86407784bdf..2f9fb92da1e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'clear'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html index a54b09bbfc4..7c9771c10f9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'copy'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js index 42d7ec23c2a..5b071665ce4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'copy'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html index d88afa5ded5..d9c34ded0ba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-atop'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js index 96627b03ece..58828619a32 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-atop'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html index 54223ee5fc9..9c1a8dbf471 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-in'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js index 525ca84f478..4e2ec058eca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-in'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html index 1b9b88a9188..10c5baf4850 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-out'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js index aaaadd71851..bc7be056a1d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-out'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html index 44d6a5bb02e..0e2ece9eabd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-over'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js index b13e7b1b68d..c1d15a09591 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'destination-over'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html index 65186a7753e..392bb855f6f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'lighter'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js index e8dd516d2a5..df494f22d33 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'lighter'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html index 2d0b6a6ab6f..f7d4da4d841 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-atop'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js index f40ef449315..781a89c1b6c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-atop'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html index 28cdc267236..69e57e2578f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-in'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js index 4f116ac6224..484399acfcc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-in'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html index 25d5e0737a4..eb9dbd0810a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-out'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js index ce1bdd9f359..d0d6cc12e95 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-out'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html index 8e6b68621c0..98629de8a4d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-over'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js index 7f4355c483f..848fbf3becc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'source-over'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html index a15811a52ea..bc69c8a08b7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'xor'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js index 929f6f7eebb..250bba4bacc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js @@ -28,14 +28,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = 'xor'; ctx.drawImage(offscreenCanvas2, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html index 75115ce7c27..f001c4409c3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js index 9a9ff0ec70a..f152cee739b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html index 4cb9c474102..d472a0682d3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js index 8fe345da5b4..05ccab17116 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html index a86950c04b0..753c460ec6a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js index 8b862a00556..43648142d50 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html index 0415cbc7b57..df9f1ae786e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js index 1f580cd95aa..2787237c569 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html index 6c183fdedd4..6981ca1d727 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js index d364abf8bc9..e030f533a05 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html index 3ace58d8d81..33601151332 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js index 7ee7d94069d..964df4ae8bc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html index 9c50789a526..25f2a7684a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js index aa55199d072..f3828b6411d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html index a87385b20c3..cfa386cfd1d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js index b0ee8d8686a..7b1618e3f96 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html index bd1d09f19d3..cc44706b1c7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js index 201c9bc1094..9accfb35c46 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html index e31cf7342f7..bc2f7f26339 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js index 16ed7c48bb3..8e8d9116bb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html index f4a871aeec3..88a8176f7e2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js index a1deadcdd4b..679aa19ef98 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html index 91e992e267f..ef149b2f996 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html @@ -33,10 +33,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js index a77191f9f61..83a04928b5d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js @@ -29,10 +29,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html index a3f009532b6..0ecb5ed01df 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js index 05a208efbbe..0e56b4f71d4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html index e46d8c0c4c8..00a4465d0b9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js index 3662f862e9f..4c4a0a4c951 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html index 41c1c73b021..f5f8c68c51b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js index d7cd348e786..af1dc50c9bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html index 51c92d5dbc4..2e1fe84b608 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js index 02397f02ec5..490ce4d0012 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html index 29227f2a5ad..1f5be066eec 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js index 70acee3f159..3647e34574b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html index 6d9a23beee1..c698c2517c8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js index d3b6e074222..a5944be6954 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html index e5cb1292733..887570fad74 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js index 83bd328b376..c34c748059a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html index ef55aa7222f..7aa9e662f66 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js index c599c3dfc6d..10042455a79 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html index 98ba8bb12cf..3830e92f69e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js index 10178699f6a..c658da8c991 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html index bdd17f9e084..3c202dd5568 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html @@ -33,11 +33,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js index 764a09416f3..86baf476feb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js @@ -29,11 +29,11 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html index 4ffbc6d3ac2..9efa9d6363c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -40,7 +40,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js index b9a79d74c95..776f1dbabd8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -36,7 +36,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html index b040e023d89..fbb7e5266e8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var offscreenCanvas2 = new OffscreenCanvas(100, 50); var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#f00'; @@ -38,7 +38,7 @@ t.step(function() { ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js index e7a207447a3..bd24b44b0c9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var offscreenCanvas2 = new OffscreenCanvas(100, 50); var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#f00'; @@ -34,7 +34,7 @@ t.step(function() { ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html index 7ec80af80fd..a60a61efc26 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -40,7 +40,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js index 178be23578f..13c5dd28156 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -36,7 +36,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html index d6ebd24277e..4a254b3afcf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -34,7 +34,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 0); @@ -43,7 +43,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js index 8596a460ef1..948da3a132a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 0); @@ -39,7 +39,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html index 97205f5489a..306428a6162 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 50, 50); @@ -43,7 +43,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js index 5c69536d101..fa90ff652a2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 50, 50); @@ -39,7 +39,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html index 28104abc4e1..556fca6beff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -43,7 +43,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js index 994bcc8a734..834516e96a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -39,7 +39,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html index 5036f8b6b50..c049b79aeb9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -45,7 +45,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js index f6ccb838ded..93e7a312fb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html index 05b278ad81b..c5dc174416a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.save(); @@ -45,7 +45,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js index 825e12add09..56b072be4dd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.save(); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html index 15b7ff2c308..9327111eb7a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -40,7 +40,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js index 6bf73924517..6e77679552a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -36,7 +36,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html index 225838972ee..098abc71651 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(-128, -78); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js index 32d1a27b349..28c8d07b6a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(-128, -78); @@ -37,7 +37,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html index 73c31e02b8e..4ee7aac5fa8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js index a94f8206407..6b2228e558c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -34,7 +34,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html index c31528d87a7..ed1bb4243d4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -40,7 +40,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js index ab7059b7849..fc3911fbb13 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -36,7 +36,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html index 1230be998aa..420562c5efd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js index 1874aa9a30a..b4d6774ec73 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -37,7 +37,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html index 3e7b8b2b502..ee2c477c936 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -34,7 +34,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -42,7 +42,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js index 49d343cf904..157207a7c54 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html index 9405b3a583c..0e9a92e51cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.translate(0, 16); @@ -45,7 +45,7 @@ t.step(function() { _assertPixel(canvas, 98,25, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js index 69c54c447a5..684d2b7b4cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.translate(0, 16); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 98,25, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html index c81e3ce196b..83e8ef37dc8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -42,7 +42,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js index c4194a36984..bbb7b9055dd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html index cef32b3e9d5..48948452af0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -34,7 +34,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -42,7 +42,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js index b460e240b96..0eec87ca75f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html index 490b2a19939..79ca84193e8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.translate(48, 0); @@ -45,7 +45,7 @@ t.step(function() { _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 50,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js index 05fde112be4..c5f0f4bcc24 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.translate(48, 0); @@ -41,7 +41,7 @@ t.step(function() { _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 50,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html index 954280620aa..f7fcc3e45a6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -42,7 +42,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js index c421fbc0d10..7201c3f133c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html index 95baf291171..550edecf1e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html @@ -32,7 +32,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, ""); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 200, 50); @@ -40,7 +40,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js index 5187ea44b6c..9777e188fad 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js @@ -28,7 +28,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, ""); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 200, 50); @@ -36,7 +36,7 @@ t.step(function() { _assertPixel(canvas, 98,1, 0,255,0,255); _assertPixel(canvas, 1,48, 0,255,0,255); _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html index 6a1372eef3f..9d14a7233aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html @@ -34,10 +34,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js index 726c6d985e0..5c290b06cb2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js @@ -30,10 +30,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html index 043988187a8..b1066aa084f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html @@ -34,10 +34,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js index cf8f072b79f..750326c8944 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js @@ -30,10 +30,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html index b53bd89430b..a6710d727b0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html @@ -34,12 +34,12 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js index 51db38d150d..14e4334f0e0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js @@ -30,12 +30,12 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html index 9b04130ae83..be2e6ed5e69 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html @@ -34,12 +34,12 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js index e5824d9761d..c63121c8022 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js @@ -30,12 +30,12 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html index fef57110557..23cafc60750 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html @@ -34,10 +34,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js index a52914070d1..dbae8a5061e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js @@ -30,10 +30,10 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html index bdd5c12b59b..6567dacf523 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html @@ -36,14 +36,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, -50); ctx.shadowColor = '#f00'; ctx.drawImage(bitmap, -50, -50); _assertPixel(canvas, 25,25, 0,255,0,255); _assertPixel(canvas, 50,25, 0,255,0,255); _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js index 26e0afc10d3..c424274bb51 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js @@ -32,14 +32,14 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, -50); ctx.shadowColor = '#f00'; ctx.drawImage(bitmap, -50, -50); _assertPixel(canvas, 25,25, 0,255,0,255); _assertPixel(canvas, 50,25, 0,255,0,255); _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html index f2aebf795e6..04f6ee2e81a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { ctx.shadowColor = '#00f'; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js index 2dfa1040941..8b29bfb064a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -34,7 +34,7 @@ t.step(function() { ctx.shadowColor = '#00f'; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html index b26e476ca03..64d6b59308b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js index f972db853a5..db9aefeaf4d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -34,7 +34,7 @@ t.step(function() { ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html index 62dd7ad20f4..fe06c3afde1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -38,7 +38,7 @@ t.step(function() { ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js index 120c5e4580f..b2ebc0ae2cf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -34,7 +34,7 @@ t.step(function() { ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html index 423f0642d5e..358113f07cd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html @@ -30,7 +30,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 50, 50); @@ -43,7 +43,7 @@ t.step(function() { _assertPixel(canvas, 25,25, 0,255,0,255); _assertPixel(canvas, 50,25, 0,255,0,255); _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js index ef8313a85c4..cb963008f94 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js @@ -26,7 +26,7 @@ t.step(function() { }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 50, 50); @@ -39,7 +39,7 @@ t.step(function() { _assertPixel(canvas, 25,25, 0,255,0,255); _assertPixel(canvas, 50,25, 0,255,0,255); _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); + }); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/fill-and-stroke-styles.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/fill-and-stroke-styles.yaml index a0eca74922e..5f794d61e6f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/fill-and-stroke-styles.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/fill-and-stroke-styles.yaml @@ -900,7 +900,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -908,7 +908,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.basic.canvas @@ -996,7 +996,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, ""); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 200, 50); @@ -1004,7 +1004,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.repeat.null @@ -1087,7 +1087,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var offscreenCanvas2 = new OffscreenCanvas(100, 50); var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#f00'; @@ -1095,7 +1095,7 @@ ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @assert pixel 50,25 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.basic @@ -1112,7 +1112,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1120,7 +1120,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.outside @@ -1137,7 +1137,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -1150,7 +1150,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord1 @@ -1169,7 +1169,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 0); @@ -1178,7 +1178,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord2 @@ -1193,7 +1193,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 50, 50); @@ -1206,7 +1206,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.norepeat.coord3 @@ -1223,7 +1223,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -1234,7 +1234,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.basic @@ -1251,7 +1251,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1259,7 +1259,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.outside @@ -1276,7 +1276,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(50, 25); @@ -1285,7 +1285,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord1 @@ -1302,7 +1302,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.translate(-128, -78); @@ -1311,7 +1311,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord2 @@ -1326,7 +1326,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1334,7 +1334,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeat.coord3 @@ -1349,7 +1349,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1359,7 +1359,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.basic @@ -1378,7 +1378,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1386,7 +1386,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.outside @@ -1403,7 +1403,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1413,7 +1413,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeatx.coord1 @@ -1430,7 +1430,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-x'); ctx.fillStyle = pattern; ctx.translate(0, 16); @@ -1443,7 +1443,7 @@ @assert pixel 98,25 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.basic @@ -1462,7 +1462,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1470,7 +1470,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.outside @@ -1487,7 +1487,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.fillRect(0, 0, 100, 50); @@ -1497,7 +1497,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.repeaty.coord1 @@ -1516,7 +1516,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat-y'); ctx.fillStyle = pattern; ctx.translate(48, 0); @@ -1529,7 +1529,7 @@ @assert pixel 1,48 == 0,255,0,255; @assert pixel 50,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.orientation.image @@ -1547,7 +1547,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillStyle = pattern; ctx.save(); @@ -1560,7 +1560,7 @@ @assert pixel 98,1 == 0,255,0,255; @assert pixel 1,48 == 0,255,0,255; @assert pixel 98,48 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.pattern.paint.orientation.canvas diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/meta.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/meta.yaml index 43a67d54ab4..bd761937f40 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/meta.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/meta.yaml @@ -149,10 +149,10 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0); @assert pixel 50,25 ==~ %s +/- 5; - }, t_fail); + }); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected)), } ) @@ -176,14 +176,14 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx2.drawImage(bitmap, 0, 0); ctx.fillStyle = 'rgba%s'; ctx.fillRect(0, 0, 100, 50); ctx.globalCompositeOperation = '%s'; ctx.drawImage(offscreenCanvas2, 0, 0); @assert pixel 50,25 ==~ %s +/- 5; - }, t_fail); + }); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected)), } ) @@ -232,11 +232,11 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); @assert pixel 15,15 ==~ %s +/- 5; @assert pixel 50,25 ==~ %s +/- 5; - }, t_fail); + }); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected0), to_test(expected0)), } ) @@ -281,11 +281,11 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); ctx.fillRect(0, 50, 100, 50); @assert pixel 50,25 ==~ %s +/- 5; - }, t_fail); + }); }).then(t_pass, t_fail); """ % (dest, op, to_test(expected0)), } ) diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/shadows.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/shadows.yaml index 06e2681c72c..ec1bdd101e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/shadows.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/shadows.yaml @@ -439,10 +439,10 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); @assert pixel 50,25 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.image.transparent.1 @@ -464,10 +464,10 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); @assert pixel 50,25 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.image.transparent.2 @@ -491,14 +491,14 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, -50); ctx.shadowColor = '#f00'; ctx.drawImage(bitmap, -50, -50); @assert pixel 25,25 == 0,255,0,255; @assert pixel 50,25 == 0,255,0,255; @assert pixel 75,25 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.image.alpha @@ -520,10 +520,10 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, -50); @assert pixel 50,25 ==~ 127,0,127,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.image.section @@ -545,12 +545,12 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); @assert pixel 25,25 ==~ 0,255,0,255; @assert pixel 50,25 ==~ 0,255,0,255; @assert pixel 75,25 ==~ 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.image.scale @@ -572,12 +572,12 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { ctx.drawImage(bitmap, 0, 0, 100, 50, -10, -50, 240, 50); @assert pixel 25,25 ==~ 0,255,0,255; @assert pixel 50,25 ==~ 0,255,0,255; @assert pixel 75,25 ==~ 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.canvas.basic @@ -659,7 +659,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -667,7 +667,7 @@ ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.transparent.1 @@ -686,7 +686,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -694,7 +694,7 @@ ctx.shadowOffsetY = 50; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.transparent.2 @@ -712,7 +712,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 50, 50); @@ -725,7 +725,7 @@ @assert pixel 25,25 == 0,255,0,255; @assert pixel 50,25 == 0,255,0,255; @assert pixel 75,25 == 0,255,0,255; - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.pattern.alpha @@ -743,7 +743,7 @@ }; }); promise.then(function(response) { - createImageBitmap(response).then(bitmap => { + return createImageBitmap(response).then(bitmap => { var pattern = ctx.createPattern(bitmap, 'repeat'); ctx.fillStyle = '#f00'; ctx.fillRect(0, 0, 100, 50); @@ -751,7 +751,7 @@ ctx.shadowColor = '#00f'; ctx.fillStyle = pattern; ctx.fillRect(0, -50, 100, 50); - }, t_fail); + }); }).then(t_pass, t_fail); - name: 2d.shadow.gradient.basic diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html index ea2b126ced8..a1053c04a4a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html @@ -25,7 +25,26 @@ forEachCanvasSource(get_host_info().HTTP_REMOTE_ORIGIN, assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); }); assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); }); }); - }, `${name}: Setting fillStyle to an origin-unclear pattern makes the canvas origin-unclean`); + }, `${name}: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean`); +}); + +forEachCanvasSource(get_host_info().HTTP_REMOTE_ORIGIN, + get_host_info().HTTP_ORIGIN, + (name, factory) => { + promise_test(_ => { + return factory().then(source => { + const pattern = new OffscreenCanvas(10, 10) + .getContext('2d') + .createPattern(source, 'repeat'); + + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + ctx.fillStyle = pattern; + ctx.fillStyle = 'red'; + assert_throws_dom("SECURITY_ERR", function() { canvas.toDataURL(); }); + assert_throws_dom("SECURITY_ERR", function() { ctx.getImageData(0, 0, 1, 1); }); + }); + }, `${name}: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean`); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html index cbdbb72c674..7bb7aae3b92 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-ltr.html @@ -8,16 +8,23 @@ <script src="resources/dirname.js"></script> <div id="log"></div> <form action="resources/dirname-iframe.html" method=get target="iframe"> - <p><label>Comment: <input type=text name="comment" dirname="comment.dir" required></label></p> + <p><label>User: <input type=text name="user" dirname="user.dir" required></label></p> + <p><label>Comment: <textarea name="comment" dirname="comment.dir" required></textarea></label></p> <p><button type=submit>Post Comment</button></p> </form> <iframe name="iframe"></iframe> <script> - var t = async_test("submit element directionality"); document.querySelector("input").value = "foobar"; + document.querySelector("textarea").value = "foobar"; document.querySelector("button").click(); - onIframeLoadedDone(t, function(params) { + var t_inp = async_test("submit input element directionality"); + onIframeLoadedDone(t_inp, function(params) { + assert_equals(params.get("user.dir"), "ltr"); + }); + + var t_ta = async_test("submit textarea element directionality"); + onIframeLoadedDone(t_ta, function(params) { assert_equals(params.get("comment.dir"), "ltr"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-auto.html b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-auto.html index 072b8508685..02aeb79176d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-auto.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-auto.html @@ -8,17 +8,24 @@ <script src="resources/dirname.js"></script> <div id="log"></div> <form action="resources/dirname-iframe.html" method=get target="iframe"> - <p><label>Comment: <input type=text name="comment" dir="auto" dirname="comment.dir" required/></label></p> + <p><label>User: <input type=text name="user" dir="auto" dirname="user.dir" required/></label></p> + <p><label>Comment: <textarea name="comment" dir="auto" dirname="comment.dir" required></textarea></label></p> <p><button type=submit>Post Comment</button></p> </form> <iframe name="iframe"></iframe> <script> - var t = async_test("submit element directionality"); var rtlValue = "مرحبا"; document.querySelector("input").value = rtlValue; + document.querySelector("textarea").value = rtlValue; document.querySelector("button").click(); - onIframeLoadedDone(t, function(params) { + var t_inp = async_test("submit input element directionality"); + onIframeLoadedDone(t_inp, function(params) { + assert_equals(params.get("user.dir"), "rtl"); + }); + + var t_ta = async_test("submit textarea element directionality"); + onIframeLoadedDone(t_ta, function(params) { assert_equals(params.get("comment.dir"), "rtl"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html index e7b07288d6b..0c5331f0ac8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html @@ -9,17 +9,24 @@ <div id="log"></div> <div dir="rtl"> <form action="resources/dirname-iframe.html" method=get target="iframe"> - <p><label>Comment: <input type=text name="comment" dirname="comment.dir" required/></label></p> + <p><label>User: <input type=text name="user" dirname="user.dir" required/></label></p> + <p><label>Comment: <textarea name="comment" dirname="comment.dir" required></textarea></label></p> <p><button type=submit>Post Comment</button></p> </form> </div> <iframe name="iframe"></iframe> <script> - var t = async_test("submit element directionality"); document.querySelector("input").value = "foobar"; + document.querySelector("textarea").value = "foobar"; document.querySelector("button").click(); - onIframeLoadedDone(t, function(params) { + var t_inp = async_test("submit input element directionality"); + onIframeLoadedDone(t_inp, function(params) { + assert_equals(params.get("user.dir"), "rtl"); + }); + + var t_ta = async_test("submit textarea element directionality"); + onIframeLoadedDone(t_ta, function(params) { assert_equals(params.get("comment.dir"), "rtl"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-manual.html b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-manual.html index cb00f6972df..c5f683101dc 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-manual.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-manual.html @@ -4,10 +4,11 @@ <link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> <link rel=help href="https://html.spec.whatwg.org/multipage/#submitting-element-directionality:-the-dirname-attribute"> <form action="dirname-rtl-manual.html" method=get> - <p><label>Comment: <input type=text name="comment" dirname="comment.dir" required></label></p> + <p><label>User: <input type=text name="user" dirname="user.dir" required></label></p> + <p><label>Comment: <textarea name="comment" dirname="comment.dir" required></textarea></label></p> <p><button type=submit>Post Comment</button></p> </form> -<p>Switch to a right-to-left writing direction, enter a text in the input and submit the form.</p> +<p>Switch to a right-to-left writing direction, enter a text in the input and textarea, and submit the form.</p> <p>Test passes if the word "PASS" appears below</p> <script> function getParameterByName(name) { @@ -17,10 +18,12 @@ return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } + var userDir = getParameterByName("user.dir"); var commentDir = getParameterByName("comment.dir"); - if (commentDir) { + if (commentDir && userDir) { var p = document.createElement("p"); - p.textContent = (commentDir == "rtl") ? "PASS" : "FAIL"; + var success = (commentDir == "rtl" && userDir == "rtl") + p.textContent = success ? "PASS" : "FAIL"; document.body.appendChild(p); } </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-number-rtl-invalid-crash.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-number-rtl-invalid-crash.html new file mode 100644 index 00000000000..d749d1faad4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-number-rtl-invalid-crash.html @@ -0,0 +1,11 @@ +<!doctype html> +<meta charset="utf-8"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1835437"> +<script> +window.onload = () => { + a.stepDown(251) + document.execCommand("delete", false, null) +} +</script> +<form lang="ar-SA"> +<input id="a" type="number" autofocus dir="auto"> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute.html index 93cbd2caeca..ec093425f71 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute.html @@ -16,40 +16,6 @@ <input pattern="\p{ASCII_Hex_Digit}+" value="c0ff33" id="unicode-property"> <input pattern="\p{RGI_Emoji}+" value="😘💋" id="unicode-property-of-strings"> - <input pattern="[\p{ASCII_Hex_Digit}--[Ff]]" value="0123456789abcdefABCDEF" id="set-difference"> - <input pattern="[_\q{a|bc|def}]" value="q" id="string-literal"> - - <div class="breaking-changes-from-u-to-v"> - <!-- Unescaped special characters in character classes. --> - <input pattern="[(]" value="foo"> - <input pattern="[)]" value="foo"> - <input pattern="[[]" value="foo"> - <input pattern="[{]" value="foo"> - <input pattern="[}]" value="foo"> - <input pattern="[/]" value="foo"> - <input pattern="[-]" value="foo"> - <input pattern="[|]" value="foo"> - <!-- Double punctuators in character classes. --> - <input pattern="[&&]" value="foo"> - <input pattern="[!!]" value="foo"> - <input pattern="[##]" value="foo"> - <input pattern="[$$]" value="foo"> - <input pattern="[%%]" value="foo"> - <input pattern="[**]" value="foo"> - <input pattern="[++]" value="foo"> - <input pattern="[,,]" value="foo"> - <input pattern="[..]" value="foo"> - <input pattern="[::]" value="foo"> - <input pattern="[;;]" value="foo"> - <input pattern="[<<]" value="foo"> - <input pattern="[==]" value="foo"> - <input pattern="[>>]" value="foo"> - <input pattern="[??]" value="foo"> - <input pattern="[@@]" value="foo"> - <input pattern="[``]" value="foo"> - <input pattern="[~~]" value="foo"> - <input pattern="[_^^]" value="foo"> - </div> </div> <div id="log"></div> <script> @@ -86,32 +52,4 @@ assert_true(input.matches(":valid")); assert_false(input.validity.patternMismatch); }, "<input pattern> supports Unicode property escape syntax for properties of strings"); - - test(() => { - const input = document.querySelector("#set-difference"); - assert_false(input.validity.valid); - assert_false(input.matches(":valid")); - assert_true(input.validity.patternMismatch); - }, "<input pattern> supports set difference syntax"); - - test(() => { - const input = document.querySelector("#string-literal"); - assert_false(input.validity.valid); - assert_true(input.validity.patternMismatch); - assert_true(input.matches(":invalid")); - }, "<input pattern> supports string literal syntax"); - - test(() => { - const inputs = document.querySelectorAll(".breaking-changes-from-u-to-v input"); - // These examples are all written such that they’re all `:invalid` - // when using `u`, but would become `:valid` when using `v` because - // the pattern would error, in turn resulting in - // `validity.valid === true`. - for (const input of inputs) { - const html = input.outerHTML; - assert_true(input.validity.valid, `${html} should be valid`); - assert_true(input.matches(":valid"), `${html} should match \`:valid\``); - assert_false(input.validity.patternMismatch, `${html} should not trigger a pattern mismatch`); - } - }, "<input pattern> enables the RegExp v flag"); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html new file mode 100644 index 00000000000..5246421e8bd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/pattern_attribute_v_flag.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>pattern attribute: v flag</title> +<meta name=viewport content="width=device-width"> +<link rel="author" title="Fabrice Clari" href="mailto:f.clari@inno-group.com"> +<link rel="author" title="Dimitri Bocquet" href="mailto:Dimitri.Bocquet@mosquito-fp7.eu"> +<link rel="author" title="Mathias Bynens" href="https://mathiasbynens.be/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#attr-input-pattern"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<h1><code>pattern</code> attribute: v flag</h1> +<div style="display: none"> + <input pattern="[\p{ASCII_Hex_Digit}--[Ff]]" value="0123456789abcdefABCDEF" id="set-difference"> + <input pattern="[_\q{a|bc|def}]" value="q" id="string-literal"> + + <div class="breaking-changes-from-u-to-v"> + <!-- Unescaped special characters in character classes. --> + <input pattern="[(]" value="foo"> + <input pattern="[)]" value="foo"> + <input pattern="[[]" value="foo"> + <input pattern="[{]" value="foo"> + <input pattern="[}]" value="foo"> + <input pattern="[/]" value="foo"> + <input pattern="[-]" value="foo"> + <input pattern="[|]" value="foo"> + <!-- Double punctuators in character classes. --> + <input pattern="[&&]" value="foo"> + <input pattern="[!!]" value="foo"> + <input pattern="[##]" value="foo"> + <input pattern="[$$]" value="foo"> + <input pattern="[%%]" value="foo"> + <input pattern="[**]" value="foo"> + <input pattern="[++]" value="foo"> + <input pattern="[,,]" value="foo"> + <input pattern="[..]" value="foo"> + <input pattern="[::]" value="foo"> + <input pattern="[;;]" value="foo"> + <input pattern="[<<]" value="foo"> + <input pattern="[==]" value="foo"> + <input pattern="[>>]" value="foo"> + <input pattern="[??]" value="foo"> + <input pattern="[@@]" value="foo"> + <input pattern="[``]" value="foo"> + <input pattern="[~~]" value="foo"> + <input pattern="[_^^]" value="foo"> + </div> +</div> +<div id="log"></div> +<script> + test(() => { + const input = document.querySelector("#set-difference"); + assert_false(input.validity.valid); + assert_false(input.matches(":valid")); + assert_true(input.validity.patternMismatch); + }, "<input pattern> supports set difference syntax"); + + test(() => { + const input = document.querySelector("#string-literal"); + assert_false(input.validity.valid); + assert_true(input.validity.patternMismatch); + assert_true(input.matches(":invalid")); + }, "<input pattern> supports string literal syntax"); + + test(() => { + const inputs = document.querySelectorAll(".breaking-changes-from-u-to-v input"); + // These examples are all written such that they’re all `:invalid` + // when using `u`, but would become `:valid` when using `v` because + // the pattern would error, in turn resulting in + // `validity.valid === true`. + for (const input of inputs) { + const html = input.outerHTML; + assert_true(input.validity.valid, `${html} should be valid`); + assert_true(input.matches(":valid"), `${html} should match \`:valid\``); + assert_false(input.validity.patternMismatch, `${html} should not trigger a pattern mismatch`); + } + }, "<input pattern> enables the RegExp v flag"); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html index 9aa5ce42e8e..f283633aab4 100644 --- a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-details-element/name-attribute.tentative.html @@ -110,24 +110,7 @@ promise_test(async t => { assert_element_states(elements, [1, 0, 0, 1, 0, 1, 0, 1], "after final mutation"); }, "mutually exclusive details across multiple names and multiple tree scopes"); -// The next two tests test characteristics of the design that are only -// exposed via mutation events. If mutation events (for attribute -// addition/removal) are removed from the web, these tests could be -// removed, and some small simplifications could be made to the code -// implementing this feature. -function mutation_events_for_attribute_removal_supported() { - container.innerHTML = `<div id="event-removal-test"></div>`; - let element = container.firstChild; - let event_fired = false; - element.addEventListener("DOMSubtreeModified", event => event_fired = true); - element.removeAttribute("id"); - return event_fired; -} - promise_test(async t => { - if (!mutation_events_for_attribute_removal_supported()) { - return; - } container.innerHTML = ` <details name="a" id="e0" open></details> <details name="a" id="e1"></details> @@ -143,24 +126,57 @@ promise_test(async t => { document.getElementById("e3") ]; container.insertBefore(e2, elements[3]); - let received_ids = []; - let listener = event => { + let mutation_event_received_ids = []; + let mutation_listener = event => { assert_equals(event.type, "DOMSubtreeModified"); assert_equals(event.target.nodeType, Node.ELEMENT_NODE); let element = event.target; assert_equals(element.localName, "details"); - received_ids.push(element.id); + mutation_event_received_ids.push(element.id); }; + let toggle_event_received_ids = []; + let toggle_event_promises = []; for (let element of elements) { - element.addEventListener("DOMSubtreeModified", listener); + element.addEventListener("DOMSubtreeModified", mutation_listener); + toggle_event_promises.push(new Promise((resolve, reject) => { + element.addEventListener("toggle", event => { + assert_equals(event.type, "toggle"); + assert_equals(event.target, element); + toggle_event_received_ids.push(element.id); + resolve(undefined); + }); + })); } - assert_array_equals(received_ids, []); + assert_array_equals(mutation_event_received_ids, []); assert_element_states(elements, [1, 0, 1, 1], "states before mutation"); elements[1].open = true; - assert_array_equals(received_ids, ["e0", "e3", "e2", "e1"], - "removal events received in node insertion order, followed by addition event"); + if (mutation_event_received_ids.length == 0) { + // ok if mutation events are not supported + } else { + assert_array_equals(mutation_event_received_ids, ["e0", "e3", "e2", "e1"], + "removal events received in node insertion order, followed by addition event"); + } assert_element_states(elements, [0, 1, 0, 0], "states after mutation"); -}, "mutation event order matches order of insertion in set of named elements"); + assert_array_equals(toggle_event_received_ids, [], "toggle events received before awaiting promises"); + await Promise.all(toggle_event_promises); + assert_array_equals(toggle_event_received_ids, ["e1", "e0", "e3", "e2"], "toggle events received after awaiting promises"); +}, "mutation event and toggle event order matches order of insertion in set of named elements"); + +// This function is used to guard tests that test behavior that is +// relevant only because of Mutation Events. If mutation events (for +// attribute addition/removal) are removed from the web, the tests using +// this function can be removed. +function mutation_events_for_attribute_removal_supported() { + if (!("MutationEvent" in window)) { + return false; + } + container.innerHTML = `<div id="event-removal-test"></div>`; + let element = container.firstChild; + let event_fired = false; + element.addEventListener("DOMSubtreeModified", event => event_fired = true); + element.removeAttribute("id"); + return event_fired; +} promise_test(async t => { if (!mutation_events_for_attribute_removal_supported()) { diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.html index 8db327d7d1f..8a5d2df8e27 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.html @@ -54,8 +54,9 @@ window.onload = () => requestAnimationFrame(() => requestAnimationFrame(() => { if (ex.hasAttribute('open')) { assert_true(isDialog(ex)); assert_true(isElementVisible(ex),'Open dialog should be visible by default'); - assert_throws_dom("InvalidStateError",() => ex.showPopover(),'Calling showPopover on an already-showing element should throw InvalidStateError'); + ex.showPopover(); // Should not throw ex.removeAttribute('open'); + ex.hidePopover(); assert_false(isElementVisible(ex),'Removing the open attribute should hide the dialog'); } else { ex.showPopover(); // Should not throw @@ -72,7 +73,9 @@ window.onload = () => requestAnimationFrame(() => requestAnimationFrame(() => { if (isDialog(ex)) { tested_something=true; assert_throws_dom("InvalidStateError",() => ex.showModal(),'Calling showModal() on an already-showing Popover should throw InvalidStateError'); - assert_throws_dom("InvalidStateError",() => ex.show(),'Calling show() on an already-showing Popover should throw InvalidStateError'); + ex.show(); // Should not throw + ex.close(); + ex.showPopover(); } if (isFullscreen(ex)) { tested_something=true; @@ -94,14 +97,16 @@ window.onload = () => requestAnimationFrame(() => requestAnimationFrame(() => { if (isDialog(ex)) { ex.show(); assert_true(ex.hasAttribute('open')); - assert_throws_dom("InvalidStateError",() => ex.showPopover(),'Calling showPopover() on an already-showing non-modal dialog should throw InvalidStateError'); + ex.showPopover(); // Should not throw ex.close(); assert_false(ex.hasAttribute('open')); + ex.hidePopover(); ex.showModal(); assert_true(ex.hasAttribute('open')); assert_throws_dom("InvalidStateError",() => ex.showPopover(),'Calling showPopover() on an already-showing modal dialog should throw InvalidStateError'); ex.close(); assert_false(ex.hasAttribute('open')); + ex.hidePopover(); } else if (isFullscreen(ex)) { let requestSucceeded = false; await blessTopLayer(visible); diff --git a/tests/wpt/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative.html deleted file mode 100644 index ebb1661559e..00000000000 --- a/tests/wpt/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative.html +++ /dev/null @@ -1,129 +0,0 @@ -<!DOCTYPE html> -<!-- - Tentative due to: - https://github.com/web-platform-tests/wpt/issues/36727 ---> -<html> -<head> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/resources/testdriver.js"></script> - <script src="/resources/testdriver-vendor.js"></script> - <script src="resources/utils.js"></script> - <script> - // Frame layout: - // top=origin0:this-file [ - // child1=origin1:child-one.html, - // child-xo=origin2:consumption-crossorigin-child.html [ - // gchild=origin3:child-two.html - // ] - // ] - let consumption_test = async_test("Consumption test"); - - let num_children_to_load = 3; - let num_children_to_report = 3; - - function finishLoadPhase() { - assert_equals(num_children_to_load, 0); - - test(() => { - assert_false(navigator.userActivation.isActive); - assert_false(navigator.userActivation.hasBeenActive); - }, "Parent frame initial state"); - - delayByFrames(() => test_driver.click(document.getElementById("child1")), 5); - // The click at "child-xo" happens after receiving "child-one-clicked" msg. - } - - function finishReportPhase() { - assert_equals(num_children_to_report, 0); - - test(() => { - assert_false(navigator.userActivation.isActive); - assert_true(navigator.userActivation.hasBeenActive); - }, "Parent frame final state"); - - consumption_test.done(); - } - - window.addEventListener("message", event => { - - // Test driver can send messages too... - if (typeof event.data !== "string") return; - - var msg = JSON.parse(event.data); - - if (msg.type == 'child-one-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Child1 frame initial state"); - } else if (msg.type == 'child-crossorigin-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Child2 frame initial state"); - } else if (msg.type == 'child-two-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Grandchild frame initial state"); - } else if (msg.type == 'child-one-clicked') { - test_driver.click(document.getElementById("child-xo")); - } else if (msg.type == 'child-one-report') { - test(() => { - assert_false(msg.isActive, "Child1 frame isActive"); - assert_true(msg.hasBeenActive, "Child1 frame hasBeenActive"); - }, "Child1 frame final state"); - } else if (msg.type == 'child-crossorigin-report') { - // This msg was triggered by a user click followed by a window.open(). - test(() => { - assert_false(msg.isActive); - assert_true(msg.hasBeenActive); - }, "Child2 frame final state"); - - // Ask remaining frames to report states. - let ask_report = JSON.stringify({"type": "report"}); - frames[0].postMessage(ask_report, "*"); - frames[1].frames[0].postMessage(ask_report, "*"); - } else if (msg.type == 'child-two-report') { - test(() => { - assert_false(msg.isActive, "isActive"); - assert_false(msg.hasBeenActive, "hasBeenActive"); - }, "Grand child frame final state"); - } - - // Phase switching. - if (msg.type.endsWith("-loaded")) { - if (--num_children_to_load == 0) - finishLoadPhase(); - } else if (msg.type.endsWith("-report")) { - if (--num_children_to_report == 0) - finishReportPhase(); - } - }); - async function createIframes() { - const child1 = document.createElement("iframe"); - child1.src = "http://{{hosts[alt][]}}:{{ports[http][0]}}/html/user-activation/resources/child-one.html"; - child1.id = "child1"; - await new Promise((resolve) => { - child1.onload = resolve; - document.body.appendChild(child1); - }); - const childXO = document.createElement("iframe"); - childXO.id = "child-xo"; - childXO.src = "http://{{hosts[alt][]}}:{{ports[http][1]}}/html/user-activation/resources/consumption-crossorigin-child.sub.html"; - document.body.appendChild(childXO); - } - </script> -</head> -<body onload="createIframes()"> - <h1>User activation consumption across cross-origin frame boundary</h1> - <p>Tests that user activation consumption resets the transient states in all cross-origin frames.</p> - <ol id="instructions"> - <li>Click anywhere on the yellow area. - <li>Click anywhere on the green area (child frame). - </ol> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html b/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html deleted file mode 100644 index 81cd5d3ca19..00000000000 --- a/tests/wpt/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html +++ /dev/null @@ -1,122 +0,0 @@ -<!DOCTYPE html> -<!-- - Tentative due to: - https://github.com/web-platform-tests/wpt/issues/36727 ---> -<html> -<head> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/resources/testdriver.js"></script> - <script src="/resources/testdriver-vendor.js"></script> - <script> - // Frame layout: - // top=this-file [ - // child1=child-one.html, - // child-so=consumption-sameorigin-child.html [ - // gchild=child-two.html - // ] - // ] - let consumption_test = async_test("Consumption test"); - - let num_children_to_load = 3; - let num_children_to_report = 3; - - function finishLoadPhase() { - assert_equals(num_children_to_load, 0); - - test(() => { - assert_false(navigator.userActivation.isActive); - assert_false(navigator.userActivation.hasBeenActive); - }, "Parent frame initial state"); - - return test_driver.click(document.getElementById("child-so")); - } - - function finishReportPhase() { - assert_equals(num_children_to_report, 0); - - test(() => { - assert_false(navigator.userActivation.isActive); - assert_true(navigator.userActivation.hasBeenActive); - }, "Parent frame final state"); - - consumption_test.done(); - } - - window.addEventListener("message", async event => { - // Test driver can send messages too... - if (typeof event.data !== "string") return; - - var msg = JSON.parse(event.data); - - if (msg.type == 'child-one-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Child1 frame initial state"); - } else if (msg.type == 'child-sameorigin-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Child2 frame initial state"); - } else if (msg.type == 'child-two-loaded') { - test(() => { - assert_false(msg.isActive); - assert_false(msg.hasBeenActive); - }, "Grandchild frame initial state"); - } else if (msg.type == 'child-one-report') { - test(() => { - assert_false(msg.isActive); - assert_true(msg.hasBeenActive); - }, "Child1 frame final state"); - } else if (msg.type == 'child-sameorigin-report') { - // This msg was triggered by a user click followed by a window.open(). - test(() => { - assert_false(msg.isActive); - assert_true(msg.hasBeenActive); - }, "Child2 frame final state"); - - // Ask remaining frames to report states. - let ask_report = JSON.stringify({"type": "report"}); - frames[0].postMessage(ask_report, "*"); - frames[1].frames[0].postMessage(ask_report, "*"); - } else if (msg.type == 'child-two-report') { - test(() => { - assert_false(msg.isActive); - assert_true(msg.hasBeenActive); - }, "Grand child frame final state"); - } - - // Phase switching. - if (msg.type.endsWith("-loaded")) { - if (--num_children_to_load == 0) - await finishLoadPhase(); - } else if (msg.type.endsWith("-report")) { - if (--num_children_to_report == 0) - finishReportPhase(); - } - }); - async function createIframes() { - const child1 = document.createElement("iframe"); - child1.src = "resources/child-one.html"; - child1.id = "child1"; - await new Promise((resolve) => { - child1.onload = resolve; - document.body.appendChild(child1); - }); - const childSO = document.createElement("iframe"); - childSO.id = "child-so"; - childSO.src = "resources/consumption-sameorigin-child.html"; - document.body.appendChild(childSO); - } - </script> -</head> -<body onload="createIframes()" > - <h1>User activation consumption across same-origin frame boundary</h1> - <p>Tests that user activation consumption resets the transient states in all same-origin frames.</p> - <ol id="instructions"> - <li>Click anywhere on the green area (child frame). - </ol> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/images/pattern.webm b/tests/wpt/web-platform-tests/images/pattern.webm Binary files differnew file mode 100644 index 00000000000..7cd3d311557 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/pattern.webm diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 4e52e323fd9..95354d71e05 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -225,7 +225,11 @@ SET TIMEOUT: service-workers/service-worker/activation.https.html SET TIMEOUT: service-workers/service-worker/fetch-frame-resource.https.html SET TIMEOUT: service-workers/service-worker/fetch-request-redirect.https.html SET TIMEOUT: service-workers/service-worker/fetch-waits-for-activate.https.html +SET TIMEOUT: service-workers/service-worker/postMessage-client-worker.js SET TIMEOUT: service-workers/service-worker/update-recovery.https.html +SET TIMEOUT: service-workers/service-worker/resources/controlled-frame-postMessage.html +SET TIMEOUT: service-workers/service-worker/resources/controlled-worker-late-postMessage.js +SET TIMEOUT: service-workers/service-worker/resources/controlled-worker-postMessage.js SET TIMEOUT: service-workers/service-worker/resources/extendable-event-async-waituntil.js SET TIMEOUT: service-workers/service-worker/resources/fetch-event-async-respond-with-worker.js SET TIMEOUT: service-workers/service-worker/resources/fetch-event-test-worker.js diff --git a/tests/wpt/web-platform-tests/media/2x2-green.webm b/tests/wpt/web-platform-tests/media/2x2-green.webm Binary files differnew file mode 100644 index 00000000000..0fbb250d398 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/2x2-green.webm diff --git a/tests/wpt/web-platform-tests/media/A4.webm b/tests/wpt/web-platform-tests/media/A4.webm Binary files differnew file mode 100644 index 00000000000..b4adbec02b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/A4.webm diff --git a/tests/wpt/web-platform-tests/media/counting.webm b/tests/wpt/web-platform-tests/media/counting.webm Binary files differnew file mode 100644 index 00000000000..56d1f1c8acb --- /dev/null +++ b/tests/wpt/web-platform-tests/media/counting.webm diff --git a/tests/wpt/web-platform-tests/media/green-at-15.webm b/tests/wpt/web-platform-tests/media/green-at-15.webm Binary files differnew file mode 100644 index 00000000000..023a96bf645 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/green-at-15.webm diff --git a/tests/wpt/web-platform-tests/media/movie_300.webm b/tests/wpt/web-platform-tests/media/movie_300.webm Binary files differnew file mode 100644 index 00000000000..bb7edf20d48 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/movie_300.webm diff --git a/tests/wpt/web-platform-tests/media/movie_5.webm b/tests/wpt/web-platform-tests/media/movie_5.webm Binary files differnew file mode 100644 index 00000000000..9ae12e84ea5 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/movie_5.webm diff --git a/tests/wpt/web-platform-tests/media/test.webm b/tests/wpt/web-platform-tests/media/test.webm Binary files differnew file mode 100644 index 00000000000..5794667d099 --- /dev/null +++ b/tests/wpt/web-platform-tests/media/test.webm diff --git a/tests/wpt/web-platform-tests/media/video.webm b/tests/wpt/web-platform-tests/media/video.webm Binary files differnew file mode 100644 index 00000000000..0783123f4ef --- /dev/null +++ b/tests/wpt/web-platform-tests/media/video.webm diff --git a/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-mimetype.html b/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-mimetype.html index 07721abfd42..994792790a2 100644 --- a/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-mimetype.html +++ b/tests/wpt/web-platform-tests/mediacapture-record/MediaRecorder-mimetype.html @@ -9,6 +9,58 @@ </head> <body> <script> +const AUDIO_ONLY_MIME_TYPES = [ + 'audio/mp4', + 'audio/ogg', + 'audio/webm', +]; + +const AUDIO_CODECS_MIME_TYPES = [ + 'audio/ogg; codecs="vorbis"', + 'audio/ogg; codecs="opus"', + 'audio/webm; codecs="vorbis"', + 'audio/webm; codecs="opus"', +]; + +const VIDEO_ONLY_MIME_TYPES = [ + 'video/mp4', + 'video/webm', +]; + +const VIDEO_CODECS_MIME_TYPES = [ + 'video/webm; codecs="vp8"', + 'video/webm; codecs="vp9"', + 'video/webm; codecs="av1"', +]; + +const AUDIO_VIDEO_MIME_TYPES = [ + 'video/webm; codecs="vp8, vorbis"', + 'video/webm; codecs="vp8, opus"', + 'video/webm; codecs="vp9, vorbis"', + 'video/webm; codecs="vp9, opus"', + 'video/webm; codecs="av1, opus"', +]; + +const AUDIO_MIME_TYPES = [ + ...AUDIO_ONLY_MIME_TYPES, + ...AUDIO_CODECS_MIME_TYPES, + ...AUDIO_VIDEO_MIME_TYPES, +]; + +const VIDEO_MIME_TYPES = [ + ...VIDEO_ONLY_MIME_TYPES, + ...VIDEO_CODECS_MIME_TYPES, + ...AUDIO_VIDEO_MIME_TYPES, +]; + +const MIME_TYPES = [ + ...AUDIO_ONLY_MIME_TYPES, + ...AUDIO_CODECS_MIME_TYPES, + ...VIDEO_ONLY_MIME_TYPES, + ...VIDEO_CODECS_MIME_TYPES, + ...AUDIO_VIDEO_MIME_TYPES, +]; + test(t => { const recorder = new MediaRecorder(createAudioStream(t).stream); assert_equals(recorder.mimeType, "", @@ -45,26 +97,7 @@ test(t => { assert_false(MediaRecorder.isTypeSupported("video/pineapple")); }, "MediaRecorder invalid video mimeType is unsupported"); -// New MIME types could be added to this list as needed. -for (const mimeType of [ - 'audio/mp4', - 'video/mp4', - 'audio/ogg', - 'audio/ogg; codecs="vorbis"', - 'audio/ogg; codecs="opus"', - 'audio/webm', - 'audio/webm; codecs="vorbis"', - 'audio/webm; codecs="opus"', - 'video/webm', - 'video/webm; codecs="vp8"', - 'video/webm; codecs="vp8, vorbis"', - 'video/webm; codecs="vp8, opus"', - 'video/webm; codecs="vp9"', - 'video/webm; codecs="vp9, vorbis"', - 'video/webm; codecs="vp9, opus"', - 'video/webm; codecs="av1"', - 'video/webm; codecs="av1, opus"', -]) { +for (const mimeType of MIME_TYPES) { if (MediaRecorder.isTypeSupported(mimeType)) { test(t => { const recorder = new MediaRecorder(new MediaStream(), {mimeType}); @@ -85,6 +118,43 @@ promise_test(async t => { assert_not_equals(recorder.mimeType, ""); }, "MediaRecorder sets a nonempty mimeType on 'onstart' for audio"); +for (const mimeType of AUDIO_MIME_TYPES) { + if (MediaRecorder.isTypeSupported(mimeType)) { + test(t => { + const recorder = new MediaRecorder(createFlowingAudioStream(t).stream, {mimeType}); + recorder.start(); + }, `MediaRecorder start() does not throw with ${mimeType} for audio`); + } else { + test(t => { + assert_throws_dom("NotSupportedError", + () => new MediaRecorder(createFlowingAudioStream(t).stream, {mimeType})); + }, `Unsupported mimeType ${mimeType} throws for audio`); + } +} + +for (const mimeType of VIDEO_MIME_TYPES) { + if (MediaRecorder.isTypeSupported(mimeType)) { + test(t => { + const recorder = new MediaRecorder(createFlowingVideoStream(t).stream, {mimeType}); + recorder.start(); + }, `MediaRecorder start() does not throw with ${mimeType} for video`); + } else { + test(t => { + assert_throws_dom("NotSupportedError", + () => new MediaRecorder(createFlowingVideoStream(t).stream, {mimeType})); + }, `Unsupported mimeType ${mimeType} throws for video`); + } +} + +for (const mimeType of VIDEO_ONLY_MIME_TYPES) { + if (MediaRecorder.isTypeSupported(mimeType)) { + test(t => { + const recorder = new MediaRecorder(createFlowingAudioStream(t).stream, {mimeType}); + recorder.start(); + }, `MediaRecorder start() does not throw with ${mimeType} for audio`); + } +} + promise_test(async t => { const recorder = new MediaRecorder(createFlowingVideoStream(t).stream); recorder.start(); diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_predicted_events_attributes-manual.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_predicted_events_attributes-manual.html deleted file mode 100644 index 1276d3657f8..00000000000 --- a/tests/wpt/web-platform-tests/pointerevents/pointerevent_predicted_events_attributes-manual.html +++ /dev/null @@ -1,149 +0,0 @@ -<!doctype html> -<html> - <head> - <title>Pointer Events predicted events count and properties<</title> - <meta name="viewport" content="width=device-width"> - <link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <!-- Additional helper script for common checks across event types --> - <script type="text/javascript" src="pointerevent_support.js"></script> - <script> - var eventList = All_Pointer_Events; - PhaseEnum = { - WaitingForCancel: 0, - WaitingForOver: 1, - WaitingForEnter: 2, - WaitingForDown: 3, - WaitingForMove: 4, - WaitingForUp: 5, - WaitingForOut: 6, - WaitingForLeave: 7, - Done: 8, - }; - var phase = PhaseEnum.WaitingForCancel; - var move_event_count = 0; - - function resetTestState() { - phase = PhaseEnum.WaitingForCancel; - } - function expect_no_predicted_events(event, eventName) { - test(function () { - assert_equals(event.getPredictedEvents().length, 0, eventName + ' should not have any predicted events'); - }, expectedPointerType + ' ' + eventName + ' should not have any predicted events'); - } - function run() { - var test_pointerEvent = setup_pointerevent_test("predicted events attributes in pointerevents", ['touch']); - var target0 = document.getElementById("target0"); - var target1 = document.getElementById("target1"); - - on_event(target0, 'pointercancel', function (event) { - if (phase == PhaseEnum.WaitingForCancel) { - expect_no_predicted_events(event, 'pointercancel'); - phase++; - } - }); - eventList.forEach(function(eventName) { - on_event(target1, eventName, function (event) { - switch (phase) { - case PhaseEnum.WaitingForOver: - if (eventName == 'pointerover') { - expect_no_predicted_events(event, eventName); - phase++; - } - break; - case PhaseEnum.WaitingForEnter: - if (eventName == 'pointerenter') { - expect_no_predicted_events(event, eventName); - phase++; - } - break; - case PhaseEnum.WaitingForDown: - if (eventName == 'pointerdown') { - expect_no_predicted_events(event, eventName); - phase++; - setTimeout(function(){ - // This is just a way to block the main thread. - var current = new Date().getTime(); - for (; new Date().getTime() - current < 500;); - }, 0); - } - break; - case PhaseEnum.WaitingForMove: - if (eventName == 'pointermove') { - if (event.getPredictedEvents().length > 0) { - var predictedEvents = event.getPredictedEvents(); - test (function() { - for (var i=0; i<predictedEvents.length; i++) { - assert_equals(predictedEvents[i].isTrusted, true, 'isTrusted flag should be true for predicted events.'); - if (i > 0) - assert_greater_than_equal(predictedEvents[i].timeStamp, predictedEvents[i-1].timeStamp, 'Time stamps of predicted events must be ascending.'); - } - }, expectedPointerType + ' pointermove predicted events should all be marked as trusted.'); - test (function() { - for (var i=1; i<predictedEvents.length; i++) - assert_greater_than_equal(predictedEvents[i].timeStamp, predictedEvents[i-1].timeStamp, 'Time stamps of predicted events must be ascending.'); - }, expectedPointerType + ' time stamps of predicted events must be ascending.'); - test (function() { - for (var i=0; i<predictedEvents.length; i++) { - assert_equals(predictedEvents[i].bubbles, false, 'Bubbles attribute should be false for predicted events.'); - assert_equals(predictedEvents[i].cancelable, false, 'Cancelable attribute should be false for predicted events.'); - } - }, expectedPointerType + ' pointermove predicted events should all bubbles and cancelable as false.'); - phase++; - } else { - assert_less_than(move_event_count++, 20, "pointermove have no predicted event in 20 moves") - } - } - break; - case PhaseEnum.WaitingForUp: - if (eventName == 'pointerup') { - expect_no_predicted_events(event, eventName); - phase++; - } - break; - case PhaseEnum.WaitingForOut: - if (eventName == 'pointerout') { - expect_no_predicted_events(event, eventName); - phase++; - } - break; - case PhaseEnum.WaitingForLeave: - if (eventName == 'pointerleave') { - expect_no_predicted_events(event, eventName); - phase++; - test (function() { - assert_true(false); - }) - test_pointerEvent.done(); - } - break; - } - }); - }); - } - </script> - </head> - <body onload="run()"> - <h1>Pointer Events predicted events count and properties</h1> - <h2 id="pointerTypeDescription"></h2> - <h4> - Test Description: This test checks the predicted events of all types of pointer events. - <ol> - <li>Pointer down in the black square and drag inside the black square immediately</li> - <li>Release the pointer.</li> - <li>Pointer down in the purple square and drag inside the purple square immediately</li> - <li>Release the pointer and move out of the purple square</li> - </ol> - - Test passes if the proper behavior of the events is observed. - </h4> - <div id="target0"></div> - <div id="target1" class="touchActionNone"></div> - <div id="complete-notice"> - <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p> - <p>Refresh the page to run the tests again with a different pointer type.</p> - </div> - </body> -</html> - diff --git a/tests/wpt/web-platform-tests/pointerevents/predicted_events_attributes.html b/tests/wpt/web-platform-tests/pointerevents/predicted_events_attributes.html new file mode 100644 index 00000000000..7049447eca1 --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/predicted_events_attributes.html @@ -0,0 +1,124 @@ +<!doctype html> +<title>Predicted events count and properties</title> +<meta name="variant" content="?mouse"> +<meta name="variant" content="?pen"> +<meta name="variant" content="?touch"> +<meta name="viewport" content="width=device-width"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="pointerevent_support.js"></script> +<link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> +<style> + div { + width: 100px; + height: 100px; + } +</style> +<div id="target"></div> +<div id="done"></div> + +<script> + "use strict"; + assert_true(location.search.length > 0, + "Test URL should contain pointer_type"); + const pointer_type = location.search.substring(1); + assert_true(["mouse", "touch", "pen"].includes(pointer_type)); + const target = document.getElementById("target"); + + // https://w3c.github.io/pointerevents/#predicted-events + function checkListAttributes(event) { + assert_equals(typeof event.getPredictedEvents, "function", + event.type + ".getPredictedEvents is a function"); + assert_equals(typeof event.getPredictedEvents(), "object", + event.type + ".getPredictedEvents() returns an object"); + if (event.type == "pointermove") { + assert_greater_than_equal(event.getPredictedEvents().length, 0, + event.type + ".getPredictedEvents() has 0 or more entry"); + } else { + assert_equals(event.getPredictedEvents().length, 0, + event.type + ".getPredictedEvents() has 0 entry"); + } + } + + function actionToDragPointerInTarget() { + return new test_driver.Actions() + .addPointer("TestPointer", pointer_type) + .pointerMove(0, 0, {origin: target}) + .pointerDown() + .pointerMove(20, 20, {origin: target}) + .pointerUp() + } + + promise_test(async () => { + const done = document.getElementById("done"); + + let pointerover_promise = getEvent("pointerover", target); + let pointerenter_promise = getEvent("pointerenter", target); + let pointerout_promise = getEvent("pointerout", target); + let pointerleave_promise = getEvent("pointerleave", target); + + await clickInTarget(pointer_type, target); + await clickInTarget(pointer_type, done); + + checkListAttributes(await pointerover_promise); + checkListAttributes(await pointerenter_promise); + checkListAttributes(await pointerout_promise); + checkListAttributes(await pointerleave_promise); + }, "Predicted list in boundary events"); + + promise_test(async () => { + // We need "touch-action:none" to guarantee pointermove events. + target.classList.add("touchActionNone"); + + target.addEventListener("pointerdown", + e => target.setPointerCapture(e.pointerId), + {once: true}); + + target.addEventListener("pointermove", + e => target.releasePointerCapture(e.pointerId), + {once: true}); + + let gotpointercapture_promise = getEvent("gotpointercapture", target); + let lostpointercapture_promise = getEvent("lostpointercapture", target); + + await actionToDragPointerInTarget().send(); + + checkListAttributes(await gotpointercapture_promise); + checkListAttributes(await lostpointercapture_promise); + + target.classList.remove("touchActionNone"); + }, "Predicted list in pointer-capture events"); + + promise_test(async () => { + // We need "touch-action:none" to guarantee pointermove events. + target.classList.add("touchActionNone"); + + let pointerdown_promise = getEvent("pointerdown", target); + let pointermove_promise = getEvent("pointermove", target); + let pointerup_promise = getEvent("pointerup", target); + + await actionToDragPointerInTarget().send(); + + checkListAttributes(await pointerdown_promise); + checkListAttributes(await pointermove_promise); + checkListAttributes(await pointerup_promise); + + target.classList.remove("touchActionNone"); + }, "Predicted list in pointerdown/move/up events"); + + promise_test(async () => { + if (pointer_type !== "touch") { + assert_true(true, "Skipped for " + pointer_type); + return; + } + + let pointercancel_promise = getEvent("pointercancel", target); + + await actionToDragPointerInTarget().send(); + + checkListAttributes(await pointercancel_promise); + }, "Predicted list in pointercancel event"); +</script> diff --git a/tests/wpt/web-platform-tests/pointerevents/touch-action-with-swipe-dir-change.html b/tests/wpt/web-platform-tests/pointerevents/touch-action-with-swipe-dir-change.html new file mode 100644 index 00000000000..69d8b099d00 --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/touch-action-with-swipe-dir-change.html @@ -0,0 +1,115 @@ +<!doctype html> +<title>touch-action behavior with swipe direction changes</title> +<meta name="variant" content="?touch"> +<meta name="viewport" content="width=device-width"> +<link rel="help" href="https://w3c.github.io/pointerevents/#determining-supported-direct-manipulation-behavior" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="pointerevent_support.js"></script> +<style> + #target { + width: 200px; + height: 200px; + overflow: scroll; + } + #spacer { + width: 400px; + height: 400px; + } + #done { + width: 100px; + height: 100px; + } +</style> +<div id="target"> + <div id="spacer"></div> +</div> +<div id="done"></div> + +<script> + "use strict"; + const pointer_type = "touch"; + const target = document.getElementById("target"); + const done = document.getElementById("done"); + + assert_true(location.search.length > 0 && + location.search.substring(1) === pointer_type, + "Test URL has 'touch' pointer-type"); + + /* + For each promise_test, we have these 5 parameters in order: + - touch-action value to test, + - a list of directions ("right" or "down") in the swipe to test, + - whether scrollLeft change is expected, and + - whether scrollTop change is expected. + */ + const promise_test_params = [ + ["auto", ["right", "down"], true, true ], + ["auto", ["down", "right"], true, true ], + ["pan-x", ["right", "down"], true, false], + ["pan-x", ["down", "right"], false, false], + ["pan-y", ["right", "down"], false, false], + ["pan-y", ["down", "right"], false, true ], + ["none" , ["right", "down"], false, false], + ["none" , ["down", "right"], false, false], + ]; + + function appendSwipeActions(actions, directions) { + const deltas = { + "right": [30, 0], + "down": [0, 30], + } + let pos = [0, 0]; + for (const direction of directions) { + // Move three steps along each direction. + for (let i = 0; i < 3; i++) { + pos[0] += deltas[direction][0]; + pos[1] += deltas[direction][1]; + actions = actions.pointerMove(pos[0], pos[1], {origin: target}); + } + } + return actions; + } + + for (let i = 0; i < promise_test_params.length; i++) { + let [touch_action, directions, left_change_expected, top_change_expected] + = promise_test_params[i]; + + promise_test(async () => { + target.style.touchAction = touch_action; + + // Reset the scroll position to 50% mark on both axes. + target.scrollLeft = 100; + target.scrollTop = 100; + const done_pointerup_promise = getEvent("pointerup", done); + + let actions = new test_driver.Actions() + .addPointer("TestPointer", pointer_type) + .pointerMove(0, 0, {origin: target}) + .pointerDown(); + actions = appendSwipeActions(actions, directions); + actions = actions.pointerUp() + .pointerMove(0, 0, {origin: done}) + .pointerDown() + .pointerUp() + + await actions.send(); + await done_pointerup_promise; + + if (left_change_expected) { + assert_less_than(target.scrollLeft, 100, "scrollLeft should change"); + } else { + assert_equals(target.scrollLeft, 100, "scrollLeft should not change"); + } + + if (top_change_expected) { + assert_less_than(target.scrollTop, 100, "scrollTop should change"); + } else { + assert_equals(target.scrollTop, 100, "scrollTop should not change"); + } + }, `touch-action:${touch_action} with ${directions} swipe`); + } +</script> diff --git a/tests/wpt/web-platform-tests/resources/idlharness.js b/tests/wpt/web-platform-tests/resources/idlharness.js index 46aa11e5ca1..8f741b09b26 100644 --- a/tests/wpt/web-platform-tests/resources/idlharness.js +++ b/tests/wpt/web-platform-tests/resources/idlharness.js @@ -2357,12 +2357,13 @@ IdlInterface.prototype.do_member_operation_asserts = function(memberHolderObject assert_equals(typeof memberHolderObject[member.name], "function", "property must be a function"); - const ctors = this.members.filter(function(m) { - return m.type == "operation" && m.name == member.name; + const operationOverloads = this.members.filter(function(m) { + return m.type == "operation" && m.name == member.name && + (m.special === "static") === (member.special === "static"); }); assert_equals( memberHolderObject[member.name].length, - minOverloadLength(ctors), + minOverloadLength(operationOverloads), "property has wrong .length"); assert_equals( memberHolderObject[member.name].name, diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-dedicatedworker-postMessage.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-dedicatedworker-postMessage.https.html new file mode 100644 index 00000000000..7e2a604621d --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-dedicatedworker-postMessage.https.html @@ -0,0 +1,44 @@ +<html> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +</head> +<body> +<script> +promise_test(async (test) => { + const registration = await navigator.serviceWorker.register("postMessage-client-worker.js", { scope : 'resources' }); + activeWorker = registration.active; + if (activeWorker) + return; + + activeWorker = registration.installing; + await new Promise(resolve => { + activeWorker.addEventListener('statechange', () => { + if (activeWorker.state === "activated") + resolve(); + }); + }); +}, "Register service worker"); + +promise_test(async (test) => { + const worker = new Worker('resources/controlled-worker-postMessage.js'); + const event = await new Promise((resolve, reject) => { + test.step_timeout(() => reject("test timed out"), 3000); + worker.onmessage = resolve; + }); + assert_equals(event.data, 0); +}, "Verify dedicated worker gets messages if setting event listener early"); + +promise_test(async (test) => { + const worker = new Worker('resources/controlled-worker-late-postMessage.js?repeatMessages'); + const event = await new Promise((resolve, reject) => { + test.step_timeout(() => reject("test timed out"), 3000); + worker.onmessage = resolve; + }); + assert_not_equals(event.data, "No message received"); + assert_true(event.data > 0); +}, "Verify dedicated worker does not get all messages if not setting event listener early"); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-iframe-postMessage.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-iframe-postMessage.https.html new file mode 100644 index 00000000000..8f39b7fdbf8 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/controlled-iframe-postMessage.https.html @@ -0,0 +1,67 @@ +<html> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +</head> +<body> +<script> +promise_test(async (test) => { + const registration = await navigator.serviceWorker.register("postMessage-client-worker.js", { scope : 'resources' }); + activeWorker = registration.active; + if (activeWorker) + return; + + activeWorker = registration.installing; + await new Promise(resolve => { + activeWorker.addEventListener('statechange', () => { + if (activeWorker.state === "activated") + resolve(); + }); + }); +}, "Register service worker"); + +function with_iframe(test, url) { + return new Promise(function(resolve, reject) { + test.step_timeout(() => reject("with_iframe timed out"), 2000); + var frame = document.createElement('iframe'); + frame.className = 'test-iframe'; + frame.src = url; + frame.onload = function() { resolve(frame); }; + document.body.appendChild(frame); + }); +} + +promise_test(async (test) => { + const frame = await with_iframe(test, 'resources/controlled-frame-postMessage.html'); + let counter = 0; + while (counter++ < 100 && frame.contentWindow.messageData == undefined) + await new Promise(resolve => test.step_timeout(resolve, 50)); + assert_equals(frame.contentWindow.messageData, 0); + frame.remove(); +}, "Verify frame gets early messages if setting synchronously message event listener"); + +promise_test(async (test) => { + const frame = await with_iframe(test, 'resources/controlled-frame-postMessage.html?repeatMessages'); + let counter = 0; + while (counter++ < 100 && frame.contentWindow.messageData == undefined) + await new Promise(resolve => test.step_timeout(resolve, 50)); + assert_not_equals(frame.contentWindow.messageData, 0); + frame.remove(); +}, "Verify frame does not get all messages if not setting event listener early"); + +promise_test(async (test) => { + const frame = await with_iframe(test, 'resources/controlled-frame-postMessage.html?repeatMessages&listener'); + let counter = 0; + while (counter++ < 100 && frame.contentWindow.messageData.length < 5) + await new Promise(resolve => test.step_timeout(resolve, 50)); + + assert_less_than(counter, 100); + data = frame.contentWindow.messageData; + for (let cptr = 1; cptr < data.length; cptr++) + assert_true(data[cptr - 1] < data[cptr]); + frame.remove(); +}, "Verify frame does get messages in order"); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/postMessage-client-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/postMessage-client-worker.js new file mode 100644 index 00000000000..64d944d2b54 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/postMessage-client-worker.js @@ -0,0 +1,23 @@ +async function doTest(e) +{ + if (e.resultingClientId) { + const promise = new Promise(async resolve => { + let counter = 0; + const client = await self.clients.get(e.resultingClientId); + if (client) + client.postMessage(counter++); + if (e.request.url.includes("repeatMessage")) { + setInterval(() => { + if (client) + client.postMessage(counter++); + }, 100); + } + setTimeout(() => { + resolve(fetch(e.request)); + }, 1000); + }); + e.respondWith(promise); + } +} + +self.addEventListener("fetch", e => e.waitUntil(doTest(e))); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-frame-postMessage.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-frame-postMessage.html new file mode 100644 index 00000000000..c4428e88a3d --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-frame-postMessage.html @@ -0,0 +1,39 @@ +<html> +<body> +<script> +var messageData; +function registerMessage() +{ + navigator.serviceWorker.onmessage = (e) => { + if (window.messageData === undefined) + window.messageData = e.data; + } +} + +function listenToMessages() +{ + messageData = []; + setTimeout(() => { + navigator.serviceWorker.addEventListener("message", (e) => { + messageData.push(e.data); + }, { once:true }); + }, 500); + setTimeout(() => { + navigator.serviceWorker.onmessage = (e) => { + messageData.push(e.data); + }; + }, 1000); +} + +if (window.location.search === "?repeatMessages") { + setTimeout(() => { + registerMessage(); + }, 500); +} else if (window.location.search.includes("listener")) { + listenToMessages(); +} else { + registerMessage(); +} +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-late-postMessage.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-late-postMessage.js new file mode 100644 index 00000000000..41d2db43b1f --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-late-postMessage.js @@ -0,0 +1,6 @@ +setTimeout(() => { + navigator.serviceWorker.onmessage = e => self.postMessage(e.data); +}, 500); +setTimeout(() => { + self.postMessage("No message received"); +}, 5000); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-postMessage.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-postMessage.js new file mode 100644 index 00000000000..628dc65db11 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/controlled-worker-postMessage.js @@ -0,0 +1,4 @@ +navigator.serviceWorker.onmessage = e => self.postMessage(e.data); +setTimeout(() => { + self.postMessage("No message received"); +}, 5000); diff --git a/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/run-url-selection-operation-limit-inner.https.html b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/run-url-selection-operation-limit-inner.https.html new file mode 100644 index 00000000000..c5d057f3e2f --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/run-url-selection-operation-limit-inner.https.html @@ -0,0 +1,71 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage-selecturl-limit/resources/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +function parseBitLimit() { + const url = new URL(location.href); + return parseInt(url.searchParams.get("bits")); +} + +async function init() { + const [outerKey] = parseKeylist(); + const bitLimit = parseBitLimit(); + const innerKey = token(); + const numUrls = 8; + const urls = generateUrls(numUrls, "/shared-storage/resources/frame", + [innerKey]); + const bitsPerCall = Math.log2(numUrls); + + await sharedStorage.worklet.addModule( + "/shared-storage/resources/simple-module.js"); + + for (let i = 0; i < Math.floor(bitLimit / bitsPerCall); ++i) { + let config = await sharedStorage.selectURL( + "test-url-selection-operation", urls, + {data: {'mockResult': 1}, keepAlive: true, resolveToConfig: true}); + assert_true(config instanceof FencedFrameConfig); + attachFencedFrame(config, 'opaque-ads'); + try { + const result = await nextValueFromServer(innerKey); + assert_equals(result, "frame1_loaded", + `for origin ${location.origin}, index ${i} when budget should remain;`); + } catch (error) { + writeValueToServer(outerKey, + `run_url_selection_limit_inner_failed ${error}`); + return; + } + } + + // Either the per-origin per-pageload bit limit or the overall per-pageload + // bit limit for `selectURL()` has been reached. The next call should return + // the default URL. + let config = await sharedStorage.selectURL( + "test-url-selection-operation", urls, + {data: {'mockResult': 1}, resolveToConfig: true}); + assert_true(config instanceof FencedFrameConfig); + attachFencedFrame(config, 'opaque-ads'); + try { + const result = await nextValueFromServer(innerKey); + assert_equals(result, "frame0_loaded", + `for origin ${location.origin} when budget should be exhausted;`); + } catch (error) { + writeValueToServer(outerKey, + `run_url_selection_limit_inner_failed ${error}`); + return; + } + + // No errors were caught, so this portion of the test succeeded. + writeValueToServer(outerKey, "run_url_selection_limit_inner_succeeded"); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/utils.js b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/utils.js new file mode 100644 index 00000000000..a7462147d77 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/resources/utils.js @@ -0,0 +1,19 @@ +// META: script=/fenced-frame/resources/utils.js + +// Generate a list of URLs to use as input to sharedStorage.selectURL. +// @param {integer} size - The number of URLs to generate +// @param {string} pathPrefix - Prefix of the relative URL to use +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +// @return {SharedStorageUrlWithMetadata list} - A list of +// SharedStorageUrlWithMetadata +// dictionaries whose "url" +// values have `keylist` appended +// to their `searchParams` +function generateUrls(size, pathPrefix, keylist) { + return new Array(size).fill(0).map((e, i) => { + return { + url: generateURL(pathPrefix + i.toString() + '.html', keylist) + } + }); +} diff --git a/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit-multiple-origins.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit-multiple-origins.tentative.https.sub.html new file mode 100644 index 00000000000..df69597ee85 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit-multiple-origins.tentative.https.sub.html @@ -0,0 +1,56 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/shared-storage-selecturl-limit/resources/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +function getOtherOriginURL(url) { + return new URL(url.toString().replace(location.origin, + get_host_info().AUTHENTICATED_ORIGIN)); +} + +promise_test(async () => { + const ancestorKey = token(); + const perOriginBitLimit = 6; + const bitsKey = "bits"; + + let url0 = generateURL( + "/shared-storage-selecturl-limit/" + + "resources/run-url-selection-operation-limit-inner.https.html", + [ancestorKey]); + + // The per origin per pageload limit is 6 bits. + url0.searchParams.append(bitsKey, perOriginBitLimit.toString()); + attachIFrame(url0); + const result0 = await nextValueFromServer(ancestorKey); + assert_equals(result0, "run_url_selection_limit_inner_succeeded"); + + // This url will already have a search param of ("bits", "6") appended. + let url1 = getRemoteOriginURL(url0); + attachIFrame(url1); + const result1 = await nextValueFromServer(ancestorKey); + assert_equals(result1, "run_url_selection_limit_inner_succeeded"); + + let url2 = generateURL( + "/shared-storage-selecturl-limit/" + + "resources/run-url-selection-operation-limit-inner.https.html", + [ancestorKey]); + + // Since the overall per pageload limit is 12 bits, it should have already + // been reached, but we need to verify this using a third origin whose per + // origin budget is fresh. + url2.searchParams.append(bitsKey, "0"); + url2 = getOtherOriginURL(url2); + attachIFrame(url2); + const result2 = await nextValueFromServer(ancestorKey); + assert_equals(result2, "run_url_selection_limit_inner_succeeded"); +}, 'selectURL() with overall per-pageload limit'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit.tentative.https.sub.html new file mode 100644 index 00000000000..b8f8d5a4bf0 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage-selecturl-limit/run-url-selection-operation-limit.tentative.https.sub.html @@ -0,0 +1,48 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage-selecturl-limit/resources/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async () => { + const ancestorKey = token(); + const perOriginBitLimit = 6; + const numUrls = 8; + const urls = generateUrls(numUrls, "/shared-storage/resources/frame", + [ancestorKey]); + const bitsPerCall = Math.log2(numUrls); + + await sharedStorage.worklet.addModule( + "/shared-storage/resources/simple-module.js"); + + + for (let i = 0; i < Math.floor(perOriginBitLimit / bitsPerCall); ++i) { + let config = await sharedStorage.selectURL( + "test-url-selection-operation", urls, + {data: {'mockResult': 1}, keepAlive: true, resolveToConfig: true}); + assert_true(config instanceof FencedFrameConfig); + attachFencedFrame(config, 'opaque-ads'); + const result = await nextValueFromServer(ancestorKey); + assert_equals(result, "frame1_loaded", + `for index ${i} when budget should remain;`); + } + + // The per-origin per-pageload bit limit for `selectURL()` has been + // reached. The next call should return the default URL. + let config = await sharedStorage.selectURL( + "test-url-selection-operation", urls, + {data: {'mockResult': 1}, resolveToConfig: true}); + assert_true(config instanceof FencedFrameConfig); + attachFencedFrame(config, 'opaque-ads'); + const result = await nextValueFromServer(ancestorKey); + assert_equals(result, "frame0_loaded", 'when budget should be exhausted;'); + +}, 'selectURL() with per-origin per-pageload limit'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/add-module.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/add-module.tentative.https.sub.html new file mode 100644 index 00000000000..7859e750c96 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/add-module.tentative.https.sub.html @@ -0,0 +1,25 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async t => { + return promise_rejects_dom(t, "DataError", + sharedStorage.worklet.addModule("https://")); +}, 'addModule with invalid url'); + +promise_test(async t => { + return promise_rejects_dom(t, "DataError", + sharedStorage.worklet.addModule("https://foo.com")); +}, 'addModule with cross-origin url'); + +promise_test(() => { + return sharedStorage.worklet.addModule( + "/shared-storage/resources/simple-module.js"); +}, 'addModule'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/combined-setters-and-operations.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/combined-setters-and-operations.tentative.https.sub.html new file mode 100644 index 00000000000..2c544b9b8e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/combined-setters-and-operations.tentative.https.sub.html @@ -0,0 +1,49 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +for (const resolve_to_config of [true, false]) { + promise_test(async () => { + const ancestor_key = token(); + let url0 = generateURL("/shared-storage/resources/frame0.html", + [ancestor_key]); + let url1 = generateURL("/shared-storage/resources/frame1.html", + [ancestor_key]); + let url2 = generateURL("/shared-storage/resources/frame2.html", + [ancestor_key]); + + await sharedStorage.set('key0-set-from-document', 'value0'); + await addModuleOnce( + "/shared-storage/resources/verify-storage-entries-module.js"); + await sharedStorage.run("set-key0-operation", {keepAlive: true}); + + let select_url_result = await sharedStorage.selectURL( + "verify-storage-entries-url-selection-operation", + [{url: url0, + reportingMetadata: {'click': + "/shared-storage/resources/frame0.html"}}, + {url: url1, + reportingMetadata: + {'mouse interaction': "/shared-storage/resources/frame1.html", + 'click': "/shared-storage/resources/frame2.html"}}], + {resolveToConfig: resolve_to_config, keepAlive: resolve_to_config}); + + assert_true(validateSelectURLResult(select_url_result, resolve_to_config)); + attachFencedFrame(select_url_result, 'opaque-ads'); + + // frame1_loaded implies that the setters and the operations were successful. + assert_equals(await nextValueFromServer(ancestor_key), "frame1_loaded"); + + }, 'verify-storage-entries-url-selection-operation selectURL() resolves to ' + + (resolve_to_config ? 'config' : 'urn:uuid')); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/embedder-context.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/embedder-context.tentative.https.sub.html new file mode 100644 index 00000000000..44f45a76431 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/embedder-context.tentative.https.sub.html @@ -0,0 +1,109 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async () => { + const ancestorKey = token(); + + let fencedFrameConfig0 = await runSelectURL( + "/shared-storage/resources/embedder-context-inner.https.html", + [ancestorKey], true); + assert_true(validateSelectURLResult(fencedFrameConfig0, true)); + + fencedFrameConfig0.setSharedStorageContext("here is some context"); + + attachFencedFrame(fencedFrameConfig0, 'opaque-ads'); + const result0 = await nextValueFromServer(ancestorKey); + assert_equals(result0, "embedder_context_inner_loaded"); + + let url0 = generateURL("/shared-storage/resources/frame0.html", [ancestorKey]); + let url1 = generateURL("/shared-storage/resources/frame1.html", [ancestorKey]); + + let fencedFrameConfig1 = await sharedStorage.selectURL( + "verify-key-value", [{url: url0}, {url: url1}], + {data: {'expectedKey': ancestorKey, + 'expectedValue': 'here is some context'}, + resolveToConfig: true, + keepAlive: true}); + assert_true(validateSelectURLResult(fencedFrameConfig1, true)); + + attachFencedFrame(fencedFrameConfig1, 'opaque-ads'); + const result1 = await nextValueFromServer(ancestorKey); + assert_equals(result1, "frame1_loaded"); +}, 'embedder sharedStorage.context'); + +promise_test(async () => { + const ancestorKey = token(); + + let fencedFrameConfig0 = await runSelectURL( + "/shared-storage/resources/embedder-context-inner.https.html", + [ancestorKey], true); + assert_true(validateSelectURLResult(fencedFrameConfig0, true)); + + attachFencedFrame(fencedFrameConfig0, 'opaque-ads'); + const result0 = await nextValueFromServer(ancestorKey); + assert_equals(result0, "embedder_context_inner_loaded"); + + let url0 = generateURL("/shared-storage/resources/frame0.html", [ancestorKey]); + let url1 = generateURL("/shared-storage/resources/frame1.html", [ancestorKey]); + + let fencedFrameConfig1 = await sharedStorage.selectURL( + "verify-key-value", [{url: url0}, {url: url1}], + {data: {'expectedKey': ancestorKey, 'expectedValue': 'undefined'}, + resolveToConfig: true, + keepAlive: true}); + assert_true(validateSelectURLResult(fencedFrameConfig1, true)); + + attachFencedFrame(fencedFrameConfig1, 'opaque-ads'); + const result1 = await nextValueFromServer(ancestorKey); + assert_equals(result1, "frame1_loaded"); +}, 'undefined embedder sharedStorage.context'); + +promise_test(async () => { + const outerKey = token(); + const innerKey0 = token(); + const innerKey1 = token(); + + let fencedFrameConfig0 = await runSelectURL( + "/shared-storage/resources/embedder-context-nested-inner.https.html", + [outerKey, innerKey0, innerKey1], true); + assert_true(validateSelectURLResult(fencedFrameConfig0, true)); + + fencedFrameConfig0.setSharedStorageContext("here is some context"); + + attachFencedFrame(fencedFrameConfig0, 'opaque-ads'); + const result0 = await nextValueFromServer(outerKey); + assert_equals(result0, "embedder_context_nested_inner_loaded"); + + let url0 = generateURL("/shared-storage/resources/frame0.html", [outerKey]); + let url1 = generateURL("/shared-storage/resources/frame1.html", [outerKey]); + + let fencedFrameConfig1 = await sharedStorage.selectURL( + "verify-key-value", [{url: url0}, {url: url1}], + {data: {'expectedKey': innerKey0, + 'expectedValue': 'here is some context'}, + resolveToConfig: true}); + assert_true(validateSelectURLResult(fencedFrameConfig1, true)); + + attachFencedFrame(fencedFrameConfig1, 'opaque-ads'); + const result1 = await nextValueFromServer(outerKey); + assert_equals(result1, "frame1_loaded"); + + let iframeURL = + generateURL("/shared-storage/resources/embedder-context-nested-iframe.https.html", + [outerKey, innerKey1]); + iframeURL = getRemoteOriginURL(iframeURL); + attachIFrame(iframeURL); + const result2 = await nextValueFromServer(outerKey); + assert_equals(result2, "embedder_context_nested_iframe_loaded"); +}, 'embedder sharedStorage.context with nested iframes'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html new file mode 100644 index 00000000000..e4b59f7f7a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> + +async function init() { + const [ancestorKey] = parseKeylist(); + + await addModuleOnce("/shared-storage/resources/embedder-context-module.js"); + await sharedStorage.run("report-context", + { + data: {'ancestorKey': ancestorKey} + }); + + await writeValueToServer(ancestorKey, "embedder_context_inner_loaded"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html.headers b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-module.js b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-module.js new file mode 100644 index 00000000000..782b97aea94 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-module.js @@ -0,0 +1,16 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class ReportContext { + async run(data) { + if (!data || !data.hasOwnProperty('ancestorKey')) { + return; + } + const ancestorKey = data['ancestorKey']; + const context = sharedStorage.context; + await sharedStorage.set(ancestorKey, context); + } +} + +register('report-context', ReportContext); diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-iframe.https.html b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-iframe.https.html new file mode 100644 index 00000000000..2ba25d1ed99 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-iframe.https.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<script src="/resources/testharness.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> + +async function init() { + const [outerKey, innerKey] = parseKeylist(); + let url0 = generateURL("/shared-storage/resources/frame0.html", [innerKey]); + let url1 = generateURL("/shared-storage/resources/frame1.html", [innerKey]); + + await addModuleOnce("simple-module.js"); + let fencedFrameConfig = await sharedStorage.selectURL( + "verify-key-value", [{url: url0}, {url: url1}], + {data: {'expectedKey': innerKey, 'expectedValue': 'undefined'}, + resolveToConfig: true}); + assert_true(validateSelectURLResult(fencedFrameConfig, true)); + + attachFencedFrame(fencedFrameConfig, 'opaque-ads'); + const result = await nextValueFromServer(innerKey); + assert_equals(result, "frame1_loaded"); + + await writeValueToServer(outerKey, "embedder_context_nested_iframe_loaded"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html new file mode 100644 index 00000000000..c704a00b73a --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<script src="/resources/testharness.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> +async function init() { + const [outerKey, innerKey0, innerKey1] = parseKeylist(); + let url0 = generateURL( + "/shared-storage/resources/embedder-context-inner.https.html", + [innerKey0]); + + attachIFrame(url0); + const result0 = await nextValueFromServer(innerKey0); + assert_equals(result0, "embedder_context_inner_loaded"); + + let url1 = generateURL( + "/shared-storage/resources/embedder-context-inner.https.html", + [innerKey1]); + url1 = getRemoteOriginURL(url1); + + attachIFrame(url1); + const result1 = await nextValueFromServer(innerKey1); + assert_equals(result1, "embedder_context_inner_loaded"); + + await writeValueToServer(outerKey, "embedder_context_nested_inner_loaded"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html.headers b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/embedder-context-nested-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html b/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html new file mode 100644 index 00000000000..c9b559fe83a --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> +async function init() { + const [ancestor_key] = parseKeylist(); + writeValueToServer(ancestor_key, "frame0_loaded"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html.headers b/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/frame0.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html b/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html new file mode 100644 index 00000000000..a34990dc034 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> +async function init() { + const [ancestor_key] = parseKeylist(); + writeValueToServer(ancestor_key, "frame1_loaded"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html.headers b/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/frame1.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/report.py b/tests/wpt/web-platform-tests/shared-storage/resources/report.py new file mode 100644 index 00000000000..7d0fa36019e --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/report.py @@ -0,0 +1,25 @@ +def main(request, response): + + # `token` should be a unique UUID request parameter for the duration of this + # request. It will get stored in the server stash and will be used later in + # a query request. + # `query` should be a request parameter indicating the request would like + # to know how many times the server has seen the request (with the + # same token). + token = request.GET.first(b"token", None) + is_query = request.GET.first(b"query", None) is not None + with request.server.stash.lock: + value = request.server.stash.take(token) + count = 0 + if value is not None: + count = int(value) + if is_query: + request.server.stash.put(token, count) + else: + count += 1 + request.server.stash.put(token, count) + + headers = [] + if is_query: + headers = [(b"Count", count)] + return (200, headers, b"") diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html b/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html new file mode 100644 index 00000000000..e3d0475f122 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<script src="/fenced-frame/resources/utils.js"></script> +<body> +<script> +async function init() { + const [ancestor_key] = parseKeylist(); + + window.fence.reportEvent({ + eventType: 'click', + eventData: "user clicked", + destination: ['shared-storage-select-url'] + }); + + writeValueToServer(ancestor_key, "sender0_reported"); +} + +init(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html.headers b/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/sender0.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/simple-module.js b/tests/wpt/web-platform-tests/shared-storage/resources/simple-module.js index ad9a93a7c16..5ebc149fd4a 100644 --- a/tests/wpt/web-platform-tests/shared-storage/resources/simple-module.js +++ b/tests/wpt/web-platform-tests/shared-storage/resources/simple-module.js @@ -1 +1,30 @@ -'use strict'; +// Copyright 2022 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class TestURLSelectionOperation { + async run(urls, data) { + if (data && data.hasOwnProperty('mockResult')) { + return data['mockResult']; + } + + return -1; + } +} + +class VerifyKeyValue { + async run(urls, data) { + if (data && data.hasOwnProperty('expectedKey') && + data.hasOwnProperty('expectedValue')) { + const expectedValue = data['expectedValue']; + const value = await sharedStorage.get(data['expectedKey']); + if (value === expectedValue) { + return 1; + } + } + return -1; + } +} + +register('test-url-selection-operation', TestURLSelectionOperation); +register('verify-key-value', VerifyKeyValue); diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/util.js b/tests/wpt/web-platform-tests/shared-storage/resources/util.js index 2ad668c85a1..a41b4de3a59 100644 --- a/tests/wpt/web-platform-tests/shared-storage/resources/util.js +++ b/tests/wpt/web-platform-tests/shared-storage/resources/util.js @@ -85,3 +85,31 @@ async function AreSharedStorageMethodsAllowedByPermissionsPolicy() { return false; } + +// Run sharedStorage.worklet.addModule once. +// @param {string} module - The URL to the module. +async function addModuleOnce(module) { + try { + await sharedStorage.worklet.addModule(module); + } catch (e) { + // Shared Storage needs to have a module added before we can operate on it. + // It is generated on the fly with this call, and since there's no way to + // tell through the API if a module already exists, wrap the addModule call + // in a try/catch so that if it runs a second time in a test, it will + // gracefully fail rather than bring the whole test down. + } +} + +// Validate the type of the result of sharedStorage.worklet.selectURL. +// @param result - The result of sharedStorage.worklet.selectURL. +// @param {boolean} - Whether sharedStorage.worklet.selectURL is resolved to +// a fenced frame config (true) or an urn:uuid (false). +// @return {boolean} Whether sharedStorage.worklet.selectURL returns an expected +// result type or not. +function validateSelectURLResult(result, resolve_to_config) { + if (resolve_to_config) { + return result instanceof FencedFrameConfig; + } + + return result.startsWith('urn:uuid:'); +} diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/verify-get-undefined-module.js b/tests/wpt/web-platform-tests/shared-storage/resources/verify-get-undefined-module.js new file mode 100644 index 00000000000..56bc2f51e2b --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/verify-get-undefined-module.js @@ -0,0 +1,17 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class VerifyGetUndefinedURLSelectionOperation { + async run(urls, data) { + if (await sharedStorage.get('key-not-previously-set') === undefined) { + return 1; + } + + return -1; + } +} + +register( + 'verify-get-undefined-url-selection-operation', + VerifyGetUndefinedURLSelectionOperation); diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/verify-storage-entries-module.js b/tests/wpt/web-platform-tests/shared-storage/resources/verify-storage-entries-module.js new file mode 100644 index 00000000000..ee0c636cd13 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/verify-storage-entries-module.js @@ -0,0 +1,26 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class SetKey0Operation { + async run(data) { + sharedStorage.set('key0-set-from-worklet', 'value0'); + } +} + +class VerifyStorageEntriesURLSelectionOperation { + async run(urls, data) { + if (await sharedStorage.get('key0-set-from-worklet') === 'value0' && + await sharedStorage.get('key0-set-from-document') === 'value0') { + return 1; + } + + return -1; + } +} + +register('set-key0-operation', SetKey0Operation); + +register( + 'verify-storage-entries-url-selection-operation', + VerifyStorageEntriesURLSelectionOperation); diff --git a/tests/wpt/web-platform-tests/shared-storage/run-operation-in-detached-frame.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/run-operation-in-detached-frame.tentative.https.sub.html new file mode 100644 index 00000000000..a7ef103d00f --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/run-operation-in-detached-frame.tentative.https.sub.html @@ -0,0 +1,22 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> + <iframe></iframe> + <script> + promise_test(async t => { + const iframe = document.querySelector('iframe'); + const childSharedStorage = iframe.contentWindow.sharedStorage; + iframe.remove(); + + try { + await childSharedStorage.run("operation1"); + } catch (e) { + assert_equals(e.name, 'InvalidAccessError'); + return; + } + assert_unreached("did not reject"); + }, 'run() when frame is detached'); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/run-operation-keep-alive.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/run-operation-keep-alive.tentative.https.sub.html new file mode 100644 index 00000000000..2756805485c --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/run-operation-keep-alive.tentative.https.sub.html @@ -0,0 +1,34 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/shared-storage/resources/util.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async () => { + await addModuleOnce("/shared-storage/resources/simple-module.js"); + await sharedStorage.run("operation1", {keepAlive: true}); + return sharedStorage.run("operation1", {keepAlive: true}); +}, 'run() twice with keepAlive: true'); + +promise_test(async () => { + await addModuleOnce("/shared-storage/resources/simple-module.js"); + await sharedStorage.run("operation1", {keepAlive: true}); + await sharedStorage.run("operation1", {keepAlive: false}); + try { + await sharedStorage.run("operation1"); + } catch (e) { + assert_equals(e.name, 'OperationError'); + assert_equals(e.message, 'The sharedStorage worklet cannot execute' + + ' further operations because the previous' + + ' operation did not include the option' + + ' \'keepAlive: true\'.'); + return; + } + assert_unreached("did not reject"); +}, 'run() with keepAlive: true, then keepAlive: false, then error'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/run-operation.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/run-operation.tentative.https.sub.html new file mode 100644 index 00000000000..c6c70805f11 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/run-operation.tentative.https.sub.html @@ -0,0 +1,31 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +'use strict'; + +promise_test(() => { + return sharedStorage.run("operation1", {keepAlive: true}); +}, 'run()'); + +promise_test(() => { + return sharedStorage.run("operation1", + {data: {'custom-key': 'custom-value'}, + keepAlive: true}); +}, 'run() with custom data'); + +promise_test(async t => { + try { + await sharedStorage.run("operation1", {data: window}); + } catch (e) { + assert_equals(e.name, 'DataCloneError'); + assert_equals(e.message, 'Failed to execute \'run\' on \'SharedStorage\': #<Window> could not be cloned.'); + return; + } + assert_unreached("did not reject"); +}, 'run() with unsupported serializable type'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation-without-add-module.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation-without-add-module.tentative.https.sub.html new file mode 100644 index 00000000000..0626684b677 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation-without-add-module.tentative.https.sub.html @@ -0,0 +1,151 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +'use strict'; + +for (const resolve_to_config of [true, false]) { + promise_test(async t => { + return promise_rejects_dom(t, "OperationError", + sharedStorage.selectURL( + "test-url-selection-operation", + [{url: "/shared-storage/resources/frame0.html"}], + {resolveToConfig: resolve_to_config, keepAlive: true})); + }, 'selectURL() without addModule, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", + [{url: "1"}, {url: "2"}, {url: "3"}, {url: "4"}, {url: "5"}, + {url: "6"}, {url: "7"}, {url: "8"}, {url: "9"}], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, 'Length of the \"urls\" parameter is not valid.'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with urls array length too big, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", + [], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, 'Length of the \"urls\" parameter is not valid.'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with empty urls array, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", [{ + reportingMetadata: { + 'click': "https://google.com" + } + }], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'TypeError'); + assert_equals(true, e.message.startsWith( + 'Failed to execute \'selectURL\' on \'SharedStorage\': ' + + 'Failed to read the \'url\' property from ' + + '\'SharedStorageUrlWithMetadata\':') && + e.message.endsWith('Failed to read the \'url\' property from ' + + '\'SharedStorageUrlWithMetadata\': Required member is undefined.')); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with missing url, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", [{ + url: "https://#" + }], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, + 'The url \"https://#\" is invalid.'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with invalid url, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", [{ + url: "/shared-storage/resources/frame0.html", + reportingMetadata: { + 'click': "https://#" + } + }], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, + 'The metadata for the url at index 0 has an invalid ' + + 'or non-HTTPS report_url parameter \"https://#\".'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with invalid report url ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", [{ + url: "/shared-storage/resources/frame0.html", + reportingMetadata: { + 'click': "http://google.com" + } + }], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, 'The metadata for the url at index 0 has an ' + + 'invalid or non-HTTPS report_url parameter \"http://google.com\".'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with http report url, ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); + + promise_test(async t => { + try { + await sharedStorage.selectURL( + "test-url-selection-operation", [{ + url: "/shared-storage/resources/frame0.html", + reportingMetadata: {} + }], + {resolveToConfig: resolve_to_config, keepAlive: true}); + } catch (e) { + assert_equals(e.name, 'DataError'); + assert_equals(e.message, 'selectURL could not get reportingMetadata ' + + 'object attributes'); + return; + } + assert_unreached("did not reject"); + }, 'selectURL() with invalid reportingMetadata ' + + 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation.tentative.https.sub.html new file mode 100644 index 00000000000..68f420a8a79 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/run-url-selection-operation.tentative.https.sub.html @@ -0,0 +1,52 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +for (const resolve_to_config of [true, false]) { + promise_test(async () => { + const ancestor_key = token(); + let url0 = generateURL("/shared-storage/resources/frame0.html", + [ancestor_key]); + let url1 = generateURL("/shared-storage/resources/frame1.html", + [ancestor_key]); + + await addModuleOnce("/shared-storage/resources/simple-module.js"); + + let select_url_result0 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': 0}, resolveToConfig: resolve_to_config, + keepAlive: true}); + assert_true(validateSelectURLResult(select_url_result0, resolve_to_config)); + attachFencedFrame(select_url_result0, 'opaque-ads'); + const result0 = await nextValueFromServer(ancestor_key); + assert_equals(result0, "frame0_loaded"); + + let select_url_result1 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': 1}, resolveToConfig: resolve_to_config, + keepAlive: true}); + assert_true(validateSelectURLResult(select_url_result1, resolve_to_config)); + attachFencedFrame(select_url_result1, 'opaque-ads'); + const result1 = await nextValueFromServer(ancestor_key); + assert_equals(result1, "frame1_loaded"); + + let select_url_result2 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': -1}, resolveToConfig: resolve_to_config, + keepAlive: true}); + assert_true(validateSelectURLResult(select_url_result2, resolve_to_config)); + attachFencedFrame(select_url_result2, 'opaque-ads'); + const result2 = await nextValueFromServer(ancestor_key); + assert_equals(result2, "frame0_loaded"); + }, 'selectURL() resolves to ' + (resolve_to_config ? 'config' : 'urn:uuid')); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-keep-alive.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/select-url-keep-alive.tentative.https.sub.html new file mode 100644 index 00000000000..f3755538b9d --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-keep-alive.tentative.https.sub.html @@ -0,0 +1,53 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async () => { + const ancestor_key = token(); + let url0 = generateURL("/shared-storage/resources/frame0.html", + [ancestor_key]); + let url1 = generateURL("/shared-storage/resources/frame1.html", + [ancestor_key]); + + await addModuleOnce("/shared-storage/resources/simple-module.js"); + + let select_url_result0 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': 0}, resolveToConfig: true, keepAlive: true}); + assert_true(validateSelectURLResult(select_url_result0, true)); + attachFencedFrame(select_url_result0, 'opaque-ads'); + const result0 = await nextValueFromServer(ancestor_key); + assert_equals(result0, "frame0_loaded"); + + let select_url_result1 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': 1}, resolveToConfig: true, keepAlive: false}); + assert_true(validateSelectURLResult(select_url_result1, true)); + attachFencedFrame(select_url_result1, 'opaque-ads'); + const result1 = await nextValueFromServer(ancestor_key); + assert_equals(result1, "frame1_loaded"); + + try { + let select_url_result2 = await sharedStorage.selectURL( + "test-url-selection-operation", [{url: url0}, {url: url1}], + {data: {'mockResult': 0}, resolveToConfig: true}); + } catch (e) { + assert_equals(e.name, 'OperationError'); + assert_equals(e.message, 'The sharedStorage worklet cannot execute' + + ' further operations because the previous' + + ' operation did not include the option' + + ' \'keepAlive: true\'.'); + return; + } + assert_unreached("did not reject"); +}, 'selectURL() with keepAlive: true, then keepAlive: false, then error'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-report-event.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/select-url-report-event.tentative.https.sub.html new file mode 100644 index 00000000000..b2ad2d1b2a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-report-event.tentative.https.sub.html @@ -0,0 +1,65 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +// Poll the server for the test result. +async function waitForReportCount(id) { + const url = `/shared-storage/resources/report.py?query&token=${id}`; + for (let i = 0; i < 30; ++i) { + const response = await fetch(url); + let count = response.headers.get("Count"); + + if (!count || count === '0') { + await new Promise(resolve => step_timeout(resolve, 100)); + continue; + } + + return parseInt(count); + } + assert_true(false, 'timeout'); +} + +for (const resolve_to_config of [true, false]) { + promise_test(async () => { + const ancestor_key = token(); + let url0 = generateURL("/shared-storage/resources/sender0.html", + [ancestor_key]); + let url1 = generateURL("/shared-storage/resources/sender1.html", + [ancestor_key]); + + await addModuleOnce("/shared-storage/resources/simple-module.js"); + + const report_id = token(); + const reportURL = `/shared-storage/resources/report.py?token=${report_id}`; + let select_url_result = await sharedStorage.selectURL( + "test-url-selection-operation", [ + {url: url0, + reportingMetadata: + { + 'click': reportURL, + 'mouse interaction': + "/shared-storage/resources/receiver1.html" + } + }, {url: url1} + ], {data: {'mockResult': 0}, resolveToConfig: resolve_to_config, + keepAlive: resolve_to_config}); + assert_true(validateSelectURLResult(select_url_result, resolve_to_config)); + attachFencedFrame(select_url_result, 'opaque-ads'); + const result0 = await nextValueFromServer(ancestor_key); + assert_equals(result0, "sender0_reported"); + + const reportCount = await waitForReportCount(report_id); + assert_equals(reportCount, 1, `Num reports received: ${reportCount}`); + }, 'selectURL() with reportEvent(), selectURL() resolves to ' + + (resolve_to_config ? 'config' : 'urn:uuid')); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/setters.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/setters.tentative.https.sub.html new file mode 100644 index 00000000000..ffc4bfbd7d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/setters.tentative.https.sub.html @@ -0,0 +1,76 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +'use strict'; + +promise_test(async t => { + return promise_rejects_js(t, TypeError, sharedStorage.set()); +}, 'sharedStorage.set with 0 argument'); + +promise_test(async t => { + return promise_rejects_js(t, TypeError, sharedStorage.set("a")); +}, 'sharedStorage.set with 1 argument'); + +promise_test(() => { + return sharedStorage.set("a", "b"); +}, 'sharedStorage.set with 2 arguments'); + +promise_test(() => { + return sharedStorage.set("a", "b", {ignoreIfPresent: true}); +}, 'sharedStorage.set with options'); + +promise_test(async t => { + return promise_rejects_js(t, TypeError, sharedStorage.set("a", "b", "c")); +}, 'sharedStorage.set with invalid options'); + +promise_test(() => { + return sharedStorage.set('a'.repeat(1024), 'b'.repeat(1024)); +}, 'sharedStorage.set with max allowed key and value length'); + +promise_test(async t => { + try { + await sharedStorage.set('', 'b'); + } catch (e) { + assert_equals(e.name, 'DataError'); + return; + } + assert_unreached("did not reject"); +}, 'sharedStorage.set with empty key'); + +promise_test(async t => { + try { + await sharedStorage.set('a'.repeat(1025), 'b'); + } catch (e) { + assert_equals(e.name, 'DataError'); + return; + } + assert_unreached("did not reject"); +}, 'sharedStorage.set with key length too big'); + +promise_test(async t => { + try { + await sharedStorage.set('a', 'b'.repeat(1025)); + } catch (e) { + assert_equals(e.name, 'DataError'); + return; + } + assert_unreached("did not reject"); +}, 'sharedStorage.set with value length too big'); + +promise_test(() => { + return sharedStorage.append("a", "b"); +}, 'sharedStorage.append'); + +promise_test(() => { + return sharedStorage.clear(); +}, 'sharedStorage.clear'); + +promise_test(() => { + return sharedStorage.delete("a"); +}, 'sharedStorage.delete'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/shared-storage/verify-get-undefined.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/verify-get-undefined.tentative.https.sub.html new file mode 100644 index 00000000000..501998bf613 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/verify-get-undefined.tentative.https.sub.html @@ -0,0 +1,46 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/shared-storage/resources/util.js"></script> +<script src="/fenced-frame/resources/utils.js"></script> + +<body> +<script> +'use strict'; + +for (const resolve_to_config of [true, false]) { + promise_test(async () => { + const ancestor_key = token(); + let url0 = generateURL("/shared-storage/resources/frame0.html", + [ancestor_key]); + let url1 = generateURL("/shared-storage/resources/frame1.html", + [ancestor_key]); + + await addModuleOnce( + "/shared-storage/resources/verify-get-undefined-module.js"); + + let select_url_result = await sharedStorage.selectURL( + "verify-get-undefined-url-selection-operation", + [{url: url0, + reportingMetadata: {'click': + "/shared-storage/resources/frame0.html"}}, + {url: url1, + reportingMetadata: + {'mouse interaction': "/shared-storage/resources/frame1.html", + 'click': "/shared-storage/resources/frame2.html"}}], + {resolveToConfig: resolve_to_config, + keepAlive: resolve_to_config}); + + assert_true(validateSelectURLResult(select_url_result, resolve_to_config)); + attachFencedFrame(select_url_result, 'opaque-ads'); + + // frame1_loaded implies that the operation was successful. + assert_equals(await nextValueFromServer(ancestor_key), "frame1_loaded"); + +}, 'verify-get-undefined-url-selection-operation selectURL() resolves to ' + + (resolve_to_config ? 'config' : 'urn:uuid')); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/streams/piping/general-addition.any.js b/tests/wpt/web-platform-tests/streams/piping/general-addition.any.js new file mode 100644 index 00000000000..2562b706433 --- /dev/null +++ b/tests/wpt/web-platform-tests/streams/piping/general-addition.any.js @@ -0,0 +1,15 @@ +// META: global=window,worker +'use strict'; + +promise_test(async t => { + /** @type {ReadableStreamDefaultController} */ + var con; + let synchronous = false; + new ReadableStream({ start(c) { con = c }}, { highWaterMark: 0 }).pipeTo( + new WritableStream({ write() { synchronous = true; } }) + ) + // wait until start algorithm finishes + await Promise.resolve(); + con.enqueue(); + assert_false(synchronous, 'write algorithm must not run synchronously'); +}, "enqueue() must not synchronously call write algorithm"); diff --git a/tests/wpt/web-platform-tests/streams/piping/general.any.js b/tests/wpt/web-platform-tests/streams/piping/general.any.js index faeb8e321af..bec3480f653 100644 --- a/tests/wpt/web-platform-tests/streams/piping/general.any.js +++ b/tests/wpt/web-platform-tests/streams/piping/general.any.js @@ -209,16 +209,3 @@ promise_test(t => { return rs.pipeTo(ws, null); }, 'pipeTo() promise should resolve if null is passed'); - -promise_test(async t => { - /** @type {ReadableStreamDefaultController} */ - var con; - let synchronous = false; - new ReadableStream({ start(c) { con = c }}, { highWaterMark: 0 }).pipeTo( - new WritableStream({ write() { synchronous = true; } }) - ) - // wait until start algorithm finishes - await Promise.resolve(); - con.enqueue(); - assert_false(synchronous, 'write algorithm must not run synchronously'); -}, "enqueue() must not synchronously call write algorithm"); diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/from.any.js b/tests/wpt/web-platform-tests/streams/readable-streams/from.any.js new file mode 100644 index 00000000000..04a03545ad5 --- /dev/null +++ b/tests/wpt/web-platform-tests/streams/readable-streams/from.any.js @@ -0,0 +1,474 @@ +// META: global=window,worker,jsshell +// META: script=../resources/test-utils.js +'use strict'; + +const iterableFactories = [ + ['an array of values', () => { + return ['a', 'b']; + }], + + ['an array of promises', () => { + return [ + Promise.resolve('a'), + Promise.resolve('b') + ]; + }], + + ['an array iterator', () => { + return ['a', 'b'][Symbol.iterator](); + }], + + ['a string', () => { + // This iterates over the code points of the string. + return 'ab'; + }], + + ['a Set', () => { + return new Set(['a', 'b']); + }], + + ['a Set iterator', () => { + return new Set(['a', 'b'])[Symbol.iterator](); + }], + + ['a sync generator', () => { + function* syncGenerator() { + yield 'a'; + yield 'b'; + } + + return syncGenerator(); + }], + + ['an async generator', () => { + async function* asyncGenerator() { + yield 'a'; + yield 'b'; + } + + return asyncGenerator(); + }], + + ['a sync iterable of values', () => { + const chunks = ['a', 'b']; + const it = { + next() { + return { + done: chunks.length === 0, + value: chunks.shift() + }; + }, + [Symbol.iterator]: () => it + }; + return it; + }], + + ['a sync iterable of promises', () => { + const chunks = ['a', 'b']; + const it = { + next() { + return chunks.length === 0 ? { done: true } : { + done: false, + value: Promise.resolve(chunks.shift()) + }; + }, + [Symbol.iterator]: () => it + }; + return it; + }], + + ['an async iterable', () => { + const chunks = ['a', 'b']; + const it = { + next() { + return Promise.resolve({ + done: chunks.length === 0, + value: chunks.shift() + }) + }, + [Symbol.asyncIterator]: () => it + }; + return it; + }], + + ['a ReadableStream', () => { + return new ReadableStream({ + start(c) { + c.enqueue('a'); + c.enqueue('b'); + c.close(); + } + }); + }], + + ['a ReadableStream async iterator', () => { + return new ReadableStream({ + start(c) { + c.enqueue('a'); + c.enqueue('b'); + c.close(); + } + })[Symbol.asyncIterator](); + }] +]; + +for (const [label, factory] of iterableFactories) { + promise_test(async () => { + + const iterable = factory(); + const rs = ReadableStream.from(iterable); + assert_equals(rs.constructor, ReadableStream, 'from() should return a ReadableStream'); + + const reader = rs.getReader(); + assert_object_equals(await reader.read(), { value: 'a', done: false }, 'first read should be correct'); + assert_object_equals(await reader.read(), { value: 'b', done: false }, 'second read should be correct'); + assert_object_equals(await reader.read(), { value: undefined, done: true }, 'third read should be done'); + await reader.closed; + + }, `ReadableStream.from accepts ${label}`); +} + +const badIterables = [ + ['null', null], + ['undefined', undefined], + ['0', 0], + ['NaN', NaN], + ['true', true], + ['{}', {}], + ['Object.create(null)', Object.create(null)], + ['a function', () => 42], + ['a symbol', Symbol()], + ['an object with a non-callable @@iterator method', { + [Symbol.iterator]: 42 + }], + ['an object with a non-callable @@asyncIterator method', { + [Symbol.asyncIterator]: 42 + }], +]; + +for (const [label, iterable] of badIterables) { + test(() => { + assert_throws_js(TypeError, () => ReadableStream.from(iterable), 'from() should throw a TypeError') + }, `ReadableStream.from throws on invalid iterables; specifically ${label}`); +} + +test(() => { + const theError = new Error('a unique string'); + const iterable = { + [Symbol.iterator]() { + throw theError; + } + }; + + assert_throws_exactly(theError, () => ReadableStream.from(iterable), 'from() should re-throw the error'); +}, `ReadableStream.from re-throws errors from calling the @@iterator method`); + +test(() => { + const theError = new Error('a unique string'); + const iterable = { + [Symbol.asyncIterator]() { + throw theError; + } + }; + + assert_throws_exactly(theError, () => ReadableStream.from(iterable), 'from() should re-throw the error'); +}, `ReadableStream.from re-throws errors from calling the @@asyncIterator method`); + +test(t => { + const theError = new Error('a unique string'); + const iterable = { + [Symbol.iterator]: t.unreached_func('@@iterator should not be called'), + [Symbol.asyncIterator]() { + throw theError; + } + }; + + assert_throws_exactly(theError, () => ReadableStream.from(iterable), 'from() should re-throw the error'); +}, `ReadableStream.from ignores @@iterator if @@asyncIterator exists`); + +promise_test(async () => { + + const iterable = { + async next() { + return { value: undefined, done: true }; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + const read = await reader.read(); + assert_object_equals(read, { value: undefined, done: true }, 'first read should be done'); + + await reader.closed; + +}, `ReadableStream.from accepts an empty iterable`); + +promise_test(async t => { + + const theError = new Error('a unique string'); + + const iterable = { + async next() { + throw theError; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + await Promise.all([ + promise_rejects_exactly(t, theError, reader.read()), + promise_rejects_exactly(t, theError, reader.closed) + ]); + +}, `ReadableStream.from: stream errors when next() rejects`); + +promise_test(async t => { + + const iterable = { + next() { + return new Promise(() => {}); + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + await Promise.race([ + reader.read().then(t.unreached_func('read() should not resolve'), t.unreached_func('read() should not reject')), + reader.closed.then(t.unreached_func('closed should not resolve'), t.unreached_func('closed should not reject')), + flushAsyncEvents() + ]); + +}, 'ReadableStream.from: stream stalls when next() never settles'); + +promise_test(async () => { + + let nextCalls = 0; + let nextArgs; + const iterable = { + async next(...args) { + nextCalls += 1; + nextArgs = args; + return { value: 'a', done: false }; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + await flushAsyncEvents(); + assert_equals(nextCalls, 0, 'next() should not be called yet'); + + const read = await reader.read(); + assert_object_equals(read, { value: 'a', done: false }, 'first read should be correct'); + assert_equals(nextCalls, 1, 'next() should be called after first read()'); + assert_array_equals(nextArgs, [], 'next() should be called with no arguments'); + +}, `ReadableStream.from: calls next() after first read()`); + +promise_test(async t => { + + const theError = new Error('a unique string'); + + let returnCalls = 0; + let returnArgs; + let resolveReturn; + const iterable = { + next: t.unreached_func('next() should not be called'), + throw: t.unreached_func('throw() should not be called'), + async return(...args) { + returnCalls += 1; + returnArgs = args; + await new Promise(r => resolveReturn = r); + return { done: true }; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + assert_equals(returnCalls, 0, 'return() should not be called yet'); + + let cancelResolved = false; + const cancelPromise = reader.cancel(theError).then(() => { + cancelResolved = true; + }); + + await flushAsyncEvents(); + assert_equals(returnCalls, 1, 'return() should be called'); + assert_array_equals(returnArgs, [theError], 'return() should be called with cancel reason'); + assert_false(cancelResolved, 'cancel() should not resolve while promise from return() is pending'); + + resolveReturn(); + await Promise.all([ + cancelPromise, + reader.closed + ]); + +}, `ReadableStream.from: cancelling the returned stream calls and awaits return()`); + +promise_test(async t => { + + let nextCalls = 0; + let returnCalls = 0; + + const iterable = { + async next() { + nextCalls += 1; + return { value: undefined, done: true }; + }, + throw: t.unreached_func('throw() should not be called'), + async return() { + returnCalls += 1; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + const read = await reader.read(); + assert_object_equals(read, { value: undefined, done: true }, 'first read should be done'); + assert_equals(nextCalls, 1, 'next() should be called once'); + + await reader.closed; + assert_equals(returnCalls, 0, 'return() should not be called'); + +}, `ReadableStream.from: return() is not called when iterator completes normally`); + +promise_test(async t => { + + const theError = new Error('a unique string'); + + const iterable = { + next: t.unreached_func('next() should not be called'), + throw: t.unreached_func('throw() should not be called'), + async return() { + return 42; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + const reader = rs.getReader(); + + await promise_rejects_js(t, TypeError, reader.cancel(theError), 'cancel() should reject with a TypeError'); + + await reader.closed; + +}, `ReadableStream.from: cancel() rejects when return() fulfills with a non-object`); + +promise_test(async () => { + + let nextCalls = 0; + let reader; + let values = ['a', 'b', 'c']; + + const iterable = { + async next() { + nextCalls += 1; + if (nextCalls === 1) { + reader.read(); + } + return { value: values.shift(), done: false }; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + reader = rs.getReader(); + + const read1 = await reader.read(); + assert_object_equals(read1, { value: 'a', done: false }, 'first read should be correct'); + await flushAsyncEvents(); + assert_equals(nextCalls, 2, 'next() should be called two times'); + + const read2 = await reader.read(); + assert_object_equals(read2, { value: 'c', done: false }, 'second read should be correct'); + assert_equals(nextCalls, 3, 'next() should be called three times'); + +}, `ReadableStream.from: reader.read() inside next()`); + +promise_test(async () => { + + let nextCalls = 0; + let returnCalls = 0; + let reader; + + const iterable = { + async next() { + nextCalls++; + await reader.cancel(); + assert_equals(returnCalls, 1, 'return() should be called once'); + return { value: 'something else', done: false }; + }, + async return() { + returnCalls++; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + reader = rs.getReader(); + + const read = await reader.read(); + assert_object_equals(read, { value: undefined, done: true }, 'first read should be done'); + assert_equals(nextCalls, 1, 'next() should be called once'); + + await reader.closed; + +}, `ReadableStream.from: reader.cancel() inside next()`); + +promise_test(async t => { + + let returnCalls = 0; + let reader; + + const iterable = { + next: t.unreached_func('next() should not be called'), + async return() { + returnCalls++; + await reader.cancel(); + return { done: true }; + }, + [Symbol.asyncIterator]: () => iterable + }; + + const rs = ReadableStream.from(iterable); + reader = rs.getReader(); + + await reader.cancel(); + assert_equals(returnCalls, 1, 'return() should be called once'); + + await reader.closed; + +}, `ReadableStream.from: reader.cancel() inside return()`); + +promise_test(async t => { + + let array = ['a', 'b']; + + const rs = ReadableStream.from(array); + const reader = rs.getReader(); + + const read1 = await reader.read(); + assert_object_equals(read1, { value: 'a', done: false }, 'first read should be correct'); + const read2 = await reader.read(); + assert_object_equals(read2, { value: 'b', done: false }, 'second read should be correct'); + + array.push('c'); + + const read3 = await reader.read(); + assert_object_equals(read3, { value: 'c', done: false }, 'third read after push() should be correct'); + const read4 = await reader.read(); + assert_object_equals(read4, { value: undefined, done: true }, 'fourth read should be done'); + + await reader.closed; + +}, `ReadableStream.from(array), push() to array while reading`); diff --git a/tests/wpt/web-platform-tests/svg/types/scripted/SVGLength-px.html b/tests/wpt/web-platform-tests/svg/types/scripted/SVGLength-px.html index 65cf97ce518..321be5912b8 100644 --- a/tests/wpt/web-platform-tests/svg/types/scripted/SVGLength-px.html +++ b/tests/wpt/web-platform-tests/svg/types/scripted/SVGLength-px.html @@ -4,7 +4,7 @@ <script src="/resources/testharnessreport.js"></script> <p></p> <script> -var cssPixelsPerInch = 96; +const cssPixelsPerInch = 96; setup(function() { window.svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svgElement.setAttribute("style", "visibility: hidden; font-size: initial; font-family: initial;"); @@ -13,18 +13,27 @@ setup(function() { function calculateXHeight() { // Crude hack to calculate the x-height - var divElement = document.createElement("div"); + let divElement = document.createElement("div"); divElement.setAttribute("style", "height: 1ex; font-size: initial; font-family: initial;"); - var pElement = document.querySelector("p"); + let pElement = document.querySelector("p"); pElement.appendChild(divElement); - var xHeight = divElement.offsetHeight; + let xHeight = divElement.offsetHeight; pElement.removeChild(divElement); return xHeight; } }); +function valueInPx(valueAndUnits) { + let div = document.createElement("div"); + div.style.height = valueAndUnits; + document.documentElement.appendChild(div); + let pxValue = parseFloat(getComputedStyle(div).getPropertyValue("height")); + document.documentElement.removeChild(div); + return pxValue; +} + test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "2px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER); assert_equals(length.valueAsString, "2"); @@ -34,7 +43,7 @@ test(function() { }, document.title + ", unitless"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "2px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE); assert_equals(length.valueAsString, "2%"); @@ -44,10 +53,10 @@ test(function() { }, document.title + ", percentage"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "2px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EMS); - var referenceValue = 2 / fontSize; + let referenceValue = 2 / fontSize; assert_equals(length.valueAsString, referenceValue.toFixed(6) + "em"); assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.1); assert_approx_equals(length.value, 2.0, 0.1); @@ -55,10 +64,10 @@ test(function() { }, document.title + ", ems"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "2px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EXS); - var referenceValue = 2 / xHeight; + let referenceValue = 2 / xHeight; // Don't check valueAsString here, it's unreliable across browsers. assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.1); assert_approx_equals(length.value, 2.0, 0.1); @@ -66,21 +75,21 @@ test(function() { }, document.title + ", exs"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "48px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_CM); - var referenceValue = 48 * 2.54 / cssPixelsPerInch; + let referenceValue = 48 * 2.54 / cssPixelsPerInch; assert_equals(length.valueAsString, referenceValue.toFixed(2) + "cm"); assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01); - assert_approx_equals(length.value, 48, 0.001); + assert_equals(length.value, 48); assert_equals(length.unitType, SVGLength.SVG_LENGTHTYPE_CM); }, document.title + ", cm"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "48px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_MM); - var referenceValue = 48 * 25.4 / cssPixelsPerInch; + let referenceValue = 48 * 25.4 / cssPixelsPerInch; assert_equals(length.valueAsString, referenceValue.toFixed(1) + "mm"); assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01); assert_equals(length.value, 48); @@ -88,10 +97,22 @@ test(function() { }, document.title + ", mm"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); + length.valueAsString = "48q"; + assert_equals(length.unitType, SVGLength.SVG_LENGTHTYPE_UNKNOWN); + let referenceValue = valueInPx(length.valueAsString); + assert_approx_equals(length.value, referenceValue, 0.01); + length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_MM); + referenceValue = 48 / 4; + assert_equals(length.valueAsString, referenceValue + "mm"); + assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01); +}, document.title + ", q"); + +test(function() { + let length = svgElement.createSVGLength(); length.valueAsString = "48px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_IN); - var referenceValue = 48 / cssPixelsPerInch; + let referenceValue = 48 / cssPixelsPerInch; assert_equals(length.valueAsString, referenceValue + "in"); assert_equals(length.valueInSpecifiedUnits, referenceValue); assert_equals(length.value, 48); @@ -99,10 +120,10 @@ test(function() { }, document.title + ", in"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "4px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PT); - var referenceValue = 4 / cssPixelsPerInch * 72; + let referenceValue = 4 / cssPixelsPerInch * 72; assert_equals(length.valueAsString, referenceValue + "pt"); assert_equals(length.valueInSpecifiedUnits, referenceValue); assert_equals(length.value, 4); @@ -110,10 +131,10 @@ test(function() { }, document.title + ", pt"); test(function() { - var length = svgElement.createSVGLength(); + let length = svgElement.createSVGLength(); length.valueAsString = "16px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PC); - var referenceValue = 16 / cssPixelsPerInch * 6; + let referenceValue = 16 / cssPixelsPerInch * 6; // Don't check valueAsString here, it's unreliable across browsers. assert_equals(length.valueInSpecifiedUnits, referenceValue); assert_equals(length.value, 16); diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_macos_color_profile.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_macos_color_profile.txt index c3448a98dff..7505a98d9f3 100644 --- a/tests/wpt/web-platform-tests/tools/ci/requirements_macos_color_profile.txt +++ b/tests/wpt/web-platform-tests/tools/ci/requirements_macos_color_profile.txt @@ -1,4 +1,4 @@ -pyobjc-core==9.1.1 -pyobjc-framework-Cocoa==9.1.1 -pyobjc-framework-ColorSync==9.1.1 -pyobjc-framework-Quartz==9.1.1 +pyobjc-core==9.2 +pyobjc-framework-Cocoa==9.2 +pyobjc-framework-ColorSync==9.2 +pyobjc-framework-Quartz==9.2 diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt index 59a0000a0e4..b5618a8b9dd 100644 --- a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt +++ b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt @@ -1,4 +1,4 @@ pygithub==1.58.2 pyyaml==6.0 requests==2.31.0 -taskcluster==51.0.0 +taskcluster==52.0.0 diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt index 19a81dd3a5c..3ccba120882 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt @@ -6,9 +6,9 @@ typed-ast==1.5.4 types-atomicwrites==1.4.5.1 types-python-dateutil==2.8.19.13 types-PyYAML==6.0.12.10 -types-requests==2.31.0.0 +types-requests==2.31.0.1 types-setuptools==67.8.0.0 types-six==1.16.21.8 types-ujson==5.7.0.5 types-urllib3==1.26.25.13 -typing_extensions==4.6.2 +typing_extensions==4.6.3 diff --git a/tests/wpt/web-platform-tests/tools/requirements_tests.txt b/tests/wpt/web-platform-tests/tools/requirements_tests.txt index 614aa3e8625..c07c321de39 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_tests.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_tests.txt @@ -2,4 +2,4 @@ httpx[http2]==0.24.1 json-e==4.5.2 jsonschema==4.17.3 pyyaml==6.0 -taskcluster==51.0.0 +taskcluster==52.0.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index 3e5467a5f45..32fd3ff8c9a 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -1,10 +1,10 @@ html5lib==1.1 mozdebug==0.3.0 mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226 -mozlog==7.1.1 +mozlog==8.0.0 mozprocess==1.3.0 packaging==23.1 pillow==9.5.0 requests==2.31.0 six==1.16.0 -urllib3==2.0.2 +urllib3==2.0.3 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt index d2389eee93c..45f93a3bb96 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_edge.txt @@ -1 +1 @@ -selenium==4.9.1 +selenium==4.10.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt index c3fe460116e..788506b4ac3 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_ie.txt @@ -1,2 +1,2 @@ mozprocess==1.3.0 -selenium==4.9.1 +selenium==4.10.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt index c3fe460116e..788506b4ac3 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_opera.txt @@ -1,2 +1,2 @@ mozprocess==1.3.0 -selenium==4.9.1 +selenium==4.10.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt index abc64ec5085..5740883d351 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt @@ -1,2 +1,2 @@ -selenium==4.9.1 +selenium==4.10.0 requests==2.31.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py index d9c9481f327..880c2bd187a 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py @@ -113,7 +113,6 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs): **kwargs), "leak_check": run_info_data["debug"] and (kwargs["leak_check"] is not False), "asan": run_info_data.get("asan"), - "stylo_threads": kwargs["stylo_threads"], "chaos_mode_flags": kwargs["chaos_mode_flags"], "config": config, "browser_channel": kwargs["browser_channel"], @@ -202,7 +201,8 @@ def run_info_extras(**kwargs): "fission": enable_fission, "sessionHistoryInParent": (enable_fission or not get_bool_pref("fission.disableSessionHistoryInParent")), - "swgl": get_bool_pref("gfx.webrender.software")} + "swgl": get_bool_pref("gfx.webrender.software"), + "editorLegacyDirectionMode": get_bool_pref_if_exists("editor.join_split_direction.compatible_with_the_other_browsers") is False} rv.update(run_info_browser_version(**kwargs)) @@ -224,7 +224,7 @@ def run_info_browser_version(**kwargs): def update_properties(): - return (["os", "debug", "fission", "processor", "swgl", "domstreams"], + return (["os", "debug", "fission", "processor", "swgl", "domstreams", "editorLegacyDirectionMode"], {"os": ["version"], "processor": ["bits"]}) @@ -243,14 +243,11 @@ def log_gecko_crashes(logger, process, test, profile_dir, symbols_path, stackwal return False -def get_environ(logger, binary, debug_info, stylo_threads, headless, - chaos_mode_flags=None): +def get_environ(logger, binary, debug_info, headless, chaos_mode_flags=None): env = test_environment(xrePath=os.path.abspath(os.path.dirname(binary)), debugger=debug_info is not None, useLSan=True, log=logger) - - env["STYLO_THREADS"] = str(stylo_threads) # Disable window occlusion. Bug 1733955 env["MOZ_WINDOW_OCCLUSION"] = "0" if chaos_mode_flags is not None: @@ -279,7 +276,7 @@ class FirefoxInstanceManager: __metaclass__ = ABCMeta def __init__(self, logger, binary, binary_args, profile_creator, debug_info, - chaos_mode_flags, headless, stylo_threads, + chaos_mode_flags, headless, leak_check, stackfix_dir, symbols_path, asan): """Object that manages starting and stopping instances of Firefox.""" self.logger = logger @@ -289,7 +286,6 @@ class FirefoxInstanceManager: self.debug_info = debug_info self.chaos_mode_flags = chaos_mode_flags self.headless = headless - self.stylo_threads = stylo_threads self.leak_check = leak_check self.stackfix_dir = stackfix_dir self.symbols_path = symbols_path @@ -329,7 +325,7 @@ class FirefoxInstanceManager: marionette_port = get_free_port() profile.set_preferences({"marionette.port": marionette_port}) - env = get_environ(self.logger, self.binary, self.debug_info, self.stylo_threads, + env = get_environ(self.logger, self.binary, self.debug_info, self.headless, self.chaos_mode_flags) args = self.binary_args[:] if self.binary_args else [] @@ -742,7 +738,7 @@ class FirefoxBrowser(Browser): symbols_path=None, stackwalk_binary=None, certutil_binary=None, ca_certificate_path=None, e10s=False, enable_fission=True, stackfix_dir=None, binary_args=None, timeout_multiplier=None, leak_check=False, - asan=False, stylo_threads=1, chaos_mode_flags=None, config=None, + asan=False, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, preload_browser=False, specialpowers_path=None, debug_test=False, **kwargs): Browser.__init__(self, logger) @@ -788,7 +784,6 @@ class FirefoxBrowser(Browser): debug_info, chaos_mode_flags, headless, - stylo_threads, leak_check, stackfix_dir, symbols_path, @@ -845,7 +840,7 @@ class FirefoxWdSpecBrowser(WebDriverBrowser): extra_prefs=None, debug_info=None, symbols_path=None, stackwalk_binary=None, certutil_binary=None, ca_certificate_path=None, e10s=False, enable_fission=False, stackfix_dir=None, leak_check=False, - asan=False, stylo_threads=1, chaos_mode_flags=None, config=None, + asan=False, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, debug_test=False, **kwargs): super().__init__(logger, binary, webdriver_binary, webdriver_args) @@ -860,7 +855,7 @@ class FirefoxWdSpecBrowser(WebDriverBrowser): self.leak_check = leak_check self.leak_report_file = None - self.env = self.get_env(binary, debug_info, stylo_threads, headless, chaos_mode_flags) + self.env = self.get_env(binary, debug_info, headless, chaos_mode_flags) profile_creator = ProfileCreator(logger, prefs_root, @@ -878,11 +873,10 @@ class FirefoxWdSpecBrowser(WebDriverBrowser): self.profile = profile_creator.create() self.marionette_port = None - def get_env(self, binary, debug_info, stylo_threads, headless, chaos_mode_flags): + def get_env(self, binary, debug_info, headless, chaos_mode_flags): env = get_environ(self.logger, binary, debug_info, - stylo_threads, headless, chaos_mode_flags) env["RUST_BACKTRACE"] = "1" diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox_android.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox_android.py index 6e418540b94..7065d07a647 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox_android.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox_android.py @@ -64,7 +64,6 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs): "e10s": run_info_data["e10s"], # desktop only "leak_check": False, - "stylo_threads": kwargs["stylo_threads"], "chaos_mode_flags": kwargs["chaos_mode_flags"], "config": config, "install_fonts": kwargs["install_fonts"], @@ -99,12 +98,11 @@ def env_options(): "supports_debugger": True} -def get_environ(stylo_threads, chaos_mode_flags): +def get_environ(chaos_mode_flags): env = {} env["MOZ_CRASHREPORTER"] = "1" env["MOZ_CRASHREPORTER_SHUTDOWN"] = "1" env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1" - env["STYLO_THREADS"] = str(stylo_threads) if chaos_mode_flags is not None: env["MOZ_CHAOSMODE"] = hex(chaos_mode_flags) return env @@ -151,7 +149,7 @@ class FirefoxAndroidBrowser(Browser): symbols_path=None, stackwalk_binary=None, certutil_binary=None, ca_certificate_path=None, e10s=False, stackfix_dir=None, binary_args=None, timeout_multiplier=None, leak_check=False, asan=False, - stylo_threads=1, chaos_mode_flags=None, config=None, browser_channel="nightly", + chaos_mode_flags=None, config=None, browser_channel="nightly", install_fonts=False, tests_root=None, specialpowers_path=None, adb_binary=None, debug_test=False, **kwargs): @@ -171,7 +169,6 @@ class FirefoxAndroidBrowser(Browser): self.timeout_multiplier = timeout_multiplier self.leak_check = leak_check self.asan = asan - self.stylo_threads = stylo_threads self.chaos_mode_flags = chaos_mode_flags self.config = config self.browser_channel = browser_channel @@ -229,7 +226,7 @@ class FirefoxAndroidBrowser(Browser): [cmd_arg("marionette"), "about:blank"], self.debug_info) - env = get_environ(self.stylo_threads, self.chaos_mode_flags) + env = get_environ(self.chaos_mode_flags) self.runner = FennecEmulatorRunner(app=self.package_name, profile=self.profile, @@ -310,7 +307,7 @@ class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser): extra_prefs=None, debug_info=None, symbols_path=None, stackwalk_binary=None, certutil_binary=None, ca_certificate_path=None, e10s=False, enable_fission=False, stackfix_dir=None, leak_check=False, - asan=False, stylo_threads=1, chaos_mode_flags=None, config=None, + asan=False, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, package_name="org.mozilla.geckoview.test_runner", device_serial=None, adb_binary=None, **kwargs): @@ -320,7 +317,7 @@ class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser): stackwalk_binary=stackwalk_binary, certutil_binary=certutil_binary, ca_certificate_path=ca_certificate_path, e10s=e10s, enable_fission=enable_fission, stackfix_dir=stackfix_dir, - leak_check=leak_check, asan=asan, stylo_threads=stylo_threads, + leak_check=leak_check, asan=asan, chaos_mode_flags=chaos_mode_flags, config=config, browser_channel=browser_channel, headless=headless, **kwargs) @@ -346,8 +343,8 @@ class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser): self.logger.warning("Failed to remove forwarded or reversed ports: %s" % e) super().stop(force=force) - def get_env(self, binary, debug_info, stylo_threads, headless, chaos_mode_flags): - env = get_environ(stylo_threads, chaos_mode_flags) + def get_env(self, binary, debug_info, headless, chaos_mode_flags): + env = get_environ(chaos_mode_flags) env["RUST_BACKTRACE"] = "1" del env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] return env diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py index 4b715a1f317..c537e8271c7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py @@ -710,6 +710,7 @@ class CallbackHandler: fully custom implementation.""" unimplemented_exc: ClassVar[Tuple[Type[Exception], ...]] = (NotImplementedError,) + expected_exc: ClassVar[Tuple[Type[Exception], ...]] = () def __init__(self, logger, protocol, test_window): self.protocol = protocol @@ -749,8 +750,11 @@ class CallbackHandler: except self.unimplemented_exc: self.logger.warning("Action %s not implemented" % action) self._send_message(cmd_id, "complete", "error", "Action %s not implemented" % action) + except self.expected_exc: + self.logger.debug("Action %s failed with an expected exception" % action) + self._send_message(cmd_id, "complete", "error") except Exception: - self.logger.warning("Action %s failed" % action) + self.logger.error("Action %s failed" % action) self.logger.warning(traceback.format_exc()) self._send_message(cmd_id, "complete", "error") raise diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index a18063c9801..9c9c18735a6 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -72,6 +72,13 @@ def _switch_to_window(marionette, handle): marionette.window = handle +class MarionetteCallbackHandler(CallbackHandler): + + def __init__(self, logger, protocol, test_window): + MarionetteCallbackHandler.expected_exc = (errors.MarionetteException,) + super().__init__(self, logger, protocol, test_window) + + class MarionetteBaseProtocolPart(BaseProtocolPart): def __init__(self, parent): super().__init__(parent) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 46b98d4df13..b31c84d8e88 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -43,6 +43,7 @@ here = os.path.dirname(__file__) class WebDriverCallbackHandler(CallbackHandler): unimplemented_exc = (NotImplementedError, error.UnknownCommandException) + expected_exc = (error.WebDriverException,) class WebDriverBaseProtocolPart(BaseProtocolPart): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py index 1e3ae7a0615..d4950e14c0c 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -327,8 +327,6 @@ scheme host and port.""") "silently ignored for opt, mobile)") gecko_group.add_argument("--no-leak-check", dest="leak_check", action="store_false", default=None, help="Disable leak checking") - gecko_group.add_argument("--stylo-threads", action="store", type=int, default=1, - help="Number of parallel threads to use for stylo") gecko_group.add_argument("--reftest-internal", dest="reftest_internal", action="store_true", default=None, help="Enable reftest runner implemented inside Marionette") gecko_group.add_argument("--reftest-external", dest="reftest_internal", action="store_false", diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html index dcf97e4ca91..6a1bdae19ef 100644 --- a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html @@ -27,9 +27,7 @@ var gFirstConnection = null; var gSecondConnection = null; - var gCallbackCounter = 0; var verify_params = (now, metadata) => { - gCallbackCounter = gCallbackCounter + 1; assert_greater_than(now, 0); // Verify all required fields @@ -43,15 +41,7 @@ // Verify WebRTC only fields. assert_true("rtpTimestamp" in metadata, "rtpTimestamp should be present"); assert_true("receiveTime" in metadata, "receiveTime should be present"); - // captureTime is not available until roundtrip time estimation is done. - if (gCallbackCounter > 60 || "captureTime" in metadata) { - assert_true("captureTime" in metadata, "captureTime should be present"); - test.done(); - } - else { - // Keep requesting callbacks. - document.getElementById('remote-view').requestVideoFrameCallback(test.step_func(verify_params)); - } + // Verifying that captureTime is too unreliable to be included in tests. } var verify_local_metadata = (now, metadata) => { @@ -67,7 +57,7 @@ // as well as the ICE and DTLS connection are up. document.getElementById('remote-view') .addEventListener('loadedmetadata', function() { - document.getElementById('remote-view').requestVideoFrameCallback(test.step_func(verify_params)); + document.getElementById('remote-view').requestVideoFrameCallback(test.step_func_done(verify_params)); }); document.getElementById('local-view') diff --git a/tests/wpt/web-platform-tests/wai-aria/scripts/aria-utils.js b/tests/wpt/web-platform-tests/wai-aria/scripts/aria-utils.js index e6411a9a0ed..4fbc96aab3b 100644 --- a/tests/wpt/web-platform-tests/wai-aria/scripts/aria-utils.js +++ b/tests/wpt/web-platform-tests/wai-aria/scripts/aria-utils.js @@ -18,9 +18,8 @@ const AriaUtils = { let el = document.createElement("div"); el.appendChild(document.createTextNode("x")); el.setAttribute("role", role); // el.role not yet supported by Gecko. - el.id = `role_${role}`; document.body.appendChild(el); - const computedRole = await test_driver.get_computed_role(document.getElementById(el.id)); + const computedRole = await test_driver.get_computed_role(el); assert_equals(computedRole, role, el.outerHTML); }, `role: ${role}`); } @@ -49,19 +48,7 @@ const AriaUtils = { let testName = el.getAttribute("data-testname") || role; // data-testname optional if role is unique per test file promise_test(async t => { const expectedRole = el.getAttribute("data-expectedrole"); - - // ensure ID existence and uniqueness for the webdriver callback - if (!el.id) { - let roleCount = 1; - let elID = `${expectedRole}${roleCount}`; - while(document.getElementById(elID)) { - roleCount++; - elID = `${expectedRole}${roleCount}`; - } - el.id = elID; - } - - const computedRole = await test_driver.get_computed_role(document.getElementById(el.id)); + const computedRole = await test_driver.get_computed_role(el); assert_equals(computedRole, expectedRole, el.outerHTML); }, `${testName}`); } @@ -90,23 +77,9 @@ const AriaUtils = { let testName = el.getAttribute("data-testname") || label; // data-testname optional if label is unique per test file promise_test(async t => { const expectedLabel = el.getAttribute("data-expectedlabel"); - - // ensure ID existence and uniqueness for the webdriver callback - if (!el.id) { - let labelCount = 1; - let elID = `labelTest${labelCount}`; - while(document.getElementById(elID)) { - labelCount++; - elID = `labelTest${labelCount}`; - } - el.id = elID; - } - let computedLabel = await test_driver.get_computed_label(el); - // Todo: Remove whitespace normalization after https://github.com/w3c/accname/issues/192 is addressed. Change prior line back to `const`, too. computedLabel = computedLabel.trim() - assert_equals(computedLabel, expectedLabel, el.outerHTML); }, `${testName}`); } diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js new file mode 100644 index 00000000000..39b9be56e64 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-denormals.https.window.js @@ -0,0 +1,26 @@ +'use strict'; + +// Test if the JS code execution in AudioWorkletGlobalScope can handle the +// denormals properly. For more details, see: +// https://esdiscuss.org/topic/float-denormal-issue-in-javascript-processor-node-in-web-audio-api +promise_test(async () => { + // In the main thread, the denormals should be non-zeros. + assert_not_equals(Number.MIN_VALUE, 0.0, + 'The denormals should be non-zeros.'); + + const context = new AudioContext(); + await context.audioWorklet.addModule( + './processors/denormal-test-processor.js'); + + const denormalTestProcessor = new AudioWorkletNode(context, 'denormal-test'); + + return new Promise(resolve => { + denormalTestProcessor.port.onmessage = resolve; + denormalTestProcessor.connect(context.destination); + }).then(event => { + // In the AudioWorkletGlobalScope, the denormals should be non-zeros too. + assert_true( + event.data.result, + 'The denormals should be non-zeros in AudioWorkletGlobalScope.'); + }); +}, 'Test denormal behavior in AudioWorkletGlobalScope'); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/denormal-test-processor.js b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/denormal-test-processor.js new file mode 100644 index 00000000000..2b7929437d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/denormal-test-processor.js @@ -0,0 +1,12 @@ +class DenormalTestProcessor extends AudioWorkletProcessor { + process() { + // The denormals should be non-zeros. Otherwise, it's a violation of + // ECMA specification: https://tc39.es/ecma262/#sec-number.min_value + this.port.postMessage({ + result: Number.MIN_VALUE !== 0.0 + }); + return false; + } +} + +registerProcessor('denormal-test', DenormalTestProcessor); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html index 8668e9d5ac9..505f0f03f54 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html @@ -19,10 +19,13 @@ const pulseLength = 16384; // The computed SNR should be at least this large. This value depends on - // teh platform and browser. Don't set this value to be to much lower + // the platform and browser. Don't set this value to be to much lower // than this. It probably indicates a fairly inaccurate convolver or // constant source node automations that should be fixed instead. - const minRequiredSNR = 77.03; + // + // Any major change of operating system or CPU architecture might affect + // this value significantly. See: https://crbug.com/1339291 + const minRequiredSNR = 68.40; // To test the real-time convolver, we convolve two square pulses together // to produce a triangular pulse. To verify the result is correct we diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py index 8e1075ddc13..79cecce5ced 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py @@ -1,3 +1,4 @@ +# META: timeout=long import copy import pytest diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_modifier.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_modifier.py index 8eec30f1a0c..ea50951f378 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_modifier.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_modifier.py @@ -208,11 +208,13 @@ async def test_modifier_click( .pause(duration=200) .key_down(modifier) .pause(duration=200) + .pause(duration=0) .key_up(modifier) ) mouse_sources = ( actions.add_pointer() .pointer_move(x=0, y=0, origin=get_element_origin(outer)) + .pause(duration=50) .pointer_down(button=0) .pointer_up(button=0) ) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py index 70f4eb2712f..92e88d4e236 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py @@ -36,6 +36,7 @@ def assert_headers(request_headers, expected_headers): def assert_timing_info(timing_info): recursive_compare( { + "timeOrigin": any_int, "requestTime": any_int, "redirectStart": any_int, "redirectEnd": any_int, diff --git a/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py index f3e54288474..803113cceb0 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py @@ -18,9 +18,15 @@ def test_modifier_click(session, test_actions_page, key_chain, mouse_chain, modi .pause(200) \ .key_down(modifier) \ .pause(200) \ + .pause(0) \ .key_up(modifier) outer = session.find.css("#outer", all=False) - mouse_chain.click(element=outer) + mouse_chain \ + .pointer_move(0, 0, origin=outer) \ + .pause(50) \ + .pointer_down(0) \ + .pointer_up(0) \ + .pause(0) session.actions.perform([key_chain.dict, mouse_chain.dict]) expected = [ {"type": "mousemove"}, diff --git a/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html b/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html index 378520c6937..f0dc3c90c10 100644 --- a/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html +++ b/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html @@ -12,7 +12,7 @@ </head> <body> <script> -async function testVideoFlow(t, negotiationFunction) { +async function testVideoFlow(t, negotiationFunction, frameCallback = () => {}) { const caller = new RTCPeerConnection({encodedInsertableStreams:true}); t.add_cleanup(() => caller.close()); const callee = new RTCPeerConnection({encodedInsertableStreams:true}); @@ -71,17 +71,19 @@ async function testVideoFlow(t, negotiationFunction) { // Pass frames as they come from the encoder. for (let i = 0; i < numFramesPassthrough; i++) { const result = await senderReader.read(); - const metadata = result.value.getMetadata(); + const frame = result.value; + const metadata = frame.getMetadata(); assert_true(containsVideoMetadata(metadata)); - verifyNonstandardAdditionalDataIfPresent(result.value); + verifyNonstandardAdditionalDataIfPresent(frame); frameInfos.push({ - timestamp: result.value.timestamp, - type: result.value.type, - data: result.value.data, + timestamp: frame.timestamp, + type: frame.type, + data: frame.data, metadata: metadata, getMetadata() { return this.metadata; } }); - senderWriter.write(result.value); + frameCallback(frame); + senderWriter.write(frame); } // Replace frame data with arbitrary buffers. @@ -144,6 +146,25 @@ promise_test(async t => { assert_throws_dom("InvalidStateError", () => sender.createEncodedStreams()); }, 'Creating streams twice throws'); +promise_test(async t => { + let clonedFrames = []; + function verifyFramesSerializeAndDeserialize(frame) { + // Clone encoded frames using structedClone (ie serialize + deserialize) and + // keep a reference. + const clone = structuredClone(frame); + clonedFrames.push(clone); + }; + + await testVideoFlow(t, exchangeOfferAnswer, verifyFramesSerializeAndDeserialize); + + // Ensure all of our cloned frames are still alive and well, despite the + // originals having been sent through the PeerConnection. + clonedFrames.forEach((clonedFrame) => { + assert_not_equals(clonedFrame.data.size, 0); + assert_not_equals(clonedFrame.type, "empty") + }); +}, 'Encoded frames serialize and deserialize into a deep clone'); + </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js b/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js index f1b872294ba..df01ea239bc 100644 --- a/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js +++ b/tests/wpt/web-platform-tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js @@ -27,16 +27,20 @@ function areArraysEqual(a1, a2) { function areMetadataEqual(metadata1, metadata2, type) { return metadata1.synchronizationSource === metadata2.synchronizationSource && - metadata1.payloadType == metadata2.payloadType && - areArraysEqual(metadata1.contributingSources, metadata2.contributingSources) && - metadata1.frameId === metadata2.frameId && - areArraysEqual(metadata1.dependencies, metadata2.dependencies) && - metadata1.spatialIndex === metadata2.spatialIndex && - metadata1.temporalIndex === metadata2.temporalIndex && - // Width and height are reported only for key frames on the receiver side. - type == "key" - ? metadata1.width === metadata2.width && metadata1.height === metadata2.height - : true; + metadata1.payloadType == metadata2.payloadType && + areArraysEqual( + metadata1.contributingSources, metadata2.contributingSources) && + metadata1.absCaptureTime == metadata2.absCaptureTime && + metadata1.frameId === metadata2.frameId && + areArraysEqual(metadata1.dependencies, metadata2.dependencies) && + metadata1.spatialIndex === metadata2.spatialIndex && + metadata1.temporalIndex === metadata2.temporalIndex && + // Width and height are reported only for key frames on the receiver + // side. + type == 'key' ? + metadata1.width === metadata2.width && + metadata1.height === metadata2.height : + true; } function areFrameInfosEqual(frame1, frame2) { @@ -55,10 +59,8 @@ function containsVideoMetadata(metadata) { metadata.dependencies !== undefined; } -function enableGFD(sdp) { - const GFD_V00_EXTENSION = - 'http://www.webrtc.org/experiments/rtp-hdrext/generic-frame-descriptor-00'; - if (sdp.indexOf(GFD_V00_EXTENSION) !== -1) +function enableExtension(sdp, extension) { + if (sdp.indexOf(extension) !== -1) return sdp; const extensionIds = sdp.trim().split('\n') @@ -67,22 +69,29 @@ function enableGFD(sdp) { .map(line => line.split(' ')[0].substr(9)) .map(id => parseInt(id, 10)) .sort((a, b) => a - b); - for (let newId = 1; newId <= 14; newId++) { + for (let newId = 1; newId <= 15; newId++) { if (!extensionIds.includes(newId)) { - return sdp += 'a=extmap:' + newId + ' ' + GFD_V00_EXTENSION + '\r\n'; + return sdp += 'a=extmap:' + newId + ' ' + extension + '\r\n'; } } if (sdp.indexOf('a=extmap-allow-mixed') !== -1) { // Pick the next highest one. const newId = extensionIds[extensionIds.length - 1] + 1; - return sdp += 'a=extmap:' + newId + ' ' + GFD_V00_EXTENSION + '\r\n'; + return sdp += 'a=extmap:' + newId + ' ' + extension + '\r\n'; } - throw 'Could not find free extension id to use for ' + GFD_V00_EXTENSION; + throw 'Could not find free extension id to use for ' + extension; } +const GFD_V00_EXTENSION = + 'http://www.webrtc.org/experiments/rtp-hdrext/generic-frame-descriptor-00'; +const ABS_V00_EXTENSION = + 'http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time'; + async function exchangeOfferAnswer(pc1, pc2) { const offer = await pc1.createOffer(); - // Munge the SDP to enable the GFD extension in order to get correct metadata. - const sdpGFD = enableGFD(offer.sdp); + // Munge the SDP to enable the GFD and ACT extension in order to get correct + // metadata. + const sdpABS = enableExtension(offer.sdp, ABS_V00_EXTENSION); + const sdpGFD = enableExtension(sdpABS, GFD_V00_EXTENSION); await pc1.setLocalDescription({type: offer.type, sdp: sdpGFD}); // Munge the SDP to disable bandwidth probing via RTX. // TODO(crbug.com/1066819): remove this hack when we do not receive duplicates from RTX @@ -98,7 +107,8 @@ async function exchangeOfferAnswer(pc1, pc2) { async function exchangeOfferAnswerReverse(pc1, pc2) { const offer = await pc2.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true}); // Munge the SDP to enable the GFD extension in order to get correct metadata. - const sdpGFD = enableGFD(offer.sdp); + const sdpABS = enableExtension(offer.sdp, ABS_V00_EXTENSION); + const sdpGFD = enableExtension(sdpABS, GFD_V00_EXTENSION); // Munge the SDP to disable bandwidth probing via RTX. // TODO(crbug.com/1066819): remove this hack when we do not receive duplicates from RTX // anymore. diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html index 98ebea27e43..e1d59594426 100644 --- a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html @@ -21,18 +21,10 @@ async_promise_test(t => applyJitterBufferTarget(t, "video", 250), "measure raising video jitterBufferTarget to 250"); async_promise_test(t => applyJitterBufferTarget(t, "audio", 250), "measure raising audio jitterBufferTarget to 250"); -async_promise_test(t => applyJitterBufferTarget(t, "video", 500), - "measure raising video jitterBufferTarget to 500"); -async_promise_test(t => applyJitterBufferTarget(t, "audio", 500), - "measure raising audio jitterBufferTarget to 500"); async_promise_test(t => applyJitterBufferTarget(t, "video", 250, 150), "measure lowering video jitterBufferTarget to 150"); async_promise_test(t => applyJitterBufferTarget(t, "audio", 250, 150), "measure lowering audio jitterBufferTarget to 150"); -async_promise_test(t => applyJitterBufferTarget(t, "video", 400, 250), - "measure lowering video jitterBufferTarget to 300"); -async_promise_test(t => applyJitterBufferTarget(t, "audio", 400, 250), - "measure lowering audio jitterBufferTarget to 300"); async function applyJitterBufferTarget(t, kind, target, targetToLower) { const caller = new RTCPeerConnection(); @@ -67,7 +59,8 @@ async function applyJitterBufferTarget(t, kind, target, targetToLower) { async function measureDelayFromStats(t, receiver, callee, target, kind) { const lowerBound = target * 0.7; const upperBound = target * 1.3; - let delay, oldInboundStats, prevDelay, rateOfChange; + let delay, oldInboundStats, prevDelay, avgChange; + let rateOfChange = 0; let numDelayMeasurements = 1; for (let statChecks = 0; statChecks < 40; statChecks++) { @@ -79,7 +72,8 @@ async function measureDelayFromStats(t, receiver, callee, target, kind) { delay = ((inboundStats.jitterBufferDelay - oldInboundStats.jitterBufferDelay) / (inboundStats.jitterBufferEmittedCount - oldInboundStats.jitterBufferEmittedCount) * 1000); if (prevDelay) { - rateOfChange = (delay - prevDelay) / numDelayMeasurements; + rateOfChange += (delay - prevDelay); + avgChange = rateOfChange / numDelayMeasurements; numDelayMeasurements++; } prevDelay = delay; @@ -90,7 +84,7 @@ async function measureDelayFromStats(t, receiver, callee, target, kind) { oldInboundStats = inboundStats; } t.step(() => assert_between_inclusive(delay , lowerBound, upperBound, - `${kind} delay is within bounds rateOfChange ${rateOfChange} over ${numDelayMeasurements} measurements`)); + `${kind} delay is within bounds avgChange ${avgChange} over ${numDelayMeasurements} measurements`)); return delay; } </script> |