diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-07-02 01:21:20 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-07-02 01:24:53 +0000 |
commit | e5945522996c335c903a23e8519a1031faee1e8e (patch) | |
tree | c3127fede2d30ec5d8c788b310ee69b304b735f4 | |
parent | a1dfadc4fac39aa80fc3c277fc6e8365ed1311f5 (diff) | |
download | servo-e5945522996c335c903a23e8519a1031faee1e8e.tar.gz servo-e5945522996c335c903a23e8519a1031faee1e8e.zip |
Update web-platform-tests to revision b'f513c41310ebb13de9a0c5ea5e1c22544e0b5000'
282 files changed, 8964 insertions, 1261 deletions
diff --git a/tests/wpt/meta-legacy-layout/MANIFEST.json b/tests/wpt/meta-legacy-layout/MANIFEST.json index 323adab70c5..260a5519e4d 100644 --- a/tests/wpt/meta-legacy-layout/MANIFEST.json +++ b/tests/wpt/meta-legacy-layout/MANIFEST.json @@ -4145,6 +4145,13 @@ {} ] ], + "getComputedStyle-insets-absolute-crash.html": [ + "e28828bab1fe74955d97a0601fa1d64b98822273", + [ + null, + {} + ] + ], "removerule-invalidation-crash.html": [ "a83f43d5faf62338cfb442468a6e9e0e011c79f2", [ @@ -4957,7 +4964,7 @@ ] ], "remove-editing-host-during-forwarddelete.html": [ - "9c803dc132763213b089cdb490c6c9b2357ff027", + "2b23c34607c3241e863cf5ea118ff08d2a9286b8", [ null, {} @@ -30087,6 +30094,45 @@ {} ] ], + "page-size-001-print.html": [ + "19d72b0231f4240206f14564103a61c08008e17d", + [ + null, + [ + [ + "/css/printing/page-size-001-print-ref.html", + "==" + ] + ], + {} + ] + ], + "page-size-002-print.html": [ + "8ecf38107b87968692292a227812d7d6c8dbd625", + [ + null, + [ + [ + "/css/printing/page-size-002-print-ref.html", + "==" + ] + ], + {} + ] + ], + "page-size-003-print.html": [ + "805ff0e568a1b52fce857893a7d5a13078559730", + [ + null, + [ + [ + "/css/printing/page-size-003-print-ref.html", + "==" + ] + ], + {} + ] + ], "paused-animations-print.html": [ "03ef1bab3c3430891ed9f37ca913c1339d36e682", [ @@ -31547,7 +31593,7 @@ ] ], "abspos-containing-block-initial-007.xht": [ - "5adbb6daf44aa5b246575d28230a8e700a8b7a4b", + "0b70e1e63e7bd8edf806bfd961ed37124886388f", [ null, [ @@ -31663,6 +31709,19 @@ {} ] ], + "static-fixed-inside-abspos.html": [ + "e3c3aa450d42505557b1f3eefd0aee8ea63fa4d6", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "static-inside-inline-block.html": [ "327e8e6dacdeabb4d2d57ab700d80f966ccde76b", [ @@ -61729,6 +61788,35 @@ {} ] ], + "clear-on-replaced-element.html": [ + "e5566b38326da17455d54c3d06d498f72bc4c693", + [ + null, + [ + [ + "/css/CSS2/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 2 + ], + [ + 0, + 1500 + ] + ] + ] + ] + } + ] + ], "clear-with-top-margin-after-cleared-empty-block.html": [ "5d0fba7981f3f688b22442c1e8bef2ff8b146f5e", [ @@ -303470,7 +303558,7 @@ ] ], "offset-path-coord-box-001.html": [ - "d4e903e69dfc5535a109b84868e77af03a9c27ee", + "15f378e038615dafa6b6ddbf00ca3155f81686b9", [ null, [ @@ -303499,7 +303587,7 @@ ] ], "offset-path-coord-box-002.html": [ - "0446e2caa16c43ece32a0f3c0659c3d227f01ce9", + "40b94727d373fd47859ff29d909a28c00276a6e3", [ null, [ @@ -303512,7 +303600,7 @@ ] ], "offset-path-coord-box-003.html": [ - "d3ea7f92a8ed17521a957aebcd631906b0ceb86b", + "e793c18830df60560a6fa746081fd714ea9ad3ab", [ null, [ @@ -303524,13 +303612,13 @@ {} ] ], - "offset-path-geometry-box.html": [ - "1e9399441c2ec31e868e7fca6d2fa6d1169f366c", + "offset-path-coord-box-004.html": [ + "c84bae6832ee6154862d472e0997989ca54dad59", [ null, [ [ - "/css/motion/offset-path-geometry-box-ref.html", + "/css/motion/offset-path-coord-box-004-ref.html", "==" ] ], @@ -303853,7 +303941,7 @@ ] ], "offset-path-shape-circle-001.html": [ - "4874ba339298a18fb0a733e0254053579bbe50ac", + "2205d9d3f69b24c29347f92c870bfc014c648e93", [ null, [ @@ -303869,7 +303957,7 @@ [ [ 0, - 1 + 35 ], [ 0, @@ -303895,7 +303983,7 @@ ] ], "offset-path-shape-circle-003.html": [ - "1911d425a16997d6a6da3edb0474e527c8b1e2b6", + "ef69e7e41b623e00663e3512cab838d4abf4a4ae", [ null, [ @@ -303911,11 +303999,11 @@ [ [ 0, - 10 + 110 ], [ 0, - 20 + 500 ] ] ] @@ -303924,7 +304012,7 @@ ] ], "offset-path-shape-circle-004.html": [ - "f0a8523dd16f15075828d9bcbbf31f62a97ff35d", + "d22665636e62e7369b50b97da768e55c3d3f1918", [ null, [ @@ -303933,11 +304021,27 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 80 + ], + [ + 0, + 310 + ] + ] + ] + ] + } ] ], "offset-path-shape-circle-005.html": [ - "0ca93306c609fbf77da660636b23d0aebfff2c02", + "2ba5bc1650a4e497124a948b3b5ceefa22ec84ee", [ null, [ @@ -303946,11 +304050,27 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 18 + ], + [ + 0, + 400 + ] + ] + ] + ] + } ] ], "offset-path-shape-ellipse-001.html": [ - "b8254458d38d71038f47dd80ffddbd971190b665", + "be3ade57c6ddcfed63b9796c3c3eb0b32530fb26", [ null, [ @@ -303966,7 +304086,7 @@ [ [ 0, - 1 + 24 ], [ 0, @@ -303992,7 +304112,7 @@ ] ], "offset-path-shape-ellipse-003.html": [ - "540c56dba7b39ccb93f29e766c9178585c82238a", + "38ef5eb9bbfa9c955c2d4fd53440ab2d21c8a26e", [ null, [ @@ -304001,7 +304121,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 25 + ], + [ + 0, + 450 + ] + ] + ] + ] + } ] ], "offset-path-shape-ellipse-004.html": [ @@ -304018,7 +304154,7 @@ ] ], "offset-path-shape-ellipse-005.html": [ - "27eae4a5c491907c3455e5adae7c226190ee8f83", + "2b2c0abeff95564680680bd231752a8a0fa46544", [ null, [ @@ -304027,7 +304163,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 18 + ], + [ + 0, + 400 + ] + ] + ] + ] + } ] ], "offset-path-shape-inset-001.html": [ @@ -304060,7 +304212,7 @@ ] ], "offset-path-shape-inset-002.html": [ - "6279cdd35ebe1c1e977c67b30733fe82524a56dd", + "5ca502e8b1c30124204d9fd61d2db9fdcb630312", [ null, [ @@ -304069,7 +304221,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 75 + ], + [ + 0, + 500 + ] + ] + ] + ] + } ] ], "offset-path-shape-polygon-001.html": [ @@ -322925,7 +323093,7 @@ ] ], "deferred-timeline-composited.html": [ - "239c0ca50a97458f01402a104c40a4c4a8c2254e", + "e2437911b3993db5940e9113e077a005f71f7012", [ null, [ @@ -323212,6 +323380,21 @@ {} ] ] + }, + "view-timelines": { + "range-boundary.html": [ + "e2ca394ec0c9587b5e5b0be9eb1b2c3897a67764", + [ + null, + [ + [ + "/scroll-animations/view-timelines/range-boundary-ref.html", + "==" + ] + ], + {} + ] + ] } }, "selection": { @@ -326952,6 +327135,19 @@ "web-animations": { "animation-model": { "keyframe-effects": { + "effect-value-opacity-replaced-effect.html": [ + "bef3bd3e8d27fd721dd373e4f33cbae1f6b5b2c0", + [ + null, + [ + [ + "/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect-ref.html", + "==" + ] + ], + {} + ] + ], "transform-and-opacity-on-inline-001.html": [ "f76b53cd4c49152b1527bae481d76ace94243c7b", [ @@ -333518,6 +333714,12 @@ ] } }, + "captured-mouse-events": { + "META.yml": [ + "90b8af85ee98035f893000e1acb4df59510bd10c", + [] + ] + }, "clear-site-data": { "META.yml": [ "65ca96dbb9d774e97cc3a60f6b6dde952104893b", @@ -333711,6 +333913,34 @@ "66ad9243c7dc54e59052fa4fe64124cd63d0e84e", [] ], + "clear-site-data": { + "clear-site-data-all.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-cache.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-cookies.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-storage.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "resources": { + "check-client-hints.py": [ + "f5172300028711ca36c1812230d4ce0148cb0390", + [] + ], + "clear-site-data.py": [ + "fd16be9fbcb0ffba3c440b5525e0580efd088f37", + [] + ] + } + }, "critical-ch": { "critical-ch.navigation-timing.restart.https.html.headers": [ "b221a32886fffa1fd8dc5562fa211b8446db835b", @@ -355381,7 +355611,7 @@ ] }, "fedcm-helper.sub.js": [ - "79136b5958fa584842daf5455e6f419851842d00", + "e548e8e9c9d4d6aa53114368770455420e66f9d4", [] ], "fedcm-iframe-level2.html": [ @@ -375691,6 +375921,14 @@ "57bf3ddc5213d06e0975de38f330ffb7c441b268", [] ], + "12x12-green.png": [ + "1b9284844852a853624cc9c5848a6b1cef876e02", + [] + ], + "1pxgreen-98pxred.png": [ + "0f8571a94550493b483a4f0988fcb6ce1df1d412", + [] + ], "1x1-green.png": [ "b98ca0ba0a03c580ac339e4a3653539cfa8edc71", [] @@ -379943,7 +380181,7 @@ [] ], "align-items-baseline-row-vert-ref.html": [ - "dec8ac3b353c97f55a40df7965a23b642c53149f", + "c9cbc39416d43ab5075287c23c45b8b4c3c7620f", [] ], "anonymous-flex-item-split-ref.html": [ @@ -411593,18 +411831,18 @@ [] ], "offset-path-coord-box-001-ref.html": [ - "e9a7fbb808feefff1838dcd1476b1829231ddbba", + "8b86ce26e1652bd3d06bbc0a7852084470cc7e17", [] ], "offset-path-coord-box-002-ref.html": [ - "b7bee52a1e389b84b3fe0f8ae0749ecf5a2647a5", + "41f65dc0164b896c3f84da20e6d8efee78c99d0b", [] ], "offset-path-coord-box-003-ref.html": [ - "5b9b445dd8fbc921416db58e95834aa699a9a3d2", + "0fa94d4c31b4fbeeb44603e1f1c3e50ca08b2bf2", [] ], - "offset-path-geometry-box-ref.html": [ + "offset-path-coord-box-004-ref.html": [ "60870c815e140ac15502e723ea477678cdc848a7", [] ], @@ -411685,7 +411923,7 @@ [] ], "offset-path-shape-circle-001-ref.html": [ - "7bc29af79c6ce74f1b7748f0234ac8346984e18e", + "6d6b64d32e3c622be1b27a9dae4c7293207fcab3", [] ], "offset-path-shape-circle-002-ref.html": [ @@ -411693,11 +411931,11 @@ [] ], "offset-path-shape-circle-003-ref.html": [ - "327d325137c399499b681f6552750ff3d008968c", + "c005984f768aed32b96779045addf9264c09da2b", [] ], "offset-path-shape-circle-004-ref.html": [ - "86c67dcdedcb2625216cd064384545113f2a96fc", + "925abdb8b4f04decd267bae83486b02730438eec", [] ], "offset-path-shape-circle-005-ref.html": [ @@ -411705,7 +411943,7 @@ [] ], "offset-path-shape-ellipse-001-ref.html": [ - "32236bbc239a98c6a512d64037fcda32a8c5e976", + "0e53fa2d355e16156f1f6e313910f688c7e97d0c", [] ], "offset-path-shape-ellipse-002-ref.html": [ @@ -411713,7 +411951,7 @@ [] ], "offset-path-shape-ellipse-003-ref.html": [ - "4a9fed4c86ab7d08bbe1d32ff74d26e42f50e675", + "2239210e49b563d4df210b2084d50d4c32a8d9bc", [] ], "offset-path-shape-ellipse-004-ref.html": [ @@ -411729,7 +411967,7 @@ [] ], "offset-path-shape-inset-002-ref.html": [ - "28195129f3282fadc8a2e691321425f886eef6c3", + "1bb649474aacd6d83601936bf12b918d2d1f9ed8", [] ], "offset-path-shape-polygon-001-ref.html": [ @@ -411752,10 +411990,6 @@ "7e9e07cccf3d26c8090ba98ee788565eca799b07", [] ], - "offset-path-shape-ref.html": [ - "a659b287fdab1ed7bda453c36c17140e0c2740f2", - [] - ], "offset-path-shape-xywh-001-ref.html": [ "12f9668dd5c8884368fe89104474d287bb04b28b", [] @@ -411902,6 +412136,18 @@ "52ea6bfffcbf187acdeeeacdf960896a2d695986", [] ], + "page-size-001-print-ref.html": [ + "8bfd2717fa5def1e90513537fa34cf4f3ea2f9e4", + [] + ], + "page-size-002-print-ref.html": [ + "aa8cb6edcd242b8619caf2e67a35c7b4f2684daa", + [] + ], + "page-size-003-print-ref.html": [ + "38ea1508781e6313e9102bf4c307f91b290df4c4", + [] + ], "paused-animations-print-ref.html": [ "c22ecd174585100fd5faae8402f5a6e141b8264e", [] @@ -413652,6 +413898,14 @@ "scroll_support.js": [ "52c2f58723a2a39e9d652036d82d59475497c76e", [] + ], + "scrollend-event-fires-to-iframe-inner-frame.html": [ + "3657a8b87714f5b03f52def89847dd8df986f174", + [] + ], + "scrollend-user-scroll-common.js": [ + "4bf8f927ff2d7250326b75207831b1aa1e3975b9", + [] ] } }, @@ -414349,7 +414603,7 @@ }, "include": { "editor-test-utils.js": [ - "a4c24c94edb8e7b0660c7dfdac10b77add02a43c", + "24527d4a7931f7f41d34ec1150f82fe0867f6b3b", [] ], "implementation.js": [ @@ -420520,7 +420774,7 @@ [] ], "remote-context-helper.js": [ - "6978cef83211e5b5e65367c363a35e23b78bd25f", + "047d5cf821e5502f03736b2120541e7ff20dbb1d", [] ] } @@ -423940,7 +424194,7 @@ "yaml": { "element": { "drawing-text-to-the-canvas.yaml": [ - "7c3df028ac7b2940d98e41b87aec7eeef8fd6137", + "5d050477af1ad358eb40cc88b23389ba68d9d19a", [] ], "meta.yaml": [ @@ -423948,7 +424202,7 @@ [] ], "text-styles.yaml": [ - "76149894b6c4d6cff15b4b3462a87e2f1f1c3671", + "ee319c4fef183405b9bd855644941c32f995f833", [] ], "the-canvas-element.yaml": [ @@ -423962,7 +424216,7 @@ [] ], "text.yaml": [ - "80818bc29cfc8ba4607da1972fe7c6e58f9f10df", + "b66ae4f82068061bb3b635b2d387219f245708c5", [] ], "the-offscreen-canvas.yaml": [ @@ -436262,11 +436516,11 @@ [] ], "penPointerEventProperties.html.ini": [ - "d808b1793cfdbbb5c1acfdd5542c8e96d9de0e3d", + "f3a973c0f508da1e7a721481515887d2cabceeb0", [] ], "penPointerEvents.html.ini": [ - "39e05a8f0906b254649a4f4dcedd7c6535045064", + "d66b8470ea460bc3edce26a845941e4b740c4c1e", [] ], "touchPointerEventProperties.html.ini": [ @@ -437347,8 +437601,12 @@ "1e84e79cd1503946088888d02a5da45d5af7c5fe", [] ], + "screen-capture-mouse-events.tentative.idl": [ + "7b081cd9fd8a8a161c98b0bce2597c8a8ffd9df6", + [] + ], "screen-capture.idl": [ - "9abd4d2c1adf02fd063d24aeaeecb10e994fee1b", + "830b96d16fa976f739c73b11433ae0f3fac7b052", [] ], "screen-orientation.idl": [ @@ -438114,11 +438372,11 @@ [] ], "modulepreload-in-early-hints.h2.py": [ - "231b3bc69cb9dd47e3e298398214f3f9e0a433e9", + "cefd02a96a83acac7297b7dbab1f5eb9270a4dee", [] ], "modulepreload-in-early-hints.html": [ - "44aebf720a05d90db5f12477dbe83327c0e25a7b", + "64a02855040dbaa1af595487f80460f7106f2f0c", [] ], "multiple-early-hints-responses.h2.py": [ @@ -444690,6 +444948,10 @@ "b6460a486888a91c6cccc20d42d0426472406b0d", [] ], + "assert-throws-dom.html": [ + "4dd66b2372a06aa0fdd3d98cca73978b9833d599", + [] + ], "force_timeout.html": [ "2058fdb8621e7d55ea2b1e22839ff0afe999f7b8", [] @@ -445056,7 +445318,7 @@ [] ], "testdriver.js": [ - "e582477da9ba9785a714c77fd2d302b9450c1398", + "a9ab7220aad069de3f6e2bf2c4fe34599658b899", [] ], "testdriver.js.headers": [ @@ -445064,7 +445326,7 @@ [] ], "testharness.js": [ - "112790bb1eeb8784a5a0e1cb29b1ae36be4c0c5c", + "413993089be6561cbad621c61ac4d4ab20bc8278", [] ], "testharness.js.headers": [ @@ -445296,6 +445558,10 @@ ] }, "view-timelines": { + "range-boundary-ref.html": [ + "057d0afabcdf579765cc1de8df4c63a6edeea8c4", + [] + ], "testcommon.js": [ "a798fe918ddc46781ad59d53e44f17cc5812bdf9", [] @@ -446852,7 +447118,7 @@ [] ], "fetch-access-control.py": [ - "446af87b24974f77051161950113685b14ecd1c5", + "380a7d62225a1b0b473fdedf61d2ab565b7b2edf", [] ], "fetch-canvas-tainting-double-write-worker.js": [ @@ -449210,7 +449476,7 @@ [] ], "utils.js": [ - "f012d2d0e41ef61be278d05d6cd0fab1d0944f31", + "311d37f0a0198a0c0f669d603522ad17f26b9748", [] ], "wake-lock.https.html": [ @@ -451243,7 +451509,7 @@ ] }, "commands.json": [ - "769675e0ee42c6efc36fc1150778682f933a6465", + "cef6d22473b0fb3ea51f3477fcdab2f6afb26cd0", [] ], "download.py": [ @@ -451251,7 +451517,7 @@ [] ], "item.py": [ - "500ca109a74e3ef37031fa51240b69626cfa59dd", + "86f7bd6020b4e44f21359566fb65f4fe9ae3d775", [] ], "jsonlib.py": [ @@ -451263,7 +451529,7 @@ [] ], "manifest.py": [ - "f602727cb09b393d9877a04591f56fc28854cfee", + "0b00c71ac518967bdcd9c18d5a7faa657a343fd0", [] ], "requirements.txt": [ @@ -451271,7 +451537,11 @@ [] ], "sourcefile.py": [ - "386833722e7d64675b85a495e9664e32a4eb3fab", + "cf0bbf334b7f24597304dbb80dfb1d81ec609f31", + [] + ], + "spec.py": [ + "5148fceb3e63812c7801cfc089c3f1c6f5e3600a", [] ], "testpaths.py": [ @@ -451292,11 +451562,11 @@ [] ], "test_manifest.py": [ - "91b39f213a8e526c8fd6abd3d308c2d539ef3855", + "fc2314b8356a21074ba5f7aa0650cb15b59bd72d", [] ], "test_sourcefile.py": [ - "c0b281d244c9b0229108778cd9c26dfc3fcfeabc", + "d3411084f3ce681a456e8882a5c42cd5c57c84b2", [] ], "test_utils.py": [ @@ -459259,11 +459529,11 @@ [] ], "client.py": [ - "9bb03b34f96343bff885d89be37ddc2c3130b41a", + "c0505dde1d1ffd44ab3834fe15739cf3809f7b2d", [] ], "error.py": [ - "21c9f720a8eb3c004fcb9148b3f151057995279e", + "b681660f1a8eda58a0f51108af02b861035cd440", [] ], "modules": { @@ -459272,11 +459542,11 @@ [] ], "_module.py": [ - "e28a83584a8ac4de6747a4c3894c9728d5682acb", + "060010b2a331f8c93b8b6f98828d133e68ebe8bf", [] ], "browsing_context.py": [ - "f2abb4764e213506b0bb22499dc19dc45338eb3f", + "a9b8d3f76824a86e62b8d351c9a88eae5794bca2", [] ], "input.py": [ @@ -459288,12 +459558,12 @@ [] ], "session.py": [ - "cdcef11b94f24cfa24232812126b28a12ed4c13a", + "fe1c0385105a13fda3087117779a1e8b83c8d07a", [] ] }, "transport.py": [ - "2d5d8ee9224ff549cb9256741be79cf3e4b076ed", + "d61ebaddea7b7e3cac008781a8dcf1dc8326700d", [] ] }, @@ -459663,7 +459933,7 @@ [] ], "firefox_android.py": [ - "7065d07a647f88ed6526856e03ee86ab8635c623", + "bf69e8f6083fe592c72d1a43665ec9ca0356bbb2", [] ], "ie.py": [ @@ -459731,7 +460001,7 @@ [] ], "base.py": [ - "c537e8271c7efe2cb73c81c0e07596346e371e08", + "17be0cec39f25e5cc169740eb6c2f632d7454ac7", [] ], "executorchrome.py": [ @@ -459743,7 +460013,7 @@ [] ], "executormarionette.py": [ - "9c9c18735a64caa7614efb431ebe0ee9174896f9", + "95f186082042e322ccf53faa308f429f972523a1", [] ], "executorselenium.py": [ @@ -460024,7 +460294,7 @@ [] ], "wptcommandline.py": [ - "d4950e14c0cb9e555d284993967a4349dfe8d081", + "875ba7e66a90738bf763d9abb7d6092abdcffd98", [] ], "wptlogging.py": [ @@ -461833,6 +462103,10 @@ ] }, "keyframe-effects": { + "effect-value-opacity-replaced-effect-ref.html": [ + "792ca214cfb0c9b02609b484a95891bd1683bfe3", + [] + ], "transform-and-opacity-on-inline-001-ref.html": [ "1e7f250c48fb093160a509b3d98c0b265085179f", [] @@ -461886,7 +462160,7 @@ ] }, "testcommon.js": [ - "8597ca28df9a6cc9c17fe21b40eab000bf606b05", + "a106cd9ac67464f16cb2a5c104e1dbf742bfc289", [] ], "timing-model": { @@ -463050,7 +463324,7 @@ ], "bidi": { "__init__.py": [ - "033978e19364d033bd68233a607073f1b4e0f294", + "821684620973f3f8a16557ae9839f9c8cb5574c7", [] ], "browsing_context": { @@ -463060,7 +463334,7 @@ ], "capture_screenshot": { "__init__.py": [ - "c4d8dd5252c3eefecbe9877f296c0a910d961a4a", + "64f25b9b861f879127a31f3aa8ed33fffbfb9caf", [] ] }, @@ -463110,37 +463384,7 @@ "__init__.py": [ "9b7d28f6dacd441177e2810370709fdfc303f6f0", [] - ], - "support": { - "black_dot.png": [ - "613754cfaf74a7a2d86984231479d5671731f18a", - [] - ], - "empty.html": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "empty.js": [ - "3918c74e446336be4151ea3bdad00f4d9e6df47a", - [] - ], - "empty.svg": [ - "e0af766e8ff5de780818b9d0712714dd5638e882", - [] - ], - "other.html": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "other.svg": [ - "7c20a99a4b545aa204a8b09667c480fc7f8f1918", - [] - ], - "red_dot.png": [ - "c5916f289705642eec4975cf51458b9afeefe46c", - [] - ] - } + ] }, "print": { "__init__.py": [ @@ -463153,6 +463397,42 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ] + }, + "set_viewport": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "support": { + "black_dot.png": [ + "613754cfaf74a7a2d86984231479d5671731f18a", + [] + ], + "empty.html": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "empty.js": [ + "3918c74e446336be4151ea3bdad00f4d9e6df47a", + [] + ], + "empty.svg": [ + "e0af766e8ff5de780818b9d0712714dd5638e882", + [] + ], + "other.html": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "other.svg": [ + "7c20a99a4b545aa204a8b09667c480fc7f8f1918", + [] + ], + "red_dot.png": [ + "c5916f289705642eec4975cf51458b9afeefe46c", + [] + ] } }, "errors": { @@ -463806,7 +464086,7 @@ [] ], "fixtures.py": [ - "ba166ae8da87de03ec68c9c112f67c0d2a6036f3", + "957be6b0f462b1a7f1b61bcfb48cadb01c5f8f7d", [] ], "fixtures_bidi.py": [ @@ -463898,7 +464178,7 @@ [] ], "inline.py": [ - "a0a8d3881ef5f48644c4ef1d6398dbad77dcc11f", + "26f0491d1a87a0977813ed8264c684d94ad0ae93", [] ], "keys.py": [ @@ -464150,7 +464430,7 @@ [] ], "conv_transpose2d.json": [ - "c7026f91ee5011747d1ba058e07ebc4a54a45a60", + "2fcb317268cb9b48731ae137f514f904918613de", [] ], "cos.json": [ @@ -464297,6 +464577,10 @@ "52ea57c7632d0d27b1745ddd4e983c37becf9832", [] ], + "softplus.json": [ + "2b26e1439e30cd8c2f7bd504d9553ab6eb38138a", + [] + ], "softsign.json": [ "e3208b18ad49a64dbbeb6a939dc69d2ea5ab3c43", [] @@ -464327,7 +464611,7 @@ ] }, "utils.js": [ - "37748fd57a405e645798a3bb92e3138d48a9941a", + "920459275d4bceac6d501b750bfaacbaecdb2a4d", [] ] } @@ -464588,7 +464872,7 @@ [] ], "constants.sub.js": [ - "d8e340d304b26fb51be84ba76f68acbd0924ada7", + "fd3c3b84b96a0a2537ac65dc4f626c4be03d9077", [] ], "cookies": { @@ -490945,6 +491229,36 @@ {} ] ], + "clear-site-data": { + "clear-site-data-all.https.html": [ + "4abc620c9dc3e8586f715d43a4f839c9821133fe", + [ + null, + {} + ] + ], + "clear-site-data-cache.https.html": [ + "bb1f8aa43e7930d0484e5cc8c18e2ba1c6b22d34", + [ + null, + {} + ] + ], + "clear-site-data-cookies.https.html": [ + "72b7f6794e9fceed910dfe0b309aa1fb16e5559f", + [ + null, + {} + ] + ], + "clear-site-data-storage.https.html": [ + "49578134f56767923415287c5ce60b8713713066", + [ + null, + {} + ] + ] + }, "critical-ch": { "critical-ch.navigation-timing.no-restart.https.html": [ "a7c2ad705db844db61f6038ed0bba496a0598ce2", @@ -502873,7 +503187,7 @@ ] ], "fedcm-context.https.html": [ - "7675866272116b72d4ce41c286d2c178847a5a4e", + "67ba8256341a1d95af14a8c83b3e68f568f0e13e", [ null, { @@ -504501,13 +504815,27 @@ {} ] ], - "anchor-getComputedStyle.html": [ + "anchor-getComputedStyle-001.html": [ "6d77cf9a9d4cc34f5b2c787502f0d7753ff41c94", [ null, {} ] ], + "anchor-getComputedStyle-002.html": [ + "ae697fcc7498917e165b471ae169068880ef46e0", + [ + null, + {} + ] + ], + "anchor-getComputedStyle-003.html": [ + "f9fca976544f1aaac8d84e9acd918c7538b7e86d", + [ + null, + {} + ] + ], "anchor-name-001.html": [ "4caf3ee2100327b03b73c5180ac4ecc8a3761173", [ @@ -504865,6 +505193,13 @@ {} ] ], + "anchor-scroll-005.html": [ + "82f3a23ac9c79184cdb033305364b8cf215536b7", + [ + null, + {} + ] + ], "anchor-scroll-basics.html": [ "6b2d96708bd44808f0cb7ce10a1b52e708e09eba", [ @@ -505075,6 +505410,13 @@ {} ] ], + "position-fallback-bounds-basics.html": [ + "3b8b67bd978f3361512222f75cd71f08143007b1", + [ + null, + {} + ] + ], "position-fallback-cascade-layer-reorder.html": [ "ec1a64205c55788b021040b278ce1e51c2cbfc5e", [ @@ -507929,7 +508271,7 @@ ] ], "scope-invalidation.html": [ - "d5ba17159e0be6f6c41c4617dfbadef7fd733308", + "c5bdb6165852f445f870e78d5e77e812cff3a069", [ null, {} @@ -508221,7 +508563,7 @@ ] ], "color-valid-color-mix-function.html": [ - "d664525effd6c05f0d88d9028eefed13c7f352f3", + "361f7488a13c3d4f49747d11ab21487f740a490c", [ null, {} @@ -508953,14 +509295,14 @@ ] ], "font-relative-units-dynamic.html": [ - "63a07c61dbd31f1529f3fab10cf348c098a5ff30", + "9dfaceeed6b41c7f0366ac6288809efb9a3e1e52", [ null, {} ] ], "font-relative-units.html": [ - "7f711ebf96c60efd793bcf4c03b92450cbfcdcd8", + "ba4a60dda21962a8956180b601984942c3dc94ff", [ null, {} @@ -509022,6 +509364,13 @@ {} ] ], + "inheritance-from-container.html": [ + "97dfff2fd02fe6e825f3d547caeb88fefef2d0ca", + [ + null, + {} + ] + ], "inline-size-and-min-width.html": [ "8ddcbc614cae184b65295ab722ce392df4491f5d", [ @@ -509922,7 +510271,7 @@ }, "css-easing": { "cubic-bezier-timing-functions-output.html": [ - "168f4cd907ec93d84bafcd11b00a7c78878569c8", + "4e14ef3bb3e5db60f501ff64ee87cc9401b372f7", [ null, {} @@ -510743,21 +511092,21 @@ ] ], "flex-align-baseline-table-001.html": [ - "b90f840b10acaaac3af7adf4d91a1d3c30762019", + "e804c33cb4c6abd7b50f7a82a1a22d8f9725b7de", [ null, {} ] ], "flex-align-baseline-table-002.html": [ - "9126e4246cad69d7efb753b5afa75f0e579909f0", + "c7d2c8af70400f65df3a36df4f4f3508e9041c48", [ null, {} ] ], "flex-align-baseline-table-003.html": [ - "2092a898540d02c794c75d65f63a58ecfd4a707f", + "15f35401756e4b189ee871c3f93e0e7549871b6d", [ null, {} @@ -512710,7 +513059,7 @@ ] ], "format-specifiers-variations.html": [ - "480396ea16f81e96b411b7c75a7cd33e758b3e34", + "32b8ebed67ebdfd5d10ef374e68d4effb8d9028d", [ null, {} @@ -512797,7 +513146,7 @@ ] ], "font-face-src-list.html": [ - "c87705109fd1b39731c5ef1c1e1aa6e4d89ea487", + "07aeacd2eeccbb383e45e6dd3cc61aecd6b1e8f3", [ null, {} @@ -516975,7 +517324,7 @@ ] ], "grid-template-shorthand-areas-valid.html": [ - "4a22784332f4aa95d5a2b08345dd3cde171e79e4", + "2d2b2433a4102326ecd2fbdd1c33d12c0ffae009", [ null, {} @@ -517268,7 +517617,7 @@ }, "image-set": { "image-set-computed.sub.html": [ - "6d54fd0d09b4ade26a254a0a9c8cb5a76097e88a", + "532e48e6e869e322e6816f2f0d3289aeea7786c6", [ null, {} @@ -518868,6 +519217,13 @@ {} ] ], + "hit-test-in-vertical-rl.html": [ + "526e33d7924668782fd0116c5a13d2aeda570b08", + [ + null, + {} + ] + ], "hit-test-transformed-child.html": [ "ac0fd54c9f35dda0f01f5b8eb92fd7df7a3b5bb7", [ @@ -519288,14 +519644,14 @@ }, "css-nesting": { "cssom.html": [ - "b5bd80d1b46e3cda7714f4e047737a3057c35fac", + "fa22b2fb45368ed37a2f971d58c6ecb8736b7360", [ null, {} ] ], "invalid-inner-rules.html": [ - "ffb53420e2dacfead07094be6c8521f87633c9ed", + "87c7c9a93481c95345223c2a7a4f8cab62529826", [ null, {} @@ -521140,7 +521496,7 @@ ] ], "register-property-syntax-parsing.html": [ - "16cbdf0c571a5f5d7fa328b6d9a6295bfd3a5db0", + "5bda1c4c5b23ecc95ac98ef939a9bbba62cf196d", [ null, {} @@ -522196,7 +522552,7 @@ ], "input": { "keyboard.html": [ - "7b0c6c057420e98b0122cbcb2f7502037e370e21", + "187ac0fb9e3ee5b12e73ec75d3cd4f465e6b319e", [ null, { @@ -529559,6 +529915,13 @@ {} ] ], + "idlharness-2.html": [ + "236bf5642bcb92f81c241e80cb34482c46185cf3", + [ + null, + {} + ] + ], "idlharness.html": [ "4cc7ee50eb4915fcf95843f7eeee266abfa7b81a", [ @@ -533096,7 +533459,7 @@ ], "animations": { "calc-interpolation.html": [ - "40379a13fb2736ed5839e55a58c7cba581155e77", + "f2c49a5cb9f503f204dd09e2e9542beff2db67c7", [ null, {} @@ -533306,6 +533669,13 @@ {} ] ], + "cap-invalidation.html": [ + "0becd0d093d680c1c18323da51fc39812c3709cd", + [ + null, + {} + ] + ], "ch-empty-pseudo-recalc-on-font-load.html": [ "7ad2b85fa469d6c43806e2e0fffee8af4ae4a96b", [ @@ -533370,7 +533740,7 @@ ] ], "exp-log-serialize.html": [ - "9eca44e68290dc8b96a915db6da6a843bab75f43", + "6108278d9624daad216f2bde26e6d65b7dd6f50f", [ null, {} @@ -533607,6 +533977,13 @@ {} ] ], + "rcap-invalidation.html": [ + "562161b4e5d474651ce91c39af90f8fcfd250c1f", + [ + null, + {} + ] + ], "rch-invalidation.html": [ "fa85e94c72778c424b5cf9f525baf119a40b9f65", [ @@ -533671,7 +534048,7 @@ ] ], "round-mod-rem-serialize.html": [ - "39569995b3ab09d834796f94bea9605dae7846f6", + "aa7c768b952b3fa4c28618fbbd59451b827e828f", [ null, {} @@ -535569,6 +535946,13 @@ {} ] ], + "getComputedStyle-insets-grid.html": [ + "08b55733a1595abca152e75cb24f0b1219fce8d1", + [ + null, + {} + ] + ], "getComputedStyle-insets-nobox.html": [ "236abf17f9cab8652b350c1168f2c27c1f84a631", [ @@ -535583,6 +535967,13 @@ {} ] ], + "getComputedStyle-insets-relpos-inline.html": [ + "d5f197ee9bc6cd53ec636889773438391d698120", + [ + null, + {} + ] + ], "getComputedStyle-insets-static.html": [ "aa7dbee95667a5e3b829b7d3774311da49c01deb", [ @@ -537737,7 +538128,7 @@ ] ], "offset-path-interpolation-005.html": [ - "13de65d8a73bc6eafcbffe6f3f0155f6ad6819e6", + "11234bf31a325fd43b8c2d32f9e503ff8770c62d", [ null, {} @@ -537809,7 +538200,7 @@ ] ], "offset-anchor-parsing-valid.html": [ - "97a3c54131f1af3b71c635ee5ff37be8a3502ff0", + "6cb4d44117fa6361fc87efdee22e79bc6df749b5", [ null, {} @@ -537886,7 +538277,7 @@ ] ], "offset-position-parsing-valid.html": [ - "032a5b42b46d5bae228e6a112c50623d76dbc1b1", + "bc0d19a460f4f22f9a061ae6932f31637c7231d6", [ null, {} @@ -539037,6 +539428,13 @@ {} ] ], + "is-pseudo-containing-sibling-relationship-in-has.html": [ + "bd5f96a3e27a3875ec2bf08a16f424ea851bee6e", + [ + null, + {} + ] + ], "is.html": [ "8490f096976340bc970ed2c6156fb60f433768e9", [ @@ -539104,6 +539502,13 @@ {} ] ], + "not-pseudo-containing-sibling-relationship-in-has.html": [ + "ec6d86198b063475fa237d7a39f7a699ec19a9ae", + [ + null, + {} + ] + ], "quirks-mode-stylesheet-dynamic-add-001.html": [ "3d7be982378fe2414f818d1682eca8f38f3575ac", [ @@ -540405,7 +540810,7 @@ } }, "throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml": [ - "c0a7f622fbe2e56fba7eab1ea71ffde0fc269fca", + "c2913a1312e05beb8f198832a0030a84568157c7", [ null, {} @@ -540419,7 +540824,7 @@ ] ], "throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml": [ - "13f664550be01d7fab3757732634dd02e56c723e", + "4a3c8ec43b0f23cd890a1daeeeb4c20941c96b2a", [ null, {} @@ -542313,8 +542718,17 @@ } ] ], + "scrollend-event-fires-to-iframe-window.html": [ + "1a20751bd53b1d4e838fd13d8eed09bf9b3f6dfb", + [ + null, + { + "testdriver": true + } + ] + ], "scrollend-event-for-user-scroll.html": [ - "561c90ca94c6af8c0335a962a16273e44c2d3717", + "a06843a35e7ec9c827d70fd8f6eefa5f9bfdf724", [ null, { @@ -583321,7 +583735,7 @@ }, "read-media": { "cross-origin-video.html": [ - "b99658facb29b59964c29e910e1435d201321fb4", + "5f3e95cce40e2a00611583d7623cad8a4a3eeb27", [ null, {} @@ -588442,6 +588856,13 @@ {} ] ], + "2d.text.drawing.style.fontStretch.settings.html": [ + "b19eced89171199dcfb57f1d5aea4b8f7e83c427", + [ + null, + {} + ] + ], "2d.text.drawing.style.fontVariant.settings.html": [ "cff5ad183a084adddc905ef76ff58e7a3ad6a5f9", [ @@ -588478,7 +588899,7 @@ ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "03b35dfaa9d2af989f2a6251685dc88f7e379988", + "dee856842ae8e764ddf454e77749c098e8d8ce6d", [ null, {} @@ -588513,7 +588934,7 @@ ] ], "2d.text.measure.baselines.html": [ - "95fac522d941f234ff1208b518dadf66bcd9a4c5", + "f5d149239611a932da0785cabf6e18db653d1305", [ null, {} @@ -593477,14 +593898,14 @@ ] ], "2d.text.draw.baseline.hanging.html": [ - "3ad15f31501a0f47a3b95e5c1f8567fcf66a20d2", + "7b3a0a9373bc87de31ce263c5bd6d2fc482ef43b", [ null, {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "8d402223a4f213b5ecfedf78f7b5d292305177cc", + "8da9aabb942a17ad8cd63534539be447f9f4d09e", [ null, {} @@ -604940,28 +605361,28 @@ ] ], "2d.text.draw.baseline.hanging.html": [ - "0bd15ff0068e7b238d359e772b2c0fad01e04b04", + "0b8228343289fe59d269b4ccf63dc48b6008edda", [ null, {} ] ], "2d.text.draw.baseline.hanging.worker.js": [ - "4a5ced7b38f95fc9cef8ef3b6290b8ebd8b6338b", + "fca74d6938184d68f11790b86fbdb0240cd11d8e", [ "html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.html", {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "3a1d6e5159c052eadc9fd3073fd3b6dbc70344ef", + "c996444b860a079402dbeb20344578c94877e58d", [ null, {} ] ], "2d.text.draw.baseline.ideographic.worker.js": [ - "b39c10b74f0c3ce27eb79f81bef5903616722bd7", + "0ffa6fe299a0cb9a03778f0f32a57141074d0b7c", [ "html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.html", {} @@ -605299,6 +605720,20 @@ {} ] ], + "2d.text.drawing.style.fontStretch.settings.html": [ + "95405a18a5682c2eb954b37d150a0f0c54f31af4", + [ + null, + {} + ] + ], + "2d.text.drawing.style.fontStretch.settings.worker.js": [ + "ff10a742b5843ced57142d1678010082625a940f", + [ + "html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.html", + {} + ] + ], "2d.text.drawing.style.fontVariant.settings.html": [ "9756d095ba74fd386b1249b2c1cf24c9381c29ba", [ @@ -605426,14 +605861,14 @@ ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "47094dc91fa9a9fffbef111ccbc91d02b46cc61e", + "3fc07d547886caac218c9cac27d9a2c835d466ea", [ null, {} ] ], "2d.text.drawing.style.textRendering.settings.worker.js": [ - "ca5741de95404ef84cf4b174737d7f3625d8a8c5", + "c37f2e342f20d68898a656b97e96891b52aaa0b9", [ "html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.html", {} @@ -605636,14 +606071,14 @@ ] ], "2d.text.measure.baselines.html": [ - "e58f9be455b0cd573da530ff0b37a64117af2740", + "09fd0f408223fae715cfea3cdb00000e76f9fcb2", [ null, {} ] ], "2d.text.measure.baselines.worker.js": [ - "6f157f4e653ef609aceaab2043da6e71234bb86c", + "c6288a569da0172d7c5f43bdb6c08d3a0e5b2256", [ "html/canvas/offscreen/text/2d.text.measure.baselines.worker.html", {} @@ -624412,7 +624847,7 @@ ] ], "popover-focus-2.html": [ - "be6923e604a18cef5b5f2150ec8345e62bebfbd5", + "2fa1b7a23dee262e19c4c04f7243cecef1c0f0fd", [ null, { @@ -628657,7 +629092,7 @@ ] ], "disabled.html": [ - "8808675eb69b17c7763b407ea7ce4458e9e08fda", + "142a12dd122b555dcc6eee18334f796dc9269961", [ null, {} @@ -635695,7 +636130,7 @@ ] ], "penPointerEventProperties.html": [ - "ba6c15f022539cd1ec86c23559064e205746c5b1", + "05f85d299e9802344bb9705c9f0a7c60843667fe", [ null, { @@ -635704,7 +636139,7 @@ ] ], "penPointerEvents.html": [ - "7141fb56556795fdd25a8ed740c25b2d7edcac9d", + "f885ad501a24113131a7a930f93e7e279106fead", [ null, { @@ -638907,8 +639342,62 @@ {} ] ], + "modulepreload-as-worker-cross-origin.h2.window.js": [ + "3756d7f7fa24e943e7e90a42a71806faadba358d", + [ + "loading/early-hints/modulepreload-as-worker-cross-origin.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], + "modulepreload-as-worker.h2.window.js": [ + "2fd36dfbf3dc0898f020715afdfb0a71eeb6f81a", + [ + "loading/early-hints/modulepreload-as-worker.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], + "modulepreload-cross-origin.h2.window.js": [ + "3499b4d60d0743d1ce118a4e16b50e29f8428126", + [ + "loading/early-hints/modulepreload-cross-origin.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], "modulepreload-in-early-hints.h2.window.js": [ - "5627f04a0fefe1c6996e493ef280826c924ec7bd", + "bd592b0396dd7bcb5b8ba479ba06739b224f59d1", [ "loading/early-hints/modulepreload-in-early-hints.h2.window.html", { @@ -642153,14 +642642,14 @@ ] ], "MediaStreamTrack-applyConstraints-fast.html": [ - "38fabdcdfac2f898a2b2e485215611600b75433d", + "792179801779219749de642a6c36b90883a6f2b2", [ null, {} ] ], "MediaStreamTrack-applyConstraints-getSettings.https.html": [ - "c6401570b8ba3e370be5b8414efb8e8d158c9a4d", + "e18480aae1a8314548dc588880195b04d98a0b30", [ null, { @@ -642169,7 +642658,7 @@ ] ], "MediaStreamTrack-applyConstraints-reject.https.html": [ - "5050ed27dd8e31a84dba7428d6008a3ab7932e45", + "0bb4c9f74eb76fa5e8f701a1714601b619a0a9f7", [ null, { @@ -642187,7 +642676,7 @@ ] ], "MediaStreamTrack-clone.https.html": [ - "3ee21031eb016b47b5fc6ae0e74cf9ffe14b7234", + "8945c1d9ea02d75fd12fe7c10d40089f6d241a4c", [ null, { @@ -650391,7 +650880,7 @@ ] ], "performance-navigation-timing-redirect-on-history.tentative.window.js": [ - "acb70ebfae469d8fce37aa9acc54c335bf65cb67", + "7191456cc845bddcd774efdbb71e4981b91bd066", [ "performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.html", { @@ -652829,6 +653318,15 @@ } ] ], + "pointerevent_pointerout_no_pointer_movement.html": [ + "856f2ce37cec59f70dc1a9ad4d3fe0436da3e4cd", + [ + null, + { + "testdriver": true + } + ] + ], "pointerevent_pointerout_pen.html": [ "210055e6539a369461aa30e609489310891570fd", [ @@ -669982,6 +670480,13 @@ } }, "screen-capture": { + "capture-controller-event-target.https.window.js": [ + "379f35956837c47bc7d732af222189442fd40d0e", + [ + "screen-capture/capture-controller-event-target.https.window.html", + {} + ] + ], "delegate-request.https.sub.html": [ "8cc81c13832d9cd051e35a884d354a0835e58f81", [ @@ -670578,7 +671083,7 @@ ] ], "animation-timeline-parsing.html": [ - "f0061c5705dd78484133968c414bfea9103ff6f1", + "9e3c1078b5b416ac8402abe8901ca8e1c8d0a9fa", [ null, {} @@ -670592,7 +671097,7 @@ ] ], "animation-timeline-view-functional-notation.tentative.html": [ - "3ac94478e5955b09d2625c5cc8785514d8cee76f", + "d91dfe924b7756e111bdc9ef6a2fc8fefa5245d4", [ null, {} @@ -670830,7 +671335,7 @@ ] ], "view-timeline-animation.html": [ - "d1ea2f6c07f56e848ed9d178b85af484c668a59c", + "1bf034a742f3b30be5070b78536614c1b53823fe", [ null, {} @@ -670858,7 +671363,7 @@ ] ], "view-timeline-inset-animation.html": [ - "9ba88fde507aceae168e1c0b31d38f90ebe6c7f3", + "f9aa0f291895ba15bead50f6e7efbc328a41a18e", [ null, {} @@ -670886,7 +671391,7 @@ ] ], "view-timeline-lookup.html": [ - "98f11b85429c02af8033ad4af1515de7997c69bf", + "067ac1fa969f119e252d3415f172cbb6e6129d82", [ null, {} @@ -671062,7 +671567,7 @@ ] ], "scroll-animation-effect-phases.tentative.html": [ - "67bc36ca104258b970489898872d9932201e3823", + "41ae0e0612f61a88f023cde8f32ff5fcf095df37", [ null, { @@ -671166,21 +671671,21 @@ ] ], "block-view-timeline-current-time-vertical-rl.tentative.html": [ - "5bc459845229196bc075a0f27a6461b5519700fc", + "beb380060e1b51e86f9f1cfd1ad6885754cab0c4", [ null, {} ] ], "block-view-timeline-current-time.tentative.html": [ - "a6530f663121c2e0b97a1ec41de8c35326435525", + "c24d04412fc99f1d227d8ac6202acb985f3c67d8", [ null, {} ] ], "block-view-timeline-nested-subject.tentative.html": [ - "2cc8af882ff87cbcacb7cbb84aa78824dff532fa", + "6fdc7c68229a8abba8b1e6f0409e483eed94fe93", [ null, {} @@ -671201,12 +671706,63 @@ ] ], "inline-view-timeline-current-time.tentative.html": [ - "5b37798fe89035a5eb459ae479fc94ac42a05689", + "59d73d0cdf772475f0f0f573562ac840ae0b958d", [ null, {} ] ], + "sticky": { + "view-timeline-sticky-offscreen-1.html": [ + "d8756769c5179cdb7458958b81151baa17b17d6a", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-2.html": [ + "2d098dcbe306ddf4e089d50fc4a0bdd408538f77", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-3.html": [ + "c87dfc4dcb7d155f852e0d1a27cbcd427de27213", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-4.html": [ + "f6b02ffb2eebfbbf3338f49edc3068282a9949d7", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-5.html": [ + "380c01297e14571cd2a678c2547ddf1374d6a654", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-6.html": [ + "94f0abc9b1e6662931e630c231334d5bff77b082", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-7.html": [ + "83115249fae7fb1ad263b6c5db4095701051bac9", + [ + null, + {} + ] + ] + }, "timeline-offset-in-keyframe.html": [ "1168893854297560262e03c28bdf71580955b8ae", [ @@ -683335,7 +683891,7 @@ ] ], "bad-strategies.any.js": [ - "521fbffe3ab479bc276495398f935343df674110", + "409c63b8177e25222922d0a9eedb3e51a5a4a96a", [ "streams/readable-streams/bad-strategies.any.html", { @@ -689450,14 +690006,14 @@ ] ], "SVGLength-px-with-context.html": [ - "067948d5454d3b0ca715e58f72f7ab1840a4712d", + "b5c2149b692eea53d7565031d135317526736c44", [ null, {} ] ], "SVGLength-px.html": [ - "321be5912b84c3ad0df8a68231213311171386d5", + "25ce286197a49e9d06dc184b2fc8a89d15cd5ed5", [ null, {} @@ -700324,7 +700880,7 @@ ] ], "partitioned-web-locks.tentative.https.html": [ - "2f166e67bc13cc4976dfd10f854880b8f07a0e50", + "680474dea9838e643d612711bb405a2faf0c07fd", [ null, {} @@ -702647,6 +703203,15 @@ null, {} ] + ], + "setSinkId-with-MediaElementAudioSourceNode.https.html": [ + "af71782717ae07682f63ad6e3f45c74bb28b3415", + [ + null, + { + "testdriver": true + } + ] ] }, "the-mediastreamaudiodestinationnode-interface": { @@ -704141,7 +704706,7 @@ ] ], "encoded-video-chunk.any.js": [ - "0cf0d8de4408dc1dc634b064c9a3fd313a04f813", + "9b60e59a79311dea38d8cb4cad1d3d1cebf2ff3a", [ "webcodecs/encoded-video-chunk.any.html", { @@ -705911,7 +706476,7 @@ ] ], "videoDecoder-codec-specific.https.any.js": [ - "4e0843646b7daed9829a21aa1243bbd2b697963f", + "31e14d81f3418879c5defd6f4953f7521ef5baaa", [ "webcodecs/videoDecoder-codec-specific.https.any.html?av1", { @@ -707057,7 +707622,7 @@ ] ], "Set.html": [ - "3134c8185906c1fcf0d5deeecf2ec668f73ef2c6", + "1390b51cd03b51cb15ceea1519fcd309bf914c86", [ null, {} @@ -709724,6 +710289,57 @@ } ] ], + "softplus.https.any.js": [ + "7096f64a043a91fba09c91df70114666c8980664", + [ + "webnn/softplus.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API softplus operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/softplus.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API softplus operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "softsign.https.any.js": [ "61a7d5365fabca290eaeb400c961a107558e17ed", [ @@ -710343,7 +710959,7 @@ ] ], "RTCPeerConnection-iceConnectionState.https.html": [ - "5083be6cdfd16f5c2c67a80a7dbc9c2401f1a0a8", + "5361cb2c1af2b6cd9606798cca63b4e7e9f0a20b", [ null, { @@ -711742,7 +712358,7 @@ ] ], "RTCRtpTransceiver-headerExtensionControl.html": [ - "79eba02727bb35b745cee0a3b6246e37fb216e06", + "796d35dcb6bfffab5d62439da8dd93fc28aec9c9", [ null, {} @@ -722079,6 +722695,69 @@ ] ] }, + "mixed-content.https.any.js": [ + "b7a6d8381da97b9b16cca3803717a66c8c7d69ad", + [ + "websockets/mixed-content.https.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ] + ], "multi-globals": { "message-received.html": [ "704b1e357b8ee2b37653888f6f9f456571a0ae58", @@ -753839,6 +754518,15 @@ {} ] ] + }, + "subgrid": { + "repeat-auto-fill-009.html": [ + "73b52a616b2237473d839960bbe933ed466b8ea2", + [ + null, + {} + ] + ] } }, "css-images": { @@ -756088,7 +756776,7 @@ "browsing_context": { "capture_screenshot": { "capture_screenshot.py": [ - "7b26b2be0ce83a3eb54f2e9177a421a9520e7f1c", + "0ee4c8ed274ce31295d2cbf8f4229e7135ea2b28", [ null, {} @@ -756216,14 +756904,14 @@ }, "navigate": { "about_blank.py": [ - "1f6d4774ae778fb007c6b718d21870f04655d710", + "55ca351297732a3cc69073f8d68f60459346e379", [ null, {} ] ], "data_url.py": [ - "8fd5695646d1b1e0f611f2f2c57dda595b05a4be", + "6d95beb66c000b4e2fbf2578ed3e8e5874ee736d", [ null, {} @@ -756237,21 +756925,21 @@ ] ], "frame.py": [ - "2c2131b6ee6f831fc318ca5a9903fc56689f30f2", + "4dcd88dfdb8513968a16ec21e4657e852e9785d4", [ null, {} ] ], "hash.py": [ - "d4862a62012d1b2c60e40a3f1c96e43bf0c448a9", + "d31c3f9a6ebcdf17e1916ccbc7ca5328861604e7", [ null, {} ] ], "image.py": [ - "b52ea9787c0ece95013d08d1db9e46a42c44e2ba", + "79030c9fe124678438221a6cb6166a5b525b2c8e", [ null, {} @@ -756265,14 +756953,14 @@ ] ], "navigate.py": [ - "a35f2728ef7b32d93846eae94d9dc2b794966ee2", + "142457028123c611f2eaf0b7ad45a02aba093f50", [ null, {} ] ], "wait.py": [ - "9a0b14e755e9cf9c2cc11fab8ae3cb48a1748e73", + "3a351e108908d949a276535bed4eeaa041dcd576", [ null, {} @@ -756349,12 +757037,51 @@ ] }, "reload": { + "frame.py": [ + "ce9281583f2369013850d4c074a8e4c345cc453e", + [ + null, + {} + ] + ], "invalid.py": [ "35be21ef19fe2843d3d0e2c5fb837c09e998cad4", [ null, {} ] + ], + "reload.py": [ + "b6e957e8a8c5cb0b6e89b7bd6ab73b0b4fac56ef", + [ + null, + {} + ] + ], + "wait.py": [ + "2b581c2f0dbc0e34e63641318006aeed20963c6b", + [ + null, + { + "timeout": "long" + } + ] + ] + }, + "set_viewport": { + "invalid.py": [ + "a649972ae18352ad0cce493b68cddbd86fb8ddb7", + [ + null, + {} + ] + ], + "set_viewport.py": [ + "1aa977be421c6dbea67408cca9a718049f023fa7", + [ + null, + {} + ] ] } }, @@ -756674,14 +757401,14 @@ ] ], "result.py": [ - "a930cf2292fc690daaea447ccf0104cacad6c9bf", + "df989c407ee7dbf0a083e29697f9559fd733dbdd", [ null, {} ] ], "result_node.py": [ - "a2359b164ebbd6e3ef0abba42ad43106bc38e2d9", + "9d09b9fc04ace5d463976ee1a0af6d6b163e9b72", [ null, {} @@ -756701,6 +757428,13 @@ {} ] ], + "serialization_options.py": [ + "4084ec482093a88b8d55d59a719710908ad248bc", + [ + null, + {} + ] + ], "strict_mode.py": [ "1a9fd4f10823a526f27bc7aaeae32f1f263c9e13", [ @@ -756785,7 +757519,7 @@ ] ], "invalid.py": [ - "9923d7414e8497617b8f4c1f7e1f4edf31c1adc0", + "666bf4d06e0ef128132ef659c8ce039e3821f6fc", [ null, {} @@ -756799,14 +757533,14 @@ ] ], "result.py": [ - "afdfb5fe42f12b73780f17b4942000967eb420c5", + "faea80a86b60fa5939899640f5dfeaf69628fb67", [ null, {} ] ], "result_node.py": [ - "89ce95ed21da1088334e11238c296a565d27e498", + "a3ca316d0275f566e4bc913beae24ffae58af36d", [ null, {} diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-002.html.ini deleted file mode 100644 index d695ff0e521..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[border-image-002.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-003.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-003.html.ini deleted file mode 100644 index 182fa949db8..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-003.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[border-image-003.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-004.html.ini b/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-004.html.ini deleted file mode 100644 index e4f30d04308..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-backgrounds/border-image-004.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[border-image-004.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini new file mode 100644 index 00000000000..304b1579ca4 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini @@ -0,0 +1,2 @@ +[opacity-animation-ending-correctly-001.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini index 5fbefaad28c..1c3ee092b7b 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1600,3 +1600,54 @@ [e.style['color'\] = "color-mix(in hwb specified hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))" should set the property value] expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, 70% red, 50% blue)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, red 50%, blue)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, red, blue 50%)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, 50% hsl(120deg 10% 20%), hsl(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, hsl(120deg 10% 20%), 50% hsl(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hwb, 50% hwb(120deg 10% 20%), hwb(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hwb, hwb(120deg 10% 20%), 50% hwb(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, 50% color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, color(srgb .1 .2 .3), 50% color(srgb .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb-linear, 50% color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3), 50% color(srgb-linear .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz, 50% color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz, color(xyz .1 .2 .3), 50% color(xyz .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d50, 50% color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3), 50% color(xyz-d50 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d65, 50% color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3), 50% color(xyz-d65 .5 .6 .7))" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-fonts/parsing/font-face-src-list.html.ini b/tests/wpt/meta-legacy-layout/css/css-fonts/parsing/font-face-src-list.html.ini index 5d06b7fe69e..728d34ee2d0 100644 --- a/tests/wpt/meta-legacy-layout/css/css-fonts/parsing/font-face-src-list.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-fonts/parsing/font-face-src-list.html.ini @@ -43,3 +43,9 @@ [Check that src: url(foo.ttf) format(unknown), url(bar.ttf) tech(broken) is invalid] expected: FAIL + + [Check that src: url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), url(foo.ttf) is valid] + expected: FAIL + + [Check that src: url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), junk is invalid] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-images/image-set/image-set-computed.sub.html.ini b/tests/wpt/meta-legacy-layout/css/css-images/image-set/image-set-computed.sub.html.ini index faaf1cc22e8..d4686575262 100644 --- a/tests/wpt/meta-legacy-layout/css/css-images/image-set/image-set-computed.sub.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-images/image-set/image-set-computed.sub.html.ini @@ -100,3 +100,9 @@ [Property background-image value '-webkit-image-set(url('http://web-platform.test/example.png') calc(37dpcm + 0.79532dpcm))'] expected: FAIL + + [Property background-image value 'image-set(url('http://web-platform.test/example.png') calc(-1 * 1x))'] + expected: FAIL + + [Property background-image value '-webkit-image-set(url('http://web-platform.test/example.png') calc(-1 * 1x))'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-005.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-005.html.ini new file mode 100644 index 00000000000..b9463b3ee1e --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-005.html.ini @@ -0,0 +1,2 @@ +[trailing-other-space-separators-break-spaces-005.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/idlharness-2.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/idlharness-2.html.ini new file mode 100644 index 00000000000..ec9b24fdaeb --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/idlharness-2.html.ini @@ -0,0 +1,21 @@ +[idlharness-2.html] + [CSSTransition interface: existence and properties of interface object] + expected: FAIL + + [CSSTransition interface object length] + expected: FAIL + + [CSSTransition interface object name] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [CSSTransition interface: attribute transitionProperty] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/animations/calc-interpolation.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/animations/calc-interpolation.html.ini index bb77fc551cd..eb75911dd38 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/animations/calc-interpolation.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/animations/calc-interpolation.html.ini @@ -307,3 +307,9 @@ [Web Animations: property <left> from [0px\] to [calc(infinity * 1px)\] at (1.25) should be [NaNpx\]] expected: FAIL + + [CSS Animations: property <left> from [0px\] to [calc(infinity * 1px)\] at (0) should be [0px\]] + expected: FAIL + + [Web Animations: property <left> from [0px\] to [calc(infinity * 1px)\] at (0) should be [0px\]] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/cap-invalidation.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/cap-invalidation.html.ini new file mode 100644 index 00000000000..fe359e79ece --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/cap-invalidation.html.ini @@ -0,0 +1,3 @@ +[cap-invalidation.html] + [CSS Values and Units Test: cap invalidation] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/exp-log-serialize.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/exp-log-serialize.html.ini index f8246bbe7ab..4529c0f0855 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/exp-log-serialize.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/exp-log-serialize.html.ini @@ -52,3 +52,6 @@ ['scale(calc(log(0)))' as a computed value should serialize as 'matrix(-infinity, 0, 0, -infinity, 0, 0)'.] expected: FAIL + + ['calc(log(0))' as a computed value should serialize as '0'.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/rcap-invalidation.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/rcap-invalidation.html.ini new file mode 100644 index 00000000000..7ffec102050 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/rcap-invalidation.html.ini @@ -0,0 +1,3 @@ +[rcap-invalidation.html] + [CSS Values and Units Test: rcap invalidation] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/round-mod-rem-serialize.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/round-mod-rem-serialize.html.ini index c2cf0447912..c03f25d48cc 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/round-mod-rem-serialize.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/round-mod-rem-serialize.html.ini @@ -67,3 +67,21 @@ ['scale(calc(rem(1,0)))' as a computed value should serialize as 'matrix(NaN, 0, 0, NaN, 0, 0)'.] expected: FAIL + + ['calc(round(1,0))' as a computed value should serialize as '0'.] + expected: FAIL + + ['scale(calc(round(1,0)))' as a computed value should serialize as 'matrix(0, 0, 0, 0, 0, 0)'.] + expected: FAIL + + ['calc(mod(1,0))' as a computed value should serialize as '0'.] + expected: FAIL + + ['scale(calc(mod(1,0)))' as a computed value should serialize as 'matrix(0, 0, 0, 0, 0, 0)'.] + expected: FAIL + + ['calc(rem(1,0))' as a computed value should serialize as '0'.] + expected: FAIL + + ['scale(calc(rem(1,0)))' as a computed value should serialize as 'matrix(0, 0, 0, 0, 0, 0)'.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom/getComputedStyle-insets-relpos-inline.html.ini b/tests/wpt/meta-legacy-layout/css/cssom/getComputedStyle-insets-relpos-inline.html.ini new file mode 100644 index 00000000000..bcb8287b657 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/cssom/getComputedStyle-insets-relpos-inline.html.ini @@ -0,0 +1,12 @@ +[getComputedStyle-insets-relpos-inline.html] + [OOF with left fixed right auto in relpos inline container] + expected: FAIL + + [OOF with left auto right fixed in relpos inline container] + expected: FAIL + + [OOF with left fixed right auto in relpos inline container with mixed directions] + expected: FAIL + + [OOF with left auto right fixed in relpos inline container with mixed directions] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html.ini b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html.ini new file mode 100644 index 00000000000..5a8d3be3eee --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html.ini @@ -0,0 +1,3 @@ +[is-pseudo-containing-sibling-relationship-in-has.html] + [Initially red] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html.ini b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html.ini new file mode 100644 index 00000000000..0159fa26f93 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html.ini @@ -0,0 +1,3 @@ +[not-pseudo-containing-sibling-relationship-in-has.html] + [Initially red] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini index 36a410bfecb..eed6839e957 100644 --- a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -149,3 +149,6 @@ [border-image sec-fetch-site - HTTPS downgrade (header not sent)] expected: FAIL + + [background-image sec-fetch-user - Not sent to non-trustworthy same-site destination] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini new file mode 100644 index 00000000000..3e07e6b7d1f --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini @@ -0,0 +1,6 @@ +[empty-iframe-load-event.html] + [Check execution order from nested timeout] + expected: FAIL + + [Check execution order on load handler] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini index 5aef7ce66ce..324db3d9b35 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini @@ -10,6 +10,3 @@ [load event does not fire on window.open('about:blank?foo')] expected: FAIL - - [load event does not fire on window.open('about:blank')] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini index abd95eec1fd..e91aac214b4 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini @@ -4,7 +4,16 @@ expected: NOTRUN [Navigating an opened window with an iframe via location.href to a javascript: URL must not fire beforeunload on the iframe: undefined completion] - expected: FAIL + expected: NOTRUN [Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: string completion] + expected: NOTRUN + + [Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: undefined completion] expected: TIMEOUT + + [Navigating an iframe via location.href to a javascript: URL must not fire beforeunload: string completion] + expected: NOTRUN + + [Navigating an iframe via src="" to a javascript: URL after insertion must not fire beforeunload: string completion] + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini b/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/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/meta-legacy-layout/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini index 90eb9ed743b..24c9e5d3926 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini @@ -1,4 +1,5 @@ [cross-origin-objects.html] + expected: TIMEOUT [Basic sanity-checking (cross-origin)] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini deleted file mode 100644 index 4b4820d1729..00000000000 --- a/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[creating_browsing_context_test_01.html] - [first argument: absolute url] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html.ini new file mode 100644 index 00000000000..1bf6b9bb1c6 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html.ini @@ -0,0 +1,3 @@ +[2d.text.drawing.style.fontStretch.settings.html] + [Testing value setting of fontStretch in Canvas] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini index 5cdcce07c65..2a54f2f8814 100644 --- a/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini +++ b/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini @@ -1,2 +1,2 @@ [canvas.2d.disconnected.html] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html.ini new file mode 100644 index 00000000000..1bf6b9bb1c6 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html.ini @@ -0,0 +1,3 @@ +[2d.text.drawing.style.fontStretch.settings.html] + [Testing value setting of fontStretch in Canvas] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js.ini new file mode 100644 index 00000000000..7acd5989def --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js.ini @@ -0,0 +1,3 @@ +[2d.text.drawing.style.fontStretch.settings.worker.html] + [Testing value setting of fontStretch in Canvas] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini index 3cf3b15ec77..ba6b3eb447f 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini @@ -179,8 +179,5 @@ [multipart/form-data: Basic test (formdata event)] expected: FAIL - [multipart/form-data: 0x00 in name (normal form)] - expected: FAIL - [multipart/form-data: \\r\\n in value (formdata event)] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini index 6c23005cd9e..dc608d4d9a0 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini @@ -137,9 +137,6 @@ [application/x-www-form-urlencoded: non-ASCII in filename (normal form)] expected: FAIL - [application/x-www-form-urlencoded: non-ASCII in filename (formdata event)] - expected: FAIL - [application/x-www-form-urlencoded: characters not in encoding in name and value (normal form)] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini index 071b4378add..cc18f512574 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini @@ -11,3 +11,6 @@ [Check that rel=noopener with target=_parent does a normal load] expected: FAIL + + [Check that rel=noopener with target=_self does a normal load] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini deleted file mode 100644 index 96f67cc4a82..00000000000 --- a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[async-script.html?reload] - expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/html/semantics/selectors/pseudo-classes/disabled.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/selectors/pseudo-classes/disabled.html.ini new file mode 100644 index 00000000000..1cf15a891bd --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/semantics/selectors/pseudo-classes/disabled.html.ini @@ -0,0 +1,3 @@ +[disabled.html] + [':disabled' should match elements that are appended to a disabled fieldset dynamically] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini new file mode 100644 index 00000000000..b8bdf33cb65 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index 4a48dd15a9d..1d71471b73c 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/quirks/table-cell-width-calculation.html.ini b/tests/wpt/meta-legacy-layout/quirks/table-cell-width-calculation.html.ini index a0431aa8312..d8fd7dec264 100644 --- a/tests/wpt/meta-legacy-layout/quirks/table-cell-width-calculation.html.ini +++ b/tests/wpt/meta-legacy-layout/quirks/table-cell-width-calculation.html.ini @@ -24,3 +24,5 @@ [The table cell width calculation quirk, basic] expected: FAIL + [The table cell width calculation quirk, the quirk shouldn't apply for generated content] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini index 71ca4ed5411..49b17a921b5 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini @@ -94,10 +94,10 @@ expected: FAIL [mime-type 16 : text/html;charset=\x0bgbk] - expected: FAIL + expected: TIMEOUT [mime-type 17 : text/html;charset=\x0cgbk] - expected: TIMEOUT + expected: NOTRUN [mime-type 18 : text/html;\x0bcharset=gbk] expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini index e86d0df261e..37dd5b66269 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html.ini @@ -1,5 +1,5 @@ [audiocontextoptions.html] - expected: CRASH + expected: TIMEOUT [X context = new AudioContext({sampleRate: 1}) did not throw an exception.] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/legacy-platform-object/Set.html.ini b/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/legacy-platform-object/Set.html.ini index 7dd6d3787ce..749ef3cf268 100644 --- a/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/legacy-platform-object/Set.html.ini +++ b/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/legacy-platform-object/Set.html.ini @@ -1,3 +1,6 @@ [Set.html] [must throw when assigning to a numeric property on an object which implements a indexed property getter but not a setter in strict mode] expected: FAIL + + [must allow setting built-in property on a [LegacyOverrideBuiltIns\] object even if a named property shadows it] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini b/tests/wpt/meta-legacy-layout/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini index 39d039a0132..04c2032c723 100644 --- a/tests/wpt/meta-legacy-layout/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini @@ -1,5 +1,5 @@ [cross-partition.https.tentative.html] - expected: CRASH + expected: TIMEOUT [BroadcastChannel messages aren't received from a cross-partition iframe] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webmessaging/with-ports/018.html.ini b/tests/wpt/meta-legacy-layout/webmessaging/with-ports/018.html.ini new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/webmessaging/with-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/websockets/mixed-content.https.any.js.ini b/tests/wpt/meta-legacy-layout/websockets/mixed-content.https.any.js.ini new file mode 100644 index 00000000000..28d2669baf3 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/websockets/mixed-content.https.any.js.ini @@ -0,0 +1,14 @@ +[mixed-content.https.any.worker.html] + [constructing an insecure WebSocket in a secure context should throw] + expected: FAIL + + +[mixed-content.https.any.sharedworker.html] + expected: ERROR + +[mixed-content.https.any.serviceworker.html] + expected: ERROR + +[mixed-content.https.any.html] + [constructing an insecure WebSocket in a secure context should throw] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini deleted file mode 100644 index aa6c9e5b826..00000000000 --- a/tests/wpt/meta-legacy-layout/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/meta-legacy-layout/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/meta-legacy-layout/workers/constructors/Worker/Worker-constructor.html.ini deleted file mode 100644 index 80f9a4f15b8..00000000000 --- a/tests/wpt/meta-legacy-layout/workers/constructors/Worker/Worker-constructor.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[Worker-constructor.html] - expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/workers/semantics/run-a-worker/003.html.ini b/tests/wpt/meta-legacy-layout/workers/semantics/run-a-worker/003.html.ini index f4318e59a8d..e083d83077b 100644 --- a/tests/wpt/meta-legacy-layout/workers/semantics/run-a-worker/003.html.ini +++ b/tests/wpt/meta-legacy-layout/workers/semantics/run-a-worker/003.html.ini @@ -1,5 +1,4 @@ [003.html] type: testharness - expected: ERROR [shared] expected: FAIL diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index c8a75b98977..dcfa14c9827 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -4145,6 +4145,13 @@ {} ] ], + "getComputedStyle-insets-absolute-crash.html": [ + "e28828bab1fe74955d97a0601fa1d64b98822273", + [ + null, + {} + ] + ], "removerule-invalidation-crash.html": [ "a83f43d5faf62338cfb442468a6e9e0e011c79f2", [ @@ -4957,7 +4964,7 @@ ] ], "remove-editing-host-during-forwarddelete.html": [ - "9c803dc132763213b089cdb490c6c9b2357ff027", + "2b23c34607c3241e863cf5ea118ff08d2a9286b8", [ null, {} @@ -30087,6 +30094,45 @@ {} ] ], + "page-size-001-print.html": [ + "19d72b0231f4240206f14564103a61c08008e17d", + [ + null, + [ + [ + "/css/printing/page-size-001-print-ref.html", + "==" + ] + ], + {} + ] + ], + "page-size-002-print.html": [ + "8ecf38107b87968692292a227812d7d6c8dbd625", + [ + null, + [ + [ + "/css/printing/page-size-002-print-ref.html", + "==" + ] + ], + {} + ] + ], + "page-size-003-print.html": [ + "805ff0e568a1b52fce857893a7d5a13078559730", + [ + null, + [ + [ + "/css/printing/page-size-003-print-ref.html", + "==" + ] + ], + {} + ] + ], "paused-animations-print.html": [ "03ef1bab3c3430891ed9f37ca913c1339d36e682", [ @@ -31547,7 +31593,7 @@ ] ], "abspos-containing-block-initial-007.xht": [ - "5adbb6daf44aa5b246575d28230a8e700a8b7a4b", + "0b70e1e63e7bd8edf806bfd961ed37124886388f", [ null, [ @@ -303512,7 +303558,7 @@ ] ], "offset-path-coord-box-001.html": [ - "d4e903e69dfc5535a109b84868e77af03a9c27ee", + "15f378e038615dafa6b6ddbf00ca3155f81686b9", [ null, [ @@ -303541,7 +303587,7 @@ ] ], "offset-path-coord-box-002.html": [ - "0446e2caa16c43ece32a0f3c0659c3d227f01ce9", + "40b94727d373fd47859ff29d909a28c00276a6e3", [ null, [ @@ -303554,7 +303600,7 @@ ] ], "offset-path-coord-box-003.html": [ - "d3ea7f92a8ed17521a957aebcd631906b0ceb86b", + "e793c18830df60560a6fa746081fd714ea9ad3ab", [ null, [ @@ -303566,13 +303612,13 @@ {} ] ], - "offset-path-geometry-box.html": [ - "1e9399441c2ec31e868e7fca6d2fa6d1169f366c", + "offset-path-coord-box-004.html": [ + "c84bae6832ee6154862d472e0997989ca54dad59", [ null, [ [ - "/css/motion/offset-path-geometry-box-ref.html", + "/css/motion/offset-path-coord-box-004-ref.html", "==" ] ], @@ -303895,7 +303941,7 @@ ] ], "offset-path-shape-circle-001.html": [ - "4874ba339298a18fb0a733e0254053579bbe50ac", + "2205d9d3f69b24c29347f92c870bfc014c648e93", [ null, [ @@ -303911,7 +303957,7 @@ [ [ 0, - 1 + 35 ], [ 0, @@ -303937,7 +303983,7 @@ ] ], "offset-path-shape-circle-003.html": [ - "1911d425a16997d6a6da3edb0474e527c8b1e2b6", + "ef69e7e41b623e00663e3512cab838d4abf4a4ae", [ null, [ @@ -303953,11 +303999,11 @@ [ [ 0, - 10 + 110 ], [ 0, - 20 + 500 ] ] ] @@ -303966,7 +304012,7 @@ ] ], "offset-path-shape-circle-004.html": [ - "f0a8523dd16f15075828d9bcbbf31f62a97ff35d", + "d22665636e62e7369b50b97da768e55c3d3f1918", [ null, [ @@ -303975,11 +304021,27 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 80 + ], + [ + 0, + 310 + ] + ] + ] + ] + } ] ], "offset-path-shape-circle-005.html": [ - "0ca93306c609fbf77da660636b23d0aebfff2c02", + "2ba5bc1650a4e497124a948b3b5ceefa22ec84ee", [ null, [ @@ -303988,11 +304050,27 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 18 + ], + [ + 0, + 400 + ] + ] + ] + ] + } ] ], "offset-path-shape-ellipse-001.html": [ - "b8254458d38d71038f47dd80ffddbd971190b665", + "be3ade57c6ddcfed63b9796c3c3eb0b32530fb26", [ null, [ @@ -304008,7 +304086,7 @@ [ [ 0, - 1 + 24 ], [ 0, @@ -304034,7 +304112,7 @@ ] ], "offset-path-shape-ellipse-003.html": [ - "540c56dba7b39ccb93f29e766c9178585c82238a", + "38ef5eb9bbfa9c955c2d4fd53440ab2d21c8a26e", [ null, [ @@ -304043,7 +304121,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 25 + ], + [ + 0, + 450 + ] + ] + ] + ] + } ] ], "offset-path-shape-ellipse-004.html": [ @@ -304060,7 +304154,7 @@ ] ], "offset-path-shape-ellipse-005.html": [ - "27eae4a5c491907c3455e5adae7c226190ee8f83", + "2b2c0abeff95564680680bd231752a8a0fa46544", [ null, [ @@ -304069,7 +304163,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 18 + ], + [ + 0, + 400 + ] + ] + ] + ] + } ] ], "offset-path-shape-inset-001.html": [ @@ -304102,7 +304212,7 @@ ] ], "offset-path-shape-inset-002.html": [ - "6279cdd35ebe1c1e977c67b30733fe82524a56dd", + "5ca502e8b1c30124204d9fd61d2db9fdcb630312", [ null, [ @@ -304111,7 +304221,23 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 75 + ], + [ + 0, + 500 + ] + ] + ] + ] + } ] ], "offset-path-shape-polygon-001.html": [ @@ -322967,7 +323093,7 @@ ] ], "deferred-timeline-composited.html": [ - "239c0ca50a97458f01402a104c40a4c4a8c2254e", + "e2437911b3993db5940e9113e077a005f71f7012", [ null, [ @@ -323254,6 +323380,21 @@ {} ] ] + }, + "view-timelines": { + "range-boundary.html": [ + "e2ca394ec0c9587b5e5b0be9eb1b2c3897a67764", + [ + null, + [ + [ + "/scroll-animations/view-timelines/range-boundary-ref.html", + "==" + ] + ], + {} + ] + ] } }, "selection": { @@ -326994,6 +327135,19 @@ "web-animations": { "animation-model": { "keyframe-effects": { + "effect-value-opacity-replaced-effect.html": [ + "bef3bd3e8d27fd721dd373e4f33cbae1f6b5b2c0", + [ + null, + [ + [ + "/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect-ref.html", + "==" + ] + ], + {} + ] + ], "transform-and-opacity-on-inline-001.html": [ "f76b53cd4c49152b1527bae481d76ace94243c7b", [ @@ -333560,6 +333714,12 @@ ] } }, + "captured-mouse-events": { + "META.yml": [ + "90b8af85ee98035f893000e1acb4df59510bd10c", + [] + ] + }, "clear-site-data": { "META.yml": [ "65ca96dbb9d774e97cc3a60f6b6dde952104893b", @@ -333753,6 +333913,34 @@ "66ad9243c7dc54e59052fa4fe64124cd63d0e84e", [] ], + "clear-site-data": { + "clear-site-data-all.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-cache.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-cookies.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "clear-site-data-storage.https.html.headers": [ + "226bb1c3b10489842901a1184b2b8822d2976075", + [] + ], + "resources": { + "check-client-hints.py": [ + "f5172300028711ca36c1812230d4ce0148cb0390", + [] + ], + "clear-site-data.py": [ + "fd16be9fbcb0ffba3c440b5525e0580efd088f37", + [] + ] + } + }, "critical-ch": { "critical-ch.navigation-timing.restart.https.html.headers": [ "b221a32886fffa1fd8dc5562fa211b8446db835b", @@ -355423,7 +355611,7 @@ ] }, "fedcm-helper.sub.js": [ - "79136b5958fa584842daf5455e6f419851842d00", + "e548e8e9c9d4d6aa53114368770455420e66f9d4", [] ], "fedcm-iframe-level2.html": [ @@ -375733,6 +375921,14 @@ "57bf3ddc5213d06e0975de38f330ffb7c441b268", [] ], + "12x12-green.png": [ + "1b9284844852a853624cc9c5848a6b1cef876e02", + [] + ], + "1pxgreen-98pxred.png": [ + "0f8571a94550493b483a4f0988fcb6ce1df1d412", + [] + ], "1x1-green.png": [ "b98ca0ba0a03c580ac339e4a3653539cfa8edc71", [] @@ -379985,7 +380181,7 @@ [] ], "align-items-baseline-row-vert-ref.html": [ - "dec8ac3b353c97f55a40df7965a23b642c53149f", + "c9cbc39416d43ab5075287c23c45b8b4c3c7620f", [] ], "anonymous-flex-item-split-ref.html": [ @@ -411635,18 +411831,18 @@ [] ], "offset-path-coord-box-001-ref.html": [ - "e9a7fbb808feefff1838dcd1476b1829231ddbba", + "8b86ce26e1652bd3d06bbc0a7852084470cc7e17", [] ], "offset-path-coord-box-002-ref.html": [ - "b7bee52a1e389b84b3fe0f8ae0749ecf5a2647a5", + "41f65dc0164b896c3f84da20e6d8efee78c99d0b", [] ], "offset-path-coord-box-003-ref.html": [ - "5b9b445dd8fbc921416db58e95834aa699a9a3d2", + "0fa94d4c31b4fbeeb44603e1f1c3e50ca08b2bf2", [] ], - "offset-path-geometry-box-ref.html": [ + "offset-path-coord-box-004-ref.html": [ "60870c815e140ac15502e723ea477678cdc848a7", [] ], @@ -411727,7 +411923,7 @@ [] ], "offset-path-shape-circle-001-ref.html": [ - "7bc29af79c6ce74f1b7748f0234ac8346984e18e", + "6d6b64d32e3c622be1b27a9dae4c7293207fcab3", [] ], "offset-path-shape-circle-002-ref.html": [ @@ -411735,11 +411931,11 @@ [] ], "offset-path-shape-circle-003-ref.html": [ - "327d325137c399499b681f6552750ff3d008968c", + "c005984f768aed32b96779045addf9264c09da2b", [] ], "offset-path-shape-circle-004-ref.html": [ - "86c67dcdedcb2625216cd064384545113f2a96fc", + "925abdb8b4f04decd267bae83486b02730438eec", [] ], "offset-path-shape-circle-005-ref.html": [ @@ -411747,7 +411943,7 @@ [] ], "offset-path-shape-ellipse-001-ref.html": [ - "32236bbc239a98c6a512d64037fcda32a8c5e976", + "0e53fa2d355e16156f1f6e313910f688c7e97d0c", [] ], "offset-path-shape-ellipse-002-ref.html": [ @@ -411755,7 +411951,7 @@ [] ], "offset-path-shape-ellipse-003-ref.html": [ - "4a9fed4c86ab7d08bbe1d32ff74d26e42f50e675", + "2239210e49b563d4df210b2084d50d4c32a8d9bc", [] ], "offset-path-shape-ellipse-004-ref.html": [ @@ -411771,7 +411967,7 @@ [] ], "offset-path-shape-inset-002-ref.html": [ - "28195129f3282fadc8a2e691321425f886eef6c3", + "1bb649474aacd6d83601936bf12b918d2d1f9ed8", [] ], "offset-path-shape-polygon-001-ref.html": [ @@ -411794,10 +411990,6 @@ "7e9e07cccf3d26c8090ba98ee788565eca799b07", [] ], - "offset-path-shape-ref.html": [ - "a659b287fdab1ed7bda453c36c17140e0c2740f2", - [] - ], "offset-path-shape-xywh-001-ref.html": [ "12f9668dd5c8884368fe89104474d287bb04b28b", [] @@ -411944,6 +412136,18 @@ "52ea6bfffcbf187acdeeeacdf960896a2d695986", [] ], + "page-size-001-print-ref.html": [ + "8bfd2717fa5def1e90513537fa34cf4f3ea2f9e4", + [] + ], + "page-size-002-print-ref.html": [ + "aa8cb6edcd242b8619caf2e67a35c7b4f2684daa", + [] + ], + "page-size-003-print-ref.html": [ + "38ea1508781e6313e9102bf4c307f91b290df4c4", + [] + ], "paused-animations-print-ref.html": [ "c22ecd174585100fd5faae8402f5a6e141b8264e", [] @@ -413694,6 +413898,14 @@ "scroll_support.js": [ "52c2f58723a2a39e9d652036d82d59475497c76e", [] + ], + "scrollend-event-fires-to-iframe-inner-frame.html": [ + "3657a8b87714f5b03f52def89847dd8df986f174", + [] + ], + "scrollend-user-scroll-common.js": [ + "4bf8f927ff2d7250326b75207831b1aa1e3975b9", + [] ] } }, @@ -414391,7 +414603,7 @@ }, "include": { "editor-test-utils.js": [ - "a4c24c94edb8e7b0660c7dfdac10b77add02a43c", + "24527d4a7931f7f41d34ec1150f82fe0867f6b3b", [] ], "implementation.js": [ @@ -420562,7 +420774,7 @@ [] ], "remote-context-helper.js": [ - "6978cef83211e5b5e65367c363a35e23b78bd25f", + "047d5cf821e5502f03736b2120541e7ff20dbb1d", [] ] } @@ -423982,7 +424194,7 @@ "yaml": { "element": { "drawing-text-to-the-canvas.yaml": [ - "7c3df028ac7b2940d98e41b87aec7eeef8fd6137", + "5d050477af1ad358eb40cc88b23389ba68d9d19a", [] ], "meta.yaml": [ @@ -423990,7 +424202,7 @@ [] ], "text-styles.yaml": [ - "76149894b6c4d6cff15b4b3462a87e2f1f1c3671", + "ee319c4fef183405b9bd855644941c32f995f833", [] ], "the-canvas-element.yaml": [ @@ -424004,7 +424216,7 @@ [] ], "text.yaml": [ - "80818bc29cfc8ba4607da1972fe7c6e58f9f10df", + "b66ae4f82068061bb3b635b2d387219f245708c5", [] ], "the-offscreen-canvas.yaml": [ @@ -436304,11 +436516,11 @@ [] ], "penPointerEventProperties.html.ini": [ - "d808b1793cfdbbb5c1acfdd5542c8e96d9de0e3d", + "f3a973c0f508da1e7a721481515887d2cabceeb0", [] ], "penPointerEvents.html.ini": [ - "39e05a8f0906b254649a4f4dcedd7c6535045064", + "d66b8470ea460bc3edce26a845941e4b740c4c1e", [] ], "touchPointerEventProperties.html.ini": [ @@ -437389,8 +437601,12 @@ "1e84e79cd1503946088888d02a5da45d5af7c5fe", [] ], + "screen-capture-mouse-events.tentative.idl": [ + "7b081cd9fd8a8a161c98b0bce2597c8a8ffd9df6", + [] + ], "screen-capture.idl": [ - "9abd4d2c1adf02fd063d24aeaeecb10e994fee1b", + "830b96d16fa976f739c73b11433ae0f3fac7b052", [] ], "screen-orientation.idl": [ @@ -438156,11 +438372,11 @@ [] ], "modulepreload-in-early-hints.h2.py": [ - "231b3bc69cb9dd47e3e298398214f3f9e0a433e9", + "cefd02a96a83acac7297b7dbab1f5eb9270a4dee", [] ], "modulepreload-in-early-hints.html": [ - "44aebf720a05d90db5f12477dbe83327c0e25a7b", + "64a02855040dbaa1af595487f80460f7106f2f0c", [] ], "multiple-early-hints-responses.h2.py": [ @@ -444732,6 +444948,10 @@ "b6460a486888a91c6cccc20d42d0426472406b0d", [] ], + "assert-throws-dom.html": [ + "4dd66b2372a06aa0fdd3d98cca73978b9833d599", + [] + ], "force_timeout.html": [ "2058fdb8621e7d55ea2b1e22839ff0afe999f7b8", [] @@ -445098,7 +445318,7 @@ [] ], "testdriver.js": [ - "e582477da9ba9785a714c77fd2d302b9450c1398", + "a9ab7220aad069de3f6e2bf2c4fe34599658b899", [] ], "testdriver.js.headers": [ @@ -445106,7 +445326,7 @@ [] ], "testharness.js": [ - "112790bb1eeb8784a5a0e1cb29b1ae36be4c0c5c", + "413993089be6561cbad621c61ac4d4ab20bc8278", [] ], "testharness.js.headers": [ @@ -445338,6 +445558,10 @@ ] }, "view-timelines": { + "range-boundary-ref.html": [ + "057d0afabcdf579765cc1de8df4c63a6edeea8c4", + [] + ], "testcommon.js": [ "a798fe918ddc46781ad59d53e44f17cc5812bdf9", [] @@ -446894,7 +447118,7 @@ [] ], "fetch-access-control.py": [ - "446af87b24974f77051161950113685b14ecd1c5", + "380a7d62225a1b0b473fdedf61d2ab565b7b2edf", [] ], "fetch-canvas-tainting-double-write-worker.js": [ @@ -449252,7 +449476,7 @@ [] ], "utils.js": [ - "f012d2d0e41ef61be278d05d6cd0fab1d0944f31", + "311d37f0a0198a0c0f669d603522ad17f26b9748", [] ], "wake-lock.https.html": [ @@ -451289,7 +451513,7 @@ ] }, "commands.json": [ - "769675e0ee42c6efc36fc1150778682f933a6465", + "cef6d22473b0fb3ea51f3477fcdab2f6afb26cd0", [] ], "download.py": [ @@ -451297,7 +451521,7 @@ [] ], "item.py": [ - "500ca109a74e3ef37031fa51240b69626cfa59dd", + "86f7bd6020b4e44f21359566fb65f4fe9ae3d775", [] ], "jsonlib.py": [ @@ -451309,7 +451533,7 @@ [] ], "manifest.py": [ - "f602727cb09b393d9877a04591f56fc28854cfee", + "0b00c71ac518967bdcd9c18d5a7faa657a343fd0", [] ], "requirements.txt": [ @@ -451317,7 +451541,11 @@ [] ], "sourcefile.py": [ - "386833722e7d64675b85a495e9664e32a4eb3fab", + "cf0bbf334b7f24597304dbb80dfb1d81ec609f31", + [] + ], + "spec.py": [ + "5148fceb3e63812c7801cfc089c3f1c6f5e3600a", [] ], "testpaths.py": [ @@ -451338,11 +451566,11 @@ [] ], "test_manifest.py": [ - "91b39f213a8e526c8fd6abd3d308c2d539ef3855", + "fc2314b8356a21074ba5f7aa0650cb15b59bd72d", [] ], "test_sourcefile.py": [ - "c0b281d244c9b0229108778cd9c26dfc3fcfeabc", + "d3411084f3ce681a456e8882a5c42cd5c57c84b2", [] ], "test_utils.py": [ @@ -459305,11 +459533,11 @@ [] ], "client.py": [ - "9bb03b34f96343bff885d89be37ddc2c3130b41a", + "c0505dde1d1ffd44ab3834fe15739cf3809f7b2d", [] ], "error.py": [ - "21c9f720a8eb3c004fcb9148b3f151057995279e", + "b681660f1a8eda58a0f51108af02b861035cd440", [] ], "modules": { @@ -459318,11 +459546,11 @@ [] ], "_module.py": [ - "e28a83584a8ac4de6747a4c3894c9728d5682acb", + "060010b2a331f8c93b8b6f98828d133e68ebe8bf", [] ], "browsing_context.py": [ - "f2abb4764e213506b0bb22499dc19dc45338eb3f", + "a9b8d3f76824a86e62b8d351c9a88eae5794bca2", [] ], "input.py": [ @@ -459334,12 +459562,12 @@ [] ], "session.py": [ - "cdcef11b94f24cfa24232812126b28a12ed4c13a", + "fe1c0385105a13fda3087117779a1e8b83c8d07a", [] ] }, "transport.py": [ - "2d5d8ee9224ff549cb9256741be79cf3e4b076ed", + "d61ebaddea7b7e3cac008781a8dcf1dc8326700d", [] ] }, @@ -459709,7 +459937,7 @@ [] ], "firefox_android.py": [ - "7065d07a647f88ed6526856e03ee86ab8635c623", + "bf69e8f6083fe592c72d1a43665ec9ca0356bbb2", [] ], "ie.py": [ @@ -459777,7 +460005,7 @@ [] ], "base.py": [ - "c537e8271c7efe2cb73c81c0e07596346e371e08", + "17be0cec39f25e5cc169740eb6c2f632d7454ac7", [] ], "executorchrome.py": [ @@ -459789,7 +460017,7 @@ [] ], "executormarionette.py": [ - "9c9c18735a64caa7614efb431ebe0ee9174896f9", + "95f186082042e322ccf53faa308f429f972523a1", [] ], "executorselenium.py": [ @@ -460070,7 +460298,7 @@ [] ], "wptcommandline.py": [ - "d4950e14c0cb9e555d284993967a4349dfe8d081", + "875ba7e66a90738bf763d9abb7d6092abdcffd98", [] ], "wptlogging.py": [ @@ -461879,6 +462107,10 @@ ] }, "keyframe-effects": { + "effect-value-opacity-replaced-effect-ref.html": [ + "792ca214cfb0c9b02609b484a95891bd1683bfe3", + [] + ], "transform-and-opacity-on-inline-001-ref.html": [ "1e7f250c48fb093160a509b3d98c0b265085179f", [] @@ -461932,7 +462164,7 @@ ] }, "testcommon.js": [ - "8597ca28df9a6cc9c17fe21b40eab000bf606b05", + "a106cd9ac67464f16cb2a5c104e1dbf742bfc289", [] ], "timing-model": { @@ -463096,7 +463328,7 @@ ], "bidi": { "__init__.py": [ - "033978e19364d033bd68233a607073f1b4e0f294", + "821684620973f3f8a16557ae9839f9c8cb5574c7", [] ], "browsing_context": { @@ -463106,7 +463338,7 @@ ], "capture_screenshot": { "__init__.py": [ - "c4d8dd5252c3eefecbe9877f296c0a910d961a4a", + "64f25b9b861f879127a31f3aa8ed33fffbfb9caf", [] ] }, @@ -463156,37 +463388,7 @@ "__init__.py": [ "9b7d28f6dacd441177e2810370709fdfc303f6f0", [] - ], - "support": { - "black_dot.png": [ - "613754cfaf74a7a2d86984231479d5671731f18a", - [] - ], - "empty.html": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "empty.js": [ - "3918c74e446336be4151ea3bdad00f4d9e6df47a", - [] - ], - "empty.svg": [ - "e0af766e8ff5de780818b9d0712714dd5638e882", - [] - ], - "other.html": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "other.svg": [ - "7c20a99a4b545aa204a8b09667c480fc7f8f1918", - [] - ], - "red_dot.png": [ - "c5916f289705642eec4975cf51458b9afeefe46c", - [] - ] - } + ] }, "print": { "__init__.py": [ @@ -463199,6 +463401,42 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ] + }, + "set_viewport": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "support": { + "black_dot.png": [ + "613754cfaf74a7a2d86984231479d5671731f18a", + [] + ], + "empty.html": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "empty.js": [ + "3918c74e446336be4151ea3bdad00f4d9e6df47a", + [] + ], + "empty.svg": [ + "e0af766e8ff5de780818b9d0712714dd5638e882", + [] + ], + "other.html": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "other.svg": [ + "7c20a99a4b545aa204a8b09667c480fc7f8f1918", + [] + ], + "red_dot.png": [ + "c5916f289705642eec4975cf51458b9afeefe46c", + [] + ] } }, "errors": { @@ -463852,7 +464090,7 @@ [] ], "fixtures.py": [ - "ba166ae8da87de03ec68c9c112f67c0d2a6036f3", + "957be6b0f462b1a7f1b61bcfb48cadb01c5f8f7d", [] ], "fixtures_bidi.py": [ @@ -463944,7 +464182,7 @@ [] ], "inline.py": [ - "a0a8d3881ef5f48644c4ef1d6398dbad77dcc11f", + "26f0491d1a87a0977813ed8264c684d94ad0ae93", [] ], "keys.py": [ @@ -464196,7 +464434,7 @@ [] ], "conv_transpose2d.json": [ - "c7026f91ee5011747d1ba058e07ebc4a54a45a60", + "2fcb317268cb9b48731ae137f514f904918613de", [] ], "cos.json": [ @@ -464343,6 +464581,10 @@ "52ea57c7632d0d27b1745ddd4e983c37becf9832", [] ], + "softplus.json": [ + "2b26e1439e30cd8c2f7bd504d9553ab6eb38138a", + [] + ], "softsign.json": [ "e3208b18ad49a64dbbeb6a939dc69d2ea5ab3c43", [] @@ -464373,7 +464615,7 @@ ] }, "utils.js": [ - "37748fd57a405e645798a3bb92e3138d48a9941a", + "920459275d4bceac6d501b750bfaacbaecdb2a4d", [] ] } @@ -464634,7 +464876,7 @@ [] ], "constants.sub.js": [ - "d8e340d304b26fb51be84ba76f68acbd0924ada7", + "fd3c3b84b96a0a2537ac65dc4f626c4be03d9077", [] ], "cookies": { @@ -490991,6 +491233,36 @@ {} ] ], + "clear-site-data": { + "clear-site-data-all.https.html": [ + "4abc620c9dc3e8586f715d43a4f839c9821133fe", + [ + null, + {} + ] + ], + "clear-site-data-cache.https.html": [ + "bb1f8aa43e7930d0484e5cc8c18e2ba1c6b22d34", + [ + null, + {} + ] + ], + "clear-site-data-cookies.https.html": [ + "72b7f6794e9fceed910dfe0b309aa1fb16e5559f", + [ + null, + {} + ] + ], + "clear-site-data-storage.https.html": [ + "49578134f56767923415287c5ce60b8713713066", + [ + null, + {} + ] + ] + }, "critical-ch": { "critical-ch.navigation-timing.no-restart.https.html": [ "a7c2ad705db844db61f6038ed0bba496a0598ce2", @@ -502919,7 +503191,7 @@ ] ], "fedcm-context.https.html": [ - "7675866272116b72d4ce41c286d2c178847a5a4e", + "67ba8256341a1d95af14a8c83b3e68f568f0e13e", [ null, { @@ -504547,13 +504819,27 @@ {} ] ], - "anchor-getComputedStyle.html": [ + "anchor-getComputedStyle-001.html": [ "6d77cf9a9d4cc34f5b2c787502f0d7753ff41c94", [ null, {} ] ], + "anchor-getComputedStyle-002.html": [ + "ae697fcc7498917e165b471ae169068880ef46e0", + [ + null, + {} + ] + ], + "anchor-getComputedStyle-003.html": [ + "f9fca976544f1aaac8d84e9acd918c7538b7e86d", + [ + null, + {} + ] + ], "anchor-name-001.html": [ "4caf3ee2100327b03b73c5180ac4ecc8a3761173", [ @@ -504911,6 +505197,13 @@ {} ] ], + "anchor-scroll-005.html": [ + "82f3a23ac9c79184cdb033305364b8cf215536b7", + [ + null, + {} + ] + ], "anchor-scroll-basics.html": [ "6b2d96708bd44808f0cb7ce10a1b52e708e09eba", [ @@ -505121,6 +505414,13 @@ {} ] ], + "position-fallback-bounds-basics.html": [ + "3b8b67bd978f3361512222f75cd71f08143007b1", + [ + null, + {} + ] + ], "position-fallback-cascade-layer-reorder.html": [ "ec1a64205c55788b021040b278ce1e51c2cbfc5e", [ @@ -507975,7 +508275,7 @@ ] ], "scope-invalidation.html": [ - "d5ba17159e0be6f6c41c4617dfbadef7fd733308", + "c5bdb6165852f445f870e78d5e77e812cff3a069", [ null, {} @@ -508267,7 +508567,7 @@ ] ], "color-valid-color-mix-function.html": [ - "d664525effd6c05f0d88d9028eefed13c7f352f3", + "361f7488a13c3d4f49747d11ab21487f740a490c", [ null, {} @@ -508999,14 +509299,14 @@ ] ], "font-relative-units-dynamic.html": [ - "63a07c61dbd31f1529f3fab10cf348c098a5ff30", + "9dfaceeed6b41c7f0366ac6288809efb9a3e1e52", [ null, {} ] ], "font-relative-units.html": [ - "7f711ebf96c60efd793bcf4c03b92450cbfcdcd8", + "ba4a60dda21962a8956180b601984942c3dc94ff", [ null, {} @@ -509068,6 +509368,13 @@ {} ] ], + "inheritance-from-container.html": [ + "97dfff2fd02fe6e825f3d547caeb88fefef2d0ca", + [ + null, + {} + ] + ], "inline-size-and-min-width.html": [ "8ddcbc614cae184b65295ab722ce392df4491f5d", [ @@ -509968,7 +510275,7 @@ }, "css-easing": { "cubic-bezier-timing-functions-output.html": [ - "168f4cd907ec93d84bafcd11b00a7c78878569c8", + "4e14ef3bb3e5db60f501ff64ee87cc9401b372f7", [ null, {} @@ -510789,21 +511096,21 @@ ] ], "flex-align-baseline-table-001.html": [ - "b90f840b10acaaac3af7adf4d91a1d3c30762019", + "e804c33cb4c6abd7b50f7a82a1a22d8f9725b7de", [ null, {} ] ], "flex-align-baseline-table-002.html": [ - "9126e4246cad69d7efb753b5afa75f0e579909f0", + "c7d2c8af70400f65df3a36df4f4f3508e9041c48", [ null, {} ] ], "flex-align-baseline-table-003.html": [ - "2092a898540d02c794c75d65f63a58ecfd4a707f", + "15f35401756e4b189ee871c3f93e0e7549871b6d", [ null, {} @@ -512756,7 +513063,7 @@ ] ], "format-specifiers-variations.html": [ - "480396ea16f81e96b411b7c75a7cd33e758b3e34", + "32b8ebed67ebdfd5d10ef374e68d4effb8d9028d", [ null, {} @@ -512843,7 +513150,7 @@ ] ], "font-face-src-list.html": [ - "c87705109fd1b39731c5ef1c1e1aa6e4d89ea487", + "07aeacd2eeccbb383e45e6dd3cc61aecd6b1e8f3", [ null, {} @@ -517021,7 +517328,7 @@ ] ], "grid-template-shorthand-areas-valid.html": [ - "4a22784332f4aa95d5a2b08345dd3cde171e79e4", + "2d2b2433a4102326ecd2fbdd1c33d12c0ffae009", [ null, {} @@ -517314,7 +517621,7 @@ }, "image-set": { "image-set-computed.sub.html": [ - "6d54fd0d09b4ade26a254a0a9c8cb5a76097e88a", + "532e48e6e869e322e6816f2f0d3289aeea7786c6", [ null, {} @@ -518914,6 +519221,13 @@ {} ] ], + "hit-test-in-vertical-rl.html": [ + "526e33d7924668782fd0116c5a13d2aeda570b08", + [ + null, + {} + ] + ], "hit-test-transformed-child.html": [ "ac0fd54c9f35dda0f01f5b8eb92fd7df7a3b5bb7", [ @@ -519334,14 +519648,14 @@ }, "css-nesting": { "cssom.html": [ - "b5bd80d1b46e3cda7714f4e047737a3057c35fac", + "fa22b2fb45368ed37a2f971d58c6ecb8736b7360", [ null, {} ] ], "invalid-inner-rules.html": [ - "ffb53420e2dacfead07094be6c8521f87633c9ed", + "87c7c9a93481c95345223c2a7a4f8cab62529826", [ null, {} @@ -521186,7 +521500,7 @@ ] ], "register-property-syntax-parsing.html": [ - "16cbdf0c571a5f5d7fa328b6d9a6295bfd3a5db0", + "5bda1c4c5b23ecc95ac98ef939a9bbba62cf196d", [ null, {} @@ -522242,7 +522556,7 @@ ], "input": { "keyboard.html": [ - "7b0c6c057420e98b0122cbcb2f7502037e370e21", + "187ac0fb9e3ee5b12e73ec75d3cd4f465e6b319e", [ null, { @@ -529605,6 +529919,13 @@ {} ] ], + "idlharness-2.html": [ + "236bf5642bcb92f81c241e80cb34482c46185cf3", + [ + null, + {} + ] + ], "idlharness.html": [ "4cc7ee50eb4915fcf95843f7eeee266abfa7b81a", [ @@ -533142,7 +533463,7 @@ ], "animations": { "calc-interpolation.html": [ - "40379a13fb2736ed5839e55a58c7cba581155e77", + "f2c49a5cb9f503f204dd09e2e9542beff2db67c7", [ null, {} @@ -533352,6 +533673,13 @@ {} ] ], + "cap-invalidation.html": [ + "0becd0d093d680c1c18323da51fc39812c3709cd", + [ + null, + {} + ] + ], "ch-empty-pseudo-recalc-on-font-load.html": [ "7ad2b85fa469d6c43806e2e0fffee8af4ae4a96b", [ @@ -533416,7 +533744,7 @@ ] ], "exp-log-serialize.html": [ - "9eca44e68290dc8b96a915db6da6a843bab75f43", + "6108278d9624daad216f2bde26e6d65b7dd6f50f", [ null, {} @@ -533653,6 +533981,13 @@ {} ] ], + "rcap-invalidation.html": [ + "562161b4e5d474651ce91c39af90f8fcfd250c1f", + [ + null, + {} + ] + ], "rch-invalidation.html": [ "fa85e94c72778c424b5cf9f525baf119a40b9f65", [ @@ -533717,7 +534052,7 @@ ] ], "round-mod-rem-serialize.html": [ - "39569995b3ab09d834796f94bea9605dae7846f6", + "aa7c768b952b3fa4c28618fbbd59451b827e828f", [ null, {} @@ -535615,6 +535950,13 @@ {} ] ], + "getComputedStyle-insets-grid.html": [ + "08b55733a1595abca152e75cb24f0b1219fce8d1", + [ + null, + {} + ] + ], "getComputedStyle-insets-nobox.html": [ "236abf17f9cab8652b350c1168f2c27c1f84a631", [ @@ -535629,6 +535971,13 @@ {} ] ], + "getComputedStyle-insets-relpos-inline.html": [ + "d5f197ee9bc6cd53ec636889773438391d698120", + [ + null, + {} + ] + ], "getComputedStyle-insets-static.html": [ "aa7dbee95667a5e3b829b7d3774311da49c01deb", [ @@ -537783,7 +538132,7 @@ ] ], "offset-path-interpolation-005.html": [ - "13de65d8a73bc6eafcbffe6f3f0155f6ad6819e6", + "11234bf31a325fd43b8c2d32f9e503ff8770c62d", [ null, {} @@ -537855,7 +538204,7 @@ ] ], "offset-anchor-parsing-valid.html": [ - "97a3c54131f1af3b71c635ee5ff37be8a3502ff0", + "6cb4d44117fa6361fc87efdee22e79bc6df749b5", [ null, {} @@ -537932,7 +538281,7 @@ ] ], "offset-position-parsing-valid.html": [ - "032a5b42b46d5bae228e6a112c50623d76dbc1b1", + "bc0d19a460f4f22f9a061ae6932f31637c7231d6", [ null, {} @@ -539083,6 +539432,13 @@ {} ] ], + "is-pseudo-containing-sibling-relationship-in-has.html": [ + "bd5f96a3e27a3875ec2bf08a16f424ea851bee6e", + [ + null, + {} + ] + ], "is.html": [ "8490f096976340bc970ed2c6156fb60f433768e9", [ @@ -539150,6 +539506,13 @@ {} ] ], + "not-pseudo-containing-sibling-relationship-in-has.html": [ + "ec6d86198b063475fa237d7a39f7a699ec19a9ae", + [ + null, + {} + ] + ], "quirks-mode-stylesheet-dynamic-add-001.html": [ "3d7be982378fe2414f818d1682eca8f38f3575ac", [ @@ -540451,7 +540814,7 @@ } }, "throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml": [ - "c0a7f622fbe2e56fba7eab1ea71ffde0fc269fca", + "c2913a1312e05beb8f198832a0030a84568157c7", [ null, {} @@ -540465,7 +540828,7 @@ ] ], "throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml": [ - "13f664550be01d7fab3757732634dd02e56c723e", + "4a3c8ec43b0f23cd890a1daeeeb4c20941c96b2a", [ null, {} @@ -542359,8 +542722,17 @@ } ] ], + "scrollend-event-fires-to-iframe-window.html": [ + "1a20751bd53b1d4e838fd13d8eed09bf9b3f6dfb", + [ + null, + { + "testdriver": true + } + ] + ], "scrollend-event-for-user-scroll.html": [ - "561c90ca94c6af8c0335a962a16273e44c2d3717", + "a06843a35e7ec9c827d70fd8f6eefa5f9bfdf724", [ null, { @@ -583367,7 +583739,7 @@ }, "read-media": { "cross-origin-video.html": [ - "b99658facb29b59964c29e910e1435d201321fb4", + "5f3e95cce40e2a00611583d7623cad8a4a3eeb27", [ null, {} @@ -588488,6 +588860,13 @@ {} ] ], + "2d.text.drawing.style.fontStretch.settings.html": [ + "b19eced89171199dcfb57f1d5aea4b8f7e83c427", + [ + null, + {} + ] + ], "2d.text.drawing.style.fontVariant.settings.html": [ "cff5ad183a084adddc905ef76ff58e7a3ad6a5f9", [ @@ -588524,7 +588903,7 @@ ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "03b35dfaa9d2af989f2a6251685dc88f7e379988", + "dee856842ae8e764ddf454e77749c098e8d8ce6d", [ null, {} @@ -588559,7 +588938,7 @@ ] ], "2d.text.measure.baselines.html": [ - "95fac522d941f234ff1208b518dadf66bcd9a4c5", + "f5d149239611a932da0785cabf6e18db653d1305", [ null, {} @@ -593523,14 +593902,14 @@ ] ], "2d.text.draw.baseline.hanging.html": [ - "3ad15f31501a0f47a3b95e5c1f8567fcf66a20d2", + "7b3a0a9373bc87de31ce263c5bd6d2fc482ef43b", [ null, {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "8d402223a4f213b5ecfedf78f7b5d292305177cc", + "8da9aabb942a17ad8cd63534539be447f9f4d09e", [ null, {} @@ -604986,28 +605365,28 @@ ] ], "2d.text.draw.baseline.hanging.html": [ - "0bd15ff0068e7b238d359e772b2c0fad01e04b04", + "0b8228343289fe59d269b4ccf63dc48b6008edda", [ null, {} ] ], "2d.text.draw.baseline.hanging.worker.js": [ - "4a5ced7b38f95fc9cef8ef3b6290b8ebd8b6338b", + "fca74d6938184d68f11790b86fbdb0240cd11d8e", [ "html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.html", {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "3a1d6e5159c052eadc9fd3073fd3b6dbc70344ef", + "c996444b860a079402dbeb20344578c94877e58d", [ null, {} ] ], "2d.text.draw.baseline.ideographic.worker.js": [ - "b39c10b74f0c3ce27eb79f81bef5903616722bd7", + "0ffa6fe299a0cb9a03778f0f32a57141074d0b7c", [ "html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.html", {} @@ -605345,6 +605724,20 @@ {} ] ], + "2d.text.drawing.style.fontStretch.settings.html": [ + "95405a18a5682c2eb954b37d150a0f0c54f31af4", + [ + null, + {} + ] + ], + "2d.text.drawing.style.fontStretch.settings.worker.js": [ + "ff10a742b5843ced57142d1678010082625a940f", + [ + "html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.html", + {} + ] + ], "2d.text.drawing.style.fontVariant.settings.html": [ "9756d095ba74fd386b1249b2c1cf24c9381c29ba", [ @@ -605472,14 +605865,14 @@ ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "47094dc91fa9a9fffbef111ccbc91d02b46cc61e", + "3fc07d547886caac218c9cac27d9a2c835d466ea", [ null, {} ] ], "2d.text.drawing.style.textRendering.settings.worker.js": [ - "ca5741de95404ef84cf4b174737d7f3625d8a8c5", + "c37f2e342f20d68898a656b97e96891b52aaa0b9", [ "html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.html", {} @@ -605682,14 +606075,14 @@ ] ], "2d.text.measure.baselines.html": [ - "e58f9be455b0cd573da530ff0b37a64117af2740", + "09fd0f408223fae715cfea3cdb00000e76f9fcb2", [ null, {} ] ], "2d.text.measure.baselines.worker.js": [ - "6f157f4e653ef609aceaab2043da6e71234bb86c", + "c6288a569da0172d7c5f43bdb6c08d3a0e5b2256", [ "html/canvas/offscreen/text/2d.text.measure.baselines.worker.html", {} @@ -624458,7 +624851,7 @@ ] ], "popover-focus-2.html": [ - "be6923e604a18cef5b5f2150ec8345e62bebfbd5", + "2fa1b7a23dee262e19c4c04f7243cecef1c0f0fd", [ null, { @@ -628703,7 +629096,7 @@ ] ], "disabled.html": [ - "8808675eb69b17c7763b407ea7ce4458e9e08fda", + "142a12dd122b555dcc6eee18334f796dc9269961", [ null, {} @@ -635741,7 +636134,7 @@ ] ], "penPointerEventProperties.html": [ - "ba6c15f022539cd1ec86c23559064e205746c5b1", + "05f85d299e9802344bb9705c9f0a7c60843667fe", [ null, { @@ -635750,7 +636143,7 @@ ] ], "penPointerEvents.html": [ - "7141fb56556795fdd25a8ed740c25b2d7edcac9d", + "f885ad501a24113131a7a930f93e7e279106fead", [ null, { @@ -638953,8 +639346,62 @@ {} ] ], + "modulepreload-as-worker-cross-origin.h2.window.js": [ + "3756d7f7fa24e943e7e90a42a71806faadba358d", + [ + "loading/early-hints/modulepreload-as-worker-cross-origin.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], + "modulepreload-as-worker.h2.window.js": [ + "2fd36dfbf3dc0898f020715afdfb0a71eeb6f81a", + [ + "loading/early-hints/modulepreload-as-worker.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], + "modulepreload-cross-origin.h2.window.js": [ + "3499b4d60d0743d1ce118a4e16b50e29f8428126", + [ + "loading/early-hints/modulepreload-cross-origin.h2.window.html", + { + "script_metadata": [ + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/early-hints-helpers.sub.js" + ] + ] + } + ] + ], "modulepreload-in-early-hints.h2.window.js": [ - "5627f04a0fefe1c6996e493ef280826c924ec7bd", + "bd592b0396dd7bcb5b8ba479ba06739b224f59d1", [ "loading/early-hints/modulepreload-in-early-hints.h2.window.html", { @@ -642199,14 +642646,14 @@ ] ], "MediaStreamTrack-applyConstraints-fast.html": [ - "38fabdcdfac2f898a2b2e485215611600b75433d", + "792179801779219749de642a6c36b90883a6f2b2", [ null, {} ] ], "MediaStreamTrack-applyConstraints-getSettings.https.html": [ - "c6401570b8ba3e370be5b8414efb8e8d158c9a4d", + "e18480aae1a8314548dc588880195b04d98a0b30", [ null, { @@ -642215,7 +642662,7 @@ ] ], "MediaStreamTrack-applyConstraints-reject.https.html": [ - "5050ed27dd8e31a84dba7428d6008a3ab7932e45", + "0bb4c9f74eb76fa5e8f701a1714601b619a0a9f7", [ null, { @@ -642233,7 +642680,7 @@ ] ], "MediaStreamTrack-clone.https.html": [ - "3ee21031eb016b47b5fc6ae0e74cf9ffe14b7234", + "8945c1d9ea02d75fd12fe7c10d40089f6d241a4c", [ null, { @@ -650437,7 +650884,7 @@ ] ], "performance-navigation-timing-redirect-on-history.tentative.window.js": [ - "acb70ebfae469d8fce37aa9acc54c335bf65cb67", + "7191456cc845bddcd774efdbb71e4981b91bd066", [ "performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.html", { @@ -652875,6 +653322,15 @@ } ] ], + "pointerevent_pointerout_no_pointer_movement.html": [ + "856f2ce37cec59f70dc1a9ad4d3fe0436da3e4cd", + [ + null, + { + "testdriver": true + } + ] + ], "pointerevent_pointerout_pen.html": [ "210055e6539a369461aa30e609489310891570fd", [ @@ -670028,6 +670484,13 @@ } }, "screen-capture": { + "capture-controller-event-target.https.window.js": [ + "379f35956837c47bc7d732af222189442fd40d0e", + [ + "screen-capture/capture-controller-event-target.https.window.html", + {} + ] + ], "delegate-request.https.sub.html": [ "8cc81c13832d9cd051e35a884d354a0835e58f81", [ @@ -670624,7 +671087,7 @@ ] ], "animation-timeline-parsing.html": [ - "f0061c5705dd78484133968c414bfea9103ff6f1", + "9e3c1078b5b416ac8402abe8901ca8e1c8d0a9fa", [ null, {} @@ -670638,7 +671101,7 @@ ] ], "animation-timeline-view-functional-notation.tentative.html": [ - "3ac94478e5955b09d2625c5cc8785514d8cee76f", + "d91dfe924b7756e111bdc9ef6a2fc8fefa5245d4", [ null, {} @@ -670876,7 +671339,7 @@ ] ], "view-timeline-animation.html": [ - "d1ea2f6c07f56e848ed9d178b85af484c668a59c", + "1bf034a742f3b30be5070b78536614c1b53823fe", [ null, {} @@ -670904,7 +671367,7 @@ ] ], "view-timeline-inset-animation.html": [ - "9ba88fde507aceae168e1c0b31d38f90ebe6c7f3", + "f9aa0f291895ba15bead50f6e7efbc328a41a18e", [ null, {} @@ -670932,7 +671395,7 @@ ] ], "view-timeline-lookup.html": [ - "98f11b85429c02af8033ad4af1515de7997c69bf", + "067ac1fa969f119e252d3415f172cbb6e6129d82", [ null, {} @@ -671108,7 +671571,7 @@ ] ], "scroll-animation-effect-phases.tentative.html": [ - "67bc36ca104258b970489898872d9932201e3823", + "41ae0e0612f61a88f023cde8f32ff5fcf095df37", [ null, { @@ -671212,21 +671675,21 @@ ] ], "block-view-timeline-current-time-vertical-rl.tentative.html": [ - "5bc459845229196bc075a0f27a6461b5519700fc", + "beb380060e1b51e86f9f1cfd1ad6885754cab0c4", [ null, {} ] ], "block-view-timeline-current-time.tentative.html": [ - "a6530f663121c2e0b97a1ec41de8c35326435525", + "c24d04412fc99f1d227d8ac6202acb985f3c67d8", [ null, {} ] ], "block-view-timeline-nested-subject.tentative.html": [ - "2cc8af882ff87cbcacb7cbb84aa78824dff532fa", + "6fdc7c68229a8abba8b1e6f0409e483eed94fe93", [ null, {} @@ -671247,12 +671710,63 @@ ] ], "inline-view-timeline-current-time.tentative.html": [ - "5b37798fe89035a5eb459ae479fc94ac42a05689", + "59d73d0cdf772475f0f0f573562ac840ae0b958d", [ null, {} ] ], + "sticky": { + "view-timeline-sticky-offscreen-1.html": [ + "d8756769c5179cdb7458958b81151baa17b17d6a", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-2.html": [ + "2d098dcbe306ddf4e089d50fc4a0bdd408538f77", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-3.html": [ + "c87dfc4dcb7d155f852e0d1a27cbcd427de27213", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-4.html": [ + "f6b02ffb2eebfbbf3338f49edc3068282a9949d7", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-5.html": [ + "380c01297e14571cd2a678c2547ddf1374d6a654", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-6.html": [ + "94f0abc9b1e6662931e630c231334d5bff77b082", + [ + null, + {} + ] + ], + "view-timeline-sticky-offscreen-7.html": [ + "83115249fae7fb1ad263b6c5db4095701051bac9", + [ + null, + {} + ] + ] + }, "timeline-offset-in-keyframe.html": [ "1168893854297560262e03c28bdf71580955b8ae", [ @@ -683381,7 +683895,7 @@ ] ], "bad-strategies.any.js": [ - "521fbffe3ab479bc276495398f935343df674110", + "409c63b8177e25222922d0a9eedb3e51a5a4a96a", [ "streams/readable-streams/bad-strategies.any.html", { @@ -689496,14 +690010,14 @@ ] ], "SVGLength-px-with-context.html": [ - "067948d5454d3b0ca715e58f72f7ab1840a4712d", + "b5c2149b692eea53d7565031d135317526736c44", [ null, {} ] ], "SVGLength-px.html": [ - "321be5912b84c3ad0df8a68231213311171386d5", + "25ce286197a49e9d06dc184b2fc8a89d15cd5ed5", [ null, {} @@ -700370,7 +700884,7 @@ ] ], "partitioned-web-locks.tentative.https.html": [ - "2f166e67bc13cc4976dfd10f854880b8f07a0e50", + "680474dea9838e643d612711bb405a2faf0c07fd", [ null, {} @@ -702693,6 +703207,15 @@ null, {} ] + ], + "setSinkId-with-MediaElementAudioSourceNode.https.html": [ + "af71782717ae07682f63ad6e3f45c74bb28b3415", + [ + null, + { + "testdriver": true + } + ] ] }, "the-mediastreamaudiodestinationnode-interface": { @@ -704187,7 +704710,7 @@ ] ], "encoded-video-chunk.any.js": [ - "0cf0d8de4408dc1dc634b064c9a3fd313a04f813", + "9b60e59a79311dea38d8cb4cad1d3d1cebf2ff3a", [ "webcodecs/encoded-video-chunk.any.html", { @@ -705957,7 +706480,7 @@ ] ], "videoDecoder-codec-specific.https.any.js": [ - "4e0843646b7daed9829a21aa1243bbd2b697963f", + "31e14d81f3418879c5defd6f4953f7521ef5baaa", [ "webcodecs/videoDecoder-codec-specific.https.any.html?av1", { @@ -707103,7 +707626,7 @@ ] ], "Set.html": [ - "3134c8185906c1fcf0d5deeecf2ec668f73ef2c6", + "1390b51cd03b51cb15ceea1519fcd309bf914c86", [ null, {} @@ -709770,6 +710293,57 @@ } ] ], + "softplus.https.any.js": [ + "7096f64a043a91fba09c91df70114666c8980664", + [ + "webnn/softplus.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API softplus operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/softplus.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API softplus operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "softsign.https.any.js": [ "61a7d5365fabca290eaeb400c961a107558e17ed", [ @@ -710389,7 +710963,7 @@ ] ], "RTCPeerConnection-iceConnectionState.https.html": [ - "5083be6cdfd16f5c2c67a80a7dbc9c2401f1a0a8", + "5361cb2c1af2b6cd9606798cca63b4e7e9f0a20b", [ null, { @@ -711788,7 +712362,7 @@ ] ], "RTCRtpTransceiver-headerExtensionControl.html": [ - "79eba02727bb35b745cee0a3b6246e37fb216e06", + "796d35dcb6bfffab5d62439da8dd93fc28aec9c9", [ null, {} @@ -722125,6 +722699,69 @@ ] ] }, + "mixed-content.https.any.js": [ + "b7a6d8381da97b9b16cca3803717a66c8c7d69ad", + [ + "websockets/mixed-content.https.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ], + [ + "websockets/mixed-content.https.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "constants.sub.js" + ] + ] + } + ] + ], "multi-globals": { "message-received.html": [ "704b1e357b8ee2b37653888f6f9f456571a0ae58", @@ -753885,6 +754522,15 @@ {} ] ] + }, + "subgrid": { + "repeat-auto-fill-009.html": [ + "73b52a616b2237473d839960bbe933ed466b8ea2", + [ + null, + {} + ] + ] } }, "css-images": { @@ -756134,7 +756780,7 @@ "browsing_context": { "capture_screenshot": { "capture_screenshot.py": [ - "7b26b2be0ce83a3eb54f2e9177a421a9520e7f1c", + "0ee4c8ed274ce31295d2cbf8f4229e7135ea2b28", [ null, {} @@ -756262,14 +756908,14 @@ }, "navigate": { "about_blank.py": [ - "1f6d4774ae778fb007c6b718d21870f04655d710", + "55ca351297732a3cc69073f8d68f60459346e379", [ null, {} ] ], "data_url.py": [ - "8fd5695646d1b1e0f611f2f2c57dda595b05a4be", + "6d95beb66c000b4e2fbf2578ed3e8e5874ee736d", [ null, {} @@ -756283,21 +756929,21 @@ ] ], "frame.py": [ - "2c2131b6ee6f831fc318ca5a9903fc56689f30f2", + "4dcd88dfdb8513968a16ec21e4657e852e9785d4", [ null, {} ] ], "hash.py": [ - "d4862a62012d1b2c60e40a3f1c96e43bf0c448a9", + "d31c3f9a6ebcdf17e1916ccbc7ca5328861604e7", [ null, {} ] ], "image.py": [ - "b52ea9787c0ece95013d08d1db9e46a42c44e2ba", + "79030c9fe124678438221a6cb6166a5b525b2c8e", [ null, {} @@ -756311,14 +756957,14 @@ ] ], "navigate.py": [ - "a35f2728ef7b32d93846eae94d9dc2b794966ee2", + "142457028123c611f2eaf0b7ad45a02aba093f50", [ null, {} ] ], "wait.py": [ - "9a0b14e755e9cf9c2cc11fab8ae3cb48a1748e73", + "3a351e108908d949a276535bed4eeaa041dcd576", [ null, {} @@ -756395,12 +757041,51 @@ ] }, "reload": { + "frame.py": [ + "ce9281583f2369013850d4c074a8e4c345cc453e", + [ + null, + {} + ] + ], "invalid.py": [ "35be21ef19fe2843d3d0e2c5fb837c09e998cad4", [ null, {} ] + ], + "reload.py": [ + "b6e957e8a8c5cb0b6e89b7bd6ab73b0b4fac56ef", + [ + null, + {} + ] + ], + "wait.py": [ + "2b581c2f0dbc0e34e63641318006aeed20963c6b", + [ + null, + { + "timeout": "long" + } + ] + ] + }, + "set_viewport": { + "invalid.py": [ + "a649972ae18352ad0cce493b68cddbd86fb8ddb7", + [ + null, + {} + ] + ], + "set_viewport.py": [ + "1aa977be421c6dbea67408cca9a718049f023fa7", + [ + null, + {} + ] ] } }, @@ -756720,14 +757405,14 @@ ] ], "result.py": [ - "a930cf2292fc690daaea447ccf0104cacad6c9bf", + "df989c407ee7dbf0a083e29697f9559fd733dbdd", [ null, {} ] ], "result_node.py": [ - "a2359b164ebbd6e3ef0abba42ad43106bc38e2d9", + "9d09b9fc04ace5d463976ee1a0af6d6b163e9b72", [ null, {} @@ -756747,6 +757432,13 @@ {} ] ], + "serialization_options.py": [ + "4084ec482093a88b8d55d59a719710908ad248bc", + [ + null, + {} + ] + ], "strict_mode.py": [ "1a9fd4f10823a526f27bc7aaeae32f1f263c9e13", [ @@ -756831,7 +757523,7 @@ ] ], "invalid.py": [ - "9923d7414e8497617b8f4c1f7e1f4edf31c1adc0", + "666bf4d06e0ef128132ef659c8ce039e3821f6fc", [ null, {} @@ -756845,14 +757537,14 @@ ] ], "result.py": [ - "afdfb5fe42f12b73780f17b4942000967eb420c5", + "faea80a86b60fa5939899640f5dfeaf69628fb67", [ null, {} ] ], "result_node.py": [ - "89ce95ed21da1088334e11238c296a565d27e498", + "a3ca316d0275f566e4bc913beae24ffae58af36d", [ null, {} diff --git a/tests/wpt/meta/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini b/tests/wpt/meta/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini new file mode 100644 index 00000000000..304b1579ca4 --- /dev/null +++ b/tests/wpt/meta/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini @@ -0,0 +1,2 @@ +[opacity-animation-ending-correctly-001.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini index 5fbefaad28c..1c3ee092b7b 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1600,3 +1600,54 @@ [e.style['color'\] = "color-mix(in hwb specified hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))" should set the property value] expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, 70% red, 50% blue)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, red 50%, blue)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, red, blue 50%)" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, 50% hsl(120deg 10% 20%), hsl(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hsl, hsl(120deg 10% 20%), 50% hsl(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hwb, 50% hwb(120deg 10% 20%), hwb(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in hwb, hwb(120deg 10% 20%), 50% hwb(30deg 30% 40%))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, 50% color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb, color(srgb .1 .2 .3), 50% color(srgb .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb-linear, 50% color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3), 50% color(srgb-linear .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz, 50% color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz, color(xyz .1 .2 .3), 50% color(xyz .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d50, 50% color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3), 50% color(xyz-d50 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d65, 50% color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value] + expected: FAIL + + [e.style['color'\] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3), 50% color(xyz-d65 .5 .6 .7))" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta/css/css-transitions/idlharness-2.html.ini b/tests/wpt/meta/css/css-transitions/idlharness-2.html.ini new file mode 100644 index 00000000000..ec9b24fdaeb --- /dev/null +++ b/tests/wpt/meta/css/css-transitions/idlharness-2.html.ini @@ -0,0 +1,21 @@ +[idlharness-2.html] + [CSSTransition interface: existence and properties of interface object] + expected: FAIL + + [CSSTransition interface object length] + expected: FAIL + + [CSSTransition interface object name] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [CSSTransition interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [CSSTransition interface: attribute transitionProperty] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom/getComputedStyle-insets-grid.html.ini b/tests/wpt/meta/css/cssom/getComputedStyle-insets-grid.html.ini new file mode 100644 index 00000000000..5e6a587fc95 --- /dev/null +++ b/tests/wpt/meta/css/cssom/getComputedStyle-insets-grid.html.ini @@ -0,0 +1,3 @@ +[getComputedStyle-insets-grid.html] + [Position absolute getComputedStyle left (for display: grid)] + expected: FAIL diff --git a/tests/wpt/mozilla/meta-legacy-layout/css/stylesheet_media_queries.html.ini b/tests/wpt/mozilla/meta-legacy-layout/css/stylesheet_media_queries.html.ini new file mode 100644 index 00000000000..77ca6b0688d --- /dev/null +++ b/tests/wpt/mozilla/meta-legacy-layout/css/stylesheet_media_queries.html.ini @@ -0,0 +1,3 @@ +[stylesheet_media_queries.html] + [Media queries within stylesheets] + expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/dirty_viewport.html.ini b/tests/wpt/mozilla/meta/css/dirty_viewport.html.ini deleted file mode 100644 index 799204061d4..00000000000 --- a/tests/wpt/mozilla/meta/css/dirty_viewport.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[dirty_viewport.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/pseudo_content_with_layers.html.ini b/tests/wpt/mozilla/meta/css/pseudo_content_with_layers.html.ini deleted file mode 100644 index d1b7901791b..00000000000 --- a/tests/wpt/mozilla/meta/css/pseudo_content_with_layers.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pseudo_content_with_layers.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/iframe/resize_after_load.html.ini b/tests/wpt/mozilla/meta/mozilla/iframe/resize_after_load.html.ini deleted file mode 100644 index 98894dcb405..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/iframe/resize_after_load.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[resize_after_load.html] - expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/task_queue_throttling.any.js.ini b/tests/wpt/mozilla/meta/mozilla/task_queue_throttling.any.js.ini new file mode 100644 index 00000000000..d380380616c --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/task_queue_throttling.any.js.ini @@ -0,0 +1,3 @@ +[task_queue_throttling.any.html] + [Throttling the performance timeline task queue.] + expected: FAIL diff --git a/tests/wpt/tests/captured-mouse-events/META.yml b/tests/wpt/tests/captured-mouse-events/META.yml new file mode 100644 index 00000000000..90b8af85ee9 --- /dev/null +++ b/tests/wpt/tests/captured-mouse-events/META.yml @@ -0,0 +1,4 @@ +spec: https://screen-share.github.io/captured-mouse-events/ +suggested_reviewers: + - eladalon1983 + - fred-wang diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html new file mode 100644 index 00000000000..4abc620c9dc --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// Here's the set-up for this test: +// Step 1 (first window) Open new window to verify that hints were set. +// Step 2 (second window) Alert first window of client hints present. +// Step 3 (first window) Asserts client hints were present. +// Step 4 (first window) Navigate other window to page that clears all data. +// Step 5 (second window) Navigate to a page that can check client hints still sent. +// Step 6 (second window) Alert first window of client hints present. +// Step 7 (first window) Asserts client hints were not present. +async_test(t => { + var new_window; + + // Step 3 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "HadDeviceMemory"); + + // Step 7 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "MissingDeviceMemory"); + new_window.close(); + t.done(); + }), {once: true}); + + // Step 4 + new_window.location.href = "/client-hints/clear-site-data/resources/clear-site-data.py"; + }), {once: true}); + + // Step 1 + new_window = window.open("/client-hints/clear-site-data/resources/check-client-hints.py"); +}, "Clear-Site-Data for * should remove all client hints."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html.headers b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html.headers new file mode 100644 index 00000000000..226bb1c3b10 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-all.https.html.headers @@ -0,0 +1 @@ +Accept-CH: Sec-CH-Device-Memory diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html new file mode 100644 index 00000000000..bb1f8aa43e7 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// Here's the set-up for this test: +// Step 1 (first window) Open new window to verify that hints were set. +// Step 2 (second window) Alert first window of client hints present. +// Step 3 (first window) Asserts client hints were present. +// Step 4 (first window) Navigate other window to page that clears cache data. +// Step 5 (second window) Navigate to a page that can check client hints still sent. +// Step 6 (second window) Alert first window of client hints present. +// Step 7 (first window) Asserts client hints were not present. +async_test(t => { + var new_window; + + // Step 3 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "HadDeviceMemory"); + + // Step 7 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "MissingDeviceMemory"); + new_window.close(); + t.done(); + }), {once: true}); + + // Step 4 + new_window.location.href = "/client-hints/clear-site-data/resources/clear-site-data.py?target=cache"; + }), {once: true}); + + // Step 1 + new_window = window.open("/client-hints/clear-site-data/resources/check-client-hints.py"); +}, "Clear-Site-Data for cache should remove all client hints."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html.headers b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html.headers new file mode 100644 index 00000000000..226bb1c3b10 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cache.https.html.headers @@ -0,0 +1 @@ +Accept-CH: Sec-CH-Device-Memory diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html new file mode 100644 index 00000000000..72b7f6794e9 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// Here's the set-up for this test: +// Step 1 (first window) Open new window to verify that hints were set. +// Step 2 (second window) Alert first window of client hints present. +// Step 3 (first window) Asserts client hints were present. +// Step 4 (first window) Navigate other window to page that clears cookies. +// Step 5 (second window) Navigate to a page that can check client hints still sent. +// Step 6 (second window) Alert first window of client hints present. +// Step 7 (first window) Asserts client hints were not present. +async_test(t => { + var new_window; + + // Step 3 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "HadDeviceMemory"); + + // Step 7 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "MissingDeviceMemory"); + new_window.close(); + t.done(); + }), {once: true}); + + // Step 4 + new_window.location.href = "/client-hints/clear-site-data/resources/clear-site-data.py?target=cookies"; + }), {once: true}); + + // Step 1 + new_window = window.open("/client-hints/clear-site-data/resources/check-client-hints.py"); +}, "Clear-Site-Data for cookies should remove all client hints."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html.headers b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html.headers new file mode 100644 index 00000000000..226bb1c3b10 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-cookies.https.html.headers @@ -0,0 +1 @@ +Accept-CH: Sec-CH-Device-Memory diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html new file mode 100644 index 00000000000..49578134f56 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<body> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +// Here's the set-up for this test: +// Step 1 (first window) Open new window to verify that hints were set. +// Step 2 (second window) Alert first window of client hints present. +// Step 3 (first window) Asserts client hints were present. +// Step 4 (first window) Navigate other window to page that clears storage data. +// Step 5 (second window) Navigate to a page that can check client hints still sent. +// Step 6 (second window) Alert first window of client hints present. +// Step 7 (first window) Asserts client hints were present. +async_test(t => { + var new_window; + + // Step 3 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "HadDeviceMemory"); + + // Step 7 + window.addEventListener("message", t.step_func(e => { + assert_equals(e.data, "HadDeviceMemory"); + new_window.close(); + t.done(); + }), {once: true}); + + // Step 4 + new_window.location.href = "/client-hints/clear-site-data/resources/clear-site-data.py?target=storage"; + }), {once: true}); + + // Step 1 + new_window = window.open("/client-hints/clear-site-data/resources/check-client-hints.py"); +}, "Clear-Site-Data for storage should not remove all client hints."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html.headers b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html.headers new file mode 100644 index 00000000000..226bb1c3b10 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/clear-site-data-storage.https.html.headers @@ -0,0 +1 @@ +Accept-CH: Sec-CH-Device-Memory diff --git a/tests/wpt/tests/client-hints/clear-site-data/resources/check-client-hints.py b/tests/wpt/tests/client-hints/clear-site-data/resources/check-client-hints.py new file mode 100644 index 00000000000..f5172300028 --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/resources/check-client-hints.py @@ -0,0 +1,14 @@ +""" +Step 2/6 (/client-hints/clear-site-data/clear-site-data-{}.https.html) +""" +def main(request, response): + if b"sec-ch-device-memory" in request.headers: + result = u"HadDeviceMemory" + else: + result = u"MissingDeviceMemory" + content = u''' + <script> + window.opener.postMessage("%s" , "*"); + </script>''' % (result) + headers = [(b"Content-Type", b"text/html")] + return 200, headers, content diff --git a/tests/wpt/tests/client-hints/clear-site-data/resources/clear-site-data.py b/tests/wpt/tests/client-hints/clear-site-data/resources/clear-site-data.py new file mode 100644 index 00000000000..fd16be9fbcb --- /dev/null +++ b/tests/wpt/tests/client-hints/clear-site-data/resources/clear-site-data.py @@ -0,0 +1,12 @@ +""" +Step 5 (/client-hints/clear-site-data/clear-site-data-{}.https.html) +""" +def main(request, response): + content = u''' + <script> + window.onload = function() { + window.location.href = "/client-hints/clear-site-data/resources/check-client-hints.py"; + }; + </script>''' + headers = [(b"Content-Type", b"text/html"), (b"Clear-Site-Data", b'"%s"' % (request.GET.first(b"target", b"*")))] + return 200, headers, content diff --git a/tests/wpt/tests/credential-management/fedcm-context.https.html b/tests/wpt/tests/credential-management/fedcm-context.https.html index 76758662721..67ba8256341 100644 --- a/tests/wpt/tests/credential-management/fedcm-context.https.html +++ b/tests/wpt/tests/credential-management/fedcm-context.https.html @@ -16,7 +16,7 @@ import {request_options_with_mediation_required, fedcm_test(async t => { navigator.credentials.get(request_options_with_mediation_required()); - const title = await fedcm_get_title_promise(); + const title = await fedcm_get_title_promise(t); assert_true(title.toLowerCase().includes('sign in')); }, "FedCM call defaults to 'signin' context."); @@ -28,13 +28,13 @@ fedcm_test(async t => { fedcm_test(async t => { navigator.credentials.get(request_options_with_context("manifest.py", "use")); - const title = await fedcm_get_title_promise(); + const title = await fedcm_get_title_promise(t); assert_true(title.toLowerCase().includes('use')); }, "FedCM with 'use' context."); fedcm_test(async t => { navigator.credentials.get(request_options_with_context("manifest.py", "continue")); - const title = await fedcm_get_title_promise(); + const title = await fedcm_get_title_promise(t); assert_true(title.toLowerCase().includes('continue')); }, "FedCM with 'continue' context."); </script> diff --git a/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js b/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js index 79136b5958f..e548e8e9c9d 100644 --- a/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js +++ b/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js @@ -144,7 +144,7 @@ export function fedcm_get_title_promise(t) { const title = await window.test_driver.get_fedcm_dialog_title(); resolve(title); } catch (ex) { - t.step_timeout(100, helper); + t.step_timeout(helper, 100); } } return new Promise(helper); diff --git a/tests/wpt/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht b/tests/wpt/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht index 5adbb6daf44..0b70e1e63e7 100644 --- a/tests/wpt/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht +++ b/tests/wpt/tests/css/CSS2/abspos/abspos-containing-block-initial-007.xht @@ -7,4 +7,4 @@ </head><body style="position:absolute; margin:0; bottom:0; height:30px; border:10px solid orange;"> -</body></html>
\ No newline at end of file +</body></html> diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle.html b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-001.html index 6d77cf9a9d4..6d77cf9a9d4 100644 --- a/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle.html +++ b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-001.html diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-002.html b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-002.html new file mode 100644 index 00000000000..ae697fcc749 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-002.html @@ -0,0 +1,112 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests getComputedStyle() resolving anchor() in fragmentation context</title> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1"> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +body { + margin: 0; +} + +.cb { + position: relative; + background: lightgray; +} + +.anchor { + anchor-name: --a; + background: orange; +} + +.target { + position: absolute; + left: anchor(--a left); + right: anchor(--a right); + top: anchor(--a top); + bottom: anchor(--a bottom); + background: lime; + opacity: 0.5; +} +</style> + +<!-- anchor is fragmented in second and third columns --> +<div class="multicol" id="test1"> + <div class="cb"> + <div class="spacer"></div> + <div class="anchor"></div> + <div class="target"></div> + </div> +</div> +<style> +#test1.multicol { + column-count: 3; + column-width: 100px; + column-gap: 10px; + width: 320px; + height: 100px; +} + +#test1 .cb { + width: 100px; + height: 300px; +} + +#test1 .spacer { + height: 175px; +} + +#test1 .anchor { + margin-left: 25px; + width: 50px; + height: 50px; +} +</style> +<script> +test(() => { + const target = test1.querySelector('.target'); + const style = getComputedStyle(target); + assert_equals(style.left, '25px'); + assert_equals(style.right, '-85px'); + assert_equals(style.top, '100px'); + assert_equals(style.bottom, '100px'); +}, 'getComputedStyle() with fragmented containing block in multicolumn layout'); +</script> + + +<div id="test2" style="font: 20px/1 Ahem; width: 11em"> + Lorem + <span class="cb"> + ipsum <span class="anchor">dolor</span> sit + <span class="target"></span> + </span> + amet.<br> + + Lorem + <span class="cb"> + ipsum dolor <span class="anchor">sit</span> + <span class="target"></span> + </span> + amet.<br> +</div> +<script> +test(() => { + const targets = test2.querySelectorAll('.target'); + + const style1 = getComputedStyle(targets[0]); + assert_equals(style1.top, '20px'); + assert_equals(style1.bottom, '0px'); + assert_equals(style1.left, '-120px'); + assert_equals(style1.right, '80px'); + + const style2 = getComputedStyle(targets[1]); + assert_equals(style2.top, '20px'); + assert_equals(style2.bottom, '0px'); + assert_equals(style2.left, '0px'); + assert_equals(style2.right, '0px'); +}, 'getComputedStyle() with fragmented containing block in inline layout'); +</script> diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-003.html b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-003.html new file mode 100644 index 00000000000..f9fca976544 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/anchor-getComputedStyle-003.html @@ -0,0 +1,92 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests that getComputedStyle() returns used position fallback style</title> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1"> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +body { + margin: 0; +} + +.cb { + position: relative; + width: 400px; + height: 400px; + background: lightgray; +} + +.anchor { + position: absolute; + width: 100px; + height: 100px; + background: orange; +} + +.target { + position: absolute; + width: 100px; + height: 100px; + background: lime; + position-fallback: --pf; +} + +@position-fallback --pf { + @try { + top: anchor(top); + left: anchor(right); + } + + @try { + top: anchor(top); + right: anchor(left); + } +} + +#anchor1 { + top: 0; + left: 0; + anchor-name: --a1; +} + +#target1 { + anchor-default: --a1; +} + +#anchor2 { + top: 200px; + right: 0; + anchor-name: --a2; +} + +#target2 { + anchor-default: --a2; +} +</style> + +<div class="cb"> + <div id="anchor1" class="anchor">anchor1</div> + <div id="anchor2" class="anchor">anchor2</div> + + <div id="target1" class="target">target1</div> + <div id="target2" class="target">target2</div> +</div> + +<script> +test(() => { + const style1 = getComputedStyle(target1); + assert_equals(style1.top, '0px'); + assert_equals(style1.left, '100px'); + assert_equals(style1.right, '200px'); +}, 'getComputedStyle() should return and absolutize the first @try rule style for target1'); + +test(() => { + const style2 = getComputedStyle(target2); + assert_equals(style2.top, '200px'); + assert_equals(style2.left, '200px'); + assert_equals(style2.right, '100px'); +}, 'getComputedStyle() should return and absolutize the second @try rule style for target2'); +</script> diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-scroll-005.html b/tests/wpt/tests/css/css-anchor-position/anchor-scroll-005.html new file mode 100644 index 00000000000..82f3a23ac9c --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/anchor-scroll-005.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<title>Tests 'anchor-scroll' with anchor in fixed-positioned scroller</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#scroll"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/test-common.js"></script> + +<style> +body { + margin: 0; + height: 200vh; +} + +#scroller { + position: fixed; + width: 200px; + height: 200px; + overflow-y: scroll; +} + +#anchor { + position: absolute; + width: 100px; + height: 100px; + top: 200px; + background: orange; + anchor-name: --a; +} + +#target { + position: fixed; + width: 100px; + height: 100px; + bottom: anchor(--a top); + anchor-scroll: --a; + background: lime; +} +</style> + +<div id=scroller> + <div id=anchor></div> +</div> +<div id=target></div> + +<script> +promise_test(async () => { + await waitUntilNextAnimationFrame(); + assert_equals(target.getBoundingClientRect().top, 100); + + document.documentElement.scrollTop = 100; + await waitUntilNextAnimationFrame(); + assert_equals(target.getBoundingClientRect().top, 100); +}, 'Target should not scroll with viewport when anchor is in fixed-positioned scroller'); +</script> diff --git a/tests/wpt/tests/css/css-anchor-position/position-fallback-bounds-basics.html b/tests/wpt/tests/css/css-anchor-position/position-fallback-bounds-basics.html new file mode 100644 index 00000000000..3b8b67bd978 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/position-fallback-bounds-basics.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Tests basics of the 'position-fallback' property</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#propdef-position-fallback-bounds"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<script src="/css/support/inheritance-testcommon.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<div id="container"> + <div id="target"></div> +</div> + +<script> +// position-fallback-bounds: normal | <dashed-ident> +test_valid_value('position-fallback-bounds', 'normal'); +test_valid_value('position-fallback-bounds', '--foo'); +test_invalid_value('position-fallback-bounds', 'foo-bar'); +test_invalid_value('position-fallback-bounds', '--foo --bar') +test_invalid_value('position-fallback-bounds', '--foo, --bar') +test_invalid_value('position-fallback-bounds', '100px'); +test_invalid_value('position-fallback-bounds', '100%'); + +// Computed value: as specified +test_computed_value('position-fallback-bounds', 'normal'); +test_computed_value('position-fallback-bounds', '--foo'); + +// Initial: normal +// Inherited: no +assert_not_inherited('position-fallback-bounds', 'normal', '--foo'); + +// Animation type: discrete +test_no_interpolation({ + property: 'position-fallback-bounds', + from: '--foo', + to: 'normal', +}); +</script> diff --git a/tests/wpt/tests/css/css-backgrounds/support/12x12-green.png b/tests/wpt/tests/css/css-backgrounds/support/12x12-green.png Binary files differnew file mode 100644 index 00000000000..1b928484485 --- /dev/null +++ b/tests/wpt/tests/css/css-backgrounds/support/12x12-green.png diff --git a/tests/wpt/tests/css/css-backgrounds/support/1pxgreen-98pxred.png b/tests/wpt/tests/css/css-backgrounds/support/1pxgreen-98pxred.png Binary files differnew file mode 100644 index 00000000000..0f8571a9455 --- /dev/null +++ b/tests/wpt/tests/css/css-backgrounds/support/1pxgreen-98pxred.png diff --git a/tests/wpt/tests/css/css-cascade/scope-invalidation.html b/tests/wpt/tests/css/css-cascade/scope-invalidation.html index d5ba17159e0..c5bdb616585 100644 --- a/tests/wpt/tests/css/css-cascade/scope-invalidation.html +++ b/tests/wpt/tests/css/css-cascade/scope-invalidation.html @@ -103,9 +103,85 @@ test_scope_invalidation(document.currentScript, () => { assert_not_green(span); inner_div.classList.remove('b'); assert_green(span); -}, 'Element becoming scope limit'); +}, 'Parent element becoming scope limit'); </script> +<template> + <style> + @scope (.a) to (.b) { + span { background-color: green; } + } + </style> + <div class=a> + <div> + <span></span> + </div> + </div> +</template> +<script> +test_scope_invalidation(document.currentScript, () => { + let span = main.querySelector('.a > div > span'); + assert_green(span); + span.classList.add('b'); + assert_not_green(span); + span.classList.remove('b'); + assert_green(span); +}, 'Subject element becoming scope limit'); +</script> + +<template> + <style> + @scope (.a) to (.b .c) { + span { background-color: green; } + } + </style> + <div class=a> + <div> + <div class=c> + <span></span> + </div> + </div> + </div> +</template> +<script> +test_scope_invalidation(document.currentScript, () => { + let intermediate_div = main.querySelector('.a > div'); + let span = main.querySelector('span'); + assert_green(span); + intermediate_div.classList.add('b'); + assert_not_green(span); + intermediate_div.classList.remove('b'); + assert_green(span); +}, 'Parent element affecting scope limit'); +</script> + +<template> + <style> + @scope (.a) to (.b ~ .c) { + span { background-color: green; } + } + </style> + <div class=a> + <div></div> + <div></div> + <div></div> + <div></div> + <div class=c> + <span></span> + </div> + </div> +</template> +<script> +test_scope_invalidation(document.currentScript, () => { + let sibling_div = main.querySelector('.a > div'); + let span = main.querySelector('span'); + assert_green(span); + sibling_div.classList.add('b'); + assert_not_green(span); + sibling_div.classList.remove('b'); + assert_green(span); +}, 'Sibling element affecting scope limit'); +</script> <template> <style> diff --git a/tests/wpt/tests/css/css-color/parsing/color-valid-color-mix-function.html b/tests/wpt/tests/css/css-color/parsing/color-valid-color-mix-function.html index d664525effd..361f7488a13 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-valid-color-mix-function.html +++ b/tests/wpt/tests/css/css-color/parsing/color-valid-color-mix-function.html @@ -17,14 +17,19 @@ <script> // https://github.com/w3c/csswg-drafts/issues/7302: Specified values shouldn't resolve keyword colors or calc values test_valid_value(`color`, `color-mix(in srgb, red, blue)`, `color-mix(in srgb, red, blue)`); + test_valid_value(`color`, `color-mix(in srgb, 70% red, 50% blue)`, `color-mix(in srgb, red 70%, blue)`); test_valid_value(`color`, `color-mix(in hsl, red, blue)`, `color-mix(in hsl, red, blue)`); test_valid_value(`color`, `color-mix(in hsl, red calc(20%), blue)`, `color-mix(in hsl, red calc(20%), blue)`); test_valid_value(`color`, `color-mix(in hsl, red calc(var(--v)*1%), blue)`, `color-mix(in hsl, red calc(var(--v)*1%), blue)`); test_valid_value(`color`, `color-mix(in hsl, currentcolor, blue)`, `color-mix(in hsl, currentcolor, blue)`); test_valid_value(`color`, `color-mix(in hsl, red 60%, blue 40%)`, `color-mix(in hsl, red 60%, blue)`); + test_valid_value(`color`, `color-mix(in hsl, red 50%, blue)`, `color-mix(in hsl, red, blue)`); + test_valid_value(`color`, `color-mix(in hsl, red, blue 50%)`, `color-mix(in hsl, red, blue)`); test_valid_value(`color`, `color-mix(in lch decreasing hue, red, hsl(120, 100%, 50%))`, `color-mix(in lch decreasing hue, red, rgb(0, 255, 0))`); test_valid_value(`color`, `color-mix(in hsl, hsl(120deg 10% 20%), hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46), rgb(133, 102, 71))`); + test_valid_value(`color`, `color-mix(in hsl, 50% hsl(120deg 10% 20%), hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46), rgb(133, 102, 71))`); + test_valid_value(`color`, `color-mix(in hsl, hsl(120deg 10% 20%), 50% hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46), rgb(133, 102, 71))`); test_valid_value(`color`, `color-mix(in hsl, hsl(120deg 10% 20%) 25%, hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46) 25%, rgb(133, 102, 71))`); test_valid_value(`color`, `color-mix(in hsl, 25% hsl(120deg 10% 20%), hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46) 25%, rgb(133, 102, 71))`); test_valid_value(`color`, `color-mix(in hsl, hsl(120deg 10% 20%), 25% hsl(30deg 30% 40%))`, `color-mix(in hsl, rgb(46, 56, 46) 75%, rgb(133, 102, 71))`); @@ -103,6 +108,8 @@ test_valid_value(`color`, `color-mix(in hsl, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0))`); test_valid_value(`color`, `color-mix(in hwb, hwb(120deg 10% 20%), hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26), rgb(153, 115, 77))`); + test_valid_value(`color`, `color-mix(in hwb, 50% hwb(120deg 10% 20%), hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26), rgb(153, 115, 77))`); + test_valid_value(`color`, `color-mix(in hwb, hwb(120deg 10% 20%), 50% hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26), rgb(153, 115, 77))`); test_valid_value(`color`, `color-mix(in hwb, hwb(120deg 10% 20%) 25%, hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26) 25%, rgb(153, 115, 77))`); test_valid_value(`color`, `color-mix(in hwb, 25% hwb(120deg 10% 20%), hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26) 25%, rgb(153, 115, 77))`); test_valid_value(`color`, `color-mix(in hwb, hwb(120deg 10% 20%), 25% hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(26, 204, 26) 75%, rgb(153, 115, 77))`); @@ -377,6 +384,8 @@ const resultColorSpace = colorSpace == "xyz" ? "xyz-d65" : colorSpace; test_valid_value(`color`, `color-mix(in ${colorSpace}, color(${colorSpace} .1 .2 .3), color(${colorSpace} .5 .6 .7))`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3), color(${resultColorSpace} 0.5 0.6 0.7))`); + test_valid_value(`color`, `color-mix(in ${colorSpace}, 50% color(${colorSpace} .1 .2 .3), color(${colorSpace} .5 .6 .7))`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3), color(${resultColorSpace} 0.5 0.6 0.7))`); + test_valid_value(`color`, `color-mix(in ${colorSpace}, color(${colorSpace} .1 .2 .3), 50% color(${colorSpace} .5 .6 .7))`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3), color(${resultColorSpace} 0.5 0.6 0.7))`); test_valid_value(`color`, `color-mix(in ${colorSpace}, color(${colorSpace} .1 .2 .3) 25%, color(${colorSpace} .5 .6 .7))`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3) 25%, color(${resultColorSpace} 0.5 0.6 0.7))`); test_valid_value(`color`, `color-mix(in ${colorSpace}, color(${colorSpace} .1 .2 .3), color(${colorSpace} .5 .6 .7) 25%)`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3) 75%, color(${resultColorSpace} 0.5 0.6 0.7))`); test_valid_value(`color`, `color-mix(in ${colorSpace}, color(${colorSpace} .1 .2 .3) 25%, color(${colorSpace} .5 .6 .7) 75%)`, `color-mix(in ${resultColorSpace}, color(${resultColorSpace} 0.1 0.2 0.3) 25%, color(${resultColorSpace} 0.5 0.6 0.7))`); diff --git a/tests/wpt/tests/css/css-contain/container-queries/font-relative-units-dynamic.html b/tests/wpt/tests/css/css-contain/container-queries/font-relative-units-dynamic.html index 63a07c61dbd..9dfaceeed6b 100644 --- a/tests/wpt/tests/css/css-contain/container-queries/font-relative-units-dynamic.html +++ b/tests/wpt/tests/css/css-contain/container-queries/font-relative-units-dynamic.html @@ -157,6 +157,30 @@ test_template(document.currentScript.previousElementSibling, (t) => { <template> <style> + @import url("/fonts/ahem.css"); + main { font-family: 'Ahem'; font-size: 10px; } + main.larger { font-size: 20px; } + @container (width <= 7cap) { + #test { color: green } + } + </style> + <div id="container"> + <div> + <div id="test"></div> + </div> + </div> +</template> +<script> +test_template(document.currentScript.previousElementSibling, (t) => { + t.add_cleanup(() => main.classList.remove("larger")); + assert_equals(getComputedStyle(main.querySelector("#test")).color, red); + main.classList.add("larger"); + assert_equals(getComputedStyle(main.querySelector("#test")).color, green); +}, 'cap units respond to changes'); +</script> + +<template> + <style> :root { font-size: 10px; } :root.larger { font-size: 20px; } @container (width <= 15rch) { @@ -278,3 +302,27 @@ test_template(document.currentScript.previousElementSibling, (t) => { assert_equals(getComputedStyle(main.querySelector("#test")).color, green); }, 'ric units respond to changes'); </script> + +<template> + <style> + @import url("/fonts/ahem.css"); + :root { font-family: 'Ahem'; font-size: 10px; } + :root.larger { font-size: 20px; } + @container (width <= 7rcap) { + #test { color: green } + } + </style> + <div id="container"> + <div style="font-family: monospace;"> + <div id="test"></div> + </div> + </div> +</template> +<script> +test_template(document.currentScript.previousElementSibling, (t) => { + t.add_cleanup(() => document.documentElement.classList.remove("larger")); + assert_equals(getComputedStyle(main.querySelector("#test")).color, red); + document.documentElement.classList.add("larger"); + assert_equals(getComputedStyle(main.querySelector("#test")).color, green); +}, 'rcap units respond to changes'); +</script> diff --git a/tests/wpt/tests/css/css-contain/container-queries/font-relative-units.html b/tests/wpt/tests/css/css-contain/container-queries/font-relative-units.html index 7f711ebf96c..ba4a60dda21 100644 --- a/tests/wpt/tests/css/css-contain/container-queries/font-relative-units.html +++ b/tests/wpt/tests/css/css-contain/container-queries/font-relative-units.html @@ -5,7 +5,8 @@ <script src="/resources/testharnessreport.js"></script> <script src="support/cq-testcommon.js"></script> <style> - :root { font-size: 10px; line-height: 10px; } + @import url("/fonts/ahem.css"); + :root { font-family: 'Ahem'; font-size: 10px; line-height: 10px; } #em_container { container-type: inline-size; width: 100px; @@ -17,6 +18,11 @@ width: 10ex; height: 50rex; } + #cap_container { + container-type: inline-size; + font-size: 50px; + width: 10cap; + } #ch_container { container-type: inline-size; font-size: 50px; @@ -38,10 +44,16 @@ @container (width: 10rem) { #rem_test { color: green } } + @container (width: 10cap) { + #cap_test { color: green } + } + @container (width: 50rcap) { + #rcap_test { color: green } + } @container (width: 10ex) { #ex_test { color: green } } - @container (49rex <= width <= 100rex) { + @container (width: 50rex) { #rex_test { color: green } } @container (width: 10ch) { @@ -67,6 +79,10 @@ <div id="em_test"></div> <div id="rem_test"></div> </div> +<div id="cap_container"> + <div id="cap_test"></div> + <div id="rcap_test"></div> +</div> <div id="ex_container"> <div id="ex_test"></div> <div id="rex_test"></div> @@ -97,4 +113,6 @@ test(() => assert_equals(getComputedStyle(ric_test).color, green), "ric relative inline-size"); test(() => assert_equals(getComputedStyle(lh_test).color, green), "lh relative inline-size"); test(() => assert_equals(getComputedStyle(rlh_test).color, green), "rlh relative inline-size"); + test(() => assert_equals(getComputedStyle(cap_test).color, green), "cap relative inline-size"); + test(() => assert_equals(getComputedStyle(rcap_test).color, green), "rcap relative inline-size"); </script> diff --git a/tests/wpt/tests/css/css-contain/container-queries/inheritance-from-container.html b/tests/wpt/tests/css/css-contain/container-queries/inheritance-from-container.html new file mode 100644 index 00000000000..97dfff2fd02 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/container-queries/inheritance-from-container.html @@ -0,0 +1,43 @@ +<!doctype html> +<title>Containers and inheritance</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> +#outer { + visibility: hidden; +} +#outer.visible { + visibility: visible; +} +#container { + container-type: inline-size; +} +#container.visible { + visibility: visible; +} +</style> +<div id=outer><div id=container><span id=inner>PASS</span></div></div> +<script> +setup(() => assert_implements_container_queries()); + +test((t) => { + assert_equals(getComputedStyle(inner).visibility, "hidden"); +}, "Initial state"); + +test((t) => { + outer.classList.add("visible"); + assert_equals(getComputedStyle(inner).visibility, "visible"); +}, "Test that visibility inherits via container after mutation"); + +test((t) => { + outer.classList.remove("visible"); + assert_equals(getComputedStyle(inner).visibility, "hidden"); +}, "Return to initial state"); + +test((t) => { + container.classList.add("visible"); + assert_equals(getComputedStyle(inner).visibility, "visible"); +}, "Test that visibility inherits from container after mutation"); +</script> diff --git a/tests/wpt/tests/css/css-easing/cubic-bezier-timing-functions-output.html b/tests/wpt/tests/css/css-easing/cubic-bezier-timing-functions-output.html index 168f4cd907e..4e14ef3bb3e 100644 --- a/tests/wpt/tests/css/css-easing/cubic-bezier-timing-functions-output.html +++ b/tests/wpt/tests/css/css-easing/cubic-bezier-timing-functions-output.html @@ -13,12 +13,15 @@ href="https://drafts.csswg.org/css-easing/#cubic-bezier-timing-functions"> <script> 'use strict'; +// Precision of major rendering engines' layout systems. +const epsilon = 0.02; + function assert_style_left_at(animation, time, easingFunction) { animation.currentTime = time; var portion = time / animation.effect.getTiming()['duration']; assert_approx_equals(pxToNum(getComputedStyle(animation.effect.target).left), easingFunction(portion) * 100, - 0.01, + epsilon, 'The left of the animation should be approximately ' + easingFunction(portion) * 100 + ' at ' + time + 'ms'); } diff --git a/tests/wpt/tests/css/css-flexbox/align-items-baseline-row-vert-ref.html b/tests/wpt/tests/css/css-flexbox/align-items-baseline-row-vert-ref.html index dec8ac3b353..c9cbc39416d 100644 --- a/tests/wpt/tests/css/css-flexbox/align-items-baseline-row-vert-ref.html +++ b/tests/wpt/tests/css/css-flexbox/align-items-baseline-row-vert-ref.html @@ -27,7 +27,6 @@ background: cyan; width: 40px; height: 40px; - writing-mode: horizontal-tb; } #target > :nth-child(4) { background: lime; diff --git a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html index b90f840b10a..e804c33cb4c 100644 --- a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html +++ b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html @@ -5,14 +5,14 @@ display: flex; position: relative; } -.target > div, td { +.target > div, .target td { background: hotpink; font-size: 20px; line-height: 0; } -table { border-spacing: 0; } -td { padding: 5px; min-width: 5px; min-height: 5px; } -caption { +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { margin: 10px; background: lime; block-size: 20px; diff --git a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html index 9126e4246ca..c7d2c8af704 100644 --- a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html +++ b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html @@ -6,14 +6,14 @@ position: relative; writing-mode: vertical-rl; } -.target > div, td { +.target > div, .target td { background: hotpink; font-size: 20px; line-height: 0; } -table { border-spacing: 0; } -td { padding: 5px; min-width: 5px; min-height: 5px; } -caption { +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { margin: 10px; background: lime; block-size: 20px; diff --git a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html index 2092a898540..15f35401756 100644 --- a/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html +++ b/tests/wpt/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html @@ -6,14 +6,14 @@ position: relative; writing-mode: vertical-lr; } -.target > div, td { +.target > div, .target td { background: hotpink; font-size: 20px; line-height: 0; } -table { border-spacing: 0; } -td { padding: 5px; min-width: 5px; min-height: 5px; } -caption { +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { margin: 10px; background: lime; block-size: 20px; diff --git a/tests/wpt/tests/css/css-fonts/format-specifiers-variations.html b/tests/wpt/tests/css/css-fonts/format-specifiers-variations.html index 480396ea16f..32b8ebed67e 100644 --- a/tests/wpt/tests/css/css-fonts/format-specifiers-variations.html +++ b/tests/wpt/tests/css/css-fonts/format-specifiers-variations.html @@ -36,7 +36,7 @@ function runTestOnFormatSpecifiers(formats, expectFail) { if (!expectFail) { return fontFace.load(); } else { - return promise_rejects_dom(testDetails, "NetworkError", fontFace.load()); + return promise_rejects_dom(testDetails, "SyntaxError", fontFace.load()); } }, (expectFail ? "Do not load" : "Load") + " Ahem with format " + formats[i], { "format": formats[i] diff --git a/tests/wpt/tests/css/css-fonts/parsing/font-face-src-list.html b/tests/wpt/tests/css/css-fonts/parsing/font-face-src-list.html index c87705109fd..07aeacd2eec 100644 --- a/tests/wpt/tests/css/css-fonts/parsing/font-face-src-list.html +++ b/tests/wpt/tests/css/css-fonts/parsing/font-face-src-list.html @@ -19,6 +19,7 @@ { src: 'url(not a valid url/bar.ttf), url(foo.ttf)', valid: true }, { src: 'url(foo.ttf) format(bad), url(foo.ttf)', valid: true }, { src: 'url(foo.ttf) tech(unknown), url(foo.ttf)', valid: true }, + { src: 'url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), url(foo.ttf)', valid: true }, { src: 'url(foo.ttf), url(something.ttf) format(broken)', valid: true }, { src: '/* an empty component */, url(foo.ttf)', valid: true }, { src: 'local(""), url(foo.ttf), unparseable-garbage, local("another font name")', valid: true }, @@ -27,6 +28,7 @@ { src: 'local("textfont") format(opentype), local("emoji") tech(color-COLRv0)', valid: false }, { src: 'local(), /*empty*/, url(should be quoted.ttf), junk', valid: false }, { src: 'url(foo.ttf) format(unknown), url(bar.ttf) tech(broken)', valid: false }, + { src: 'url(foo.ttf) tech(color-COLRv0) otherfunc(othervalue), junk', valid: false }, ]; for (let t of tests) { diff --git a/tests/wpt/tests/css/css-grid/parsing/grid-template-shorthand-areas-valid.html b/tests/wpt/tests/css/css-grid/parsing/grid-template-shorthand-areas-valid.html index 4a22784332f..2d2b2433a41 100644 --- a/tests/wpt/tests/css/css-grid/parsing/grid-template-shorthand-areas-valid.html +++ b/tests/wpt/tests/css/css-grid/parsing/grid-template-shorthand-areas-valid.html @@ -26,8 +26,8 @@ function testValidGridTemplate(valueGridTemplate, valueGridAreas, serializedGrid }, `grid-template: ${valueGridTemplate} and "grid-template-areas: ${valueGridAreas};" should be valid.`); } -testValidGridTemplate("none / 1px", "\"a\""); -testValidGridTemplate("none / none", "\"a\"", "none"); +testValidGridTemplate("none / 1px", "\"a\"", ""); +testValidGridTemplate("none / none", "\"a\"", ""); testValidGridTemplate("auto / 1px", "\"a a a\"", "\"a a a\" / 1px"); testValidGridTemplate("auto / auto", "\"a a a\"", "\"a a a\" / auto"); testValidGridTemplate("10px 20px 30px / 40px 50px 60px 70px", @@ -35,4 +35,4 @@ testValidGridTemplate("10px 20px 30px / 40px 50px 60px 70px", "\"a . b .\" 10px \"c d . e\" 20px \"f g h .\" 30px / 40px 50px 60px 70px"); </script> </body> -</html>
\ No newline at end of file +</html> diff --git a/tests/wpt/tests/css/css-grid/subgrid/repeat-auto-fill-009.html b/tests/wpt/tests/css/css-grid/subgrid/repeat-auto-fill-009.html new file mode 100644 index 00000000000..73b52a616b2 --- /dev/null +++ b/tests/wpt/tests/css/css-grid/subgrid/repeat-auto-fill-009.html @@ -0,0 +1,121 @@ +<!DOCTYPE HTML> +<html> + <link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com"> + <link rel="help" href="https://drafts.csswg.org/css-grid-2/#resolved-track-list"> + <head> + <style> +html,body { + color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0; +} + +.wrapper { + display: inline-block; + width: 100px; + border: 1px solid; +} + +.grid { + display: grid; + grid-auto-rows: 8px; + background: grey; +} + +.fill-0a { grid-template-columns: subgrid repeat(auto-fill, [y]) [z] } +.fill-0b { grid-template-columns: subgrid [x] repeat(auto-fill, [y]) [z] } +.fill-0c { grid-template-columns: subgrid [x] [y] repeat(auto-fill, [z]) } +.fill-0d { grid-template-columns: subgrid repeat(auto-fill, [x]) } +.fill-0e { grid-template-columns: subgrid [x] } + +.grid > :nth-child(2n) { background: black; } +.grid > :nth-child(2n+1) { background: pink; } + + </style> + </head> +<body> + +<div class="wrapper"><div class="grid fill-0a"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="wrapper"><div class="grid fill-0b"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="wrapper"><div class="grid fill-0c"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="wrapper"><div class="grid fill-0d"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<div class="wrapper"><div class="grid fill-0e"> + <div style="grid-column:y 5"></div> + <div style="grid-column:y 4"></div> + <div style="grid-column:y 3"></div> + <div style="grid-column:y 2"></div> + <div style="grid-column:y 1"></div> + <div style="grid-column:y -1"></div> + <div style="grid-column:y -2"></div> + <div style="grid-column:y -3"></div> + <div style="grid-column:y -4"></div> + <div style="grid-column:y -5"></div> +</div></div> + +<script> + const expectedResults = [ + "none", + "none", + "none", + "none", + "none", + ]; + [...document.querySelectorAll('.grid')].forEach(function(grid, i) { + let actual = window.getComputedStyle(grid)['grid-template-columns']; + let expected = expectedResults[i]; + if (actual != expected) { + let err = "Unexpected getComputedStyle value for grid " + i + " with className '" + grid.className + "':" + + " Actual: \"" + actual + "\", Expected: \"" + expected + "\""; + document.body.appendChild(document.createTextNode(err)); + document.body.appendChild(document.createElement("br")); + } + }); +</script> + +</body> diff --git a/tests/wpt/tests/css/css-images/image-set/image-set-computed.sub.html b/tests/wpt/tests/css/css-images/image-set/image-set-computed.sub.html index 6d54fd0d09b..532e48e6e86 100644 --- a/tests/wpt/tests/css/css-images/image-set/image-set-computed.sub.html +++ b/tests/wpt/tests/css/css-images/image-set/image-set-computed.sub.html @@ -38,7 +38,16 @@ function test_calculated_resolution_units() { test_computed_value_variants( 'background-image', "image-set(url('http://{{host}}/example.png') calc(37dpcm + 0.79532dpcm))", - 'image-set(url("http://{{host}}/example.png") 1dppx)' + [ + 'image-set(url("http://{{host}}/example.png") 1dppx)', + 'image-set(url("http://{{host}}/example.png") 1.000001dppx)' + ] + ); + + test_computed_value_variants( + 'background-image', + "image-set(url('http://{{host}}/example.png') calc(-1 * 1x))", + 'image-set(url("http://{{host}}/example.png") 0dppx)' ); } diff --git a/tests/wpt/tests/css/css-multicol/hit-test-in-vertical-rl.html b/tests/wpt/tests/css/css-multicol/hit-test-in-vertical-rl.html new file mode 100644 index 00000000000..526e33d7924 --- /dev/null +++ b/tests/wpt/tests/css/css-multicol/hit-test-in-vertical-rl.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/1457423"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style>body { margin: 0; }</style> +<div style=" + column-count: 2; + column-gap: 14px; + writing-mode: vertical-rl; + inline-size: 200px; + block-size: 100px; + padding: 10px;"> +<div style="block-size: 20px;"></div> +<div style="column-span: all; block-size: 20px;"></div> +<div id="child1" style="block-size: 70px; break-inside: avoid;"></div> +<div id="child2" style="block-size: 70px; break-inside: avoid;"></div> +</div> +<script> +const t = async_test('Hit-testing in vertical-rl writing-mode'); +t.step(() => { + assert_equals(document.elementFromPoint(15, 20), child1); + assert_equals(document.elementFromPoint(15, 130), child2); + + const PADDING = 10; + const e1 = new MouseEvent('click', {clientX:15, clientY:20, bubbles:true, cancelable:true}); + document.onclick = t.step_func(e => { + assert_equals(e.target, child1); + assert_equals(e.offsetX, e.clientX - PADDING); + assert_equals(e.offsetY, e.clientY - PADDING); + }); + child1.dispatchEvent(e1); + + const e2 = new MouseEvent('click', {clientX:15, clientY:130, bubbles:true, cancelable:true}); + document.onclick = t.step_func_done(e => { + const COLUMN_GAP = 14; + const COLUMN_INLINE_SIZE = (200 - COLUMN_GAP) / 2; + assert_equals(e.target, child2); + assert_equals(e.offsetX, e.clientX - PADDING); + assert_equals(e.offsetY, e.clientY - PADDING - COLUMN_INLINE_SIZE - COLUMN_GAP); + }); + child2.dispatchEvent(e2); +}); +</script> diff --git a/tests/wpt/tests/css/css-nesting/cssom.html b/tests/wpt/tests/css/css-nesting/cssom.html index b5bd80d1b46..fa22b2fb453 100644 --- a/tests/wpt/tests/css/css-nesting/cssom.html +++ b/tests/wpt/tests/css/css-nesting/cssom.html @@ -125,22 +125,19 @@ }`, 'color is changed, new rule is ignored'); }); - // We cannot insert anything starting with an tag, as that would cause - // the serialized rule not to parse back. Compounds starting with a tag - // that are _not_ the first compound in a complex selector are OK, though, - // as are complex selectors that are not the first in the list. test(() => { document.getElementById('ss').innerHTML = sampleSheetText; let [ss] = document.styleSheets; - ss.cssRules[0].cssRules[0].selectorText = 'div.b .c &'; // Ignored. + ss.cssRules[0].cssRules[0].selectorText = 'div.b .c &'; // Allowed ss.cssRules[0].cssRules[1].selectorText = '.c div.b &, div &'; // Allowed. - assert_throws_dom('SyntaxError', () => { ss.cssRules[0].insertRule('div & {}'); }); + ss.cssRules[0].insertRule('div & {}'); // Allowed. assert_equals(ss.cssRules[0].cssText, `.a { color: red; - & .b { color: green; } + div & { } + div.b .c & { color: green; } .c div.b &, div & { color: blue; } -}`, 'one rule is kept unchanged, the other is changed'); +}`, 'selectorText and insertRule'); }); // Rules that are dropped in forgiving parsing but that contain &, diff --git a/tests/wpt/tests/css/css-nesting/invalid-inner-rules.html b/tests/wpt/tests/css/css-nesting/invalid-inner-rules.html index ffb53420e2d..87c7c9a9348 100644 --- a/tests/wpt/tests/css/css-nesting/invalid-inner-rules.html +++ b/tests/wpt/tests/css/css-nesting/invalid-inner-rules.html @@ -28,7 +28,7 @@ div { let [ss] = document.styleSheets; assert_equals(ss.cssRules.length, 1); - // The @layer rule should be ignored. + // The @font-face rule should be ignored. assert_equals(ss.cssRules[0].cssText, `div { @media screen { diff --git a/tests/wpt/tests/css/css-properties-values-api/register-property-syntax-parsing.html b/tests/wpt/tests/css/css-properties-values-api/register-property-syntax-parsing.html index 16cbdf0c571..5bda1c4c5b2 100644 --- a/tests/wpt/tests/css/css-properties-values-api/register-property-syntax-parsing.html +++ b/tests/wpt/tests/css/css-properties-values-api/register-property-syntax-parsing.html @@ -75,7 +75,6 @@ assert_valid("<time>", "2s"); assert_valid("<time>", "calc(2s - 9ms)"); assert_valid("<resolution>", "10dpi"); assert_valid("<resolution>", "3dPpX"); -assert_valid("<resolution>", "-5.3dpcm"); assert_valid("<transform-function>", "translateX(2px)"); assert_valid("<transform-function>|<integer>", "5"); assert_valid("<transform-function>|<integer>", "scale(2)"); @@ -247,6 +246,11 @@ assert_invalid("<angle>", "0"); assert_invalid("<angle>", "10%"); assert_invalid("<time>", "2px"); assert_invalid("<resolution>", "10"); + +// "The allowed range of <resolution> values always excludes negative values" +// https://www.w3.org/TR/css-values-4/#resolution-value +assert_invalid("<resolution>", "-5.3dpcm"); + assert_invalid("<transform-function>", "scale()"); assert_invalid("<transform-list>", "scale()"); assert_invalid("<transform-list>+", "translateX(2px) rotate(20deg)"); diff --git a/tests/wpt/tests/css/css-scroll-snap/input/keyboard.html b/tests/wpt/tests/css/css-scroll-snap/input/keyboard.html index 7b0c6c05742..187ac0fb9e3 100644 --- a/tests/wpt/tests/css/css-scroll-snap/input/keyboard.html +++ b/tests/wpt/tests/css/css-scroll-snap/input/keyboard.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-type" /> <title>Arrow key scroll snapping</title> +<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> <meta name="flags" content="should"> <meta name="assert" content="Test passes if keyboard scrolling correctly snaps on a snap diff --git a/tests/wpt/tests/css/css-transitions/idlharness-2.html b/tests/wpt/tests/css/css-transitions/idlharness-2.html new file mode 100644 index 00000000000..236bf5642bc --- /dev/null +++ b/tests/wpt/tests/css/css-transitions/idlharness-2.html @@ -0,0 +1,28 @@ +<!doctype html> +<title>css-transitions-2 IDL tests</title> +<link rel="help" href="https://drafts.csswg.org/css-transitions-2/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="/resources/idlharness.js"></script> +<!-- used to provide objects --> +<style> + @starting-style { + #id { color: green } + } +</style> +<script> + "use strict"; + + idl_test( + ['css-transitions-2'], + ['web-animations', 'cssom', 'html', 'dom'], + idl_array => { + idl_array.add_objects({ + Animation: ['new Animation()'], + CSSStartingStyleRule: ['sheet.cssRules[0]'], + }); + self.sheet = document.styleSheets[0]; + } + ); +</script> diff --git a/tests/wpt/tests/css/css-values/animations/calc-interpolation.html b/tests/wpt/tests/css/css-values/animations/calc-interpolation.html index 40379a13fb2..f2c49a5cb9f 100644 --- a/tests/wpt/tests/css/css-values/animations/calc-interpolation.html +++ b/tests/wpt/tests/css/css-values/animations/calc-interpolation.html @@ -68,7 +68,7 @@ test_interpolation({ target_names:['CSS Animations', 'Web Animations'] }, [ {at: -0.25, expect: `${-APPROX_INFINITY}px`}, - {at: 0, expect: `${APPROX_INFINITY}px`}, + {at: 0, expect: `0px`}, {at: 0.25, expect: `${APPROX_INFINITY}px`}, {at: 0.5, expect: `${APPROX_INFINITY}px`}, {at: 0.75, expect: `${APPROX_INFINITY}px`}, diff --git a/tests/wpt/tests/css/css-values/cap-invalidation.html b/tests/wpt/tests/css/css-values/cap-invalidation.html new file mode 100644 index 00000000000..0becd0d093d --- /dev/null +++ b/tests/wpt/tests/css/css-values/cap-invalidation.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<title>CSS Values and Units Test: cap invalidation</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="help" href="https://drafts.csswg.org/css-values/#font-relative-lengths"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + @import url("/fonts/ahem.css"); + html { + font-family: 'Ahem'; + font-size: 40px; + } + div { + width: 10cap; + } +</style> + +<html> + <div id="div"></div> +</html> + +<script> + setup({ single_test: true }); + let old_width = div.getBoundingClientRect().width; + document.documentElement.style.fontFamily = "sans-serif"; + let new_width = div.getBoundingClientRect().width; + assert_not_equals(old_width, new_width, "expect the capital height of Ahem and sans-serif to be different"); + done(); +</script> diff --git a/tests/wpt/tests/css/css-values/exp-log-serialize.html b/tests/wpt/tests/css/css-values/exp-log-serialize.html index 9eca44e6829..6108278d962 100644 --- a/tests/wpt/tests/css/css-values/exp-log-serialize.html +++ b/tests/wpt/tests/css/css-values/exp-log-serialize.html @@ -33,8 +33,11 @@ test_serialization( 'calc(log(1) + 0.5)', 'calc(0.5)', '0.5'); -test_serialization( - 'calc(log(0))', - 'calc(-infinity)', - '-infinity'); + +const t = 'calc(log(0))'; +const s = 'calc(-infinity)'; +const c = '0'; +test_specified_serialization('opacity', t, s); +test_specified_serialization('transform', `scale(${t})`, `scale(${s})`); +test_computed_serialization('opacity', t, c); </script>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-values/rcap-invalidation.html b/tests/wpt/tests/css/css-values/rcap-invalidation.html new file mode 100644 index 00000000000..562161b4e5d --- /dev/null +++ b/tests/wpt/tests/css/css-values/rcap-invalidation.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>CSS Values and Units Test: rcap invalidation</title> +<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> +<link rel="help" href="https://drafts.csswg.org/css-values/#font-relative-lengths"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" content="test rex invalidation"> +<style> + @import url("/fonts/ahem.css"); + html { + font-family: 'Ahem'; + font-size: 40px; + } + body { + font-family: monospace; + font-size: 20px; + } + div { + height: 10rcap; + width: 10rcap; + } +</style> + +<html> + <body> + <div id="div"></div> + </body> +</html> + +<script> + setup({ single_test: true }); + let old_width = div.getBoundingClientRect().width; + document.documentElement.style.fontFamily = "sans-serif"; + let new_width = div.getBoundingClientRect().width; + assert_not_equals(old_width, new_width, "expect the capital height of Ahem and sans-serif to be different"); + done(); +</script> diff --git a/tests/wpt/tests/css/css-values/round-mod-rem-serialize.html b/tests/wpt/tests/css/css-values/round-mod-rem-serialize.html index 39569995b3a..aa7c768b952 100644 --- a/tests/wpt/tests/css/css-values/round-mod-rem-serialize.html +++ b/tests/wpt/tests/css/css-values/round-mod-rem-serialize.html @@ -11,7 +11,7 @@ <script> function test_serialization(t,s,c) { test_specified_serialization('opacity', t, s); - test_specified_serialization('transform', `scale(${t})`, `scale(calc(${c}))`); + test_specified_serialization('transform', `scale(${t})`, `scale(${s})`); test_computed_serialization('opacity', t, c); test_computed_serialization('transform', `scale(${t})`, `matrix(${c}, 0, 0, ${c}, 0, 0)`); } @@ -32,13 +32,13 @@ test_serialization( test_serialization( 'calc(round(1,0))', 'calc(NaN)', - 'NaN'); + '0'); test_serialization( 'calc(mod(1,0))', 'calc(NaN)', - 'NaN'); + '0'); test_serialization( 'calc(rem(1,0))', 'calc(NaN)', - 'NaN'); + '0'); </script> diff --git a/tests/wpt/tests/css/cssom/getComputedStyle-insets-absolute-crash.html b/tests/wpt/tests/css/cssom/getComputedStyle-insets-absolute-crash.html new file mode 100644 index 00000000000..e28828bab1f --- /dev/null +++ b/tests/wpt/tests/css/cssom/getComputedStyle-insets-absolute-crash.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Chromium bug: getComputedStyle() crashes with subtree layout of out-of-flow node</title> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1458561"> + +<style> +.container { + position: relative; + width: 100px; + height: 100px; + background: lime; +} + +.oof { + position: absolute; + width: 30px; + height: 30px; + top: 0; + left: 0; + overflow: hidden; + background: hotpink; +} +</style> + +<div class="container"> + <div id="target1" class="oof">hi</div> +</div> +<script> +document.body.offsetTop; +target1.innerText = 'boom'; +getComputedStyle(target1).top; // Shouldn't crash +</script> + +<div class="container"> + <div id="target2" class="oof"><div>hi</div></div> +</div> +<script> +document.body.offsetTop; +target2.firstChild.innerText = 'boom'; +getComputedStyle(target2).top; // Shouldn't crash +</script> diff --git a/tests/wpt/tests/css/cssom/getComputedStyle-insets-grid.html b/tests/wpt/tests/css/cssom/getComputedStyle-insets-grid.html new file mode 100644 index 00000000000..08b55733a15 --- /dev/null +++ b/tests/wpt/tests/css/cssom/getComputedStyle-insets-grid.html @@ -0,0 +1,25 @@ +<!doctype html> +<title>Position absolute getComputedStyle left (for display: grid)</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=867616"> +<link rel="author" href="mailto:francois.remy.dev@outlook.com"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + +span { display: grid; grid-template-columns: 100px 100px; } +span { position: absolute; grid-column: 2; } + +</style> + +<span>abc<span>def</span></span> + +<script> +var test_description = document.title; +promise_test(t => { + return new Promise(test => addEventListener('load', e=>test())) + .then(test => assert_equals( + getComputedStyle(document.querySelector("body > span > span"))['left'], "0px", + "Invalid gCS($(\"body > span > span\"))['left'];")); +}, test_description); +</script> diff --git a/tests/wpt/tests/css/cssom/getComputedStyle-insets-relpos-inline.html b/tests/wpt/tests/css/cssom/getComputedStyle-insets-relpos-inline.html new file mode 100644 index 00000000000..d5f197ee9bc --- /dev/null +++ b/tests/wpt/tests/css/cssom/getComputedStyle-insets-relpos-inline.html @@ -0,0 +1,84 @@ +<!doctype html> +<title>getComputedStyle OOF inset resolved against relpos inline container</title> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +.ifc { + position: relative; + width: max-content; + font: 20px/1 Ahem; + margin-bottom: 2em; +} + +.relpos { + position: relative; + background: yellow; + color: yellow; +} + +.target { + position: absolute; + background: green; + width: 5em; + height: 1em; + top: 1em; +} + +.fix-start { + inset-inline-start: 0; +} + +.fix-end { + inset-inline-end: 0; +} +</style> + +<div class="ifc"> + Lorem + <span class="relpos"> + ipsum dolor + <div class="target fix-start" id="target1"></div> + <div class="target fix-end" id="target2"></div> + </span> + sit amet +</div> +<script> +test(() => { + let style = getComputedStyle(target1); + assert_equals(style.left, '0px'); + assert_equals(style.right, '140px'); +}, 'OOF with left fixed right auto in relpos inline container'); + +test(() => { + let style = getComputedStyle(target2); + assert_equals(style.left, '140px'); + assert_equals(style.right, '0px'); +}, 'OOF with left auto right fixed in relpos inline container'); +</script> + +<div class="ifc"> + Lorem + <span class="relpos" dir="rtl"> + ipsum dolor + <div class="target fix-start" id="target3" dir="ltr"></div> + <div class="target fix-end" id="target4" dir="ltr"></div> + </span> + sit amet +</div> +<script> +test(() => { + let style = getComputedStyle(target3); + assert_equals(style.left, '0px'); + assert_equals(style.right, '140px'); +}, 'OOF with left fixed right auto in relpos inline container with mixed directions'); + +test(() => { + let style = getComputedStyle(target4); + assert_equals(style.left, '140px'); + assert_equals(style.right, '0px'); +}, 'OOF with left auto right fixed in relpos inline container with mixed directions'); +</script> diff --git a/tests/wpt/tests/css/motion/animation/offset-path-interpolation-005.html b/tests/wpt/tests/css/motion/animation/offset-path-interpolation-005.html index 13de65d8a73..11234bf31a3 100644 --- a/tests/wpt/tests/css/motion/animation/offset-path-interpolation-005.html +++ b/tests/wpt/tests/css/motion/animation/offset-path-interpolation-005.html @@ -128,15 +128,13 @@ 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%)'}, + // TODO: Test intermediate values as well, once the expected behavior + // is clear in the spec. Right now it's a bit unclear whether or how to + // interpolate to/from the initial 'auto' value. {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. + // No interpolation between different sizes and/or different containment and/or coord-boxes. test_no_interpolation({ property: 'offset-path', from: 'ray(200deg farthest-side)', @@ -152,6 +150,11 @@ from: 'ray(200deg farthest-side contain)', to: 'ray(300deg sides)' }); + test_no_interpolation({ + property: 'offset-path', + from: 'ray(-10deg farthest-corner) content-box', + to: 'ray(-50deg farthest-corner at 100% 100%) padding-box' + }); </script> </body> </html> diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-001-ref.html b/tests/wpt/tests/css/motion/offset-path-coord-box-001-ref.html index e9a7fbb808f..8b86ce26e16 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-001-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-001-ref.html @@ -9,8 +9,8 @@ left: 100px; position: relative; border-radius: 50%; - border: 5px solid black; - width: 600px; + border: 10px solid black; + width: 400px; height: 400px; } #box { @@ -18,7 +18,7 @@ position: relative; top: 100px; left: 100px; - transform: translate(378.441px, -85.8301px) rotate(37.2267deg); + transform: translate(260px, 50px); width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-001.html b/tests/wpt/tests/css/motion/offset-path-coord-box-001.html index d4e903e69df..15f378e0386 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-001.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-001.html @@ -12,8 +12,8 @@ left: 100px; position: relative; border-radius: 50%; - border: 5px solid black; - width: 600px; + border: 10px solid black; + width: 400px; height: 400px; } #box { @@ -22,7 +22,7 @@ left: 100px; position: relative; offset-path: border-box; - offset-distance: 15%; + offset-distance: 25%; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-002-ref.html b/tests/wpt/tests/css/motion/offset-path-coord-box-002-ref.html index b7bee52a1e3..41f65dc0164 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-002-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-002-ref.html @@ -8,7 +8,7 @@ top: 100px; left: 100px; position: relative; - border: 5px solid black; + border: 10px solid black; width: 600px; height: 400px; } diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-002.html b/tests/wpt/tests/css/motion/offset-path-coord-box-002.html index 0446e2caa16..40b94727d37 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-002.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-002.html @@ -10,7 +10,7 @@ top: 100px; left: 100px; position: relative; - border: 5px solid black; + border: 10px solid black; width: 600px; height: 400px; } diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-003-ref.html b/tests/wpt/tests/css/motion/offset-path-coord-box-003-ref.html index 5b9b445dd8f..0fa94d4c31b 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-003-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-003-ref.html @@ -8,7 +8,7 @@ top: 100px; left: 100px; position: relative; - border: 5px solid black; + border: 10px solid black; padding: 10px; width: 600px; height: 400px; diff --git a/tests/wpt/tests/css/motion/offset-path-coord-box-003.html b/tests/wpt/tests/css/motion/offset-path-coord-box-003.html index d3ea7f92a8e..e793c18830d 100644 --- a/tests/wpt/tests/css/motion/offset-path-coord-box-003.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-003.html @@ -10,7 +10,7 @@ top: 100px; left: 100px; position: relative; - border: 5px solid black; + border: 10px solid black; padding: 10px; width: 600px; height: 400px; diff --git a/tests/wpt/tests/css/motion/offset-path-geometry-box-ref.html b/tests/wpt/tests/css/motion/offset-path-coord-box-004-ref.html index 60870c815e1..60870c815e1 100644 --- a/tests/wpt/tests/css/motion/offset-path-geometry-box-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-004-ref.html diff --git a/tests/wpt/tests/css/motion/offset-path-geometry-box.html b/tests/wpt/tests/css/motion/offset-path-coord-box-004.html index 1e9399441c2..c84bae6832e 100644 --- a/tests/wpt/tests/css/motion/offset-path-geometry-box.html +++ b/tests/wpt/tests/css/motion/offset-path-coord-box-004.html @@ -1,10 +1,10 @@ <!DOCTYPE html> <html> <head> - <title>CSS Motion Path: path(basic-shape) paths</title> - <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-path-property"> - <link rel="match" href="offset-path-geometry-box-ref.html"> - <meta name="assert" content="This tests that path(<geometry-box>) generates a rotation and translation."> + <title>CSS Motion Path: offset-path:stoke-box paths</title> + <link rel="help" href="https://drafts.fxtf.org/motion-1/#valdef-offset-path-coord-box"> + <link rel="match" href="offset-path-coord-box-004-ref.html"> + <meta name="assert" content="This tests that offset-path:stroke-box generates a rotation and translation."> <style> #target { position: absolute; diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-001-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-001-ref.html index 7bc29af79c6..6d6b64d32e3 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-001-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-001-ref.html @@ -13,7 +13,8 @@ } #box { background-color: green; - transform: translate(250px, 350px); + transform: translate(250px, 350px) rotate(180deg); + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-001.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-001.html index 4874ba33929..2205d9d3f69 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-001.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-001.html @@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> circle() path with explicit arguments</title> -<meta name=fuzzy content="0-1;0-200"> +<meta name=fuzzy content="0-35;0-200"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-circle-001-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -19,6 +19,7 @@ position: relative; offset-path: circle(closest-side at center); offset-distance: 25%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-003-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-003-ref.html index 327d325137c..c005984f768 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-003-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-003-ref.html @@ -15,6 +15,7 @@ background-color: green; position: relative; transform: translate(420.231px, 311.969px) rotate(154.813deg); + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-003.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-003.html index 1911d425a16..ef69e7e41b6 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-003.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-003.html @@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> circle() path with offset-distance</title> -<meta name=fuzzy content="0-10;0-20"> +<meta name=fuzzy content="0-110;0-500"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-circle-003-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -19,6 +19,7 @@ position: relative; offset-path: circle(farthest-side at top); offset-distance: 18%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-004-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-004-ref.html index 86c67dcdedc..925abdb8b4f 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-004-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-004-ref.html @@ -8,13 +8,14 @@ top: 100px; left: 100px; position: relative; - width: 600px; + width: 400px; height: 400px; } #box { background-color: green; position: relative; - transform: translate(400px, 199px) translate(-50px, -50px); + transform: translate(200px, 160px); + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-004.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-004.html index f0a8523dd16..d22665636e6 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-004.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-004.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> circle() path with offset-distance and offset-anchor</title> +<meta name=fuzzy content="0-80;0-310"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-circle-004-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -10,7 +11,7 @@ top: 100px; left: 100px; position: relative; - width: 600px; + width: 400px; height: 400px; } #box { @@ -19,6 +20,7 @@ offset-path: circle(10% at bottom 25% right 25%); offset-anchor: 100% 100%; offset-distance: 75%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-circle-005.html b/tests/wpt/tests/css/motion/offset-path-shape-circle-005.html index 0ca93306c60..2ba5bc1650a 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-circle-005.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-circle-005.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> circle() path with offset-position</title> +<meta name=fuzzy content="0-18;0-400"> <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"> diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001-ref.html index 32236bbc239..0e53fa2d355 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001-ref.html @@ -13,7 +13,8 @@ } #box { background-color: green; - transform: translate(250px, 350px); + transform: translate(250px, 350px) rotate(180deg); + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001.html b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001.html index b8254458d38..be3ade57c6d 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-001.html @@ -1,7 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> ellipse() path with explicit arguments</title> -<meta name=fuzzy content="0-1;0-200"> +<meta name=fuzzy content="0-24;0-200"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-ellipse-001-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -19,6 +19,7 @@ position: relative; offset-path: ellipse(closest-side closest-side at center); offset-distance: 25%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003-ref.html index 4a9fed4c86a..2239210e49b 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003-ref.html @@ -8,13 +8,14 @@ top: 100px; left: 100px; position: relative; - width: 600px; - height: 400px; + width: 400px; + height: 200px; } #box { background-color: green; position: relative; - transform: translate(393.93px, 300.959px) rotate(143.905deg); + transform: translate(8.6px, 91.4px) rotate(-135deg); + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003.html b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003.html index 540c56dba7b..38ef5eb9bbf 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-003.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> ellipse() path with offset-distance</title> +<meta name=fuzzy content="0-25;0-450"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-ellipse-003-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -10,14 +11,15 @@ top: 100px; left: 100px; position: relative; - width: 600px; - height: 400px; + width: 400px; + height: 200px; } #box { background-color: green; position: relative; offset-path: ellipse(farthest-side farthest-side at top); - offset-distance: 18%; + offset-distance: 37.5%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-005.html b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-005.html index 27eae4a5c49..2b2c0abeff9 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-ellipse-005.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-ellipse-005.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> ellipse() path with offset-position</title> +<meta name=fuzzy content="0-18;0-400"> <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"> diff --git a/tests/wpt/tests/css/motion/offset-path-shape-inset-002-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-inset-002-ref.html index 28195129f32..1bb649474aa 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-inset-002-ref.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-inset-002-ref.html @@ -8,12 +8,14 @@ top: 100px; left: 100px; position: relative; - width: 600px; + width: 400px; height: 400px; } #box { background-color: green; - transform: translate(512.786px, 283.444px) rotate(133.055deg) translate(50px, 50px); + transform: translate(306px, 94px) rotate(45deg); + transform-origin: 0 0; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-inset-002.html b/tests/wpt/tests/css/motion/offset-path-shape-inset-002.html index 6279cdd35eb..5ca502e8b1c 100644 --- a/tests/wpt/tests/css/motion/offset-path-shape-inset-002.html +++ b/tests/wpt/tests/css/motion/offset-path-shape-inset-002.html @@ -1,6 +1,7 @@ <!doctype html> <meta charset="utf-8"> <title>CSS Motion Path test: <basic-shape> inset() path with explicit arguments and radius</title> +<meta name=fuzzy content="0-75;0-500"> <link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com"> <link rel="match" href="offset-path-shape-inset-002-ref.html"> <link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape"> @@ -10,15 +11,16 @@ top: 100px; left: 100px; position: relative; - width: 600px; + width: 400px; height: 400px; } #box { background-color: green; position: relative; - offset-path: inset(10px 10px 10px 10px round 30%); + offset-path: inset(50px round 50%); offset-anchor: 0 0; - offset-distance: 40%; + offset-distance: 12.5%; + border-radius: 50% 50% 0 0; width: 100px; height: 100px; } diff --git a/tests/wpt/tests/css/motion/offset-path-shape-ref.html b/tests/wpt/tests/css/motion/offset-path-shape-ref.html deleted file mode 100644 index a659b287fda..00000000000 --- a/tests/wpt/tests/css/motion/offset-path-shape-ref.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>CSS Motion Path: path(basic-shape) paths</title> - <style> - #target { - position: absolute; - left: 300px; - top: 0px; - width: 300px; - height: 200px; - background-color: lime; - transform-origin: 0px 0px; - transform: translate(35px, 44px); - } - </style> - </head> - <body> - <div id="target"></div> - </body> -</html> diff --git a/tests/wpt/tests/css/motion/parsing/offset-anchor-parsing-valid.html b/tests/wpt/tests/css/motion/parsing/offset-anchor-parsing-valid.html index 97a3c54131f..6cb4d44117f 100644 --- a/tests/wpt/tests/css/motion/parsing/offset-anchor-parsing-valid.html +++ b/tests/wpt/tests/css/motion/parsing/offset-anchor-parsing-valid.html @@ -15,7 +15,7 @@ test_valid_value("offset-anchor", "auto"); test_valid_value("offset-anchor", "left bottom"); -test_valid_value("offset-anchor", "center center", "center"); +test_valid_value("offset-anchor", "center center"); test_valid_value("offset-anchor", "right center"); test_valid_value("offset-anchor", "center top"); test_valid_value("offset-anchor", "center bottom"); diff --git a/tests/wpt/tests/css/motion/parsing/offset-position-parsing-valid.html b/tests/wpt/tests/css/motion/parsing/offset-position-parsing-valid.html index 032a5b42b46..bc0d19a460f 100644 --- a/tests/wpt/tests/css/motion/parsing/offset-position-parsing-valid.html +++ b/tests/wpt/tests/css/motion/parsing/offset-position-parsing-valid.html @@ -16,7 +16,7 @@ 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", "center"); +test_valid_value("offset-position", "center center"); test_valid_value("offset-position", "right center"); test_valid_value("offset-position", "center top"); test_valid_value("offset-position", "center bottom"); diff --git a/tests/wpt/tests/css/printing/page-size-001-print-ref.html b/tests/wpt/tests/css/printing/page-size-001-print-ref.html new file mode 100644 index 00000000000..8bfd2717fa5 --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-001-print-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + @page { size: 300px 400px; } + body { margin: 0; } +</style> +<div style="height:400px;">Page 1</div> +<div style="height:400px;">Page 2</div> +<div style="height:400px;">Page 3</div> diff --git a/tests/wpt/tests/css/printing/page-size-001-print.html b/tests/wpt/tests/css/printing/page-size-001-print.html new file mode 100644 index 00000000000..19d72b0231f --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-001-print.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-page-3/#page-size-prop"> +<link rel="match" href="page-size-001-print-ref.html"> +<style> + @page { size: 300px 400px; } + body { margin: 0; } +</style> +<div style="break-before:page;">Page 1</div> +<div style="break-before:page;">Page 2</div> +<div style="break-before:page;">Page 3</div> diff --git a/tests/wpt/tests/css/printing/page-size-002-print-ref.html b/tests/wpt/tests/css/printing/page-size-002-print-ref.html new file mode 100644 index 00000000000..aa8cb6edcd2 --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-002-print-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + @page { size: 300px 50px; } + body { margin: 0; } +</style> +<div style="height:50px;">Page 1</div> +<div style="height:50px;">Page 2</div> +<div style="height:50px;">Page 3</div> diff --git a/tests/wpt/tests/css/printing/page-size-002-print.html b/tests/wpt/tests/css/printing/page-size-002-print.html new file mode 100644 index 00000000000..8ecf38107b8 --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-002-print.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-page-3/#page-size-prop"> +<link rel="match" href="page-size-002-print-ref.html"> +<style> + @page { size: 300px 50px; } + body { margin: 0; } +</style> +<div style="break-before:page;">Page 1</div> +<div style="break-before:page;">Page 2</div> +<div style="break-before:page;">Page 3</div> diff --git a/tests/wpt/tests/css/printing/page-size-003-print-ref.html b/tests/wpt/tests/css/printing/page-size-003-print-ref.html new file mode 100644 index 00000000000..38ea1508781 --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-003-print-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<style> + @page { + size: 300px 100px; + margin: 25px; + } + body { margin: 0; } +</style> +<div style="height:50px;">Page 1</div> +<div style="height:50px;">Page 2</div> +<div style="height:50px;">Page 3</div> diff --git a/tests/wpt/tests/css/printing/page-size-003-print.html b/tests/wpt/tests/css/printing/page-size-003-print.html new file mode 100644 index 00000000000..805ff0e568a --- /dev/null +++ b/tests/wpt/tests/css/printing/page-size-003-print.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-page-3/#page-size-prop"> +<link rel="match" href="page-size-003-print-ref.html"> +<style> + @page { + size: 300px 100px; + margin: 25px; + } + body { margin: 0; } +</style> +<div style="break-before:page;">Page 1</div> +<div style="break-before:page;">Page 2</div> +<div style="break-before:page;">Page 3</div> diff --git a/tests/wpt/tests/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html b/tests/wpt/tests/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html new file mode 100644 index 00000000000..bd5f96a3e27 --- /dev/null +++ b/tests/wpt/tests/css/selectors/invalidation/is-pseudo-containing-sibling-relationship-in-has.html @@ -0,0 +1,311 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Selectors Test: :has(:is()) invalidation for sibling change</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<style> + #test-container > div { background-color: green; } + #target1:has(:is(.item + .item + .item)) { background-color: red; } + #target2:has(:is(.invalid .item, .item + .item + .item)) { background-color: red; } + #target3:has(:is(.item + .item + .item > .child + .child + .child)) { background-color: red; } + #target4:has(:is(.item + .item + .item > .child):is(.child + .child + .child)) { background-color: red; } + #target5:has(:is(.item + .item + .item > .child)) { background-color: red; } + #target6:has(:is(.invalid .item, .item + .item + .item > .child)) { background-color: red; } + #target7:has(:is(.item + .item + .item > .child + .child + .child)) { background-color: red; } + #target8:has(:is(.child + .child + .child):is(.item + .item + .item > .child)) { background-color: red; } + #target9:has(:is(:where(:is(.item + .item + .item) > .child) + .child + .child)) { background-color: red; } + #target10:has(:is(.item:nth-child(3))) { background-color: red; } + #target11:has(:is(.item:nth-child(3) > .child:nth-child(3))) { background-color: red; } + #target12:has(:is(.item:nth-last-child(3))) { background-color: red; } + #target13:has(:is(.item:nth-last-child(3) > .child:nth-last-child(3))) { background-color: red; } + #target14:has(:is(.item:nth-child(3) > .child)) { background-color: red; } + #target15:has(:is(.item:nth-child(3) > .child:nth-child(3))) { background-color: red; } + #target16:has(:is(.item:nth-last-child(3) > .child)) { background-color: red; } + #target17:has(:is(.item:nth-last-child(3) > .child:nth-last-child(3))) { background-color: red; } + .item + .item + .item { + #target18:has(&) { background-color: red; } + #target19:has(:is(& > .child + .child + .child)) { background-color: red; } + } + .item + .item + .item > .child { + #target20:has(:is(& + .child + .child)) { background-color: red; } + } +</style> +<div id="test-container"> + <div id="target1"> + <div class="item" id="item1">FAIL if you see this text</div> + <div class="item"></div> + <div class="item">This text should have a green background</div> + </div> + <div id="target2"> + <div class="item" id="item2">FAIL if you see this text</div> + <div class="item"></div> + <div class="item">This text should have a green background</div> + </div> + <div id="target3"> + <div class="item"></div> + <div class="item"></div> + <div class="item"> + <span class="child" id="item3">(FAIL if you see this text)</span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target4"> + <div class="item"></div> + <div class="item"></div> + <div class="item"> + <span class="child" id="item4">(FAIL if you see this text)</span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target5"> + <div class="item" id="item5">FAIL if you see this text</div> + <div class="item"></div> + <div class="item"> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target6"> + <div class="item" id="item6">FAIL if you see this text</div> + <div class="item"></div> + <div class="item"> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target7"> + <div class="item"></div> + <div class="item" id="item7">FAIL if you see this text</div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target8"> + <div class="item"></div> + <div class="item" id="item8">FAIL if you see this text</div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target9"> + <div class="item"></div> + <div class="item" id="item9">FAIL if you see this text</div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target10"> + <div class="item" id="item10">FAIL if you see this text</div> + <div class="item"></div> + <div class="item">This text should have a green background</div> + </div> + <div id="target11"> + <div class="item"></div> + <div class="item"></div> + <div class="item"> + <span class="child" id="item11">(FAIL if you see this text)</span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target12"> + <div class="item">This text should have a green background</div> + <div class="item"></div> + <div class="item" id="item12">FAIL if you see this text</div> + </div> + <div id="target13"> + <div class="item"> + <span class="child">This text should have a green background</span> + <span class="child"></span> + <span class="child" id="item13">(FAIL if you see this text)</span> + </div> + <div class="item"></div> + <div class="item"></div> + </div> + <div id="target14"> + <div class="item" id="item14">FAIL if you see this text</div> + <div class="item"></div> + <div class="item"> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target15"> + <div class="item" id="item15">FAIL if you see this text</div> + <div class="item"></div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target16"> + <div class="item"> + <span class="child">This text should have a green background</span> + </div> + <div class="item"></div> + <div class="item" id="item16">FAIL if you see this text</div> + </div> + <div id="target17"> + <div class="item"> + <span class="child">This text should have a green background</span> + <span class="child"></span> + <span class="child"></span> + </div> + <div class="item"></div> + <div class="item" id="item17">FAIL if you see this text</div> + </div> + <div id="target18"> + <div class="item" id="item18">FAIL if you see this text</div> + <div class="item"></div> + <div class="item">This text should have a green background</div> + </div> + <div id="target19"> + <div class="item"></div> + <div class="item" id="item19">FAIL if you see this text</div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> + <div id="target20"> + <div class="item"></div> + <div class="item" id="item20">FAIL if you see this text</div> + <div class="item"> + <span class="child"></span> + <span class="child"></span> + <span class="child">This text should have a green background</span> + </div> + </div> +</div> +<script> + test(() => { + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target3).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target4).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target5).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target6).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target7).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target8).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target9).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target10).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target11).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target12).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target13).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target14).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target15).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target16).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target17).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target18).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target19).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target20).backgroundColor, "rgb(255, 0, 0)"); + }, "Initially red"); + + test(() => { + item1.remove(); + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item2.remove(); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item3.remove(); + assert_equals(getComputedStyle(target3).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector enclosed by :is() no longer matching after removal (3)"); + + test(() => { + item4.remove(); + assert_equals(getComputedStyle(target4).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector enclosed by :is() no longer matching after removal (4)"); + + test(() => { + item5.remove(); + assert_equals(getComputedStyle(target5).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in non-subject enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item6.remove(); + assert_equals(getComputedStyle(target6).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in non-subject enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item7.remove(); + assert_equals(getComputedStyle(target7).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in non-subject enclosed by :is() no longer matching after removal (3)"); + + test(() => { + item8.remove(); + assert_equals(getComputedStyle(target8).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in non-subject enclosed by :is() no longer matching after removal (4)"); + + test(() => { + item9.remove(); + assert_equals(getComputedStyle(target9).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in non-subject enclosed by :is() no longer matching after removal (5)"); + + test(() => { + item10.remove(); + assert_equals(getComputedStyle(target10).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item11.remove(); + assert_equals(getComputedStyle(target11).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item12.remove(); + assert_equals(getComputedStyle(target12).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item13.remove(); + assert_equals(getComputedStyle(target13).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item14.remove(); + assert_equals(getComputedStyle(target14).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() in non-subject enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item15.remove(); + assert_equals(getComputedStyle(target15).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() in non-subject enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item16.remove(); + assert_equals(getComputedStyle(target16).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() in non-subject enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item17.remove(); + assert_equals(getComputedStyle(target17).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() in non-subject enclosed by :is() no longer matching after removal (2)"); + + test(() => { + item18.remove(); + assert_equals(getComputedStyle(target18).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in parent selector enclosed by :is() no longer matching after removal"); + + test(() => { + item19.remove(); + assert_equals(getComputedStyle(target19).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in parent selector non-subject position enclosed by :is() no longer matching after removal (1)"); + + test(() => { + item20.remove(); + assert_equals(getComputedStyle(target20).backgroundColor, "rgb(0, 128, 0)"); + }, "sibling selector in parent selector non-subject position enclosed by :is() no longer matching after removal (2)"); +</script> diff --git a/tests/wpt/tests/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html b/tests/wpt/tests/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html new file mode 100644 index 00000000000..ec6d86198b0 --- /dev/null +++ b/tests/wpt/tests/css/selectors/invalidation/not-pseudo-containing-sibling-relationship-in-has.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Selectors Test: :has(:not()) invalidation for sibling change</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<style> + #test-container > div { background-color: green; } + #target1:has(:not(.item, :nth-child(3))) { background-color: red; } + #target2:has(:not(.item, :nth-last-child(3))) { background-color: red; } +</style> +<div id="test-container"> + <div id="target1"> + <div class="item"></div> + <div id="item1">This text should have a green background</div> + </div> + <div id="target2"> + <div id="item2">This text should have a green background</div> + <div class="item"></div> + </div> +</div> +<script> + test(() => { + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(255, 0, 0)"); + }, "Initially red"); + + function insertDivItemBefore(item) { + let div = document.createElement("div"); + div.classList.add("item"); + item.parentElement.insertBefore(div, item); + } + + function insertDivItemAfter(item) { + let div = document.createElement("div"); + div.classList.add("item"); + item.parentElement.append(div, item.nextSibling); + } + + test(() => { + insertDivItemBefore(item1); + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() enclosed by :not() matching after insertion"); + + test(() => { + insertDivItemAfter(item2); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() enclosed by :not() matching after insertion"); +</script> diff --git a/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml b/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml index c0a7f622fbe..c2913a1312e 100644 --- a/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml +++ b/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-construct-xml-parser.xhtml @@ -18,23 +18,23 @@ async function construct_custom_element_in_parser(test, code) { window.executed = false; - window.exception = false; + window.exception = null; const content_window = await create_window_in_test_async(test, 'application/xml', `<?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> <![CDATA[ -let executed = false; -let exception = null; class CustomElement extends window.HTMLElement { constructor() { super(); + let exception = null; try { ${code} } catch (error) { exception = error; } - executed = true; + top.executed = true; + top.exception = exception; } } customElements.define('some-element', CustomElement); @@ -43,10 +43,6 @@ customElements.define('some-element', CustomElement); </head> <body> <some-element></some-element> -<script> -top.executed = executed; -top.exception = exception; -</script> </body> </html>`); let content_document; diff --git a/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml b/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml index 13f664550be..4a3c8ec43b0 100644 --- a/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml +++ b/tests/wpt/tests/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions-xml-parser.xhtml @@ -18,23 +18,23 @@ async function custom_element_reactions_in_parser(test, code) { window.executed = false; - window.exception = false; + window.exception = null; const content_window = await create_window_in_test_async(test, 'application/xml', `<?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script> <![CDATA[ -let executed = false; -let exception = null; class CustomElement extends window.HTMLElement { constructor() { super(); + let exception = null; try { ${code} } catch (error) { exception = error; } - executed = true; + top.executed = true; + top.exception = exception; } } CustomElement.observedAttributes = ['title']; @@ -44,10 +44,6 @@ customElements.define('some-element', CustomElement); </head> <body> <some-element title="some title"></some-element> -<script> -top.executed = executed; -top.exception = exception; -</script> </body> </html>`); let content_document; diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html new file mode 100644 index 00000000000..3657a8b8771 --- /dev/null +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-inner-frame.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <style> + body { + margin: 0px; + } + #spacer { + height: 120vh; + width: 120vw; + border: solid 1px black; + } + #scroller { + height: 200px; + width: 200px; + overflow: scroll; + border: solid 1px red; + } + #inner-spacer { + height: 400px; + width: 400px; + border: solid 1px black; + } + </style> + <body> + <div id="scroller"> + <div id="inner-spacer"></div> + </div> + <div id="spacer"></div> + </body> +</html> diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html new file mode 100644 index 00000000000..1a20751bd53 --- /dev/null +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-event-fires-to-iframe-window.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<html> + +<head> + <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="scroll_support.js"></script> + <script src="scrollend-user-scroll-common.js"></script> + <style> + #targetDiv { + width: 200px; + height: 200px; + overflow: scroll; + } + + #innerDiv { + width: 400px; + height: 400px; + } + + iframe { + height: 300px; + width: 300px; + } + </style> +</head> + +<body style="margin:0" onload=runTest()> + <iframe id="frame" src="scrollend-event-fires-to-iframe-inner-frame.html"></iframe> +</body> + +<script> + function runTest() { + let target_div = frame.contentDocument.getElementById("scroller"); + //Tests for scrollend events on an element within an iframe. + promise_test(async (t) => { + await test_scrollend_on_touch_drag(t, target_div); + }, 'Tests that the target_div within iframe gets scrollend event when touch ' + + 'dragging.'); + + promise_test(async (t) => { + await test_scrollend_on_scrollbar_gutter_click(t, target_div); + }, 'Tests that the target_div within iframe gets scrollend event when ' + + 'clicking scrollbar.'); + + // Same issue as previous test. + promise_test(async (t) => { + await test_scrollend_on_scrollbar_thumb_drag(t, target_div); + }, 'Tests that the target_div within iframe gets scrollend event when ' + + 'dragging the scrollbar thumb.'); + + promise_test(async (t) => { + await test_scrollend_on_mousewheel_scroll(t, target_div); + }, 'Tests that the target_div within iframe gets scrollend event when mouse ' + + 'wheel scrolling.'); + + promise_test(async (t) => { + await test_scrollend_on_keyboard_scroll(t, target_div); + }, 'Tests that the target_div within iframe gets scrollend event when ' + + 'sending DOWN key to the target.'); + + // Test for scrollend events on the iframe's window. + // TODO: add similar tests with different input modes. + promise_test(async (t) => { + let scroller = frame.contentDocument.scrollingElement; + + await waitForScrollReset(t, scroller); + await waitForCompositorReady(); + + const targetScrollendPromise = waitForScrollendEvent(t, frame.contentDocument); + verifyNoScrollendOnDocument(t); + + let x = target_div.getBoundingClientRect().width + 20; + let y = 20; + let dy = 30; + await new test_driver.Actions().scroll(x, y, 0, dy).send(); + await targetScrollendPromise; + assert_equals(scroller.scrollTop, dy, 'window scrolled by mousewheel'); + }, 'scrollend fires to iframe window on mousewheelscroll'); + } + +</script> + +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-event-for-user-scroll.html b/tests/wpt/tests/dom/events/scrolling/scrollend-event-for-user-scroll.html index 561c90ca94c..a06843a35e7 100644 --- a/tests/wpt/tests/dom/events/scrolling/scrollend-event-for-user-scroll.html +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-event-for-user-scroll.html @@ -8,6 +8,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="scroll_support.js"></script> +<script src="scrollend-user-scroll-common.js"></script> <style> #targetDiv { width: 200px; @@ -33,155 +34,31 @@ var target_div = document.getElementById('targetDiv'); function runTest() { promise_test(async (t) => { - // Skip the test on a Mac as they do not support touch screens. - const isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; - if (isMac) - return; - - await resetTargetScrollState(t, target_div); - await waitForCompositorReady(); - - const timeout = 3000; // Because we have two pauses we need longer timeout - const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div, timeout); - verifyNoScrollendOnDocument(t); - - let scrollend_count = 0; - const scrollend_listener = () => { - scrollend_count += 1; - }; - target_div.addEventListener("scrollend", scrollend_listener); - t.add_cleanup(() => { - target_div.removeEventListener('scrollend', scrollend_listener); - }); - - // Perform a touch drag on target div and wait for target_div to get - // a scrollend event. - await new test_driver.Actions() - .addPointer('TestPointer', 'touch') - .pointerMove(0, 0, {origin: target_div}) // 0, 0 is center of element. - .pointerDown() - .addTick() - .pointerMove(0, -40, {origin: target_div}) // Drag up to move down. - .addTick() - .pause(200) // Prevent inertial scroll. - .pointerMove(0, -60, {origin: target_div}) - .addTick() - .pause(200) // Prevent inertial scroll. - .pointerUp() - .send(); - - await targetScrollendPromise; - - assert_true(target_div.scrollTop > 0); - await verifyScrollStopped(t, target_div); - assert_equals(scrollend_count, 1); + await test_scrollend_on_touch_drag(t, target_div); }, 'Tests that the target_div gets scrollend event when touch dragging.'); promise_test(async (t) => { - // Skip test on platforms that do not have a visible scrollbar (e.g. - // overlay scrollbar). - const scrollbar_width = target_div.offsetWidth - target_div.clientWidth; - if (scrollbar_width == 0) - return; - - await resetTargetScrollState(t, target_div); - await waitForCompositorReady(); - - const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); - verifyNoScrollendOnDocument(t); - - const bounds = target_div.getBoundingClientRect(); - // Some versions of webdriver have been known to frown at non-int arguments - // to pointerMove. - const x = bounds.right - Math.round(scrollbar_width / 2); - const y = bounds.bottom - 20; - await new test_driver.Actions() - .addPointer('TestPointer', 'mouse') - .pointerMove(x, y, {origin: 'viewport'}) - .pointerDown() - .addTick() - .pointerUp() - .send(); - - await targetScrollendPromise; - assert_true(target_div.scrollTop > 0); - await verifyScrollStopped(t, target_div); + await test_scrollend_on_scrollbar_gutter_click(t, target_div); }, 'Tests that the target_div gets scrollend event when clicking ' + 'scrollbar.'); // Same issue as previous test. promise_test(async (t) => { - // Skip test on platforms that do not have a visible scrollbar (e.g. - // overlay scrollbar). - const scrollbar_width = target_div.offsetWidth - target_div.clientWidth; - if (scrollbar_width == 0) - return; - - await resetTargetScrollState(t, target_div); - await waitForCompositorReady(); - - const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div, 1000); - verifyNoScrollendOnDocument(t); - - const bounds = target_div.getBoundingClientRect(); - // Some versions of webdriver have been known to frown at non-int arguments - // to pointerMove. - const x = bounds.right - Math.round(scrollbar_width / 2); - const y = bounds.top + 30; - const dy = 30; - await new test_driver.Actions() - .addPointer('TestPointer', 'mouse') - .pointerMove(x, y, { origin: 'viewport' }) - .pointerDown() - .pointerMove(x, y + dy, { origin: 'viewport' }) - .addTick() - .pointerUp() - .send(); - - await targetScrollendPromise; - assert_true(target_div.scrollTop > 0); - await verifyScrollStopped(t, target_div); + await test_scrollend_on_scrollbar_thumb_drag(t, target_div); }, 'Tests that the target_div gets scrollend event when dragging the ' + 'scrollbar thumb.'); promise_test(async (t) => { - await resetTargetScrollState(t, target_div); - await waitForCompositorReady(); - - const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); - verifyNoScrollendOnDocument(t); - - const x = 0; - const y = 0; - const dx = 0; - const dy = 40; - const duration_ms = 10; - await new test_driver.Actions() - .scroll(x, y, dx, dy, { origin: target_div }, duration_ms) - .send(); - - await targetScrollendPromise; - assert_true(target_div.scrollTop > 0); - await verifyScrollStopped(t, target_div); + await test_scrollend_on_mousewheel_scroll(t, target_div); }, 'Tests that the target_div gets scrollend event when mouse wheel ' + 'scrolling.'); promise_test(async (t) => { - await resetTargetScrollState(t, target_div); - await waitForCompositorReady(); - - verifyNoScrollendOnDocument(t); - const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); - - target_div.focus(); - window.test_driver.send_keys(target_div, '\ue015'); - - await targetScrollendPromise; - assert_true(target_div.scrollTop > 0); - await verifyScrollStopped(t, target_div); + await test_scrollend_on_keyboard_scroll(t, target_div); }, 'Tests that the target_div gets scrollend event when sending DOWN key ' + 'to the target.'); } + </script> </html> diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-user-scroll-common.js b/tests/wpt/tests/dom/events/scrolling/scrollend-user-scroll-common.js new file mode 100644 index 00000000000..4bf8f927ff2 --- /dev/null +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-user-scroll-common.js @@ -0,0 +1,146 @@ + +async function test_scrollend_on_touch_drag(t, target_div) { + // Skip the test on a Mac as they do not support touch screens. + const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; + if (isMac) + return; + + await resetTargetScrollState(t, target_div); + await waitForCompositorReady(); + + const timeout = 3000; // Because we have two pauses we need longer timeout + const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div, timeout); + verifyNoScrollendOnDocument(t); + + let scrollend_count = 0; + const scrollend_listener = () => { + scrollend_count += 1; + }; + target_div.addEventListener("scrollend", scrollend_listener); + t.add_cleanup(() => { + target_div.removeEventListener('scrollend', scrollend_listener); + }); + + // Perform a touch drag on target div and wait for target_div to get + // a scrollend event. + await new test_driver.Actions() + .addPointer('TestPointer', 'touch') + .pointerMove(0, 0, { origin: target_div }) // 0, 0 is center of element. + .pointerDown() + .addTick() + .pointerMove(0, -40, { origin: target_div }) // Drag up to move down. + .addTick() + .pause(200) // Prevent inertial scroll. + .pointerMove(0, -60, { origin: target_div }) + .addTick() + .pause(200) // Prevent inertial scroll. + .pointerUp() + .send(); + + await targetScrollendPromise; + + assert_true(target_div.scrollTop > 0); + await verifyScrollStopped(t, target_div); + assert_equals(scrollend_count, 1); +} + +async function test_scrollend_on_scrollbar_gutter_click(t, target_div) { + // Skip test on platforms that do not have a visible scrollbar (e.g. + // overlay scrollbar). + const scrollbar_width = target_div.offsetWidth - target_div.clientWidth; + if (scrollbar_width == 0) + return; + + await resetTargetScrollState(t, target_div); + await waitForCompositorReady(); + + const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); + verifyNoScrollendOnDocument(t); + + const bounds = target_div.getBoundingClientRect(); + // Some versions of webdriver have been known to frown at non-int arguments + // to pointerMove. + const x = bounds.right - Math.round(scrollbar_width / 2); + const y = bounds.bottom - 20; + await new test_driver.Actions() + .addPointer('TestPointer', 'mouse') + .pointerMove(x, y, { origin: 'viewport' }) + .pointerDown() + .addTick() + .pointerUp() + .send(); + + await targetScrollendPromise; + assert_true(target_div.scrollTop > 0); + await verifyScrollStopped(t, target_div); +} + +// Same issue as previous test. +async function test_scrollend_on_scrollbar_thumb_drag(t, target_div) { + // Skip test on platforms that do not have a visible scrollbar (e.g. + // overlay scrollbar). + const scrollbar_width = target_div.offsetWidth - target_div.clientWidth; + if (scrollbar_width == 0) + return; + + await resetTargetScrollState(t, target_div); + await waitForCompositorReady(); + + const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div, 1000); + verifyNoScrollendOnDocument(t); + + const bounds = target_div.getBoundingClientRect(); + // Some versions of webdriver have been known to frown at non-int arguments + // to pointerMove. + const x = bounds.right - Math.round(scrollbar_width / 2); + const y = bounds.top + 30; + const dy = 30; + await new test_driver.Actions() + .addPointer('TestPointer', 'mouse') + .pointerMove(x, y, { origin: 'viewport' }) + .pointerDown() + .pointerMove(x, y + dy, { origin: 'viewport' }) + .addTick() + .pointerUp() + .send(); + + await targetScrollendPromise; + assert_true(target_div.scrollTop > 0); + await verifyScrollStopped(t, target_div); +} + +async function test_scrollend_on_mousewheel_scroll(t, target_div) { + await resetTargetScrollState(t, target_div); + await waitForCompositorReady(); + + const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); + verifyNoScrollendOnDocument(t); + + const x = 0; + const y = 0; + const dx = 0; + const dy = 40; + const duration_ms = 10; + await new test_driver.Actions() + .scroll(x, y, dx, dy, { origin: target_div }, duration_ms) + .send(); + + await targetScrollendPromise; + assert_true(target_div.scrollTop > 0); + await verifyScrollStopped(t, target_div); +} + +async function test_scrollend_on_keyboard_scroll(t, target_div) { + await resetTargetScrollState(t, target_div); + await waitForCompositorReady(); + + verifyNoScrollendOnDocument(t); + const targetScrollendPromise = createScrollendPromiseForTarget(t, target_div); + + target_div.focus(); + window.test_driver.send_keys(target_div, '\ue015'); + + await targetScrollendPromise; + assert_true(target_div.scrollTop > 0); + await verifyScrollStopped(t, target_div); +} diff --git a/tests/wpt/tests/editing/crashtests/remove-editing-host-during-forwarddelete.html b/tests/wpt/tests/editing/crashtests/remove-editing-host-during-forwarddelete.html index 9c803dc1327..2b23c34607c 100644 --- a/tests/wpt/tests/editing/crashtests/remove-editing-host-during-forwarddelete.html +++ b/tests/wpt/tests/editing/crashtests/remove-editing-host-during-forwarddelete.html @@ -13,12 +13,22 @@ svg { </style> <script> document.addEventListener("DOMContentLoaded", async () => { + const dir = document.querySelector("dir"); const waitForAnimationEnd = new Promise(resolve => { let count = 0; function onAnimationEnd() { window.find("AAAAAAAAAA"); document.execCommand("forwardDelete"); - if (++count == 2) { + count++; + function getRemainingEventCount() { + if (count >= 2) { + return 0; + } + // If `animationend` is delayed and `<dir>` has already been removed, + // `animationend` for it is never fired anymore. + return !dir.isConnected ? 0 : 1; + } + if (!getRemainingEventCount()) { window.removeEventListener("animationend", onAnimationEnd); resolve(); } @@ -27,7 +37,6 @@ document.addEventListener("DOMContentLoaded", async () => { }); window.find("A"); document.execCommand("insertHTML", false, "AAAAAAAAAAAAAAAA"); - const dir = document.querySelector("dir"); dir.addEventListener("DOMNodeRemoved", event => { dir.remove(); }); diff --git a/tests/wpt/tests/editing/include/editor-test-utils.js b/tests/wpt/tests/editing/include/editor-test-utils.js index a4c24c94edb..24527d4a793 100644 --- a/tests/wpt/tests/editing/include/editor-test-utils.js +++ b/tests/wpt/tests/editing/include/editor-test-utils.js @@ -32,10 +32,13 @@ class EditorTestUtils { sendKey(key, modifier) { if (!modifier) { - return new this.window.test_driver.Actions() - .keyDown(key) - .keyUp(key) - .send(); + return this.window.test_driver.send_keys(this.editingHost, key) + .catch(() => { + return new this.window.test_driver.Actions() + .keyDown(key) + .keyUp(key) + .send(); + }); } return new this.window.test_driver.Actions() .keyDown(modifier) diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html b/tests/wpt/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html index b99658facb2..5f3e95cce40 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html +++ b/tests/wpt/tests/html/browsers/browsing-the-web/read-media/cross-origin-video.html @@ -21,6 +21,10 @@ promise_test(async () => { + '/service-workers/service-worker/resources/fetch-access-control.py?' + 'VIDEO%26PartialContent'; + let v = document.createElement("video"); + if (v.canPlayType("video/ogv") == "") + frame.src += "%26mp4"; + document.body.appendChild(frame); await new Promise(resolve => frame.onload = resolve); diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js index 6978cef8321..047d5cf821e 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +++ b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js @@ -180,9 +180,13 @@ * access to it. * @private * @param {Object} options - * @param {(url: string) => Promise<undefined>} options.executorCreator A + * @param {(url: string) => Promise<undefined>} [options.executorCreator] A * function that takes a URL and causes the browser to navigate some - * window to that URL, e.g. via an iframe or a new window. + * window to that URL, e.g. via an iframe or a new window. If this is + * not supplied, then the returned RemoteContextWrapper won't actually + * be communicating with something yet, and something will need to + * navigate to it using its `url` property, before communication can be + * established. * @param {RemoteContextConfig|object} [options.extraConfig] If supplied, * extra configuration for this remote context to be merged with * `this`'s existing config. If it's not a `RemoteContextConfig`, it @@ -216,7 +220,10 @@ url.searchParams.append('startOn', config.startOn); } - await executorCreator(url.href); + if (executorCreator) { + await executorCreator(url.href); + } + return new RemoteContextWrapper(new RemoteContext(uuid), this, url.href); } @@ -237,15 +244,6 @@ extraConfig, }); } - - async createContextWithUrl(extraConfig) { - let saveUrl; - let wrapper = await this.createContext({ - executorCreator: (url) => {saveUrl = url}, - extraConfig, - }); - return [wrapper, saveUrl]; - } } // Export this class. self.RemoteContextHelper = RemoteContextHelper; @@ -314,9 +312,10 @@ * This should only be constructed by `RemoteContextHelper`. * @private */ - constructor(context, helper) { + constructor(context, helper, url) { this.context = context; this.helper = helper; + this.url = url; } /** diff --git a/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html new file mode 100644 index 00000000000..b19eced8917 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontStretch.settings.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.text.drawing.style.fontStretch.settings</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.text.drawing.style.fontStretch.settings</h1> +<p class="desc">Testing value setting of fontStretch in Canvas</p> + + +<p class="output">Actual output:</p> +<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> + +<ul id="d"></ul> +<script> +var t = async_test("Testing value setting of fontStretch in Canvas"); +_addTest(function(canvas, ctx) { + + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + _assertSame(ctx.fontStretch, "ultra-condensed", "ctx.fontStretch", "\"ultra-condensed\""); + + ctx.fontStretch = "extra-condensed"; + _assertSame(ctx.fontStretch, "extra-condensed", "ctx.fontStretch", "\"extra-condensed\""); + + ctx.fontStretch = "condensed"; + _assertSame(ctx.fontStretch, "condensed", "ctx.fontStretch", "\"condensed\""); + + ctx.fontStretch = "semi-condensed"; + _assertSame(ctx.fontStretch, "semi-condensed", "ctx.fontStretch", "\"semi-condensed\""); + + ctx.fontStretch = "normal"; + _assertSame(ctx.fontStretch, "normal", "ctx.fontStretch", "\"normal\""); + + ctx.fontStretch = "semi-expanded"; + _assertSame(ctx.fontStretch, "semi-expanded", "ctx.fontStretch", "\"semi-expanded\""); + + ctx.fontStretch = "expanded"; + _assertSame(ctx.fontStretch, "expanded", "ctx.fontStretch", "\"expanded\""); + + ctx.fontStretch = "extra-expanded"; + _assertSame(ctx.fontStretch, "extra-expanded", "ctx.fontStretch", "\"extra-expanded\""); + + ctx.fontStretch = "ultra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Extra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "cOndensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Semi-Condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "normaL"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "semi-Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "eXtra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "abcd"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + +}); +</script> + diff --git a/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html index 03b35dfaa9d..dee856842ae 100644 --- a/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html +++ b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html @@ -19,37 +19,61 @@ var t = async_test("Testing basic functionalities of textRendering in Canvas"); _addTest(function(canvas, ctx) { - // Setting textRendering with lower cases + // Setting textRendering with correct case. _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - ctx.textRendering = "auto"; - _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - - ctx.textRendering = "optimizespeed"; + ctx.textRendering = "optimizeSpeed"; _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); - ctx.textRendering = "optimizelegibility"; + ctx.textRendering = "optimizeLegibility"; _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); - ctx.textRendering = "geometricprecision"; + ctx.textRendering = "geometricPrecision"; _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); - // Setting textRendering with lower cases and upper cases word. - ctx.textRendering = "aUto"; + ctx.textRendering = "auto"; _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with incorrect case is ignored. ctx.textRendering = "OPtimizeSpeed"; - _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "OPtimizELEgibility"; - _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "GeometricPrecision"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizeLegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "AUTO"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "Auto"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); // Setting textRendering with non-existing font variant. ctx.textRendering = "abcd"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "normal"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = ""; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); }); </script> diff --git a/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html index 95fac522d94..f5d14923961 100644 --- a/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html +++ b/tests/wpt/tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html @@ -30,17 +30,17 @@ _addTest(function(canvas, ctx) { var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); document.fonts.add(f); document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { + step_timeout(t.step_func_done(function () { ctx.font = '50px CanvasTest'; ctx.direction = 'ltr'; ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + _assertSame(Math.abs(ctx.measureText('A').alphabeticBaseline), 0, "Math.abs(ctx.measureText('A').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('A').ideographicBaseline, 6.25, "ctx.measureText('A').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('A').hangingBaseline, 25, "ctx.measureText('A').hangingBaseline", "25"); - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + _assertSame(Math.abs(ctx.measureText('ABCD').alphabeticBaseline), 0, "Math.abs(ctx.measureText('ABCD').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('ABCD').ideographicBaseline, 6.25, "ctx.measureText('ABCD').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('ABCD').hangingBaseline, 25, "ctx.measureText('ABCD').hangingBaseline", "25"); }), 500); }); diff --git a/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html b/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html index 3ad15f31501..7b3a0a9373b 100644 --- a/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html +++ b/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html @@ -33,7 +33,7 @@ _addTest(function(canvas, ctx) { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, -30); + ctx.fillText('CC', 0, 12.5); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html b/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html index 8d402223a4f..8da9aabb942 100644 --- a/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html +++ b/tests/wpt/tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html @@ -33,7 +33,7 @@ _addTest(function(canvas, ctx) { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 81.25); + ctx.fillText('CC', 0, 31.25); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html index 0bd15ff0068..0b822834328 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html @@ -30,7 +30,7 @@ t.step(function() { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, -30); + ctx.fillText('CC', 0, 12.5); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js index 4a5ced7b38f..fca74d69381 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js @@ -26,7 +26,7 @@ t.step(function() { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, -30); + ctx.fillText('CC', 0, 12.5); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html index 3a1d6e5159c..c996444b860 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html @@ -30,7 +30,7 @@ t.step(function() { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 81.25); + ctx.fillText('CC', 0, 31.25); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js index b39c10b74f0..0ffa6fe299a 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js @@ -26,7 +26,7 @@ t.step(function() { ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 81.25); + ctx.fillText('CC', 0, 31.25); _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html new file mode 100644 index 00000000000..95405a18a56 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>OffscreenCanvas test: 2d.text.drawing.style.fontStretch.settings</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/html/canvas/resources/canvas-tests.js"></script> + +<h1>2d.text.drawing.style.fontStretch.settings</h1> +<p class="desc">Testing value setting of fontStretch in Canvas</p> + + +<script> +var t = async_test("Testing value setting of fontStretch in Canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + _assertSame(ctx.fontStretch, "ultra-condensed", "ctx.fontStretch", "\"ultra-condensed\""); + + ctx.fontStretch = "extra-condensed"; + _assertSame(ctx.fontStretch, "extra-condensed", "ctx.fontStretch", "\"extra-condensed\""); + + ctx.fontStretch = "condensed"; + _assertSame(ctx.fontStretch, "condensed", "ctx.fontStretch", "\"condensed\""); + + ctx.fontStretch = "semi-condensed"; + _assertSame(ctx.fontStretch, "semi-condensed", "ctx.fontStretch", "\"semi-condensed\""); + + ctx.fontStretch = "normal"; + _assertSame(ctx.fontStretch, "normal", "ctx.fontStretch", "\"normal\""); + + ctx.fontStretch = "semi-expanded"; + _assertSame(ctx.fontStretch, "semi-expanded", "ctx.fontStretch", "\"semi-expanded\""); + + ctx.fontStretch = "expanded"; + _assertSame(ctx.fontStretch, "expanded", "ctx.fontStretch", "\"expanded\""); + + ctx.fontStretch = "extra-expanded"; + _assertSame(ctx.fontStretch, "extra-expanded", "ctx.fontStretch", "\"extra-expanded\""); + + ctx.fontStretch = "ultra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Extra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "cOndensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Semi-Condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "normaL"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "semi-Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "eXtra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "abcd"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + t.done(); + +}); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js new file mode 100644 index 00000000000..ff10a742b58 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.fontStretch.settings.worker.js @@ -0,0 +1,77 @@ +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:2d.text.drawing.style.fontStretch.settings +// Description:Testing value setting of fontStretch in Canvas +// Note: + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +var t = async_test("Testing value setting of fontStretch in Canvas"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { + + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + _assertSame(ctx.fontStretch, "ultra-condensed", "ctx.fontStretch", "\"ultra-condensed\""); + + ctx.fontStretch = "extra-condensed"; + _assertSame(ctx.fontStretch, "extra-condensed", "ctx.fontStretch", "\"extra-condensed\""); + + ctx.fontStretch = "condensed"; + _assertSame(ctx.fontStretch, "condensed", "ctx.fontStretch", "\"condensed\""); + + ctx.fontStretch = "semi-condensed"; + _assertSame(ctx.fontStretch, "semi-condensed", "ctx.fontStretch", "\"semi-condensed\""); + + ctx.fontStretch = "normal"; + _assertSame(ctx.fontStretch, "normal", "ctx.fontStretch", "\"normal\""); + + ctx.fontStretch = "semi-expanded"; + _assertSame(ctx.fontStretch, "semi-expanded", "ctx.fontStretch", "\"semi-expanded\""); + + ctx.fontStretch = "expanded"; + _assertSame(ctx.fontStretch, "expanded", "ctx.fontStretch", "\"expanded\""); + + ctx.fontStretch = "extra-expanded"; + _assertSame(ctx.fontStretch, "extra-expanded", "ctx.fontStretch", "\"extra-expanded\""); + + ctx.fontStretch = "ultra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Extra-condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "cOndensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Semi-Condensed"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "normaL"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "semi-Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "Expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "eXtra-expanded"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + + ctx.fontStretch = "abcd"; + _assertSame(ctx.fontStretch, "ultra-expanded", "ctx.fontStretch", "\"ultra-expanded\""); + t.done(); +}); +done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html index 47094dc91fa..3fc07d54788 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html @@ -20,37 +20,62 @@ t.step(function() { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); - // Setting textRendering with lower cases + // Setting textRendering with correct case. _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - ctx.textRendering = "auto"; - _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - - ctx.textRendering = "optimizespeed"; + ctx.textRendering = "optimizeSpeed"; _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); - ctx.textRendering = "optimizelegibility"; + ctx.textRendering = "optimizeLegibility"; _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); - ctx.textRendering = "geometricprecision"; + ctx.textRendering = "geometricPrecision"; _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); - // Setting textRendering with lower cases and upper cases word. - ctx.textRendering = "aUto"; + ctx.textRendering = "auto"; _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with incorrect case is ignored. ctx.textRendering = "OPtimizeSpeed"; - _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "OPtimizELEgibility"; - _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "GeometricPrecision"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizeLegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "AUTO"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "Auto"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); // Setting textRendering with non-existing font variant. ctx.textRendering = "abcd"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "normal"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = ""; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + t.done(); }); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js index ca5741de954..c37f2e342f2 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js @@ -16,37 +16,62 @@ t.step(function() { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); - // Setting textRendering with lower cases + // Setting textRendering with correct case. _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - ctx.textRendering = "auto"; - _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); - - ctx.textRendering = "optimizespeed"; + ctx.textRendering = "optimizeSpeed"; _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); - ctx.textRendering = "optimizelegibility"; + ctx.textRendering = "optimizeLegibility"; _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); - ctx.textRendering = "geometricprecision"; + ctx.textRendering = "geometricPrecision"; _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); - // Setting textRendering with lower cases and upper cases word. - ctx.textRendering = "aUto"; + ctx.textRendering = "auto"; _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with incorrect case is ignored. ctx.textRendering = "OPtimizeSpeed"; - _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "OPtimizELEgibility"; - _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); ctx.textRendering = "GeometricPrecision"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + + ctx.textRendering = "optimizeLegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "AUTO"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "Auto"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); // Setting textRendering with non-existing font variant. ctx.textRendering = "abcd"; - _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "normal"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = ""; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + t.done(); }); done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html index e58f9be455b..09fd0f40822 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.html @@ -25,16 +25,16 @@ t.step(function() { f.load(); fonts.add(f); fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').alphabeticBaseline), 0, "Math.abs(ctx.measureText('A').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('A').ideographicBaseline, 6.25, "ctx.measureText('A').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('A').hangingBaseline, 25, "ctx.measureText('A').hangingBaseline", "25"); - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + _assertSame(Math.abs(ctx.measureText('ABCD').alphabeticBaseline), 0, "Math.abs(ctx.measureText('ABCD').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('ABCD').ideographicBaseline, 6.25, "ctx.measureText('ABCD').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('ABCD').hangingBaseline, 25, "ctx.measureText('ABCD').hangingBaseline", "25"); }).then(t_pass, t_fail); }); diff --git a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js index 6f157f4e653..c6288a569da 100644 --- a/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js +++ b/tests/wpt/tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js @@ -21,16 +21,16 @@ t.step(function() { f.load(); fonts.add(f); fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').alphabeticBaseline), 0, "Math.abs(ctx.measureText('A').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('A').ideographicBaseline, 6.25, "ctx.measureText('A').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('A').hangingBaseline, 25, "ctx.measureText('A').hangingBaseline", "25"); - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + _assertSame(Math.abs(ctx.measureText('ABCD').alphabeticBaseline), 0, "Math.abs(ctx.measureText('ABCD').alphabeticBaseline)", "0"); + _assertSame(ctx.measureText('ABCD').ideographicBaseline, 6.25, "ctx.measureText('ABCD').ideographicBaseline", "6.25"); + _assertSame(ctx.measureText('ABCD').hangingBaseline, 25, "ctx.measureText('ABCD').hangingBaseline", "25"); }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml b/tests/wpt/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml index 7c3df028ac7..5d050477af1 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml/element/drawing-text-to-the-canvas.yaml @@ -655,17 +655,17 @@ var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); document.fonts.add(f); document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { + step_timeout(t.step_func_done(function () { ctx.font = '50px CanvasTest'; ctx.direction = 'ltr'; ctx.align = 'left' - @assert Math.abs(ctx.measureText('A').getBaselines().alphabetic) === 0; - @assert ctx.measureText('A').getBaselines().ideographic === -39; - @assert ctx.measureText('A').getBaselines().hanging === 68; + @assert Math.abs(ctx.measureText('A').alphabeticBaseline) === 0; + @assert ctx.measureText('A').ideographicBaseline === 6.25; + @assert ctx.measureText('A').hangingBaseline === 25; - @assert Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic) === 0; - @assert ctx.measureText('ABCD').getBaselines().ideographic === -39; - @assert ctx.measureText('ABCD').getBaselines().hanging === 68; + @assert Math.abs(ctx.measureText('ABCD').alphabeticBaseline) === 0; + @assert ctx.measureText('ABCD').ideographicBaseline === 6.25; + @assert ctx.measureText('ABCD').hangingBaseline === 25; }), 500); }); @@ -958,36 +958,120 @@ - name: 2d.text.drawing.style.textRendering.settings desc: Testing basic functionalities of textRendering in Canvas code: | - // Setting textRendering with lower cases - @assert ctx.textRendering === "auto"; - - ctx.textRendering = "auto"; + // Setting textRendering with correct case. @assert ctx.textRendering === "auto"; - ctx.textRendering = "optimizespeed"; + ctx.textRendering = "optimizeSpeed"; @assert ctx.textRendering === "optimizeSpeed"; - ctx.textRendering = "optimizelegibility"; + ctx.textRendering = "optimizeLegibility"; @assert ctx.textRendering === "optimizeLegibility"; - ctx.textRendering = "geometricprecision"; + ctx.textRendering = "geometricPrecision"; @assert ctx.textRendering === "geometricPrecision"; - // Setting textRendering with lower cases and upper cases word. - ctx.textRendering = "aUto"; + ctx.textRendering = "auto"; @assert ctx.textRendering === "auto"; + // Setting textRendering with incorrect case is ignored. ctx.textRendering = "OPtimizeSpeed"; - @assert ctx.textRendering === "optimizeSpeed"; + @assert ctx.textRendering === "auto"; ctx.textRendering = "OPtimizELEgibility"; - @assert ctx.textRendering === "optimizeLegibility"; + @assert ctx.textRendering === "auto"; ctx.textRendering = "GeometricPrecision"; - @assert ctx.textRendering === "geometricPrecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizespeed"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizelegibility"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "geometricprecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizeLegibility"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "AUTO"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "Auto"; + @assert ctx.textRendering === "optimizeLegibility"; // Setting textRendering with non-existing font variant. ctx.textRendering = "abcd"; - @assert ctx.textRendering === "geometricPrecision"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "normal"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = ""; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "auto"; + @assert ctx.textRendering === "auto"; + +- name: 2d.text.drawing.style.fontStretch.settings + desc: Testing value setting of fontStretch in Canvas + code: | + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + @assert ctx.fontStretch === "ultra-condensed"; + + ctx.fontStretch = "extra-condensed"; + @assert ctx.fontStretch === "extra-condensed"; + + ctx.fontStretch = "condensed"; + @assert ctx.fontStretch === "condensed"; + + ctx.fontStretch = "semi-condensed"; + @assert ctx.fontStretch === "semi-condensed"; + + ctx.fontStretch = "normal"; + @assert ctx.fontStretch === "normal"; + + ctx.fontStretch = "semi-expanded"; + @assert ctx.fontStretch === "semi-expanded"; + + ctx.fontStretch = "expanded"; + @assert ctx.fontStretch === "expanded"; + + ctx.fontStretch = "extra-expanded"; + @assert ctx.fontStretch === "extra-expanded"; + + ctx.fontStretch = "ultra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Extra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "cOndensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Semi-Condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "normaL"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "semi-Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "eXtra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "abcd"; + @assert ctx.fontStretch === "ultra-expanded"; # TODO: shadows, alpha, composite, clip diff --git a/tests/wpt/tests/html/canvas/tools/yaml/element/text-styles.yaml b/tests/wpt/tests/html/canvas/tools/yaml/element/text-styles.yaml index 76149894b6c..ee319c4fef1 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml/element/text-styles.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml/element/text-styles.yaml @@ -301,7 +301,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 81.25); + ctx.fillText('CC', 0, 31.25); @assert pixel 5,5 ==~ 0,255,0,255; @assert pixel 95,5 ==~ 0,255,0,255; @assert pixel 25,25 ==~ 0,255,0,255; @@ -322,7 +322,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, -30); + ctx.fillText('CC', 0, 12.5); @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo @assert pixel 25,25 ==~ 0,255,0,255; diff --git a/tests/wpt/tests/html/canvas/tools/yaml/offscreen/text.yaml b/tests/wpt/tests/html/canvas/tools/yaml/offscreen/text.yaml index 80818bc29cf..b66ae4f8206 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml/offscreen/text.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml/offscreen/text.yaml @@ -620,7 +620,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 81.25); + ctx.fillText('CC', 0, 31.25); @assert pixel 5,5 ==~ 0,255,0,255; @assert pixel 95,5 ==~ 0,255,0,255; @assert pixel 25,25 ==~ 0,255,0,255; @@ -644,7 +644,7 @@ ctx.fillRect(0, 0, 100, 50); ctx.fillStyle = '#0f0'; ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, -30); + ctx.fillText('CC', 0, 12.5); @assert pixel 5,5 ==~ 0,255,0,255; @moz-todo @assert pixel 95,5 ==~ 0,255,0,255; @moz-todo @assert pixel 25,25 ==~ 0,255,0,255; @@ -1125,16 +1125,16 @@ f.load(); fonts.add(f); fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - @assert Math.abs(ctx.measureText('A').getBaselines().alphabetic) === 0; - @assert ctx.measureText('A').getBaselines().ideographic === -39; - @assert ctx.measureText('A').getBaselines().hanging === 68; - - @assert Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic) === 0; - @assert ctx.measureText('ABCD').getBaselines().ideographic === -39; - @assert ctx.measureText('ABCD').getBaselines().hanging === 68; + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + @assert Math.abs(ctx.measureText('A').alphabeticBaseline) === 0; + @assert ctx.measureText('A').ideographicBaseline === 6.25; + @assert ctx.measureText('A').hangingBaseline === 25; + + @assert Math.abs(ctx.measureText('ABCD').alphabeticBaseline) === 0; + @assert ctx.measureText('ABCD').ideographicBaseline === 6.25; + @assert ctx.measureText('ABCD').hangingBaseline === 25; }).then(t_pass, t_fail); - name: 2d.text.drawing.style.absolute.spacing @@ -1496,37 +1496,123 @@ - name: 2d.text.drawing.style.textRendering.settings desc: Testing basic functionalities of textRendering in Canvas code: | - // Setting textRendering with lower cases - @assert ctx.textRendering === "auto"; - - ctx.textRendering = "auto"; + // Setting textRendering with correct case. @assert ctx.textRendering === "auto"; - ctx.textRendering = "optimizespeed"; + ctx.textRendering = "optimizeSpeed"; @assert ctx.textRendering === "optimizeSpeed"; - ctx.textRendering = "optimizelegibility"; + ctx.textRendering = "optimizeLegibility"; @assert ctx.textRendering === "optimizeLegibility"; - ctx.textRendering = "geometricprecision"; + ctx.textRendering = "geometricPrecision"; @assert ctx.textRendering === "geometricPrecision"; - // Setting textRendering with lower cases and upper cases word. - ctx.textRendering = "aUto"; + ctx.textRendering = "auto"; @assert ctx.textRendering === "auto"; + // Setting textRendering with incorrect case is ignored. ctx.textRendering = "OPtimizeSpeed"; - @assert ctx.textRendering === "optimizeSpeed"; + @assert ctx.textRendering === "auto"; ctx.textRendering = "OPtimizELEgibility"; - @assert ctx.textRendering === "optimizeLegibility"; + @assert ctx.textRendering === "auto"; ctx.textRendering = "GeometricPrecision"; - @assert ctx.textRendering === "geometricPrecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizespeed"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizelegibility"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "geometricprecision"; + @assert ctx.textRendering === "auto"; + + ctx.textRendering = "optimizeLegibility"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "AUTO"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "Auto"; + @assert ctx.textRendering === "optimizeLegibility"; // Setting textRendering with non-existing font variant. ctx.textRendering = "abcd"; - @assert ctx.textRendering === "geometricPrecision"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "normal"; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = ""; + @assert ctx.textRendering === "optimizeLegibility"; + + ctx.textRendering = "auto"; + @assert ctx.textRendering === "auto"; + + t.done(); + +- name: 2d.text.drawing.style.fontStretch.settings + desc: Testing value setting of fontStretch in Canvas + code: | + // Setting textRendering with lower cases + ctx.fontStretch = "ultra-condensed"; + @assert ctx.fontStretch === "ultra-condensed"; + + ctx.fontStretch = "extra-condensed"; + @assert ctx.fontStretch === "extra-condensed"; + + ctx.fontStretch = "condensed"; + @assert ctx.fontStretch === "condensed"; + + ctx.fontStretch = "semi-condensed"; + @assert ctx.fontStretch === "semi-condensed"; + + ctx.fontStretch = "normal"; + @assert ctx.fontStretch === "normal"; + + ctx.fontStretch = "semi-expanded"; + @assert ctx.fontStretch === "semi-expanded"; + + ctx.fontStretch = "expanded"; + @assert ctx.fontStretch === "expanded"; + + ctx.fontStretch = "extra-expanded"; + @assert ctx.fontStretch === "extra-expanded"; + + ctx.fontStretch = "ultra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + // Setting fontStretch with lower cases and upper cases word, + // these values should be ignored. + ctx.fontStretch = "ulTra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Extra-condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "cOndensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Semi-Condensed"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "normaL"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "semi-Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "Expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "eXtra-expanded"; + @assert ctx.fontStretch === "ultra-expanded"; + + ctx.fontStretch = "abcd"; + @assert ctx.fontStretch === "ultra-expanded"; t.done(); - name: 2d.text.drawing.style.measure.rtl.text diff --git a/tests/wpt/tests/html/semantics/popovers/popover-focus-2.html b/tests/wpt/tests/html/semantics/popovers/popover-focus-2.html index be6923e604a..2fa1b7a23de 100644 --- a/tests/wpt/tests/html/semantics/popovers/popover-focus-2.html +++ b/tests/wpt/tests/html/semantics/popovers/popover-focus-2.html @@ -96,7 +96,7 @@ promise_test(async t => { <button id=circular2 popovertarget=popover4 popovertargetaction=show tabindex="0"></button> <button id=circular3 popovertarget=popover4 tabindex="0"></button> </div> -<button id=circular4>after</button> +<button id=circular4 tabindex="0">after</button> <script> promise_test(async t => { circular0.focus(); diff --git a/tests/wpt/tests/html/semantics/selectors/pseudo-classes/disabled.html b/tests/wpt/tests/html/semantics/selectors/pseudo-classes/disabled.html index 8808675eb69..142a12dd122 100644 --- a/tests/wpt/tests/html/semantics/selectors/pseudo-classes/disabled.html +++ b/tests/wpt/tests/html/semantics/selectors/pseudo-classes/disabled.html @@ -57,4 +57,24 @@ var input = document.createElement("input"); input.setAttribute("disabled", "disabled"); testSelectorIdsMatch(":disabled", ["button1", "input2", "select2", "optgroup2", "option2", "textarea2", "fieldset2", "clubname", "clubnum"], "':disabled' should not match elements not in the document"); + + var fieldset = document.createElement("fieldset"); + fieldset.id = "fieldset_nested"; + fieldset.innerHTML = ` + <input id=input_nested> + <button id=button_nested>button nested</button> + <select id=select_nested> + <optgroup label="options" id=optgroup_nested> + <option value="options" id=option_nested>option nested</option> + </optgroup> + </select> + <textarea id=textarea_nested>textarea nested</textarea> + <object id=object_nested></object> + <output id=output_nested></output> + <fieldset id=fieldset_nested2> + <input id=input_nested2> + </fieldset> + `; + document.getElementById("fieldset2").appendChild(fieldset); + testSelectorIdsMatch("#fieldset2 :disabled", ["clubname", "clubnum", "fieldset_nested", "input_nested", "button_nested", "select_nested", "textarea_nested", "fieldset_nested2", "input_nested2"], "':disabled' should match elements that are appended to a disabled fieldset dynamically"); </script> diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEventProperties.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEventProperties.html.ini index d808b1793cf..f3a973c0f50 100644 --- a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEventProperties.html.ini +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEventProperties.html.ini @@ -1,6 +1,4 @@ [penPointerEventProperties.html] - expected: - if product == "firefox": ERROR [TestDriver actions: pointerevent properties of pen type] expected: if product == "safari" or product == "firefox": FAIL diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEvents.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEvents.html.ini index 39e05a8f090..d66b8470ea4 100644 --- a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEvents.html.ini +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/actions/penPointerEvents.html.ini @@ -1,6 +1,4 @@ [penPointerEvents.html] - expected: - if product == "firefox": ERROR [TestDriver actions: pointerevent properties of pen type] expected: - if product == "safari": FAIL + if product == "safari" or product == "firefox": FAIL diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEventProperties.html b/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEventProperties.html index ba6c15f0225..05f85d299e9 100644 --- a/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEventProperties.html +++ b/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEventProperties.html @@ -27,7 +27,7 @@ let pointerDownEvent; let pointerMoveEvent; let receivedPointerDown = false; -async_test(t => { +promise_test(async t => { let test = document.getElementById("test"); var eventList = ['pointermove', 'pointerdown']; for (eventType of eventList) { @@ -42,30 +42,29 @@ async_test(t => { } let div = document.getElementById("test"); - let actions = new test_driver.Actions() + await new test_driver.Actions() .addPointer("penPointer1", "pen") .pointerMove(0, 0, {origin: test}) .pointerDown({pressure:0.36, tiltX:-72, tiltY:9, twist:86}) .pointerMove(15, 0, {origin: test}) .pointerUp() - .send() - .then(t.step_func_done(() => { - assert_equals(pointerDownEvent.type, "pointerdown"); - assert_equals(pointerDownEvent.pointerType, "pen"); - assert_equals(pointerDownEvent.width, 1); - assert_equals(pointerDownEvent.height, 1); - assert_equals(Math.round(pointerDownEvent.pressure * 100) / 100, 0.36); - assert_equals(pointerDownEvent.tiltX, -72); - assert_equals(pointerDownEvent.tiltY, 9); - assert_equals(pointerDownEvent.twist, 86); - assert_equals(pointerMoveEvent.type, "pointermove"); - assert_equals(pointerMoveEvent.pointerType, "pen"); - assert_equals(pointerMoveEvent.width, 1); - assert_equals(pointerMoveEvent.height, 1); - assert_equals(Math.round(pointerMoveEvent.pressure * 100) / 100, 0.5); - assert_equals(pointerMoveEvent.tiltX, 0); - assert_equals(pointerMoveEvent.tiltY, 0); - assert_equals(pointerMoveEvent.twist, 0); - })).catch(e => t.step_func(() => assert_unreached("Actions sequence failed " + e))); + .send(); + + assert_equals(pointerDownEvent.type, "pointerdown"); + assert_equals(pointerDownEvent.pointerType, "pen"); + assert_equals(pointerDownEvent.width, 1); + assert_equals(pointerDownEvent.height, 1); + assert_equals(Math.round(pointerDownEvent.pressure * 100) / 100, 0.36); + assert_equals(pointerDownEvent.tiltX, -72); + assert_equals(pointerDownEvent.tiltY, 9); + assert_equals(pointerDownEvent.twist, 86); + assert_equals(pointerMoveEvent.type, "pointermove"); + assert_equals(pointerMoveEvent.pointerType, "pen"); + assert_equals(pointerMoveEvent.width, 1); + assert_equals(pointerMoveEvent.height, 1); + assert_equals(Math.round(pointerMoveEvent.pressure * 100) / 100, 0.5); + assert_equals(pointerMoveEvent.tiltX, 0); + assert_equals(pointerMoveEvent.tiltY, 0); + assert_equals(pointerMoveEvent.twist, 0); }); </script> diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEvents.html b/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEvents.html index 7141fb56556..f885ad501a2 100644 --- a/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEvents.html +++ b/tests/wpt/tests/infrastructure/testdriver/actions/penPointerEvents.html @@ -26,7 +26,7 @@ div#test { <script> let eventList = []; -async_test(t => { +promise_test(async t => { let test = document.getElementById("test"); [ 'pointerover', 'pointerenter', 'pointermove', 'pointerdown', 'pointerup', @@ -56,104 +56,103 @@ async_test(t => { .pointerDown() .pointerMove(30, 0, {origin: test}) .pointerUp() - .pointerMove(0, 0) - .send() - .then(t.step_func_done(() => { - const expectedEvents = [ - { - type: 'pointerover', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE - }, - { - type: 'pointerenter', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE - }, - { type: 'pointermove', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE, - clientX: 10, - clientY: 10 - }, - { - type: 'pointerdown', - button: ButtonChange.PEN_CONTACT, - buttons: ButtonsBitfield.PEN_CONTACT, - clientX: 10, - clientY: 10 - }, - { - type: 'pointermove', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.PEN_CONTACT, - clientX: 55, - clientY: 55 - }, - { - type: 'pointerup', - button: ButtonChange.PEN_CONTACT, - buttons: ButtonsBitfield.NONE, - clientX: 55, - clientY: 55 - }, - { - type: 'pointermove', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE, - clientX: 70, - clientY: 55 - }, - { - type: 'pointerdown', - button: ButtonChange.PEN_CONTACT, - buttons: ButtonsBitfield.PEN_CONTACT, - clientX: 70, - clientY: 55 - }, - { - type: 'pointermove', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.PEN_CONTACT, - clientX: 85, - clientY: 55 - }, - { - type: 'pointerup', - button: ButtonChange.PEN_CONTACT, - buttons: ButtonsBitfield.NONE, - clientX: 85, - clientY: 55 - }, - { - type: 'pointerout', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE, - clientX: 0, - clientY: 0 - }, - { - type: 'pointerleave', - button: ButtonChange.NONE, - buttons: ButtonsBitfield.NONE, - clientX: 0, - clientY: 0 - }, - ]; + .pointerMove(0, 0); + await actions.send() + + const expectedEvents = [ + { + type: 'pointerover', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE + }, + { + type: 'pointerenter', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE + }, + { type: 'pointermove', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE, + clientX: 10, + clientY: 10 + }, + { + type: 'pointerdown', + button: ButtonChange.PEN_CONTACT, + buttons: ButtonsBitfield.PEN_CONTACT, + clientX: 10, + clientY: 10 + }, + { + type: 'pointermove', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.PEN_CONTACT, + clientX: 55, + clientY: 55 + }, + { + type: 'pointerup', + button: ButtonChange.PEN_CONTACT, + buttons: ButtonsBitfield.NONE, + clientX: 55, + clientY: 55 + }, + { + type: 'pointermove', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE, + clientX: 70, + clientY: 55 + }, + { + type: 'pointerdown', + button: ButtonChange.PEN_CONTACT, + buttons: ButtonsBitfield.PEN_CONTACT, + clientX: 70, + clientY: 55 + }, + { + type: 'pointermove', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.PEN_CONTACT, + clientX: 85, + clientY: 55 + }, + { + type: 'pointerup', + button: ButtonChange.PEN_CONTACT, + buttons: ButtonsBitfield.NONE, + clientX: 85, + clientY: 55 + }, + { + type: 'pointerout', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE, + clientX: 0, + clientY: 0 + }, + { + type: 'pointerleave', + button: ButtonChange.NONE, + buttons: ButtonsBitfield.NONE, + clientX: 0, + clientY: 0 + }, + ]; - for (let i = 0; i < expectedEvents.length; i++) { - const expectedValue = expectedEvents[i]; - const actualValue = eventList[i]; - assert_true(!!actualValue, `Missing $[i}-th event`); - assert_equals(actualValue.pointerType, 'pen', 'Unexpected pointer type'); - for (key in expectedValue) { - assert_equals(actualValue[key], expectedValue[key], - `Mismatch in event[${i}].${key}`); - } + for (let i = 0; i < expectedEvents.length; i++) { + const expectedValue = expectedEvents[i]; + const actualValue = eventList[i]; + assert_true(!!actualValue, `Missing $[i}-th event`); + assert_equals(actualValue.pointerType, 'pen', 'Unexpected pointer type'); + for (key in expectedValue) { + assert_equals(actualValue[key], expectedValue[key], + `Mismatch in event[${i}].${key}`); } + } - assert_equals(eventList.length, expectedEvents.length, - 'Unexpected number of events'); - })).catch(e => t.step_func(() => assert_unreached("Actions sequence failed " + e))); + assert_equals(eventList.length, expectedEvents.length, + 'Unexpected number of events'); }); </script> diff --git a/tests/wpt/tests/interfaces/screen-capture-mouse-events.tentative.idl b/tests/wpt/tests/interfaces/screen-capture-mouse-events.tentative.idl new file mode 100644 index 00000000000..7b081cd9fd8 --- /dev/null +++ b/tests/wpt/tests/interfaces/screen-capture-mouse-events.tentative.idl @@ -0,0 +1,25 @@ +// https://screen-share.github.io/mouse-events/ + +enum CaptureStartFocusBehavior { + "focus-captured-surface", + "no-focus-change" +}; + +[Exposed=Window, SecureContext] +interface CaptureController : EventTarget { + constructor(); + undefined setFocusBehavior(CaptureStartFocusBehavior focusBehavior); + attribute EventHandler oncapturedmousechange; +}; + +[Exposed=Window] +interface CapturedMouseEvent : Event { + constructor(DOMString type, optional CapturedMouseEventInit eventInitDict = {}); + readonly attribute long surfaceX; + readonly attribute long surfaceY; +}; + +dictionary CapturedMouseEventInit : EventInit { + long surfaceX = -1; + long surfaceY = -1; +}; diff --git a/tests/wpt/tests/interfaces/screen-capture.idl b/tests/wpt/tests/interfaces/screen-capture.idl index 9abd4d2c1ad..830b96d16fa 100644 --- a/tests/wpt/tests/interfaces/screen-capture.idl +++ b/tests/wpt/tests/interfaces/screen-capture.idl @@ -13,7 +13,7 @@ enum CaptureStartFocusBehavior { }; [Exposed=Window, SecureContext] -interface CaptureController { +interface CaptureController : EventTarget { constructor(); undefined setFocusBehavior(CaptureStartFocusBehavior focusBehavior); }; diff --git a/tests/wpt/tests/loading/early-hints/modulepreload-as-worker-cross-origin.h2.window.js b/tests/wpt/tests/loading/early-hints/modulepreload-as-worker-cross-origin.h2.window.js new file mode 100644 index 00000000000..3756d7f7fa2 --- /dev/null +++ b/tests/wpt/tests/loading/early-hints/modulepreload-as-worker-cross-origin.h2.window.js @@ -0,0 +1,15 @@ +// META: script=/common/utils.js +// META: script=resources/early-hints-helpers.sub.js + +// see modulepreload-in-early-hints.h2.window.js for params explanation +test(() => { + const params = new URLSearchParams(); + params.set("description", + 'Modulepreload should not load with as="worker" from cross-origin url'); + params.set("resource-url", + CROSS_ORIGIN_RESOURCES_URL + "/empty.js?" + token()); + params.set("as", "worker"); + params.set("should-preload", false); + const test_url = "resources/modulepreload-in-early-hints.h2.py?" + params.toString(); + window.location.replace(new URL(test_url, window.location)); +}); diff --git a/tests/wpt/tests/loading/early-hints/modulepreload-as-worker.h2.window.js b/tests/wpt/tests/loading/early-hints/modulepreload-as-worker.h2.window.js new file mode 100644 index 00000000000..2fd36dfbf3d --- /dev/null +++ b/tests/wpt/tests/loading/early-hints/modulepreload-as-worker.h2.window.js @@ -0,0 +1,15 @@ +// META: script=/common/utils.js +// META: script=resources/early-hints-helpers.sub.js + +// see modulepreload-in-early-hints.h2.window.js for params explanation +test(() => { + const params = new URLSearchParams(); + params.set("description", + 'Modulepreload should load with as="worker" from same-origin url'); + params.set("resource-url", + SAME_ORIGIN_RESOURCES_URL + "/empty.js?" + token()); + params.set("as", "worker"); + params.set("should-preload", true); + const test_url = "resources/modulepreload-in-early-hints.h2.py?" + params.toString(); + window.location.replace(new URL(test_url, window.location)); +}); diff --git a/tests/wpt/tests/loading/early-hints/modulepreload-cross-origin.h2.window.js b/tests/wpt/tests/loading/early-hints/modulepreload-cross-origin.h2.window.js new file mode 100644 index 00000000000..3499b4d60d0 --- /dev/null +++ b/tests/wpt/tests/loading/early-hints/modulepreload-cross-origin.h2.window.js @@ -0,0 +1,13 @@ +// META: script=/common/utils.js +// META: script=resources/early-hints-helpers.sub.js + +// see modulepreload-in-early-hints.h2.window.js for params explanation +test(() => { + const params = new URLSearchParams(); + params.set("description", "Modulepreload works in early hints from cross-origin url"); + params.set("resource-url", + CROSS_ORIGIN_RESOURCES_URL + "/empty.js?" + token()); + params.set("should-preload", true); + const test_url = "resources/modulepreload-in-early-hints.h2.py?" + params.toString(); + window.location.replace(new URL(test_url, window.location)); +}); diff --git a/tests/wpt/tests/loading/early-hints/modulepreload-in-early-hints.h2.window.js b/tests/wpt/tests/loading/early-hints/modulepreload-in-early-hints.h2.window.js index 5627f04a0fe..bd592b0396d 100644 --- a/tests/wpt/tests/loading/early-hints/modulepreload-in-early-hints.h2.window.js +++ b/tests/wpt/tests/loading/early-hints/modulepreload-in-early-hints.h2.window.js @@ -1,10 +1,20 @@ // META: script=/common/utils.js // META: script=resources/early-hints-helpers.sub.js +// params are sent to a Python handler[1] that returns a 103 Early Hints +// response based the values of "resource-url" and "as", and then that response +// is validated by a window test[2] according to the value of "should-preload" +// +// see: https://web-platform-tests.org/writing-tests/h2tests.html +// +// [1]: resources/modulepreload-in-early-hints.h2.py +// [2]: resources/modulepreload-in-early-hints.h2.html test(() => { const params = new URLSearchParams(); + params.set("description", "Modulepreload works in early hints"); params.set("resource-url", SAME_ORIGIN_RESOURCES_URL + "/empty.js?" + token()); + params.set("should-preload", true); const test_url = "resources/modulepreload-in-early-hints.h2.py?" + params.toString(); window.location.replace(new URL(test_url, window.location)); }); diff --git a/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.h2.py b/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.h2.py index 231b3bc69cb..cefd02a96a8 100644 --- a/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.h2.py +++ b/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.h2.py @@ -3,7 +3,12 @@ import os def handle_headers(frame, request, response): resource_url = request.GET.first(b"resource-url").decode() - link_header_value = "<{}>; rel=modulepreload".format(resource_url) + as_value = request.GET.first(b"as", None) + if as_value: + link_header_value = "<{}>; rel=modulepreload; as={}".format( + resource_url, as_value.decode()) + else: + link_header_value = "<{}>; rel=modulepreload".format(resource_url) early_hints = [ (b":status", b"103"), (b"link", link_header_value), diff --git a/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.html b/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.html index 44aebf720a0..64a02855040 100644 --- a/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.html +++ b/tests/wpt/tests/loading/early-hints/resources/modulepreload-in-early-hints.html @@ -16,11 +16,14 @@ async function fetchModuleScript(url) { }); } +const params = new URLSearchParams(window.location.search); +const description = params.get("description"); + promise_test(async (t) => { - const params = new URLSearchParams(window.location.search); const resource_url = params.get("resource-url"); + const should_preload = params.get("should-preload") === "true"; await fetchModuleScript(resource_url); - assert_true(isPreloadedByEarlyHints(resource_url)); -}, "Modulepreload in an early hints."); + assert_equals(isPreloadedByEarlyHints(resource_url), should_preload); +}, description); </script> </body> diff --git a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html index 38fabdcdfac..79217980177 100644 --- a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html +++ b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-fast.html @@ -28,17 +28,17 @@ promise_test(function(t) { // when called with an empty advanced constraint set, returns a Promise that is // resolved. promise_test(function(t) { -var canvas = document.getElementById('canvas'); -var context = canvas.getContext("2d"); -context.fillStyle = "red"; -context.fillRect(0, 0, 10, 10); + var canvas = document.getElementById('canvas'); + var context = canvas.getContext("2d"); + context.fillStyle = "red"; + context.fillRect(0, 0, 10, 10); -var stream = canvas.captureStream(); -assert_equals(stream.getAudioTracks().length, 0); -assert_equals(stream.getVideoTracks().length, 1); + var stream = canvas.captureStream(); + assert_equals(stream.getAudioTracks().length, 0); + assert_equals(stream.getVideoTracks().length, 1); -var videoTrack = stream.getVideoTracks()[0]; -return videoTrack.applyConstraints({advanced: []}); + var videoTrack = stream.getVideoTracks()[0]; + return videoTrack.applyConstraints({advanced: []}); }, 'MediaStreamTrack.applyConstraints({advanced: []})'); // This test verifies that applyConstraints() rejects the returned Promise if @@ -55,7 +55,7 @@ promise_test(async function(t) { // Use e.g. |torch| as an example of unsupported constraint. assert_false("torch" in videoTrack.getCapabilities()); try { - await videoTrack.applyConstraints({advanced : [ {torch : true} ]}); + await videoTrack.applyConstraints({torch: {exact: true}}); } catch (error) { assert_equals(error.name, 'OverconstrainedError'); assert_equals(error.constraint, 'torch'); diff --git a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.https.html b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.https.html index c6401570b8b..e18480aae1a 100644 --- a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.https.html +++ b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-getSettings.https.html @@ -101,20 +101,61 @@ image_capture_test(async t => { let stream = await navigator.mediaDevices.getUserMedia({video: true}); let videoTrack = stream.getVideoTracks()[0]; - const constraints = [{ pan: 8 }, { tilt: 9 }]; + const constraints = [{ pan: { exact: 8 } }, { tilt: { exact: 9 } }]; await Promise.all(constraints.map(async constraint => { try { - await videoTrack.applyConstraints({ advanced: [constraint] }); + await videoTrack.applyConstraints(constraint); } catch (error) { assert_equals(error.name, 'OverconstrainedError'); assert_equals(error.constraint, Object.keys(constraint)[0]); return; } assert_unreached( - "applyConstraints should throw a NotSupportedError for " + + "applyConstraints should throw an OverconstrainedError for " + JSON.stringify(constraint)); })); -}, 'exercises an applyConstraints() with PTZ permission denied'); +}, 'exercises an applyConstraints() with required constraints with PTZ permission denied'); + +image_capture_test(async t => { + await test_driver.set_permission({name: 'camera', panTiltZoom: true}, + 'denied'); + + let stream = await navigator.mediaDevices.getUserMedia({video: true}); + let videoTrack = stream.getVideoTracks()[0]; + + const constraints = [{ pan: { ideal: 8 } }, { tilt: { ideal: 9 } }]; + await Promise.all(constraints.map(async constraint => { + try { + await videoTrack.applyConstraints(constraint); + } catch (error) { + assert_unreached( + `applyConstraints should not throw an ${error.name} for ` + + JSON.stringify(constraint)); + } + })); + +}, 'exercises an applyConstraints() with ideal constraints with PTZ permission denied'); + +image_capture_test(async t => { + await test_driver.set_permission({name: 'camera', panTiltZoom: true}, + 'denied'); + + let stream = await navigator.mediaDevices.getUserMedia({video: true}); + let videoTrack = stream.getVideoTracks()[0]; + + const advanced_constraints = [{ pan: 8 }, { tilt: 9 }]; + await Promise.all(advanced_constraints.map(async advanced_constraint => { + const constraint = { advanced: [advanced_constraint] }; + try { + await videoTrack.applyConstraints(constraint); + } catch (error) { + assert_unreached( + `applyConstraints should not throw an ${error.name} for ` + + JSON.stringify(constraint)); + } + })); + +}, 'exercises an applyConstraints() with advances constraints with PTZ permission denied'); </script> diff --git a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.https.html b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.https.html index 5050ed27dd8..0bb4c9f74eb 100644 --- a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.https.html +++ b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-applyConstraints-reject.https.html @@ -20,8 +20,7 @@ var makePromiseTest = function(getConstraint) { const constraint = getConstraint(imageCaptureTest.mockImageCapture().state()); try { - const constraints = { advanced : [constraint] }; - await videoTrack.applyConstraints(constraints); + await videoTrack.applyConstraints(constraint); assert_unreached('expected applyConstraints to reject'); } catch (error) { assert_equals(error.name, 'OverconstrainedError'); @@ -31,38 +30,38 @@ var makePromiseTest = function(getConstraint) { }; const constraintGenerators = [ - capabilities => ({ whiteBalanceMode: 'manual' }), - capabilities => ({ exposureMode: 'none' }), - capabilities => ({ focusMode: 'continuous' }), + capabilities => ({ whiteBalanceMode: { exact: 'manual' } }), + capabilities => ({ exposureMode: { exact: 'none' } }), + capabilities => ({ focusMode: { exact: 'continuous' } }), capabilities => ({ - exposureCompensation: capabilities.exposureCompensation.max + 1 + exposureCompensation: { exact: capabilities.exposureCompensation.max + 1 } }), capabilities => ({ - exposureCompensation: capabilities.exposureCompensation.min - 1 + exposureCompensation: { exact: capabilities.exposureCompensation.min - 1 } }), capabilities => ({ - colorTemperature: capabilities.colorTemperature.max + 1 + colorTemperature: { exact: capabilities.colorTemperature.max + 1 } }), capabilities => ({ - colorTemperature: capabilities.colorTemperature.min - 1 + colorTemperature: { exact: capabilities.colorTemperature.min - 1 } }), - capabilities => ({ iso: capabilities.iso.max + 1 }), - capabilities => ({ iso: capabilities.iso.min - 1 }), - capabilities => ({ brightness: capabilities.brightness.max + 1 }), - capabilities => ({ brightness: capabilities.brightness.min - 1 }), - capabilities => ({ contrast: capabilities.contrast.max + 1 }), - capabilities => ({ contrast: capabilities.contrast.min - 1 }), - capabilities => ({ saturation: capabilities.saturation.max + 1 }), - capabilities => ({ saturation: capabilities.saturation.min - 1 }), - capabilities => ({ sharpness: capabilities.sharpness.max + 1 }), - capabilities => ({ sharpness: capabilities.sharpness.min - 1 }), - capabilities => ({ pan: capabilities.pan.max + 1 }), - capabilities => ({ pan: capabilities.pan.min - 1 }), - capabilities => ({ tilt: capabilities.tilt.max + 1 }), - capabilities => ({ tilt: capabilities.tilt.min - 1 }), - capabilities => ({ zoom: capabilities.zoom.max + 1 }), - capabilities => ({ zoom: capabilities.zoom.min - 1 }), - capabilities => ({ torch: true }), + capabilities => ({ iso: { exact: capabilities.iso.max + 1 } }), + capabilities => ({ iso: { exact: capabilities.iso.min - 1 } }), + capabilities => ({ brightness: { exact: capabilities.brightness.max + 1 } }), + capabilities => ({ brightness: { exact: capabilities.brightness.min - 1 } }), + capabilities => ({ contrast: { exact: capabilities.contrast.max + 1 } }), + capabilities => ({ contrast: { exact: capabilities.contrast.min - 1 } }), + capabilities => ({ saturation: { exact: capabilities.saturation.max + 1 } }), + capabilities => ({ saturation: { exact: capabilities.saturation.min - 1 } }), + capabilities => ({ sharpness: { exact: capabilities.sharpness.max + 1 } }), + capabilities => ({ sharpness: { exact: capabilities.sharpness.min - 1 } }), + capabilities => ({ pan: { exact: capabilities.pan.max + 1 } }), + capabilities => ({ pan: { exact: capabilities.pan.min - 1 } }), + capabilities => ({ tilt: { exact: capabilities.tilt.max + 1 } }), + capabilities => ({ tilt: { exact: capabilities.tilt.min - 1 } }), + capabilities => ({ zoom: { exact: capabilities.zoom.max + 1 } }), + capabilities => ({ zoom: { exact: capabilities.zoom.min - 1 } }), + capabilities => ({ torch: { exact: true } }), ]; for (key in constraintGenerators) { diff --git a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-clone.https.html b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-clone.https.html index 3ee21031eb0..8945c1d9ea0 100644 --- a/tests/wpt/tests/mediacapture-image/MediaStreamTrack-clone.https.html +++ b/tests/wpt/tests/mediacapture-image/MediaStreamTrack-clone.https.html @@ -37,6 +37,9 @@ image_capture_test(async (t, imageCaptureTest) => { torch : true }]}; + for (const [key, value] of Object.entries(constraints.advanced[0])) { + constraints[key] = {exact: value}; + } let stream = await navigator.mediaDevices.getUserMedia({video: true}); let originalVideoTrack = stream.getVideoTracks()[0]; @@ -51,14 +54,20 @@ image_capture_test(async (t, imageCaptureTest) => { assert_equals(appliedClonedConstraints.advanced.length, 1); const appliedClonedAdvancedConstraints = appliedClonedConstraints.advanced[0]; - // Check that |appliedClonedAdvancedConstraints| and |appliedAdvancedConstraints| are equal. + // Check that |appliedClonedConstraints| and |appliedConstraints| are equal. const appliedAdvancedConstraints = appliedConstraints.advanced[0]; assert_equals(appliedAdvancedConstraints.length, appliedClonedAdvancedConstraints.length); - Object.keys(appliedClonedAdvancedConstraints).forEach((key, value) => { + Object.keys(appliedClonedAdvancedConstraints).forEach(key => { + assert_not_equals(appliedClonedConstraints[key], undefined, 'key ' + key); + assert_not_equals(appliedConstraints[key], undefined, 'key ' + key); + assert_not_equals(appliedConstraints[key].exact, undefined, 'key ' + key); assert_not_equals(appliedAdvancedConstraints[key], undefined, 'key ' + key); if (key != 'pointsOfInterest') { + assert_equals(appliedConstraints[key].exact, appliedClonedConstraints[key].exact, key); assert_equals(appliedAdvancedConstraints[key], appliedClonedAdvancedConstraints[key], key); } else { + assert_point2d_array_approx_equals(appliedConstraints[key].exact, + appliedClonedConstraints[key].exact, 0.01); assert_point2d_array_approx_equals(appliedAdvancedConstraints[key], appliedClonedAdvancedConstraints[key], 0.01); } diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.js index acb70ebfae4..7191456cc84 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/performance-navigation-timing-redirect-on-history.tentative.window.js @@ -21,15 +21,15 @@ promise_test(async t => { await useWebSocket(rc1); // Create a remote context with the redirected URL. - let [rc1_redirected, saveUrl] = - await rcHelper.createContextWithUrl(/*extraConfig=*/ { + let rc1_redirected = + await rcHelper.createContext(/*extraConfig=*/ { origin: 'HTTP_ORIGIN', scripts: [], headers: [], }); const redirectUrl = - `${ORIGIN}/common/redirect.py?location=${encodeURIComponent(saveUrl)}`; + `${ORIGIN}/common/redirect.py?location=${encodeURIComponent(rc1_redirected.url)}`; // Replace the history state. await rc1.executeScript((url) => { window.history.replaceState(null, '', url); diff --git a/tests/wpt/tests/pointerevents/pointerevent_pointerout_no_pointer_movement.html b/tests/wpt/tests/pointerevents/pointerevent_pointerout_no_pointer_movement.html new file mode 100644 index 00000000000..856f2ce37ce --- /dev/null +++ b/tests/wpt/tests/pointerevents/pointerevent_pointerout_no_pointer_movement.html @@ -0,0 +1,85 @@ +<!doctype html> +<html> +<head> +<title>The pointerout event should not be fired if the pointer doesn't move</title> +<meta name="viewport" content="width=device-width"> +<link rel="help" href="https://github.com/w3c/pointerevents/issues/457"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<style> +#target{ + width:100px; + height:100px; + background-color:red; +} + +#overlay{ + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(0,0,0,0.2); + z-index: 1000; + text-align: center; + display:none; +} +</style> +</head> +<body> +<h1>The pointerout event should not be fired if the pointer doesn't move</h1> +<h4> + Test Description: This test checks if the pointerout event dispatched unexpectedly. + <ol> + <li>Click on the black rectangle. + <li>Don't move mouse after clicking. + </ol> +</h4> +<p> +<div id="target"></div> +<div id="overlay"></div> +<div id="log"></div> +<script> +function waitForAnimationFrame() { + return new Promise(resolve => { + requestAnimationFrame(() => { + requestAnimationFrame(resolve); + }); + }); +} + +promise_test(async () => { + const target = document.getElementById("target"); + + let out_event_count = 0; + target.addEventListener("pointerout", function() { + out_event_count++; + }); + + // Wait for the click event on target element and update display style on + // overlay element. + const promise = new Promise(resolve => { + target.addEventListener("click", async function() { + const overlay = document.getElementById("overlay"); + overlay.style.display= 'block'; + await waitForAnimationFrame(); + + overlay.style.display= 'none' + await waitForAnimationFrame(); + + resolve(); + }, { once: true }); + }); + + // Click target. + test_driver.click(target); + await promise; + + assert_equals(out_event_count, 0, "The pointerout event should not be fired"); +}, "The pointerout event should not be fired if the pointer doesn't move"); +</script> +</body> +</html> diff --git a/tests/wpt/tests/resources/test/tests/functional/assert-throws-dom.html b/tests/wpt/tests/resources/test/tests/functional/assert-throws-dom.html new file mode 100644 index 00000000000..4dd66b2372a --- /dev/null +++ b/tests/wpt/tests/resources/test/tests/functional/assert-throws-dom.html @@ -0,0 +1,55 @@ +<!DOCTYPE HTML> +<title>assert_throws_dom</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> +test(() => { + function f() { + assert_true(false, "Trivial assertion."); + + // Would lead to throwing a SyntaxError. + document.createElement("div").contentEditable = "invalid"; + } + + assert_throws_dom("SyntaxError", () => { f(); }); +}, "Violated assertion nested in `assert_throws_dom`."); +</script> +<script type="text/json" id="expected"> +{ + "type": "complete", + "summarized_status": { + "message": null, + "status_string": "OK" + }, + "summarized_tests": [ + { + "message": "assert_true: Trivial assertion. expected true got false", + "name": "Violated assertion nested in `assert_throws_dom`.", + "properties": {}, + "status_string": "FAIL" + } + ], + "summarized_asserts": [ + { + "assert_name": "assert_throws_dom", + "test": "Violated assertion nested in `assert_throws_dom`.", + "args": [ + "\"SyntaxError\"", + "function \"() => { f(); }\"" + ], + "status": 1 + }, + { + "assert_name": "assert_true", + "test": "Violated assertion nested in `assert_throws_dom`.", + "args": [ + "false", + "\"Trivial assertion.\"" + ], + "status": 1 + } + ] +} +</script> + diff --git a/tests/wpt/tests/resources/testdriver.js b/tests/wpt/tests/resources/testdriver.js index e582477da9b..a9ab7220aad 100644 --- a/tests/wpt/tests/resources/testdriver.js +++ b/tests/wpt/tests/resources/testdriver.js @@ -296,12 +296,6 @@ inline: "nearest"}); } - var pointerInteractablePaintTree = getPointerInteractablePaintTree(element); - if (pointerInteractablePaintTree.length === 0 || - !element.contains(pointerInteractablePaintTree[0])) { - return Promise.reject(new Error("element send_keys intercepted error")); - } - return window.test_driver_internal.send_keys(element, keys); }, diff --git a/tests/wpt/tests/resources/testharness.js b/tests/wpt/tests/resources/testharness.js index 112790bb1ee..413993089be 100644 --- a/tests/wpt/tests/resources/testharness.js +++ b/tests/wpt/tests/resources/testharness.js @@ -1426,12 +1426,16 @@ function assert_wrapper(...args) { let status = Test.statuses.TIMEOUT; let stack = null; + let new_assert_index = null; try { if (settings.debug) { console.debug("ASSERT", name, tests.current_test && tests.current_test.name, args); } if (tests.output) { tests.set_assert(name, args); + // Remember the newly pushed assert's index, because `apply` + // below might push new asserts. + new_assert_index = tests.asserts_run.length - 1; } const rv = f.apply(undefined, args); status = Test.statuses.PASS; @@ -1445,7 +1449,7 @@ stack = get_stack(); } if (tests.output) { - tests.set_assert_status(status, stack); + tests.set_assert_status(new_assert_index, status, stack); } } } @@ -3673,8 +3677,8 @@ this.asserts_run.push(new AssertRecord(this.current_test, assert_name, args)) } - Tests.prototype.set_assert_status = function(status, stack) { - let assert_record = this.asserts_run[this.asserts_run.length - 1]; + Tests.prototype.set_assert_status = function(index, status, stack) { + let assert_record = this.asserts_run[index]; assert_record.status = status; assert_record.stack = stack; } diff --git a/tests/wpt/tests/screen-capture/capture-controller-event-target.https.window.js b/tests/wpt/tests/screen-capture/capture-controller-event-target.https.window.js new file mode 100644 index 00000000000..379f3595683 --- /dev/null +++ b/tests/wpt/tests/screen-capture/capture-controller-event-target.https.window.js @@ -0,0 +1,60 @@ +'use strict'; + +const controller = new CaptureController(); +const type = 'my-event-type'; +const listeners = {}; +const listener_count = 10; +for (let i = 0; i < listener_count; i++) { + listeners[i] = { + callback: (event) => { + assert_equals(event.type, type, `Event type sent to listener ${i}`); + listeners[i].execution_count++; + } + }; +} + +test(() => { + for (const i in listeners) { + listeners[i].execution_count = 0; + controller.addEventListener(type, listeners[i].callback); + } + controller.dispatchEvent(new Event(type)); + for (const i in listeners) { + assert_equals( + listeners[i].execution_count, 1, + `Callback execution count for listener ${i}`); + } +}, 'Registering listeners on CaptureController and dispatching an event.'); + +test(() => { + for (const i in listeners) { + listeners[i].execution_count = 0; + } + controller.dispatchEvent(new Event(type)); + controller.dispatchEvent(new Event(type)); + controller.dispatchEvent(new Event(type)); + for (const i in listeners) { + assert_equals( + listeners[i].execution_count, 3, + `Callback execution count for listener ${i}`); + } +}, 'Dispatching an multiple events to CaptureController.'); + +test(() => { + for (const i in listeners) { + listeners[i].execution_count = 0; + if (i % 3) { + listeners[i].removed = false; + } else { + listeners[i].removed = true; + controller.removeEventListener(type, listeners[i].callback); + }; + } + controller.dispatchEvent(new Event(type)); + controller.dispatchEvent(new Event(type)); + for (const i in listeners) { + assert_equals( + listeners[i].execution_count, listeners[i].removed ? 0 : 2, + `Callback execution count for listener ${i}`); + } +}, 'Unregistering listeners from CaptureController and dispatching an event.'); diff --git a/tests/wpt/tests/scroll-animations/css/animation-timeline-parsing.html b/tests/wpt/tests/scroll-animations/css/animation-timeline-parsing.html index f0061c5705d..9e3c1078b5b 100644 --- a/tests/wpt/tests/scroll-animations/css/animation-timeline-parsing.html +++ b/tests/wpt/tests/scroll-animations/css/animation-timeline-parsing.html @@ -36,6 +36,7 @@ test_invalid_value('animation-timeline', '"test"'); // <axis> = block | inline | x | y // <scroller> = root | nearest | self test_valid_value('animation-timeline', 'scroll()'); +test_valid_value('animation-timeline', ' scroll() ', 'scroll()'); test_valid_value('animation-timeline', 'scroll(block)', 'scroll()'); test_valid_value('animation-timeline', 'scroll(inline)'); test_valid_value('animation-timeline', 'scroll(x)'); @@ -56,6 +57,7 @@ test_invalid_value('animation-timeline', 'scroll("string")'); // https://drafts.csswg.org/scroll-animations-1/#view-notation test_valid_value('animation-timeline', 'view()'); +test_valid_value('animation-timeline', ' view() ', 'view()'); test_valid_value('animation-timeline', 'view(block)', 'view()'); test_valid_value('animation-timeline', 'view(inline)'); test_valid_value('animation-timeline', 'view(x)'); diff --git a/tests/wpt/tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html b/tests/wpt/tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html index 3ac94478e59..d91dfe924b7 100644 --- a/tests/wpt/tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html +++ b/tests/wpt/tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html @@ -118,7 +118,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-in-out-without-timeline-range 1s linear"; + div.style.animation = "fade-in-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view()"; }); @@ -142,7 +142,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-in-out-without-timeline-range 1s linear"; + div.style.animation = "fade-in-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(50px)"; }); // So the range is [250px, 450px]. @@ -166,7 +166,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-in-out-without-timeline-range 1s linear"; + div.style.animation = "fade-in-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(auto 50px)"; }); // So the range is [250px, 500px]. @@ -190,7 +190,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animation = "fade-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(inline)"; }); // So the range is [-200px, 100px], but it is impossible to scroll to the @@ -210,7 +210,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animation = "fade-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(x)"; }); // So the range is [-200px, 100px], but it is impossible to scroll to the @@ -229,7 +229,7 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { - div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animation = "fade-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(y)"; }); // So the range is [-200px, 100px], but it is impossible to scroll to the @@ -249,7 +249,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animation = "fade-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(x 50px)"; }); // So the range is [-150px, 50px], but it is impossible to scroll to the @@ -268,8 +268,9 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-out-without-timeline-range 1s linear, " + - "change-font-size-without-timeline-range 1s linear"; + div.style.animation + = "fade-out-without-timeline-range 1s linear forwards, " + + "change-font-size-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(50px), view(inline 50px)"; }); @@ -300,7 +301,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'hidden'; - div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animation = "fade-out-without-timeline-range 1s linear forwards"; div.style.animationTimeline = "view(inline)"; }); await scrollLeft(container, 0); @@ -327,7 +328,7 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { - div.style.animation = "fade-in-out 1s linear"; + div.style.animation = "fade-in-out 1s linear forwards"; div.style.animationTimeline = "view()"; }); @@ -349,7 +350,7 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { - div.style.animation = "fade-in-out 1s linear"; + div.style.animation = "fade-in-out 1s linear forwards"; div.style.animationTimeline = "view(50px)"; }); @@ -370,7 +371,7 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); await runAndWaitForFrameUpdate(() => { - div.style.animation = "fade-in-out 1s linear"; + div.style.animation = "fade-in-out 1s linear forwards"; div.style.animationTimeline = "view(auto 50px)"; }); @@ -393,7 +394,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; + div.style.animation = "fade-out 1s linear forwards"; div.style.animationTimeline = "view(inline)"; }); @@ -409,7 +410,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; + div.style.animation = "fade-out 1s linear forwards"; div.style.animationTimeline = "view(x)"; }); @@ -425,7 +426,7 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; + div.style.animation = "fade-out 1s linear forwards"; div.style.animationTimeline = "view(y)"; }); @@ -442,7 +443,7 @@ promise_test(async t => { await runAndWaitForFrameUpdate(() => { container.style.overflowY = 'hidden'; container.style.overflowX = 'scroll'; - div.style.animation = "fade-out 1s linear"; + div.style.animation = "fade-out 1s linear forwards"; div.style.animationTimeline = "view(x 50px)"; }); @@ -456,7 +457,8 @@ promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); await runAndWaitForFrameUpdate(() => { container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear, change-font-size 1s linear"; + div.style.animation + = "fade-out 1s linear forwards, change-font-size 1s linear forwards"; div.style.animationTimeline = "view(), view(inline)"; }); @@ -487,7 +489,7 @@ promise_test(async t => { await runAndWaitForFrameUpdate(() => { container.style.overflowY = 'hidden'; container.style.overflowX = 'scroll'; - div.style.animation = "fade-out 1s linear"; + div.style.animation = "fade-out 1s linear forwards"; }); div.style.animationTimeline = "view(inline)"; diff --git a/tests/wpt/tests/scroll-animations/css/deferred-timeline-composited.html b/tests/wpt/tests/scroll-animations/css/deferred-timeline-composited.html index 239c0ca50a9..e2437911b39 100644 --- a/tests/wpt/tests/scroll-animations/css/deferred-timeline-composited.html +++ b/tests/wpt/tests/scroll-animations/css/deferred-timeline-composited.html @@ -64,12 +64,13 @@ // Switch out the timeline associated with timeline-scope:--t. scroller_block.classList.toggle('timeline'); scroller_inline.classList.toggle('timeline'); - await waitForCompositorReady(); + await waitForNextFrame(); let scrollPromise = new Promise((resolve) => { scroller_inline.addEventListener('scrollend', resolve); - }) + }); scroller_inline.scrollTo({left: 100, behavior: "smooth"}); // 50% await scrollPromise; + await waitForNextFrame(); takeScreenshot(); })(); </script> diff --git a/tests/wpt/tests/scroll-animations/css/view-timeline-animation.html b/tests/wpt/tests/scroll-animations/css/view-timeline-animation.html index d1ea2f6c07f..1bf034a742f 100644 --- a/tests/wpt/tests/scroll-animations/css/view-timeline-animation.html +++ b/tests/wpt/tests/scroll-animations/css/view-timeline-animation.html @@ -53,7 +53,7 @@ <style> #target { view-timeline: --t1; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -79,7 +79,7 @@ assert_equals(getComputedStyle(target).zIndex, '50'); await scrollTop(scroller, 200); // 100% (exit 100%) assert_equals(getComputedStyle(target).zIndex, '100'); - await scrollTop(scroller, 225); + document.getAnimations()[0].effect.updateTiming( { fill: 'none' }); assert_equals(getComputedStyle(target).zIndex, '-1'); }, 'Default view-timeline'); </script> @@ -88,7 +88,7 @@ <style> #target { view-timeline: --t1 x; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -114,7 +114,7 @@ assert_equals(getComputedStyle(target).zIndex, '50'); await scrollLeft(scroller, 200); // 100% (exit 100%) assert_equals(getComputedStyle(target).zIndex, '100'); - await scrollLeft(scroller, 225); + document.getAnimations()[0].effect.updateTiming( { fill: 'none' }); assert_equals(getComputedStyle(target).zIndex, '-1'); }, 'Horizontal view-timeline'); </script> @@ -140,11 +140,11 @@ height: 50px; } #target_v { - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --tv; } #target_h { - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --th; } </style> @@ -197,7 +197,8 @@ await scrollTop(scroller, 200); // 100% (exit 100%) assert_equals(getComputedStyle(target_v).zIndex, '100'); assert_equals(getComputedStyle(target_h).zIndex, '-1'); - await scrollTop(scroller, 225); + document.getElementById('target_v').getAnimations()[0]. + effect.updateTiming({ fill: 'none' }); assert_equals(getComputedStyle(target_v).zIndex, '-1'); assert_equals(getComputedStyle(target_h).zIndex, '-1'); @@ -214,7 +215,8 @@ await scrollLeft(scroller, 200); // 100% (exit 100%) assert_equals(getComputedStyle(target_v).zIndex, '-1'); assert_equals(getComputedStyle(target_h).zIndex, '100'); - await scrollLeft(scroller, 225); + document.getElementById('target_h').getAnimations()[0]. + effect.updateTiming({ fill: 'none' }); assert_equals(getComputedStyle(target_v).zIndex, '-1'); assert_equals(getComputedStyle(target_h).zIndex, '-1'); }, 'Multiple view-timelines on the same element'); diff --git a/tests/wpt/tests/scroll-animations/css/view-timeline-inset-animation.html b/tests/wpt/tests/scroll-animations/css/view-timeline-inset-animation.html index 9ba88fde507..f9aa0f29189 100644 --- a/tests/wpt/tests/scroll-animations/css/view-timeline-inset-animation.html +++ b/tests/wpt/tests/scroll-animations/css/view-timeline-inset-animation.html @@ -93,7 +93,7 @@ #target { view-timeline: --t1; view-timeline-inset: 10px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -108,16 +108,14 @@ await assertValueAt(scroller, target, { scrollTop:50 + 10, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 0, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset with one value'); </script> - <template id=test_two_values> <style> #target { view-timeline: --t1; view-timeline-inset: 10px 20px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -132,7 +130,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset with two values'); </script> @@ -142,7 +139,7 @@ font-size: 10px; view-timeline: --t1; view-timeline-inset: 10px 2em; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -157,7 +154,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset with em values'); </script> @@ -167,7 +163,7 @@ font-size: 10px; view-timeline: --t1; view-timeline-inset: calc(5px + max(1%, 5%)) 20%; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -182,7 +178,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset with percentage values'); </script> @@ -191,7 +186,7 @@ #target { view-timeline: --t1; view-timeline-inset: -10px -20px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -206,7 +201,6 @@ await assertValueAt(scroller, target, { scrollTop:50 - 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 - 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 + 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:220, expected:-1 }); }, 'view-timeline-inset with negative values'); </script> @@ -215,7 +209,7 @@ #target { view-timeline: --t1 x; view-timeline-inset: 10px 20px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -230,7 +224,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset with horizontal scroller'); </script> @@ -239,7 +232,7 @@ #target { view-timeline: --t1 block; view-timeline-inset: 10px 20px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -254,7 +247,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset with block scroller'); </script> @@ -263,7 +255,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: 10px 20px; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -278,7 +270,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset with inline scroller'); </script> @@ -290,7 +281,7 @@ #target { view-timeline: --t1 block; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -305,7 +296,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, block'); </script> @@ -318,7 +308,7 @@ #target { view-timeline: --t1 block; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -333,7 +323,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset:auto, block, vertical-lr'); </script> @@ -346,7 +335,7 @@ #target { view-timeline: --t1 block; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -362,7 +351,6 @@ await assertValueAt(scroller, target, { scrollLeft:-(70 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:-(135 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:-200, expected:-1 }); }, 'view-timeline-inset:auto, block, vertical-rl'); </script> @@ -374,7 +362,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -389,7 +377,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset:auto, inline'); </script> @@ -402,7 +389,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -417,7 +404,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, inline, vertical-rl'); </script> @@ -430,7 +416,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -445,7 +431,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, inline, vertical-lr'); </script> @@ -458,7 +443,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -473,7 +458,6 @@ await assertValueAt(scroller, target, { scrollLeft:-(70 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:-(135 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:-200, expected:-1 }); }, 'view-timeline-inset:auto, inline, rtl'); </script> @@ -487,7 +471,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -502,7 +486,6 @@ await assertValueAt(scroller, target, { scrollTop:-(50 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:-(125 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:-200, expected:-1 }); }, 'view-timeline-inset:auto, inline, vertical-rl, rtl'); </script> @@ -516,7 +499,7 @@ #target { view-timeline: --t1 inline; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -531,7 +514,6 @@ await assertValueAt(scroller, target, { scrollTop:-(50 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:-(125 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:-200, expected:-1 }); }, 'view-timeline-inset:auto, inline, vertical-lr, rtl'); </script> @@ -543,7 +525,7 @@ #target { view-timeline: --t1 y; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -558,7 +540,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, y'); </script> @@ -571,7 +552,7 @@ #target { view-timeline: --t1 y; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -586,7 +567,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, y, vertical-rl'); </script> @@ -600,7 +580,7 @@ #target { view-timeline: --t1 y; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -615,7 +595,6 @@ await assertValueAt(scroller, target, { scrollTop:-(50 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:-(125 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:-200, expected:-1 }); }, 'view-timeline-inset:auto, y, vertical-rl, rtl'); </script> @@ -627,7 +606,7 @@ #target { view-timeline: --t1 x; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -642,7 +621,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset:auto, x'); </script> @@ -655,7 +633,7 @@ #target { view-timeline: --t1 x; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -670,7 +648,6 @@ await assertValueAt(scroller, target, { scrollLeft:-(70 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:-(135 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:-200, expected:-1 }); }, 'view-timeline-inset:auto, x, rtl'); </script> @@ -683,7 +660,7 @@ #target { view-timeline: --t1 x; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -698,7 +675,6 @@ await assertValueAt(scroller, target, { scrollLeft:70 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:135 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:200, expected:-1 }); }, 'view-timeline-inset:auto, x, vertical-lr'); </script> @@ -711,7 +687,7 @@ #target { view-timeline: --t1 x; view-timeline-inset: auto auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -726,7 +702,6 @@ await assertValueAt(scroller, target, { scrollLeft:-(70 + 20), expected:0 }); // 0% await assertValueAt(scroller, target, { scrollLeft:-(135 + 5), expected:50 }); // 50% await assertValueAt(scroller, target, { scrollLeft:-(200 - 10), expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollLeft:-200, expected:-1 }); }, 'view-timeline-inset:auto, x, vertical-rl'); </script> @@ -739,7 +714,7 @@ #target { view-timeline: --t1; view-timeline-inset: 10% auto; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> @@ -757,7 +732,6 @@ await assertValueAt(scroller, target, { scrollTop:50 + 20, expected:0 }); // 0% await assertValueAt(scroller, target, { scrollTop:125 + 5, expected:50 }); // 50% await assertValueAt(scroller, target, { scrollTop:200 - 10, expected:100 }); // 100% - await assertValueAt(scroller, target, { scrollTop:200, expected:-1 }); }, 'view-timeline-inset:auto, mix'); </script> diff --git a/tests/wpt/tests/scroll-animations/css/view-timeline-lookup.html b/tests/wpt/tests/scroll-animations/css/view-timeline-lookup.html index 98f11b85429..067ac1fa969 100644 --- a/tests/wpt/tests/scroll-animations/css/view-timeline-lookup.html +++ b/tests/wpt/tests/scroll-animations/css/view-timeline-lookup.html @@ -35,7 +35,7 @@ #target { height: 0px; view-timeline: --t1; - animation: anim 1s linear; + animation: anim 1s linear forwards; animation-timeline: --t1; } </style> diff --git a/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html b/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html index 67bc36ca104..41ae0e0612f 100644 --- a/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html +++ b/tests/wpt/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html @@ -217,8 +217,8 @@ expected_effect_progress, 0.001, "animation effect progress"); - assert_phase_at_time( - animation, expected_effect_phase, animation.currentTime); + assert_phase( + animation, expected_effect_phase); assert_approx_equals( parseFloat(getComputedStyle(target).opacity), expected_opacity, 0.001, @@ -285,6 +285,81 @@ return animation; } + + promise_test(async t => { + const animation = createScrollLinkedOpacityAnimationWithDelays(t); + const scroller = animation.timeline.source; + const maxScroll = scroller.scrollHeight - scroller.clientHeight; + + // scroll pos + // current time + // start time + // | + // |---- 25% before ----|---- 50% active ----|---- 25% after ----| + animation.play(); + await animation.ready; + assert_percents_equal(animation.startTime, 0); + assert_phase(animation, 'before'); + + // start time scroll pos + // | current time + // | | + // |---- 25% before ----|---- 50% active ----|---- 25% after ----| + scroller.scrollTop = 0.5 * maxScroll; + await waitForNextFrame(); + assert_phase(animation, 'active'); + + // start time scroll pos current time + // | | | + // |---- 25% before ----|---- 50% active ----|---- 25% after ----| + animation.playbackRate = 2; + assert_phase(animation, 'after'); + + // start time scroll pos current time + // | | | + // |---- 33.3% before ----|---- 66.7% active ---------------------| + animation.effect.updateTiming({ endDelay: 0 }); + assert_phase(animation, 'active'); + + // scroll pos start time + // current time | + // | | + // |---- 33.3% before ----|---- 66.7% active ----------------------| + animation.playbackRate = -1; + assert_percents_equal(animation.startTime, 100); + assert_phase(animation, 'active'); + + // start time + // scroll pos current time + // | | | + // |---- 33.3% before ----|---- 66.7% active -----------------------| + animation.playbackRate = -2; + assert_phase(animation, 'active'); + + // current time start time + // | scroll pos + // | | + // |---- 33.3% before ----|---- 66.7% active -----------------------| + scroller.scrollTop = maxScroll; + await waitForNextFrame(); + assert_phase(animation, 'before'); + + // current time start time + // | scroll pos + // | | + // |--------------------- 100% active -------------------------------| + animation.effect.updateTiming({ delay: 0 }); + assert_phase(animation, 'active'); + + // Finally, switch to a document timeline. The before-active boundary + // becomes exclusive. + animation.timeline = document.timeline; + animation.currentTime = 0; + await waitForNextFrame(); + assert_phase(animation, 'before'); + + }, 'Playback rate affects whether active phase boundary is inclusive.'); + promise_test(async t => { const animation = createScrollLinkedOpacityAnimationWithDelays(t); const scroller = animation.timeline.source; diff --git a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html index 5bc45984522..beb380060e1 100644 --- a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html +++ b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html @@ -71,13 +71,17 @@ // Advance to the end of the animation. container.scrollLeft = -1000; + anim.effect.updateTiming({ fill: 'forwards' }); await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 100, "Timeline's currentTime at end offset"); assert_percents_equal(anim.currentTime, 100, "Animation's currentTime at end offset"); assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect is in the active phase at effect end time'); + 'Opacity with fill forwards at effect end time'); + anim.effect.updateTiming({ fill: 'none' }); + assert_equals(getComputedStyle(target).opacity, '1', + 'Opacity with fill none at effect end time'); // Advance to the scroll limit. container.scrollLeft = -1600; diff --git a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html index a6530f66312..c24d04412fc 100644 --- a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html +++ b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html @@ -76,8 +76,8 @@ "Timeline's currentTime at end offset"); assert_percents_equal(anim.currentTime, 100, "Animation's currentTime at end offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect is in the active phase at effect end time'); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect is in the after phase at effect end time'); // Advance to the scroll limit. container.scrollTop = 1600; @@ -120,31 +120,31 @@ container.scrollTop = 100; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 75, - "Timeline's current time at start offset"); + "Timeline's current time at midpoint"); assert_percents_equal(anim.currentTime, 75, - "Animation's current time at start offset"); + "Animation's current time at midpoint"); assert_equals(getComputedStyle(target).opacity, '0.6', - 'Effect at the start of the active phase'); + 'Effect at the middle of the active phase'); // Advance to end-offset container.scrollTop = 200; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 100, - "Timeline's current time at start offset"); + "Timeline's current time at end offset"); assert_percents_equal(anim.currentTime, 100, - "Animation's current time at start offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect at the start of the active phase'); + "Animation's current time at end offset"); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect inactive at the end offset'); // Advance to scroll limit. container.scrollTop = 800; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 250, - "Timeline's current time at start offset"); + "Timeline's current time at scroll limit"); assert_percents_equal(anim.currentTime, 100, - "Animation's current time at start offset"); + "Animation's current time at scroll limit"); assert_equals(getComputedStyle(target).opacity, '1', - 'Effect at the start of the active phase'); + 'Effect inactive in the after phase'); }, 'View timeline does not clamp starting scroll offset at 0'); @@ -184,11 +184,11 @@ container.scrollTop = 700; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 25, - "Timeline's current time at start offset"); + "Timeline's current time at the midpoint"); assert_percents_equal(anim.currentTime, 25, - "Animation's current time at start offset"); + "Animation's current time at the midpoint"); assert_equals(getComputedStyle(target).opacity, '0.4', - 'Effect at the start of the active phase'); + 'Effect at the midpoint of the active phase'); // Advance to end offset. container.scrollTop = 800; @@ -197,6 +197,8 @@ "Timeline's currentTime at max scroll offset"); assert_percents_equal(anim.currentTime, 50, "Animation's currentTime at max scroll offset"); + // The active-after boundary is inclusive since at the maximum scroll + // position. assert_equals(getComputedStyle(target).opacity, "0.5", 'Effect at end of active phase'); }, 'View timeline does not clamp end scroll offset at max scroll'); diff --git a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html index 2cc8af882ff..6fdc7c68229 100644 --- a/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html +++ b/tests/wpt/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html @@ -92,8 +92,8 @@ "Timeline's currentTime at end offset"); assert_percents_equal(anim.currentTime, 100, "Animation's currentTime at end offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect is in the active phase at effect end time'); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect is in the after phase at effect end time'); // Advance to the scroll limit. container.scrollTop = 1600; diff --git a/tests/wpt/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html b/tests/wpt/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html index 5b37798fe89..59d73d0cdf7 100644 --- a/tests/wpt/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html +++ b/tests/wpt/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html @@ -91,8 +91,8 @@ "Timeline's currentTime at end offset"); assert_percents_equal(anim.currentTime, 100, "Animation's currentTime at end offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect is in the active phase at effect end time'); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect is in the after phase at effect end time'); // Advance to the scroll limit. container.scrollLeft = 1600; @@ -141,31 +141,31 @@ container.scrollLeft = 100; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 75, - "Timeline's current time at start offset"); + "Timeline's current time at the midpoint"); assert_percents_equal(anim.currentTime, 75, - "Animation's current time at start offset"); + "Animation's current time at the midpoint"); assert_equals(getComputedStyle(target).opacity, '0.6', - 'Effect at the start of the active phase'); + 'Effect at the midpoint of the active phase'); // Advance to end-offset container.scrollLeft = 200; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 100, - "Timeline's current time at start offset"); + "Timeline's current time at end offset"); assert_percents_equal(anim.currentTime, 100, - "Animation's current time at start offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect at the start of the active phase'); + "Animation's current time at end offset"); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect at the end of the active phase'); // Advance to scroll limit. container.scrollLeft = 800; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 250, - "Timeline's current time at start offset"); + "Timeline's current time at the scroll limit"); assert_percents_equal(anim.currentTime, 100, - "Animation's current time at start offset"); + "Animation's current time at the scroll limit"); assert_equals(getComputedStyle(target).opacity, '1', - 'Effect at the start of the active phase'); + 'Effect at the scroll limit'); }, 'View timeline does not clamp starting scroll offset at 0'); @@ -211,11 +211,11 @@ container.scrollLeft = 700; await waitForNextFrame(); assert_percents_equal(timeline.currentTime, 25, - "Timeline's current time at start offset"); + "Timeline's current time at midpoint"); assert_percents_equal(anim.currentTime, 25, - "Animation's current time at start offset"); + "Animation's current time at midpoint"); assert_equals(getComputedStyle(target).opacity, '0.4', - 'Effect at the start of the active phase'); + 'Effect at the midpoint of the active phase'); // Advance to end offset. container.scrollLeft = 800; @@ -224,6 +224,7 @@ "Timeline's currentTime at max scroll offset"); assert_percents_equal(anim.currentTime, 50, "Animation's currentTime at max scroll offset"); + // The active-after boundary is inclusive since at the scroll-limit. assert_equals(getComputedStyle(target).opacity, "0.5", 'Effect at end of active phase'); }, 'View timeline does not clamp end scroll offset at max scroll'); @@ -281,8 +282,8 @@ "Timeline's currentTime at end offset"); assert_percents_equal(anim.currentTime, 100, "Animation's currentTime at end offset"); - assert_equals(getComputedStyle(target).opacity, '0.7', - 'Effect is in the active phase at effect end time'); + assert_equals(getComputedStyle(target).opacity, '1', + 'Effect is in the after phase at effect end time'); // Advance to the scroll limit. container.scrollLeft = -1600; diff --git a/tests/wpt/tests/scroll-animations/view-timelines/range-boundary-ref.html b/tests/wpt/tests/scroll-animations/view-timelines/range-boundary-ref.html new file mode 100644 index 00000000000..057d0afabcd --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/range-boundary-ref.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title></title> +</head> +<style type="text/css"> + .scroller { + display: inline-block; + border: 2px solid black; + height: 100px; + width: 100px; + overflow: hidden; + } + .box { + background: gray; + height: 50px; + width: 50px; + margin: 0; + } + .half-shift { + transform: translateX(25px); + } + .full-shift { + transform: translateX(50px); + } + .blue { + background-color: #99f; + } + .green { + background-color: #9f9; + } +</style> +<body> + <div id="scroller-1" class="scroller"> + <div class="box green"></div> + <div class="box blue full-shift"></div> + </div> + <div id="scroller-2" class="scroller"> + <div class="box"></div> + <div class="box blue"></div> + </div> + <br> + <div id="scroller-3" class="scroller"> + <div class="box"></div> + <div class="box blue"></div> + </div> + <div id="scroller-4" class="scroller"> + <div class="box"></div> + <div class="box green"></div> + </div> + <br> + <div id="scroller-5" class="scroller"> + <div class="box blue"></div> + <div class="box half-shift green"></div> + </div> + <div id="scroller-6" class="scroller"> + <div class="box"></div> + <div class="box green"></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/range-boundary.html b/tests/wpt/tests/scroll-animations/view-timelines/range-boundary.html new file mode 100644 index 00000000000..e2ca394ec0c --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/range-boundary.html @@ -0,0 +1,153 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="match" href="range-boundary-ref.html"> + <title></title> +</head> +<style type="text/css"> + @keyframes transform { + 0% { transform: translateX(25px); } + 100% { transform: translateX(50px); } + } + + @keyframes background { + 0% { background-color: #99f; } + 100% { background-color: #9f9; } + } + + .scroller { + display: inline-block; + border: 2px solid black; + height: 100px; + width: 100px; + overflow: hidden; + } + .spacer { + height: 300px; + margin: 0; + } + .box { + background: gray; + height: 50px; + width: 50px; + margin: 0; + animation: transform auto, background auto; + animation-timeline: view(), view(); + animation-range: entry 0% entry 100%, contain 0% contain 100%; + } +</style> +<body> + <!-- scroll to bottom + top-box: + transform: none (after phase) + bg-color: #9f9 (at active-after boundary with inclusive endpoint) + bottom-box: + transform: 100px (at active-after boundary with inclusive endpoint) + bg-color: #99f (at active-before boundary with inclusive endpoint) + --> + <div id="scroller-1" class="scroller"> + <div class="spacer"></div> + <div class="box"></div> + <div class="box"></div> + </div> + <!-- scroll to top + top-box: + transform: none (after phase) + bg-color: gray (at active-after boundary with exclusive endpoint) + bottom-box: + transform: none (at active-after boundary with exclusive endpoint) + bg-color: #99f (at active-before boundary with inclusive endpoint) + --> + <div id="scroller-2" class="scroller"> + <div class="box"></div> + <div class="box"></div> + <div class="spacer"></div> + </div> + <br> + <!-- scroll to midpoint + top-box: + transform: none (after phase) + bg-color: gray (at active-after boundary with exclusive endpoint) + bottom-box: + transform: none (at active-after boundary with exclusive endpoint) + bg-color: #99f (at active-before boundary with inclusive endpoint) + --> + <div id="scroller-3" class="scroller"> + <div class="spacer"></div> + <div class="box"></div> + <div class="box"></div> + <div class="spacer"></div> + </div> + <!-- scroll to bottom + reverse + top-box: + transform: none (before phase) + bg-color: gray (at active-before boundary with exclusive endpoint) + bottom-box: + transform: none (at active-before boundary with exclusive endpoint) + bg-color: #9f9 (at active-after boundary with inclusive endpoint) + --> + <div id="scroller-4" class="scroller"> + <div class="spacer"></div> + <div class="box reverse"></div> + <div class="box reverse"></div> + </div> + <br> + <!-- scroll to top + reverse + top-box: + transform: none (before phase) + bg-color: #99f (at active-before boundary with inclusive endpoint) + bottom-box: + transform: 25px (at active-before boundary with inclusive endpoint) + bg-color: #9f9 (at active-after boundary with inclusive endpoint) + --> + <div id="scroller-5" class="scroller"> + <div class="box reverse"></div> + <div class="box reverse"></div> + <div class="spacer"></div> + </div> + <!-- scroll to midpoint + reverse + top-box: + transform: none (before phase) + bg-color: gray (at active-before boundary with exclusive endpoint) + bottom-box: + transform: none (at active-before boundary with exclusive endpoint) + bg-color: #9f9 (at active-before boundary with inclusive endpoint) + --> + <div id="scroller-6" class="scroller"> + <div class="spacer"></div> + <div class="box reverse"></div> + <div class="box reverse"></div> + <div class="spacer"></div> + </div> +</body> +<script src="/common/reftest-wait.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script> + function scrollTo(scroller_id, relative_offset) { + const scroller = document.getElementById(scroller_id); + const max_scroll = scroller.scrollHeight - scroller.clientHeight; + scroller.scrollTop = relative_offset * max_scroll; + } + + window.onload = async () => { + await waitForCompositorReady(); + document.querySelectorAll('.reverse').forEach(elem => { + elem.getAnimations().forEach(anim => { + anim.reverse(); + }); + }); + // Playing forward + scrollTo('scroller-1', 1); + scrollTo('scroller-2', 0); + scrollTo('scroller-3', 0.5); + // Playing reverse + scrollTo('scroller-4', 1); + scrollTo('scroller-5', 0); + scrollTo('scroller-6', 0.5); + await waitForNextFrame(); + takeScreenshot(); + }; +</script> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-1.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-1.html new file mode 100644 index 00000000000..d8756769c51 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-1.html @@ -0,0 +1,120 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* top-sticky during entry */ +.stickycase1 { + background: yellow; + position: sticky; + top: 400px; + height: 200px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 100px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase1"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const STATIC_END = 850; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const TARGET_HEIGHT = 100; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline top-sticky during entry.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-2.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-2.html new file mode 100644 index 00000000000..2d098dcbe30 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-2.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* bottom-sticky during entry and top-sticky during exit */ +.stickycase2 { + background: yellow; + position: sticky; + top: -100px; + bottom: -100px; + height: 200px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 100px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase2"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const STATIC_END = 850; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const TARGET_HEIGHT = 100; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + TARGET_HEIGHT, + endOffset: STATIC_END - TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: STATIC_END - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_END - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline bottom-sticky during entry and top-sticky during exit.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-3.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-3.html new file mode 100644 index 00000000000..c87dfc4dcb7 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-3.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* top-sticky and bottom-sticky during entry */ +.stickycase3 { + background: yellow; + position: sticky; + top: 375px; + bottom: -125px; + height: 200px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 100px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase3"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const STATIC_END = 850; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const TARGET_HEIGHT = 100; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline top-sticky and bottom-sticky during entry.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-4.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-4.html new file mode 100644 index 00000000000..f6b02ffb2ee --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-4.html @@ -0,0 +1,120 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* top-sticky before entry */ +.stickycase4 { + background: yellow; + position: sticky; + top: 600px; + height: 200px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 100px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase4"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const STATIC_END = 850; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const TARGET_HEIGHT = 100; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START + ROOM_BELOW, + endOffset: STATIC_START + ROOM_BELOW + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_END + ROOM_BELOW - TARGET_HEIGHT, + endOffset: STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline top-sticky before entry.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-5.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-5.html new file mode 100644 index 00000000000..380c01297e1 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-5.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* bottom-sticky before entry and top-sticky after exit */ +.stickycase5 { + background: yellow; + position: sticky; + top: -200px; + bottom: -200px; + height: 200px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 100px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase5"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const STATIC_END = 850; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const TARGET_HEIGHT = 100; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_END, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + TARGET_HEIGHT, + endOffset: STATIC_END - TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_START + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START, + endOffset: STATIC_START + TARGET_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: STATIC_END - TARGET_HEIGHT, + endOffset: STATIC_END, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_END - TARGET_HEIGHT, + endOffset: STATIC_END, + axis: 'block' + }); +}, 'View timeline bottom-sticky before entry and top-sticky after exit.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-6.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-6.html new file mode 100644 index 00000000000..94f0abc9b1e --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-6.html @@ -0,0 +1,127 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* target > viewport, bottom-sticky during entry and top-sticky during exit */ +.stickycase6 { + background: yellow; + position: sticky; + top: -200px; + bottom: -200px; + height: 700px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 600px; +} + +.space:has(.stickycase6), +.space:has(.stickycase7) { + height: 1050px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase6"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const BIG_TARGET_STATIC_END = 1350; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const BIG_TARGET_HEIGHT = 600; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START + VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END - VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START + VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: BIG_TARGET_STATIC_END - VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: BIG_TARGET_STATIC_END - VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START + VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline target > viewport, ' + + 'bottom-sticky during entry and top-sticky during exit.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-7.html b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-7.html new file mode 100644 index 00000000000..83115249fae --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/sticky/view-timeline-sticky-offscreen-7.html @@ -0,0 +1,128 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky during entry/exit</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 550px; +} + +/* target > viewport, bottom-sticky and top-sticky during contain */ +.stickycase7 { + background: yellow; + position: sticky; + top: -100px; + bottom: -100px; + height: 700px; +} + +#target { + position: relative; + top: 50px; + background: orange; + height: 600px; +} + +.space:has(.stickycase6), +.space:has(.stickycase7) { + height: 1050px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 150px"></div> + <div id="sticky" class="stickycase7"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +// The "cover" range would be [STATIC_START, STATIC_END] if we ignored +// stickiness (i.e., considered only static position). +// +// STATIC_START = scroll distance to second spacer (50px) +// + position of sticky element within its container (150px) +// + position of target within sticky element (50px) +// STATIC_END = STATIC_START +// + viewport height (500px) +// + target height (100px) +const STATIC_START = 250; +const BIG_TARGET_STATIC_END = 1350; + +// This is how far the sticky element can move upwards when bottom-stuck. +const ROOM_ABOVE = 150; + +// This is how far the sticky element can move downwards when top-stuck. +const ROOM_BELOW = 200; + +const BIG_TARGET_HEIGHT = 600; +const VIEWPORT_HEIGHT = 500; + +promise_test(async t => { + sticky.className = "stickycase7"; + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE + VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW - VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: STATIC_START - ROOM_ABOVE + VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW - VIEWPORT_HEIGHT, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: BIG_TARGET_STATIC_END + ROOM_BELOW - VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: STATIC_START - ROOM_ABOVE + VIEWPORT_HEIGHT, + endOffset: BIG_TARGET_STATIC_END + ROOM_BELOW, + axis: 'block' + }); +}, 'View timeline target > viewport, ' + + 'bottom-sticky and top-sticky during contain.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/service-workers/service-worker/resources/fetch-access-control.py b/tests/wpt/tests/service-workers/service-worker/resources/fetch-access-control.py index 446af87b249..380a7d62225 100644 --- a/tests/wpt/tests/service-workers/service-worker/resources/fetch-access-control.py +++ b/tests/wpt/tests/service-workers/service-worker/resources/fetch-access-control.py @@ -35,8 +35,13 @@ def main(request, response): return headers, body if b"VIDEO" in request.GET: - headers.append((b"Content-Type", b"video/ogg")) - body = open(os.path.join(request.doc_root, u"media", u"movie_5.ogv"), "rb").read() + if b"mp4" in request.GET: + headers.append((b"Content-Type", b"video/mp4")) + body = open(os.path.join(request.doc_root, u"media", u"movie_5.mp4"), "rb").read() + else: + headers.append((b"Content-Type", b"video/ogg")) + body = open(os.path.join(request.doc_root, u"media", u"movie_5.ogv"), "rb").read() + length = len(body) # If "PartialContent" is specified, the requestor wants to test range # requests. For the initial request, respond with "206 Partial Content" diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js index f012d2d0e41..311d37f0a01 100644 --- a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js +++ b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js @@ -340,14 +340,9 @@ function test_prerender_defer(fn, label) { * @param {RemoteContextConfig|object} extraConfig * @returns {Promise<RemoteContextWrapper>} */ -async function addPrerenderRC(referrerRemoteContext, extraConfig) { - let savedURL; - const prerenderedRC = await referrerRemoteContext.helper.createContext({ +function addPrerenderRC(referrerRemoteContext, extraConfig) { + return referrerRemoteContext.helper.createContext({ executorCreator(url) { - // Save the URL which the remote context helper framework assembled for - // us, so that we can attach it to the returned `RemoteContextWrapper`. - savedURL = url; - return referrerRemoteContext.executeScript(url => { const script = document.createElement("script"); script.type = "speculationrules"; @@ -363,9 +358,6 @@ async function addPrerenderRC(referrerRemoteContext, extraConfig) { }, [url]); }, extraConfig }); - - prerenderedRC.url = savedURL; - return prerenderedRC; } /** diff --git a/tests/wpt/tests/streams/readable-streams/bad-strategies.any.js b/tests/wpt/tests/streams/readable-streams/bad-strategies.any.js index 521fbffe3ab..409c63b8177 100644 --- a/tests/wpt/tests/streams/readable-streams/bad-strategies.any.js +++ b/tests/wpt/tests/streams/readable-streams/bad-strategies.any.js @@ -149,7 +149,9 @@ promise_test(() => { } ); - promises.push(rs.getReader().closed.catch(e => { + promises.push(rs.getReader().closed.then(() => { + assert_unreached('closed didn\'t throw'); + }, e => { assert_equals(e, theError, 'closed should reject with the error for ' + size); })); } @@ -157,3 +159,40 @@ promise_test(() => { return Promise.all(promises); }, 'Readable stream: invalid strategy.size return value'); + +promise_test(() => { + + const promises = []; + for (const size of [NaN, -Infinity, Infinity, -1]) { + let theError; + const rs = new ReadableStream( + { + pull(c) { + try { + c.enqueue('hi'); + assert_unreached('enqueue didn\'t throw'); + } catch (error) { + assert_equals(error.name, 'RangeError', 'enqueue should throw a RangeError for ' + size); + theError = error; + } + } + }, + { + size() { + return size; + }, + highWaterMark: 5 + } + ); + + promises.push(rs.getReader().closed.then(() => { + assert_unreached('closed didn\'t throw'); + }, e => { + assert_equals(e, theError, 'closed should reject with the error for ' + size); + })); + } + + return Promise.all(promises); + +}, 'Readable stream: invalid strategy.size return value when pulling'); + diff --git a/tests/wpt/tests/svg/types/scripted/SVGLength-px-with-context.html b/tests/wpt/tests/svg/types/scripted/SVGLength-px-with-context.html index 067948d5454..b5c2149b692 100644 --- a/tests/wpt/tests/svg/types/scripted/SVGLength-px-with-context.html +++ b/tests/wpt/tests/svg/types/scripted/SVGLength-px-with-context.html @@ -5,14 +5,14 @@ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <p></p> <script> -var cssPixelsPerInch = 96; +const cssPixelsPerInch = 96; setup(function() { // Setup a real SVG document, so SVGLength can resolve relative units. - var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + let svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); svgElement.setAttribute("width", "150"); svgElement.setAttribute("height", "50"); svgElement.setAttribute("viewBox", "0 0 150 50"); - var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + let rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect"); rectElement.setAttribute("style", "visibility: hidden; font-size: 12px; font-family: Ahem;"); svgElement.appendChild(rectElement); document.querySelector("p").appendChild(svgElement); @@ -76,6 +76,17 @@ test(function() { }, document.title + " , exs"); test(function() { + length.valueAsString = "2px"; + length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EXS); + document.documentElement.setAttribute("style", "writing-mode: vertical-rl;"); + // flush layout + document.body.offsetWidth; + document.documentElement.removeAttribute("style"); + // value should be correct without flushing layout + assert_approx_equals(length.value, 2.0, 0.1); +}, document.title + ", exs (check style flush)"); + +test(function() { length.valueAsString = "48px"; length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_CM); var referenceValue = 48 * 2.54 / cssPixelsPerInch; @@ -124,4 +135,4 @@ test(function() { assert_equals(length.value, 16); assert_equals(length.unitType, SVGLength.SVG_LENGTHTYPE_PC); }, document.title + ", pc"); -</script>
\ No newline at end of file +</script> diff --git a/tests/wpt/tests/svg/types/scripted/SVGLength-px.html b/tests/wpt/tests/svg/types/scripted/SVGLength-px.html index 321be5912b8..25ce286197a 100644 --- a/tests/wpt/tests/svg/types/scripted/SVGLength-px.html +++ b/tests/wpt/tests/svg/types/scripted/SVGLength-px.html @@ -106,6 +106,9 @@ test(function() { referenceValue = 48 / 4; assert_equals(length.valueAsString, referenceValue + "mm"); assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01); + length.value = valueInPx("12q"); + referenceValue = 3; + assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01); }, document.title + ", q"); test(function() { diff --git a/tests/wpt/tests/tools/manifest/commands.json b/tests/wpt/tests/tools/manifest/commands.json index 769675e0ee4..cef6d22473b 100644 --- a/tests/wpt/tests/tools/manifest/commands.json +++ b/tests/wpt/tests/tools/manifest/commands.json @@ -19,5 +19,12 @@ "parser": "create_parser", "help": "Print test paths given a set of test ids", "virtualenv": false + }, + "spec": { + "path": "spec.py", + "script": "run", + "parser": "create_parser", + "help": "Update the SPEC_MANIFEST.json file", + "virtualenv": false } } diff --git a/tests/wpt/tests/tools/manifest/item.py b/tests/wpt/tests/tools/manifest/item.py index 500ca109a74..86f7bd6020b 100644 --- a/tests/wpt/tests/tools/manifest/item.py +++ b/tests/wpt/tests/tools/manifest/item.py @@ -340,3 +340,37 @@ class SupportFile(ManifestItem): @property def id(self) -> Text: return self.path + + +class SpecItem(ManifestItem): + __slots__ = ("specs") + + item_type = "spec" + + def __init__(self, + tests_root: Text, + path: Text, + specs: List[Text] + ) -> None: + super().__init__(tests_root, path) + self.specs = specs + + @property + def id(self) -> Text: + return self.path + + def to_json(self) -> Tuple[Optional[Text], Dict[Text, Any]]: + rv: Tuple[Optional[Text], Dict[Any, Any]] = (None, {}) + for i in range(len(self.specs)): + spec_key = f"spec_link{i+1}" + rv[-1][spec_key] = self.specs[i] + return rv + + @classmethod + def from_json(cls, + manifest: "Manifest", + path: Text, + obj: Any + ) -> "ManifestItem": + """Not properly implemented and is not used.""" + return cls("/", "", []) diff --git a/tests/wpt/tests/tools/manifest/manifest.py b/tests/wpt/tests/tools/manifest/manifest.py index f602727cb09..0b00c71ac51 100644 --- a/tests/wpt/tests/tools/manifest/manifest.py +++ b/tests/wpt/tests/tools/manifest/manifest.py @@ -4,7 +4,7 @@ from atomicwrites import atomic_write from copy import deepcopy from logging import Logger from multiprocessing import Pool, cpu_count -from typing import (Any, Container, Dict, IO, Iterator, Iterable, Optional, Set, Text, Tuple, Type, +from typing import (Any, Callable, Container, Dict, IO, Iterator, Iterable, Optional, Set, Text, Tuple, Type, Union) from . import jsonlib @@ -15,6 +15,7 @@ from .item import (ConformanceCheckerTest, ManualTest, PrintRefTest, RefTest, + SpecItem, SupportFile, TestharnessTest, VisualTest, @@ -48,16 +49,28 @@ item_classes: Dict[Text, Type[ManifestItem]] = {"testharness": TestharnessTest, "wdspec": WebDriverSpecTest, "conformancechecker": ConformanceCheckerTest, "visual": VisualTest, + "spec": SpecItem, "support": SupportFile} -def compute_manifest_items(source_file: SourceFile) -> Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]: +def compute_manifest_items(source_file: SourceFile) -> Optional[Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]]: rel_path_parts = source_file.rel_path_parts new_type, manifest_items = source_file.manifest_items() file_hash = source_file.hash return rel_path_parts, new_type, set(manifest_items), file_hash +def compute_manifest_spec_items(source_file: SourceFile) -> Optional[Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]]: + spec_tuple = source_file.manifest_spec_items() + if not spec_tuple: + return None + + new_type, manifest_items = spec_tuple + rel_path_parts = source_file.rel_path_parts + file_hash = source_file.hash + return rel_path_parts, new_type, set(manifest_items), file_hash + + ManifestDataType = Dict[Any, TypeData] @@ -127,7 +140,8 @@ class Manifest: if path[:tpath_len] == tpath: yield from tests - def update(self, tree: Iterable[Tuple[Text, Optional[Text], bool]], parallel: bool = True) -> bool: + def update(self, tree: Iterable[Tuple[Text, Optional[Text], bool]], parallel: bool = True, + update_func: Callable[..., Any] = compute_manifest_items) -> bool: """Update the manifest given an iterable of items that make up the updated manifest. The iterable must either generate tuples of the form (SourceFile, True) for paths @@ -189,7 +203,6 @@ class Manifest: logger.debug("Computing manifest update for %s items" % len(to_update)) changed = True - # 25 items was derived experimentally (2020-01) to be approximately the # point at which it is quicker to create a Pool and parallelize update. pool = None @@ -211,16 +224,18 @@ class Manifest: chunksize = max(1, len(to_update) // 10000) logger.debug("Doing a multiprocessed update. CPU count: %s, " "processes: %s, chunksize: %s" % (cpu_count(), processes, chunksize)) - results: Iterator[Tuple[Tuple[Text, ...], + results: Iterator[Optional[Tuple[Tuple[Text, ...], Text, - Set[ManifestItem], Text]] = pool.imap_unordered( - compute_manifest_items, + Set[ManifestItem], Text]]] = pool.imap_unordered( + update_func, to_update, chunksize=chunksize) else: - results = map(compute_manifest_items, to_update) + results = map(update_func, to_update) for result in results: + if not result: + continue rel_path_parts, new_type, manifest_items, file_hash = result data[new_type][rel_path_parts] = manifest_items data[new_type].hashes[rel_path_parts] = file_hash diff --git a/tests/wpt/tests/tools/manifest/sourcefile.py b/tests/wpt/tests/tools/manifest/sourcefile.py index 386833722e7..cf0bbf334b7 100644 --- a/tests/wpt/tests/tools/manifest/sourcefile.py +++ b/tests/wpt/tests/tools/manifest/sourcefile.py @@ -22,6 +22,7 @@ from .item import (ConformanceCheckerTest, ManualTest, PrintRefTest, RefTest, + SpecItem, SupportFile, TestharnessTest, VisualTest, @@ -1058,3 +1059,15 @@ class SourceFile: del self.__dict__["__cached_properties__"] return rv + + def manifest_spec_items(self) -> Optional[Tuple[Text, List[ManifestItem]]]: + specs = list(self.spec_links) + if not specs: + return None + rv: Tuple[Text, List[ManifestItem]] = (SpecItem.item_type, [ + SpecItem( + self.tests_root, + self.rel_path, + specs + )]) + return rv diff --git a/tests/wpt/tests/tools/manifest/spec.py b/tests/wpt/tests/tools/manifest/spec.py new file mode 100644 index 00000000000..5148fceb3e6 --- /dev/null +++ b/tests/wpt/tests/tools/manifest/spec.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +import argparse +import os +from typing import Any, Optional, Text + +from . import vcs +from .manifest import compute_manifest_spec_items, InvalidCacheError, Manifest, write +from .log import get_logger, enable_debug_logging + + +here = os.path.dirname(__file__) + +wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) + +logger = get_logger() + + +def update_spec(tests_root: Text, + manifest_path: Text, + url_base: Text, + cache_root: Optional[Text] = None, + working_copy: bool = True, + parallel: bool = True + ) -> None: + + manifest = Manifest(tests_root, url_base) + + logger.info("Updating SPEC_MANIFEST") + try: + tree = vcs.get_tree(tests_root, manifest, manifest_path, cache_root, + working_copy, True) + changed = manifest.update(tree, parallel, compute_manifest_spec_items) + except InvalidCacheError: + logger.error("Manifest cache in spec.py was invalid.") + return + + if changed: + write(manifest, manifest_path) + tree.dump_caches() + + +def update_from_cli(**kwargs: Any) -> None: + tests_root = kwargs["tests_root"] + path = kwargs["path"] + assert tests_root is not None + + update_spec(tests_root, + path, + kwargs["url_base"], + cache_root=kwargs["cache_root"], + parallel=kwargs["parallel"]) + + +def abs_path(path: str) -> str: + return os.path.abspath(os.path.expanduser(path)) + + +def create_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser() + parser.add_argument( + "-v", "--verbose", dest="verbose", action="store_true", default=False, + help="Turn on verbose logging") + parser.add_argument( + "-p", "--path", type=abs_path, help="Path to manifest file.") + parser.add_argument( + "--tests-root", type=abs_path, default=wpt_root, help="Path to root of tests.") + parser.add_argument( + "--url-base", action="store", default="/", + help="Base url to use as the mount point for tests in this manifest.") + parser.add_argument( + "--cache-root", action="store", default=os.path.join(wpt_root, ".wptcache"), + help="Path in which to store any caches (default <tests_root>/.wptcache/)") + parser.add_argument( + "--no-parallel", dest="parallel", action="store_false", default=True, + help="Do not parallelize building the manifest") + return parser + + +def run(*args: Any, **kwargs: Any) -> None: + if kwargs["path"] is None: + kwargs["path"] = os.path.join(kwargs["tests_root"], "SPEC_MANIFEST.json") + if kwargs["verbose"]: + enable_debug_logging() + update_from_cli(**kwargs) diff --git a/tests/wpt/tests/tools/manifest/tests/test_manifest.py b/tests/wpt/tests/tools/manifest/tests/test_manifest.py index 91b39f213a8..fc2314b8356 100644 --- a/tests/wpt/tests/tools/manifest/tests/test_manifest.py +++ b/tests/wpt/tests/tools/manifest/tests/test_manifest.py @@ -308,3 +308,30 @@ def test_update_from_json_modified(): 'url_base': '/', 'version': 8 } + +def test_manifest_spec_to_json(): + m = manifest.Manifest("") + + path = "a" + os.path.sep + "b" + hash = "0"*40 + rel_path_parts = tuple(path.split(os.path.sep)) + s = mock.Mock(rel_path=path, + rel_path_parts=rel_path_parts, + hash=hash) + spec = item.SpecItem("/foobar", path, ["specA"]) + s.manifest_spec_items = mock.Mock(return_value=(item.SpecItem.item_type, [spec])) + + tree, sourcefile_mock = tree_and_sourcefile_mocks([(s, None, True)]) + with mock.patch("tools.manifest.manifest.SourceFile", side_effect=sourcefile_mock): + assert m.update(tree, True, manifest.compute_manifest_spec_items) is True + + assert m.to_json() == { + 'version': 8, + 'url_base': '/', + 'items': { + 'spec': {'a': {'b': [ + '0000000000000000000000000000000000000000', + (None, {'spec_link1': 'specA'}) + ]}}, + } + } diff --git a/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py b/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py index c0b281d244c..d3411084f3c 100644 --- a/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py +++ b/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py @@ -808,6 +808,21 @@ def test_spec_links_whitespace(url): assert s.spec_links == {"http://example.com/"} +@pytest.mark.parametrize("input,expected", [ + (b"""<link rel="help" title="Intel" href="foo">\n""", ["foo"]), + (b"""<link rel=help title="Intel" href="foo">\n""", ["foo"]), + (b"""<link rel=help href="foo" >\n""", ["foo"]), + (b"""<link rel="author" href="foo">\n""", []), + (b"""<link href="foo">\n""", []), + (b"""<link rel="help" href="foo">\n<link rel="help" href="bar">\n""", ["foo", "bar"]), + (b"""<link rel="help" href="foo">\n<script>\n""", ["foo"]), + (b"""random\n""", []), +]) +def test_spec_links_complex(input, expected): + s = create("foo/test.html", input) + assert s.spec_links == set(expected) + + def test_url_base(): contents = b"""// META: global=window,worker // META: variant= diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py index 9bb03b34f96..c0505dde1d1 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py @@ -134,15 +134,20 @@ class BidiSession: async def __aexit__(self, *args: Any) -> None: await self.end() + async def start_transport(self, + loop: Optional[asyncio.AbstractEventLoop] = None) -> None: + if self.transport is None: + if loop is None: + loop = get_running_loop() + + self.transport = Transport(self.websocket_url, self.on_message, loop=loop) + await self.transport.start() + async def start(self, loop: Optional[asyncio.AbstractEventLoop] = None) -> None: """Connect to the WebDriver BiDi remote via WebSockets""" - if loop is None: - loop = get_running_loop() - - self.transport = Transport(self.websocket_url, self.on_message, loop=loop) - await self.transport.start() + await self.start_transport(loop) if self.session_id is None: self.session_id, self.capabilities = await self.session.new( # type: ignore diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py index 21c9f720a8e..b681660f1a8 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py @@ -35,6 +35,10 @@ class InvalidArgumentException(BidiException): error_code = "invalid argument" +class InvalidSessionIDError(BidiException): + error_code = "invalid session id" + + class MoveTargetOutOfBoundsException(BidiException): error_code = "move target out of bounds" diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/_module.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/_module.py index e28a83584a8..060010b2a33 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/_module.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/_module.py @@ -1,3 +1,4 @@ +import asyncio import functools from typing import ( Any, @@ -73,7 +74,10 @@ class command: if result_fn is not None and not raw_result: # Convert the result if we have a conversion function defined - result = result_fn(self, result) + if asyncio.iscoroutinefunction(result_fn): + result = await result_fn(self, result) + else: + result = result_fn(self, result) return result # Overwrite the method on the owner class with the wrapper diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py index f2abb4764e2..a9b8d3f7682 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py @@ -127,3 +127,7 @@ class BrowsingContext(BidiModule): def _print(self, result: Mapping[str, Any]) -> Any: assert result["data"] is not None return result["data"] + + @command + def set_viewport(self, context: str, viewport: Optional[Mapping[str, Any]] = None) -> Mapping[str, Any]: + return {"context": context, "viewport": viewport} diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/session.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/session.py index cdcef11b94f..fe1c0385105 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/session.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/session.py @@ -5,6 +5,17 @@ from ._module import BidiModule, command class Session(BidiModule): @command + def end(self) -> Mapping[str, Any]: + return {} + + @end.result + async def _end(self, result: Mapping[str, Any]) -> Any: + if self.session.transport: + await self.session.transport.wait_closed() + + return result + + @command def new(self, capabilities: Mapping[str, Any]) -> Mapping[str, Mapping[str, Any]]: params: MutableMapping[str, Any] = {} params["capabilities"] = capabilities @@ -15,6 +26,10 @@ class Session(BidiModule): return result.get("sessionId"), result.get("capabilities", {}) @command + def status(self) -> Mapping[str, Any]: + return {} + + @command def subscribe(self, events: List[str], contexts: Optional[List[str]] = None) -> Mapping[str, Any]: diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/transport.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/transport.py index 2d5d8ee9224..d61ebaddea7 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/transport.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/transport.py @@ -74,3 +74,7 @@ class Transport: if not isinstance(msg, str): raise ValueError("Got a binary message") await self.handle(msg) + + async def wait_closed(self) -> None: + if self.connection and not self.connection.closed: + await self.connection.wait_closed() diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py index 7065d07a647..bf69e8f6083 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py @@ -69,7 +69,8 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs): "install_fonts": kwargs["install_fonts"], "tests_root": config.doc_root, "specialpowers_path": kwargs["specialpowers_path"], - "debug_test": kwargs["debug_test"]} + "debug_test": kwargs["debug_test"], + "env_extras": dict([x.split('=') for x in kwargs.get("env", [])])} def executor_kwargs(logger, test_type, test_environment, run_info_data, @@ -98,8 +99,10 @@ def env_options(): "supports_debugger": True} -def get_environ(chaos_mode_flags): +def get_environ(chaos_mode_flags, env_extras=None): env = {} + if env_extras is not None: + env.update(env_extras) env["MOZ_CRASHREPORTER"] = "1" env["MOZ_CRASHREPORTER_SHUTDOWN"] = "1" env["MOZ_DISABLE_NONLOCAL_CONNECTIONS"] = "1" @@ -191,6 +194,7 @@ class FirefoxAndroidBrowser(Browser): self.marionette_port = None self.profile = None self.runner = None + self.env_extras = kwargs["env_extras"] self._settings = {} def settings(self, test): @@ -226,7 +230,7 @@ class FirefoxAndroidBrowser(Browser): [cmd_arg("marionette"), "about:blank"], self.debug_info) - env = get_environ(self.chaos_mode_flags) + env = get_environ(self.chaos_mode_flags, self.env_extras) self.runner = FennecEmulatorRunner(app=self.package_name, profile=self.profile, diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py index c537e8271c7..17be0cec39f 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py @@ -739,23 +739,22 @@ class CallbackHandler: def process_action(self, url, payload): action = payload["action"] cmd_id = payload["id"] - self.logger.debug("Got action: %s" % action) + self.logger.debug(f"Got action: {action}") try: action_handler = self.actions[action] except KeyError: - raise ValueError("Unknown action %s" % action) + raise ValueError(f"Unknown action {action}") try: with ActionContext(self.logger, self.protocol, payload.get("context")): result = action_handler(payload) except self.unimplemented_exc: self.logger.warning("Action %s not implemented" % action) - self._send_message(cmd_id, "complete", "error", "Action %s not implemented" % action) + self._send_message(cmd_id, "complete", "error", f"Action {action} not implemented") except self.expected_exc: - self.logger.debug("Action %s failed with an expected exception" % action) - self._send_message(cmd_id, "complete", "error") + self.logger.debug(f"Action {action} failed with an expected exception") + self._send_message(cmd_id, "complete", "error", f"Action {action} failed") except Exception: - self.logger.error("Action %s failed" % action) - self.logger.warning(traceback.format_exc()) + self.logger.warning(f"Action {action} failed") self._send_message(cmd_id, "complete", "error") raise else: diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 9c9c18735a6..95f18608204 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -73,10 +73,9 @@ def _switch_to_window(marionette, handle): class MarionetteCallbackHandler(CallbackHandler): - def __init__(self, logger, protocol, test_window): MarionetteCallbackHandler.expected_exc = (errors.MarionetteException,) - super().__init__(self, logger, protocol, test_window) + super().__init__(logger, protocol, test_window) class MarionetteBaseProtocolPart(BaseProtocolPart): @@ -972,7 +971,7 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): if self.debug_test and self.browser.supports_devtools: self.protocol.debug.load_devtools() - handler = CallbackHandler(self.logger, protocol, test_window) + handler = MarionetteCallbackHandler(self.logger, protocol, test_window) protocol.marionette.navigate(url) while True: result = protocol.base.execute_script( diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/tests/tools/wptrunner/wptrunner/wptcommandline.py index d4950e14c0c..875ba7e66a9 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -340,6 +340,10 @@ scheme host and port.""") "(see http://searchfox.org/mozilla-central/source/mfbt/ChaosMode.h for " "details). If no value is supplied, all features are activated") + gecko_view_group = parser.add_argument_group("GeckoView-specific") + gecko_view_group.add_argument("--setenv", dest="env", action="append", default=[], + help="Set target environment variable, like FOO=BAR") + servo_group = parser.add_argument_group("Servo-specific") servo_group.add_argument("--user-stylesheet", default=[], action="append", dest="user_stylesheets", diff --git a/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect-ref.html b/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect-ref.html new file mode 100644 index 00000000000..792ca214cfb --- /dev/null +++ b/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<style> +div { + width: 100px; + height: 100px; + background: green; +} +</style> +<div></div> diff --git a/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect.html b/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect.html new file mode 100644 index 00000000000..bef3bd3e8d2 --- /dev/null +++ b/tests/wpt/tests/web-animations/animation-model/keyframe-effects/effect-value-opacity-replaced-effect.html @@ -0,0 +1,32 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<meta charset=utf-8> +<title>The effect value of consecutive animations targeting 'opacity'</title> +<link rel="help" href="https://drafts.csswg.org/web-animations/"> +<link rel="match" href="effect-value-opacity-replaced-effect-ref.html"> +<style> +div { + width: 100px; + height: 100px; + background: green; + will-change: opacity; +} +</style> +</head> +<body> +<div></div> +<script> +'use strict'; + +(async function () { + const div = document.querySelector('div'); + + await div.animate({ opacity: [1, 0] }, { duration: 10, fill: 'both' }).finished; + await div.animate({ opacity: [0, 1] }, { duration: 10, fill: 'both' }).finished; + + document.documentElement.classList.remove("reftest-wait"); +})(); +</script> +</body> +</html> diff --git a/tests/wpt/tests/web-animations/testcommon.js b/tests/wpt/tests/web-animations/testcommon.js index 8597ca28df9..a106cd9ac67 100644 --- a/tests/wpt/tests/web-animations/testcommon.js +++ b/tests/wpt/tests/web-animations/testcommon.js @@ -288,7 +288,12 @@ function assert_rotate3d_equals(actual, expected, description) { function assert_phase_at_time(animation, phase, currentTime) { animation.currentTime = currentTime; + assert_phase(animation, phase); +} + +function assert_phase(animation, phase) { const fillMode = animation.effect.getTiming().fill; + const currentTime = animation.currentTime; if (phase === 'active') { // If the fill mode is 'none', then progress will only be non-null if we diff --git a/tests/wpt/tests/web-locks/partitioned-web-locks.tentative.https.html b/tests/wpt/tests/web-locks/partitioned-web-locks.tentative.https.html index 2f166e67bc1..680474dea98 100644 --- a/tests/wpt/tests/web-locks/partitioned-web-locks.tentative.https.html +++ b/tests/wpt/tests/web-locks/partitioned-web-locks.tentative.https.html @@ -29,10 +29,10 @@ let next_lock_id = 1; // back to the pop-up. // Step 6 (pop-up): intercept the result message from the iframe and // send it to the top-frame. -// Step 7 (top-frame): ensure that the same-site iframe's web-lock +// Step 7 (top-frame): add cleanup hook. +// Step 8 (top-frame): ensure that the same-site iframe's web-lock // request succeeds since it and the top-level site are successfully // partitioned and each can hold an exclusive lock. -// Step 8 (top-frame): clean up. async function third_party_test(t) { let target_url = HTTPS_ORIGIN + '/web-locks/resources/iframe.html'; @@ -59,19 +59,19 @@ async function third_party_test(t) { const result = await new Promise(resolve => window.onmessage = resolve); // Step 7. - // When 3rd party storage partitioning is enabled, the iframe should be able - // to aquire a lock with the same name as one exclusively held by the opener - // of its top window, even when that opener has the same origin. - assert_equals(result.data.failed, undefined, - 'The 1p iframe failed to acquire the lock'); - - // Step 8. t.add_cleanup(() => { w.close() for(let i = 1; i < next_lock_id; i++){ held.get(i)(); } }); + + // Step 8. + // When 3rd party storage partitioning is enabled, the iframe should be able + // to acquire a lock with the same name as one exclusively held by the opener + // of its top window, even when that opener has the same origin. + assert_equals(result.data.failed, undefined, + 'The 1p iframe failed to acquire the lock'); } promise_test(t => { @@ -101,10 +101,10 @@ promise_test(t => { // child iframe and send it to the pop-up. // Nested Step 9 (pop-up): intercept the result message from the parent // iframe and send it to the top frame. -// Nested Step 10 (top frame): ensure that the same-site iframe's web-lock +// Nested Step 10 (top frame): add cleanup hook +// Nested Step 11 (top frame): ensure that the same-site iframe's web-lock // request succeeds since it and the top-level are successfully // partitioned and each can hold an exclusive lock. -// Nested Step 11 (top frame): clean up. // Map of lock_id => function that releases a lock. const held_2 = new Map(); @@ -145,19 +145,19 @@ async function nested_iframe_test(t) { const result = await new Promise(resolve => window.onmessage = resolve); // Nested Step 10. - // With third-party storage partitioning enabled, the same-site iframe - // should be able to acquire the lock as it has a cross-site ancestor - // and is partitioned separately from the top-level site. - assert_equals(result.data.failed, undefined, - 'The 1p iframe failed to acquire the lock'); - - // Nested Step 11. t.add_cleanup(() => { w.close() for(let i = 1; i < next_lock_id_2; i++){ held_2.get(i)(); } }); + + // Nested Step 11. + // With third-party storage partitioning enabled, the same-site iframe + // should be able to acquire the lock as it has a cross-site ancestor + // and is partitioned separately from the top-level site. + assert_equals(result.data.failed, undefined, + 'The 1p iframe failed to acquire the lock'); } promise_test(t => { diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/setSinkId-with-MediaElementAudioSourceNode.https.html b/tests/wpt/tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/setSinkId-with-MediaElementAudioSourceNode.https.html new file mode 100644 index 00000000000..af71782717a --- /dev/null +++ b/tests/wpt/tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/setSinkId-with-MediaElementAudioSourceNode.https.html @@ -0,0 +1,49 @@ +<!doctype html> +<head> +<title>Test HTMLMediaElement.setSinkId() with MediaElementAudioSourceNode</title> +<link rel="help" href="https://webaudio.github.io/web-audio-api/#MediaElementAudioSourceNode"> +</head> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/resources/testdriver.js></script> +<script src=/resources/testdriver-vendor.js></script> +<script> +"use strict"; +/* +MediaElementAudioSourceNode silences HTMLMediaElement output to underlying +devices but setSinkId() should still function as if there were no +MediaElementAudioSourceNode according to +"The HTMLMediaElement MUST behave in an identical fashion after the +MediaElementAudioSourceNode has been created, except that the rendered audio +will no longer be heard directly, but instead will be heard as a consequence +of the MediaElementAudioSourceNode being connected through the routing graph." + */ + +let audio; +promise_setup(async () => { + audio = new Audio(); + audio.src = "/media/sound_5.oga"; + audio.autoplay = true; + audio.loop = true; + new AudioContext().createMediaElementSource(audio); + await new Promise(r => audio.onplay = r); +}); + +promise_test(t => audio.setSinkId(""), "setSinkId on default audio output should always work"); + +promise_test(t => promise_rejects_dom(t, "NotFoundError", audio.setSinkId("nonexistent_device_id")), + "setSinkId fails with NotFoundError on made up deviceid"); + +promise_test(async t => { + await test_driver.bless('transient activation for selectAudioOutput()'); + const {deviceId} = await navigator.mediaDevices.selectAudioOutput(); + assert_greater_than(deviceId.length, 0, "deviceId.length"); + const p1 = audio.setSinkId(deviceId); + assert_equals(audio.sinkId, "", "before it resolves, setSinkId is unchanged"); + await p1; + assert_equals(audio.sinkId, deviceId, "setSinkId updates sinkId to the requested deviceId"); + await audio.setSinkId(""); + assert_equals(audio.sinkId, "", "resetting sink ID to default audio output should always work"); +}, "setSinkId() with output device ID exposed by selectAudioOutput() should resolve"); + +</script> diff --git a/tests/wpt/tests/webcodecs/encoded-video-chunk.any.js b/tests/wpt/tests/webcodecs/encoded-video-chunk.any.js index 0cf0d8de440..9b60e59a793 100644 --- a/tests/wpt/tests/webcodecs/encoded-video-chunk.any.js +++ b/tests/wpt/tests/webcodecs/encoded-video-chunk.any.js @@ -42,4 +42,15 @@ test(t => { assert_throws_js( TypeError, () => chunk.copyTo(detached), 'destination is detached'); -}, 'Test copyTo() exception if destiation invalid');
\ No newline at end of file +}, 'Test copyTo() exception if destiation invalid'); + +test(t => { + let chunk = new EncodedVideoChunk({type: 'key', + timestamp: 10, + duration: 300, + data: new Uint8Array()}); + assert_equals(chunk.byteLength, 0, 'byteLength'); + let copyDest = new Uint8Array(); + chunk.copyTo(copyDest); + assert_equals(copyDest.length, 0, 'copyDest.length'); +}, 'Test we can construct an zero-sized EncodedVideoChunk.'); diff --git a/tests/wpt/tests/webcodecs/videoDecoder-codec-specific.https.any.js b/tests/wpt/tests/webcodecs/videoDecoder-codec-specific.https.any.js index 4e0843646b7..31e14d81f34 100644 --- a/tests/wpt/tests/webcodecs/videoDecoder-codec-specific.https.any.js +++ b/tests/wpt/tests/webcodecs/videoDecoder-codec-specific.https.any.js @@ -363,7 +363,10 @@ promise_test(async t => { const callbacks = {}; let errors = 0; - callbacks.error = e => errors++; + let gotError = new Promise(resolve => callbacks.error = e => { + errors++; + resolve(e); + }); callbacks.output = frame => { frame.close(); }; const decoder = createVideoDecoder(t, callbacks); @@ -372,9 +375,16 @@ promise_test(async t => { decoder.decode(new EncodedVideoChunk( {type: 'key', timestamp: 1, data: new ArrayBuffer(0)})); - await promise_rejects_dom(t, 'AbortError', decoder.flush()); + await promise_rejects_dom(t, "EncodingError", + decoder.flush().catch((e) => { + assert_equals(errors, 0); + throw e; + }) + ); - assert_equals(errors, 1, 'errors'); + let e = await gotError; + assert_true(e instanceof DOMException); + assert_equals(e.name, 'EncodingError'); assert_equals(decoder.state, 'closed', 'state'); }, 'Decode empty frame'); @@ -384,7 +394,10 @@ promise_test(async t => { const callbacks = {}; let errors = 0; - callbacks.error = e => errors++; + let gotError = new Promise(resolve => callbacks.error = e => { + errors++; + resolve(e); + }); let outputs = 0; callbacks.output = frame => { @@ -397,10 +410,17 @@ promise_test(async t => { decoder.decode(CHUNKS[0]); // Decode keyframe first. decoder.decode(createCorruptChunk(2)); - await promise_rejects_dom(t, 'AbortError', decoder.flush()); + await promise_rejects_dom(t, "EncodingError", + decoder.flush().catch((e) => { + assert_equals(errors, 0); + throw e; + }) + ); assert_less_than_equal(outputs, 1); - assert_equals(errors, 1, 'errors'); + let e = await gotError; + assert_true(e instanceof DOMException); + assert_equals(e.name, 'EncodingError'); assert_equals(decoder.state, 'closed', 'state'); }, 'Decode corrupt frame'); diff --git a/tests/wpt/tests/webdriver/tests/bidi/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/__init__.py index 033978e1936..82168462097 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/__init__.py @@ -86,11 +86,11 @@ async def get_device_pixel_ratio(bidi_session, context): :param bidi_session: BiDiSession :param context: Browsing context ID - :returns: (int) devicePixelRatio. + :returns: (float) devicePixelRatio. """ result = await bidi_session.script.call_function( function_declaration="""() => { - return Math.floor(window.devicePixelRatio); + return window.devicePixelRatio; }""", target=ContextTarget(context["context"]), await_promise=False) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py index c4d8dd5252c..64f25b9b861 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py @@ -1,3 +1,4 @@ +from math import floor from webdriver.bidi.modules.script import ContextTarget from ... import get_device_pixel_ratio, get_viewport_dimensions @@ -12,4 +13,4 @@ async def get_physical_viewport_dimensions(bidi_session, context): """ viewport = await get_viewport_dimensions(bidi_session, context) dpr = await get_device_pixel_ratio(bidi_session, context) - return (viewport["width"] * dpr, viewport["height"] * dpr) + return (floor(viewport["width"] * dpr), floor(viewport["height"] * dpr)) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py index 7b26b2be0ce..0ee4c8ed274 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py @@ -1,8 +1,10 @@ import pytest +from math import floor from tests.support.image import png_dimensions from . import get_physical_viewport_dimensions +from ... import get_device_pixel_ratio, get_viewport_dimensions @pytest.mark.asyncio @@ -35,3 +37,33 @@ async def test_capture(bidi_session, top_context, inline, compare_png_bidi): comparison = await compare_png_bidi(new_data, data) assert comparison.equal() + + +@pytest.mark.parametrize("delta_width", [-10, +20], ids=["width smaller", "width larger"]) +@pytest.mark.parametrize("delta_height", [-30, +40], ids=["height smaller", "height larger"]) +@pytest.mark.asyncio +async def test_capture_with_viewport(bidi_session, new_tab, delta_width, delta_height): + original_viewport = await get_viewport_dimensions(bidi_session, new_tab) + + dpr = await get_device_pixel_ratio(bidi_session, new_tab) + + test_viewport = { + "width": original_viewport["width"] + delta_width, + "height": original_viewport["height"] + delta_height + } + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + expected_size = { + "width": floor(test_viewport["width"] * dpr), + "height": floor(test_viewport["height"] * dpr) + } + + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url="about:blank", wait="complete" + ) + + result = await bidi_session.browsing_context.capture_screenshot( + context=new_tab["context"]) + assert png_dimensions(result) == (expected_size["width"], expected_size["height"]) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/about_blank.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/about_blank.py index 1f6d4774ae7..55ca3512977 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/about_blank.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/about_blank.py @@ -5,7 +5,7 @@ from . import navigate_and_assert pytestmark = pytest.mark.asyncio PAGE_ABOUT_BLANK = "about:blank" -PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html" +PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/support/empty.html" async def test_navigate_from_single_page(bidi_session, new_tab, url): diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/data_url.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/data_url.py index 8fd5695646d..6d95beb66c0 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/data_url.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/data_url.py @@ -31,7 +31,7 @@ IMG_RED_PIXEL = dataURL( None, True, ) -PAGE = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html" +PAGE = "/webdriver/tests/bidi/browsing_context/support/empty.html" TEXT_BAR = dataURL("bar", "text/plain") TEXT_FOO = dataURL("foo", "text/plain") diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/frame.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/frame.py index 2c2131b6ee6..4dcd88dfdb8 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/frame.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/frame.py @@ -33,7 +33,7 @@ async def test_multiple_frames( await navigate_and_assert(bidi_session, frame, inline(PAGE_CONTENT)) - # Make sure that the sesond frame hasn't been navigated + # Make sure that the second frame hasn't been navigated contexts = await bidi_session.browsing_context.get_tree(root=new_tab["context"]) assert contexts[0]["children"][1]["url"] == test_page2 diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/hash.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/hash.py index d4862a62012..d31c3f9a6eb 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/hash.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/hash.py @@ -4,9 +4,9 @@ from . import navigate_and_assert pytestmark = pytest.mark.asyncio -PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html" +PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/support/empty.html" PAGE_EMPTY_WITH_HASH_FOO = f"{PAGE_EMPTY}#foo" -PAGE_OTHER = "/webdriver/tests/bidi/browsing_context/navigate/support/other.html" +PAGE_OTHER = "/webdriver/tests/bidi/browsing_context/support/other.html" @pytest.mark.parametrize( diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/image.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/image.py index b52ea9787c0..79030c9fe12 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/image.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/image.py @@ -4,10 +4,10 @@ from . import navigate_and_assert pytestmark = pytest.mark.asyncio -PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html" -PNG_BLACK_DOT = "/webdriver/tests/bidi/browsing_context/navigate/support/black_dot.png" -PNG_RED_DOT = "/webdriver/tests/bidi/browsing_context/navigate/support/red_dot.png" -SVG = "/webdriver/tests/bidi/browsing_context/navigate/support/other.svg" +PAGE_EMPTY = "/webdriver/tests/bidi/browsing_context/support/empty.html" +PNG_BLACK_DOT = "/webdriver/tests/bidi/browsing_context/support/black_dot.png" +PNG_RED_DOT = "/webdriver/tests/bidi/browsing_context/support/red_dot.png" +SVG = "/webdriver/tests/bidi/browsing_context/support/other.svg" @pytest.mark.parametrize( diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/navigate.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/navigate.py index a35f2728ef7..14245702812 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/navigate.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/navigate.py @@ -35,8 +35,8 @@ async def test_interactive_simultaneous_navigation(bidi_session, inline, new_tab # interactive wait condition for both. # Make sure that monitoring the DOMContentLoaded event for one frame does # prevent monitoring it for the other frame. - img_url = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.svg" - script_url = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.js" + img_url = "/webdriver/tests/bidi/browsing_context/support/empty.svg" + script_url = "/webdriver/tests/bidi/browsing_context/support/empty.js" # frame1 also has a slow loading image so that it won't reach a complete # navigation, and we can make sure we resolved with the interactive state. frame1_url = inline( @@ -72,7 +72,7 @@ async def test_interactive_simultaneous_navigation(bidi_session, inline, new_tab async def test_relative_url(bidi_session, new_tab, url): url_before = url( - "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html" + "/webdriver/tests/bidi/browsing_context/support/empty.html" ) # Navigate to page1 with wait=interactive to make sure the document's base URI diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/wait.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/wait.py index 9a0b14e755e..3a351e10890 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/wait.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/wait.py @@ -44,8 +44,8 @@ async def test_expected_url(bidi_session, inline, new_tab, value): ], ) async def test_slow_image_blocks_load(bidi_session, inline, new_tab, wait, expect_timeout): - script_url = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.svg" - url = inline(f"<img src='{script_url}?pipe=trickle(d10)'>") + image_url = "/webdriver/tests/bidi/browsing_context/support/empty.svg" + url = inline(f"<img src='{image_url}?pipe=trickle(d10)'>") await wait_for_navigation(bidi_session, new_tab["context"], url, wait, expect_timeout) @@ -69,7 +69,7 @@ async def test_slow_image_blocks_load(bidi_session, inline, new_tab, wait, expec ) async def test_slow_page(bidi_session, new_tab, url, wait, expect_timeout): page_url = url( - "/webdriver/tests/bidi/browsing_context/navigate/support/empty.html?pipe=trickle(d10)" + "/webdriver/tests/bidi/browsing_context/support/empty.html?pipe=trickle(d10)" ) await wait_for_navigation(bidi_session, new_tab["context"], page_url, wait, expect_timeout) @@ -87,12 +87,12 @@ async def test_slow_page(bidi_session, new_tab, url, wait, expect_timeout): ], ) async def test_slow_script_blocks_domContentLoaded(bidi_session, inline, new_tab, wait, expect_timeout): - script_url = "/webdriver/tests/bidi/browsing_context/navigate/support/empty.js" + script_url = "/webdriver/tests/bidi/browsing_context/support/empty.js" url = inline(f"<script src='{script_url}?pipe=trickle(d10)'></script>") await wait_for_navigation(bidi_session, new_tab["context"], url, wait, expect_timeout) - # In theory we could also assert the top context URL has been updated here, - # but since we expect both "interactive" and "complete" to timeout the + # In theory we could also assert the top context URL has been updated here + # but since we expect both "interactive" and "complete" to timeout, the # wait_for_navigation helper will resume arbitrarily after 1 second, and # there is no guarantee that the URL has been updated. diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/frame.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/frame.py new file mode 100644 index 00000000000..ce9281583f2 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/frame.py @@ -0,0 +1,35 @@ +import pytest + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize("domain", ["", "alt"], + ids=["same_origin", "cross_origin"]) +async def test_origin(bidi_session, new_tab, inline, domain): + frame_start_url = inline("frame") + url_before = inline(f"<iframe src='{frame_start_url}'></iframe>", + domain=domain) + + # Navigate and assert (top-level). + result = await bidi_session.browsing_context.navigate( + context=new_tab['context'], url=url_before, wait="complete") + assert result["url"] == url_before + + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab['context']) + assert len(contexts) == 1 + assert contexts[0]["url"] == url_before + + assert len(contexts[0]["children"]) == 1 + frame = contexts[0]["children"][0] + assert frame["url"] == frame_start_url + + # Reload and assert (frame). + result = await bidi_session.browsing_context.reload( + context=frame['context'], wait="complete") + assert result == {} + + contexts = await bidi_session.browsing_context.get_tree( + root=frame['context']) + assert len(contexts) == 1 + assert contexts[0]["url"] == frame_start_url diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/reload.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/reload.py new file mode 100644 index 00000000000..b6e957e8a8c --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/reload.py @@ -0,0 +1,57 @@ +import pytest + +from pathlib import Path + +pytestmark = pytest.mark.asyncio + +PNG_BLACK_DOT = "/webdriver/tests/bidi/browsing_context/support/black_dot.png" + + +async def test_return_value(bidi_session, inline, new_tab): + url = inline("<div>foo</div>") + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=url) + + result = await bidi_session.browsing_context.reload( + context=new_tab["context"]) + assert result == {} + + +@pytest.mark.parametrize( + "initial_url", + [ + "about:blank", + "https://example.com/#foo", + "data:text/html,<p>foo</p>", + f'file://{Path(__file__).parent.parent.resolve() / "support/empty.html"}', + ], + ids=[ + "about:blank", + "hash", + "data url", + "file url", + ], +) +async def test_reload(bidi_session, new_tab, initial_url): + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=initial_url) + await bidi_session.browsing_context.reload(context=new_tab["context"], + wait="complete") + + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab['context']) + assert len(contexts) == 1 + assert contexts[0]["url"] == initial_url + + +async def test_image(bidi_session, new_tab, url): + initial_url = url(PNG_BLACK_DOT) + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=initial_url) + await bidi_session.browsing_context.reload(context=new_tab["context"], + wait="complete") + + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab['context']) + assert len(contexts) == 1 + assert contexts[0]["url"] == initial_url diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/wait.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/wait.py new file mode 100644 index 00000000000..2b581c2f0db --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/reload/wait.py @@ -0,0 +1,164 @@ +# META: timeout=long + +import asyncio +import pytest + +pytestmark = pytest.mark.asyncio + + +async def wait_for_reload(bidi_session, context, wait, expect_timeout): + # Ultimately, "interactive" and "complete" should support a timeout argument. + # See https://github.com/w3c/webdriver-bidi/issues/188. + if expect_timeout: + with pytest.raises(asyncio.TimeoutError): + await asyncio.wait_for( + asyncio.shield( + bidi_session.browsing_context.reload(context=context, + wait=wait)), + timeout=1, + ) + else: + await bidi_session.browsing_context.reload(context=context, wait=wait) + + +@pytest.mark.parametrize("wait", ["none", "interactive", "complete"]) +async def test_expected_url(bidi_session, inline, new_tab, wait): + url = inline("<div>foo</div>") + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=url, + wait="complete") + result = await bidi_session.browsing_context.reload( + context=new_tab["context"], wait=wait) + assert result == {} + if wait != "none": + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab["context"], max_depth=0) + assert contexts[0]["url"] == url + + +@pytest.mark.parametrize( + "wait, expect_timeout", + [ + ("none", False), + ("interactive", False), + ("complete", True), + ], +) +async def test_slow_image_blocks_load(bidi_session, inline, new_tab, wait, + expect_timeout): + + image_url = "/webdriver/tests/bidi/browsing_context/support/empty.svg" + url = inline(f"<img src='{image_url}?pipe=trickle(d3)'>") + + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=url, + wait="complete") + + await wait_for_reload(bidi_session, new_tab["context"], wait, + expect_timeout) + + # We cannot assert the URL for "none" by definition, and for "complete", since + # we expect a timeout. For the timeout case, the wait_for_navigation helper will + # resume after 1 second, there is no guarantee that the URL has been updated. + if wait == "interactive": + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab["context"], max_depth=0) + assert contexts[0]["url"] == url + + +@pytest.mark.parametrize( + "wait, expect_timeout", + [ + ("none", False), + ("interactive", True), + ("complete", True), + ], +) +async def test_slow_page(bidi_session, new_tab, url, wait, expect_timeout, + subscribe_events, wait_for_event): + url = url( + "/webdriver/tests/bidi/browsing_context/support/empty.html?pipe=trickle(d3)" + ) + + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=url, + wait="complete") + + await subscribe_events( + events=["browsingContext.domContentLoaded", "browsingContext.load"], + contexts=[new_tab["context"]]) + + events = [] + + async def on_event(_, data): + events.append(data) + + remove_listener_1 = bidi_session.add_event_listener( + "browsingContext.domContentLoaded", on_event) + remove_listener_2 = bidi_session.add_event_listener( + "browsingContext.load", on_event) + + assert len(events) == 0 + + on_dom_content_load = wait_for_event("browsingContext.domContentLoaded") + on_load = wait_for_event("browsingContext.load") + + await wait_for_reload(bidi_session, new_tab["context"], wait, + expect_timeout) + # Note that we cannot assert the top context url here, because the navigation + # is blocked on the initial url for this test case. + + await asyncio.gather(on_load, on_dom_content_load) + assert len(events) == 2 + + remove_listener_2() + remove_listener_1() + + +@pytest.mark.parametrize( + "wait, expect_timeout", + [ + ("none", False), + ("interactive", True), + ("complete", True), + ], +) +async def test_slow_script_blocks_domContentLoaded(bidi_session, inline, + new_tab, wait, + expect_timeout, + subscribe_events, + wait_for_event): + script_url = "/webdriver/tests/bidi/browsing_context/support/empty.js" + url = inline(f"<script src='{script_url}?pipe=trickle(d3)'></script>") + + await bidi_session.browsing_context.navigate(context=new_tab["context"], + url=url, + wait="complete") + + await subscribe_events( + events=["browsingContext.domContentLoaded", "browsingContext.load"], + contexts=[new_tab["context"]]) + + events = [] + + async def on_event(_, data): + events.append(data) + + remove_listener_1 = bidi_session.add_event_listener( + "browsingContext.domContentLoaded", on_event) + remove_listener_2 = bidi_session.add_event_listener( + "browsingContext.load", on_event) + + assert len(events) == 0 + + on_dom_content_load = wait_for_event("browsingContext.domContentLoaded") + on_load = wait_for_event("browsingContext.load") + + await wait_for_reload(bidi_session, new_tab["context"], wait, + expect_timeout) + + await asyncio.gather(on_dom_content_load, on_load) + assert len(events) == 2 + + remove_listener_2() + remove_listener_1() diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.html b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.html +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/__init__.py diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py new file mode 100644 index 00000000000..a649972ae18 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py @@ -0,0 +1,75 @@ +import pytest + +import webdriver.bidi.error as error + + +@pytest.mark.parametrize("value", [None, False, 42, {}, []]) +@pytest.mark.asyncio +async def test_params_context_invalid_type(bidi_session, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=value, viewport={ + "width": 100, + "height": 200, + }) + + +@pytest.mark.asyncio +async def test_params_context_invalid_value(bidi_session): + with pytest.raises(error.NoSuchFrameException): + await bidi_session.browsing_context.set_viewport(context="_invalid_") + + +@pytest.mark.asyncio +async def test_params_context_iframe(bidi_session, new_tab, get_test_page): + url = get_test_page(as_frame=True) + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=url, + wait="complete") + + contexts = await bidi_session.browsing_context.get_tree(root=new_tab["context"]) + assert len(contexts) == 1 + frames = contexts[0]["children"] + assert len(frames) == 1 + frame_context = frames[0]["context"] + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=frame_context) + + +@pytest.mark.parametrize("viewport", [False, 42, "", {}, [], {"width": 100}, {"height": 100}]) +@pytest.mark.asyncio +async def test_params_viewport_invalid_type(bidi_session, new_tab, viewport): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=new_tab["context"], viewport=viewport) + + +@pytest.mark.parametrize("width", [None, False, "", {}, []]) +@pytest.mark.asyncio +async def test_params_viewport_width_invalid_type(bidi_session, new_tab, width): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=new_tab["context"], viewport={ + "width": width, + "height": 100, + }) + + +@pytest.mark.parametrize("height", [None, False, "", {}, []]) +@pytest.mark.asyncio +async def test_params_viewport_height_invalid_type(bidi_session, new_tab, height): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=new_tab["context"], viewport={ + "width": 100, + "height": height, + }) + + +@pytest.mark.parametrize("viewport", [ + {"width": -1, "height": 100}, + {"width": 100, "height": -1}, + {"width": -1, "height": -1}, +], ids=["width negative", "height negative", "both negative"]) +@pytest.mark.asyncio +async def test_params_viewport_invalid_value(bidi_session, new_tab, viewport): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.set_viewport(context=new_tab["context"], viewport=viewport) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py new file mode 100644 index 00000000000..1aa977be421 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py @@ -0,0 +1,126 @@ +import pytest + +from ... import get_viewport_dimensions + + +@pytest.mark.asyncio +async def test_set_viewport(bidi_session, new_tab): + test_viewport = {"width": 250, "height": 300} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + +@pytest.mark.asyncio +async def test_set_viewport_same_dimensions(bidi_session, new_tab): + test_viewport = {"width": 250, "height": 300} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + +@pytest.mark.asyncio +async def test_set_viewport_reset(bidi_session, new_tab): + original_viewport = await get_viewport_dimensions(bidi_session, new_tab) + + test_viewport = {"width": 666, "height": 333} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=None) + assert await get_viewport_dimensions(bidi_session, new_tab) == original_viewport + + +@pytest.mark.asyncio +async def test_set_viewport_affects_specific_context(bidi_session, top_context, new_tab): + original_viewport = await get_viewport_dimensions(bidi_session, top_context) + + test_viewport = {"width": 333, "height": 666} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + assert await get_viewport_dimensions(bidi_session, top_context) == original_viewport + + +@pytest.mark.parametrize("protocol,parameters", [ + ("http", ""), + ("https", ""), + ("https", {"pipe": "header(Cross-Origin-Opener-Policy,same-origin)"}) +], ids=[ + "http", + "https", + "https coop" +]) +@pytest.mark.asyncio +async def test_set_viewport_persists_on_navigation(bidi_session, new_tab, inline, protocol, parameters): + test_viewport = {"width": 499, "height": 599} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + url = inline("<div>foo</div>", parameters=parameters, protocol=protocol) + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + url = inline("<div>bar</div>", parameters=parameters, protocol=protocol, domain="alt") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + +@pytest.mark.asyncio +async def test_set_viewport_persists_on_reload(bidi_session, new_tab): + test_viewport = {"width": 499, "height": 599} + + assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=test_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport + + await bidi_session.browsing_context.reload( + context=new_tab["context"], wait="complete" + ) + + assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/black_dot.png b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/black_dot.png Binary files differindex 613754cfaf7..613754cfaf7 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/black_dot.png +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/black_dot.png diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/other.html b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.html index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/other.html +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.html diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.js b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.js index 3918c74e446..3918c74e446 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.js +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.js diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.svg b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.svg index e0af766e8ff..e0af766e8ff 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/empty.svg +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/empty.svg diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/other.html b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/other.html new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/other.html diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/other.svg b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/other.svg index 7c20a99a4b5..7c20a99a4b5 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/other.svg +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/other.svg diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/red_dot.png b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/red_dot.png Binary files differindex c5916f28970..c5916f28970 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/navigate/support/red_dot.png +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/support/red_dot.png diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result.py index a930cf2292f..df989c407ee 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result.py @@ -66,10 +66,10 @@ async def test_primitive_values(bidi_session, top_context, await_promise, expres { "type": "object", "value": [ - ["foo", {"type": "object"}], - ["qux", {"type": "string", "value": "quux"}], ["1", {"type": "string", "value": "fred"}], ["2", {"type": "string", "value": "thud"}], + ["foo", {"type": "object"}], + ["qux", {"type": "string", "value": "quux"}], ], }, ), diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_node.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_node.py index a2359b164eb..9d09b9fc04a 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_node.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_node.py @@ -464,6 +464,7 @@ async def test_doctype_node( "sharedId": any_string, "value": { "childNodeCount": 1, + "mode": "open", "nodeType": 11 } } diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/serialization_options.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/serialization_options.py new file mode 100644 index 00000000000..4084ec48209 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/serialization_options.py @@ -0,0 +1,569 @@ +import pytest +from webdriver.bidi.modules.script import ContextTarget, SerializationOptions + +from ... import any_string, recursive_compare + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "include_shadow_tree, shadow_root_mode, contains_children, expected", + [ + ( + None, + "open", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"nodeType": 11, "childNodeCount": 1}, + }, + ), + ( + None, + "closed", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"nodeType": 11, "childNodeCount": 1}, + }, + ), + ( + "none", + "open", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"nodeType": 11, "childNodeCount": 1}, + }, + ), + ( + "none", + "closed", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"nodeType": 11, "childNodeCount": 1}, + }, + ), + ( + "open", + "open", + True, + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 11, + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "attributes": {"id": "in-shadow-dom"}, + "shadowRoot": None, + }, + } + ], + "mode": "open", + }, + }, + ), + ( + "open", + "closed", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"nodeType": 11, "childNodeCount": 1}, + }, + ), + ( + "all", + "open", + True, + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 11, + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "attributes": {"id": "in-shadow-dom"}, + "shadowRoot": None, + }, + } + ], + "mode": "open", + }, + }, + ), + ( + "all", + "closed", + True, + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 11, + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "attributes": {"id": "in-shadow-dom"}, + "shadowRoot": None, + }, + } + ], + "mode": "closed", + }, + }, + ), + ], + ids=[ + "default mode for open shadow root", + "default mode for closed shadow root", + "'none' mode for open shadow root", + "'none' mode for closed shadow root", + "'open' mode for open shadow root", + "'open' mode for closed shadow root", + "'all' mode for open shadow root", + "'all' mode for closed shadow root", + ], +) +async def test_include_shadow_tree_for_custom_element( + bidi_session, + top_context, + get_test_page, + include_shadow_tree, + shadow_root_mode, + contains_children, + expected, +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=get_test_page(shadow_root_mode=shadow_root_mode), + wait="complete", + ) + result = await bidi_session.script.call_function( + function_declaration="""() => document.querySelector("custom-element")""", + target=ContextTarget(top_context["context"]), + await_promise=True, + serialization_options=SerializationOptions( + include_shadow_tree=include_shadow_tree, max_dom_depth=1 + ), + ) + + recursive_compare(expected, result["value"]["shadowRoot"]) + + # Explicitely check for children because recursive_compare skips it + if not contains_children: + assert "children" not in result["value"]["shadowRoot"]["value"] + + +@pytest.mark.parametrize( + "include_shadow_tree, contains_children, expected", + [ + ( + None, + False, + { + "type": "node", + "sharedId": any_string, + "value": {"childNodeCount": 1, "mode": "open", "nodeType": 11}, + }, + ), + ( + "none", + False, + { + "type": "node", + "sharedId": any_string, + "value": {"childNodeCount": 1, "mode": "open", "nodeType": 11}, + }, + ), + ( + "open", + True, + { + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "attributes": {"id": "in-shadow-dom"}, + "shadowRoot": None, + }, + } + ], + "nodeType": 11, + "mode": "open", + }, + }, + ), + ( + "all", + True, + { + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "attributes": {"id": "in-shadow-dom"}, + "shadowRoot": None, + }, + } + ], + "mode": "open", + "nodeType": 11, + }, + }, + ), + ], + ids=[ + "default mode", + "'none' mode", + "'open' mode", + "'all' mode", + ], +) +async def test_include_shadow_tree_for_shadow_root( + bidi_session, + top_context, + get_test_page, + include_shadow_tree, + contains_children, + expected +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=get_test_page(), + wait="complete", + ) + result = await bidi_session.script.call_function( + function_declaration="""() => document.querySelector("custom-element").shadowRoot""", + target=ContextTarget(top_context["context"]), + await_promise=True, + serialization_options=SerializationOptions( + include_shadow_tree=include_shadow_tree, max_dom_depth=1 + ), + ) + + recursive_compare(expected, result) + + # Explicitely check for children because recursive_compare skips it + if not contains_children: + assert "children" not in result["value"] + + +@pytest.mark.parametrize( + "max_dom_depth, expected", + [ + ( + None, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id": "with-children"}, + "childNodeCount": 2, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ), + ( + 0, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id": "with-children"}, + "childNodeCount": 2, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ), + ( + 1, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id": "with-children"}, + "childNodeCount": 2, + "children": [ + { + "sharedId": any_string, + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + { + "sharedId": any_string, + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "localName": "br", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ], + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ), + ( + 2, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id": "with-children"}, + "childNodeCount": 2, + "children": [ + { + "sharedId": any_string, + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 0, + "attributes": {}, + "shadowRoot": None, + }, + } + ], + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + { + "sharedId": any_string, + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "localName": "br", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ], + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + "shadowRoot": None, + }, + }, + ), + ], +) +async def test_max_dom_depth( + bidi_session, top_context, get_test_page, max_dom_depth, expected +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=get_test_page(), wait="complete" + ) + result = await bidi_session.script.call_function( + function_declaration="""() => document.querySelector("div#with-children")""", + target=ContextTarget(top_context["context"]), + await_promise=True, + serialization_options=SerializationOptions(max_dom_depth=max_dom_depth), + ) + + recursive_compare(expected, result) + + +async def test_max_dom_depth_null( + bidi_session, + send_blocking_command, + top_context, + get_test_page, +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=get_test_page(), wait="complete" + ) + result = await send_blocking_command( + "script.callFunction", + { + "functionDeclaration": """() => document.querySelector("div#with-children")""", + "target": ContextTarget(top_context["context"]), + "awaitPromise": True, + "serializationOptions": {"maxDomDepth": None}, + }, + ) + + recursive_compare( + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 2, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 1, + "children": [ + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 0, + "children": [], + "attributes": {}, + "shadowRoot": None, + }, + } + ], + "attributes": {}, + "shadowRoot": None, + }, + }, + { + "type": "node", + "sharedId": any_string, + "value": { + "nodeType": 1, + "localName": "br", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "childNodeCount": 0, + "children": [], + "attributes": {}, + "shadowRoot": None, + }, + }, + ], + "attributes": {"id": "with-children"}, + "shadowRoot": None, + }, + }, + result["result"], + ) + + +@pytest.mark.parametrize( + "max_object_depth, expected", + [ + ( + None, + { + "type": "array", + "value": [ + {"type": "number", "value": 1}, + {"type": "array", "value": [{"type": "number", "value": 2}]}, + ], + }, + ), + (0, {"type": "array"}), + ( + 1, + { + "type": "array", + "value": [ + {"type": "number", "value": 1}, + {"type": "array"}, + ], + }, + ), + ( + 2, + { + "type": "array", + "value": [ + {"type": "number", "value": 1}, + {"type": "array", "value": [{"type": "number", "value": 2}]}, + ], + }, + ), + ], +) +async def test_max_object_depth(bidi_session, top_context, max_object_depth, expected): + result = await bidi_session.script.call_function( + function_declaration="() => [1, [2]]", + target=ContextTarget(top_context["context"]), + await_promise=True, + serialization_options=SerializationOptions(max_object_depth=max_object_depth), + ) + + assert result == expected diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid.py index 9923d7414e8..666bf4d06e0 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid.py @@ -135,7 +135,7 @@ async def test_params_max_object_depth_invalid_value(bidi_session, top_context): @pytest.mark.parametrize("include_shadow_tree", [False, 42, {}, []]) -async def test_params_max_object_depth_invalid_type(bidi_session, top_context, include_shadow_tree): +async def test_params_include_shadow_tree_invalid_type(bidi_session, top_context, include_shadow_tree): with pytest.raises(error.InvalidArgumentException): await bidi_session.script.evaluate( expression="1 + 2", @@ -144,7 +144,8 @@ async def test_params_max_object_depth_invalid_type(bidi_session, top_context, i await_promise=True) -async def test_params_max_object_depth_invalid_value(bidi_session, top_context): +async def test_params_include_shadow_tree_invalid_value( + bidi_session, top_context): with pytest.raises(error.InvalidArgumentException): await bidi_session.script.evaluate( expression="1 + 2", diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result.py index afdfb5fe42f..faea80a86b6 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result.py @@ -60,10 +60,10 @@ async def test_primitive_values(bidi_session, top_context, expression, expected) { "type": "object", "value": [ - ["foo", {"type": "object"}], - ["qux", {"type": "string", "value": "quux"}], ["1", {"type": "string", "value": "fred"}], ["2", {"type": "string", "value": "thud"}], + ["foo", {"type": "object"}], + ["qux", {"type": "string", "value": "quux"}], ], }, ), diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_node.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_node.py index 89ce95ed21d..a3ca316d027 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_node.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_node.py @@ -452,6 +452,7 @@ async def test_doctype_node(bidi_session, get_test_page, top_context, expression "sharedId": any_string, "value": { "childNodeCount": 1, + "mode": "open", "nodeType": 11 } } diff --git a/tests/wpt/tests/webdriver/tests/support/fixtures.py b/tests/wpt/tests/webdriver/tests/support/fixtures.py index ba166ae8da8..957be6b0f46 100644 --- a/tests/wpt/tests/webdriver/tests/support/fixtures.py +++ b/tests/wpt/tests/webdriver/tests/support/fixtures.py @@ -330,7 +330,7 @@ def get_test_page(iframe, inline): <input id="hidden" type="hidden"/> <input id="text" type="text"/> - {iframe(frame_doc)} + {iframe(frame_doc, **kwargs)} <img /> <svg></svg> diff --git a/tests/wpt/tests/webdriver/tests/support/inline.py b/tests/wpt/tests/webdriver/tests/support/inline.py index a0a8d3881ef..26f0491d1a8 100644 --- a/tests/wpt/tests/webdriver/tests/support/inline.py +++ b/tests/wpt/tests/webdriver/tests/support/inline.py @@ -1,6 +1,6 @@ """Helpers for inlining extracts of documents in tests.""" -from typing import Literal, Optional +from typing import Optional from urllib.parse import urlencode @@ -27,7 +27,7 @@ MIME_TYPES = { def build_inline(build_url, src, - doctype: Literal["html", "xhtml", "xml"] = "html", + doctype: str = "html", mime: Optional[str] = None, charset: Optional[str] = None, parameters = None, **kwargs): if mime is None: diff --git a/tests/wpt/tests/webidl/ecmascript-binding/legacy-platform-object/Set.html b/tests/wpt/tests/webidl/ecmascript-binding/legacy-platform-object/Set.html index 3134c818590..1390b51cd03 100644 --- a/tests/wpt/tests/webidl/ecmascript-binding/legacy-platform-object/Set.html +++ b/tests/wpt/tests/webidl/ecmascript-binding/legacy-platform-object/Set.html @@ -32,6 +32,21 @@ assert_equals(element.attributes.foo, "foo"); }, "must allow assigning to a named property on an object which implements a named property getter but not a setter in strict mode"); + test(function() { + "use strict"; + var form = document.createElement("form"); + assert_equals(form.method, "get"); + var input = document.createElement("input"); + input.name = "method"; + input.id = "method"; + form.appendChild(input); + assert_equals(form.method, input); + form.method = "post"; + assert_equals(form.method, input); + input.remove(); + assert_equals(form.method, "post"); + }, "must allow setting built-in property on a [LegacyOverrideBuiltIns] object even if a named property shadows it"); + var symbol = Symbol(); test(function() { diff --git a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json index c7026f91ee5..2fcb317268c 100644 --- a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json @@ -1860,6 +1860,321 @@ } }, { + "name": "convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=iohw", + "inputs": { + "input": { + "shape": [1, 3, 3, 1], + "data": [ + 0.05605664967552748, + 0.7114230061939892, + 0.6529743817798401, + 0.3862290922141163, + 0.38708372734474095, + 0.9461629334832131, + 0.0957319185290193, + 0.9234652551205444, + 0.6362779541136516 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 2, 3, 3], + "data": [ + 0.861442276299335, + 0.6267672619279181, + 0.6366489967621862, + 0.8382642064548715, + 0.11884837321114183, + 0.9921330460504791, + 0.3285411258903119, + 0.8742373539889388, + 0.7205492498486465, + 0.9801966684571415, + 0.06169835353027997, + 0.3220160786486479, + 0.7498031716529909, + 0.39307147694602995, + 0.1381193362338462, + 0.283850915413119, + 0.4235861336377129, + 0.14485120857485168 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "iohw" + }, + "expected": { + "shape": [1, 5, 5, 2], + "data": [ + 0.04828956723213196, + 0.05494653806090355, + 0.6479843258857727, + 0.7007930278778076, + 1.0440847873687744, + 0.7019880414009094, + 0.8621897101402283, + 0.26937708258628845, + 0.4157154858112335, + 0.21026825904846191, + 0.3797043561935425, + 0.4206119179725647, + 1.1785486936569214, + 0.9587093591690063, + 1.9911006689071655, + 1.8526650667190552, + 1.6228916645050049, + 0.5379507541656494, + 1.2502111196517944, + 0.39486807584762573, + 0.4246464669704437, + 0.3993436396121979, + 1.5086332559585571, + 1.5788191556930542, + 3.287064790725708, + 2.121230363845825, + 2.5666797161102295, + 1.141642689704895, + 1.8143054246902466, + 0.4301592707633972, + 0.20714078843593597, + 0.18141157925128937, + 1.2503143548965454, + 1.0035220384597778, + 1.6656538248062134, + 1.3417718410491943, + 2.097904920578003, + 0.8345021605491638, + 1.313029408454895, + 0.2249351441860199, + 0.03145187348127365, + 0.027173593640327454, + 0.38708874583244324, + 0.3026771545410156, + 1.0853508710861206, + 0.5856420397758484, + 1.2216601371765137, + 0.40328359603881836, + 0.45846959948539734, + 0.09216563403606415 + ], + "type": "float32" + } + }, + { + "name": "convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=hwoi", + "inputs": { + "input": { + "shape": [1, 3, 3, 1], + "data": [ + 0.05605664967552748, + 0.7114230061939892, + 0.6529743817798401, + 0.3862290922141163, + 0.38708372734474095, + 0.9461629334832131, + 0.0957319185290193, + 0.9234652551205444, + 0.6362779541136516 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 3, 2, 1], + "data": [ + 0.861442276299335, + 0.9801966684571415, + 0.6267672619279181, + 0.06169835353027997, + 0.6366489967621862, + 0.3220160786486479, + 0.8382642064548715, + 0.7498031716529909, + 0.11884837321114183, + 0.39307147694602995, + 0.9921330460504791, + 0.1381193362338462, + 0.3285411258903119, + 0.283850915413119, + 0.8742373539889388, + 0.4235861336377129, + 0.7205492498486465, + 0.14485120857485168 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "hwoi" + }, + "expected": { + "shape": [1, 5, 5, 2], + "data": [ + 0.04828956723213196, + 0.05494653806090355, + 0.6479843258857727, + 0.7007930278778076, + 1.0440847873687744, + 0.7019880414009094, + 0.8621897101402283, + 0.26937708258628845, + 0.4157154858112335, + 0.21026825904846191, + 0.3797043561935425, + 0.4206119179725647, + 1.1785486936569214, + 0.9587093591690063, + 1.9911006689071655, + 1.8526650667190552, + 1.6228916645050049, + 0.5379507541656494, + 1.2502111196517944, + 0.39486807584762573, + 0.4246464669704437, + 0.3993436396121979, + 1.5086332559585571, + 1.5788191556930542, + 3.287064790725708, + 2.121230363845825, + 2.5666797161102295, + 1.141642689704895, + 1.8143054246902466, + 0.4301592707633972, + 0.20714078843593597, + 0.18141157925128937, + 1.2503143548965454, + 1.0035220384597778, + 1.6656538248062134, + 1.3417718410491943, + 2.097904920578003, + 0.8345021605491638, + 1.313029408454895, + 0.2249351441860199, + 0.03145187348127365, + 0.027173593640327454, + 0.38708874583244324, + 0.3026771545410156, + 1.0853508710861206, + 0.5856420397758484, + 1.2216601371765137, + 0.40328359603881836, + 0.45846959948539734, + 0.09216563403606415 + ], + "type": "float32" + } + }, + { + "name": "convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=ohwi", + "inputs": { + "input": { + "shape": [1, 3, 3, 1], + "data": [ + 0.05605664967552748, + 0.7114230061939892, + 0.6529743817798401, + 0.3862290922141163, + 0.38708372734474095, + 0.9461629334832131, + 0.0957319185290193, + 0.9234652551205444, + 0.6362779541136516 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 3, 3, 1], + "data": [ + 0.861442276299335, + 0.6267672619279181, + 0.6366489967621862, + 0.8382642064548715, + 0.11884837321114183, + 0.9921330460504791, + 0.3285411258903119, + 0.8742373539889388, + 0.7205492498486465, + 0.9801966684571415, + 0.06169835353027997, + 0.3220160786486479, + 0.7498031716529909, + 0.39307147694602995, + 0.1381193362338462, + 0.283850915413119, + 0.4235861336377129, + 0.14485120857485168 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "ohwi" + }, + "expected": { + "shape": [1, 5, 5, 2], + "data": [ + 0.04828956723213196, + 0.05494653806090355, + 0.6479843258857727, + 0.7007930278778076, + 1.0440847873687744, + 0.7019880414009094, + 0.8621897101402283, + 0.26937708258628845, + 0.4157154858112335, + 0.21026825904846191, + 0.3797043561935425, + 0.4206119179725647, + 1.1785486936569214, + 0.9587093591690063, + 1.9911006689071655, + 1.8526650667190552, + 1.6228916645050049, + 0.5379507541656494, + 1.2502111196517944, + 0.39486807584762573, + 0.4246464669704437, + 0.3993436396121979, + 1.5086332559585571, + 1.5788191556930542, + 3.287064790725708, + 2.121230363845825, + 2.5666797161102295, + 1.141642689704895, + 1.8143054246902466, + 0.4301592707633972, + 0.20714078843593597, + 0.18141157925128937, + 1.2503143548965454, + 1.0035220384597778, + 1.6656538248062134, + 1.3417718410491943, + 2.097904920578003, + 0.8345021605491638, + 1.313029408454895, + 0.2249351441860199, + 0.03145187348127365, + 0.027173593640327454, + 0.38708874583244324, + 0.3026771545410156, + 1.0853508710861206, + 0.5856420397758484, + 1.2216601371765137, + 0.40328359603881836, + 0.45846959948539734, + 0.09216563403606415 + ], + "type": "float32" + } + }, + { "name": "convTranspose2d float32 4D input and filter tensors options.bias", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/softplus.json b/tests/wpt/tests/webnn/resources/test_data/softplus.json new file mode 100644 index 00000000000..2b26e1439e3 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/softplus.json @@ -0,0 +1,472 @@ +{ // softplus: The calculation follows the expression ln(1 + exp(steepness * x)) / steepness. + "tests": [ + { + "name": "softplus float32 1D tensor default options", // default options: {steepness: 1} + "inputs": { + "x": { + "shape": [24], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { + "name": "softplus float32 2D tensor default options", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { + "name": "softplus float32 3D tensor default options", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { + "name": "softplus float32 4D tensor default options", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { + "name": "softplus float32 5D tensor default options", + "inputs": { + "x": { + "shape": [1, 2, 1, 3, 4], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 3, 4], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { + "name": "softplus both positive float32 4D tensor and options.steepness", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32" + } + }, + "options": { + "steepness": 1.5104469060897827 + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "data": [ + 5.626749515533447, + 5.167757034301758, + 4.016173362731934, + 9.480032920837402, + 9.989937782287598, + 7.065456390380859, + 2.158585548400879, + 8.187153816223145, + 5.170245170593262, + 2.1315081119537354, + 3.526555061340332, + 4.137620449066162, + 1.7879058122634888, + 5.145503044128418, + 5.015854835510254, + 0.4822517931461334, + 2.964651584625244, + 3.960916519165039, + 5.518085956573486, + 7.19233512878418, + 8.764925956726074, + 1.4518096446990967, + 8.930669784545898, + 8.660284042358398 + ], + "type": "float32" + } + }, + { + "name": "softplus both negative float32 4D tensor and options.steepness", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "data": [ + -5.584833476104802, + -8.188738740810354, + -8.981280004134987, + -1.7315531899284586, + -0.7266543578958906, + -0.0034800119290885334, + -7.378389455552106, + -8.907525953796949, + -6.0483786568116304, + -6.328561142365743, + -2.6006513567654626, + -5.02005264196455, + -2.0647716093484414, + -1.5499896740695434, + -2.221591675966657, + -1.1088025713211636, + -2.7854626064634385, + -2.105037489961294, + -5.144277741727352, + -5.081219916574497, + -7.499426297617635, + -2.4305558382286545, + -8.390520024268328, + -0.07117499202643174 + ], + "type": "float32" + } + }, + "options": { + "steepness": -1.2985155767552126 + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "data": [ + -5.585379123687744, + -8.188756942749023, + -8.981287002563477, + -1.8088372945785522, + -0.9798305630683899, + -0.5355416536331177, + -7.378442287445068, + -8.907533645629883, + -6.048677444458008, + -6.328769207000732, + -2.626511573791504, + -5.021188259124756, + -2.1157851219177246, + -1.6465802192687988, + -2.2634570598602295, + -1.2725814580917358, + -2.805877923965454, + -2.1535322666168213, + -5.145244121551514, + -5.082269191741943, + -7.499471664428711, + -2.4626762866973877, + -8.390534400939941, + -0.5702091455459595 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/utils.js b/tests/wpt/tests/webnn/resources/utils.js index 37748fd57a4..920459275d4 100644 --- a/tests/wpt/tests/webnn/resources/utils.js +++ b/tests/wpt/tests/webnn/resources/utils.js @@ -318,6 +318,7 @@ const PrecisionMetrics = { sigmoid: {ULP: {float32: 32+2, float16: 3}}, // float32 (leaving a few ULP for roundoff) slice: {ULP: {float32: 0, float16: 0}}, softmax: {ULP: {float32: getSoftmaxPrecisionTolerance, float16: getSoftmaxPrecisionTolerance}}, + softplus: {ULP: {float32: 18, float16: 18}}, softsign: {ULP: {float32: 3, float16: 3}}, split: {ULP: {float32: 0, float16: 0}}, squeeze: {ULP: {float32: 0, float16: 0}}, diff --git a/tests/wpt/tests/webnn/softplus.https.any.js b/tests/wpt/tests/webnn/softplus.https.any.js new file mode 100644 index 00000000000..7096f64a043 --- /dev/null +++ b/tests/wpt/tests/webnn/softplus.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API softplus operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softplus + +testWebNNOperation('softplus', buildOperationWithSingleInput);
\ No newline at end of file diff --git a/tests/wpt/tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html b/tests/wpt/tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html index 79eba02727b..796d35dcb6b 100644 --- a/tests/wpt/tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html +++ b/tests/wpt/tests/webrtc-extensions/RTCRtpTransceiver-headerExtensionControl.html @@ -94,7 +94,7 @@ test(t => { t.add_cleanup(() => pc.close()); const transceiver = pc.addTransceiver('audio'); const capabilities = transceiver.getHeaderExtensionsToNegotiate(); - let capability = capabilities.find((capability) => { + const capability = capabilities.find((capability) => { return capability.uri === 'urn:ietf:params:rtp-hdrext:sdes:mid'; }); ['sendonly', 'recvonly', 'inactive', 'stopped'].map(direction => { @@ -109,14 +109,14 @@ test(t => { const pc = new RTCPeerConnection(); t.add_cleanup(() => pc.close()); const transceiver = pc.addTransceiver('audio'); - let capabilities = transceiver.getHeaderExtensionsToNegotiate(); - let selected_capability = capabilities.find((capability) => { + const capabilities = transceiver.getHeaderExtensionsToNegotiate(); + const selected_capability = capabilities.find((capability) => { return capability.direction === 'sendrecv' && capability.uri !== 'urn:ietf:params:rtp-hdrext:sdes:mid'; }); selected_capability.direction = 'stopped'; const offered_capabilities = transceiver.getHeaderExtensionsToNegotiate(); - let altered_capability = capabilities.find((capability) => { + const altered_capability = capabilities.find((capability) => { return capability.uri === selected_capability.uri && capability.direction === 'stopped'; }); @@ -292,4 +292,66 @@ promise_test(async t => { } }, 'Prior to negotiation, getNegotiatedHeaderExtensions() returns `stopped` for all extensions.'); +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + + // Disable a non-mandatory extension before first negotiation. + const transceiver = pc1.addTransceiver('video'); + const capabilities = transceiver.getHeaderExtensionsToNegotiate(); + const selected_capability = capabilities.find((capability) => { + return capability.direction === 'sendrecv' && + capability.uri !== 'urn:ietf:params:rtp-hdrext:sdes:mid'; + }); + selected_capability.direction = 'stopped'; + transceiver.setHeaderExtensionsToNegotiate(capabilities); + + await negotiate(pc1, pc2); + const negotiated_capabilites = transceiver.getNegotiatedHeaderExtensions(); + + const local_negotiated = transceiver.getNegotiatedHeaderExtensions().find(ext => { + return ext.uri === selected_capability.uri; + }); + assert_equals(local_negotiated.direction, 'stopped'); + const remote_negotiated = pc2.getTransceivers()[0].getNegotiatedHeaderExtensions().find(ext => { + return ext.uri === selected_capability.uri; + }); + assert_equals(remote_negotiated.direction, 'stopped'); +}, 'Answer header extensions are a subset of the offered header extensions'); + +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + + // Disable a non-mandatory extension before first negotiation. + const transceiver = pc1.addTransceiver('video'); + const capabilities = transceiver.getHeaderExtensionsToNegotiate(); + const selected_capability = capabilities.find((capability) => { + return capability.direction === 'sendrecv' && + capability.uri !== 'urn:ietf:params:rtp-hdrext:sdes:mid'; + }); + selected_capability.direction = 'stopped'; + transceiver.setHeaderExtensionsToNegotiate(capabilities); + + await negotiate(pc1, pc2); + // Negotiate, switching sides. + await negotiate(pc2, pc1); + + // PC2 will re-offer the extension. + const remote_reoffered = pc2.getTransceivers()[0].getHeaderExtensionsToNegotiate().find(ext => { + return ext.uri === selected_capability.uri; + }); + assert_equals(remote_reoffered.direction, 'sendrecv'); + + // But PC1 will still reject the extension. + const negotiated_capabilites = transceiver.getNegotiatedHeaderExtensions(); + const local_negotiated = transceiver.getNegotiatedHeaderExtensions().find(ext => { + return ext.uri === selected_capability.uri; + }); + assert_equals(local_negotiated.direction, 'stopped'); +}, 'A subsequent offer from the other side will reoffer extensions not negotiated by the initial offerer'); </script> diff --git a/tests/wpt/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html b/tests/wpt/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html index 5083be6cdfd..5361cb2c1af 100644 --- a/tests/wpt/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html +++ b/tests/wpt/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html @@ -280,39 +280,37 @@ async_test(t => { */ for (let bundle_policy of ['balanced', 'max-bundle', 'max-compat']) { - - - promise_test(async t => { - const caller = new RTCPeerConnection({bundlePolicy: bundle_policy}); - t.add_cleanup(() => caller.close()); - const stream = await getNoiseStream( - {audio: true, video:true}); - t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); - const [track1, track2] = stream.getTracks(); - const sender1 = caller.addTrack(track1); - const sender2 = caller.addTrack(track2); - caller.createDataChannel('datachannel'); - const callee = new RTCPeerConnection(); - t.add_cleanup(() => callee.close()); - exchangeIceCandidates(caller, callee); - const offer = await caller.createOffer(); - await caller.setLocalDescription(offer); - const [caller_transceiver1, caller_transceiver2] = caller.getTransceivers(); - assert_equals(sender1.transport, caller_transceiver1.sender.transport); - await callee.setRemoteDescription(offer); - const [callee_transceiver1, callee_transceiver2] = callee.getTransceivers(); - const answer = await callee.createAnswer(); - await callee.setLocalDescription(answer); - await caller.setRemoteDescription(answer); - // At this point, we should have a single ICE transport, and it - // should eventually get to the "connected" state. - await waitForState(caller_transceiver1.receiver.transport.iceTransport, - 'connected'); - // The PeerConnection's iceConnectionState should therefore be 'connected' - assert_equals(caller.iceConnectionState, 'connected', - 'PC.iceConnectionState:'); - }, 'iceConnectionState changes at the right time, with bundle policy ' + - bundle_policy); + promise_test(async t => { + const caller = new RTCPeerConnection({bundlePolicy: bundle_policy}); + t.add_cleanup(() => caller.close()); + const stream = await getNoiseStream( + {audio: true, video:true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + const [track1, track2] = stream.getTracks(); + const sender1 = caller.addTrack(track1); + const sender2 = caller.addTrack(track2); + caller.createDataChannel('datachannel'); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + exchangeIceCandidates(caller, callee); + const offer = await caller.createOffer(); + await caller.setLocalDescription(offer); + const [caller_transceiver1, caller_transceiver2] = caller.getTransceivers(); + assert_equals(sender1.transport, caller_transceiver1.sender.transport); + await callee.setRemoteDescription(offer); + const [callee_transceiver1, callee_transceiver2] = callee.getTransceivers(); + const answer = await callee.createAnswer(); + await callee.setLocalDescription(answer); + await caller.setRemoteDescription(answer); + // At this point, we should have a single ICE transport, and it + // should eventually get to the "connected" state. + await waitForState(caller_transceiver1.receiver.transport.iceTransport, + 'connected'); + // The PeerConnection's iceConnectionState should therefore be 'connected' + assert_equals(caller.iceConnectionState, 'connected', + 'PC.iceConnectionState:'); + }, 'iceConnectionState changes at the right time, with bundle policy ' + + bundle_policy); } promise_test(async t => { @@ -393,4 +391,24 @@ promise_test(async t => { await new Promise(r => t.step_timeout(r, 100)); }, 'Closing a PeerConnection should not fire iceconnectionstatechange event'); +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + const stream = await getNoiseStream({ audio: true }); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + + stream.getTracks().forEach(track => pc1.addTrack(track, stream)); + // Only signal candidate from 1->2. + pc1.onicecandidate = e => pc2.addIceCandidate(e.candidate); + pc1.iceStates = [pc1.iceConnectionState]; + pc1.oniceconnectionstatechange = () => { + pc1.iceStates.push(pc1.iceConnectionState); + }; + exchangeOfferAnswer(pc1, pc2); + await listenToIceConnected(pc2); + + assert_true(pc1.iceStates.length >= 2); + assert_equals(pc1.iceStates[1], 'checking'); +}, 'iceConnectionState can go to checking without explictly calling addIceCandidate'); </script> diff --git a/tests/wpt/tests/websockets/constants.sub.js b/tests/wpt/tests/websockets/constants.sub.js index d8e340d304b..fd3c3b84b96 100644 --- a/tests/wpt/tests/websockets/constants.sub.js +++ b/tests/wpt/tests/websockets/constants.sub.js @@ -1,14 +1,14 @@ const __SERVER__NAME = "{{host}}"; const __PATH = "echo"; -var __SCHEME; -var __PORT; -if (url_has_variant('wss')) { - __SCHEME = 'wss'; - __PORT = "{{ports[wss][0]}}"; -} else if (url_has_flag('h2')) { +let __SCHEME; +let __PORT; +if (url_has_flag('h2')) { __SCHEME = 'wss'; __PORT = "{{ports[h2][0]}}"; +} else if (url_has_variant('wss') || location.protocol === 'https:') { + __SCHEME = 'wss'; + __PORT = "{{ports[wss][0]}}"; } else { __SCHEME = 'ws'; __PORT = "{{ports[ws][0]}}"; @@ -74,6 +74,12 @@ function CreateWebSocketWithRepeatedProtocolsCaseInsensitive() { wsocket = new WebSocket(url, ["echo", "eCho"]); } +function CreateInsecureWebSocket() { + IsWebSocket(); + const url = `ws://${__SERVER__NAME}:{{ports[ws][0]}}/${__PATH}`; + return new WebSocket(url); +} + function CreateWebSocket(isProtocol, isProtocols) { IsWebSocket(); const url = SCHEME_DOMAIN_PORT + "/" + __PATH; diff --git a/tests/wpt/tests/websockets/mixed-content.https.any.js b/tests/wpt/tests/websockets/mixed-content.https.any.js new file mode 100644 index 00000000000..b7a6d8381da --- /dev/null +++ b/tests/wpt/tests/websockets/mixed-content.https.any.js @@ -0,0 +1,7 @@ +// META: global=window,worker +// META: script=constants.sub.js + +test(() => { + assert_throws_dom('SecurityError', () => CreateInsecureWebSocket(), + 'constructor should throw'); +}, 'constructing an insecure WebSocket in a secure context should throw'); |