diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-06-04 01:56:00 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-06-04 01:59:47 +0000 |
commit | e01fdde3cc0f11aeed21cf357af304076046cd63 (patch) | |
tree | 93266daf05b34a750e3f79a0dadeb93c7c4ebc57 | |
parent | f26d17096d86a2119f879d4ff60c288051a97510 (diff) | |
download | servo-e01fdde3cc0f11aeed21cf357af304076046cd63.tar.gz servo-e01fdde3cc0f11aeed21cf357af304076046cd63.zip |
Update web-platform-tests to revision b'4d1dc1971a0688048c804261711c639fe96ee187'
232 files changed, 3952 insertions, 1187 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini index ecd4976bf3a..afbbee3edb9 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -1,16 +1,4 @@ [inline-negative-margin-001.html] - [[data-expected-height\] 3] - expected: FAIL - - [[data-expected-height\] 4] - expected: FAIL - - [[data-expected-height\] 5] - expected: FAIL - - [[data-expected-height\] 6] - expected: FAIL - [[data-expected-height\] 7] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-005.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-005.html.ini index a8801ec9fe3..422b64b2c95 100644 --- a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-005.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-aspect-ratio-img-row-005.html.ini @@ -7,6 +7,3 @@ [img 3] expected: FAIL - - [img 4] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-user-agent-rules.html.ini b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-user-agent-rules.html.ini new file mode 100644 index 00000000000..970e964ba2d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-user-agent-rules.html.ini @@ -0,0 +1,12 @@ +[overlay-user-agent-rules.html] + [HTML elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [SVG elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [Null namespace elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [Arbitrary namespace elements should have overlay:none !important from the user-agent.] + expected: FAIL diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 5a898242a0a..8e22e1ee7e1 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -4947,6 +4947,13 @@ "fetch": { "api": { "crashtests": { + "body-window-destroy.html": [ + "646d3c5f8ce9e6591e6bd1eb2096e36d611a8899", + [ + null, + {} + ] + ], "request.html": [ "2d21930c3bbc8743ebfe5ad679e62f41a776ebde", [ @@ -189826,6 +189833,19 @@ ] }, "track-sizing": { + "masonry-track-sizing-check-grid-height-on-resize.html": [ + "06c2901f27bf8c8edabf434cf79bf7915e5dd09e", + [ + null, + [ + [ + "/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize-ref.html", + "==" + ] + ], + {} + ] + ], "masonry-track-sizing-explicit-block.html": [ "05f60893900f44753d4873e60d4b348bd6270a07", [ @@ -191033,7 +191053,7 @@ "css-highlight-api": { "painting": { "css-highlight-painting-underline-offset-001.html": [ - "14b238ce1700fc9e1fe1ea3745b0a818d5c615c1", + "534438089ca0afd4a565e615f43cd964db3a0eb6", [ null, [ @@ -191042,7 +191062,52 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 56 + ], + [ + 0, + 10 + ] + ] + ] + ] + } + ] + ], + "css-target-text-decoration-001.html": [ + "fa76c0bc4e7636c416ac876530f11d9a4e40050a", + [ + null, + [ + [ + "/css/css-highlight-api/painting/css-target-text-decoration-001-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 60 + ], + [ + 0, + 32 + ] + ] + ] + ] + } ] ], "custom-highlight-painting-001.html": [ @@ -191716,7 +191781,38 @@ ], {} ] - ] + ], + "invalidation": { + "css-highlight-invalidation-001.html": [ + "d885424765d3934eb2187d78a2f0791158441c8b", + [ + null, + [ + [ + "/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 56 + ], + [ + 0, + 10 + ] + ] + ] + ] + } + ] + ] + } } }, "css-images": { @@ -218161,7 +218257,7 @@ ] ], "first-letter-digraph.html": [ - "b9bc10016d71a6b74803278c227787bdee6cda48", + "b539457cf0c5ddab61cb2c63ef45fab47057877e", [ null, [ @@ -222702,6 +222798,19 @@ } }, "css-scrollbars": { + "input-scrollbar-color.html": [ + "fa03b1391e44941bd2d37c8db1c7c518a1c181ff", + [ + null, + [ + [ + "/css/css-scrollbars/input-scrollbar-color-ref.html", + "==" + ] + ], + {} + ] + ], "scrollbar-width-paint-001.html": [ "3621a65b39ed7d9e3b0afea4e1770427b31534de", [ @@ -302455,7 +302564,7 @@ ] ], "offset-path-coord-box-001.html": [ - "527459c6fddcc4f5d4409f311e2fb7175df35531", + "d8392607569d045e04aa5474df11310c93b662f8", [ null, [ @@ -302468,7 +302577,7 @@ ] ], "offset-path-coord-box-002.html": [ - "0abe4169400e1f8504628b17bc11bf8cd8e62a1a", + "0446e2caa16c43ece32a0f3c0659c3d227f01ce9", [ null, [ @@ -302481,7 +302590,7 @@ ] ], "offset-path-coord-box-003.html": [ - "6605d8e9a0d21dee7270ea99291aff45ea17f2e2", + "d3ea7f92a8ed17521a957aebcd631906b0ceb86b", [ null, [ @@ -302636,6 +302745,58 @@ {} ] ], + "offset-path-ray-011.html": [ + "cf01e2b86ecdc3ea0b7033ffd6ab4fb8b236e3fe", + [ + null, + [ + [ + "/css/motion/offset-path-ray-011-ref.html", + "==" + ] + ], + {} + ] + ], + "offset-path-ray-012.html": [ + "7c921cfac85c6203a330dcf947b4fedbb2ad9408", + [ + null, + [ + [ + "/css/motion/offset-path-ray-012-ref.html", + "==" + ] + ], + {} + ] + ], + "offset-path-ray-013.html": [ + "196ff4efd6fb91265857e357cfbd0bdff689cd6c", + [ + null, + [ + [ + "/css/motion/offset-path-ray-013-ref.html", + "==" + ] + ], + {} + ] + ], + "offset-path-ray-014.html": [ + "42e431de3548315530abb0e4a35dc720cb57fb7c", + [ + null, + [ + [ + "/css/motion/offset-path-ray-014-ref.html", + "==" + ] + ], + {} + ] + ], "offset-path-ray-contain-001.html": [ "ba03f1115f6e782f558fbe4fcca0a89aa795e5fb", [ @@ -302785,6 +302946,19 @@ {} ] ], + "offset-path-shape-circle-005.html": [ + "0ca93306c609fbf77da660636b23d0aebfff2c02", + [ + null, + [ + [ + "/css/motion/offset-path-shape-circle-005-ref.html", + "==" + ] + ], + {} + ] + ], "offset-path-shape-ellipse-001.html": [ "b8254458d38d71038f47dd80ffddbd971190b665", [ @@ -302853,8 +303027,21 @@ {} ] ], + "offset-path-shape-ellipse-005.html": [ + "27eae4a5c491907c3455e5adae7c226190ee8f83", + [ + null, + [ + [ + "/css/motion/offset-path-shape-ellipse-005-ref.html", + "==" + ] + ], + {} + ] + ], "offset-path-shape-inset-001.html": [ - "dd96c42ebb33e585a9848e12b097dfadb82d7ccf", + "27f5e3fc7d6a24fdfdd973cddf528d732a7b04b6", [ null, [ @@ -321643,6 +321830,19 @@ }, "scroll-animations": { "css": { + "animation-inactive-outside-range-test.html": [ + "c0021a1fbc2cf9c7b25305120a3e1d64aa4a13c4", + [ + null, + [ + [ + "/scroll-animations/css/animation-inactive-outside-range-ref.html", + "==" + ] + ], + {} + ] + ], "animation-range-visual-test.html": [ "f675f5108aec2ef2eb27793efca6e7e6a88f3324", [ @@ -321906,7 +322106,7 @@ ] ], "set-current-time-before-play.html": [ - "cd3faeeee46cbe2b132e05f699a733621fa4005b", + "280346e755f0dede65035ca91731927726526b01", [ null, [ @@ -329075,7 +329275,7 @@ }, "support": { ".azure-pipelines.yml": [ - "efa5ee18a1dc79fdaf56abac879db39c85da5cd9", + "428411d04ab83f754150f2a955f82ee49ab6476b", [] ], ".gitattributes": [ @@ -332213,7 +332413,7 @@ [] ], "header-util.sub.js": [ - "c38e5aa59d8b2a995f907aeb91ef7e971104b7d9", + "bb5a63426d6c931181dd10e0cb89125b9e0ea472", [] ], "intercept-request.js": [ @@ -389321,6 +389521,10 @@ ] }, "track-sizing": { + "masonry-track-sizing-check-grid-height-on-resize-ref.html": [ + "71968864924cafa3166a352d15e4d0d1b81383d1", + [] + ], "masonry-track-sizing-explicit-block-ref.html": [ "993017919f39d72a8408de68b0c797e59ff3aebd", [] @@ -389743,6 +389947,10 @@ "3d01bccf55dd9c20e361551bc924d5c9353c503e", [] ], + "css-target-text-decoration-001-ref.html": [ + "5e9ef64579800a922d225ab9ca458555fe067dcc", + [] + ], "custom-highlight-painting-001-ref.html": [ "b058789f6de04c017dec9a37d8955485dcd6b7e9", [] @@ -389827,6 +390035,12 @@ "3a713aa8440c5877253ce9f612f2c90515f9dd60", [] ], + "invalidation": { + "css-highlight-invalidation-001-ref.html": [ + "a5ec6a59ae0be99bfcefeca724445544bd6228f8", + [] + ] + }, "resources": { "iframe-code.html": [ "a4a1829be229acb4c0cf75cbb0e2885060741d3f", @@ -395304,7 +395518,7 @@ [] ], "first-letter-digraph-ref.html": [ - "7dbefc9dbdbd32ea8b05a8d3ec87f24e7d4edcc1", + "4eef817d7062a58066cf952c0c7f830f0fc87d37", [] ], "first-line-with-inline-block-ref.html": [ @@ -395900,6 +396114,10 @@ "f7c0439e202113c9611405ae967b33c2b12cfcee", [] ], + "input-scrollbar-color-ref.html": [ + "389cf34b716ea17620c6a1d750ac5406945bf9ba", + [] + ], "scrollbar-width-paint-001-ref.html": [ "42295b1fb9d7d7ef8622c729265e344117c65cc2", [] @@ -396590,7 +396808,7 @@ "values": { "support": { "parsing-utils.js": [ - "b7c637746e0ef5cf48187156a462cb1b0ba588d9", + "354a64b53f538b2b1e8366b30961034e4b5d7fdd", [] ] } @@ -410149,19 +410367,19 @@ [] ], "offset-path-coord-box-001-ref.html": [ - "679b43fe705e67ff512b63c29a3f47b578623dbc", + "e9a7fbb808feefff1838dcd1476b1829231ddbba", [] ], "offset-path-coord-box-002-ref.html": [ - "a722ec3bd3e2e009b24a03eb6dd528be0ff13483", + "aad79d40d03a9643ac3b7771743acf927ea0800e", [] ], "offset-path-coord-box-003-ref.html": [ - "f6e6203f4a0caaa759c0dd4b2987121832d89a84", + "bf896aafac2a81dd209eac8519ead4f2732c3e87", [] ], "offset-path-geometry-box-ref.html": [ - "eb7646db6625d63ef2ee857c5e1e48ec527c9c9e", + "60870c815e140ac15502e723ea477678cdc848a7", [] ], "offset-path-ray-001-ref.html": [ @@ -410188,6 +410406,22 @@ "95b54368759342f3cf0611d256e06f9534b5562e", [] ], + "offset-path-ray-011-ref.html": [ + "9a477b269687e931b8bbf4bbd081e230e9b54dda", + [] + ], + "offset-path-ray-012-ref.html": [ + "dfb34bf784f07bcfa8cbe3c204df8af162f5ff8c", + [] + ], + "offset-path-ray-013-ref.html": [ + "d6bf4c037ba3853474132ede2193f1e7dc6183fd", + [] + ], + "offset-path-ray-014-ref.html": [ + "cd0fab44c3658956801a3fd75048f8faf521fa2d", + [] + ], "offset-path-ray-contain-001-ref.html": [ "05f54d9dc55dff6159df20d226eaf0753f351385", [] @@ -410224,6 +410458,10 @@ "86c67dcdedcb2625216cd064384545113f2a96fc", [] ], + "offset-path-shape-circle-005-ref.html": [ + "77fc954ad957d4caf87d383216613fa025f143c2", + [] + ], "offset-path-shape-ellipse-001-ref.html": [ "32236bbc239a98c6a512d64037fcda32a8c5e976", [] @@ -410240,6 +410478,10 @@ "fca4b190db514034fd7b3647cebda99d25aae0dc", [] ], + "offset-path-shape-ellipse-005-ref.html": [ + "98504d1a3858b778341f4cccc1b28e32461801be", + [] + ], "offset-path-shape-inset-001-ref.html": [ "52a9662841c5d56c7655d11329d82f65ac9d17e9", [] @@ -414947,7 +415189,7 @@ [] ], "default-enabled-features-helper.js": [ - "821ebf69e367b2cd95edf2e736fc4d44008442d4", + "5b4c292622f0ae1f073ea7e4ab257407ca6a7e77", [] ], "default-enabled-features-navigate.https.html": [ @@ -415972,7 +416214,7 @@ [] ], "content-lengths.json": [ - "dac9c82dc0978439841f4981eb3ffde1056aeaac", + "ac6f1a24680e0e23a6e40312a11eddf358328e39", [] ], "identical-duplicates.asis": [ @@ -419669,6 +419911,30 @@ [] ] }, + "inheritance": { + "document-write.https.window.js.headers": [ + "e007de4d7bfd8bd5a26b503f338e1da696ddb941", + [] + ], + "resources": { + "document-write.html": [ + "7a6ff3118eb268f9ca98d794477fb968a2005db7", + [] + ], + "document-write.html.headers": [ + "e007de4d7bfd8bd5a26b503f338e1da696ddb941", + [] + ], + "iframe-with-about-blank-iframe.html": [ + "b3f51252332f8d83f1371619293ba0bcd57633ae", + [] + ], + "iframe-with-about-blank-iframe.html.headers": [ + "e007de4d7bfd8bd5a26b503f338e1da696ddb941", + [] + ] + } + }, "origin-keyed-agent-clusters": { "1-iframe": { "parent-yes-child-no-port.sub.https.html.headers": [ @@ -422256,7 +422522,7 @@ }, "tools": { "PRESUBMIT.py": [ - "048e96b7012b70b276922ace2d7cdd811ebb3291", + "c7fb93ae6fd14e0006dda63ba5279524d6bad9b8", [] ], "gentest.py": [ @@ -422272,7 +422538,7 @@ [] ], "gentestutilsunion.py": [ - "cf154c41894bd9c0863ccf7d3619efc74e5e3871", + "0542e32571a0524090ab5800dbb258cb9acc2450", [] ], "name2dir-canvas.yaml": [ @@ -422289,31 +422555,31 @@ ], "templates": { "reftest.html": [ - "8f98e1648459bd6470f69705df7ed0b8fd9b0b18", + "4c9affbbbbf43535300a68cb22139fad5f2a1691", [] ], "reftest_element.html": [ - "25445af6a4f59bed783587428db3d95e41acc241", + "6684e9c615bdb74e0d4076a522d1c68912863ff2", [] ], "reftest_offscreen.html": [ - "4d8b7c9de548a1edc127af36b9085db1874dc9ae", + "1d0d93dfa1619399b61483ad15ab128af4473fe4", [] ], "reftest_worker.html": [ - "7ce9ca5b15962b2ac242d2c674946837cabcd8a5", + "e636d3634bab9d7e61c7ced53f14bd727746d304", [] ], "testharness_element.html": [ - "521fece50c4364a9ce74d83c4194e82c050628dc", + "b6bda2835e271e7cfa12bfc688e851caa9028644", [] ], "testharness_offscreen.html": [ - "a6de83c41954e8e7906ad20c06c94f485d32ae55", + "8ebbff77a6c13f18aca58c3be0859496cc49bb30", [] ], "testharness_worker.js": [ - "b6575b95a67b0efd71be46f9315da36c2f89399c", + "f1f04e7bb6bcf370e0db53f08dd38899e72e55ab", [] ] }, @@ -422393,7 +422659,7 @@ [] ], "drawing-images-to-the-canvas.yaml": [ - "91b92b0092fc9de2d6729215aa192aef6aca07dc", + "93c556288d7125988f3190c0ecd8e3ce2e71f3fe", [] ], "drawing-rectangles-to-the-canvas.yaml": [ @@ -422401,11 +422667,11 @@ [] ], "filters.yaml": [ - "9a90bed24820b7f3aad7f214641f441c2ed78ea1", + "a5c2b9864b6becd54f06d0639ddc96d46bfca263", [] ], "layers.yaml": [ - "e0d2b3d793b80d70eb31973820ab1564f99e83e3", + "8ca05bec84d72f48fdde9aa90e0d6ad1efceccd1", [] ], "line-styles.yaml": [ @@ -423076,7 +423342,7 @@ [] ], "iframe-test.js": [ - "f788cbd1ebdb7a76dff082d0a59649bf756310b2", + "f13e76869023ef5604ab7be083a37b6ff05b1b85", [] ], "popup-test.js": [ @@ -429575,7 +429841,7 @@ [] ], "sizes-iframed.sub.html": [ - "7602dd8fce1385cc35249436b5f947778fab2925", + "1f80ad2f917d1539ade5a02dcde3371dbd5cd07a", [] ] } @@ -429608,6 +429874,10 @@ "red-bg.css": [ "da9af10628dc6899242f4ab963b4b0ea60e01e9e", [] + ], + "relevant-mutations.js": [ + "7105b037084be829e6319ab730ed10b034c544cb", + [] ] }, "svg-img-with-external-stylesheet-ref.html": [ @@ -433873,10 +434143,6 @@ "925e2efc9a97ade490f04d57271adc10b2fe69b6", [] ], - "anim-poster-gr.png": [ - "6941207373e513cfe10729077f59d369c59e6046", - [] - ], "anim-tao.png": [ "925e2efc9a97ade490f04d57271adc10b2fe69b6", [] @@ -435824,7 +436090,7 @@ [] ], "turtledove.idl": [ - "8add667b57509d3ec86ff214de6ee7380721fe18", + "f5867e995a8d19efb967e4bccee0eccb011665f8", [] ], "ua-client-hints.idl": [ @@ -435984,7 +436250,7 @@ [] ], "webrtc-encoded-transform.idl": [ - "59710bf46c2e3b57f09aaacccb80eb2c48f33406", + "6dd2ba3fffa0072136dabf9826299c40d4557dc2", [] ], "webrtc-ice.idl": [ @@ -439516,6 +439782,18 @@ [] ], "experimental-features": { + "permissions-policy-header-host-wildcard.https.sub.html.sub.headers": [ + "81d0de836ea28cd372247a678ebda74455af352b", + [] + ], + "permissions-policy-header-port-wildcard.https.sub.html.sub.headers": [ + "b813167ee62e520952d295854538687157fb3cec", + [] + ], + "permissions-policy-header-scheme-only.https.sub.html.sub.headers": [ + "14d0868f2bb15fd71bdd1f81a880fc16cde522fa", + [] + ], "resources": { "common.js": [ "308f787da63d147b00356cf4817f8c33b162c6cb", @@ -439612,7 +439890,7 @@ [] ], "permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers": [ - "d9facde69e011fed8c5d5fdb5b24c66a121b2570", + "648e3ac75e69c4e2223e18c822440feb8bc76a07", [] ], "permissions-policy-header-policy-allowed-for-self.https.sub.html.sub.headers": [ @@ -443512,6 +443790,10 @@ [] ], "css": { + "animation-inactive-outside-range-ref.html": [ + "ea3215e359084b790f460f8d4537c08d353b5aaf", + [] + ], "animation-range-visual-test-ref.html": [ "c246f7f1b0a541aa3eb3cbdd01efd57d3018d5b9", [] @@ -457731,7 +458013,7 @@ [] ], "virtualenv.py": [ - "87f5d4281fe528c0d840f56e05f21bbc7d320402", + "c5e450331413b862c961d4fe4fcfca27020a66ab", [] ], "wpt.py": [ @@ -457837,7 +458119,7 @@ [] ], "chrome.py": [ - "3bdbf6f962c3a8de49cd70212ffed22692bfb2e5", + "b15d9ccb36995b68869555dc9cbbdeb2658bd39f", [] ], "chrome_android.py": [ @@ -457877,7 +458159,7 @@ [] ], "firefox.py": [ - "d2e386484f9255f616e73214f7568bd23a484b65", + "d9c9481f3275a9fdb73d9fdf1c5dbd284f1ebd27", [] ], "firefox_android.py": [ @@ -457923,7 +458205,7 @@ [] ], "webkitgtk_minibrowser.py": [ - "a574328c32633126fd7430c4757f3c6169f12ccd", + "4b247dd36e397c796d0623c57e6038f18663b474", [] ], "wktr.py": [ @@ -457949,7 +458231,7 @@ [] ], "base.py": [ - "3159bb3c3a2fbea5847aca9a58914cc58a6e2dd3", + "4b715a1f3171b3581016f3ec6d0ab19cbf449b6a", [] ], "executorchrome.py": [ @@ -458140,7 +458422,7 @@ [] ], "testrunner.py": [ - "b1346d51df1fe68d8813ec926fb440b026a06e28", + "d2ed58444ab0a2b27f64f2e846f4c8af658b9267", [] ], "tests": { @@ -459475,7 +459757,7 @@ [] ], "percent-encoding.json": [ - "bd81edbdc35ee3201d781278e64d5ea2db6b160b", + "eccd1db62fe60131fb12cbdf8c16e0354bcf7a98", [] ], "percent-encoding.py": [ @@ -459491,7 +459773,7 @@ [] ], "urltestdata.json": [ - "1aa42a514555dfa6c1007a2fa0b309fc3cc8b0ac", + "ec189871d908147b62af3a1b1de46ada73792c21", [] ] }, @@ -462619,11 +462901,15 @@ "RTCCertificate-postMessage-iframe.html": [ "9e52ba0c888a8d500072c1669599d88f64cb22c3", [] + ], + "webrtc-test-helpers.sub.js": [ + "48882b30ccc263c6fb72e9e910d3dbe9f06d8141", + [] ] }, "simulcast": { "simulcast.js": [ - "3aa0fc42870a9d5c99ba0bdb261c6e776ad71f95", + "1886531023d6a98c99c517a3ef0f4421714e92f1", [] ] }, @@ -462967,6 +463253,12 @@ } } }, + "resources": { + "websockets-test-helpers.sub.js": [ + "2680670cc691b14c25721d2dd474a2a4c15bac3f", + [] + ] + }, "security": { "check.py": [ "716b837f4942e9265637671682c71222e5712694", @@ -463163,7 +463455,7 @@ }, "resources": { "webtransport-test-helpers.sub.js": [ - "9f9127b22f96da1c8dc84465d33e5c5e476f4262", + "36788699e8bbbef020db6620c3e1ac142d6d74b8", [] ] } @@ -480895,7 +481187,7 @@ ], "name": { "comp_embedded_control.html": [ - "cfcd4d21c7bf5f67b3bc714523bbacd1f3071d69", + "09856ef662e90cba81059ad3c8a977e63b3781b5", [ null, { @@ -480904,7 +481196,7 @@ ] ], "comp_hidden_not_referenced.html": [ - "cfaebbb502d91c012d76f21c952ff273b2c05db8", + "84a2a2ca8026e3f82db1d66d6d4ffb1ddc3d13ef", [ null, { @@ -480913,7 +481205,7 @@ ] ], "comp_host_language_label.html": [ - "d2638b1ba75b746d001bba6a0cf87ce69fa2d4da", + "221ff0e9fb1a3f85083504d45d9fddbcab9db226", [ null, { @@ -480922,7 +481214,7 @@ ] ], "comp_label.html": [ - "9edd8000e949954c69bd354602f90f2ffea374b2", + "0c057862b3bf6c7a52d056b9c14a8ff7a68c2356", [ null, { @@ -480931,7 +481223,7 @@ ] ], "comp_labelledby.html": [ - "8e66362d81399fda31250c215551d01baa1376ed", + "ab17bff118741171a3be3c684d42d8c3b6aab0b6", [ null, { @@ -480940,7 +481232,7 @@ ] ], "comp_name_from_content.html": [ - "1390c6dcc805173c2b4c14a27e628c8afdc4ee17", + "0b40206a7ebc9af2fe49d72407f1d621b95346ad", [ null, { @@ -480949,7 +481241,7 @@ ] ], "comp_text_node.html": [ - "61f51cf4edc8804a2c2cd0296de5effda81d2b10", + "d63bdda82c0d1eec1ebc15c1292d1b512ea656eb", [ null, { @@ -480958,7 +481250,7 @@ ] ], "comp_tooltip.html": [ - "52e7b43cfc54c869bce321848efa3b5d93e5bc68", + "34718bd025f000a4b92e8f5f560f81b6c92d5a7c", [ null, { @@ -480968,7 +481260,7 @@ ], "shadowdom": { "basic.html": [ - "ca60986d337ca38865727fac3a3449fa3d2a719d", + "9746f2db47ac4941bf29e11f57262635fdc675ee", [ null, { @@ -480977,7 +481269,7 @@ ] ], "slot.html": [ - "9155a2eef3bdfb6c02b03826c9038ebca42239e6", + "41ccd5a57f452b0041510482b67207c0ef0e10c9", [ null, { @@ -500752,7 +501044,7 @@ ] ], "basic.htm": [ - "85d443190db2c2ea5151cb4a03b7332c43d646b0", + "cbdb4ca9aa79c9f4919720b29cdfe221df7f04e6", [ null, {} @@ -507234,6 +507526,13 @@ {} ] ], + "style-query-with-unknown-width.html": [ + "8b05d6c11200c94670a304cf4b490e6f590f6244", + [ + null, + {} + ] + ], "svg-foreignobject-child-container.html": [ "898fc22c2ba038a07b0907517d3e5e1cb421500a", [ @@ -511191,7 +511490,7 @@ ] ], "font-variant-invalid.html": [ - "c591acc3fcdfaac216a915ac4809f8a13fd9f9a4", + "93c7d6bb56ef89b1aaefe0f6c9f51c9c14a69186", [ null, {} @@ -515833,7 +516132,7 @@ ] ], "list-style-computed.sub.html": [ - "611fae5bf93636cd4d3402e91b1cd47148303617", + "f86915831e0577ca040afb473203ca089a90b5e4", [ null, {} @@ -516501,7 +516800,7 @@ ] ], "clip-path-composition.html": [ - "2275ae70a330e06214f3c612acdba186efde99cd", + "42c5988e045d6f1d5913c403a5a98a662a565680", [ null, {} @@ -516559,7 +516858,7 @@ ] ], "interpolation.html": [ - "da3981feed6ed681ee4a7d88b7ecd167b9fd5c7b", + "f580de9c76951a977a88da4375f61bb00bd77de5", [ null, {} @@ -516656,7 +516955,7 @@ ] ], "clip-path-valid.html": [ - "895cdfacac6cc8ac56e67738aed53e55be7b2fcf", + "fd268b429163854ecc5b64db8afc06ba0209f4b3", [ null, {} @@ -518045,6 +518344,13 @@ {} ] ], + "overlay-user-agent-rules.html": [ + "427eb8f7e40b4f4d574ed2b4b768812e9bcde62e", + [ + null, + {} + ] + ], "overlay-valid.html": [ "8d808ac6dcf582628f782b2e228b261a654ba212", [ @@ -519751,6 +520057,13 @@ {} ] ], + "adjustments-in-scroll-event-handler.tentative.html": [ + "84fd79cbcb91e2e906bfabca59941e42ea5db2d3", + [ + null, + {} + ] + ], "ancestor-change-heuristic.html": [ "21adfbb6b7a56c0a098eda1843897926afb363f5", [ @@ -519913,7 +520226,7 @@ ] ], "infinite-scroll-event.tentative.html": [ - "4bc222f4e72d890355c3f52a70b94ff9de1ac17f", + "e2a2998c52b73d4cf5783886148e7c7dea9fe9ec", [ null, {} @@ -520785,6 +521098,13 @@ {} ] ], + "scrollbar-width-009.html": [ + "494ffe344693ad80568d4513643e28eae13aad5e", + [ + null, + {} + ] + ], "scrollbar-width-keywords.html": [ "94ccd6ef6d550c83c97ba9525135cc309cc35842", [ @@ -521066,7 +521386,7 @@ ] ], "shape-outside-composition.html": [ - "0115148ec1adde1a32b1c1fb4b3c33ea8b56ece0", + "c1c29f1aa94880265d9d7329b16bdddcdba5146c", [ null, {} @@ -521081,14 +521401,14 @@ ] }, "basic-shape-circle-ellipse-serialization.html": [ - "5e4842d234f6af393a5ee04fa604a63f6db5cae1", + "715593d47b1330a325c6ba526f350f1bd7f2c3da", [ null, {} ] ], "basic-shape-interpolation.html": [ - "beea230697f0da8359447e6034835ba5766a9e24", + "5617ea28634e1e2f167b9e3e2c133b555ee4a8d8", [ null, {} @@ -521173,7 +521493,7 @@ ] ], "shape-outside-valid.html": [ - "c48974406b2cd18a851a62fc125ff7c6bd10a171", + "e5587c6b233a0c94568447777e95533ecbb50b29", [ null, {} @@ -521299,7 +521619,7 @@ ] ], "shape-outside-circle-000.html": [ - "a13570c1ff2ec6154c617922e65a84352c493be9", + "e2c735b3bbfe22938403eec2d13277edf14ee852", [ null, {} @@ -521341,7 +521661,7 @@ ] ], "shape-outside-circle-006.html": [ - "2fe988d626847cefd1d1a3a669cec701a2373e7a", + "15308ed9d1242331ff767bc03fa2a94ec160afab", [ null, {} @@ -521369,7 +521689,7 @@ ] ], "shape-outside-circle-010.html": [ - "6d6c11a7071569ef1bb0e71c8bdd740fd8b6a94d", + "609632e11ac9a37eaa3bd4c27f78b69cf4620dfb", [ null, {} @@ -521397,7 +521717,7 @@ ] ], "shape-outside-ellipse-000.html": [ - "532f794448cc8585dc69ee439ba576828e81f8a5", + "d74ed97a7667993932d4b3440c45bf18b1185615", [ null, {} @@ -521439,7 +521759,7 @@ ] ], "shape-outside-ellipse-006.html": [ - "4bd75a445a65d8923e0c3cd2c414bf81af192c24", + "69cd8aca78b17f88d2c3fa4bb547f2228b025dae", [ null, {} @@ -521467,7 +521787,7 @@ ] ], "shape-outside-ellipse-010.html": [ - "07cd1e593b75dac5054e08e82d3cd1885a883277", + "430d2621baff6b8f1381a988b2b04cde5c4f281e", [ null, {} @@ -535390,14 +535710,14 @@ ] ], "offset-path-interpolation-005.html": [ - "9924106f4b75ede89e5270a76fe217f85ef20050", + "13de65d8a73bc6eafcbffe6f3f0155f6ad6819e6", [ null, {} ] ], "offset-path-interpolation-006.html": [ - "a19908e4fffc2383a940e04ef0c00c486085cfee", + "5b95501909ceca7d55ebcab03654d942edb43756", [ null, {} @@ -535518,14 +535838,14 @@ ] ], "offset-path-parsing-valid.html": [ - "59a64b2116d603fa9ce79a614b8029033f2f1c42", + "8a22b9420eed7831dcf564b64db8f9ebe36b453e", [ null, {} ] ], "offset-position-computed.html": [ - "1cbdbdb0fe212c229c3b627cf6790a59a517a8bb", + "ebb8023e6c512f8f4cb305906c5b85a254b86895", [ null, {} @@ -535539,7 +535859,7 @@ ] ], "offset-position-parsing-valid.html": [ - "f71730f89eb52c8affb05ee7c7103eb20f6b2ab3", + "bc0d19a460f4f22f9a061ae6932f31637c7231d6", [ null, {} @@ -576952,7 +577272,7 @@ }, "graphics-aria": { "graphics-roles.html": [ - "159190ed833398d2410c5f4f2224f0b3a7dfd0a8", + "fd7fabbb6907d0ce1e1a9dcdbdd96c3bb398bdbe", [ null, { @@ -582035,6 +582355,50 @@ ] ] }, + "pushstate-replacestate-empty-string": { + "pushstate-base.html": [ + "ea95d812d7a4632c0ea1bcd1845e1785c61cf994", + [ + null, + {} + ] + ], + "pushstate-whitespace.html": [ + "72d9be6a9c4a2957b5ad85a7fdb1b460949f2ff8", + [ + null, + {} + ] + ], + "pushstate.html": [ + "1953709269efad04a3bc79b5755051860336dc2c", + [ + null, + {} + ] + ], + "replacestate-base.html": [ + "224e928de6ae6b66def650d74ede3c2757360730", + [ + null, + {} + ] + ], + "replacestate-whitespace.html": [ + "7261cdf3fa1c12bed536cf70b3eac408c368aef8", + [ + null, + {} + ] + ], + "replacestate.html": [ + "66b4cc6f82b59a0f36617983984465782e22ae5d", + [ + null, + {} + ] + ] + }, "traverse-during-beforeunload.html": [ "cb8cdca7ff80e4b13ec4c606ca65786a30d17d08", [ @@ -582564,6 +582928,20 @@ {} ] ], + "document-write.https.window.js": [ + "39dc3b1cc21f643344ec603123b49ba95709125a", + [ + "html/browsers/origin/inheritance/document-write.https.window.html", + { + "script_metadata": [ + [ + "script", + "/common/get-host-info.sub.js" + ] + ] + } + ] + ], "javascript-url.html": [ "7dfb1130ce5a6c8e3c0f506900620fe87b17ec4e", [ @@ -585099,13 +585477,6 @@ {} ] ], - "2d.drawImage.animated.apng.html": [ - "ffe19ce9bc4aec3fdc8073ca0ec65c2277f4dbde", - [ - null, - {} - ] - ], "2d.drawImage.animated.gif.html": [ "6330d06ade35721f9e20b79a396715a4196392ce", [ @@ -585113,13 +585484,6 @@ {} ] ], - "2d.drawImage.animated.poster.html": [ - "2d28bc12837973c78cf4c0b176698e1ed0056d7b", - [ - null, - {} - ] - ], "2d.drawImage.broken.html": [ "f6516a8ecccf5834ca3b06eb9c7cae583fa190d8", [ @@ -587948,13 +588312,6 @@ null, {} ] - ], - "drawimage_zerosize-image.html": [ - "1c4e74866ab2825c57fc16ad419e2ad59e80067c", - [ - null, - {} - ] ] }, "drawing-paths-to-the-canvas": { @@ -592723,20 +593080,6 @@ {} ] ], - "2d.drawImage.animated.poster.html": [ - "eccf14bfd044c98f0c9412f7c7d18359ae645b01", - [ - null, - {} - ] - ], - "2d.drawImage.animated.poster.worker.js": [ - "542c9382f64572be389a06249f376ec824c31c76", - [ - "html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.html", - {} - ] - ], "2d.drawImage.broken.html": [ "a2afa05f01e3d7142acbb6028b90b5ffa9ecd0a3", [ @@ -592934,19 +593277,12 @@ ] ], "2d.drawImage.svg.html": [ - "cd293595fe8f4e714b4703ce394eeab184da5fce", + "c2ebd265cfaf36e01ad8beaa383a056d0dbc53b9", [ null, {} ] ], - "2d.drawImage.svg.worker.js": [ - "8293e89f247af9fe093b88b29daa32fe4da8c778", - [ - "html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.html", - {} - ] - ], "2d.drawImage.transform.html": [ "ca148c1a685c81c792ad74103a0dbd1d9ab6c304", [ @@ -592997,19 +593333,12 @@ ] ], "2d.drawImage.zerosource.image.html": [ - "5dfb2f3002c24b1710ba800652790a8171cdb852", + "77182242d4c78de8262eaf6966dc20a2d17dcc5e", [ null, {} ] ], - "2d.drawImage.zerosource.image.worker.js": [ - "467beb4d12fac2c3251efeeb197547b065a96d27", - [ - "html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.html", - {} - ] - ], "2d.drawImage.zerosource.worker.js": [ "a80bfff5621c28b14a3d307a8bf33e40f8de8443", [ @@ -597173,20 +597502,6 @@ ] }, "the-offscreen-canvas": { - "offscreencanvas.commit.html": [ - "4ee68b430fda4fd786a9b790fb52ca4c94b291ba", - [ - null, - {} - ] - ], - "offscreencanvas.commit.w.html": [ - "7d1d2c85f9cf3a290345fc559621b12ca034efea", - [ - null, - {} - ] - ], "offscreencanvas.constructor.html": [ "a2ad1dcc7eee6dd20cfd6ab873814aea4d766985", [ @@ -607229,27 +607544,51 @@ ] ], "iframe-popup-to-so.https.html": [ - "740ff2595aa5891cfaf99a04cd281e71e4d4bc74", + "8cf2679e190129e91de8e2af4ceef5b064fedba4", + [ + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?1-1", + { + "timeout": "long" + } + ], + [ + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?2-2", + { + "timeout": "long" + } + ], + [ + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?3-3", + { + "timeout": "long" + } + ], [ - "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?1-2", + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?4-4", { "timeout": "long" } ], [ - "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?3-4", + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?5-5", { "timeout": "long" } ], [ - "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?5-6", + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?6-6", { "timeout": "long" } ], [ - "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?7-8", + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?7-7", + { + "timeout": "long" + } + ], + [ + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html?8-8", { "timeout": "long" } @@ -611371,7 +611710,7 @@ }, "rendering": { "dimension-attributes.html": [ - "f3dc8f8171807c3940930a25dff56b1245adee7f", + "1d94205e0b1ee6eab918ab7f32af7634ff5a0bf9", [ null, { @@ -617441,8 +617780,17 @@ {} ] ], + "relevant-mutations-lazy.html": [ + "d3784671b860c6f1e1662cf022f4a7519d27db75", + [ + null, + { + "timeout": "long" + } + ] + ], "relevant-mutations.html": [ - "2f1031bf83215e4c696ffaa526e978f6f956a28f", + "24e15543cd86533391710fe34d5f6c380ee96aee", [ null, { @@ -617499,6 +617847,13 @@ null, {} ] + ], + "sizes-auto.html": [ + "41385edd33f1e7cc1fdc1d882883e5725b5e4d2b", + [ + null, + {} + ] ] }, "source-media-outside-doc.html": [ @@ -621126,7 +621481,7 @@ ] ], "popover-focus.html": [ - "98bb065de7b8b894c803d9e6f0d5145515e207bb", + "230492022c045f20a4dad4dcb8a779930371429f", [ null, { @@ -621202,7 +621557,7 @@ ] ], "popover-light-dismiss.html": [ - "59a12a2c9ac18e8eefe603c481057074541109a5", + "0f206f1c700a5fd4def13f49ee927e4526fa1e56", [ null, { @@ -630972,7 +631327,7 @@ ] }, "roles.html": [ - "3609c26a23f9d826fa004c68835039ab051fedc9", + "ff4986370f474668484e24204fa5d8ab204bc81d", [ null, { @@ -630981,7 +631336,7 @@ ] ], "table-roles.html": [ - "d7865f5fccab6ff12fc592835512e613e883ef80", + "3f1a4eccd666eabfc718354e0d436da198469251", [ null, { @@ -646304,6 +646659,15 @@ {} ] ], + "payment-request-disallowed-when-hidden.https.html": [ + "aa59cde2ef0d579cbcc1e205b3d15f5b7c809c66", + [ + null, + { + "testdriver": true + } + ] + ], "payment-request-hasenrolledinstrument-method-protection.tentative.https.html": [ "4da11304a21427040f72317e3746feebb251d12e", [ @@ -647831,6 +648195,27 @@ {} ] ], + "permissions-policy-header-host-wildcard.https.sub.html": [ + "211ca7445df8dbf1be989b361dadaa420fbf54eb", + [ + null, + {} + ] + ], + "permissions-policy-header-port-wildcard.https.sub.html": [ + "adb657023eaf2c4e686adef2ea4dc8a751170c7c", + [ + null, + {} + ] + ], + "permissions-policy-header-scheme-only.https.sub.html": [ + "eab3e8f697fd2c0523e7228491d1dd7777f12841", + [ + null, + {} + ] + ], "private-state-token-redemption-default-permissions-policy.tentative.https.sub.html": [ "4962b42721dfdefafcc1674c5e64d178be841a1a", [ @@ -667124,7 +667509,7 @@ ] ], "animation-timeline-ignored.tentative.html": [ - "4a6624caf437d1f310d5228e14a6e0d773036ced", + "b9efbb428bd97f0de4331dbc7c88731c7067873e", [ null, {} @@ -667605,6 +667990,13 @@ } ] ], + "intrinsic-iteration-duration.tentative.html": [ + "4bcea1adba3d8466a9a5d9d5b432a713cc414994", + [ + null, + {} + ] + ], "pause-animation.html": [ "1f9641e2f8d61845d64bff98129985c42468cee7", [ @@ -667665,6 +668057,13 @@ {} ] ], + "scroll-timeline-range.html": [ + "cc844cb748e6f2b024f7a04392101b77f162c740", + [ + null, + {} + ] + ], "scroll-timeline-snapshotting.html": [ "1e43699d5bfea7f8331a090c01eddcae944b51cc", [ @@ -667696,7 +668095,7 @@ ] ], "setting-timeline.tentative.html": [ - "4a7e7366f791722c80003ad262135e8d1302afc1", + "5813de60fabf2f34881d0aad4356947109c4b983", [ null, {} @@ -667768,7 +668167,7 @@ ] ], "timeline-offset-in-keyframe.html": [ - "62a8d1387d38cb9abd11a6252fefbf7d0fd71f24", + "1168893854297560262e03c28bdf71580955b8ae", [ null, {} @@ -668077,15 +668476,6 @@ } ] ], - "authentication-disallowed-when-hidden.https.html": [ - "1c01fa0e89c133122952479e2e3b1a0632ce0007", - [ - null, - { - "testdriver": true - } - ] - ], "authentication-icon-data-url.https.html": [ "cd820d84c32116a400f76f059af97a0241cfcc37", [ @@ -676164,6 +676554,15 @@ } ] ], + "blob_object_url.html": [ + "fe673d86392903bd8627596e43979398ec65cd5e", + [ + null, + { + "timeout": "long" + } + ] + ], "cache-storage.https.html": [ "b2044a40780def8f74a0e3dcd4d108546d033001", [ @@ -676273,7 +676672,7 @@ ] ], "fetch-blob.html": [ - "7f8d55704934ba8ebd0a8fafab16934c815ad05d", + "098a5a5128926a039ffa1d433c13a55ad0c2670c", [ null, { @@ -676966,7 +677365,7 @@ ] ], "restrictions.html": [ - "5019d4b280cfe523aea11b7a4bee1fdb9fd7ddb6", + "1990dfa1fc4ce5322a1d264ca36743ccf4883a9c", [ null, { @@ -685551,7 +685950,7 @@ ] ], "SVGAnimatedEnumeration-SVGMarkerElement.html": [ - "dfc9dd248007c9e87ca8177167f4b4f1cf9f2e75", + "61c44d0d178a47f6cbca1864d299d1e1c13ceaf7", [ null, {} @@ -691005,7 +691404,7 @@ ], "role": { "abstract-roles.html": [ - "8a98ba74ead17698a48957c88e98601925f4e8e0", + "520ecf2dbb398d3978543b915813257e9c7a7b1c", [ null, { @@ -691023,7 +691422,7 @@ ] ], "fallback-roles.html": [ - "eb6e89b29aec91cd0ca106488e6237cc1731c60c", + "6f42fa693e55eb37f8d014bc2c9001c1a5bcbb72", [ null, { @@ -691041,7 +691440,7 @@ ] ], "invalid-roles.html": [ - "e7d38dc8c950c53a9f15610a1f8eff64f177d8c4", + "da2370583a2267cb078e1ecda4fe3b57905acd76", [ null, { @@ -691050,7 +691449,7 @@ ] ], "list-roles.html": [ - "5d9787f04bfdcbdb236e38583b01401269419b9a", + "da097ce67e8932b6d4ec4d9a533b8b8fdf43b20c", [ null, { @@ -691059,7 +691458,7 @@ ] ], "region-roles.html": [ - "d087f8f69bd0a071f531082e815fc6db4f2c7c60", + "d80570a97bcdddff7ba6669b792d76de72836913", [ null, { @@ -691077,7 +691476,7 @@ ] ], "roles.html": [ - "72c9cdd0cd35eb063491dd93801d6c2b5eb55fac", + "844da3ce47b0f3ec55ed489b24d27f0bdfc3f380", [ null, { @@ -691086,7 +691485,7 @@ ] ], "synonym-roles.html": [ - "59d913a60a3719e4f24d369cd4baeda95e409537", + "06a6a776f45bb11584cac9fffde2d7def82a7b68", [ null, { @@ -706857,7 +707256,7 @@ ] ], "RTCPeerConnection-setRemoteDescription-simulcast.https.html": [ - "98b5d2bab7aa9429352a1842360c6c6a8a75c189", + "c5d46cedfd8a34c2a4085804aa43c9f8d8b6222b", [ null, {} @@ -707142,6 +707541,74 @@ {} ] ], + "back-forward-cache-with-closed-webrtc-connection.https.window.js": [ + "320803adec29361de02f2537c72c231aa290458b", + [ + "webrtc/back-forward-cache-with-closed-webrtc-connection.https.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with closed WebRTC connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "resources/webrtc-test-helpers.sub.js" + ] + ] + } + ] + ], + "back-forward-cache-with-open-webrtc-connection.https.window.js": [ + "4a4807d5141123cd1cf7e85cc1c8e29623944f59", + [ + "webrtc/back-forward-cache-with-open-webrtc-connection.https.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with open WebRTC connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "resources/webrtc-test-helpers.sub.js" + ] + ] + } + ] + ], "getstats.html": [ "d6a692bb7860b9c6bd7699ba4e99ea8010922c08", [ @@ -707412,7 +707879,7 @@ ] ], "simulcast-answer.html": [ - "5e19bc08ff5d7fa4860e8e53e4a0611e00d3c6c1", + "f3732ca44c9b7872f26e90aedc2ae05f653343f4", [ null, {} @@ -707548,7 +708015,7 @@ ] ], "setParameters-encodings.https.html": [ - "ac04ca55fb1f34ee51641bb05048de0bff0d57ea", + "86274a0c5a3da8b05c852e7b421951b90eb6e290", [ null, { @@ -715555,6 +716022,82 @@ } ] ], + "back-forward-cache-with-closed-websocket-connection.window.js": [ + "30b8e63a2cd595d1186c1d4737d150dec157b755", + [ + "websockets/back-forward-cache-with-closed-websocket-connection.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with closed WebSocket connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "/websockets/constants.sub.js" + ], + [ + "script", + "resources/websockets-test-helpers.sub.js" + ] + ] + } + ] + ], + "back-forward-cache-with-open-websocket-connection.window.js": [ + "2baf38f303c3dfd3902b07f05c25523d9c1adfb0", + [ + "websockets/back-forward-cache-with-open-websocket-connection.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with open WebSocket connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "/websockets/constants.sub.js" + ], + [ + "script", + "resources/websockets-test-helpers.sub.js" + ] + ] + } + ] + ], "basic-auth.any.js": [ "9fbdc5d5cede4050d414bed45a3b8c55689c6c08", [ @@ -719959,6 +720502,82 @@ ] }, "webtransport": { + "back-forward-cache-with-closed-webtransport-connection.https.window.js": [ + "5cc7e93a2e14d5453e5f44630dac8745380d4c47", + [ + "webtransport/back-forward-cache-with-closed-webtransport-connection.https.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with closed WebTransport connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "resources/webtransport-test-helpers.sub.js" + ] + ] + } + ] + ], + "back-forward-cache-with-open-webtransport-connection.https.window.js": [ + "5d5143ae1a47811822c55ff22148f8e70cc3029d", + [ + "webtransport/back-forward-cache-with-open-webtransport-connection.https.window.html", + { + "script_metadata": [ + [ + "title", + "Testing BFCache support for page with open WebTransport connection." + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js" + ], + [ + "script", + "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" + ], + [ + "script", + "resources/webtransport-test-helpers.sub.js" + ] + ] + } + ] + ], "close.https.any.js": [ "de675036f3d7ea4a7e2aaf5bf88bdfb35a173f3a", [ @@ -728807,7 +729426,7 @@ ] ], "send-authentication-basic-cors-not-enabled.htm": [ - "2e7cbaf034048d3b73c905048b090546bee43ca1", + "41201960cc39ccdf58dc2892826f4c6329595b9d", [ null, {} @@ -728863,14 +729482,14 @@ ] ], "send-authentication-cors-basic-setrequestheader.htm": [ - "de9c5e543038c3527e3fb55b0e8e75728ce0f0a5", + "3c488dcad42485de0074ff435783f87cd4a17663", [ null, {} ] ], "send-authentication-cors-setrequestheader-no-cred.htm": [ - "14edf5bd778ef49eba175be9dd8d657a86426e9c", + "eed619c1efbbb5ca5605ce0d0505ae126bc28a3f", [ null, {} @@ -729132,7 +729751,7 @@ ] ], "send-network-error-sync-events.sub.htm": [ - "2266eb36e1e3791a4fa1b70ea084cc6fcead926d", + "8011c58bdd15ddc766fc70532a1431f98423cc60", [ null, {} diff --git a/tests/wpt/metadata/cors/basic.htm.ini b/tests/wpt/metadata/cors/basic.htm.ini index f10af999034..d0f5e4ca904 100644 --- a/tests/wpt/metadata/cors/basic.htm.ini +++ b/tests/wpt/metadata/cors/basic.htm.ini @@ -1,13 +1,3 @@ [basic.htm] [Same domain basic usage] expected: FAIL - - [Cross domain basic usage, origin: echo] - expected: FAIL - - [Cross domain different port, origin: echo] - expected: FAIL - - [Cross domain different protocol, origin: echo] - expected: FAIL - diff --git a/tests/wpt/metadata/css/css-position/overlay/overlay-user-agent-rules.html.ini b/tests/wpt/metadata/css/css-position/overlay/overlay-user-agent-rules.html.ini new file mode 100644 index 00000000000..970e964ba2d --- /dev/null +++ b/tests/wpt/metadata/css/css-position/overlay/overlay-user-agent-rules.html.ini @@ -0,0 +1,12 @@ +[overlay-user-agent-rules.html] + [HTML elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [SVG elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [Null namespace elements should have overlay:none !important from the user-agent.] + expected: FAIL + + [Arbitrary namespace elements should have overlay:none !important from the user-agent.] + 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 4c1c78640bb..e9ab91fc80e 100644 --- a/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini +++ b/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini @@ -1,4 +1,3 @@ [keepalive.any.html] - expected: TIMEOUT [keepalive in onunload in nested frame in another window] expected: FAIL 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 f61eb5b8e17..73c79c76452 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,5 +1,4 @@ [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/iframe.tentative.https.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini index a3e6497f7c9..5b0348afa74 100644 --- a/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini +++ b/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini @@ -1,5 +1,4 @@ [iframe.tentative.https.window.html] - expected: TIMEOUT [private to local: failed preflight.] expected: FAIL @@ -31,7 +30,7 @@ expected: FAIL [public to local, grandparent navigates: failure.] - expected: TIMEOUT + expected: FAIL [public to local, grandparent navigates: success.] - expected: TIMEOUT + expected: FAIL 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 907ee959867..847d587e25f 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 @@ -34,3 +34,6 @@ [treat-as-public to public: success.] expected: FAIL + + [local https to local https: success.] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini index c8a3c8f9e68..6e9f7acf151 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini @@ -1,6 +1,6 @@ [scroll-restoration-fragment-scrolling-cross-origin.html] type: testharness - expected: ERROR + expected: TIMEOUT [Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation] expected: TIMEOUT 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 f2dee7b3ea9..eaebad750fe 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,6 +1,7 @@ [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: FAIL + expected: TIMEOUT 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 1d68034a37d..ab9ac6e835e 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,12 +1,13 @@ [failure-check-sequence.https.html] + expected: TIMEOUT [CSP check precedes COEP check - CSP header first] - expected: FAIL + expected: NOTRUN [COEP check precedes X-Frame-Options check] - expected: FAIL + expected: NOTRUN [CSP check precedes COEP check - COEP header first] - expected: FAIL + expected: NOTRUN [CSP check precedes X-Frame-Options check] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 149bcb4ff8c..51fd557bd7f 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -7,6 +7,3 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank#foo'] expected: FAIL - - [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] - expected: FAIL 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 27889a98fb5..24d2f8ac554 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,6 +1,3 @@ [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 deleted file mode 100644 index 4ecd6d9f753..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[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 new file mode 100644 index 00000000000..49cc2e16746 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini @@ -0,0 +1,3 @@ +[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 new file mode 100644 index 00000000000..7dc346632a4 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini @@ -0,0 +1,3 @@ +[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 new file mode 100644 index 00000000000..60a4fa51f8a --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini @@ -0,0 +1,3 @@ +[a-click.html] + [aElement.click() before the load event must NOT replace] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini deleted file mode 100644 index d993e8dcc42..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pageload-image-in-popup.html] - [The document for a standalone media file should have one child in the body.] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html.ini new file mode 100644 index 00000000000..78b8c1bb285 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html.ini @@ -0,0 +1,3 @@ +[pushstate.html] + [history.pushState() with an empty string URL] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html.ini new file mode 100644 index 00000000000..1120dffbd9d --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html.ini @@ -0,0 +1,3 @@ +[replacestate.html] + [history.replaceState() with an empty string URL] + expected: FAIL 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 new file mode 100644 index 00000000000..de713daa8a0 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/the-window-object/navigate-to-about-blank-while-initial-load-pending.html.ini @@ -0,0 +1,3 @@ +[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/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..4b4820d1729 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini @@ -0,0 +1,3 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini deleted file mode 100644 index c26cd20441d..00000000000 --- a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[2d.drawImage.animated.poster.html] - [drawImage() of an APNG draws the poster frame] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini b/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini deleted file mode 100644 index 77ea4e129ba..00000000000 --- a/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[drawimage_zerosize-image.html] - [drawImage with zero-sized source rectangle from image draws nothing without exception] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini deleted file mode 100644 index c26cd20441d..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[2d.drawImage.animated.poster.html] - [drawImage() of an APNG draws the poster frame] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini deleted file mode 100644 index 2c48d688b6a..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[2d.drawImage.animated.poster.worker.html] - [drawImage() of an APNG draws the poster frame] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini deleted file mode 100644 index ee8c386c098..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[2d.drawImage.svg.worker.html] - [drawImage() of an SVG image] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini deleted file mode 100644 index e066aa1646f..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini +++ /dev/null @@ -1,6 +0,0 @@ -[2d.drawImage.zerosource.image.worker.html] - [drawImage with zero-sized source rectangle from image throws INDEX_SIZE_ERR] - expected: FAIL - - [drawImage with zero-sized source rectangle from image draws nothing without exception] - expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html.ini b/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html.ini deleted file mode 100644 index ff3a587f818..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[offscreencanvas.commit.html] - [Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.] - expected: FAIL - - [Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop.] - expected: FAIL - diff --git a/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html.ini deleted file mode 100644 index f654a376e62..00000000000 --- a/tests/wpt/metadata/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[offscreencanvas.commit.w.html] - [Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.] - expected: FAIL - diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini index 830aeb8ae48..fdc27d37788 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini @@ -1,7 +1,6 @@ [autofocus-dialog.html] - expected: TIMEOUT [<dialog> can contain autofocus, without stopping page autofocus content from working] expected: FAIL [<dialog>-contained autofocus element gets focused when the dialog is shown] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 58a99633547..d169bd2e9fa 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,19 +1,15 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: TIMEOUT + expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: NOTRUN + expected: FAIL [Area element should support autofocus] - expected: NOTRUN + expected: FAIL [Host element with delegatesFocus should support autofocus] - expected: NOTRUN - - [Non-HTMLElement should not support autofocus] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/html/rendering/dimension-attributes.html.ini b/tests/wpt/metadata/html/rendering/dimension-attributes.html.ini index 31882ce5147..99de0628c87 100644 --- a/tests/wpt/metadata/html/rendering/dimension-attributes.html.ini +++ b/tests/wpt/metadata/html/rendering/dimension-attributes.html.ini @@ -4645,3 +4645,30 @@ [<source height="0px"> mapping to <img> height property] expected: FAIL + + [<table height="0"> mapping to <table> height property] + expected: FAIL + + [<table height="0%"> mapping to <table> height property] + expected: FAIL + + [<table height="0px"> mapping to <table> height property] + expected: FAIL + + [<tr height="0"> mapping to <tr> height property] + expected: FAIL + + [<tr height="0%"> mapping to <tr> height property] + expected: FAIL + + [<tr height="0px"> mapping to <tr> height property] + expected: FAIL + + [<col width="0"> mapping to <col> width property] + expected: FAIL + + [<col width="0%"> mapping to <col> width property] + expected: FAIL + + [<col width="0px"> mapping to <col> width property] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini deleted file mode 100644 index 09c049e4b58..00000000000 --- a/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[media_fragment_seek.html] - [Video should seek to time specified in media fragment syntax] - expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index 4041e43a4fd..6f7461b9472 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,5 +1,4 @@ [iframe_sandbox_popups_nonescaping-1.html] type: testharness - expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL 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 6bec7a732b8..76e34322dca 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,4 +1,5 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index a24e565bbce..ff6467094b8 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-3.html] - expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini index 47b45e65a1c..3cdeb8ebcbc 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini @@ -1,9 +1,3 @@ [non-active-document.html] [DOMParser] expected: FAIL - - [createHTMLDocument] - expected: FAIL - - [<template>] - expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html.ini new file mode 100644 index 00000000000..6d5a9fe78c8 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html.ini @@ -0,0 +1,126 @@ +[sizes-auto.html] + [<img loading="lazy" sizes="auto" width="10" data-ref="ref1" srcset="/images/green-1x1.png?img3 50w, /images/green-16x16.png?img3 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture3 50w, /images/green-16x16.png?picture3 51w"><img loading="lazy" width="10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="AUTO" width="10" data-ref="ref1" srcset="/images/green-1x1.png?img4 50w, /images/green-16x16.png?img4 51w">] + expected: FAIL + + [<picture><source sizes="AUTO" srcset="/images/green-1x1.png?picture4 50w, /images/green-16x16.png?picture4 51w"><img loading="lazy" width="10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" width="10" data-ref="ref1" srcset="/images/green-1x1.png?img5 50w, /images/green-16x16.png?img5 51w">] + expected: FAIL + + [<picture><source srcset="/images/green-1x1.png?picture5 50w, /images/green-16x16.png?picture5 51w"><img loading="lazy" width="10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" style="width: 10px" data-ref="ref1" srcset="/images/green-1x1.png?img6 50w, /images/green-16x16.png?img6 51w">] + expected: FAIL + + [<picture><source srcset="/images/green-1x1.png?picture6 50w, /images/green-16x16.png?picture6 51w"><img loading="lazy" style="width: 10px" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" style="width: 100%; max-width: 10px" data-ref="ref1" srcset="/images/green-1x1.png?img8 50w, /images/green-16x16.png?img8 51w">] + expected: FAIL + + [<picture><source srcset="/images/green-1x1.png?picture8 50w, /images/green-16x16.png?picture8 51w"><img loading="lazy" style="width: 100%; max-width: 10px" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" width="10" style="visibility: hidden" data-ref="ref1" srcset="/images/green-1x1.png?img10 50w, /images/green-16x16.png?img10 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture10 50w, /images/green-16x16.png?picture10 51w"><img loading="lazy" width="10" style="visibility: hidden" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" width="10" style="display: inline" hidden="" data-ref="ref1" srcset="/images/green-1x1.png?img11 50w, /images/green-16x16.png?img11 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture11 50w, /images/green-16x16.png?picture11 51w"><img loading="lazy" width="10" style="display: inline" hidden="" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto, 100vw" width="10" data-ref="ref1" srcset="/images/green-1x1.png?img15 50w, /images/green-16x16.png?img15 51w">] + expected: FAIL + + [<picture><source sizes="auto, 100vw" srcset="/images/green-1x1.png?picture15 50w, /images/green-16x16.png?picture15 51w"><img loading="lazy" width="10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" width="100%" data-ref="ref1" srcset="/images/green-1x1.png?img18 50w, /images/green-16x16.png?img18 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture18 50w, /images/green-16x16.png?picture18 51w"><img loading="lazy" width="100%" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="height: 10px; aspect-ratio: 10 / 10" data-ref="ref1" srcset="/images/green-1x1.png?img20 50w, /images/green-16x16.png?img20 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture20 50w, /images/green-16x16.png?picture20 51w"><img loading="lazy" style="height: 10px; aspect-ratio: 10 / 10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="min-height: 10px; aspect-ratio: 10 / 10" data-ref="ref1" srcset="/images/green-1x1.png?img22 50w, /images/green-16x16.png?img22 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture22 50w, /images/green-16x16.png?picture22 51w"><img loading="lazy" style="min-height: 10px; aspect-ratio: 10 / 10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="inline-size: 10px" data-ref="ref1" srcset="/images/green-1x1.png?img24 50w, /images/green-16x16.png?img24 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture24 50w, /images/green-16x16.png?picture24 51w"><img loading="lazy" style="inline-size: 10px" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="min-inline-size: 10px" data-ref="ref1" srcset="/images/green-1x1.png?img25 50w, /images/green-16x16.png?img25 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture25 50w, /images/green-16x16.png?picture25 51w"><img loading="lazy" style="min-inline-size: 10px" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="block-size: 10px; aspect-ratio: 10 / 10" data-ref="ref1" srcset="/images/green-1x1.png?img26 50w, /images/green-16x16.png?img26 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture26 50w, /images/green-16x16.png?picture26 51w"><img loading="lazy" style="block-size: 10px; aspect-ratio: 10 / 10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="min-block-size: 10px; aspect-ratio: 10 / 10" data-ref="ref1" srcset="/images/green-1x1.png?img27 50w, /images/green-16x16.png?img27 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture27 50w, /images/green-16x16.png?picture27 51w"><img loading="lazy" style="min-block-size: 10px; aspect-ratio: 10 / 10" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="block-size: 10px; writing-mode: vertical-rl" data-ref="ref1" srcset="/images/green-1x1.png?img28 50w, /images/green-16x16.png?img28 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture28 50w, /images/green-16x16.png?picture28 51w"><img loading="lazy" style="block-size: 10px; writing-mode: vertical-rl" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="min-block-size: 10px; writing-mode: vertical-rl" data-ref="ref1" srcset="/images/green-1x1.png?img29 50w, /images/green-16x16.png?img29 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture29 50w, /images/green-16x16.png?picture29 51w"><img loading="lazy" style="min-block-size: 10px; writing-mode: vertical-rl" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl" data-ref="ref1" srcset="/images/green-1x1.png?img30 50w, /images/green-16x16.png?img30 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture30 50w, /images/green-16x16.png?picture30 51w"><img loading="lazy" style="inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="min-inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl" data-ref="ref1" srcset="/images/green-1x1.png?img31 50w, /images/green-16x16.png?img31 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture31 50w, /images/green-16x16.png?picture31 51w"><img loading="lazy" style="min-inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="--my-width: 10px; width: var(--my-width)" data-ref="ref1" srcset="/images/green-1x1.png?img32 50w, /images/green-16x16.png?img32 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture32 50w, /images/green-16x16.png?picture32 51w"><img loading="lazy" style="--my-width: 10px; width: var(--my-width)" data-ref="ref1"></picture>] + expected: FAIL + + [<img loading="lazy" sizes="auto" style="width: calc(5px + 5px)" data-ref="ref1" srcset="/images/green-1x1.png?img33 50w, /images/green-16x16.png?img33 51w">] + expected: FAIL + + [<picture><source sizes="auto" srcset="/images/green-1x1.png?picture33 50w, /images/green-16x16.png?picture33 51w"><img loading="lazy" style="width: calc(5px + 5px)" data-ref="ref1"></picture>] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini index 04f00279ffc..84d07e03c64 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini @@ -181,3 +181,6 @@ [multipart/form-data: Basic test (formdata event)] expected: FAIL + + [multipart/form-data: 0x00 in name (normal form)] + 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 new file mode 100644 index 00000000000..7682a4830bf --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini @@ -0,0 +1,4 @@ +[reparent-form-during-planned-navigation-task.html] + expected: TIMEOUT + [reparent-form-during-planned-navigation-task] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini new file mode 100644 index 00000000000..b8bdf33cb65 --- /dev/null +++ b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini @@ -0,0 +1,3 @@ +[DOMContentLoaded-defer.html] + [The end: DOMContentLoaded and defer scripts] + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini deleted file mode 100644 index 53acb938c1b..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[module-static-import-delayed.html] - [document.write in an imported module] - 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 dbe1def99e3..7237f5792de 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,9 +1,10 @@ [promise-job-entry-different-function-realm.html] + expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL @@ -12,4 +13,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index 4a48dd15a9d..1d71471b73c 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini @@ -1,6 +1,7 @@ [promise-rejection-events.html] + expected: TIMEOUT [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: FAIL + expected: TIMEOUT [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini deleted file mode 100644 index b7b36c1d3a4..00000000000 --- a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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 deleted file mode 100644 index c7946fc91b4..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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 deleted file mode 100644 index b7b36c1d3a4..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[018.html] - expected: TIMEOUT - [origin of the script that invoked the method, javascript:] - expected: TIMEOUT diff --git a/tests/wpt/metadata/websockets/back-forward-cache-with-closed-websocket-connection.window.js.ini b/tests/wpt/metadata/websockets/back-forward-cache-with-closed-websocket-connection.window.js.ini new file mode 100644 index 00000000000..55462bf5691 --- /dev/null +++ b/tests/wpt/metadata/websockets/back-forward-cache-with-closed-websocket-connection.window.js.ini @@ -0,0 +1,3 @@ +[back-forward-cache-with-closed-websocket-connection.window.html] + [Testing BFCache support for page with closed WebSocket connection.] + expected: FAIL diff --git a/tests/wpt/metadata/websockets/back-forward-cache-with-open-websocket-connection.window.js.ini b/tests/wpt/metadata/websockets/back-forward-cache-with-open-websocket-connection.window.js.ini new file mode 100644 index 00000000000..7b4e24160b9 --- /dev/null +++ b/tests/wpt/metadata/websockets/back-forward-cache-with-open-websocket-connection.window.js.ini @@ -0,0 +1,3 @@ +[back-forward-cache-with-open-websocket-connection.window.html] + [Testing BFCache support for page with open WebSocket connection.] + expected: FAIL 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 deleted file mode 100644 index aa6c9e5b826..00000000000 --- a/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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/dedicated-worker-from-blob-url.window.js.ini b/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini new file mode 100644 index 00000000000..d0154d3e5d7 --- /dev/null +++ b/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini @@ -0,0 +1,3 @@ +[dedicated-worker-from-blob-url.window.html] + [Creating a dedicated worker from a blob URL works immediately before revoking.] + expected: FAIL diff --git a/tests/wpt/mozilla/meta-layout-2020/mozilla/simple_scroll_to_fragment.html.ini b/tests/wpt/mozilla/meta-layout-2020/mozilla/simple_scroll_to_fragment.html.ini deleted file mode 100644 index 1fb12157a34..00000000000 --- a/tests/wpt/mozilla/meta-layout-2020/mozilla/simple_scroll_to_fragment.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[simple_scroll_to_fragment.html] - expected: FAIL diff --git a/tests/wpt/web-platform-tests/.azure-pipelines.yml b/tests/wpt/web-platform-tests/.azure-pipelines.yml index efa5ee18a1d..428411d04ab 100644 --- a/tests/wpt/web-platform-tests/.azure-pipelines.yml +++ b/tests/wpt/web-platform-tests/.azure-pipelines.yml @@ -500,6 +500,7 @@ jobs: export SYSTEM_VERSION_COMPAT=0 ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel stable --kill-safari safari displayName: 'Run tests' + retryCountOnTaskFailure: 2 - task: PublishBuildArtifacts@1 displayName: 'Publish results' inputs: @@ -540,6 +541,7 @@ jobs: export SYSTEM_VERSION_COMPAT=0 ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel preview --kill-safari safari displayName: 'Run tests' + retryCountOnTaskFailure: 2 - task: PublishBuildArtifacts@1 displayName: 'Publish results' inputs: diff --git a/tests/wpt/web-platform-tests/accname/name/comp_embedded_control.html b/tests/wpt/web-platform-tests/accname/name/comp_embedded_control.html index cfcd4d21c7b..09856ef662e 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_embedded_control.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_embedded_control.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_embedded_control">#comp_embedded_control</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <label> <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded textfield" class="ex"> Flash the screen diff --git a/tests/wpt/web-platform-tests/accname/name/comp_hidden_not_referenced.html b/tests/wpt/web-platform-tests/accname/name/comp_hidden_not_referenced.html index cfaebbb502d..84a2a2ca802 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_hidden_not_referenced.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_hidden_not_referenced.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_hidden_not_referenced">#comp_hidden_not_referenced</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <h2 class="ex" data-expectedlabel="heading label" data-testname="heading with interior hidden node"> heading <span hidden>bogus</span> diff --git a/tests/wpt/web-platform-tests/accname/name/comp_host_language_label.html b/tests/wpt/web-platform-tests/accname/name/comp_host_language_label.html index d2638b1ba75..221ff0e9fb1 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_host_language_label.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_host_language_label.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_host_language_label">#comp_host_language_label</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <label for="t">label</label> <input id="t" data-expectedlabel="label" data-testname="host language: label[for] input[type=text]" class="ex"> <!-- Todo: test all remaining input types with label[for] --> diff --git a/tests/wpt/web-platform-tests/accname/name/comp_label.html b/tests/wpt/web-platform-tests/accname/name/comp_label.html index 9edd8000e94..0c057862b3b 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_label.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_label.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_label">#comp_label</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <div aria-label="label" data-expectedlabel="label" data-testname="label valid on group" role="group" class="ex">x</div> <!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_label --> diff --git a/tests/wpt/web-platform-tests/accname/name/comp_labelledby.html b/tests/wpt/web-platform-tests/accname/name/comp_labelledby.html index 8e66362d813..ab17bff1187 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_labelledby.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_labelledby.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_labelledby">#comp_labelledby</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <div role="group" aria-labelledby="h" class="ex" data-expectedlabel="div group label" data-testname="div group explicitly labelledby heading"> <h2 id="h">div group label</h2> <p>text inside div group</p> diff --git a/tests/wpt/web-platform-tests/accname/name/comp_name_from_content.html b/tests/wpt/web-platform-tests/accname/name/comp_name_from_content.html index 1390c6dcc80..0b40206a7eb 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_name_from_content.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_name_from_content.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_name_from_content">#comp_name_from_content</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <h1 data-expectedlabel="label" data-testname="heading name from content" class="ex">label</h1> <!-- diff --git a/tests/wpt/web-platform-tests/accname/name/comp_text_node.html b/tests/wpt/web-platform-tests/accname/name/comp_text_node.html index 61f51cf4edc..d63bdda82c0 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_text_node.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_text_node.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the <a href="https://w3c.github.io/accname/#comp_text_node">#comp_text_node</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <!-- I'm not certain whether #comp_text_node requires a lot of testing outside of the #comp_name_from_content contexts, --> <!-- but I did think of one example where text node versus comment node may make a difference when joining text nodes with a space vs innerText. --> diff --git a/tests/wpt/web-platform-tests/accname/name/comp_tooltip.html b/tests/wpt/web-platform-tests/accname/name/comp_tooltip.html index 52e7b43cfc5..34718bd025f 100644 --- a/tests/wpt/web-platform-tests/accname/name/comp_tooltip.html +++ b/tests/wpt/web-platform-tests/accname/name/comp_tooltip.html @@ -11,6 +11,8 @@ </head> <body> + <p>Tests the <a href="https://w3c.github.io/accname/#comp_tooltip">#comp_tooltip</a> portions of the AccName <em>Name Computation</em> algorithm.</p> + <a href="#" title="label" data-expectedlabel="label" data-testname="link label from tooltip" class="ex"><img src="#" alt=""></a> <!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_tooltip --> diff --git a/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html b/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html index ca60986d337..9746f2db47a 100644 --- a/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html +++ b/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html @@ -6,6 +6,8 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/wai-aria/scripts/aria-utils.js"></script> + <p>Tests the basic shadow DOM portions of the AccName <em>Name Computation</em> algorithm, coming in <a href="https://github.com/w3c/accname/pull/167">ARIA #167</a>.</p> + <label id="label1"> <div id="host1"></div> </label> diff --git a/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html b/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html index 9155a2eef3b..41ccd5a57f4 100644 --- a/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html +++ b/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html @@ -6,6 +6,8 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/wai-aria/scripts/aria-utils.js"></script> + <p>Tests the shadow DOM slots portions of the AccName <em>Name Computation</em> algorithm, coming in <a href="https://github.com/w3c/accname/pull/167">ARIA #167</a>.</p> + <label id="label1"> <div id="host1">slotted</div> </label> diff --git a/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js b/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js index c38e5aa59d8..bb5a63426d6 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js +++ b/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js @@ -1,4 +1,4 @@ -const EMPTY_TOPICS_HEADER = 't=(), p=P000000000000000000000000000'; +const EMPTY_TOPICS_HEADER = '();p=P0000000000000000000000000000000'; function test_topics_iframe_navigation_header( test, has_browsing_topics_attribute, is_same_origin, expect_topics_header_available_func) { diff --git a/tests/wpt/web-platform-tests/cors/basic.htm b/tests/wpt/web-platform-tests/cors/basic.htm index 85d443190db..cbdb4ca9aa7 100644 --- a/tests/wpt/web-platform-tests/cors/basic.htm +++ b/tests/wpt/web-platform-tests/cors/basic.htm @@ -43,12 +43,12 @@ function cors(desc, scheme, subdomain = "", port = location.port) { } cors("Same domain basic usage"); -cors("Cross domain basic usage", "http", "www1"); +cors("Cross domain basic usage", "http", "www1."); cors("Same domain different port", "http", undefined, PORT); -cors("Cross domain different port", "http", "www1", PORT); +cors("Cross domain different port", "http", "www1.", PORT); -cors("Cross domain different protocol", "https", "www1", PORTS); +cors("Cross domain different protocol", "https", "www1.", PORTS); cors("Same domain different protocol different port", "https", undefined, PORTS); diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width.html new file mode 100644 index 00000000000..8b05d6c1120 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<title>CSS Container Queries Test: style and size query against container without a principal box</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/cq-testcommon.js"></script> +<style> + #container { + container-type: inline-size; + display: contents; + --foo: bar; + } + @container (width >= 0px) or style(--foo: bar) { + #target { color: green; } + } +</style> +<div id="container"> + <div id="target">Should be green</div> +</div> +<script> + setup(() => assert_implements_container_queries()); + + test(() => { + assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)"); + }, "width query should evaluate to unknown and style query to true"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-variant-invalid.html b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-variant-invalid.html index c591acc3fcd..93c7d6bb56e 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-variant-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-variant-invalid.html @@ -12,6 +12,11 @@ <body> <script> test_invalid_value('font-variant', 'normal none'); +test_invalid_value('font-variant', 'none normal'); +test_invalid_value('font-variant', 'small-caps normal'); +test_invalid_value('font-variant', 'normal small-caps'); +test_invalid_value('font-variant', 'small-caps none'); +test_invalid_value('font-variant', 'none small-caps'); // <common-lig-values> test_invalid_value('font-variant', 'common-ligatures no-common-ligatures'); diff --git a/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize-ref.html b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize-ref.html new file mode 100644 index 00000000000..71968864924 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize-ref.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + +<head> +<meta charset="utf-8"> +<link rel="author" title="Brandon Stewart" href="mailto:brandonstewart@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-3"> +<meta name="assert" content="When the height of an element in the grid changes, ensure the grid is properly resized"> +</head> + +<style> + grid { + display: grid; + grid-template-rows: masonry; + grid-template-columns: auto; + grid-gap: 10px; + border: 10px; + border-style: solid; + } + item1 { + background-color: grey; + height: 125px; + width: 250px; + } + item2 { + background-color: grey; + height: 250px; + width: 250px; + } +</style> +</head> +<body> + <grid> + <item1>1</item1> + <item2>2</item2> + </grid> +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize.html b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize.html new file mode 100644 index 00000000000..06c2901f27b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/track-sizing/masonry-track-sizing-check-grid-height-on-resize.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> + +<head> +<meta charset="utf-8"> +<link rel="author" title="Brandon Stewart" href="mailto:brandonstewart@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-3"> +<link rel="match" href="masonry-track-sizing-check-grid-height-on-resize-ref.html"> +<meta name="assert" content="When the height of an element in the grid changes, ensure the grid is properly resized"> +</head> + +<style> + grid { + display: grid; + grid-template-rows: masonry; + grid-template-columns: auto; + grid-gap: 10px; + border: 10px; + border-style: solid; + } + item { + background-color: grey; + height: 250px; + width: 250px; + } +</style> +</head> +<body> + <grid> + <item>1</item> + <item>2</item> + </grid> +</body> +<script> + /* Force a relayout */ + document.body.offsetHeight; + document.querySelector("item").style["height"] = "125px"; +</script> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-highlight-painting-underline-offset-001.html b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-highlight-painting-underline-offset-001.html index 14b238ce170..534438089ca 100644 --- a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-highlight-painting-underline-offset-001.html +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-highlight-painting-underline-offset-001.html @@ -5,6 +5,7 @@ <link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> <link rel="match" href="css-highlight-painting-underline-offset-001-ref.html"> <meta name="assert" content="Verify that text-underline-offset works in a ::highlight pseudo-element."> +<meta name="fuzzy" content="0-56;0-10"> <style> ::highlight(example) { text-decoration: wavy underline green 5px; diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001-ref.html b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001-ref.html new file mode 100644 index 00000000000..5e9ef645798 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Highlight API Test: ::target-text text-decoration - reference</title> +<style> + #target-text { + text-decoration: wavy underline overline green 5px; + text-underline-offset: 20px; + } + div { + border: solid 1px black; + padding: 50px; + } +</style> +<div id="upper">The word <span id="target-text">remain</span> has under/over lines.</div> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001.html b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001.html new file mode 100644 index 00000000000..fa76c0bc4e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/css-target-text-decoration-001.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Highlight API Test: ::target-text text-decoration</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="match" href="css-target-text-decoration-001-ref.html"> +<meta name="assert" content="This test checks that text-decorations of target text are fully rendered."> +<meta name="fuzzy" content="0-60;0-32"> +<script src="/common/reftest-wait.js"></script> +<style> + ::target-text { + text-decoration: wavy underline overline green 5px; + text-underline-offset: 20px; + background-color: transparent; + } + div { + border: solid 1px black; + padding: 50px; + } +</style> +<div id="upper">The word remain has under/over lines.</div> +<script> + window.location.href = `css-target-text-decoration-001.html#:~:text=remain`; + requestAnimationFrame(() => takeScreenshot()); +</script> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001-ref.html b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001-ref.html new file mode 100644 index 00000000000..a5ec6a59ae0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Highlight API Test: ::highlight dynamic remove text decoration - reference</title> +<style> + #upper { + text-decoration: wavy underline overline green 5px; + text-underline-offset: 20px; + } + div { + border: solid 1px black; + padding: 50px; + } +</style> +<div id="upper">This line starts with under/over lines that remain.</div> +<div id="lower">This line starts with under/over lines that are removed.</div> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001.html b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001.html new file mode 100644 index 00000000000..d885424765d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-highlight-api/painting/invalidation/css-highlight-invalidation-001.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Highlight API Test: ::highlight dynamic change text-decoration</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="match" href="css-highlight-invalidation-001-ref.html"> +<meta name="assert" content="This test checks that it's possible to modify dynamically the text-decoration of a custom highlight through ::highlight pseudo-element."> +<meta name="fuzzy" content="0-56;0-10"> +<script src="/common/reftest-wait.js"></script> +<style> + ::highlight(example) { + text-decoration: wavy underline overline green 5px; + text-underline-offset: 20px; + } + div { + border: solid 1px black; + padding: 50px; + } +</style> +<div id="upper">This line starts with under/over lines that remain.</div> +<div id="lower">This line starts with under/over lines that are removed.</div> +<script> + let range_upper = new Range(); + range_upper.setStart(upper, 0); + range_upper.setEnd(upper, 1); + let range_lower = new Range(); + range_lower.setStart(lower, 0); + range_lower.setEnd(lower, 1); + CSS.highlights.set(`example`, new Highlight(range_lower)); + + requestAnimationFrame(() => requestAnimationFrame(() => { + CSS.highlights.set(`example`, new Highlight(range_upper)); + requestAnimationFrame(() => takeScreenshot()); + })); +</script> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-lists/parsing/list-style-computed.sub.html b/tests/wpt/web-platform-tests/css/css-lists/parsing/list-style-computed.sub.html index 611fae5bf93..f86915831e0 100644 --- a/tests/wpt/web-platform-tests/css/css-lists/parsing/list-style-computed.sub.html +++ b/tests/wpt/web-platform-tests/css/css-lists/parsing/list-style-computed.sub.html @@ -12,11 +12,11 @@ <body> <div id="target"></div> <script> -test_computed_value('list-style', 'none', 'outside none none'); +test_computed_value('list-style', 'outside none none', 'none'); -test_computed_value('list-style', 'inside', 'inside none disc'); -test_computed_value('list-style', 'url("https://{{host}}/")', 'outside url("https://{{host}}/") disc'); -test_computed_value('list-style', 'square', 'outside none square'); +test_computed_value('list-style', 'inside none disc', 'inside'); +test_computed_value('list-style', 'outside url("https://{{host}}/") disc', 'url("https://{{host}}/")'); +test_computed_value('list-style', 'outside none square', 'square'); test_computed_value('list-style', 'inside url("https://{{host}}/") square'); </script> diff --git a/tests/wpt/web-platform-tests/css/css-masking/animations/clip-path-composition.html b/tests/wpt/web-platform-tests/css/css-masking/animations/clip-path-composition.html index 2275ae70a33..42c5988e045 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/animations/clip-path-composition.html +++ b/tests/wpt/web-platform-tests/css/css-masking/animations/clip-path-composition.html @@ -92,8 +92,8 @@ test_composition({ addFrom: 'ellipse()', addTo: 'ellipse(closest-side farthest-side)', }, [ - {at: 0.25, expect: 'ellipse(at 50% 50%)'}, - {at: 0.75, expect: 'ellipse(closest-side farthest-side at 50% 50%)'}, + {at: 0.25, expect: 'ellipse()'}, + {at: 0.75, expect: 'ellipse(closest-side farthest-side)'}, ]); test_composition({ diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/interpolation.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/interpolation.html index da3981feed6..f580de9c769 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/interpolation.html @@ -28,7 +28,7 @@ test(function(t) { getComputedStyle(div).clipPath; div.style.clipPath = 'circle(26px)'; - assert_equals(getComputedStyle(div).clipPath, 'circle(0px at 50% 50%)', + assert_equals(getComputedStyle(div).clipPath, 'circle(0px)', 'The radius of circle is clamped to zero at 61%'); }, 'Test circle with negative easing on clip-path'); @@ -40,7 +40,7 @@ test(function(t) { getComputedStyle(div).clipPath; div.style.clipPath = 'ellipse(26px 26px)'; - assert_equals(getComputedStyle(div).clipPath, 'ellipse(0px 0px at 50% 50%)', + assert_equals(getComputedStyle(div).clipPath, 'ellipse(0px 0px)', 'The radius of ellipse is clamped to zero at 61%'); }, 'Test ellipse with negative easing on clip-path'); diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html index 895cdfacac6..fd268b42916 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html +++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-path-valid.html @@ -25,15 +25,15 @@ test_valid_value("clip-path", "inset(0px round 0px 1px 2%)"); test_valid_value("clip-path", "inset(0px round 0px 1px 2% 3em)"); test_valid_value("clip-path", "inset(10px round 20% / 0px 1px 2% 3em)"); -test_valid_value("clip-path", "circle()", "circle(at 50% 50%)"); -test_valid_value("clip-path", "circle(1px)", "circle(1px at 50% 50%)"); -test_valid_value("clip-path", "circle(closest-side)", "circle(at 50% 50%)"); +test_valid_value("clip-path", "circle()"); +test_valid_value("clip-path", "circle(1px)", "circle(1px)"); +test_valid_value("clip-path", "circle(closest-side)", "circle()"); test_valid_value("clip-path", "circle(at 10% 20%)"); test_valid_value("clip-path", "circle(farthest-side at center top)", "circle(farthest-side at 50% 0%)"); test_valid_value("clip-path", "circle(4% at top right)", "circle(4% at 100% 0%)"); -test_valid_value("clip-path", "ellipse()", "ellipse(at 50% 50%)"); -test_valid_value("clip-path", "ellipse(1px closest-side)", "ellipse(1px closest-side at 50% 50%)"); +test_valid_value("clip-path", "ellipse()"); +test_valid_value("clip-path", "ellipse(1px closest-side)"); test_valid_value("clip-path", "ellipse(at 10% 20%)"); test_valid_value("clip-path", "ellipse(closest-side closest-side at 10% 20%)", "ellipse(at 10% 20%)"); test_valid_value("clip-path", "ellipse(farthest-side 4% at bottom left)", "ellipse(farthest-side 4% at 0% 100%)"); diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-user-agent-rules.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-user-agent-rules.html new file mode 100644 index 00000000000..427eb8f7e40 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-user-agent-rules.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/pull/9093"> +<link rel=help href="https://drafts.csswg.org/css-position-4/#overlay"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<title>CSS Position Test: User agent style for overlay</title> + +<style> +div { + overlay: auto; +} +</style> + +<body> +<script> +test(() => { + const div = document.createElement('div'); + document.body.appendChild(div); + div.style.overlay = 'auto'; + assert_equals(getComputedStyle(div).overlay, 'none'); +}, 'HTML elements should have overlay:none !important from the user-agent.'); + +test(() => { + const svg = document.createElement('svg'); + document.body.appendChild(svg); + svg.style.overlay = 'auto'; + assert_equals(getComputedStyle(svg).overlay, 'none'); +}, 'SVG elements should have overlay:none !important from the user-agent.'); + +test(() => { + const nullNamespace = document.createElementNS(null, 'div'); + document.body.appendChild(nullNamespace); + assert_equals(getComputedStyle(nullNamespace).overlay, 'none'); +}, 'Null namespace elements should have overlay:none !important from the user-agent.'); + +test(() => { + const weirdNamespace = document.createElementNS('hello world', 'div'); + document.body.appendChild(weirdNamespace); + assert_equals(getComputedStyle(weirdNamespace).overlay, 'none'); +}, 'Arbitrary namespace elements should have overlay:none !important from the user-agent.'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-digraph.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-digraph.html index b9bc10016d7..b539457cf0c 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-digraph.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-letter-digraph.html @@ -26,7 +26,6 @@ <p>IJsselmeer</p> <p>ijsselmeer</p> <p>“IJsselmeer”</p> - <p>Ijsselmeer</p> <!-- mixed case within the digraph is unlikely in practice --> </div> <div lang="en"> <p lang="nl-NL">IJsselmeer</p> <!-- lang tag with country code should also work --> @@ -37,7 +36,9 @@ <p>IJsselmeer</p> <p>ijsselmeer</p> <p>“IJsselmeer”</p> - <p>Ijsselmeer</p> + </div> + <div lang="nl"> + <p>Ijotalen</p> <!-- mixed case not treated as digraph --> </div> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/reference/first-letter-digraph-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/reference/first-letter-digraph-ref.html index 7dbefc9dbdb..4eef817d706 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/reference/first-letter-digraph-ref.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/reference/first-letter-digraph-ref.html @@ -23,7 +23,6 @@ <p><span>IJ</span>sselmeer</p> <p><span>ij</span>sselmeer</p> <p><span>“IJ</span>sselmeer”</p> - <p><span>Ij</span>sselmeer</p> </div> <div lang="en"> <p lang="nl-NL"><span>IJ</span>sselmeer</p> @@ -34,7 +33,9 @@ <p><span>I</span>Jsselmeer</p> <p><span>i</span>jsselmeer</p> <p><span>“I</span>Jsselmeer”</p> - <p><span>I</span>jsselmeer</p> + </div> + <div lang="nl"> + <p><span>I</span>jotalen</p> <!-- mixed case not treated as digraph --> </div> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/adjustments-in-scroll-event-handler.tentative.html b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/adjustments-in-scroll-event-handler.tentative.html new file mode 100644 index 00000000000..84fd79cbcb9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/adjustments-in-scroll-event-handler.tentative.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<meta name="viewport" content="width=device-width"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/"> +<style> + body { margin: 0 } + .content { + height: 200px; + background: lightblue; + } + .spacer { + height: 300vh; + } +</style> +<div class="content"></div> +<div class="content" style="background: green"></div> +<div class="spacer"></div> +<script> +const anchor = document.querySelectorAll(".content")[1]; + +const t = async_test("Scroll adjustments happen even if it's triggered from scroll event listeners"); +window.addEventListener("scroll", t.step_func(function() { + // Forcibly flush layout, this will flush the pending the node insertion. + let scrollPosition = window.scrollY; + + requestAnimationFrame(t.step_func(function() { + requestAnimationFrame(t.step_func(function() { + assert_equals(window.scrollY, 400); + t.done(); + })); + })); +}), { once: true }); + +window.onload = t.step_func(function() { + requestAnimationFrame(t.step_func(function() { + // Scroll to the anchor node in a requestAnimationFrame callback so that + // it queues a scroll event which will be fired in the next event loop. + anchor.scrollIntoView({ behavior: "instant" }); + + // Then in a setTimeout callback insert an element just right before the + // anchor node, it will run before firing the scroll event. + t.step_timeout(function() { + const content = document.createElement("div"); + content.classList.add("content"); + content.style.background = "red"; + anchor.before(content); + }, 0); + })); +}); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/infinite-scroll-event.tentative.html b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/infinite-scroll-event.tentative.html index 4bc222f4e72..e2a2998c52b 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/infinite-scroll-event.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/infinite-scroll-event.tentative.html @@ -18,20 +18,23 @@ <div class="content"></div> <div class="content"></div> <script> -let first = true; -const t = async_test("Scroll adjustments don't happen if triggered from scroll event listeners"); +let count = 0; +const t = async_test("Scroll adjustments don't keep happening with 0-length adjustments triggered by a single scroll operation"); onscroll = t.step_func(function() { - assert_true(first, "Should only get one event"); - first = false; + ++count; hidden.style.display = "block"; hidden.offsetTop; hidden.style.display = "none"; + let currentCount = count; requestAnimationFrame(t.step_func(function() { requestAnimationFrame(t.step_func(function() { - t.done(); + if (currentCount == count) { + t.done(); + } })); })); }); + window.onload = t.step_func(function() { window.scrollTo(0, document.documentElement.scrollHeight); window.scrollBy(0, -200); diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color-ref.html b/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color-ref.html new file mode 100644 index 00000000000..389cf34b716 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color-ref.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Reference</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev"> +<input> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color.html b/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color.html new file mode 100644 index 00000000000..fa03b1391e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/input-scrollbar-color.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Test: scrollbar-color shouldn't cause scrollbars in inputs</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev"> +<link rel="help" href="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color"> +<link rel="match" href="input-scrollbar-color-ref.html"> +<style> + :root { + scrollbar-color: red yellow; + } +</style> +<input> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-009.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-009.html new file mode 100644 index 00000000000..494ffe34469 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-009.html @@ -0,0 +1,60 @@ +<meta charset="utf-8"> +<title>CSS Scrollbars: scrollbar-width on the body is not propagated quirks mode</title> +<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> +<link rel="help" href="https://drafts.csswg.org/css-scrollbars-1/" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<style> + :root { + /* CSS scrollbar properties applied to the root element + will be propagated to the viewport. */ + scrollbar-width: thin; + overflow: visible; + } + + body { + /* overflow is propagated as well */ + overflow: scroll; + /* but CSS scrollbar properties applied to the body are not propagated */ + scrollbar-width: none; + } + + :root, + body { + margin: 0; + padding: 0; + } + + #content { + height: 10vh; + width: 100%; + background: lightsalmon; + } + + #expander { + /* force vertical scroll */ + height: 200vh; + width: 300px; + background: gray; + } +</style> + +<body> + + <div id="content"></div> + + <div id="expander"></div> + + <script> + test(function () { + let root = document.documentElement; + let body = document.body; + let content = document.getElementById('content'); + + assert_less_than(root.offsetWidth, window.innerWidth, "viewport has a scrollbar"); + assert_equals(body.offsetWidth, root.offsetWidth, "body matches root"); + assert_equals(content.offsetWidth, body.offsetWidth, "content matches body"); + }, "viewport displays a scrollbar"); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-shapes/animation/shape-outside-composition.html b/tests/wpt/web-platform-tests/css/css-shapes/animation/shape-outside-composition.html index 0115148ec1a..c1c29f1aa94 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/animation/shape-outside-composition.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/animation/shape-outside-composition.html @@ -92,8 +92,8 @@ test_composition({ addFrom: 'ellipse()', addTo: 'ellipse(closest-side farthest-side)', }, [ - {at: 0.25, expect: 'ellipse(at 50% 50%)'}, - {at: 0.75, expect: 'ellipse(closest-side farthest-side at 50% 50%)'}, + {at: 0.25, expect: 'ellipse()'}, + {at: 0.75, expect: 'ellipse(closest-side farthest-side)'}, ]); test_composition({ diff --git a/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html b/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html index 5e4842d234f..715593d47b1 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-circle-ellipse-serialization.html @@ -25,14 +25,14 @@ checkEquals("ellipse(at right calc(10% + 5px))", "ellipse(at 100% calc(10% + 5px))"); // Only 2 or 4 value form allowed -checkEquals("circle()", "circle(at 50% 50%)"); -checkEquals("circle(0px)", "circle(0px at 50% 50%)"); -checkEquals("circle(closest-side)", "circle(at 50% 50%)"); +checkEquals("circle()", "circle()"); +checkEquals("circle(0px)", "circle(0px)"); +checkEquals("circle(closest-side)", "circle()"); checkEquals("circle(farthest-side)", - "circle(farthest-side at 50% 50%)"); -checkEquals("ellipse()", "ellipse(at 50% 50%)"); + "circle(farthest-side)"); +checkEquals("ellipse()", "ellipse()"); checkEquals("ellipse(closest-side farthest-side)", - "ellipse(closest-side farthest-side at 50% 50%)"); + "ellipse(closest-side farthest-side)"); checkEquals("circle(at top 0% right 5px)", "circle(at right 5px top 0%)"); diff --git a/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-interpolation.html b/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-interpolation.html index beea230697f..5617ea28634 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/basic-shape-interpolation.html @@ -29,7 +29,7 @@ test(function(t) { getComputedStyle(div).shapeOutside; div.style.shapeOutside = 'circle(26px)'; - assert_equals(getComputedStyle(div).shapeOutside, 'circle(0px at 50% 50%)', + assert_equals(getComputedStyle(div).shapeOutside, 'circle(0px)', 'The radius of circle is clamped to zero at 61%'); }, 'Test circle with negative easing on shape-outside'); @@ -42,7 +42,7 @@ test(function(t) { div.style.shapeOutside = 'ellipse(26px 26px)'; assert_equals(getComputedStyle(div).shapeOutside, - 'ellipse(0px 0px at 50% 50%)', + 'ellipse(0px 0px)', 'The radius of ellipse is clamped to zero at 61%'); }, 'Test ellipse with negative easing on shape-outside'); diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html index c48974406b2..e5587c6b233 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid.html @@ -25,17 +25,17 @@ test_valid_value("shape-outside", "inset(0px round 0px 1px 2%)"); test_valid_value("shape-outside", "inset(0px round 0px 1px 2% 3em)"); test_valid_value("shape-outside", "inset(10px round 20% / 0px 1px 2% 3em)"); -test_valid_value("shape-outside", "circle()", "circle(at 50% 50%)"); -test_valid_value("shape-outside", "circle(1px)", "circle(1px at 50% 50%)"); -test_valid_value("shape-outside", "circle(closest-side)", "circle(at 50% 50%)"); +test_valid_value("shape-outside", "circle()"); +test_valid_value("shape-outside", "circle(1px)"); +test_valid_value("shape-outside", "circle(closest-side)", "circle()"); test_valid_value("shape-outside", "circle(at 10% 20%)"); test_valid_value("shape-outside", "circle(farthest-side at center top)", "circle(farthest-side at 50% 0%)"); test_valid_value("shape-outside", "circle(4% at top right)", "circle(4% at 100% 0%)"); -test_valid_value("shape-outside", "ellipse()", "ellipse(at 50% 50%)"); -test_valid_value("shape-outside", "ellipse(3% 2%)", "ellipse(3% 2% at 50% 50%)"); -test_valid_value("shape-outside", "ellipse(closest-side 1px)", "ellipse(closest-side 1px at 50% 50%)"); -test_valid_value("shape-outside", "ellipse(10% closest-side)", "ellipse(10% closest-side at 50% 50%)"); +test_valid_value("shape-outside", "ellipse()", "ellipse()"); +test_valid_value("shape-outside", "ellipse(3% 2%)"); +test_valid_value("shape-outside", "ellipse(closest-side 1px)"); +test_valid_value("shape-outside", "ellipse(10% closest-side)"); test_valid_value("shape-outside", "ellipse(closest-side closest-side at 60% 70%)", "ellipse(at 60% 70%)"); test_valid_value("shape-outside", "ellipse(at 10% 20%)"); test_valid_value("shape-outside", "ellipse(farthest-side 4% at bottom left)", "ellipse(farthest-side 4% at 0% 100%)"); diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-000.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-000.html index a13570c1ff2..e2c735b3bbf 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-000.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-000.html @@ -21,14 +21,14 @@ { "name": "No arguments", "actual": "circle()", - "expected_inline": "circle(at 50% 50%)", - "expected_computed": "circle(at 50% 50%)" + "expected_inline": "circle()", + "expected_computed": "circle()" }, { "name": "Radial argument only", "actual": "circle(50px)", - "expected_inline": "circle(50px at 50% 50%)", - "expected_computed": "circle(50px at 50% 50%)" + "expected_inline": "circle(50px)", + "expected_computed": "circle(50px)" }, { "name": "Position argument only", diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-006.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-006.html index 2fe988d6268..15308ed9d12 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-006.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-006.html @@ -20,44 +20,84 @@ <script type="text/javascript"> var valid_circle_radii_tests = [ { - "actual": "circle(+10px)", + "actual": "circle(+10px at 50% 50%)", "expected_inline": "circle(10px at 50% 50%)", "expected_computed": "circle(10px at 50% 50%)" }, { - "actual": "circle(+10.00px)", + "actual": "circle(+10.00px at 50% 50%)", "expected_inline": "circle(10px at 50% 50%)", "expected_computed": "circle(10px at 50% 50%)" }, { - "actual": "circle(+20.340px)", + "actual": "circle(+20.340px at 50% 50%)", "expected_inline": "circle(20.34px at 50% 50%)", "expected_computed": "circle(20.34px at 50% 50%)" }, { - "actual": "circle(+30.5px)", + "actual": "circle(+30.5px at 50% 50%)", "expected_inline": "circle(30.5px at 50% 50%)", "expected_computed": "circle(30.5px at 50% 50%)" }, { - "actual": "circle(+10%)", + "actual": "circle(+10% at 50% 50%)", "expected_inline": "circle(10% at 50% 50%)", "expected_computed": "circle(10% at 50% 50%)" }, { - "actual": "circle(+10.00%)", + "actual": "circle(+10.00% at 50% 50%)", "expected_inline": "circle(10% at 50% 50%)", "expected_computed": "circle(10% at 50% 50%)" }, { - "actual": "circle(+20.350%)", + "actual": "circle(+20.350% at 50% 50%)", "expected_inline": "circle(20.35% at 50% 50%)", "expected_computed": "circle(20.35% at 50% 50%)" }, { - "actual": "circle(+30.5%)", + "actual": "circle(+30.5% at 50% 50%)", "expected_inline": "circle(30.5% at 50% 50%)", "expected_computed": "circle(30.5% at 50% 50%)" + }, + { + "actual": "circle(+10px)", + "expected_inline": "circle(10px)", + "expected_computed": "circle(10px)" + }, + { + "actual": "circle(+10.00px)", + "expected_inline": "circle(10px)", + "expected_computed": "circle(10px)" + }, + { + "actual": "circle(+20.340px)", + "expected_inline": "circle(20.34px)", + "expected_computed": "circle(20.34px)" + }, + { + "actual": "circle(+30.5px)", + "expected_inline": "circle(30.5px)", + "expected_computed": "circle(30.5px)" + }, + { + "actual": "circle(+10%)", + "expected_inline": "circle(10%)", + "expected_computed": "circle(10%)" + }, + { + "actual": "circle(+10.00%)", + "expected_inline": "circle(10%)", + "expected_computed": "circle(10%)" + }, + { + "actual": "circle(+20.350%)", + "expected_inline": "circle(20.35%)", + "expected_computed": "circle(20.35%)" + }, + { + "actual": "circle(+30.5%)", + "expected_inline": "circle(30.5%)", + "expected_computed": "circle(30.5%)" } ]; invalid_circle_radii_tests = [ diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010.html index 6d6c11a7071..609632e11ac 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010.html @@ -20,7 +20,7 @@ <script type="text/javascript"> var circle_calc_tests = []; ParsingUtils.calcTestValues.forEach(function(value) { - testCase = ['circle('+ value[0] +')', 'circle('+ value[1] + ' at 50% 50%)']; + testCase = ['circle('+ value[0] + ' at 50% 50%)', 'circle('+ value[1] + ' at 50% 50%)']; if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) { testCase.push([ 'circle('+ value[2][0] + ' at 50% 50%)', 'circle('+ value[2][1] + ' at 50% 50%)']); } else { diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-000.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-000.html index 532f794448c..d74ed97a766 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-000.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-000.html @@ -21,14 +21,14 @@ { "name": "No arguments", "actual": "ellipse()", - "expected_inline": "ellipse(at 50% 50%)", - "expected_computed": "ellipse(at 50% 50%)" + "expected_inline": "ellipse()", + "expected_computed": "ellipse()" }, { "name": "Radial arguments", "actual": "ellipse(50px 50px)", - "expected_inline": "ellipse(50px 50px at 50% 50%)", - "expected_computed": "ellipse(50px 50px at 50% 50%)" + "expected_inline": "ellipse(50px 50px)", + "expected_computed": "ellipse(50px 50px)" }, { "name": "Position argument", diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-006.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-006.html index 4bd75a445a6..69cd8aca78b 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-006.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-006.html @@ -21,61 +21,121 @@ var valid_ellipse_radii_tests = [ { "actual": "ellipse(+10px +20px)", + "expected_inline": "ellipse(10px 20px)", + "expected_computed": "ellipse(10px 20px)" + }, + { + "actual": "ellipse(+30px 40px)", + "expected_inline": "ellipse(30px 40px)", + "expected_computed": "ellipse(30px 40px)" + }, + { + "actual": "ellipse(50px +60px)", + "expected_inline": "ellipse(50px 60px)", + "expected_computed": "ellipse(50px 60px)" + }, + { + "actual": "ellipse(+10.00px +20.230px)", + "expected_inline": "ellipse(10px 20.23px)", + "expected_computed": "ellipse(10px 20.23px)" + }, + { + "actual": "ellipse(+30.00px 40.567px)", + "expected_inline": "ellipse(30px 40.567px)", + "expected_computed": "ellipse(30px 40.567px)" + }, + { + "actual": "ellipse(50.10px +60.7px)", + "expected_inline": "ellipse(50.1px 60.7px)", + "expected_computed": "ellipse(50.1px 60.7px)" + }, + { + "actual": "ellipse(+10% +20%)", + "expected_inline": "ellipse(10% 20%)", + "expected_computed": "ellipse(10% 20%)" + }, + { + "actual": "ellipse(+30% 40%)", + "expected_inline": "ellipse(30% 40%)", + "expected_computed": "ellipse(30% 40%)" + }, + { + "actual": "ellipse(+50% +60%)", + "expected_inline": "ellipse(50% 60%)", + "expected_computed": "ellipse(50% 60%)" + }, + { + "actual": "ellipse(+10.00% +20.230%)", + "expected_inline": "ellipse(10% 20.23%)", + "expected_computed": "ellipse(10% 20.23%)" + }, + { + "actual": "ellipse(+30.00% 40.567%)", + "expected_inline": "ellipse(30% 40.567%)", + "expected_computed": "ellipse(30% 40.567%)" + }, + { + "actual": "ellipse(50.10% +60.7%)", + "expected_inline": "ellipse(50.1% 60.7%)", + "expected_computed": "ellipse(50.1% 60.7%)" + }, + { + "actual": "ellipse(+10px +20px at 50% 50%)", "expected_inline": "ellipse(10px 20px at 50% 50%)", "expected_computed": "ellipse(10px 20px at 50% 50%)" }, { - "actual": "ellipse(+30px 40px)", + "actual": "ellipse(+30px 40px at 50% 50%)", "expected_inline": "ellipse(30px 40px at 50% 50%)", "expected_computed": "ellipse(30px 40px at 50% 50%)" }, { - "actual": "ellipse(50px +60px)", + "actual": "ellipse(50px +60px at 50% 50%)", "expected_inline": "ellipse(50px 60px at 50% 50%)", "expected_computed": "ellipse(50px 60px at 50% 50%)" }, { - "actual": "ellipse(+10.00px +20.230px)", + "actual": "ellipse(+10.00px +20.230px at 50% 50%)", "expected_inline": "ellipse(10px 20.23px at 50% 50%)", "expected_computed": "ellipse(10px 20.23px at 50% 50%)" }, { - "actual": "ellipse(+30.00px 40.567px)", + "actual": "ellipse(+30.00px 40.567px at 50% 50%)", "expected_inline": "ellipse(30px 40.567px at 50% 50%)", "expected_computed": "ellipse(30px 40.567px at 50% 50%)" }, { - "actual": "ellipse(50.10px +60.7px)", + "actual": "ellipse(50.10px +60.7px at 50% 50%)", "expected_inline": "ellipse(50.1px 60.7px at 50% 50%)", "expected_computed": "ellipse(50.1px 60.7px at 50% 50%)" }, { - "actual": "ellipse(+10% +20%)", + "actual": "ellipse(+10% +20% at 50% 50%)", "expected_inline": "ellipse(10% 20% at 50% 50%)", "expected_computed": "ellipse(10% 20% at 50% 50%)" }, { - "actual": "ellipse(+30% 40%)", + "actual": "ellipse(+30% 40% at 50% 50%)", "expected_inline": "ellipse(30% 40% at 50% 50%)", "expected_computed": "ellipse(30% 40% at 50% 50%)" }, { - "actual": "ellipse(+50% +60%)", + "actual": "ellipse(+50% +60% at 50% 50%)", "expected_inline": "ellipse(50% 60% at 50% 50%)", "expected_computed": "ellipse(50% 60% at 50% 50%)" }, { - "actual": "ellipse(+10.00% +20.230%)", + "actual": "ellipse(+10.00% +20.230% at 50% 50%)", "expected_inline": "ellipse(10% 20.23% at 50% 50%)", "expected_computed": "ellipse(10% 20.23% at 50% 50%)" }, { - "actual": "ellipse(+30.00% 40.567%)", + "actual": "ellipse(+30.00% 40.567% at 50% 50%)", "expected_inline": "ellipse(30% 40.567% at 50% 50%)", "expected_computed": "ellipse(30% 40.567% at 50% 50%)" }, { - "actual": "ellipse(50.10% +60.7%)", + "actual": "ellipse(50.10% +60.7% at 50% 50%)", "expected_inline": "ellipse(50.1% 60.7% at 50% 50%)", "expected_computed": "ellipse(50.1% 60.7% at 50% 50%)" } diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html index 07cd1e593b7..430d2621baf 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html @@ -21,7 +21,7 @@ var ellipse_calc_tests = []; var defaultPosition = ' at 50% 50%'; ParsingUtils.calcTestValues.forEach(function(value) { - testCase = ['ellipse(farthest-side '+ value[0] +')', + testCase = ['ellipse(farthest-side '+ value[0] + defaultPosition + ')', 'ellipse(farthest-side '+ value[1] + defaultPosition +')']; if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) { testCase.push([ @@ -34,7 +34,7 @@ ellipse_calc_tests.push(testCase); }); ParsingUtils.calcTestValues.forEach(function(value) { - testCase = ['ellipse('+ value[0] +' '+ value[0] +')', + testCase = ['ellipse('+ value[0] +' '+ value[0] + defaultPosition + ')', 'ellipse('+ value[1] +' '+ value[1] + defaultPosition +')']; if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) { testCase.push([ diff --git a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/support/parsing-utils.js b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/support/parsing-utils.js index b7c637746e0..354a64b53f5 100644 --- a/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/support/parsing-utils.js +++ b/tests/wpt/web-platform-tests/css/css-shapes/shape-outside/values/support/parsing-utils.js @@ -735,31 +735,54 @@ var invalidPositions = [ // valid radii values for circle + ellipse // [value, expected_inline, [expected_computed?]] var validCircleRadii = [ - ['', 'at 50% 50%', 'at 50% 50%'], - ['50u1', '50u1 at 50% 50%'], - ['50%', '50% at 50% 50%'], - ['closest-side', 'at 50% 50%'], - ['farthest-side', 'farthest-side at 50% 50%'] + ['at 50% 50%', 'at 50% 50%'], + ['50u1 at 50% 50%', '50u1 at 50% 50%'], + ['50% at 50% 50%', '50% at 50% 50%'], + ['closest-side at 50% 50%', 'at 50% 50%'], + ['farthest-side at 50% 50%', 'farthest-side at 50% 50%'], + ['', ''], + ['50u1', '50u1'], + ['50%', '50%'], + ['closest-side', ''], + ['farthest-side', 'farthest-side'] ] var validEllipseRadii = [ - ['', 'at 50% 50%', 'at 50% 50%'], - ['50u1 100u1', '50u1 100u1 at 50% 50%'], - ['100u1 100px', '100u1 100px at 50% 50%'], - ['25% 50%', '25% 50% at 50% 50%'], - ['50u1 25%', '50u1 25% at 50% 50%'], - ['25% 50u1', '25% 50u1 at 50% 50%'], - ['25% closest-side', '25% closest-side at 50% 50%'], - ['25u1 closest-side', '25u1 closest-side at 50% 50%'], - ['closest-side 75%', 'closest-side 75% at 50% 50%'], - ['closest-side 75u1', 'closest-side 75u1 at 50% 50%'], - ['25% farthest-side', '25% farthest-side at 50% 50%'], - ['25u1 farthest-side', '25u1 farthest-side at 50% 50%'], - ['farthest-side 75%', 'farthest-side 75% at 50% 50%'], - ['farthest-side 75u1', 'farthest-side 75u1 at 50% 50%'], - ['closest-side closest-side', 'at 50% 50%'], - ['farthest-side farthest-side', 'farthest-side farthest-side at 50% 50%'], - ['closest-side farthest-side', 'closest-side farthest-side at 50% 50%'], - ['farthest-side closest-side', 'farthest-side closest-side at 50% 50%'] + ['at 50% 50%', 'at 50% 50%', 'at 50% 50%'], + ['50u1 100u1 at 50% 50%', '50u1 100u1 at 50% 50%'], + ['100u1 100px at 50% 50%', '100u1 100px at 50% 50%'], + ['25% 50% at 50% 50%', '25% 50% at 50% 50%'], + ['50u1 25% at 50% 50%', '50u1 25% at 50% 50%'], + ['25% 50u1 at 50% 50%', '25% 50u1 at 50% 50%'], + ['25% closest-side at 50% 50%', '25% closest-side at 50% 50%'], + ['25u1 closest-side at 50% 50%', '25u1 closest-side at 50% 50%'], + ['closest-side 75% at 50% 50%', 'closest-side 75% at 50% 50%'], + ['closest-side 75u1 at 50% 50%', 'closest-side 75u1 at 50% 50%'], + ['25% farthest-side at 50% 50%', '25% farthest-side at 50% 50%'], + ['25u1 farthest-side at 50% 50%', '25u1 farthest-side at 50% 50%'], + ['farthest-side 75% at 50% 50%', 'farthest-side 75% at 50% 50%'], + ['farthest-side 75u1 at 50% 50%', 'farthest-side 75u1 at 50% 50%'], + ['closest-side closest-side at 50% 50%', 'at 50% 50%'], + ['farthest-side farthest-side at 50% 50%', 'farthest-side farthest-side at 50% 50%'], + ['closest-side farthest-side at 50% 50%', 'closest-side farthest-side at 50% 50%'], + ['farthest-side closest-side at 50% 50%', 'farthest-side closest-side at 50% 50%'], + ['', ''], + ['50u1 100u1', '50u1 100u1'], + ['100u1 100px', '100u1 100px'], + ['25% 50%', '25% 50%'], + ['50u1 25%', '50u1 25%'], + ['25% 50u1', '25% 50u1'], + ['25% closest-side', '25% closest-side'], + ['25u1 closest-side', '25u1 closest-side'], + ['closest-side 75%', 'closest-side 75%'], + ['closest-side 75u1', 'closest-side 75u1'], + ['25% farthest-side', '25% farthest-side'], + ['25u1 farthest-side', '25u1 farthest-side'], + ['farthest-side 75%', 'farthest-side 75%'], + ['farthest-side 75u1', 'farthest-side 75u1'], + ['closest-side closest-side', ''], + ['farthest-side farthest-side', 'farthest-side farthest-side'], + ['closest-side farthest-side', 'closest-side farthest-side'], + ['farthest-side closest-side', 'farthest-side closest-side'] ] var validInsets = [ diff --git a/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-005.html b/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-005.html index 9924106f4b7..13de65d8a73 100644 --- a/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-005.html +++ b/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-005.html @@ -110,6 +110,32 @@ {at: 2, expect: 'ray(-90deg farthest-corner)'}, ]); + test_interpolation({ + property: 'offset-path', + from: 'ray(-10deg farthest-corner at 0% 0px)', + to: 'ray(-50deg farthest-corner at 100% 100px)' + }, [ + {at: -1, expect: 'ray(30deg farthest-corner at -100% -100px)'}, + {at: 0, expect: 'ray(-10deg farthest-corner at 0% 0px)'}, + {at: 0.125, expect: 'ray(-15deg farthest-corner at 12.5% 12.5px)'}, + {at: 0.875, expect: 'ray(-45deg farthest-corner at 87.5% 87.5px)'}, + {at: 1, expect: 'ray(-50deg farthest-corner at 100% 100px)'}, + {at: 2, expect: 'ray(-90deg farthest-corner at 200% 200px)'}, + ]); + + test_interpolation({ + property: 'offset-path', + from: 'ray(-10deg farthest-corner)', + to: 'ray(-50deg farthest-corner at 100% 100%)' + }, [ + {at: -1, expect: 'ray(30deg farthest-corner at 0% 0%)'}, + {at: 0, expect: 'ray(-10deg farthest-corner)'}, + {at: 0.125, expect: 'ray(-15deg farthest-corner at 56.25% 56.25%)'}, + {at: 0.875, expect: 'ray(-45deg farthest-corner at 93.75% 93.75%)'}, + {at: 1, expect: 'ray(-50deg farthest-corner at 100% 100%)'}, + {at: 2, expect: 'ray(-90deg farthest-corner at 150% 150%)'}, + ]); + // No interpolation between different sizes and/or different containment. test_no_interpolation({ property: 'offset-path', diff --git a/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-006.html b/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-006.html index a19908e4fff..5b95501909c 100644 --- a/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-006.html +++ b/tests/wpt/web-platform-tests/css/motion/animation/offset-path-interpolation-006.html @@ -62,7 +62,7 @@ to: 'ellipse(40% 50% at 25% 25%)', }, [ {at: -0.3, expect: 'ellipse(1% 0% at 57.5% 57.5%)'}, - {at: 0, expect: 'ellipse(10% 10% at 50% 50%)'}, + {at: 0, expect: 'ellipse(10% 10%)'}, {at: 0.3, expect: 'ellipse(19% 22% at 42.5% 42.5%)'}, {at: 0.6, expect: 'ellipse(28% 34% at 35% 35%)'}, {at: 1, expect: 'ellipse(40% 50% at 25% 25%)'}, diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001-ref.html index 679b43fe705..e9a7fbb808f 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001-ref.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-001-ref.html @@ -15,7 +15,10 @@ } #box { background-color: green; - transform: translate(483.441px, 19.1699px) rotate(37.2267deg); + position: relative; + top: 100px; + left: 100px; + transform: translate(378.441px, -85.8301px) rotate(37.2267deg); width: 100px; height: 100px; } 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 527459c6fdd..d8392607569 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 @@ -17,6 +17,8 @@ } #box { background-color: green; + top: 100px; + left: 100px; position: relative; offset-path: border-box; offset-distance: 15%; diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002-ref.html index a722ec3bd3e..aad79d40d03 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002-ref.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002-ref.html @@ -14,7 +14,10 @@ } #box { background-color: green; - transform: translate(250px, -50px); + position: relative; + top: 100px; + left: 100px; + transform: translate(145px, -155px); width: 100px; height: 100px; } diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002.html index 0abe4169400..0446e2caa16 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-002.html @@ -17,6 +17,8 @@ #box { background-color: green; position: relative; + top: 100px; + left: 100px; offset-path: padding-box; offset-distance: 15%; width: 100px; diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003-ref.html index f6e6203f4a0..bf896aafac2 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003-ref.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003-ref.html @@ -15,7 +15,10 @@ } #box { background-color: green; - transform: translate(250px, -50px); + position: relative; + top: 100px; + left: 100px; + transform: translate(135px, -165px); width: 100px; height: 100px; } diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003.html b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003.html index 6605d8e9a0d..d3ea7f92a8e 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-coord-box-003.html @@ -17,6 +17,8 @@ } #box { background-color: green; + top: 100px; + left: 100px; position: relative; offset-path: content-box; offset-distance: 15%; diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-geometry-box-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-geometry-box-ref.html index eb7646db662..60870c815e1 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-geometry-box-ref.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-geometry-box-ref.html @@ -11,7 +11,7 @@ height: 200px; background-color: lime; transform-origin: 0px 0px; - transform: translate(0px, 0px); + transform: translate(-300px, 0px); } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011-ref.html new file mode 100644 index 00000000000..9a477b26968 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011-ref.html @@ -0,0 +1,27 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: ray() path with offset-position: normal</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + transform: translate(300px, 200px) translateX(10px) rotate(-90deg) translate(50px, -50px); + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011.html new file mode 100644 index 00000000000..cf01e2b86ec --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-011.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: ray() path with offset-position: normal</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-ray-011-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#ray-function"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + offset-path: ray(90deg); + offset-distance: 10px; + offset-position: normal; + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012-ref.html new file mode 100644 index 00000000000..dfb34bf784f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012-ref.html @@ -0,0 +1,27 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: ray() path with offset-position specified with position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + transform: translate(-40px, 320px); + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012.html new file mode 100644 index 00000000000..7c921cfac85 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-012.html @@ -0,0 +1,31 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: ray() path with offset-position specified with position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-ray-012-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#ray-function"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + top: 100px; + left: 100px; + offset-path: ray(180deg closest-side); + offset-distance: 100%; + offset-position: 10px 90%; + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013-ref.html new file mode 100644 index 00000000000..d6bf4c037ba --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013-ref.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: ray() path with position and offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + top: 100px; + left: 100px; + transform: translate(-50px, -130px); + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013.html new file mode 100644 index 00000000000..196ff4efd6f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-013.html @@ -0,0 +1,31 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: ray() path with position and offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-ray-013-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#ray-function"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + top: 100px; + left: 100px; + offset-path: ray(0deg closest-side at 100px 30%); + offset-distance: 100%; + offset-position: 10px 90%; + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014-ref.html new file mode 100644 index 00000000000..cd0fab44c36 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014-ref.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: ray() path with default position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + top: 100px; + left: 100px; + transform: translate(150px, -150px); + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014.html new file mode 100644 index 00000000000..42e431de354 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-014.html @@ -0,0 +1,31 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: ray() path with default position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-ray-014-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#ray-function"> + +<style> + #outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; + } + #box { + background-color: green; + position: relative; + top: 100px; + left: 100px; + offset-path: ray(0deg closest-side); + offset-distance: 100%; + offset-position: normal; + width: 100px; + height: 100px; + } +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005-ref.html new file mode 100644 index 00000000000..77fc954ad95 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005-ref.html @@ -0,0 +1,27 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: <basic-shape> circle() path with offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> +#outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; +} +#box { + background-color: green; + position: relative; + transform: translate(300px, 200px) translate(50px, -50px); + width: 100px; + height: 100px; +} +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005.html new file mode 100644 index 00000000000..0ca93306c60 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-005.html @@ -0,0 +1,28 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: <basic-shape> circle() path with offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-shape-circle-005-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> + +<style> +#outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; +} +#box { + background-color: green; + position: relative; + offset-path: circle(100px); + offset-position: normal; + width: 100px; + height: 100px; +} +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005-ref.html new file mode 100644 index 00000000000..98504d1a385 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005-ref.html @@ -0,0 +1,27 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test reference: <basic-shape> ellipse() path with offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> + +<style> +#outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; +} +#box { + background-color: green; + position: relative; + transform: translate(300px, 200px) translate(50px, -50px); + width: 100px; + height: 100px; +} +</style> + +<div id="outer"> + <div id="inner"> + <div id="box"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005.html new file mode 100644 index 00000000000..27eae4a5c49 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-005.html @@ -0,0 +1,28 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Motion Path test: <basic-shape> ellipse() path with offset-position</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="match" href="offset-path-shape-ellipse-005-ref.html"> +<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> + +<style> +#outer { + top: 100px; + left: 100px; + position: relative; + width: 600px; + height: 400px; +} +#box { + background-color: green; + position: relative; + offset-path: ellipse(100px 100px); + offset-position: normal; + width: 100px; + height: 100px; +} +</style> + +<div id="outer"> + <div id="box"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html index dd96c42ebb3..27f5e3fc7d6 100644 --- a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html +++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html @@ -17,6 +17,7 @@ #box { background-color: green; position: relative; + top: 100px; offset-path: inset(10px 10px 10px 10px); offset-distance: 60%; border-radius: 50% 50% 0 0; diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html index 59a64b2116d..8a22b9420ee 100644 --- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html +++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html @@ -21,6 +21,11 @@ test_valid_value("offset-path", "ray(200grad farthest-side)"); test_valid_value("offset-path", "ray(270deg farthest-corner contain)"); test_valid_value("offset-path", "ray(-720deg sides)"); test_valid_value("offset-path", "ray(calc(180deg - 45deg) farthest-side)", "ray(calc(135deg) farthest-side)"); +test_valid_value("offset-path", "ray(0deg at 100px 100px)"); +test_valid_value("offset-path", "ray(0deg sides at center center)"); +test_valid_value("offset-path", "ray(0deg at center center sides)", "ray(0deg sides at center center)"); +test_valid_value("offset-path", "ray(0deg at center center contain)", "ray(0deg contain at center center)"); +test_valid_value("offset-path", "ray(at 10px 10px 0deg contain)", "ray(0deg contain at 10px 10px)"); test_valid_value("offset-path", 'path("m 20 0 h -100")'); test_valid_value("offset-path", 'path("M 0 0 L 100 100 M 100 200 L 200 200 Z L 300 300 Z")'); @@ -44,10 +49,12 @@ test_valid_value("offset-path", test_valid_value("offset-path", 'url("http://www.example.com/index.html#polyline1")'); -test_valid_value("offset-path", "circle(100px)", "circle(100px at 50% 50%)"); -test_valid_value("offset-path", "margin-box"); +test_valid_value("offset-path", "circle(100px)"); +test_valid_value("offset-path", "circle(100px at 50% 50%)"); +test_valid_value("offset-path", "border-box"); test_valid_value("offset-path", "inset(10% 20% 30% 40%) border-box"); test_valid_value("offset-path", "fill-box ellipse(50% 60%)", "ellipse(50% 60%) fill-box"); +test_valid_value("offset-path", "content-box ellipse(50% 60% at 50% 50%)", "ellipse(50% 60% at 50% 50%) content-box"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-computed.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-computed.html index 1cbdbdb0fe2..ebb8023e6c5 100644 --- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-computed.html +++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-computed.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>Motion Path Module Level 1: getComputedStyle().offsetPosition</title> <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-position-property"> -<meta name="assert" content="offset-position is 'auto' or a computed position."> +<meta name="assert" content="offset-position is 'auto', 'normal', or a computed position."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/computed-testcommon.js"></script> @@ -18,6 +18,7 @@ <div id="target"></div> <script> test_computed_value("offset-position", "auto"); +test_computed_value("offset-position", "normal"); test_computed_value("offset-position", "left bottom", "0% 100%"); test_computed_value("offset-position", "center center", "50% 50%"); diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html index f71730f89eb..bc0d19a460f 100644 --- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html +++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-position-parsing-valid.html @@ -5,7 +5,7 @@ <title>Motion Path Module Level 1: parsing offset-position with valid values</title> <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-position-property"> -<meta name="assert" content="offset-position supports the full grammar 'auto | <position>'."> +<meta name="assert" content="offset-position supports the full grammar 'auto | normal | <position>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> @@ -13,6 +13,7 @@ <body> <script> test_valid_value("offset-position", "auto"); +test_valid_value("offset-position", "normal"); test_valid_value("offset-position", "left bottom"); test_valid_value("offset-position", "center center"); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js index 821ebf69e36..5b4c292622f 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js @@ -31,15 +31,23 @@ async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin, "frame loaded using FLEDGE or shared storage."); if (generator_api == "fledge") { - assert_false( + assert_true( document.featurePolicy.allowsFeature('shared-storage'), - "Shared storage should be disallowed if the fenced " + + "Shared Storage should be allowed if the fenced " + + "frame loaded using FLEDGE."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private Aggregation should be allowed if the fenced " + "frame loaded using FLEDGE."); } else { assert_true( document.featurePolicy.allowsFeature('shared-storage'), - "Shared storage should be allowed if the fenced " + - "frame loaded using shared storage."); + "Shared Storage should be allowed if the fenced " + + "frame loaded using Shared Storage."); + assert_false( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private Aggregation should be disabled if the fenced " + + "frame loaded using Shared Storage."); } }, [generator_api]); } diff --git a/tests/wpt/web-platform-tests/fetch/api/crashtests/body-window-destroy.html b/tests/wpt/web-platform-tests/fetch/api/crashtests/body-window-destroy.html new file mode 100644 index 00000000000..646d3c5f8ce --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/api/crashtests/body-window-destroy.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<iframe srcdoc=' + <script> + let a = new Blob(["a", "ð¢¾"], {}) + let b = new Response(a) + try { let _ = b.body } catch (e) { } + frameElement.remove() + b.json().catch(() => {}) + </script> +'></iframe> diff --git a/tests/wpt/web-platform-tests/fetch/content-length/resources/content-lengths.json b/tests/wpt/web-platform-tests/fetch/content-length/resources/content-lengths.json index dac9c82dc09..ac6f1a24680 100644 --- a/tests/wpt/web-platform-tests/fetch/content-length/resources/content-lengths.json +++ b/tests/wpt/web-platform-tests/fetch/content-length/resources/content-lengths.json @@ -32,6 +32,22 @@ "output": 30 }, { + "input": "Content-Length: 30,30\r\nContent-Length: 30,30", + "output": 30 + }, + { + "input": "Content-Length: 30,30, 30 \r\nContent-Length: 30 ", + "output": 30 + }, + { + "input": "Content-Length: 30,42\r\nContent-Length: 30", + "output": null + }, + { + "input": "Content-Length: 30,42\r\nContent-Length: 30,42", + "output": null + }, + { "input": "Content-Length: 42,30", "output": null }, diff --git a/tests/wpt/web-platform-tests/graphics-aria/graphics-roles.html b/tests/wpt/web-platform-tests/graphics-aria/graphics-roles.html index 159190ed833..fd7fabbb690 100644 --- a/tests/wpt/web-platform-tests/graphics-aria/graphics-roles.html +++ b/tests/wpt/web-platform-tests/graphics-aria/graphics-roles.html @@ -10,6 +10,8 @@ </head> <body> +<p>Tests the concrete roles defined in the <a href="https://www.w3.org/TR/graphics-aria-1.0/#role_definitions">ARIA Graphics Module</a> role definitions.</p> + <div role="graphics-document" data-expectedrole="graphics-document" class="ex">x</div> <div role="graphics-object" data-expectedrole="graphics-object" class="ex">x</div> <div role="graphics-symbol" data-expectedrole="graphics-symbol" class="ex">x</div> diff --git a/tests/wpt/web-platform-tests/html-aam/roles.html b/tests/wpt/web-platform-tests/html-aam/roles.html index 3609c26a23f..ff4986370f4 100644 --- a/tests/wpt/web-platform-tests/html-aam/roles.html +++ b/tests/wpt/web-platform-tests/html-aam/roles.html @@ -11,7 +11,10 @@ </head> <body> -<!-- Most test names correspond to unique ID defined in the https://w3c.github.io/html-aam/ spec. --> + +<p>Tests the computedrole mappings defined in <a href="https://w3c.github.io/html-aam/">HTML-AAM</a>. Most test names correspond to unique ID defined in the spec.<p> + +<p>These should remain in alphabetical order, and include all HTML tagnames. If a tag is not tested here, include a pointer to the file where it is tested, such as: <code><!-- caption -> ./table-roles.html --></code></p> <a href="#" data-testname="el-a" data-expectedrole="link" class="ex">x</a> <a data-testname="el-a-no-href" data-expectedrole="generic" class="ex">x</a> diff --git a/tests/wpt/web-platform-tests/html-aam/table-roles.html b/tests/wpt/web-platform-tests/html-aam/table-roles.html index d7865f5fcca..3f1a4eccd66 100644 --- a/tests/wpt/web-platform-tests/html-aam/table-roles.html +++ b/tests/wpt/web-platform-tests/html-aam/table-roles.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests the computedrole mappings for the table-related roles defined in <a href="https://w3c.github.io/html-aam/">HTML-AAM</a>. Most test names correspond to unique ID defined in the spec.<p> + <table data-testname="el-table" data-expectedrole="table" class="ex"> <caption data-testname="el-caption" data-expectedrole="caption" class="ex">caption</caption> <thead data-testname="el-thead" data-expectedrole="rowgroup" class="ex"> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base.html new file mode 100644 index 00000000000..ea95d812d7a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.pushState() with an empty string URL and base URL different from document's URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<base href="/the-base"> + +<script> +"use strict"; + +test(() => { + const before = location.pathname; + + history.pushState(null, null, ""); + assert_equals(location.pathname, before); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html new file mode 100644 index 00000000000..72d9be6a9c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.pushState() with a whitespace URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +"use strict"; + +test(() => { + location.hash = "test"; + + const before = location.pathname; + + history.pushState(null, null, " "); + assert_equals(location.pathname, before, "pathname"); + assert_equals(location.hash, "", "hash"); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html new file mode 100644 index 00000000000..1953709269e --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.pushState() with an empty string URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +"use strict"; + +test(() => { + location.hash = "test"; + + history.pushState(null, null, ""); + assert_equals(location.hash, "#test"); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base.html new file mode 100644 index 00000000000..224e928de6a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.replaceState() with an empty string URL and base URL different from document's URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<base href="/the-base"> + +<script> +"use strict"; + +test(() => { + const before = location.pathname; + + history.replaceState(null, null, ""); + assert_equals(location.pathname, before); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html new file mode 100644 index 00000000000..7261cdf3fa1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.replaceState() with a whitespace URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +"use strict"; + +test(() => { + location.hash = "test"; + + const before = location.pathname; + + history.replaceState(null, null, " "); + assert_equals(location.pathname, before, "pathname"); + assert_equals(location.hash, "", "hash"); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html new file mode 100644 index 00000000000..66b4cc6f82b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>history.replaceState() with an empty string URL</title> +<link rel="help" href="https://github.com/whatwg/html/issues/9343"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +"use strict"; + +test(() => { + location.hash = "test"; + + history.replaceState(null, null, ""); + assert_equals(location.hash, "#test"); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js new file mode 100644 index 00000000000..39dc3b1cc21 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js @@ -0,0 +1,10 @@ +// META: script=/common/get-host-info.sub.js + +// To use document.domain, we need to start from a subdomain. +// +// For document.domain setter to work, some web browser require the +// |Origin-Agent-Cluster: ?0| header to be set uniformly on the origin. +const origin = get_host_info().OTHER_ORIGIN; +const openee = window.open( + origin + '/html/browsers/origin/inheritance/resources/document-write.html') +fetch_tests_from_window(openee); diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js.headers b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js.headers new file mode 100644 index 00000000000..e007de4d7bf --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/document-write.https.window.js.headers @@ -0,0 +1 @@ +Origin-Agent-Cluster: ?0 diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html new file mode 100644 index 00000000000..7a6ff3118eb --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html> + <head> + <script src="/resources/testharness.js"></script> + <script src="/common/get-host-info.sub.js"></script> + </head> + <body></body> + <script> + const domain_start = document.domain; + const domain_new = domain_start.replace(/^[^.]+\./,''); + + async_test(test => { + const iframe = document.createElement('iframe'); + iframe.src = './iframe-with-about-blank-iframe.html'; + iframe.onload = test.step_func_done(() => { + const doc0 = frames[0].frames[0].document; + const doc1 = frames[0].frames[1].document; + + assert_equals(doc0.domain, domain_start); + assert_equals(doc1.domain, domain_start); + + doc0.open(); + doc1.open(); + assert_equals(doc0.domain, domain_start); + assert_equals(doc1.domain, domain_start); + + document.domain = domain_new; + assert_equals(doc0.domain, domain_start); + assert_equals(doc1.domain, domain_start); + + doc0.close(); + doc1.close(); + assert_equals(doc0.domain, domain_start); + assert_equals(doc1.domain, domain_start); + }); + document.body.appendChild(iframe); + }, "document.open() do not make the callee's origin to alias the caller's" + + " one"); + </script> +</html> diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html.headers b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html.headers new file mode 100644 index 00000000000..e007de4d7bf --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/document-write.html.headers @@ -0,0 +1 @@ +Origin-Agent-Cluster: ?0 diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html new file mode 100644 index 00000000000..b3f51252332 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <body> + <iframe src="about:blank"></iframe> + <iframe src=""></iframe> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html.headers b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html.headers new file mode 100644 index 00000000000..e007de4d7bf --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/origin/inheritance/resources/iframe-with-about-blank-iframe.html.headers @@ -0,0 +1 @@ +Origin-Agent-Cluster: ?0 diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html deleted file mode 100644 index ffe19ce9bc4..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -<title>Canvas test: 2d.drawImage.animated.apng</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> -<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> -<body class="show_output"> - -<h1>2d.drawImage.animated.apng</h1> -<p class="desc">drawImage() of an APNG with no poster frame draws the first frame</p> - - -<p class="output">Actual output:</p> -<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> -<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt=""> -<ul id="d"></ul> -<script> -var t = async_test("drawImage() of an APNG with no poster frame draws the first frame"); -_addTest(function(canvas, ctx) { - - deferTest(); - step_timeout(t.step_func_done(function () { - ctx.drawImage(document.getElementById('anim-gr.png'), 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - }), 500); - -}); -</script> -<img src="/images/anim-gr.png" id="anim-gr.png" class="resource"> - diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html deleted file mode 100644 index 2d28bc12837..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -<title>Canvas test: 2d.drawImage.animated.poster</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> -<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> -<body class="show_output"> - -<h1>2d.drawImage.animated.poster</h1> -<p class="desc">drawImage() of an APNG draws the poster frame</p> - - -<p class="output">Actual output:</p> -<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> -<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt=""> -<ul id="d"></ul> -<script> -promise_test(async t => { - - var canvas = document.getElementById('c'); - var ctx = canvas.getContext('2d'); - - const response = await fetch('/images/anim-poster-gr.png'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - -}, "drawImage() of an APNG draws the poster frame"); -</script> - diff --git a/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html b/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html deleted file mode 100644 index 1c4e74866ab..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<title>Canvas test: 2d.drawImage.zerosource.image</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> -<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css"> -<body class="show_output"> - -<h1>2d.drawImage.zerosource.image</h1> -<p class="desc">drawImage with zero-sized source rectangle from image draws nothing without exception</p> - - -<p class="output">Actual output:</p> -<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> -<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt=""> -<ul id="d"></ul> -<script> -var t = async_test("drawImage with zero-sized source rectangle from image draws nothing without exception"); -_addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.drawImage(document.getElementById('red-zerowidth.svg'), 0, 0, 100, 50); -ctx.drawImage(document.getElementById('red-zeroheight.svg'), 0, 0, 100, 50); -ctx.drawImage(document.getElementById('red-zerosize.svg'), 0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - - -}); -</script> -<img src="/images/red-zerowidth.svg" id="red-zerowidth.svg" class="resource"> -<img src="/images/red-zeroheight.svg" id="red-zeroheight.svg" class="resource"> -<img src="/images/red-zerosize.svg" id="red-zerosize.svg" class="resource"> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html deleted file mode 100644 index eccf14bfd04..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -<title>OffscreenCanvas test: 2d.drawImage.animated.poster</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> - -<h1>2d.drawImage.animated.poster</h1> -<p class="desc">drawImage() of an APNG draws the poster frame</p> - - -<script> -promise_test(async t => { - - var canvas = new OffscreenCanvas(100, 50); - var ctx = canvas.getContext('2d'); - - const response = await fetch('/images/anim-poster-gr.png'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - -}, "drawImage() of an APNG draws the poster frame"); -</script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js deleted file mode 100644 index 542c9382f64..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js +++ /dev/null @@ -1,22 +0,0 @@ -// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -// OffscreenCanvas test in a worker:2d.drawImage.animated.poster -// Description:drawImage() of an APNG draws the poster frame -// Note: - -importScripts("/resources/testharness.js"); -importScripts("/html/canvas/resources/canvas-tests.js"); - -promise_test(async t => { - - var canvas = new OffscreenCanvas(100, 50); - var ctx = canvas.getContext('2d'); - - const response = await fetch('/images/anim-poster-gr.png'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - t.done(); -}, "drawImage() of an APNG draws the poster frame"); -done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html index cd293595fe8..c2ebd265cfa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html @@ -15,11 +15,16 @@ promise_test(async t => { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); - const response = await fetch('/images/green.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + const img = new Image(); + const imageLoadPromise = new Promise((resolve, reject) => { + img.onload = () => resolve(); + img.onerror = (err) => reject(err); + }); + img.src = '/images/green.svg'; + await imageLoadPromise; + + ctx.drawImage(img, 0, 0); + _assertPixelApprox(canvas, 50, 25, 0, 255, 0, 255, 2); }, "drawImage() of an SVG image"); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js deleted file mode 100644 index 8293e89f247..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js +++ /dev/null @@ -1,21 +0,0 @@ -// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -// OffscreenCanvas test in a worker:2d.drawImage.svg -// Description:drawImage() of an SVG image -// Note: - -importScripts("/resources/testharness.js"); -importScripts("/html/canvas/resources/canvas-tests.js"); - -promise_test(async t => { - - var canvas = new OffscreenCanvas(100, 50); - var ctx = canvas.getContext('2d'); - - const response = await fetch('/images/green.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - t.done(); -}, "drawImage() of an SVG image"); -done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html index 5dfb2f3002c..77182242d4c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html @@ -17,11 +17,23 @@ promise_test(async t => { ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); - const response = await fetch('/images/red-zerowidth.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0, 100, 50); - _assertPixel(canvas, 50,25, 0,255,0,255); + + function loadImage(src) { + return new Promise((resolve, reject) => { + const img = new Image(); + img.onload = () => resolve(img); + img.onerror = (err) => reject(err); + img.src = src; + }); + } + const img1 = await loadImage('/images/red-zerowidth.svg'); + const img2 = await loadImage('/images/red-zeroheight.svg'); + const img3 = await loadImage('/images/red-zerosize.svg'); + + ctx.drawImage(img1, 0, 0, 100, 50); + ctx.drawImage(img2, 0, 0, 100, 50); + ctx.drawImage(img3, 0, 0, 100, 50); + _assertPixel(canvas, 50, 25, 0, 255, 0, 255); }, "drawImage with zero-sized source rectangle from image draws nothing without exception"); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js deleted file mode 100644 index 467beb4d12f..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js +++ /dev/null @@ -1,23 +0,0 @@ -// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -// OffscreenCanvas test in a worker:2d.drawImage.zerosource.image -// Description:drawImage with zero-sized source rectangle from image draws nothing without exception -// Note: - -importScripts("/resources/testharness.js"); -importScripts("/html/canvas/resources/canvas-tests.js"); - -promise_test(async t => { - - var canvas = new OffscreenCanvas(100, 50); - var ctx = canvas.getContext('2d'); - - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - const response = await fetch('/images/red-zerowidth.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0, 100, 50); - _assertPixel(canvas, 50,25, 0,255,0,255); - t.done(); -}, "drawImage with zero-sized source rectangle from image draws nothing without exception"); -done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html deleted file mode 100644 index 4ee68b430fd..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/#offscreencontext2d-commit"> -<script> - -function verifyPlaceholder(placeholder, expectedR, expectedG, expectedB, expectedA, expectedClrStr) -{ - var canvas = document.createElement('canvas'); - canvas.width = canvas.height = 10; - var ctx = canvas.getContext('2d'); - ctx.drawImage(placeholder, 0, 0); - _assertPixel(canvas, 5,5, expectedR, expectedG, expectedB, expectedA); -} - -async_test(function(t) { - var placeholder = document.createElement('canvas'); - placeholder.width = placeholder.height = 10; - var offscreenCanvas = placeholder.transferControlToOffscreen(); - var ctx = offscreenCanvas.getContext('2d'); - ctx.fillStyle = "#0f0"; - ctx.fillRect(0, 0, 10, 10); - // commit() propagation is taken care of by an async task, which means the - // place holder contents should still be transparent black at this moment. - verifyPlaceholder(placeholder, 0,0,0,0, "0,0,0,0"); - // Set timeout acts as a sync barrier to allow commit to propagate - t.step_timeout(function() { - verifyPlaceholder(placeholder, 0,255,0,255, "0,255,0,255"); - t.done(); - }, 0); -}, "Test that calling OffscreenCanvas's commit pushes its contents to its placeholder."); - -test(function() { - var offscreenCanvas = new OffscreenCanvas(10, 10); - var ctx = offscreenCanvas.getContext('2d'); - ctx.fillStyle = "#0f0"; - ctx.fillRect(0, 0, 10, 10); - ctx.commit(); -}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop."); - -</script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html deleted file mode 100644 index 7d1d2c85f9c..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html +++ /dev/null @@ -1,79 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/html/canvas/resources/canvas-tests.js"></script> -<link rel="help" href="https://html.spec.whatwg.org/#offscreencontext2d-commit"> - -<script id="myWorker" type="text/worker"> - -function testCommitPushesContents(offscreenCanvas) { - try { - var ctx = offscreenCanvas.getContext('2d'); - ctx.fillStyle = "#0f0"; - ctx.fillRect(0, 0, 10, 10); - ctx.commit(); - return true; - } catch(e) { - return false; - } -} - -function testCommitException() { - var offscreenCanvas = new OffscreenCanvas(10, 10); - var ctx = offscreenCanvas.getContext('2d'); - ctx.fillStyle = "#0f0"; - ctx.fillRect(0, 0, 10, 10); - return true; -} - -self.onmessage = function(e) { - switch (e.data.msg) { - case 'test1': - self.postMessage(testCommitPushesContents(e.data.data)); - break; - case 'test2': - self.postMessage(testCommitException()); - break; - } -}; - -</script> - -<script> - -function verifyPlaceholder(placeholder) { - var canvas = document.createElement('canvas'); - canvas.width = canvas.height = 10; - var ctx = canvas.getContext('2d'); - ctx.drawImage(placeholder, 0, 0); - _assertPixel(canvas, 5,5, 0,255,0,255); -} - -function makeWorker(test) { - var blob = new Blob([document.getElementById("myWorker").textContent]); - var worker = new Worker(URL.createObjectURL(blob)); - worker.onerror = test.unreached_func("error"); - return worker; -} - -async_test(function(t) { - var placeholder = document.createElement('canvas'); - placeholder.width = placeholder.height = 10; - var offscreenCanvas = placeholder.transferControlToOffscreen(); - var worker = makeWorker(t); - worker.addEventListener('message', t.step_func_done(function(msg) { - assert_true(msg.data); - verifyPlaceholder(placeholder); - })); - worker.postMessage({msg: 'test1', data: offscreenCanvas}, [offscreenCanvas]); -}, "Test that calling OffscreenCanvas's commit pushes its contents to its placeholder."); - -async_test(function(t) { - var worker = makeWorker(t); - worker.addEventListener('message', t.step_func_done(function(msg) { - assert_true(msg.data); - })); - worker.postMessage({msg: 'test2'}); -}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception in a worker."); - -</script> diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/PRESUBMIT.py b/tests/wpt/web-platform-tests/html/canvas/tools/PRESUBMIT.py index 048e96b7012..c7fb93ae6fd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/PRESUBMIT.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/PRESUBMIT.py @@ -7,8 +7,6 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built into depot_tools. """ -USE_PYTHON3 = True - def CommonChecks(input_api, output_api): return input_api.canned_checks.RunPylint(input_api, output_api) diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py index cf154c41894..0542e32571a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py @@ -28,7 +28,7 @@ # # * Test the tests, add new ones to Git, remove deleted ones from Git, etc. -from typing import Any, List, Mapping, MutableMapping, Optional, Set, Tuple +from typing import Any, List, Mapping, Optional, Set, Tuple import re import collections @@ -40,7 +40,6 @@ import jinja2 import os import pathlib import sys -import textwrap try: import cairocffi as cairo # type: ignore @@ -236,14 +235,14 @@ def _expand_test_code(code: str) -> str: return code -class TestType(str, enum.Enum): +class CanvasType(str, enum.Enum): HTML_CANVAS = 'htmlcanvas' OFFSCREEN_CANVAS = 'offscreencanvas' WORKER = 'worker' -def _get_enabled_test_types(test: Mapping[str, Any]) -> Set[TestType]: - return {TestType(t.lower()) for t in test.get('canvasType', TestType)} +def _get_enabled_canvas_types(test: Mapping[str, Any]) -> Set[CanvasType]: + return {CanvasType(t.lower()) for t in test.get('canvasType', CanvasType)} @dataclasses.dataclass @@ -252,104 +251,142 @@ class TestConfig: image_out_dir: str -_CANVAS_SIZE_REGEX = re.compile(r'(?P<width>.*), (?P<height>.*)', - re.MULTILINE | re.DOTALL) - +def _validate_test(test: Mapping[str, Any]): + if test.get('expected', '') == 'green' and re.search( + r'@assert pixel .* 0,0,0,0;', test['code']): + print('Probable incorrect pixel test in %s' % test['name']) -def _get_canvas_size(test: Mapping[str, Any]): - size = test.get('size', '100, 50') - match = _CANVAS_SIZE_REGEX.match(size) - if not match: + if 'size' in test and (not isinstance(test['size'], list) + or len(test['size']) != 2): raise InvalidTestDefinitionError( - 'Invalid canvas size "%s" in test %s. Expected a string matching ' - 'this pattern: "%%s, %%s" %% (width, height)' % - (size, test['name'])) - return match.group('width'), match.group('height') + f'Invalid canvas size "{test["size"]}" in test {test["name"]}. ' + 'Expected an array with two numbers.') + if 'test_type' in test and test['test_type'] != 'promise': + raise InvalidTestDefinitionError( + f'Test {test["name"]}\' test_type is invalid, it only accepts ' + '"promise" now for creating promise test type in the template ' + 'file.') -def _write_reference_test(test: Mapping[str, Any], - jinja_env: jinja2.Environment, - template_params: MutableMapping[str, Any], - enabled_tests: Set[TestType], - canvas_path: str, offscreen_path: str): - name = template_params["name"] - js_ref = test.get('reference') - html_ref = test.get('html_reference') - if js_ref is not None and html_ref is not None: + if 'reference' in test and 'html_reference' in test: raise InvalidTestDefinitionError( - f'Test {name} is invalid, "reference" and "html_reference" can\'t ' - 'both be specified at the same time.') + f'Test {test["name"]} is invalid, "reference" and "html_reference" ' + 'can\'t both be specified at the same time.') - ref_params = template_params.copy() - ref_params.update({'code': js_ref or html_ref}) - ref_template_name = 'reftest_element.html' if js_ref else 'reftest.html' - if TestType.HTML_CANVAS in enabled_tests: - pathlib.Path(f'{canvas_path}-expected.html').write_text( - jinja_env.get_template(ref_template_name).render(ref_params), - 'utf-8') - if {TestType.OFFSCREEN_CANVAS, TestType.WORKER} & enabled_tests: - pathlib.Path(f'{offscreen_path}-expected.html').write_text( - jinja_env.get_template(ref_template_name).render(ref_params), - 'utf-8') - params = template_params.copy() +def _render_template(jinja_env: jinja2.Environment, + template: jinja2.Template, + params: Mapping[str, Any]) -> str: + """Renders the specified jinja template. + + The template is repetitively rendered until no more changes are observed. + This allows for template parameters to refer to other template parameters. + """ + rendered = template.render(params) + previous = '' + while rendered != previous: + previous = rendered + template = jinja_env.from_string(rendered) + rendered = template.render(params) + return rendered + + +def _render(jinja_env: jinja2.Environment, template_name: str, + params: Mapping[str, Any]): + params = dict(params) params.update({ - 'ref_link': f'{name}-expected.html', - 'fuzzy': test.get('fuzzy') + # Render the code on its own, as it could contain templates expanding + # to multuple lines. This is needed to get proper indentation of the + # code in the main template. + 'code': _render_template(jinja_env, + jinja_env.from_string(params['code']), + params) }) - if TestType.HTML_CANVAS in enabled_tests: + + return _render_template(jinja_env, jinja_env.get_template(template_name), + params) + + +def _write_reference_test(jinja_env: jinja2.Environment, + params: Mapping[str, Any], + enabled_tests: Set[CanvasType], + canvas_path: str, offscreen_path: str): + if CanvasType.HTML_CANVAS in enabled_tests: + html_params = dict(params) + html_params.update({'canvas_type': CanvasType.HTML_CANVAS.value}) pathlib.Path(f'{canvas_path}.html').write_text( - jinja_env.get_template("reftest_element.html").render(params), - 'utf-8') - if TestType.OFFSCREEN_CANVAS in enabled_tests: + _render(jinja_env, "reftest_element.html", html_params), 'utf-8') + if CanvasType.OFFSCREEN_CANVAS in enabled_tests: + offscreen_params = dict(params) + offscreen_params.update({ + 'canvas_type': CanvasType.OFFSCREEN_CANVAS.value + }) pathlib.Path(f'{offscreen_path}.html').write_text( - jinja_env.get_template("reftest_offscreen.html").render(params), + _render(jinja_env, "reftest_offscreen.html", offscreen_params), 'utf-8') - if TestType.WORKER in enabled_tests: + if CanvasType.WORKER in enabled_tests: + worker_params = dict(params) + worker_params.update({'canvas_type': CanvasType.WORKER.value}) pathlib.Path(f'{offscreen_path}.w.html').write_text( - jinja_env.get_template("reftest_worker.html").render(params), - 'utf-8') + _render(jinja_env, "reftest_worker.html", worker_params), 'utf-8') + + js_ref = params.get('reference', '') + html_ref = params.get('html_reference', '') + ref_params = dict(params) + ref_params.update({ + 'is_test_reference': True, + 'code': js_ref or html_ref + }) + ref_template_name = 'reftest_element.html' if js_ref else 'reftest.html' + if CanvasType.HTML_CANVAS in enabled_tests: + pathlib.Path(f'{canvas_path}-expected.html').write_text( + _render(jinja_env, ref_template_name, ref_params), 'utf-8') + if {CanvasType.OFFSCREEN_CANVAS, CanvasType.WORKER} & enabled_tests: + pathlib.Path(f'{offscreen_path}-expected.html').write_text( + _render(jinja_env, ref_template_name, ref_params), 'utf-8') def _write_testharness_test(jinja_env: jinja2.Environment, - template_params: MutableMapping[str, Any], - enabled_tests: Set[TestType], + params: Mapping[str, Any], + enabled_tests: Set[CanvasType], canvas_path: str, offscreen_path: str): # Create test cases for canvas and offscreencanvas. - if TestType.HTML_CANVAS in enabled_tests: + if CanvasType.HTML_CANVAS in enabled_tests: + html_params = dict(params) + html_params.update({'canvas_type': CanvasType.HTML_CANVAS.value}) pathlib.Path(f'{canvas_path}.html').write_text( - jinja_env.get_template("testharness_element.html").render( - template_params), 'utf-8') - - template_params['done_needed'] = ('then(t_pass, t_fail);' - not in template_params['code']) + _render(jinja_env, "testharness_element.html", html_params), + 'utf-8') - if TestType.OFFSCREEN_CANVAS in enabled_tests: + if CanvasType.OFFSCREEN_CANVAS in enabled_tests: + offscreen_params = dict(params) + offscreen_params.update({ + 'canvas_type': CanvasType.OFFSCREEN_CANVAS.value + }) pathlib.Path(f'{offscreen_path}.html').write_text( - jinja_env.get_template("testharness_offscreen.html").render( - template_params), 'utf-8') + _render(jinja_env, "testharness_offscreen.html", offscreen_params), + 'utf-8') - if TestType.WORKER in enabled_tests: + if CanvasType.WORKER in enabled_tests: + worker_params = dict(params) + worker_params.update({'canvas_type': CanvasType.WORKER.value}) pathlib.Path(f'{offscreen_path}.worker.js').write_text( - jinja_env.get_template("testharness_worker.js").render( - template_params), 'utf-8') + _render(jinja_env, "testharness_worker.js", worker_params), + 'utf-8') def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, - sub_dir: str, enabled_tests: Set[TestType], + sub_dir: str, enabled_tests: Set[CanvasType], html_canvas_cfg: TestConfig, offscreen_canvas_cfg: TestConfig) -> None: - name = test['name'] + _validate_test(test) - if test.get('expected', '') == 'green' and re.search( - r'@assert pixel .* 0,0,0,0;', test['code']): - print('Probable incorrect pixel test in %s' % name) + name = test['name'] - expectation_html = '' + expected_img = None if 'expected' in test and test['expected'] is not None: expected = test['expected'] - expected_img = None if expected == 'green': expected_img = '/images/green-100x50.png' elif expected == 'clear': @@ -362,14 +399,14 @@ def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, r'surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, \1, \2)' r'\ncr = cairo.Context(surface)', expected) - if TestType.HTML_CANVAS in enabled_tests: + if CanvasType.HTML_CANVAS in enabled_tests: expected_canvas = ( expected + "\nsurface.write_to_png('%s.png')\n" % os.path.join(html_canvas_cfg.image_out_dir, sub_dir, name)) eval(compile(expected_canvas, '<test %s>' % name, 'exec'), {}, {'cairo': cairo}) - if {TestType.OFFSCREEN_CANVAS, TestType.WORKER} & enabled_tests: + if {CanvasType.OFFSCREEN_CANVAS, CanvasType.WORKER} & enabled_tests: expected_offscreen = ( expected + "\nsurface.write_to_png('%s.png')\n" % os.path.join( @@ -379,53 +416,18 @@ def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, expected_img = '%s.png' % name - if expected_img: - expectation_html = ( - '<p class="output expectedtext">Expected output:<p>' - '<img src="%s" class="output expected" id="expected" ' - 'alt="">' % expected_img) - - width, height = _get_canvas_size(test) - - images = '' - for src in test.get('images', []): - img_id = src.split('/')[-1] - if '/' not in src: - src = '../images/%s' % src - images += '<img src="%s" id="%s" class="resource">\n' % (src, img_id) - for src in test.get('svgimages', []): - img_id = src.split('/')[-1] - if '/' not in src: - src = '../images/%s' % src - images += ('<svg><image xlink:href="%s" id="%s" class="resource">' - '</svg>\n' % (src, img_id)) - images = images.replace('../images/', '/images/') - - is_promise_test = False - if 'test_type' in test: - if test['test_type'] == 'promise': - is_promise_test = True - else: - raise InvalidTestDefinitionError( - f'Test {name}\' test_type is invalid, it only accepts ' - '"promise" now for creating promise test type in the template ' - 'file.') - - template_params = { - 'name': name, - 'desc': test.get('desc', ''), - 'notes': test.get('notes', ''), - 'images': images, - 'timeout': test.get('timeout'), - 'canvas': test.get('canvas', ''), - 'width': width, - 'height': height, - 'expected': expectation_html, - 'code': _expand_test_code(test['code']), - 'attributes': test.get('attributes', ''), - 'promise_test': is_promise_test + # Defaults: + params = { + 'desc': '', + 'size': [100, 50], } + params.update(test) + params.update({ + 'code': _expand_test_code(test['code']), + 'expected_img': expected_img + }) + canvas_path = os.path.join(html_canvas_cfg.out_dir, sub_dir, name) offscreen_path = os.path.join(offscreen_canvas_cfg.out_dir, sub_dir, name) if 'manual' in test: @@ -433,11 +435,11 @@ def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, offscreen_path += '-manual' if 'reference' in test or 'html_reference' in test: - _write_reference_test(test, jinja_env, template_params, enabled_tests, + _write_reference_test(jinja_env, params, enabled_tests, canvas_path, offscreen_path) else: - _write_testharness_test(jinja_env, template_params, enabled_tests, - canvas_path, offscreen_path) + _write_testharness_test(jinja_env, params, enabled_tests, canvas_path, + offscreen_path) def genTestUtils_union(NAME2DIRFILE: str) -> None: @@ -499,32 +501,26 @@ def genTestUtils_union(NAME2DIRFILE: str) -> None: test = original_test.copy() if variant_name or variant_params: test['name'] += '.' + variant_name - test['code'] = test['code'] % variant_params - if 'reference' in test: - test['reference'] = test['reference'] % variant_params - if 'html_reference' in test: - test['html_reference'] = ( - test['html_reference'] % variant_params) test.update(variant_params) name = test['name'] print('\r(%s)' % name, ' ' * 32, '\t') - enabled_test_types = _get_enabled_test_types(test) + enabled_canvas_types = _get_enabled_canvas_types(test) already_tested = used_tests[name].intersection( - enabled_test_types) + enabled_canvas_types) if already_tested: raise InvalidTestDefinitionError( f'Test {name} is defined twice for types {already_tested}') - used_tests[name].update(enabled_test_types) + used_tests[name].update(enabled_canvas_types) sub_dir = _get_test_sub_dir(name, name_to_sub_dir) _generate_test( test, jinja_env, sub_dir, - enabled_test_types, + enabled_canvas_types, html_canvas_cfg=TestConfig( out_dir=CANVASOUTPUTDIR, image_out_dir=CANVASIMAGEOUTPUTDIR), diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html index 8f98e164845..4c9affbbbbf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html @@ -1,15 +1,14 @@ <!DOCTYPE html> <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -{% if ref_link %}<link rel="match" href="{{ ref_link }}"> -{% endif %} -{% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> -{% endif %} -{% if timeout %}<meta name="timeout" content="{{ timeout }}"> -{% endif %} <title>Canvas test: {{ name }}</title> <h1>{{ name }}</h1> <p class="desc">{{ desc }}</p> {% if notes %}<p class="notes">{{ notes }}{% endif %} {{ code | trim }} -{{ images -}} +{% for image in images %} +<img src="/images/{{ image }}" id="{{ image }}" class="resource"> +{% endfor -%} +{% for svgimage in svgimages %} +<svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg> +{% endfor -%} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html index 25445af6a4f..6684e9c615b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html @@ -1,28 +1,34 @@ <!DOCTYPE html> <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -{% if promise_test %}<html class="reftest-wait"> -{% endif %} -{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% if test_type == 'promise' %}<html class="reftest-wait"> {% endif %} +{% if not is_test_reference %} +<link rel="match" href="{{ name }}-expected.html"> {% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> {% endif %} +{% endif %} {% if timeout %}<meta name="timeout" content="{{ timeout }}"> {% endif %} <title>Canvas test: {{ name }}</title> <h1>{{ name }}</h1> <p class="desc">{{ desc }}</p> {% if notes %}<p class="notes">{{ notes }}{% endif %} -<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> +<canvas id="canvas" width="{{ size[0] }}" height="{{ size[1] }}"{{ canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> -<script{% if promise_test %} type="module"{% endif %}> +<script{% if test_type == 'promise' %} type="module"{% endif %}> const canvas = document.getElementById("canvas"); const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); {{ code | trim | indent(2) }} - {% if promise_test %} + {% if test_type == 'promise' %} document.documentElement.classList.remove("reftest-wait"); {% endif %} </script> -{{ images -}} -{% if promise_test %}</html>{% endif %} +{% for image in images %} +<img src="/images/{{ image }}" id="{{ image }}" class="resource"> +{% endfor -%} +{% for svgimage in svgimages %} +<svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg> +{% endfor -%} +{% if test_type == 'promise' %}</html>{% endif %} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html index 4d8b7c9de54..1d0d93dfa16 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html @@ -1,9 +1,8 @@ <!DOCTYPE html> <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> -{% if promise_test %}<html class="reftest-wait"> -{% endif %} -{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% if test_type == 'promise' %}<html class="reftest-wait"> {% endif %} +<link rel="match" href="{{ name }}-expected.html"> {% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> {% endif %} {% if timeout %}<meta name="timeout" content="{{ timeout }}"> @@ -12,20 +11,19 @@ <h1>{{ name }}</h1> <p class="desc">{{ desc }}</p> {% if notes %}<p class="notes">{{ notes }}{% endif %} -<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> +<canvas id="canvas" width="{{ size[0] }}" height="{{ size[1] }}"{{ canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> -<script{% if promise_test %} type="module"{% endif %}> - const canvas = new OffscreenCanvas({{ width }}, {{ height }}); +<script{% if test_type == 'promise' %} type="module"{% endif %}> + const canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); {{ code | trim | indent(2) }} const outputCanvas = document.getElementById("canvas"); outputCanvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}).drawImage(canvas, 0, 0); - {% if promise_test %} + {% if test_type == 'promise' %} document.documentElement.classList.remove("reftest-wait"); {% endif %} </script> -{{ images -}} -{% if promise_test %}</html>{% endif %} +{% if test_type == 'promise' %}</html>{% endif %} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html index 7ce9ca5b159..e636d3634ba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html @@ -1,8 +1,7 @@ <!DOCTYPE html> <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> <html class="reftest-wait"> -{% if ref_link %}<link rel="match" href="{{ ref_link }}"> -{% endif %} +<link rel="match" href="{{ name }}-expected.html"> {% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> {% endif %} {% if timeout %}<meta name="timeout" content="{{ timeout }}"> @@ -11,12 +10,12 @@ <h1>{{ name }}</h1> <p class="desc">{{ desc }}</p> {% if notes %}<p class="notes">{{ notes }}{% endif %} -<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> +<canvas id="canvas" width="{{ size[0] }}" height="{{ size[1] }}"{{ canvas }}> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id='myWorker' type='text/worker'> - self.onmessage = {% if promise_test %}async {% endif %}function(e) { - const canvas = new OffscreenCanvas({{ width }}, {{ height }}); + self.onmessage = {% if test_type == 'promise' %}async {% endif %}function(e) { + const canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); {{ code | trim | indent(4) }} @@ -35,5 +34,4 @@ }); worker.postMessage(null); </script> -{{ images -}} </html> diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html index 521fece50c4..b6bda2835e2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html @@ -15,14 +15,16 @@ {% endif %} <p class="output">Actual output:</p> -<canvas id="c" class="output" width="{{ width }}" height="{{ height }}" +<canvas id="c" class="output" width="{{ size[0] }}" height="{{ size[1] }}" {{- canvas}}><p class="fallback">FAIL (fallback content)</p></canvas> -{{ expected }} +{% if expected_img %} +<p class="output expectedtext">Expected output:<p><img src="{{ expected_img }}" class="output expected" id="expected" alt=""> +{%- endif +%} <ul id="d"></ul> <script> {#- Promise vs. async test header: +#} -{% if promise_test %} +{% if test_type == 'promise' %} promise_test(async t => { var canvas = document.getElementById('c'); @@ -36,11 +38,16 @@ _addTest(function(canvas, ctx) { {{ code | trim | indent(2) }} {# Promise vs. async test footer: #} -{% if promise_test %} +{% if test_type == 'promise' %} }, "{{ desc }}"); {% else %} }{% if attributes %}, {{ attributes }}{% endif %}); {% endif -%} </script> -{{ images }} +{% for image in images %} +<img src="/images/{{ image }}" id="{{ image }}" class="resource"> +{% endfor -%} +{% for svgimage in svgimages %} +<svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg> +{% endfor +%} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html index a6de83c4195..8ebbff77a6c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html @@ -13,7 +13,7 @@ <script> {#- Promise vs. async test header: +#} -{% if promise_test %} +{% if test_type == 'promise' %} promise_test(async t => { {% else %} var t = async_test("{{ desc | double_quote_escape }}"); @@ -25,13 +25,13 @@ t.step(function() { {% endif %} {# Test body: #} - var canvas = new OffscreenCanvas({{ width }}, {{ height }}); + var canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); {{ code | trim | indent(2)}} {#- Promise vs. async test footer: +#} -{% if promise_test %} +{% if test_type == 'promise' %} }, "{{ desc }}"); {% else %} @@ -40,3 +40,6 @@ t.step(function() { }); {% endif %} </script> +{% for svgimage in svgimages %} +<svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg> +{% endfor %} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js index b6575b95a67..f1f04e7bb6b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js @@ -8,7 +8,7 @@ importScripts("/resources/testharness.js"); importScripts("/html/canvas/resources/canvas-tests.js"); {# Promise vs. async test header: #} -{% if promise_test %} +{% if test_type == 'promise' %} promise_test(async t => { {% else %} var t = async_test("{{ desc | double_quote_escape }}"); @@ -20,14 +20,14 @@ t.step(function() { {% endif %} {# Test body: #} - var canvas = new OffscreenCanvas({{ width }}, {{ height }}); + var canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); {{ code | trim | indent(2)}} t.done(); {#- Promise vs. async test footer: +#} -{% if promise_test %} +{% if test_type == 'promise' %} }, "{{ desc }}"); {% else %} }); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml index 91b92b0092f..93c556288d7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml @@ -187,19 +187,6 @@ }), 500); expected: green -- name: 2d.drawImage.animated.apng - desc: drawImage() of an APNG with no poster frame draws the first frame - canvasType: ['HTMLCanvas'] - images: - - anim-gr.png - code: | - deferTest(); - step_timeout(t.step_func_done(function () { - ctx.drawImage(document.getElementById('anim-gr.png'), 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; - }), 500); - expected: green - # TODO: drawImage shadows - name: 2d.drawImage.3arg @@ -398,7 +385,7 @@ - name: 2d.drawImage.zerosource.image desc: drawImage with zero-sized source rectangle from image draws nothing without exception test_type: promise - canvasType: ['HTMLCanvas'] + canvasType: ['HTMLCanvas', 'OffscreenCanvas'] code: | ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 100, 50); @@ -421,19 +408,6 @@ _assertPixel(canvas, 50, 25, 0, 255, 0, 255); expected: green -- name: 2d.drawImage.zerosource.image - desc: drawImage with zero-sized source rectangle from image draws nothing without exception - test_type: promise - canvasType: ['OffscreenCanvas', 'Worker'] - code: | - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - const response = await fetch('/images/red-zerowidth.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0, 100, 50); - _assertPixel(canvas, 50,25, 0,255,0,255); - expected: green - name: 2d.drawImage.negativesource desc: Negative source width/height represents the correct rectangle @@ -544,7 +518,7 @@ - name: 2d.drawImage.svg desc: drawImage() of an SVG image test_type: promise - canvasType: ['HTMLCanvas'] + canvasType: ['HTMLCanvas', 'OffscreenCanvas'] code: | const img = new Image(); const imageLoadPromise = new Promise((resolve, reject) => { @@ -558,31 +532,6 @@ _assertPixelApprox(canvas, 50, 25, 0, 255, 0, 255, 2); expected: green - -- name: 2d.drawImage.svg - desc: drawImage() of an SVG image - test_type: promise - canvasType: ['OffscreenCanvas', 'Worker'] - code: | - const response = await fetch('/images/green.svg'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - expected: green - -- name: 2d.drawImage.animated.poster - desc: drawImage() of an APNG draws the poster frame - test_type: promise - code: | - const response = await fetch('/images/anim-poster-gr.png'); - const blob = await response.blob(); - const bitmap = await createImageBitmap(blob); - - ctx.drawImage(bitmap, 0, 0); - @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo - expected: green - - name: 2d.drawImage.path test_type: promise code: | diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml index 9a90bed2482..a5c2b9864b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml @@ -349,13 +349,13 @@ - name: 2d.filter.canvasFilterObject.dropShadow.tentative desc: Test CanvasFilter() dropShadow object. - size: 520, 420 + size: [520, 420] code: | ctx.fillStyle = 'teal'; - ctx.fillRect(0, 0, 520, 50); - ctx.fillRect(0, 100, 520, 50); - ctx.fillRect(0, 200, 520, 50); - ctx.fillRect(0, 300, 520, 50); + ctx.fillRect(0, 0, {{ size[0] }}, 50); + ctx.fillRect(0, 100, {{ size[0] }}, 50); + ctx.fillRect(0, 200, {{ size[0] }}, 50); + ctx.fillRect(0, 300, {{ size[0] }}, 50); ctx.fillStyle = 'crimson'; @@ -446,7 +446,7 @@ ctx.fillRect(210, 310, 80, 80); html_reference: | <svg xmlns="http://www.w3.org/2000/svg" - width=520 height=420 + width={{ size[0] }} height={{ size[1] }} color-interpolation-filters="sRGB"> <rect x=0 y=0 width=100% height=50 fill="teal" /> <rect x=0 y=100 width=100% height=50 fill="teal" /> diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml index e0d2b3d793b..8ca05bec84d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml @@ -1,6 +1,6 @@ - name: 2d.layer.global-states desc: Checks that layers correctly use global render states. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'rgba(0, 0, 255, 1)'; @@ -8,7 +8,7 @@ circle.arc(90, 90, 45, 0, 2 * Math.PI); ctx.fill(circle); - %(render-states)s + {{ render_states }} ctx.beginLayer(); @@ -29,7 +29,7 @@ circle.arc(90, 90, 45, 0, 2 * Math.PI); ctx.fill(circle); - %(render-states)s + {{ render_states }} canvas2 = document.createElement("canvas"); ctx2 = canvas2.getContext("2d"); @@ -43,54 +43,54 @@ ctx.drawImage(canvas2, 0, 0); variants: &global-state-variants no-global-states: - render-states: // No global states. + render_states: // No global states. alpha: - render-states: ctx.globalAlpha = 0.6; + render_states: ctx.globalAlpha = 0.6; blending: - render-states: ctx.globalCompositeOperation = 'multiply'; + render_states: ctx.globalCompositeOperation = 'multiply'; composite: - render-states: ctx.globalCompositeOperation = 'source-in'; + render_states: ctx.globalCompositeOperation = 'source-in'; shadow: - render-states: |- + render_states: |- ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; alpha.blending: - render-states: |- + render_states: |- ctx.globalAlpha = 0.6; ctx.globalCompositeOperation = 'multiply'; alpha.composite: - render-states: |- + render_states: |- ctx.globalAlpha = 0.6; ctx.globalCompositeOperation = 'source-in'; alpha.shadow: - render-states: |- + render_states: |- ctx.globalAlpha = 0.5; ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; alpha.blending.shadow: - render-states: |- + render_states: |- ctx.globalAlpha = 0.6; ctx.globalCompositeOperation = 'multiply'; ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; alpha.composite.shadow: - render-states: |- + render_states: |- ctx.globalAlpha = 0.6; ctx.globalCompositeOperation = 'source-in'; ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; blending.shadow: - render-states: |- + render_states: |- ctx.globalCompositeOperation = 'multiply'; ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'rgba(255, 165, 0, 0.5)'; composite.shadow: - render-states: |- + render_states: |- ctx.globalCompositeOperation = 'source-in'; ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; @@ -99,7 +99,7 @@ - name: 2d.layer.global-states.filter desc: Checks that layers with filters correctly use global render states. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'rgba(0, 0, 255, 1)'; @@ -107,7 +107,7 @@ circle.arc(90, 90, 45, 0, 2 * Math.PI); ctx.fill(circle); - %(render-states)s + {{ render_states }} ctx.beginLayer([ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0, @@ -127,9 +127,9 @@ reference: | const svg = ` <svg xmlns="http://www.w3.org/2000/svg" - width="200" height="200" + width="{{ size[0] }}" height="{{ size[1] }}" color-interpolation-filters="sRGB"> - <filter id="filter" x="-100%%" y="-100%%" width="300%%" height="300%%"> + <filter id="filter" x="-100%" y="-100%" width="300%" height="300%"> <feColorMatrix type="matrix" values="0.393 0.769 0.189 0 0 @@ -148,8 +148,8 @@ </svg>`; const img = new Image(); - img.width = 200; - img.height = 200; + img.width = {{ size[0] }}; + img.height = {{ size[1] }}; img.onload = () => { ctx.fillStyle = 'rgba(0, 0, 255, 1)'; @@ -157,7 +157,7 @@ circle.arc(90, 90, 45, 0, 2 * Math.PI); ctx.fill(circle); - %(render-states)s + {{ render_states }} ctx.drawImage(img, 0, 0); }; @@ -167,7 +167,7 @@ - name: 2d.layer.nested desc: Tests nested canvas layers. - size: 200, 200 + size: [200, 200] code: | var circle = new Path2D(); circle.arc(90, 90, 40, 0, 2 * Math.PI); @@ -220,7 +220,7 @@ - name: 2d.layer.restore-style desc: Test that ensure layers restores style values upon endLayer. - size: 200, 200 + size: [200, 200] fuzzy: maxDifference=0-1; totalPixels=0-950 code: | ctx.fillStyle = 'rgba(0,0,255,1)'; @@ -249,7 +249,7 @@ - name: 2d.layer.unclosed desc: Check that layers are rendered even if not closed. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'purple'; ctx.fillRect(60, 60, 75, 50); @@ -274,7 +274,7 @@ - name: 2d.layer.render-opportunities desc: Check that layers state stack is flushed and rebuilt on frame renders. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'purple'; ctx.fillRect(60, 60, 75, 50); @@ -286,7 +286,7 @@ ctx.fillRect(50, 50, 75, 50); // Force a flush and restoration of the state stack: - %(flush_canvas)s + {{ flush_canvas }} ctx.fillRect(70, 70, 75, 50); ctx.fillStyle = 'orange'; @@ -324,11 +324,11 @@ flush_canvas: createImageBitmap(canvas); drawImage: flush_canvas: |- - const canvas2 = new OffscreenCanvas(200, 200); + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); const ctx2 = canvas2.getContext('2d'); ctx2.drawImage(canvas, 0, 0); getImageData: - flush_canvas: ctx.getImageData(0, 0, 200, 200); + flush_canvas: ctx.getImageData(0, 0, {{ size[0] }}, {{ size[1] }}); requestAnimationFrame: canvasType: ['HTMLCanvas'] test_type: "promise" @@ -336,7 +336,7 @@ await new Promise(resolve => requestAnimationFrame(resolve)); putImageData: flush_canvas: |- - const canvas2 = new OffscreenCanvas(200, 200); + const canvas2 = new OffscreenCanvas({{ size[0] }}, {{ size[1] }}); const ctx2 = canvas2.getContext('2d'); ctx.putImageData(ctx2.getImageData(0, 0, 1, 1), 0, 0); toBlob: @@ -351,7 +351,7 @@ - name: 2d.layer.render-opportunities.transferToImageBitmap desc: Checks that transferToImageBitmap flushes and rebuilds the state stack. - size: 200, 200 + size: [200, 200] canvasType: ['OffscreenCanvas', 'Worker'] code: | ctx.fillStyle = 'purple'; @@ -391,7 +391,7 @@ desc: >- Test to ensure beginlayer works for filter, alpha and shadow, even with consecutive layers. - size: 500, 500 + size: [500, 500] fuzzy: maxDifference=0-3; totalPixels=0-6318 code: | ctx.fillStyle = 'rgba(0, 0, 255, 1)'; @@ -441,7 +441,7 @@ desc: >- A test to make sure an unmatched endLayer is a no-op and has no effect on the code following it. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'rgba(0, 0, 255, 1)'; ctx.fillRect(60, 60, 75, 50); @@ -473,7 +473,7 @@ - name: 2d.layer.endlayer.alone desc: A test to make sure a single endLayer with no beginLayer is a no-op. - size: 200, 200 + size: [200, 200] code: | ctx.fillStyle = 'rgba(0, 0, 255, 1)'; ctx.fillRect(60, 60, 75, 50); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/resources/iframe-test.js b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/resources/iframe-test.js index f788cbd1ebd..f13e7686902 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/resources/iframe-test.js +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/resources/iframe-test.js @@ -86,6 +86,13 @@ function popupOpeningScript(popup_via, popup_url, popup_origin, headers, assert_not_reached('Unrecognized popup opening method.'); } +function promise_test_parallel(promise, description) { + async_test(test => { + promise(test) + .then(() => test.done()) + .catch(test.step_func(error => { throw error; })); + }, description); +}; // Verifies that a popup with origin `popup_origin` and headers `headers` has // the expected `opener_state` after being opened from an iframe with origin @@ -93,7 +100,7 @@ function popupOpeningScript(popup_via, popup_url, popup_origin, headers, function iframe_test(description, iframe_origin, popup_origin, headers, expected_opener_state) { for (const popup_via of ['window_open', 'anchor','form']) { - promise_test(async t => { + promise_test_parallel(async t => { const iframe_token = token(); const popup_token = token(); const reply_token = token(); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html index 740ff2595aa..8cf2679e190 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-to-so.https.html @@ -1,10 +1,14 @@ <!doctype html> <meta charset=utf-8> <meta name=timeout content=long> -<meta name="variant" content="?1-2"> -<meta name="variant" content="?3-4"> -<meta name="variant" content="?5-6"> -<meta name="variant" content="?7-8"> +<meta name="variant" content="?1-1"> +<meta name="variant" content="?2-2"> +<meta name="variant" content="?3-3"> +<meta name="variant" content="?4-4"> +<meta name="variant" content="?5-5"> +<meta name="variant" content="?6-6"> +<meta name="variant" content="?7-7"> +<meta name="variant" content="?8-8"> <meta name="variant" content="?9-last"> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> diff --git a/tests/wpt/web-platform-tests/html/rendering/dimension-attributes.html b/tests/wpt/web-platform-tests/html/rendering/dimension-attributes.html index f3dc8f81718..1d94205e0b1 100644 --- a/tests/wpt/web-platform-tests/html/rendering/dimension-attributes.html +++ b/tests/wpt/web-platform-tests/html/rendering/dimension-attributes.html @@ -137,17 +137,10 @@ const tests = [ [ newElem("img"), "height", "height", true ], [ newElem("td"), "width", "width", false ], [ newElem("td"), "height", "height", false ], - // https://github.com/whatwg/html/issues/4715 tracks the fact that for - // <table width> and <table height> the "0 is valid" boolean should probably - // be true. [ newElem("table"), "width", "width", false ], - [ newElem("table"), "height", "height", false ], - // https://github.com/whatwg/html/issues/4716 tracks the fact that for the - // <tr height> case that "0 is valid" boolean should probably be true. - [ newElem("tr"), "height", "height", false ], - // https://github.com/whatwg/html/issues/4717 tracks the fact that for the - // <col width> case that "0 is valid" boolean should probably be true. - [ newElem("col"), "width", "width", false ], + [ newElem("table"), "height", "height", true ], + [ newElem("tr"), "height", "height", true ], + [ newElem("col"), "width", "width", true ], [ newElem("embed"), "hspace", "marginLeft", true ], [ newElem("embed"), "hspace", "marginRight", true ], [ newElem("embed"), "vspace", "marginTop", true ], diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html new file mode 100644 index 00000000000..d3784671b86 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations-lazy.html @@ -0,0 +1,78 @@ +<!doctype html> +<title>img relevant mutations, lazy-loaded</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/relevant-mutations.js"></script> +<div id=log></div> + +<img src="/images/green-2x2.png"> <!-- block the window load event --> + +<!-- should invoke update the image data, but omit events for layout changes --> +<!-- but also see https://github.com/whatwg/html/issues/8492 --> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" width="2" loading="lazy" data-desc="width attribute changes"> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 2px" loading="lazy" data-desc="width property changes"> + +<div style="width: 2px"> + <img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 100%" loading="lazy" data-desc="percentage width, CB width changes"> +</div> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="height: 2px; aspect-ratio: 2 / 2" loading="lazy" data-desc="height property changes (with aspect-ratio)"> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 2px" loading="lazy" data-desc="being rendered changes"> + +<!-- should not invoke update the image data --> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 2px" loading="lazy" data-desc="loading attribute state changes"> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 2px" loading="lazy" data-desc="display property changes to inline-block"> + +<img srcset="/images/green-2x2.png 2w" sizes="auto" style="width: 2px" loading="lazy" data-desc="loading attribute changes to LAZY"> + +<script> +const rAF = () => new Promise(resolve => requestAnimationFrame(resolve)); + +onload = async function() { + + await rAF(); + await rAF(); + + // lazy-loaded images should have fired their first 'load' event at this point. + + t('width attribute changes', function(img) { + img.width = '4'; + }, 'load'); + + t('width property changes', function(img) { + img.style.width = '4px'; + }, 'timeout'); + + t('percentage width, CB width changes', function(img) { + img.parentNode.style.width = '4px'; + }, 'timeout'); + + t('height property changes (with aspect-ratio)', function(img) { + img.style.height = '4px'; + }, 'timeout'); + + t('loading attribute state changes', function(img) { + img.loading = 'eager'; + }, 'timeout'); + + t('being rendered changes', function(img) { + img.style.display = 'none'; + }, 'timeout'); + + t('display property changes to inline-block', function(img) { + img.style.display = 'inline-block'; + }, 'timeout'); + + t('loading attribute changes to LAZY', function(img) { + img.setAttribute('loading', 'LAZY'); + }, 'timeout'); + + done(); +}; +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html index 2f1031bf832..24e15543cd8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html @@ -3,6 +3,7 @@ <meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="support/relevant-mutations.js"></script> <div id=log></div> <!-- should invoke update the image data --> @@ -152,22 +153,6 @@ <script> -setup({explicit_done:true}); - -function t(desc, func, expect) { - async_test(function() { - var img = document.querySelector('[data-desc="' + desc + '"]'); - img.onload = img.onerror = this.unreached_func('update the image data was run'); - if (expect == 'timeout') { - setTimeout(this.step_func_done(), 1000); - } else { - img['on' + expect] = this.step_func_done(); - setTimeout(this.unreached_func('update the image data didn\'t run'), 1000); - } - func.call(this, img); - }, desc); -} - onload = function() { t('src set', function(img) { diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html new file mode 100644 index 00000000000..41385edd33f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html @@ -0,0 +1,147 @@ +<!doctype html> +<title>img parse a sizes attribute: sizes=auto</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +img { height: 10px; } /* Keep all images in the viewport, so lazy images load */ +#narrow-div { width: 10px; } +#wide-div { width: 500px; } +</style> +<div id=log></div> +<script src="support/parse-a-sizes-attribute.js"></script> +<img srcset='/images/green-1x1.png?ref1 50w, /images/green-16x16.png?ref1 51w' sizes='1px' id=ref1> +<img srcset='/images/green-1x1.png?ref2 50w, /images/green-16x16.png?ref2 51w' sizes='100vw' id=ref2> +<div id='narrow-div'></div> +<div id='wide-div'></div> +<script> +"use strict"; + +// https://github.com/web-platform-tests/rfcs/pull/75 +let async_promise_test = (promise, description) => { + async_test(test => { + promise(test) + .then(() => {test.done();}) + .catch(test.step_func(error => { throw error; })); + }, description); +}; + +function check(imgOrPicture) { + let img = imgOrPicture; + let source; + if (imgOrPicture.localName === 'picture') { + source = imgOrPicture.firstChild; + img = imgOrPicture.lastChild; + } + const ref = document.getElementById(img.dataset.ref); + async_promise_test(async (t) => { + let expect = ref.currentSrc; + if (expect) { + expect = expect.split('?')[0]; + } + if (expect === '' || expect === null || expect === undefined) { + assert_unreached('ref currentSrc was ' + format_value(expect)); + } + await new Promise((resolve, reject) => { + img.onload = resolve; + img.onerror = reject; + }); + t.step(() => { + let got = img.currentSrc; + assert_greater_than(got.indexOf('?'), -1, 'expected a "?" in currentSrc'); + got = got.split('?')[0]; + assert_equals(got, expect); + }) + }, imgOrPicture.outerHTML); +} + +const tests = [ + // Smoke tests + {sizes: '1px', 'data-ref': 'ref1'}, + {sizes: '', 'data-ref': 'ref2'}, + // Actual tests + {loading: 'lazy', sizes: 'auto', width: '10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'AUTO', width: '10', 'data-ref': 'ref1'}, + {loading: 'lazy', width: '10', 'data-ref': 'ref1'}, + {loading: 'lazy', style: 'width: 10px', 'data-ref': 'ref1'}, + {loading: 'lazy', style: 'max-width: 10px', 'data-ref': 'ref2'}, // no specified width -> 0 -> 100vw + {loading: 'lazy', style: 'width: 100%; max-width: 10px', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', width: '500', 'data-ref': 'ref2'}, + {loading: 'lazy', sizes: 'auto', width: '10', style: 'visibility: hidden', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', width: '10', style: 'display: inline', hidden: '', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', width: '0', 'data-ref': 'ref2'}, // 0 -> 100vw + {loading: 'lazy', sizes: 'auto', style: 'width: 0px', 'data-ref': 'ref2'}, // 0 -> 100vw + {loading: 'lazy', sizes: 'auto', 'data-ref': 'ref2'}, // no specified width -> 0 -> 100vw + {loading: 'lazy', sizes: 'auto, 100vw', width: '10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: '100vw, auto', width: '10', 'data-ref': 'ref2'}, + {loading: 'eager', sizes: 'auto', width: '10', 'data-ref': 'ref2'}, + {loading: 'lazy', sizes: 'auto', width: '100%', parent: 'narrow-div', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', width: '100%', parent: 'wide-div', 'data-ref': 'ref2'}, + {loading: 'lazy', sizes: 'auto', style: 'height: 10px; aspect-ratio: 10 / 10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'height: 10px; aspect-ratio: 500 / 10', 'data-ref': 'ref2'}, + {loading: 'lazy', sizes: 'auto', style: 'min-height: 10px; aspect-ratio: 10 / 10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'min-height: 10px; aspect-ratio: 500 / 10', 'data-ref': 'ref2'}, + {loading: 'lazy', sizes: 'auto', style: 'inline-size: 10px', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'min-inline-size: 10px', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'block-size: 10px; aspect-ratio: 10 / 10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'min-block-size: 10px; aspect-ratio: 10 / 10', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'block-size: 10px; writing-mode: vertical-rl', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'min-block-size: 10px; writing-mode: vertical-rl', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'min-inline-size: 10px; aspect-ratio: 10/10; writing-mode: vertical-rl', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: '--my-width: 10px; width: var(--my-width)', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'width: calc(5px + 5px)', 'data-ref': 'ref1'}, + {loading: 'lazy', sizes: 'auto', style: 'position: absolute; left: 50%; right: 49%', 'data-ref': 'ref2'}, // replaced elements don't get the width resolved from 'left'/'right' per https://drafts.csswg.org/css2/#abs-replaced-width +]; + +function test_img(obj, i) { + const img = document.createElement('img'); + let parent = document.body; + for (const attr in obj) { + if (attr === 'parent') { + parent = document.getElementById(obj.parent); + } else { + img.setAttribute(attr, obj[attr]); + } + } + img.srcset = `/images/green-1x1.png?img${i} 50w, /images/green-16x16.png?img${i} 51w` + parent.appendChild(img); + check(img); +} + +function test_picture(obj, i) { + const picture = document.createElement('picture'); + const source = document.createElement('source'); + const img = document.createElement('img'); + let parent = document.body; + for (const attr in obj) { + switch (attr) { + case 'parent': + parent = document.getElementById(obj.parent); + break; + case 'sizes': + case 'type': + case 'media': + source.setAttribute(attr, obj[attr]); + break; + default: + img.setAttribute(attr, obj[attr]); + break; + } + } + source.srcset = `/images/green-1x1.png?picture${i} 50w, /images/green-16x16.png?picture${i} 51w`; + picture.appendChild(source); + picture.appendChild(img); + parent.appendChild(picture); + check(picture); +} + +onload = () => { + let i = 0; + for (const obj of tests) { + i++; + test_img(obj, i); + test_picture(obj, i); + } + done(); +} +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html index 7602dd8fce1..1f80ad2f917 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/support/sizes-iframed.sub.html @@ -159,7 +159,6 @@ <img srcset='/images/green-1x1.png?f19 50w, /images/green-16x16.png?f19 51w' data-foo='1' sizes='attr(data-foo, px, 1px)'> <img srcset='/images/green-1x1.png?f20 50w, /images/green-16x16.png?f20 51w' sizes='toggle(1px)'> <img srcset='/images/green-1x1.png?f21 50w, /images/green-16x16.png?f21 51w' sizes='inherit'> -<img srcset='/images/green-1x1.png?f22 50w, /images/green-16x16.png?f22 51w' sizes='auto'> <img srcset='/images/green-1x1.png?f23 50w, /images/green-16x16.png?f23 51w' sizes='initial'> <img srcset='/images/green-1x1.png?f24 50w, /images/green-16x16.png?f24 51w' sizes='unset'> <img srcset='/images/green-1x1.png?f25 50w, /images/green-16x16.png?f25 51w' sizes='default'> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/support/relevant-mutations.js b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/support/relevant-mutations.js new file mode 100644 index 00000000000..7105b037084 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/support/relevant-mutations.js @@ -0,0 +1,15 @@ +setup({explicit_done:true}); + +function t(desc, func, expect) { + async_test(function() { + var img = document.querySelector('[data-desc="' + desc + '"]'); + img.onload = img.onerror = this.unreached_func('update the image data was run'); + if (expect == 'timeout') { + setTimeout(this.step_func_done(), 1000); + } else { + img['on' + expect] = this.step_func_done(); + setTimeout(this.unreached_func('update the image data didn\'t run'), 1000); + } + func.call(this, img); + }, desc); +} diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html index 98bb065de7b..230492022c0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html @@ -112,6 +112,19 @@ assert_equals(document.activeElement, priorFocus, 'prior element should get focus on hide, or if focus didn\'t shift on show, focus should stay where it was'); assert_false(isElementVisible(popover)); + // Manual popover does not restore focus + popover.popover = 'manual'; + priorFocus.focus(); + assert_equals(document.activeElement, priorFocus); + popover.showPopover(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popover.showPopover()`); + popover.hidePopover(); + if (!popover.hasAttribute('data-no-focus')) { + assert_not_equals(document.activeElement, priorFocus, 'prior element should *not* get focus when the popover is manual'); + } + assert_false(isElementVisible(popover)); + popover.popover = 'auto'; + // Hit Escape: priorFocus.focus(); assert_equals(document.activeElement, priorFocus); diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html index 59a12a2c9ac..0f206f1c700 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html @@ -587,3 +587,30 @@ promise_test(async () => { p20.hidePopover(); // Cleanup },'Show an unrelated popover during "hide popover"'); </script> + +<div id=p21 popover>21 + <div id=p22 popover>22</div> + <div id=p23 popover>23</div> + <div id=p24 popover>24</div> +</div> + +<script> +promise_test(async () => { + p21.showPopover(); + p22.showPopover(); + let events = []; + const logEvents = (e) => { events.push(`${e.newState === 'open' ? 'show' : 'hide'} ${e.target.id}`) }; + p22.addEventListener('beforetoggle', (e) => { + logEvents(e); + p24.showPopover() + }); + p23.addEventListener('beforetoggle', logEvents); + p24.addEventListener('beforetoggle', logEvents); + p23.showPopover(); + assert_array_equals(events, ['show p23', 'hide p22', 'show p24'], 'hiding p24 does not fire event'); + assert_false(p22.matches(':popover-open')); + assert_true(p23.matches(':popover-open')); + assert_false(p24.matches(':popover-open')); + p21.hidePopover(); // Cleanup +},'Show other auto popover during "hide all popover until"'); +</script> diff --git a/tests/wpt/web-platform-tests/images/anim-poster-gr.png b/tests/wpt/web-platform-tests/images/anim-poster-gr.png Binary files differdeleted file mode 100644 index 6941207373e..00000000000 --- a/tests/wpt/web-platform-tests/images/anim-poster-gr.png +++ /dev/null diff --git a/tests/wpt/web-platform-tests/interfaces/turtledove.idl b/tests/wpt/web-platform-tests/interfaces/turtledove.idl index 8add667b575..f5867e995a8 100644 --- a/tests/wpt/web-platform-tests/interfaces/turtledove.idl +++ b/tests/wpt/web-platform-tests/interfaces/turtledove.idl @@ -95,6 +95,7 @@ interface InterestGroupScoringScriptRunnerGlobalScope interface InterestGroupReportingScriptRunnerGlobalScope : InterestGroupScriptRunnerGlobalScope { undefined sendReportTo(DOMString url); + undefined registerAdBeacon(record<DOMString, USVString> map); }; dictionary AdRender { diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl index 59710bf46c2..6dd2ba3fffa 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl @@ -27,7 +27,7 @@ typedef [EnforceRange] unsigned long long SmallCryptoKeyID; typedef (SmallCryptoKeyID or bigint) CryptoKeyID; [Exposed=(Window,DedicatedWorker)] -interface SFrameTransform { +interface SFrameTransform : EventTarget { constructor(optional SFrameTransformOptions options = {}); Promise<undefined> setEncryptionKey(CryptoKey key, optional CryptoKeyID keyID); attribute EventHandler onerror; diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-disallowed-when-hidden.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-disallowed-when-hidden.https.html new file mode 100644 index 00000000000..aa59cde2ef0 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-disallowed-when-hidden.https.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for PaymentRequest.show() method - should fail when tab is not visible</title> +<link rel="help" href="https://w3c.github.io/payment-request/#show-method"> +<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> +<!-- For minimize() --> +<script src="/page-visibility/resources/window_state_context.js"></script> +<script> +'use strict'; + +promise_test(async t => { + const {minimize, restore} = window_state_context(t); + + const request = new PaymentRequest([ + { + supportedMethods: "https://apple.com/apple-pay", + data: { + version: 3, + merchantIdentifier: "merchant.com.example", + countryCode: "US", + merchantCapabilities: ["supports3DS"], + supportedNetworks: ["visa"], + }, + }, + ], { + total: { + label: "Total", + amount: { + currency: "USD", + value: "1.00", + }, + } + }); + + // Before we trigger the Payment Request, minimize the window. This should + // cause the show() call to be rejected. + await minimize(); + assert_equals(document.hidden, true); + + await test_driver.bless('user activation'); + return promise_rejects_dom(t, "AbortError", request.show()); +}, 'PaymentRequest.show() cannot be triggered from a hidden context'); +</script> diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html new file mode 100644 index 00000000000..211ca7445df --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script> + test(function() { + var wildcard_origin = 'https://*:{{ports[https][0]}}'; + assert_array_equals( + document.featurePolicy.getAllowlistForFeature('fullscreen'), + [wildcard_origin]); + assert_true(document.featurePolicy.allowsFeature('fullscreen')); + }, 'Test wildcard host policy works as expected'); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html.sub.headers new file mode 100644 index 00000000000..81d0de836ea --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-host-wildcard.https.sub.html.sub.headers @@ -0,0 +1 @@ +Permissions-Policy: fullscreen=("https://*:{{ports[https][0]}}") diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html new file mode 100644 index 00000000000..adb657023ea --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script> + test(function() { + var wildcard_origin = 'https://{{domains[]}}:*'; + assert_array_equals( + document.featurePolicy.getAllowlistForFeature('fullscreen'), + [wildcard_origin]); + assert_true(document.featurePolicy.allowsFeature('fullscreen')); + }, 'Test wildcard port policy works as expected'); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html.sub.headers new file mode 100644 index 00000000000..b813167ee62 --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-port-wildcard.https.sub.html.sub.headers @@ -0,0 +1 @@ +Permissions-Policy: fullscreen=("https://{{domains[]}}:*") diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html new file mode 100644 index 00000000000..eab3e8f697f --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script> + test(function() { + var wildcard_origin = 'https:'; + assert_array_equals( + document.featurePolicy.getAllowlistForFeature('fullscreen'), + [wildcard_origin]); + assert_true(document.featurePolicy.allowsFeature('fullscreen')); + }, 'Test scheme only policy works as expected'); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html.sub.headers new file mode 100644 index 00000000000..14d0868f2bb --- /dev/null +++ b/tests/wpt/web-platform-tests/permissions-policy/experimental-features/permissions-policy-header-scheme-only.https.sub.html.sub.headers @@ -0,0 +1 @@ +Permissions-Policy: fullscreen=("https:") diff --git a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers index d9facde69e0..648e3ac75e6 100644 --- a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers +++ b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers @@ -1 +1 @@ -Permissions-Policy: fullscreen=("*://{{domains[]}}:{{ports[https][0]}}" "https://{{domains[]}}:*" "https://*.*.{{domains[]}}:{{ports[https][0]}}" "https://example.*.{{domains[]}}:{{ports[https][0]}}" "https://*.example.com" self) +Permissions-Policy: fullscreen=("*://{{domains[]}}:{{ports[https][0]}}" "https://*.*.{{domains[]}}:{{ports[https][0]}}" "https://example.*.{{domains[]}}:{{ports[https][0]}}" "https://*.example.com" self) diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-ref.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-ref.html new file mode 100644 index 00000000000..ea3215e3590 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-ref.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/"> +<script src="/web-animations/testcommon.js"></script> +<style> + .scroller { + height: 200px; + width: 500px; + overflow: auto; + position: absolute; + top: 100px; + } + + .anim { + position: absolute; + width: 100px; + height: 100px; + background: darkred; + view-timeline: --view; + } + .spacer { + height: 1000px; + } + + .before { + top: 450px; + } + .after { + top: 50px; + } + .indicator { + position: fixed; + top: 315px; + } + + .after .indicator { + left: 200px; + } + + .indicator > div { + display: inline-block; + width: 25px; + height: 25px; + position: relative; + border-radius: 100%; + box-sizing: border-box; + border: 2px solid black; + padding: 3px; + background: lightgray; + background-clip: content-box; + } + + .indicator > div > div { + width: 100%; + height: 100%; + border-radius: 100%; + background: green; + opacity: 0; + } +</style> +</head> +<body> + <p>Neither of the activity indicators should be active as both of the observed elements are out of view.</p> + <div class="scroller"> + <div class="anim after"><div class="indicator">After phase: <div><div></div></div></div></div> + <div class="anim before"><div class="indicator">Before phase: <div><div></div></div></div></div> + <div class="spacer"></div> + </div> +</body> +<script> + let scroller = document.querySelector('.scroller'); + scroller.scrollTo(0, 200); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-test.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-test.html new file mode 100644 index 00000000000..c0021a1fbc2 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-inactive-outside-range-test.html @@ -0,0 +1,97 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/"> +<link rel="match" href="animation-inactive-outside-range-ref.html"> +<script src="/common/reftest-wait.js"></script> +<script src="/web-animations/testcommon.js"></script> +<style> + .scroller { + height: 200px; + width: 500px; + overflow: auto; + position: absolute; + top: 100px; + } + + .anim { + position: absolute; + width: 100px; + height: 100px; + background: darkred; + view-timeline: --view; + } + .spacer { + height: 1000px; + } + + .before { + top: 450px; + } + .after { + top: 50px; + } + @keyframes active-opacity { + 0% { opacity: 1; } + 100% { opacity: 1; } + } + .indicator { + position: fixed; + top: 315px; + } + + .after .indicator { + left: 200px; + } + + .indicator > div { + display: inline-block; + width: 25px; + height: 25px; + position: relative; + border-radius: 100%; + box-sizing: border-box; + border: 2px solid black; + padding: 3px; + background: lightgray; + background-clip: content-box; + } + + .indicator > div > div { + width: 100%; + height: 100%; + border-radius: 100%; + background: green; + opacity: 0; + animation: active-opacity; + animation-timeline: --view; + } +</style> +</head> +<body> + <p>Neither of the activity indicators should be active as both of the observed elements are out of view.</p> + <div class="scroller"> + <div class="anim after"><div class="indicator">After phase: <div><div></div></div></div></div> + <div class="anim before"><div class="indicator">Before phase: <div><div></div></div></div></div> + <div class="spacer"></div> + </div> +</body> +<script> + async function run() { + let scroller = document.querySelector('.scroller'); + // Scroll such that each animation becomes active. + scroller.scrollTo(0, 0); + await waitForCompositorReady(); + scroller.scrollTo(0, 400); + await waitForNextFrame(); + + // Then scroll between them so that we are before one and after the other. + scroller.scrollTo(0, 200); + await waitForNextFrame(); + takeScreenshot(); + } + run(); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html index 4a6624caf43..b9efbb428bd 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html @@ -65,7 +65,7 @@ element.setAttribute('id', 'element'); container.append(element); }); - func(); + await func(); } finally { while (container.firstChild) container.firstChild.remove(); @@ -73,63 +73,81 @@ }, description); } - test_animation_timeline(() => { + test_animation_timeline(async () => { + let animation = element.getAnimations()[0]; assert_equals(getComputedStyle(element).width, '120px'); element.style = 'animation-timeline:--timeline2'; + await animation.ready; + assert_equals(getComputedStyle(element).width, '140px'); }, 'Changing animation-timeline changes the timeline (sanity check)'); - test_animation_timeline(() => { + test_animation_timeline(async () => { + let animation = element.getAnimations()[0]; assert_equals(getComputedStyle(element).width, '120px'); // Set a (non-CSS) ScrollTimeline on the CSSAnimation. let timeline4 = new ScrollTimeline({ source: scroller4 }); - element.getAnimations()[0].timeline = timeline4; + animation.timeline = timeline4; + await animation.ready; assert_equals(getComputedStyle(element).width, '180px'); // Changing the animation-timeline property should have no effect. element.style = 'animation-timeline:--timeline2'; + await animation.ready; + assert_equals(getComputedStyle(element).width, '180px'); }, 'animation-timeline ignored after setting timeline with JS ' + '(ScrollTimeline from JS)'); - test_animation_timeline(() => { + test_animation_timeline(async () => { + let animation = element.getAnimations()[0]; assert_equals(getComputedStyle(element).width, '120px'); - let animation = element.getAnimations()[0]; let timeline1 = animation.timeline; element.style = 'animation-timeline:--timeline2'; + await animation.ready; assert_equals(getComputedStyle(element).width, '140px'); animation.timeline = timeline1; + await animation.ready; + assert_equals(getComputedStyle(element).width, '120px'); // Should have no effect. element.style = 'animation-timeline:--timeline3'; + await animation.ready; + assert_equals(getComputedStyle(element).width, '120px'); }, 'animation-timeline ignored after setting timeline with JS ' + '(ScrollTimeline from CSS)'); - test_animation_timeline(() => { + test_animation_timeline(async () => { + let animation = element.getAnimations()[0]; assert_equals(getComputedStyle(element).width, '120px'); - element.getAnimations()[0].timeline = document.timeline; + animation.timeline = document.timeline; + await animation.ready; // (The animation continues from where the previous timeline left it). assert_equals(getComputedStyle(element).width, '120px'); // Changing the animation-timeline property should have no effect. element.style = 'animation-timeline:--timeline2'; + await animation.ready; assert_equals(getComputedStyle(element).width, '120px'); }, 'animation-timeline ignored after setting timeline with JS (document timeline)'); - test_animation_timeline(() => { + test_animation_timeline(async () => { + let animation = element.getAnimations()[0]; assert_equals(getComputedStyle(element).width, '120px'); - element.getAnimations()[0].timeline = null; + animation.timeline = null; + assert_false(animation.pending); assert_equals(getComputedStyle(element).width, '120px'); // Changing the animation-timeline property should have no effect. element.style = 'animation-timeline:--timeline2'; + assert_false(animation.pending); assert_equals(getComputedStyle(element).width, '120px'); }, 'animation-timeline ignored after setting timeline with JS (null)'); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/intrinsic-iteration-duration.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/intrinsic-iteration-duration.tentative.html new file mode 100644 index 00000000000..4bcea1adba3 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/intrinsic-iteration-duration.tentative.html @@ -0,0 +1,78 @@ +<!doctype html> +<meta charset=utf-8> +<title>Scroll based animation: AnimationEffect.getComputedTiming</title> +<link rel="help" href="https://www.w3.org/TR/web-animations-2/#dom-animationeffect-getcomputedtiming"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="testcommon.js"></script> +<style> + .scroller { + overflow: auto; + height: 100px; + width: 100px; + will-change: transform; + } + .contents { + height: 1000px; + width: 100%; + } +</style> +<body> +<div id="log"></div> +<script type="text/javascript"> + +//------------------------------------ +// Time-based duration +//------------------------------------ + +test(t => { + const anim = createScrollLinkedAnimationWithTiming(t, {duration: 1000 }); + assert_equals(anim.effect.getTiming().duration, 1000); + assert_percents_equal(anim.effect.getComputedTiming().duration, 100); +}, 'Computed duration in percent even when specified in ms'); + +test(t => { + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 1000 }); + anim.rangeStart = { offset: CSS.percent(20) }; + anim.rangeEnd = { offset: CSS.percent(80) }; + assert_equals(anim.effect.getTiming().duration, 1000); + assert_percents_equal(anim.effect.getComputedTiming().duration, 60); +}, 'Time-based duration normalized to fill animation range.'); + +test(t => { + const anim = + createScrollLinkedAnimationWithTiming( + t, {duration: 700, delay: 100, endDelay: 200 }); + assert_equals(anim.effect.getTiming().duration, 700); + assert_percents_equal(anim.effect.getComputedTiming().duration, 70); +}, 'Time-based duration normalized to preserve proportional delays.'); + +//------------------------------------------------- +// Duration 'auto' = Intrinsic iteration duration +//------------------------------------------------- + +test(t => { + const anim = createScrollLinkedAnimationWithTiming(t, {}); + assert_equals(anim.effect.getTiming().duration, 'auto'); + assert_percents_equal(anim.effect.getComputedTiming().duration, 100); +}, 'Intrinsic iteration duration fills timeline.'); + +test(t => { + const anim = createScrollLinkedAnimationWithTiming(t, {}); + anim.rangeStart = { offset: CSS.percent(30) }; + anim.rangeEnd = { offset: CSS.percent(90) }; + assert_equals(anim.effect.getTiming().duration, 'auto'); + assert_percents_equal(anim.effect.getComputedTiming().duration, 60); +}, 'Intrinsic iteration duration accounts for animation range.'); + +test(t => { + const anim = + createScrollLinkedAnimationWithTiming( + t, { iterations: 4 }); + assert_equals(anim.effect.getTiming().duration, 'auto'); + assert_percents_equal(anim.effect.getComputedTiming().duration, 25); +}, 'Intrinsic iteration duration accounts for number of iterations'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-range.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-range.html new file mode 100644 index 00000000000..cc844cb748e --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-range.html @@ -0,0 +1,185 @@ +<!DOCTYPE html> +<title>Scroll timelines and animation attachment ranges</title> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#named-timeline-range"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#animation-range"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="support/testcommon.js"></script> +<style> + #scroller { + overflow-y: scroll; + width: 200px; + height: 200px; + scroll-timeline: --t1; + } + .spacer { + height: 1100px; + } + #target { + height: 100px; + width: 0; + font-size: 10px; + background-color: green; + } + @keyframes grow { + to { width: 200px } + } + .anim-1 { + animation: auto grow linear; + animation-timeline: --t1; + animation-range-start: 25%; + animation-range-end: 75%; + } + .anim-2 { + animation: auto grow linear; + animation-timeline: --t1; + animation-range-start: 40px; + animation-range-end: 700px; + } + .anim-3 { + animation: auto grow linear; + animation-timeline: --t1; + animation-range-start: calc(30% + 40px); + animation-range-end: calc(70% - 20px); + } + .anim-4 { + animation: auto grow linear; + animation-timeline: --t1; + animation-range-start: 5em; + animation-range-end: calc(100% - 5em); + } + +</style> +<div id=scroller> + <div id=target></div> + <div class=spacer></div> +</div> +<script> + // Test via web-animation API. + + async function test_range_waapi(t, options) { + const timeline = new ScrollTimeline({source: scroller, axis: 'block'}); + const anim = + target.animate([{ width: "200px" }], + { + timeline: timeline, + rangeStart: options.rangeStart, + rangeEnd: options.rangeEnd + }); + t.add_cleanup(() => { + anim.cancel(); + }); + await anim.ready; + scroller.scrollTop = 600; + await waitForNextFrame(); + + const expectedProgress = + (600 - options.startOffset) / (options.endOffset - options.startOffset); + assert_approx_equals(anim.effect.getComputedTiming().progress, + expectedProgress, 0.001); + } + + promise_test(async t => { + await test_range_waapi(t, { + rangeStart: "25%", + rangeEnd: "75%", + startOffset: 250, + endOffset: 750 + }); + }, 'Scroll timeline with percentage range [JavaScript API]'); + + promise_test(async t => { + await test_range_waapi(t, { + rangeStart: "40px", + rangeEnd: "700px", + startOffset: 40, + endOffset: 700 + }); + }, 'Scroll timeline with px range [JavaScript API]'); + + promise_test(async t => { + await test_range_waapi(t, { + rangeStart: "calc(30% + 40px)", + rangeEnd: "calc(70% - 20px)", + startOffset: 340, + endOffset: 680 + }); + }, 'Scroll timeline with calculated range [JavaScript API]'); + +promise_test(async t => { + t.add_cleanup(() => { + target.style.fontSize = ''; + }); + await test_range_waapi(t, { + rangeStart: "5em", + rangeEnd: "calc(100% - 5em)", + startOffset: 50, + endOffset: 950 + }); + target.style.fontSize = '20px'; + await waitForNextFrame(); + const anim = target.getAnimations()[0]; + const expectedProgress = (600 - 100) / (900 - 100); + assert_approx_equals(anim.effect.getComputedTiming().progress, + expectedProgress, 0.001); + }, 'Scroll timeline with EM range [JavaScript API]'); + + // Test via CSS. + async function test_range_css(t, options) { + t.add_cleanup(() => { + target.classList.remove(options.animation); + }); + target.classList.add(options.animation); + const anim = target.getAnimations()[0]; + await anim.ready; + scroller.scrollTop = 600; + await waitForNextFrame(); + + const expectedProgress = + (600 - options.startOffset) / (options.endOffset - options.startOffset); + assert_approx_equals(anim.effect.getComputedTiming().progress, + expectedProgress, 0.001); + } + + promise_test(async t => { + await test_range_css(t, { + animation: "anim-1", + startOffset: 250, + endOffset: 750 + }); + }, 'Scroll timeline with percentage range [CSS]'); + + promise_test(async t => { + await test_range_css(t, { + animation: "anim-2", + startOffset: 40, + endOffset: 700 + }); + }, 'Scroll timeline with px range [CSS]'); + + promise_test(async t => { + await test_range_css(t, { + animation: "anim-3", + startOffset: 340, + endOffset: 680 + }); + }, 'Scroll timeline with calculated range [CSS]'); + +promise_test(async t => { + t.add_cleanup(() => { + target.style.fontSize = ''; + }); + await test_range_css(t, { + animation: "anim-4", + startOffset: 50, + endOffset: 950 + }); + target.style.fontSize = '20px'; + await waitForNextFrame(); + const anim = target.getAnimations()[0]; + const expectedProgress = (600 - 100) / (900 - 100); + assert_approx_equals(anim.effect.getComputedTiming().progress, + expectedProgress, 0.001); + }, 'Scroll timeline with EM range [CSS]'); +</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/set-current-time-before-play.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/set-current-time-before-play.html index cd3faeeee46..280346e755f 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/set-current-time-before-play.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/set-current-time-before-play.html @@ -40,30 +40,36 @@ </div> <script> - const box = document.getElementById('box'); - const effect = new KeyframeEffect(box, - [ - { transform: 'translateY(0)', opacity: 1}, - { transform: 'translateY(200px)', opacity: 0} - ], { - duration: 1000, - } - ); + async function runTest() { + await waitForCompositorReady(); - const scroller = document.getElementById('scroller'); - const timeline = new ScrollTimeline( - { source: scroller, orientation: 'block' }); - const animation = new Animation(effect, timeline); - animation.currentTime = CSS.percent(0); - animation.play(); + const box = document.getElementById('box'); + const effect = new KeyframeEffect(box, + [ + { transform: 'translateY(0)', opacity: 1}, + { transform: 'translateY(200px)', opacity: 0} + ], { + duration: 1000, + } + ); - animation.ready.then(() => { - // Move the scroller to the halfway point. - const maxScroll = scroller.scrollHeight - scroller.clientHeight; - scroller.scrollTop = 0.5 * maxScroll; + const scroller = document.getElementById('scroller'); + const timeline = new ScrollTimeline( + { source: scroller, orientation: 'block' }); + const animation = new Animation(effect, timeline); + animation.currentTime = CSS.percent(0); + animation.play(); - waitForAnimationFrames(2).then(_ => { - takeScreenshot(); + animation.ready.then(() => { + // Move the scroller to the halfway point. + const maxScroll = scroller.scrollHeight - scroller.clientHeight; + scroller.scrollTop = 0.5 * maxScroll; + + waitForAnimationFrames(2).then(_ => { + takeScreenshot(); + }); }); - }); + } + + window.onload = runTest; </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html index 4a7e7366f79..5813de60fab 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html @@ -9,7 +9,8 @@ <script src="testcommon.js"></script> <style> .scroller { - overflow: auto; + overflow-x: hidden; + overflow-y: auto; height: 200px; width: 100px; will-change: transform; @@ -26,6 +27,12 @@ .anim { animation: anim 1s paused linear; } + #target { + height: 100px; + width: 100px; + background-color: green; + margin-top: -1000px; + } </style> <body> <script> @@ -91,6 +98,17 @@ function assert_paused_times(animation, timeline_current_time, } } +function createViewTimeline(t) { + const parent = document.querySelector('.scroller'); + const elem = document.createElement('div'); + elem.id = 'target'; + t.add_cleanup(() => { + elem.remove(); + }); + parent.appendChild(elem); + return new ViewTimeline({ subject: elem }); +} + promise_test(async t => { const scrollTimeline = createScrollTimeline(t); await updateScrollPosition(scrollTimeline, 100); @@ -153,8 +171,9 @@ promise_test(async t => { await animation.ready; animation.timeline = scrollTimeline; - assert_false(animation.pending); + assert_true(animation.pending); assert_equals(animation.playState, 'running'); + await animation.ready; assert_scroll_synced_times(animation, 10, 10); }, 'Setting a scroll timeline on a running animation synchronizes the ' + 'currentTime of the animation with the scroll position.'); @@ -278,6 +297,8 @@ promise_test(async t => { animation.timeline = scrollTimeline; assert_equals(animation.playState, 'running'); + await animation.ready; + assert_percents_equal(animation.currentTime, 10); }, 'Switching from a null timeline to a scroll timeline on an animation with ' + 'a resolved start time preserved the play state'); @@ -295,6 +316,8 @@ promise_test(async t => { assert_percents_equal(animation.currentTime, 10); animation.timeline = secondScrollTimeline; + await animation.ready; + assert_percents_equal(animation.currentTime, 20); }, 'Switching from one scroll timeline to another updates currentTime'); @@ -368,5 +391,39 @@ promise_test(async t => { }, 'Switching from a document timeline to a scroll timeline on an infinite ' + 'duration animation.'); + +promise_test(async t => { + const scrollTimeline = createScrollTimeline(t); + const view_timeline = createViewTimeline(t); + await updateScrollPosition(scrollTimeline, 100); + const animation = createAnimation(t); + animation.timeline = scrollTimeline; + // Range name is ignored while attached to a non-view scroll-timeline. + // Offsets are still applied to the scroll-timeline. + animation.rangeStart = { rangeName: 'contain', offset: CSS.percent(10) }; + animation.rangeEnd = { rangeName: 'contain', offset: CSS.percent(90) }; + await animation.ready; + + assert_scroll_synced_times(animation, 10, 0); + assert_percents_equal(animation.startTime, 10); + + animation.timeline = view_timeline; + assert_true(animation.pending); + await animation.ready; + + // Cover range is [0px, 300px] + // Contain range is [100px, 200px] + // start time = (contain 10% pos - cover start pos) / cover range * 100% + const expected_start_time = 110 / 300 * 100; + // timeline time = (scroll pos - cover start pos) / cover range * 100% + const expected_timeline_time = 100 / 300 * 100; + // current time = timeline time - start time. + const expected_current_time = expected_timeline_time - expected_start_time; + + assert_percents_equal(animation.startTime, expected_start_time); + assert_percents_equal(animation.timeline.currentTime, expected_timeline_time); + assert_percents_equal(animation.currentTime, expected_current_time); +}, 'Changing from a scroll-timeline to a view-timeline updates start time.'); + </script> </body> diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html index 62a8d1387d3..11688938542 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html @@ -213,12 +213,13 @@ assert_opacity_equals(1, `Opacity with document timeline`); anim.timeline = new ViewTimeline( { subject: target }); - await waitForNextFrame(); + await anim.ready; assert_progress_equals(anim, 0.5, `Progress at contain 50%`); assert_opacity_equals(0.5, `Opacity at contain 50%`); anim.timeline = document.timeline; + assert_false(anim.pending); await waitForNextFrame(); assert_opacity_equals(1, `Opacity after resetting timeline`); @@ -251,7 +252,7 @@ assert_progress_equals( anim, 0.5, `Progress at contain 50% after effect change`); assert_opacity_equals(0.5, `Opacity at contain 50% after effect change`); - }, 'Timeline offsets in programmetic keyframes resolved when updating ' + + }, 'Timeline offsets in programmatic keyframes resolved when updating ' + 'the animation effect'); } diff --git a/tests/wpt/web-platform-tests/secure-payment-confirmation/authentication-disallowed-when-hidden.https.html b/tests/wpt/web-platform-tests/secure-payment-confirmation/authentication-disallowed-when-hidden.https.html deleted file mode 100644 index 1c01fa0e89c..00000000000 --- a/tests/wpt/web-platform-tests/secure-payment-confirmation/authentication-disallowed-when-hidden.https.html +++ /dev/null @@ -1,57 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Test for the 'secure-payment-confirmation' payment method authentication - accepted case</title> -<link rel="help" href="https://w3c.github.io/secure-payment-confirmation#sctn-authentication"> -<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> -<!-- For minimize() --> -<script src="/page-visibility/resources/window_state_context.js"></script> -<script src="utils.sub.js"></script> -<script> -'use strict'; - -promise_test(async t => { - const {minimize, restore} = window_state_context(t); - - const authenticator = await window.test_driver.add_virtual_authenticator( - AUTHENTICATOR_OPTS); - t.add_cleanup(() => { - return window.test_driver.remove_virtual_authenticator(authenticator); - }); - - await window.test_driver.set_spc_transaction_mode("autoAccept"); - t.add_cleanup(() => { - return window.test_driver.set_spc_transaction_mode("none"); - }); - - const credential = await createCredential(); - - const challenge = 'server challenge'; - const payeeOrigin = 'https://merchant.com'; - const displayName = 'Troycard ***1234'; - const request = new PaymentRequest([{ - supportedMethods: 'secure-payment-confirmation', - data: { - credentialIds: [credential.rawId], - challenge: Uint8Array.from(challenge, c => c.charCodeAt(0)), - payeeOrigin, - rpId: window.location.hostname, - timeout: 60000, - instrument: { - displayName, - icon: ICON_URL, - }, - } - }], PAYMENT_DETAILS); - - // Before we trigger the Payment Request, minimize the window. This should - // cause the show() call to be rejected. - await minimize(); - assert_equals(document.hidden, true); - - await test_driver.bless('user activation'); - return promise_rejects_dom(t, "AbortError", request.show()); -}, 'SPC authentication cannot be triggered from a hidden context'); -</script> diff --git a/tests/wpt/web-platform-tests/speculation-rules/prerender/blob_object_url.html b/tests/wpt/web-platform-tests/speculation-rules/prerender/blob_object_url.html new file mode 100644 index 00000000000..fe673d86392 --- /dev/null +++ b/tests/wpt/web-platform-tests/speculation-rules/prerender/blob_object_url.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<title>Same-origin prerendering page can create a url for the given +objects</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<body> +<script> + +setup(() => assertSpeculationRulesIsSupported()); + +promise_test(async t => { + const {exec} = await create_prerendered_page(t); + + const result = await exec(async () => { + const blob_contents = "test blob contents"; + const blob = new Blob([blob_contents]); + const url = URL.createObjectURL(blob); + const fetched_content = await fetch(url).then(response => response.text()); + URL.revokeObjectURL(url); + return fetched_content === blob_contents ? "PASS" : "FAIL"; + }); + + // Start prerendering a page that attempts to create a url for a blob. + assert_equals( + result, "PASS", + 'prerendering page should be able to create a url for blob and fetch it.'); +}, 'prerendering page should be able create url'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/speculation-rules/prerender/fetch-blob.html b/tests/wpt/web-platform-tests/speculation-rules/prerender/fetch-blob.html index 7f8d5570493..098a5a51289 100644 --- a/tests/wpt/web-platform-tests/speculation-rules/prerender/fetch-blob.html +++ b/tests/wpt/web-platform-tests/speculation-rules/prerender/fetch-blob.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<title>Same-origin prerendering can access localStorage</title> +<title>Same-origin prerendering can access blobs</title> <meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/speculation-rules/prerender/restrictions.html b/tests/wpt/web-platform-tests/speculation-rules/prerender/restrictions.html index 5019d4b280c..1990dfa1fc4 100644 --- a/tests/wpt/web-platform-tests/speculation-rules/prerender/restrictions.html +++ b/tests/wpt/web-platform-tests/speculation-rules/prerender/restrictions.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<title>Same-origin prerendering can access localStorage</title> +<title>Same-origin prerendering cannot access some APIs</title> <meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html b/tests/wpt/web-platform-tests/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html index dfc9dd24800..61c44d0d178 100644 --- a/tests/wpt/web-platform-tests/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html +++ b/tests/wpt/web-platform-tests/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html @@ -3,14 +3,22 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -test(function() { - // This test checks the use of SVGAnimatedEnumeration within SVGMarkerElement. - - var markerElement = document.createElementNS("http://www.w3.org/2000/svg", "marker"); +function createMarker() { + let markerElement = document.createElementNS("http://www.w3.org/2000/svg", "marker"); markerElement.setAttribute("markerUnits", "userSpaceOnUse"); markerElement.setAttribute("orient", "auto"); + return markerElement; +} - var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); +function createSVGAngle() { + let svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return svgElement.createSVGAngle(); +} + +test(function() { + // This test checks the use of SVGAnimatedEnumeration within SVGMarkerElement. + + let markerElement = createMarker(); // markerUnits // Check initial 'markerUnits' value. @@ -40,6 +48,10 @@ test(function() { markerElement.markerUnits.baseVal = SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE; assert_equals(markerElement.markerUnits.baseVal, SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE); assert_equals(markerElement.getAttribute('markerUnits'), "userSpaceOnUse"); +}, "Test SVGAnimatedEnumeration"); + +test(function() { + let markerElement = createMarker(); // orientType // Check initial 'orient' value. @@ -50,7 +62,7 @@ test(function() { assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO); // Switch to 'Pi/2 rad' value - via setOrientToAngle(). - anglePiHalfRad = svgElement.createSVGAngle(); + let anglePiHalfRad = createSVGAngle(); anglePiHalfRad.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD, (Math.PI / 2).toFixed(2)); markerElement.setOrientToAngle(anglePiHalfRad); assert_equals(markerElement.orientAngle.baseVal.value.toFixed(1), "90.0"); @@ -66,7 +78,7 @@ test(function() { assert_equals(markerElement.getAttribute('orient'), "auto"); // Switch to '20deg' value - via setOrientToAngle(). - angle20deg = svgElement.createSVGAngle(); + let angle20deg = createSVGAngle(); angle20deg.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 20); markerElement.setOrientToAngle(angle20deg); assert_equals(markerElement.orientAngle.baseVal.value, 20); @@ -90,15 +102,6 @@ test(function() { markerElement.setAttribute('orient', '10deg'); - // Switch to 'auto-start-reverse' value - by modifying orientType. - markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE; - assert_equals(markerElement.orientAngle.baseVal.value, 0); - assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_UNSPECIFIED); - assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE); - assert_equals(markerElement.getAttribute('orient'), "auto-start-reverse"); - - markerElement.setAttribute('orient', '10deg'); - // Try setting invalid values. assert_throws_js(TypeError, function() { markerElement.orientType.baseVal = 4; }); assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); @@ -118,5 +121,38 @@ test(function() { assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_UNSPECIFIED); assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO); assert_equals(markerElement.getAttribute('orient'), "auto"); -}); +}, "Test SVGOrient"); + +test(function() { + let markerElement = createMarker(); + + markerElement.setAttribute('orient', '400grad'); + assert_equals(markerElement.orientAngle.baseVal.value, 360); + assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_GRAD); +}, "Test grad units"); + +test(function() { + let markerElement = createMarker(); + + markerElement.setAttribute('orient', '1turn'); + assert_equals(markerElement.orientAngle.baseVal.value, 360); + assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_UNKNOWN); + + let angle = createSVGAngle(); + angle = markerElement.orientAngle.baseVal; + angle.value = 720; + markerElement.setOrientToAngle(angle); + assert_equals(markerElement.getAttribute('orient'), "2turn"); +}, "Test turn units"); + +test(function() { + let markerElement = createMarker(); + + // Switch to 'auto-start-reverse' value - by modifying orientType. + markerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE; + assert_equals(markerElement.orientAngle.baseVal.value, 0); + assert_equals(markerElement.orientAngle.baseVal.unitType, SVGAngle.SVG_ANGLETYPE_UNSPECIFIED); + assert_equals(markerElement.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO_START_REVERSE); + assert_equals(markerElement.getAttribute('orient'), "auto-start-reverse"); +}, "Test auto-start-reverse"); </script> diff --git a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py index 87f5d4281fe..c5e45033141 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py +++ b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py @@ -115,7 +115,7 @@ class Virtualenv: if "venv" in schemes: scheme = "venv" else: - scheme = "nt_user" if os.name == "nt" else "posix_user" + scheme = "nt" if os.name == "nt" else "posix_user" sys_paths = sysconfig.get_paths(scheme) data_path = sys_paths["data"] added = set() diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py index 3bdbf6f962c..b15d9ccb369 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py @@ -136,6 +136,9 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data, chrome_options["args"].append( f"--origin-to-force-quic-on=web-platform.test:{webtranport_h3_port[0]}") + if test_type == "wdspec": + executor_kwargs["binary_args"] = chrome_options["args"] + executor_kwargs["capabilities"] = capabilities return executor_kwargs 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 d2e386484f9..d9c9481f327 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 @@ -140,13 +140,16 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data, if test_type == "wdspec": options = {"args": []} if kwargs["binary"]: - options["binary"] = kwargs["binary"] + if "webdriver_args" not in executor_kwargs: + executor_kwargs["webdriver_args"] = [] + executor_kwargs["webdriver_args"].extend(["--binary", kwargs["binary"]]) if kwargs["binary_args"]: options["args"] = kwargs["binary_args"] if not kwargs["binary"] and kwargs["headless"] and "--headless" not in options["args"]: options["args"].append("--headless") + executor_kwargs["binary_args"] = options["args"] capabilities["moz:firefoxOptions"] = options if kwargs["certutil_binary"] is None: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkitgtk_minibrowser.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkitgtk_minibrowser.py index a574328c326..4b247dd36e3 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkitgtk_minibrowser.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkitgtk_minibrowser.py @@ -63,6 +63,8 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data, executor_kwargs = base_executor_kwargs(test_type, test_environment, run_info_data, **kwargs) executor_kwargs["close_after_done"] = True executor_kwargs["capabilities"] = capabilities(test_environment.config, **kwargs) + if test_type == "wdspec": + executor_kwargs["binary_args"] = capabilities["webkitgtk:browserOptions"]["args"] return executor_kwargs 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 3159bb3c3a2..4b715a1f317 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 @@ -36,6 +36,7 @@ def executor_kwargs(test_type, test_environment, run_info_data, **kwargs): if test_type == "wdspec": executor_kwargs["binary"] = kwargs.get("binary") + executor_kwargs["binary_args"] = kwargs.get("args") executor_kwargs["webdriver_binary"] = kwargs.get("webdriver_binary") executor_kwargs["webdriver_args"] = kwargs.get("webdriver_args") @@ -609,7 +610,7 @@ class WdspecExecutor(TestExecutor): def __init__(self, logger, browser, server_config, webdriver_binary, webdriver_args, timeout_multiplier=1, capabilities=None, - debug_info=None, **kwargs): + debug_info=None, binary=None, binary_args=None, **kwargs): super().__init__(logger, browser, server_config, timeout_multiplier=timeout_multiplier, debug_info=debug_info) @@ -617,6 +618,8 @@ class WdspecExecutor(TestExecutor): self.webdriver_args = webdriver_args self.timeout_multiplier = timeout_multiplier self.capabilities = capabilities + self.binary = binary + self.binary_args = binary_args def setup(self, runner): self.protocol = self.protocol_cls(self, self.browser) @@ -645,6 +648,10 @@ class WdspecExecutor(TestExecutor): "port": self.browser.port, "capabilities": self.capabilities, "timeout_multiplier": self.timeout_multiplier, + "browser": { + "binary": self.binary, + "args": self.binary_args + }, "webdriver": { "binary": self.webdriver_binary, "args": self.webdriver_args diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py index b1346d51df1..d2ed58444ab 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -700,16 +700,17 @@ class TestRunnerManager(threading.Thread): self.test_count += 1 is_unexpected = expected != status and status not in known_intermittent + is_pass_or_expected = status in ["OK", "PASS"] or (not is_unexpected) if is_unexpected or subtest_unexpected: self.unexpected_tests.add(test.id) # A result is unexpected pass if the test or any subtest run - # unexpectedly, and the overall status is OK (for test harness test), or - # PASS (for reftest), and all unexpected results for subtests (if any) are - # unexpected pass. + # unexpectedly, and the overall status is expected or passing (OK for test + # harness test, or PASS for reftest), and all unexpected results for + # subtests (if any) are unexpected pass. is_unexpected_pass = ((is_unexpected or subtest_unexpected) and - status in ["OK", "PASS"] and subtest_all_pass_or_expected) + is_pass_or_expected and subtest_all_pass_or_expected) if is_unexpected_pass: self.unexpected_pass_tests.add(test.id) diff --git a/tests/wpt/web-platform-tests/url/resources/percent-encoding.json b/tests/wpt/web-platform-tests/url/resources/percent-encoding.json index bd81edbdc35..eccd1db62fe 100644 --- a/tests/wpt/web-platform-tests/url/resources/percent-encoding.json +++ b/tests/wpt/web-platform-tests/url/resources/percent-encoding.json @@ -44,13 +44,5 @@ "output": { "utf-8": "%C3%A1|" } - }, - "Surrogate!", - { - "input": "\ud800", - "output": { - "utf-8": "%EF%BF%BD", - "windows-1252": "%26%2365533%3B" - } } ] diff --git a/tests/wpt/web-platform-tests/url/resources/urltestdata.json b/tests/wpt/web-platform-tests/url/resources/urltestdata.json index 1aa42a51455..ec189871d90 100644 --- a/tests/wpt/web-platform-tests/url/resources/urltestdata.json +++ b/tests/wpt/web-platform-tests/url/resources/urltestdata.json @@ -7907,6 +7907,22 @@ "search": "", "hash": "" }, + "Percent-encoded http: in blob:", + { + "input": "blob:http%3a//example.org/", + "base": null, + "href": "blob:http%3a//example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "http%3a//example.org/", + "search": "", + "hash": "" + }, "Invalid IPv4 radix digits", { "input": "http://0x7f.0.0.0x7g", @@ -9484,5 +9500,35 @@ "input": "stun://[:1]", "base": null, "failure": true + }, + { + "input": "w://x:0", + "base": null, + "href": "w://x:0", + "origin": "null", + "protocol": "w:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "west://x:0", + "base": null, + "href": "west://x:0", + "origin": "null", + "protocol": "west:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" } ] diff --git a/tests/wpt/web-platform-tests/wai-aria/role/abstract-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/abstract-roles.html index 8a98ba74ead..520ecf2dbb3 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/abstract-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/abstract-roles.html @@ -12,7 +12,8 @@ <body> -<p>Verifies <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p> +<p>Tests <a href="https://w3c.github.io/aria/#abstract_roles">Abstract Roles</a> and related <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p> + <nav role="command" data-testname="command role" data-expectedrole="navigation" class="ex">x</nav> <nav role="composite" data-testname="composite role" data-expectedrole="navigation" class="ex">x</nav> <nav role="input" data-testname="input role" data-expectedrole="navigation" class="ex">x</nav> diff --git a/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html index eb6e89b29ae..6f42fa693e5 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html @@ -11,7 +11,7 @@ </head> <body> - <p>Verifies Fallback Roles from <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p> + <p>Tests <a href="https://w3c.github.io/aria/#host_general_role">8.1 Role Attribute</a> role token list selection and <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a>.</p> <nav role="region group" data-testname="fallback role w/ region with no label" data-expectedrole="group" class="ex">x</nav> <nav role="region group" data-testname="fallback role w/ region with label" aria-label="x" data-expectedrole="region" class="ex">x</nav> @@ -19,7 +19,7 @@ <!-- todo: additional fallback roles: - valid/valid "switch checkbox" -- valid/invalid "foo group" +- invalid/valid "foo group" - unicode char tests with fallback - whitespace tests with fallback - unicode char tests with fallback diff --git a/tests/wpt/web-platform-tests/wai-aria/role/invalid-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/invalid-roles.html index e7d38dc8c95..da2370583a2 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/invalid-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/invalid-roles.html @@ -20,7 +20,7 @@ - whitespace tests (including line breaks, tabs, zero-width space, braille space) - diacritics -- joiners (e.g. like emoji variants use) +- zero-width joiners (e.g. ZWJ like emoji variants use) - non-western chars - RTL strings (Hebrew & Arabic) - escaped chars, URL-encoded chars diff --git a/tests/wpt/web-platform-tests/wai-aria/role/list-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/list-roles.html index 5d9787f04bf..da097ce67e8 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/list-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/list-roles.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests <a href="https://w3c.github.io/aria/#list">list</a> and related roles.</p> + <div role="list" data-testname="first simple list" data-expectedrole="list" class="ex"> <div role="listitem" data-testname="first simple listitem" data-expectedrole="listitem" class="ex">x</div> <div role="listitem" data-testname="last simple listitem" data-expectedrole="listitem" class="ex">x</div> diff --git a/tests/wpt/web-platform-tests/wai-aria/role/region-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/region-roles.html index d087f8f69bd..d80570a97bc 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/region-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/region-roles.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests <a href="https://w3c.github.io/aria/#region">region</a> and related roles, as well as the "name from author" rule in <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a>.</p> + <!-- no label --> <nav role="region" data-testname="region without label" data-expectedrole="navigation" class="ex">x</nav> diff --git a/tests/wpt/web-platform-tests/wai-aria/role/roles.html b/tests/wpt/web-platform-tests/wai-aria/role/roles.html index 72c9cdd0cd3..844da3ce47b 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/roles.html @@ -10,6 +10,9 @@ <script src="/wai-aria/scripts/aria-utils.js"></script> </head> <body> + +<p>Tests most <a href="https://w3c.github.io/aria/#role_definitions">ARIA role definitions</a>. See comments for more info.</p> + <script> /* diff --git a/tests/wpt/web-platform-tests/wai-aria/role/synonym-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/synonym-roles.html index 59d913a60a3..06a6a776f45 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/synonym-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/synonym-roles.html @@ -11,6 +11,8 @@ </head> <body> +<p>Tests synonym roles image/img and none/presentation via <a href="https://w3c.github.io/core-aam/#roleMappingComputedRole">Core-AAM Computed Role</a>.</p> + <!-- spec resolution https://github.com/w3c/core-aam/issues/166 --> <div role="none" id="none" data-expectedrole="none" data-testname="none role == computedrole none" class="ex">x</div><!-- preferred --> diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-simulcast.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-simulcast.https.html index 98b5d2bab7a..c5d46cedfd8 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-simulcast.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-simulcast.https.html @@ -30,7 +30,8 @@ a=ice-options:trickle a=fingerprint:sha-256 5B:D3:8E:66:0E:7D:D3:F3:8E:E6:80:28:19:FC:55:AD:58:5D:B9:3D:A8:DE:45:4A:E7:87:02:F8:3C:0B:3B:B3 a=setup:actpass a=mid:0 -a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id +a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid +a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=recvonly a=rtcp-mux a=rtpmap:96 VP8/90000 diff --git a/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-closed-webrtc-connection.https.window.js b/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-closed-webrtc-connection.https.window.js new file mode 100644 index 00000000000..320803adec2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-closed-webrtc-connection.https.window.js @@ -0,0 +1,19 @@ +// META: title=Testing BFCache support for page with closed WebRTC connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=resources/webrtc-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openThenCloseWebRTC(rc1); + // The page should be eligible for BFCache because the WebRTC connection is closed. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true); +}); diff --git a/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-open-webrtc-connection.https.window.js b/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-open-webrtc-connection.https.window.js new file mode 100644 index 00000000000..4a4807d5141 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/back-forward-cache-with-open-webrtc-connection.https.window.js @@ -0,0 +1,20 @@ +// META: title=Testing BFCache support for page with open WebRTC connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=resources/webrtc-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openWebRTC(rc1); + // The page should not be eligible for BFCache because of open WebRTC connection. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); + await assertNotRestoredFromBFCache(rc1, ['WebRTC']); +}); diff --git a/tests/wpt/web-platform-tests/webrtc/protocol/simulcast-answer.html b/tests/wpt/web-platform-tests/webrtc/protocol/simulcast-answer.html index 5e19bc08ff5..f3732ca44c9 100644 --- a/tests/wpt/web-platform-tests/webrtc/protocol/simulcast-answer.html +++ b/tests/wpt/web-platform-tests/webrtc/protocol/simulcast-answer.html @@ -21,7 +21,8 @@ a=ice-options:trickle a=fingerprint:sha-256 5B:D3:8E:66:0E:7D:D3:F3:8E:E6:80:28:19:FC:55:AD:58:5D:B9:3D:A8:DE:45:4A:E7:87:02:F8:3C:0B:3B:B3 a=setup:actpass a=mid:0 -a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id +a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid +a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=recvonly a=rtcp-mux a=rtpmap:96 VP8/90000 diff --git a/tests/wpt/web-platform-tests/webrtc/resources/webrtc-test-helpers.sub.js b/tests/wpt/web-platform-tests/webrtc/resources/webrtc-test-helpers.sub.js new file mode 100644 index 00000000000..48882b30ccc --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/resources/webrtc-test-helpers.sub.js @@ -0,0 +1,79 @@ +// SDP copied from JSEP Example 7.1 +// It contains two media streams with different ufrags +// to test if candidate is added to the correct stream +const sdp = `v=0 +o=- 4962303333179871722 1 IN IP4 0.0.0.0 +s=- +t=0 0 +a=ice-options:trickle +a=group:BUNDLE a1 v1 +a=group:LS a1 v1 +m=audio 10100 UDP/TLS/RTP/SAVPF 96 0 8 97 98 +c=IN IP4 203.0.113.100 +a=mid:a1 +a=sendrecv +a=rtpmap:96 opus/48000/2 +a=rtpmap:0 PCMU/8000 +a=rtpmap:8 PCMA/8000 +a=rtpmap:97 telephone-event/8000 +a=rtpmap:98 telephone-event/48000 +a=maxptime:120 +a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid +a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level +a=msid:47017fee-b6c1-4162-929c-a25110252400 f83006c5-a0ff-4e0a-9ed9-d3e6747be7d9 +a=ice-ufrag:ETEn +a=ice-pwd:OtSK0WpNtpUjkY4+86js7ZQl +a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 +a=setup:actpass +a=dtls-id:1 +a=rtcp:10101 IN IP4 203.0.113.100 +a=rtcp-mux +a=rtcp-rsize +m=video 10102 UDP/TLS/RTP/SAVPF 100 101 +c=IN IP4 203.0.113.100 +a=mid:v1 +a=sendrecv +a=rtpmap:100 VP8/90000 +a=rtpmap:101 rtx/90000 +a=fmtp:101 apt=100 +a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid +a=rtcp-fb:100 ccm fir +a=rtcp-fb:100 nack +a=rtcp-fb:100 nack pli +a=msid:47017fee-b6c1-4162-929c-a25110252400 f30bdb4a-5db8-49b5-bcdc-e0c9a23172e0 +a=ice-ufrag:BGKk +a=ice-pwd:mqyWsAjvtKwTGnvhPztQ9mIf +a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 +a=setup:actpass +a=dtls-id:1 +a=rtcp:10103 IN IP4 203.0.113.100 +a=rtcp-mux +a=rtcp-rsize +`; + +const sessionDesc = { type: 'offer', sdp }; +const candidate = { + candidate: 'candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host', + sdpMid: 'a1', + sdpMLineIndex: 0, + usernameFragment: 'ETEn' +}; + +// Opens a new WebRTC connection. +async function openWebRTC(remoteContextHelper) { + await remoteContextHelper.executeScript(async (sessionDesc, candidate) => { + const testRTCPeerConnection = new RTCPeerConnection(); + await testRTCPeerConnection.setRemoteDescription(sessionDesc); + await testRTCPeerConnection.addIceCandidate(candidate); + }, [sessionDesc, candidate]); +} + +// Opens a new WebRTC connection and then close it. +async function openThenCloseWebRTC(remoteContextHelper) { + await remoteContextHelper.executeScript(async (sessionDesc, candidate) => { + const testRTCPeerConnection = new RTCPeerConnection(); + await testRTCPeerConnection.setRemoteDescription(sessionDesc); + await testRTCPeerConnection.addIceCandidate(candidate); + testRTCPeerConnection.close(); + }, [sessionDesc, candidate]); +} diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/setParameters-encodings.https.html b/tests/wpt/web-platform-tests/webrtc/simulcast/setParameters-encodings.https.html index ac04ca55fb1..86274a0c5a3 100644 --- a/tests/wpt/web-platform-tests/webrtc/simulcast/setParameters-encodings.https.html +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/setParameters-encodings.https.html @@ -183,7 +183,8 @@ a=ice-options:trickle a=fingerprint:sha-256 5B:D3:8E:66:0E:7D:D3:F3:8E:E6:80:28:19:FC:55:AD:58:5D:B9:3D:A8:DE:45:4A:E7:87:02:F8:3C:0B:3B:B3 a=setup:actpass a=mid:0 -a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id +a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid +a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=recvonly a=rtcp-mux a=rtpmap:96 VP8/90000 diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js index 3aa0fc42870..1886531023d 100644 --- a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js @@ -77,6 +77,25 @@ function midToRid(description, localDescription, rids) { } const localMid = localDescription ? SDPUtils.getMid(SDPUtils.splitSections(localDescription.sdp)[1]) : '0'; + if (localDescription) { + const localVideoSection = SDPUtils.splitSections(localDescription.sdp)[1]; + const localParameters = SDPUtils.parseRtpParameters(localVideoSection); + + const localMidExtension = localParameters.headerExtensions + .find(ext => ext.uri === 'urn:ietf:params:rtp-hdrext:sdes:mid'); + if (localMidExtension) { + rtpParameters.headerExtensions.push(localMidExtension); + } + } else { + // Find unused id in remote description to formally have a mid. + for (let id = 1; id < 15; id++) { + if (rtpParameters.headerExtensions.find(ext => ext.id === id) === undefined) { + rtpParameters.headerExtensions.push( + {id, uri: 'urn:ietf:params:rtp-hdrext:sdes:mid'}); + break; + } + } + } if (!rids) { rids = []; @@ -165,8 +184,15 @@ async function doAnswerToSendSimulcast(offerer, answerer) { const sections = SDPUtils.splitSections(offerer.localDescription.sdp); sections.shift(); const mids = sections.map(section => SDPUtils.getMid(section)); + let nonSimulcastAnswer = ridToMid(answerer.localDescription, mids); + // Restore MID RTP header extension. + const localParameters = SDPUtils.parseRtpParameters(sections[0]); - const nonSimulcastAnswer = ridToMid(answerer.localDescription, mids); + const localMidExtension = localParameters.headerExtensions + .find(ext => ext.uri === 'urn:ietf:params:rtp-hdrext:sdes:mid'); + if (localMidExtension) { + nonSimulcastAnswer += SDPUtils.writeExtmap(localMidExtension); + } await offerer.setRemoteDescription({ type: 'answer', sdp: nonSimulcastAnswer, diff --git a/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-closed-websocket-connection.window.js b/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-closed-websocket-connection.window.js new file mode 100644 index 00000000000..30b8e63a2cd --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-closed-websocket-connection.window.js @@ -0,0 +1,20 @@ +// META: title=Testing BFCache support for page with closed WebSocket connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=/websockets/constants.sub.js +// META: script=resources/websockets-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openThenCloseWebSocket(rc1); + // The page should be eligible for BFCache because the WebSocket connection has been closed. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true); +}); diff --git a/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-open-websocket-connection.window.js b/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-open-websocket-connection.window.js new file mode 100644 index 00000000000..2baf38f303c --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/back-forward-cache-with-open-websocket-connection.window.js @@ -0,0 +1,21 @@ +// META: title=Testing BFCache support for page with open WebSocket connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=/websockets/constants.sub.js +// META: script=resources/websockets-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openWebSocket(rc1); + // The page should not be eligible for BFCache because of open WebSocket connection. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ false); + await assertNotRestoredFromBFCache(rc1, ['WebSocket']); +}); diff --git a/tests/wpt/web-platform-tests/websockets/resources/websockets-test-helpers.sub.js b/tests/wpt/web-platform-tests/websockets/resources/websockets-test-helpers.sub.js new file mode 100644 index 00000000000..2680670cc69 --- /dev/null +++ b/tests/wpt/web-platform-tests/websockets/resources/websockets-test-helpers.sub.js @@ -0,0 +1,25 @@ +// The file including this must also include `/websockets/constants.sub.js to +// pick up the necessary constants. + +// Opens a new WebSocket connection. +async function openWebSocket(remoteContextHelper) { + let return_value = await remoteContextHelper.executeScript((domain) => { + return new Promise((resolve) => { + var webSocketInNotRestoredReasonsTests = new WebSocket(domain + '/echo'); + webSocketInNotRestoredReasonsTests.onopen = () => { resolve(42); }; + }); + }, [SCHEME_DOMAIN_PORT]); + assert_equals(return_value, 42); +} + +// Opens a new WebSocket connection and then close it. +async function openThenCloseWebSocket(remoteContextHelper) { + let return_value = await remoteContextHelper.executeScript((domain) => { + return new Promise((resolve) => { + var testWebSocket = new WebSocket(domain + '/echo'); + testWebSocket.onopen = () => { testWebSocket.close() }; + testWebSocket.onclose = () => { resolve(42) }; + }); + }, [SCHEME_DOMAIN_PORT]); + assert_equals(return_value, 42); +} diff --git a/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-closed-webtransport-connection.https.window.js b/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-closed-webtransport-connection.https.window.js new file mode 100644 index 00000000000..5cc7e93a2e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-closed-webtransport-connection.https.window.js @@ -0,0 +1,20 @@ +// META: title=Testing BFCache support for page with closed WebTransport connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/get-host-info.sub.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=resources/webtransport-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openThenCloseWebTransport(rc1); + // The page should be eligible for BFCache because the WebTransport connection is closed. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true); +}); diff --git a/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-open-webtransport-connection.https.window.js b/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-open-webtransport-connection.https.window.js new file mode 100644 index 00000000000..5d5143ae1a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webtransport/back-forward-cache-with-open-webtransport-connection.https.window.js @@ -0,0 +1,25 @@ +// META: title=Testing BFCache support for page with open WebTransport connection. +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/get-host-info.sub.js +// META: script=/common/utils.js +// META: script=/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// META: script=resources/webtransport-test-helpers.sub.js + +'use strict'; + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + + // Open a window with noopener so that BFCache will work. + const rc1 = await rcHelper.addWindow( + /*config=*/ null, /*options=*/ { features: 'noopener' }); + await openWebTransport(rc1); + // The page should be eligible for BFCache and the WebTransport connection + // should be closed. + await assertBFCacheEligibility(rc1, /*shouldRestoreFromBFCache=*/ true); + await rc1.executeScript(async () => { + assert_false(window.testWebTransport === undefined); + await window.testWebTransport.closed; + }); +}); diff --git a/tests/wpt/web-platform-tests/webtransport/resources/webtransport-test-helpers.sub.js b/tests/wpt/web-platform-tests/webtransport/resources/webtransport-test-helpers.sub.js index 9f9127b22f9..36788699e8b 100644 --- a/tests/wpt/web-platform-tests/webtransport/resources/webtransport-test-helpers.sub.js +++ b/tests/wpt/web-platform-tests/webtransport/resources/webtransport-test-helpers.sub.js @@ -110,3 +110,24 @@ async function readInto(reader, buffer) { return buffer; } + +// Opens a new WebTransport connection. +async function openWebTransport(remoteContextHelper) { + const url = webtransport_url('custom-response.py?:status=200'); + await remoteContextHelper.executeScript((url) => { + window.testWebTransport = new WebTransport(url); + return window.testWebTransport.ready; + }, [url]); +} + +// Opens a new WebTransport connection and then close it. +async function openThenCloseWebTransport(remoteContextHelper) { + const url = webtransport_url('custom-response.py?:status=200'); + await remoteContextHelper.executeScript((url) => { + window.testWebTransport = new WebTransport(url); + return window.testWebTransport.ready.then(async () => { + window.testWebTransport.close(); + await window.testWebTransport.closed; + }); + }, [url]); +} diff --git a/tests/wpt/web-platform-tests/xhr/send-authentication-basic-cors-not-enabled.htm b/tests/wpt/web-platform-tests/xhr/send-authentication-basic-cors-not-enabled.htm index 2e7cbaf0340..41201960cc3 100644 --- a/tests/wpt/web-platform-tests/xhr/send-authentication-basic-cors-not-enabled.htm +++ b/tests/wpt/web-platform-tests/xhr/send-authentication-basic-cors-not-enabled.htm @@ -5,6 +5,7 @@ <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> <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[9]/ol[1]/li[1] following::ol[1]/li[9]/ol[1]/li[2]" /> <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::code[contains(@title,'http-authorization')]/.." /> </head> @@ -13,10 +14,10 @@ <script> test(function() { var client = new XMLHttpRequest(), - urlstart = 'www1.'+location.host + location.pathname.replace(/\/[^\/]*$/, '/') + urlstart = get_host_info().REMOTE_ORIGIN + location.pathname.replace(/\/[^\/]*$/, '/') client.withCredentials = true user = token() - client.open("GET", location.protocol+'//'+urlstart + "resources/auth10/auth.py", false, user, 'pass') + client.open("GET", urlstart + "resources/auth10/auth.py", false, user, 'pass') client.setRequestHeader("x-user", user) assert_throws_dom("NetworkError", function(){ client.send(null) }) assert_equals(client.responseText, '') diff --git a/tests/wpt/web-platform-tests/xhr/send-authentication-cors-basic-setrequestheader.htm b/tests/wpt/web-platform-tests/xhr/send-authentication-cors-basic-setrequestheader.htm index de9c5e54303..3c488dcad42 100644 --- a/tests/wpt/web-platform-tests/xhr/send-authentication-cors-basic-setrequestheader.htm +++ b/tests/wpt/web-platform-tests/xhr/send-authentication-cors-basic-setrequestheader.htm @@ -5,15 +5,16 @@ <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> </head> <body> <div id="log"></div> <script> async_test(test => { var client = new XMLHttpRequest(), - urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/'), + urlstart = get_host_info().REMOTE_ORIGIN + location.pathname.replace(/\/[^\/]*$/, '/'), user = token() - client.open("GET", location.protocol+'//www1.'+urlstart + "resources/auth2/corsenabled.py", false) + client.open("GET", urlstart + "resources/auth2/corsenabled.py", false) client.withCredentials = true client.setRequestHeader("x-user", user) client.setRequestHeader("x-pass", 'pass') diff --git a/tests/wpt/web-platform-tests/xhr/send-authentication-cors-setrequestheader-no-cred.htm b/tests/wpt/web-platform-tests/xhr/send-authentication-cors-setrequestheader-no-cred.htm index 14edf5bd778..eed619c1efb 100644 --- a/tests/wpt/web-platform-tests/xhr/send-authentication-cors-setrequestheader-no-cred.htm +++ b/tests/wpt/web-platform-tests/xhr/send-authentication-cors-setrequestheader-no-cred.htm @@ -5,6 +5,7 @@ <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> <!-- These spec references do not make much sense simply because the spec doesn't say very much about this.. --> <link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method" data-tested-assertations="following::ol[1]/li[6]" /> <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::code[contains(@title,'http-authorization')]/.." /> @@ -16,9 +17,9 @@ var test = async_test(desc) test.step(function() { var client = new XMLHttpRequest(), - urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/'), + urlstart = get_host_info().REMOTE_ORIGIN + location.pathname.replace(/\/[^\/]*$/, '/'), user = token() - client.open("GET", location.protocol + "//www1." + urlstart + "resources/" + pathsuffix, false) + client.open("GET", urlstart + "resources/" + pathsuffix, false) client.setRequestHeader("x-user", user) client.setRequestHeader("x-pass", 'pass') client.setRequestHeader("Authorization", "Basic " + btoa(user + ":pass")) diff --git a/tests/wpt/web-platform-tests/xhr/send-network-error-sync-events.sub.htm b/tests/wpt/web-platform-tests/xhr/send-network-error-sync-events.sub.htm index 2266eb36e1e..8011c58bdd1 100644 --- a/tests/wpt/web-platform-tests/xhr/send-network-error-sync-events.sub.htm +++ b/tests/wpt/web-platform-tests/xhr/send-network-error-sync-events.sub.htm @@ -17,7 +17,7 @@ { var xhr = new XMLHttpRequest(); - xhr.open("POST", "http://nonexistent.{{host}}:{{ports[http][0]}}", false); + xhr.open("POST", "http://{{host}}:1", false); // Bad port. assert_throws_dom("NetworkError", function() { |