diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index c0b6ea46d20..a7f4cc2c288 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -1,6 +1,17 @@ { "items": { "crashtest": { + "FileAPI": { + "blob": { + "Blob-stream-byob-crash.html": [ + "5992ed1396ca907049f1f4181e5cf7a93ae7e7ef", + [ + null, + {} + ] + ] + } + }, "accessibility": { "crashtests": { "activedescendant-crash.html": [ @@ -454,6 +465,13 @@ null, {} ] + ], + "tiny-foreignObject-double-border-radius-crash.html": [ + "9d89640465fbf3528d26b5c9b4f71de224c68af7", + [ + null, + {} + ] ] }, "css-break": { @@ -1157,6 +1175,13 @@ {} ] ], + "dialog-backdrop-crash.html": [ + "3bbdf160cf68c875c1c1602a96da7903c11bc61d", + [ + null, + {} + ] + ], "dirty-rowgroup-crash.html": [ "2a66cd452a7a86283d28a287a1e2005f40bfc1f7", [ @@ -1304,6 +1329,13 @@ {} ] ], + "reversed-ol-crash.html": [ + "fa4d35380c523c050f152b608d17d30508e19696", + [ + null, + {} + ] + ], "svg-layout-root-crash.html": [ "75a3839add0f0dcc33378ab194f37acdfcc39095", [ @@ -5932,6 +5964,13 @@ }, "selection": { "crashtests": { + "selection-clip-crash.html": [ + "66d10b47424226f79f676a87288b667aed2911e1", + [ + null, + {} + ] + ], "table.html": [ "36eb803a5cbbe6b397ebb76659d1da7a8ae5d881", [ @@ -21344,14 +21383,14 @@ }, "payment-handler": { "change-payment-method-manual.https.html": [ - "1640420c625cdd544ed92d6815ea6dcc1cd8b980", + "15165b91d779d674fe667c2f849ac7d5753799e2", [ null, {} ] ], "change-shipping-address-manual.https.html": [ - "3b98d56a2516ed96c20c4c04533a129c2054c718", + "e8817459c38ae0893ce278875cdfa1eed555a5bf", [ null, {} @@ -28376,6 +28415,110 @@ {} ] ], + "fixedpos-001-print.html": [ + "04feb96e8474bb638254bc0babc22fa378178f48", + [ + null, + [ + [ + "/css/css-break/fixedpos-001-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-002-print.html": [ + "c23c6be7d2a3bd2416b7c2765cd7654869918d54", + [ + null, + [ + [ + "/css/css-break/fixedpos-002-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-003-print.html": [ + "1b06257175fe3bc93a9205bbaa4c6ee38a778e9f", + [ + null, + [ + [ + "/css/css-break/fixedpos-003-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-004-print.html": [ + "c138e9cd6aa591657f65cd80859a8e9e4f33e132", + [ + null, + [ + [ + "/css/css-break/fixedpos-004-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-005-print.html": [ + "0a2edc71788aaa76305f1d17951e5499418709bd", + [ + null, + [ + [ + "/css/css-break/fixedpos-005-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-006-print.html": [ + "2386c166c81363a904c3e11dfac7dec4e0241029", + [ + null, + [ + [ + "/css/css-break/fixedpos-006-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-007-print.html": [ + "8dcb700b96d89c508f9e6696292c79a382a472a2", + [ + null, + [ + [ + "/css/css-break/fixedpos-007-print-ref.html", + "==" + ] + ], + {} + ] + ], + "fixedpos-008-print.html": [ + "02b5d63cc7cd500e8dafa2d7a7e966d2dc90c521", + [ + null, + [ + [ + "/css/css-break/fixedpos-008-print-ref.html", + "==" + ] + ], + {} + ] + ], "fixedpos-with-link-with-inline-child-print.html": [ "694e5376cbfab7ee52c1f27b9bf0fd23a2a91375", [ @@ -134891,6 +135034,86 @@ {} ] ], + "box-shadow": { + "slice-block-fragmentation-001.html": [ + "1c7193fa7b0c504698af9b5d6e22ca4ba49fa7fd", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html", + "==" + ] + ], + {} + ] + ], + "slice-block-fragmentation-002.html": [ + "b645ed82eaf3bd9795474b83b657e2a2376016f2", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html", + "==" + ] + ], + {} + ] + ], + "slice-block-fragmentation-003.html": [ + "4fca18bfdde70d55f44175effcf5c1471bf8bbd0", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html", + "==" + ] + ], + {} + ] + ], + "slice-inline-fragmentation-001.html": [ + "46eab59ab2433fd031957e96e10113d8ea247a7d", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html", + "==" + ] + ], + {} + ] + ], + "slice-inline-fragmentation-002.html": [ + "516abcf2a933fb8c6aee29660edd16ee7c7bd5ec", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html", + "==" + ] + ], + {} + ] + ], + "slice-inline-fragmentation-003.html": [ + "336c01f5baed2888f2ca275476e6ff635a410c52", + [ + null, + [ + [ + "/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html", + "==" + ] + ], + {} + ] + ] + }, "box-shadow-005.html": [ "705ced279d30e6113eed68b819b287f7e48219cd", [ @@ -142247,7 +142470,7 @@ ] ], "out-of-flow-in-multicolumn-071.html": [ - "371f41a204bfa2673bdafbb4239d04f5a2c699e0", + "629ebda48b8fcec93af4bd79d26b3001b783cb42", [ null, [ @@ -143495,6 +143718,19 @@ {} ] ], + "inside-flex-001.html": [ + "db3064fa8c290103d06f919afbdceefd303695b0", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "overflow-scroll-row.html": [ "8ed379e5dd29681704c63e46b2702b1536f789b8", [ @@ -154118,6 +154354,97 @@ {} ] ], + "contain-style-ol-ordinal-li-container.html": [ + "4076407332474a89c674156f923d003413fb8fa0", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-li-container-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal-pseudo-reversed.html": [ + "dc895abda3b6aacc9cd7d958efb4791e676c9efa", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-pseudo-reversed-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal-pseudo.html": [ + "a9ccfb5930e7f41762b827850ca9a54b5a46b5c1", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-pseudo-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal-reversed.html": [ + "22f2f20cffebfacb38ea70b718966514f5d5a768", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-reversed-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal-start-reversed.html": [ + "175aa814031f6bdc3f8156aa289d2f97fa3678dd", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-start-reversed-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal-start.html": [ + "dc23b65f1455301cd3d8319147b8e6ac204a3f6a", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-start-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-style-ol-ordinal.html": [ + "0901325a4ef1a700d169bd7d9953b926b5cc1530", + [ + null, + [ + [ + "/css/css-contain/reference/contain-style-ol-ordinal-ref.html", + "==" + ] + ], + {} + ] + ], "contain-subgrid-001.html": [ "59a104bfbad86c146ae3d9653478e11b645af7cd", [ @@ -154288,6 +154615,32 @@ {} ] ], + "dialog-backdrop-create.html": [ + "f72bb69f682a4cd5750f4721bf0aa4d59cb3eb4b", + [ + null, + [ + [ + "/css/css-contain/container-queries/top-layer-dialog-backdrop-ref.html", + "==" + ] + ], + {} + ] + ], + "dialog-backdrop-remove.html": [ + "47b40304924aa00613fd520083d12ae65fa82596", + [ + null, + [ + [ + "/css/css-contain/container-queries/top-layer-dialog-backdrop-ref.html", + "==" + ] + ], + {} + ] + ], "display-in-container.html": [ "a2a4cd731c8b90b4dcfda30a015b293deef56968", [ @@ -174990,13 +175343,13 @@ ] ], "font-palette-empty-font-family.html": [ - "8b52bf04d0f2d58fa5fe5f9fd56f0fe22d3eef63", + "eb69f8fbc8e1bb7641cf0092e7b780c853487d8c", [ null, [ [ - "/css/css-fonts/font-palette-empty-font-family-notref.html", - "!=" + "/css/css-fonts/font-palette-empty-font-family-ref.html", + "==" ] ], {} @@ -175185,7 +175538,7 @@ ] ], "font-size-adjust-012.html": [ - "57519edf18faef75ae8366af6174ad35a1c16aea", + "a6037ffbaceeb68e0806d951f1c12fb38b646b2c", [ null, [ @@ -177039,7 +177392,7 @@ ] ], "size-adjust-02.html": [ - "e849191310578ae06dabd15e9187af3166cc1eaa", + "3255b5ccaf010251668ee05467dbb3f5bbb041f8", [ null, [ @@ -188321,12 +188674,12 @@ ], "image-set": { "image-set-content-rendering.html": [ - "f0622a895061b8378bb06347a534db5b7bbbb5b7", + "aa6d1d6f1c84a333bccab9434ddff3204a687567", [ null, [ [ - "/css/css-images/image-set/reference/image-set-content-rendering-ref.html", + "/css/css-images/image-set/reference/image-set-rendering-ref.html", "==" ] ], @@ -188334,7 +188687,7 @@ ] ], "image-set-dpi-rendering-2.html": [ - "d7bd02e767731f8eec3366a0cc5b0c9ad782b91d", + "688c60a688a387e32abaecc07ec109983d1e58d9", [ null, [ @@ -188347,7 +188700,7 @@ ] ], "image-set-dpi-rendering.html": [ - "be18e85ffb07e0833b92a1eccca5c02a15f9f942", + "3288034d529b61a3b1302eb2960fa1f511354bd5", [ null, [ @@ -188360,7 +188713,7 @@ ] ], "image-set-dppx-rendering.html": [ - "1fc2f8c85d94268e6c563806bb813991a14c5ac5", + "d111dfb7ff2682071ea3c38d93eadddcac8ebea0", [ null, [ @@ -188373,7 +188726,7 @@ ] ], "image-set-empty-url-rendering.html": [ - "0286d7372f027acb3f5fb0e8f2295f375c3714d7", + "f5b99922216bbb104606834401e634d85ccbe6b8", [ null, [ @@ -188386,7 +188739,7 @@ ] ], "image-set-first-match-rendering.html": [ - "4d5b9d7d9ce8d7ab84feec41bd25efd9f2e96908", + "51d6aeeb241dee054c2f36d1221abf5238e8ac60", [ null, [ @@ -188399,7 +188752,7 @@ ] ], "image-set-invalid-resolution-rendering-2.html": [ - "88917e1e3f769bc38fe65c33582202a45a47cf9d", + "c8b560b7fcb3773947ea6c443441fe4397d3bf8e", [ null, [ @@ -188412,7 +188765,7 @@ ] ], "image-set-invalid-resolution-rendering.html": [ - "0cdcf6018e6513c4f3e5ce0afa413b6f46d30cf3", + "91aeaccebdc323a45240ab971989fe1f6464f46b", [ null, [ @@ -188425,7 +188778,7 @@ ] ], "image-set-linear-gradient-rendering.html": [ - "62f41a743f2b31ded22c273c0612e0d08974200b", + "2fc31b95a81e3c46fde0f42edcaad04c1ed6f1b9", [ null, [ @@ -188438,7 +188791,7 @@ ] ], "image-set-no-res-rendering-2.html": [ - "2cb98bb9c2e0dd69440f67af83473ee9a628084c", + "f588980be330d1aeb00793275fbcc96e13d3626a", [ null, [ @@ -188451,7 +188804,7 @@ ] ], "image-set-no-res-rendering.html": [ - "927d4c67f1da268a55ce5008c9f84123031ba521", + "577728894d9e62f2ee501d37ee60e715dd236563", [ null, [ @@ -188464,7 +188817,7 @@ ] ], "image-set-no-url-rendering.html": [ - "7af722d7c06cf7e5df7eac7c051fe8056b781373", + "f50ebb676abb3075ef71d0cbae60806745d74f33", [ null, [ @@ -188477,7 +188830,7 @@ ] ], "image-set-radial-gradient-rendering.html": [ - "7bf950a403736e2629236aed42677e8fa9aa490c", + "b4e09ea3519be225b66a6db86223f433ac30e469", [ null, [ @@ -188490,7 +188843,7 @@ ] ], "image-set-rendering-2.html": [ - "a6724553d629606cced4f7966af06ead5afe6369", + "fa1749518f4aeadbb4b6c1648349763a32401d6a", [ null, [ @@ -188503,7 +188856,7 @@ ] ], "image-set-rendering.html": [ - "ce4a900403dd5cccd6c1c5676b526f878932016c", + "a105438cc4b3fa121d63d9f33ae42a74c4add73b", [ null, [ @@ -188555,7 +188908,7 @@ ] ], "image-set-type-first-match-rendering.html": [ - "1283d22d1ff75ad1412ffd9f9ae895acdc69ce71", + "7e6ea8fa1f785ccde919b85ce2922c78c886acbe", [ null, [ @@ -188568,7 +188921,7 @@ ] ], "image-set-type-rendering-2.html": [ - "897118acd602737e5e01d61f998bee3b7e9f25ef", + "23e90ea9e43dbb57cd397c45af98d791c2547761", [ null, [ @@ -188581,7 +188934,7 @@ ] ], "image-set-type-rendering-3.html": [ - "51dbe2c922189e4a67780089dc4a834d1ad9bc88", + "b47c4d82a3350cceaff5160ca8f21b5943748054", [ null, [ @@ -188594,7 +188947,7 @@ ] ], "image-set-type-rendering.html": [ - "16055dbccf7d9408cc249dd80f23f6255d7f8c78", + "069e2c867f586c39e505115671bbeb4ea8de8eed", [ null, [ @@ -188607,7 +188960,7 @@ ] ], "image-set-type-skip-unsupported-rendering.html": [ - "e555633cdda39fab6cc71a74c4abcb4dde0bf8c7", + "4473e816bd17fad8199c7391dedaec164a84dccc", [ null, [ @@ -188620,7 +188973,7 @@ ] ], "image-set-type-unsupported-rendering-2.html": [ - "3f9fcd27d826eeea2b7ae470fec46984dd50cf16", + "d9d2f457076c9b5d9ff8f7d4ee7be8cfc204b1c8", [ null, [ @@ -188633,7 +188986,7 @@ ] ], "image-set-type-unsupported-rendering.html": [ - "6e9e56a4eb070a9e036ad064eb45401340b941ee", + "a7cf98bb58b00190dfbbf51bb23f85857f4c453d", [ null, [ @@ -188646,7 +188999,7 @@ ] ], "image-set-unordered-res-rendering.html": [ - "c1063b74df613ba7fd0d365e7335dc3fb212f806", + "2085b416b6bc8350028c24e11a65cc93a664c46b", [ null, [ @@ -200569,7 +200922,7 @@ }, "css-multicol": { "abspos-after-spanner-static-pos.html": [ - "d257016a2519c6c30a0c352f4bd453822c89841b", + "0cc6b0865005f6d66f84094148e5f7be11a54fab", [ null, [ @@ -201062,6 +201415,19 @@ {} ] ], + "columnfill-auto-max-height-003.html": [ + "a632c8fbbd72ad51c0ecb67cd34eeb03f1a3508c", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "composited-under-clip-under-multicol.html": [ "a47ed89a2e0eb11624bfb5c96d547f632f9c27e7", [ @@ -202128,6 +202494,19 @@ {} ] ], + "multicol-fill-auto-004.html": [ + "18e6fa7258e46bb9ba0399331c22b91cd72f834f", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "multicol-fill-auto-block-children-001.xht": [ "864080a02a4042e4bf29a27fe5d2c8ce177f2557", [ @@ -202271,6 +202650,19 @@ {} ] ], + "multicol-fill-balance-026.html": [ + "d38ca32e051822736b023e82cf532ef6e6d4e0a0", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "multicol-fill-balance-nested-000.html": [ "5e466df8077545b4d6474389d296bc26c5b28b86", [ @@ -202921,6 +203313,19 @@ {} ] ], + "multicol-nested-029.html": [ + "4f73427c6f5d4935621b91e2ff06f6f415bdf934", + [ + null, + [ + [ + "/css/css-multicol/multicol-nested-029-ref.html", + "==" + ] + ], + {} + ] + ], "multicol-nested-column-rule-001.xht": [ "8fa8fdb7280083b538ce20b451f20d1c711335e5", [ @@ -213103,19 +213508,6 @@ {} ] ], - "lang-pseudo-class-across-shadow-boundaries.html": [ - "ec1e156498102e6d2384ddfe61f54296ef143d95", - [ - null, - [ - [ - "/css/css-pseudo/lang-pseudo-class-across-shadow-boundaries-ref.html", - "==" - ] - ], - {} - ] - ], "marker-and-other-pseudo-elements.html": [ "f393db58fe8a9acd9e52494c4cea56b18c636535", [ @@ -246785,6 +247177,19 @@ {} ] ], + "rotate-animation-on-svg.html": [ + "fed931b00a0326c0b6b89601b45cb9130b2a6757", + [ + null, + [ + [ + "/css/css-transforms/animation/rotate-animation-on-svg-ref.html", + "==" + ] + ], + {} + ] + ], "rotate-animation-with-will-change-transform-001.html": [ "9d330e1573aa0a7742112371c21498f4d2bcb320", [ @@ -246827,6 +247232,19 @@ } ] ], + "scale-animation-on-svg.html": [ + "8862545688ec7ece1e9e92d8843d48dd889a1dba", + [ + null, + [ + [ + "/css/css-transforms/animation/scale-animation-on-svg-ref.html", + "==" + ] + ], + {} + ] + ], "transform-interpolation-matrix.html": [ "b5f9c3cd3084024756ef95e46e85d0110273cab5", [ @@ -246978,6 +247396,19 @@ ], {} ] + ], + "translate-animation-on-svg.html": [ + "e5cc697360ca7548702c6f73dc7615a7a897e76c", + [ + null, + [ + [ + "/css/css-transforms/animation/translate-animation-on-svg-ref.html", + "==" + ] + ], + {} + ] ] }, "backface-visibility-001.html": [ @@ -274426,6 +274857,39 @@ {} ] ], + "dialog-in-rtl-iframe.html": [ + "7a4d200e034840c2f4ff32a8d2e867ae58251b0f", + [ + null, + [ + [ + "/css/css-view-transitions/dialog-in-rtl-iframe-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + [ + "/css/css-view-transitions/dialog-in-rtl-iframe.html", + "/css/css-view-transitions/dialog-in-rtl-iframe-ref.html", + "==" + ], + [ + [ + 0, + 80 + ], + [ + 0, + 500 + ] + ] + ] + ] + } + ] + ], "dialog-in-top-layer-during-transition-new.html": [ "e84167a24892cbaa33b7190843071b7be9563e3b", [ @@ -292260,6 +292724,19 @@ {} ] ], + "filter-region-calc-001.html": [ + "7f894ef24bf5baa6d3af565103be47c9fd7f3fe5", + [ + null, + [ + [ + "/css/filter-effects/reference/green-100x100.html", + "==" + ] + ], + {} + ] + ], "filter-region-negative-positioned-child-001.html": [ "8f302ab52abe2f1008ca60d46fbc77d8ce35c22a", [ @@ -292299,6 +292776,19 @@ {} ] ], + "filter-region-units-001.html": [ + "332ca1016ab475ed442040bc8688134666e6d63a", + [ + null, + [ + [ + "/css/filter-effects/reference/green-100x100.html", + "==" + ] + ], + {} + ] + ], "filter-saturate-001-test.html": [ "0342cf0acd0a17ff89898c85105d1f147f2447d2", [ @@ -293940,7 +294430,7 @@ ] ], "negation-001.html": [ - "9badf8ee17fe15766f9aebae74d2b10d08b4d5e2", + "eccfaa4338bb6b670a7f477bba0dbae2e1ddbadc", [ null, [ @@ -294721,6 +295211,19 @@ {} ] ], + "dir-pseudo-in-has.html": [ + "3a3a0757a58b50490eed1ff70658c0596291708f", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "dir-selector-auto-direction-change-001.html": [ "f6c6393b08a940054b90b68fe3ebea9ebc8846ec", [ @@ -295299,6 +295802,21 @@ {} ] ], + "i18n": { + "lang-pseudo-class-across-shadow-boundaries.html": [ + "ec1e156498102e6d2384ddfe61f54296ef143d95", + [ + null, + [ + [ + "/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries-ref.html", + "==" + ] + ], + {} + ] + ] + }, "invalidation": { "class-id-attr.html": [ "91a6f1a3a544bea376af2916b69a590bb0ac0a9a", @@ -295313,6 +295831,97 @@ {} ] ], + "dir-pseudo-class-in-has.html": [ + "0f5d0726567bed9a066427778b0022278212a7c2", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "lang-pseudo-class-in-has-document-element.html": [ + "93ece465dd51c31f67b0f1947747a4a9434fbd28", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "lang-pseudo-class-in-has-multiple-document-elements.html": [ + "5dbe9c711a9c5613f1cbd03a8267db653dd7419f", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "lang-pseudo-class-in-has-xhtml.xhtml": [ + "3a421c2e120958cec182353262afb5148a3ddc50", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "lang-pseudo-class-in-has.html": [ + "83404fcbc74d66d693308665a0d39b6c6d94eacd", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "nth-child-containing-ancestor.html": [ + "7266cd5a2518bb533e2729859f43d21ac59f1279", + [ + null, + [ + [ + "/css/selectors/invalidation/nth-child-containing-ancestor-ref.html", + "==" + ] + ], + {} + ] + ], + "nth-child-in-shadow-root.html": [ + "dfe2c36a5a71410d192d3cec770cf0bb0937ffa9", + [ + null, + [ + [ + "/css/selectors/invalidation/nth-child-in-shadow-root-ref.html", + "==" + ] + ], + {} + ] + ], "nth-child-of-attr.html": [ "d929d6a50db02d3e34d024d83200649573ca20a4", [ @@ -295639,6 +296248,19 @@ {} ] ], + "nth-child-of-nesting.html": [ + "851260623d6d402016070b5081994ca6474c00c0", + [ + null, + [ + [ + "/css/selectors/nth-child-of-nesting-ref.html", + "==" + ] + ], + {} + ] + ], "nth-child-of-no-space-after-of.html": [ "613593ce668db7a97220d08932dbd2281c2bca4d", [ @@ -295795,6 +296417,19 @@ {} ] ], + "nth-last-child-of-nesting.html": [ + "0dd18f2c4b99396bdb34c75551a8aca512d53e99", + [ + null, + [ + [ + "/css/selectors/nth-child-of-nesting-ref.html", + "==" + ] + ], + {} + ] + ], "nth-last-child-of-no-space-after-of.html": [ "d79d5733a5c3986e0c3560420471a24dba313052", [ @@ -299613,7 +300248,7 @@ ] ], "imageBitmapRendering-transferFromImageBitmap.html": [ - "d615583c0d5699d318b681d30224b7e3fdc41f6f", + "6d3d886759ae8389790bb42519b465fdb52de3d6", [ null, [ @@ -320606,7 +321241,7 @@ [] ], "reports.py": [ - "59593430578702e21d13b1e070e389ef136e0950", + "432f5c61d5e9c452a24e8985b846da0ce7079c0c", [] ] } @@ -342394,7 +343029,7 @@ [] ], "cookie-test.js": [ - "c73d4d756dcbb05185d6e69ab6316d3afba9d8cb", + "a909e4d72facf95760ef35c96efbb426bbc9c8e0", [] ], "cookie.py": [ @@ -362386,6 +363021,30 @@ [] ], "box-shadow": { + "slice-block-fragmentation-001-ref.html": [ + "7e64fa9f63b2d6da6b0e2adbcd7ee786db991394", + [] + ], + "slice-block-fragmentation-002-ref.html": [ + "2c148d8a52cd591ac235ef14bb044304c7a955b7", + [] + ], + "slice-block-fragmentation-003-ref.html": [ + "a58e810174505049269fc358ac7190c1d06a282d", + [] + ], + "slice-inline-fragmentation-001-ref.html": [ + "171e4935eddde185f761ff2b65063c24cc5568fe", + [] + ], + "slice-inline-fragmentation-002-ref.html": [ + "baf297fe2c6ddf3b58a1569f6ac76ef64c7b6ba6", + [] + ], + "slice-inline-fragmentation-003-ref.html": [ + "4c1954b3e69b6f6db28fad2814e88c3146775ace", + [] + ], "support": { "box-shadow-blur-definition-001-dark-bound.png": [ "695f414ad808a7a82d2d6ffd35172551b2c00a11", @@ -363455,6 +364114,38 @@ "5c96f31a6ba193f6d86c7a66267581edd65260d2", [] ], + "fixedpos-001-print-ref.html": [ + "3d66305db0e7497f76dd6aa5a42217eb0931a87a", + [] + ], + "fixedpos-002-print-ref.html": [ + "3d66305db0e7497f76dd6aa5a42217eb0931a87a", + [] + ], + "fixedpos-003-print-ref.html": [ + "3d66305db0e7497f76dd6aa5a42217eb0931a87a", + [] + ], + "fixedpos-004-print-ref.html": [ + "3e3473bcb8e41ce1c4ac6aaf0006b25622b24bc3", + [] + ], + "fixedpos-005-print-ref.html": [ + "e692ff8db3764e05601348acfc2d4ce8314f41b5", + [] + ], + "fixedpos-006-print-ref.html": [ + "b03e1d78d003f33d1ad7810bcacf9cf407b95acb", + [] + ], + "fixedpos-007-print-ref.html": [ + "f576c9377153c3e48ce58d8fcd5428da0d705b23", + [] + ], + "fixedpos-008-print-ref.html": [ + "6ed2528115ae3a5634df6a2968a71fcd81424471", + [] + ], "fixedpos-with-link-with-inline-child-print-ref.html": [ "f12d31acd9d077a24a4ba47bcdbb5b2a3029faf3", [] @@ -363799,6 +364490,12 @@ [] ] }, + "resources": { + "scope.css": [ + "780e90fb67b996b98a146fb5b089aec41409b384", + [] + ] + }, "revert-layer-015-ref.html": [ "661016619c0c46c113dedc57aa890f62b35e137c", [] @@ -365168,6 +365865,34 @@ "1ea1ae3f08aef61921f3b1828b8524ec026c02a4", [] ], + "contain-style-ol-ordinal-li-container-ref.html": [ + "e6c721ac2d7d4f3fb5e9961848f02770d9be640b", + [] + ], + "contain-style-ol-ordinal-pseudo-ref.html": [ + "5b8e4d338c37a19551df931ccb1a6f9c681bd7c2", + [] + ], + "contain-style-ol-ordinal-pseudo-reversed-ref.html": [ + "04cc67139a3eed5f694cecb636ae46ee9f2bcd6d", + [] + ], + "contain-style-ol-ordinal-ref.html": [ + "bee7deda2f2b11efcdb068a35e071a40eff03049", + [] + ], + "contain-style-ol-ordinal-reversed-ref.html": [ + "bb7531790ef7484ec2c8a593dbea594e92d90273", + [] + ], + "contain-style-ol-ordinal-start-ref.html": [ + "93411804b18b87b27fad1149531851cbb21fb385", + [] + ], + "contain-style-ol-ordinal-start-reversed-ref.html": [ + "60aefdf56381ef93b6291420f455d269cfc11264", + [] + ], "contain-subgrid-001.html": [ "ab0d1fede5367681b74a6790286796249614a5f1", [] @@ -369315,8 +370040,8 @@ "db06864cb31f47cad641b39beb8cc80a63db61b1", [] ], - "font-palette-empty-font-family-notref.html": [ - "6d742ae257d376deaf502ed5c66d4743ae19b45b", + "font-palette-empty-font-family-ref.html": [ + "e4f26eeb161e2ccdc9b9479551d22d359987563a", [] ], "font-palette-modify-2-ref.html": [ @@ -369896,7 +370621,7 @@ [] ], "size-adjust-02-ref.html": [ - "85b213076cab51bab343234833835ca0e413581f", + "44bf8a130bea06a037de837fdd9d4fe4b0292d81", [] ], "size-adjust-tentative-ref.html": [ @@ -378263,26 +378988,16 @@ [] ], "reference": { - "image-set-content-rendering-ref.html": [ - "c1ef6d4531cc13aef85c785d92ac42f5e8e4de77", - [] - ], "image-set-linear-gradient-rendering-ref.html": [ - "272bab9c58281997f574ce0f6388544fcc9c0ba9", + "7f95f46eaf4fa1f7375f5a8b01c90389eff338c0", [] ], "image-set-radial-gradient-rendering-ref.html": [ - "f5545af5e6b142e45d0a5b8a2cda4f38896198ae", + "3c49f87d910402e6cead4e330ca50f8c3db92db0", [] ], "image-set-rendering-ref.html": [ - "2ca6b3352d1060ffa6ea4747de6fee64983827f9", - [] - ] - }, - "resources": { - "image-set-rendering-helper.js": [ - "5045679b4cce3794cbf049efe02e2ef75f372fe2", + "8a56bbf4d29b3373a72b4edf93058e2238c76be5", [] ] } @@ -380805,6 +381520,10 @@ "39d7f537c1d771e9882cbaa7aafa1f8f2f99c263", [] ], + "multicol-nested-029-ref.html": [ + "8c92486cc8058fdee26a992f4870f53423a0e586", + [] + ], "multicol-nested-column-rule-001-ref.xht": [ "b6c77b4b841ad2ae1a858ec069672034f1da4654", [] @@ -383081,10 +383800,6 @@ "652c8d9d924402da341a019af190513db21771fd", [] ], - "lang-pseudo-class-across-shadow-boundaries-ref.html": [ - "eda713a7eda3f0155b02f62acf432ac337de963d", - [] - ], "marker-and-other-pseudo-elements-ref.html": [ "796acbf75980cd62d30ade419359bda8c666b12e", [] @@ -390190,6 +390905,10 @@ "6610c6f68bb78ba2045489b41bb0f858df0d6ca5", [] ], + "rotate-animation-on-svg-ref.html": [ + "fda02db187e6bc34488b2629dbd3e6f1a2385eee", + [] + ], "rotate-animation-with-will-change-transform-001-ref.html": [ "0dd93d3f7b5e967c98589394f3a5d8dfd129fdc7", [] @@ -390198,6 +390917,10 @@ "e95e62be888216d9bcd2487c54c1da602973de75", [] ], + "scale-animation-on-svg-ref.html": [ + "d555a5fbe5c9b348992d7a5246a3efa2f6031d46", + [] + ], "support": { "transform-interpolation-reftests.js": [ "d79cbedefe7d1f299ce4d9bef056bb7860bc2dcc", @@ -390211,6 +390934,10 @@ "transform-interpolation-ref.html": [ "2fee6f7c1fc46593f450fac606a651a12403ff72", [] + ], + "translate-animation-on-svg-ref.html": [ + "d503f3385115a4c758bea25bd299c81ba8eb7675", + [] ] }, "backface-visibility-hidden-002-ref.html": [ @@ -393809,6 +394536,10 @@ "659d1d52786ff8ce473cfdb2a162b9fb612b0544", [] ], + "dialog-in-rtl-iframe-ref.html": [ + "44ed0947abcc467ad02c374238849f96c7df8ae0", + [] + ], "dialog-in-top-layer-during-transition-ref.html": [ "41467678a31ab07b3ceb639ccf8ecee27761a45f", [] @@ -394018,6 +394749,10 @@ [] ], "support": { + "dialog-in-rtl-iframe-child.html": [ + "f1b3f021cbc19af6757d0a0b46a4971048d35dcc", + [] + ], "frame-helper.html": [ "d5bc43e7b820541b9f6e7c8cd5629fe0b08e7592", [] @@ -398187,6 +398922,10 @@ "README": [ "df60c5800acbc449917b82504fe6a8c44649ec66", [] + ], + "lang-pseudo-class-across-shadow-boundaries-ref.html": [ + "eda713a7eda3f0155b02f62acf432ac337de963d", + [] ] }, "invalidation": { @@ -398194,6 +398933,14 @@ "a3cc6d3d8f56fd31c4b19d23af606d7c65487145", [] ], + "nth-child-containing-ancestor-ref.html": [ + "4dc7247e41ef83e0640828bdb6887f29c3c8ee98", + [] + ], + "nth-child-in-shadow-root-ref.html": [ + "f28d358cdc53d71501fd35c0c6dc2db41e042b2b", + [] + ], "nth-child-of-attr-ref.html": [ "41205174eb0ad5bfca3189f6e03912530c990f9e", [] @@ -398259,6 +399006,10 @@ "3acec23e61ddb693918aa7531b84c8f3ed37cb5c", [] ], + "nth-child-of-nesting-ref.html": [ + "cdd66ed30279418963178dadefca1a69aee1c62e", + [] + ], "nth-child-of-no-space-after-of-ref.html": [ "94dbc67a851f40879c78735960fece8cba10e820", [] @@ -398802,7 +399553,7 @@ [] ], "requirements.txt": [ - "15d49f4d2984a0c0d5e4dcf157d0444bb6e87395", + "1dd5c6e8384310669faf97d91635ca6e29692652", [] ], "w3ctestlib": { @@ -400428,7 +401179,7 @@ [] ], "multitest.js": [ - "135f133ebc34e0400d1fef38383c0cffb06b9414", + "9948c338b4071eeef68b41d3788693c6864b1e04", [] ], "outdent.js": [ @@ -404828,7 +405579,7 @@ [] ], "message-target.html": [ - "32c7f0c56c61d4d2f6e432dd3c38f8afe91f9762", + "cdd86bcc663f623ceea00eb80d552b3da4f3442d", [] ], "message-target.js": [ @@ -404874,7 +405625,7 @@ [] ], "FileSystemBaseHandle-getUniqueId.js": [ - "d1240d8980c5d06d9357373137532df9bec19aa1", + "ee0cd5e3494c8bac5b4e36cb332b8c0c5025d49f", [] ], "FileSystemBaseHandle-isSameEntry.js": [ @@ -404914,7 +405665,7 @@ [] ], "FileSystemBaseHandle-remove.js": [ - "fd27ff30850c53cbe2f7e8c19b639e2e33c0b826", + "021576310b3d7d89a867d6754e370978670c1a4b", [] ], "FileSystemDirectoryHandle-getDirectoryHandle.js": [ @@ -407983,7 +408734,7 @@ [] ], "imageBitmapRendering-transferFromImageBitmap-expected.html": [ - "747615f5fbff0a2415e61b89e720e0d41d2c6f1b", + "bababda44cd520acdde29192ef07b44b31f87442", [] ], "imageBitmapRendering-transferFromImageBitmap-flipped-expected.html": [ @@ -421721,7 +422472,7 @@ [] ], "popover.tentative.idl": [ - "7e38b1f09ac9a5e61d573c495b00bca09862a184", + "bf23c7641d94e80567623d2b406cb4f746ddbebd", [] ], "portals.idl": [ @@ -422432,7 +423183,7 @@ ] }, "lint.ignore": [ - "ac1d870c7aeb16e0351fcdfd0f6daf242fd4d548", + "11821957cf4db2a454da4f7b135198797ceb437f", [] ], "loading": { @@ -425254,6 +426005,14 @@ "5b334d9c3aca0a974c9c32063c5b56d2214a89e2", [] ], + "change-payment-method-manual-manifest.json": [ + "8f33def77ba18987d0edbe941ce0da90c39b7cec", + [] + ], + "change-shipping-address-manual-manifest.json": [ + "08b034e825ca66488d61da8dc4f49e3f18323006", + [] + ], "manifest.json": [ "875d74b66306ad17d29e3f75ad7d250ba74da20e", [] @@ -425384,11 +426143,11 @@ [] ], "parent-frame-with-cross-origin-child.sub.html": [ - "4be0df872cbfd22dfcbd6b4e8e9005a7a79e88ae", + "a49174519e42ded73091042a547443f752ab7b26", [] ], "parent-frame-with-same-origin-child.html": [ - "c9248a4e8bb9f4107be82947436e469c3c74aaa6", + "813c2a725bdd5e79595481c09993b4a064e10fc7", [] ], "postmessage-entry.html": [ @@ -428321,6 +429080,10 @@ "9a905960eea4ac35ab1abc487f80084621e358d2", [] ], + "delay-load.html": [ + "4898c1be8ebfff9e733125fec941eea8cde3b83c", + [] + ], "document-domain-no-impact.html": [ "64cdd8a8701eb4d749f112ad4015d4e5779b77b1", [] @@ -428374,7 +429137,7 @@ [] ], "entry-invariants.js": [ - "e35ea289ce875e818544c4eb046a5cf72e10e9d1", + "dc907533946b383ccadd62ce1c81135ee6c1d19c", [] ], "eventsource.py": [ @@ -428398,7 +429161,7 @@ [] ], "frame-timing.js": [ - "e0c364e9b2c3e264dea10a0d6d19b0cdee01919d", + "019bd424b55065451eb4ad0a132d3a6befbbb5fc", [] ], "frameset-timing-frame.html": [ @@ -428546,7 +429309,7 @@ [] ], "resource-loaders.js": [ - "5a859eb02de7850eff53d3b2c75256fc87892835", + "70889b709f15a40f9cdc12cfeafb7a46c88b9a0c", [] ], "resource-timing-content-length.py": [ @@ -429322,7 +430085,7 @@ ], "support": { "testcases.sub.js": [ - "1a5989fb73339a02e48430390304d33995dd4f87", + "9081ad2aa212d2eec8fc33c2a64d2583814e9af1", [] ] } @@ -429470,7 +430233,7 @@ }, "view-timelines": { "testcommon.js": [ - "969f282e678b5f36781c37aa734bb832013766a6", + "12693c35d768263b9db625702f174d7cf79606c0", [] ] } @@ -432759,7 +433522,7 @@ [] ], "utils.sub.js": [ - "ea70939aff0853e9a1f4f26375231c329945c266", + "aaa73c2135d2725c7a85966febdfd0cd118bbfdf", [] ] } @@ -434630,7 +435393,7 @@ [] ], "requirements_tc.txt": [ - "0c67c0805a05ef0f578ece3460b07fb7b261f689", + "7189b7b58f9d6c2fd32424b4b30cf19bee1e1e5e", [] ], "run_tc.py": [ @@ -435149,7 +435912,7 @@ [] ], "requirements_tests.txt": [ - "4e1e357d28e87c9e356cc12255e84fc5eacd0cea", + "4d8f2a5d22399568f3211c20add58c45e20887b5", [] ], "runner": { @@ -443222,7 +443985,7 @@ ] }, "requirements.txt": [ - "dea3bbaa0a09ec077d06bf295e4571b4df883ba5", + "58641393b838f92393ccbdc7b7f5e7e3ee79af14", [] ], "requirements_chromium.txt": [ @@ -443234,7 +443997,7 @@ [] ], "requirements_firefox.txt": [ - "222c91622d220492e4916f05dd96c35646586fae", + "1f9033c09fe8db7e9684a3e336559af48d51331e", [] ], "requirements_ie.txt": [ @@ -443358,7 +444121,7 @@ ] }, "servo.py": [ - "d57804f977a466313accc510eed8a84e13d59dd3", + "d0bf0a38ea3f48ef1921360e25ea9ec63e44ca7a", [] ], "servodriver.py": [ @@ -444097,7 +444860,7 @@ [] ], "server.py": [ - "8038a78df85cd02492b63bbf25d464fd7185042b", + "1fac29a6a7fb70f289e3f69f714122555116c27e", [] ], "sslutils": { @@ -444896,7 +445659,7 @@ [] ], "toascii.json": [ - "b9ceea310676d770db6fbade1d6adae703694fee", + "4cb41e94cd4a0f35da2102b71b3144ce2d51a497", [] ], "urltestdata.json": [ @@ -446682,7 +447445,7 @@ ], "browsing_context": { "__init__.py": [ - "006b91fc3a6812dad0116494d71b1f0da34651f9", + "a887aeb8a459dfd7f6e8257f4bf633179628b432", [] ], "capture_screenshot": { @@ -446794,7 +447557,7 @@ }, "network": { "__init__.py": [ - "dc6848c00f29d81d75e5e920a29aea20e38e3232", + "d0451d0f285336f7e32209bfd878aebbf018ffa2", [] ], "before_request_sent": { @@ -446810,9 +447573,15 @@ ] }, "conftest.py": [ - "65f0cd8911255d0112c0f29713a442c6fb852f95", + "3dd80f2896daaddec6c0c607cfbaa6c1a0fec7db", [] ], + "response_completed": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, "response_started": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", @@ -447668,6 +448437,26 @@ ], "resources": { "test_data": { + "abs.json": [ + "c59054c3e500d90c0b9f4c919df2f421b0030e8d", + [] + ], + "add.json": [ + "0a12871cebab50b0e826674107ff503e6ede5347", + [] + ], + "average_pool2d.json": [ + "5523137be00388d75f335f08beb483a83da9621c", + [] + ], + "batch_normalization.json": [ + "429992c67c6765b31d2be68f01624f498cfb77b9", + [] + ], + "ceil.json": [ + "6fa623977fcba14892717a387bb7f7e2cda7ef23", + [] + ], "clamp.json": [ "93ab5ca0c1cae95e77bab2405bc10901b4c769d1", [] @@ -447676,10 +448465,86 @@ "9ecc393f899734a9da1ff3a207a7beb8cc738f98", [] ], + "conv2d.json": [ + "a4b97d3c039d0b34b335dfafe2a98cf36089b4fc", + [] + ], + "cos.json": [ + "4d992325509141a4e5959e84317567722624edc6", + [] + ], + "div.json": [ + "d72544e8ec4fcdf6b6da2a83829d59e1d9f8afb8", + [] + ], + "exp.json": [ + "886729f2e8a3c7969f25ab7276090aade2039a90", + [] + ], + "floor.json": [ + "f2fa797d4162595fe86704cd2bc3b3719fa34ba0", + [] + ], + "gemm.json": [ + "909b8e31cea812ac5b776c565e67ad465ca30aaa", + [] + ], "leaky_relu.json": [ "a95a9a0cfcee9bd549f2e1aed40429592b2049ba", [] ], + "log.json": [ + "c48406e707554630e93b074eafc34d3c4cb5d07b", + [] + ], + "matmul.json": [ + "a4ca8d026403c738be6ab6ccb9df5df8ba4becc8", + [] + ], + "max.json": [ + "27a258248fcbfc38195e85809a665f3c62dd0fd6", + [] + ], + "max_pool2d.json": [ + "cf426620e56a0cd568f724ac8f5635a636f70213", + [] + ], + "min.json": [ + "f5ea4779f409e86285ec0f5ab9f15f47a86976ec", + [] + ], + "mul.json": [ + "e6487cfc59114d83531c40bfa5911278d447687c", + [] + ], + "neg.json": [ + "8a1eea34f95f52f024fb8e3b8977e037040f7584", + [] + ], + "pow.json": [ + "d6c9f592df7b4103ec477dcd2a49cdc482c88672", + [] + ], + "reduce_max.json": [ + "a1eb6d2b831274a7d799cfd3616c8d69cc1b5704", + [] + ], + "reduce_mean.json": [ + "af353b5ad110c875868d439d0fbb3b41dd098c26", + [] + ], + "reduce_min.json": [ + "8db681d7ea4556f44a11ff7447f3ed7b38402283", + [] + ], + "reduce_product.json": [ + "24c60f89359bdd90afe56dbeeb7e7aa6612aa0fd", + [] + ], + "reduce_sum.json": [ + "d382fb094472b1411f228a2dbf671b64a5a88f18", + [] + ], "relu.json": [ "b4597891472edaf4721c2aea012773e16915b165", [] @@ -447692,6 +448557,10 @@ "c233336321775622eaf458ba7bb9d237e90e6d12", [] ], + "sin.json": [ + "3cc4771a336fe2ac74c48b768271b45d62e3496a", + [] + ], "slice.json": [ "926351cee7bfb5b3e3c87dcb2a1c3d2dda2b9144", [] @@ -447708,6 +448577,14 @@ "88890fe87029ad9b8a120d40af6f40ed818d725a", [] ], + "sub.json": [ + "4a3096313e1a45f41a8b426fc65ec9f0b47b89c6", + [] + ], + "tan.json": [ + "857e2b65059e0b4868b9cfe3987d5d4ae135dce7", + [] + ], "tanh.json": [ "9e13b62472a93d0261890b7cc07e41a7b4909ee6", [] @@ -447718,7 +448595,7 @@ ] }, "utils.js": [ - "f11ce7c6e0025380220d35af0e2603065d940eee", + "4c7b6bc6ef148e8d4afa3e264c42ca694e6a48a2", [] ] } @@ -447854,6 +448731,10 @@ "c943dafe5b154314132124e1d563df2a00b2aaf7", [] ], + "helper.js": [ + "d4cec39ffce0f58b76da653c78dc384f22ffa43d", + [] + ], "resources": { "blank.html": [ "a3c3a4689a62b45b1e429f6b7a94690e556a1259", @@ -469057,7 +469938,7 @@ ] ], "sandboxed_iframe.https.window.js": [ - "c5e3d1e89038cf99bc7553ca5014e48b215dbc6d", + "0fc520e4aec3648164690de5061b4ce05a0d6c67", [ "bluetooth/getAvailability/sandboxed_iframe.https.window.html", { @@ -469170,7 +470051,7 @@ ] ], "sandboxed_iframe.https.window.js": [ - "22cfd17d466489b37c20e3148fb6c3f566f52263", + "b9b0ac93c27a054433d9853b3dced0fa1e6a9d13", [ "bluetooth/getDevices/sandboxed_iframe.https.window.html", { @@ -483632,7 +484513,7 @@ "cookies": { "attributes": { "attributes-ctl.sub.html": [ - "7950751e27d97bca5e5a7b8e57703ac35873cdf5", + "e741dfd9c256e8fd451bc892ad4cc309570cd5b8", [ null, { @@ -483789,7 +484670,7 @@ ], "name": { "name-ctl.html": [ - "f5359793559a50ebfb03886668cc3b7c336f143d", + "6ff2305b3a86e209955b43496c490c46fd3d7810", [ null, { @@ -484211,7 +485092,7 @@ }, "value": { "value-ctl.html": [ - "eb9fee83c0a2b6001211ba01413171e257726923", + "5a24064f43c9a4a79ac37cfa2d1d787f1ab5e3f1", [ null, { @@ -484538,6 +485419,20 @@ ] ], "fedcm-multi-idp": { + "abort-multiple-gets-through-first-idp.https.html": [ + "eb9f7da7b26200a936b4d6ce304466bb4c1128e4", + [ + null, + {} + ] + ], + "abort-multiple-gets-through-second-idp.https.html": [ + "7e7ec2ce3d18b193183c2444b708c9d0927f1d2d", + [ + null, + {} + ] + ], "get-before-and-after-onload.https.html": [ "fa9ec7b52fca1faf6cdd29ce6deef31669417f7b", [ @@ -484559,6 +485454,13 @@ {} ] ], + "multiple-gets-after-abort.https.html": [ + "b7b03e4a147d30e5d55ae8d757c0f666374bb7e7", + [ + null, + {} + ] + ], "multiple-gets-after-onload.https.html": [ "1a806a2049d39990039b10e690a8505ad1e5856b", [ @@ -486015,7 +486917,7 @@ }, "css-anchor-position": { "anchor-name-001.html": [ - "f85c9248d93058b5dbe8a8e58453ec0407922d45", + "8d64d4a1a34d0c8dfd1bf080d614f2b017bc5c08", [ null, {} @@ -486057,7 +486959,7 @@ ] ], "anchor-name-inline-001.html": [ - "024225fecbb01b24da356355577d26c99c36c5a6", + "ae8c1d65140c42f629c5a82b6803a80e54b7ff94", [ null, {} @@ -486148,7 +487050,7 @@ ] ], "anchor-position-dynamic-001.html": [ - "5b5ee82990e6f5aaac1acf6c7339ae242dc63cf1", + "95b90c9bf12c10be70fe76978bc4cf5d0af06a0d", [ null, {} @@ -486859,7 +487761,7 @@ ] ], "animation-delay-end-computed.html": [ - "9e0326b387c8d2953b851a0d01272c651733be50", + "bfb89d0267f5ad9a5ef7cb01e8ad6dc4b536a2fc", [ null, {} @@ -486887,7 +487789,7 @@ ] ], "animation-delay-shorthand-computed.html": [ - "01b1375dc9ddbd12a3b58573492e6f46b6cfd1db", + "0a1eb96041c81ac14969d39a77013f8157495e5f", [ null, {} @@ -486901,7 +487803,7 @@ ] ], "animation-delay-start-computed.html": [ - "9e0326b387c8d2953b851a0d01272c651733be50", + "bfb89d0267f5ad9a5ef7cb01e8ad6dc4b536a2fc", [ null, {} @@ -488844,6 +489746,20 @@ {} ] ], + "scope-implicit-external.html": [ + "d1ac738b778da33fa0359646a0ef876b339d5a64", + [ + null, + {} + ] + ], + "scope-implicit.html": [ + "805a91eba36754a51717dfe4485a52527cc5fa04", + [ + null, + {} + ] + ], "scope-invalidation.html": [ "6f8abfd79c26c934ddb8367542dfc2f1f0c66f8b", [ @@ -490300,6 +491216,13 @@ {} ] ], + "content-visibility-auto-state-changed-removed.html": [ + "ae1c946fa311166d49ee51c90cbe7d0c4b478253", + [ + null, + {} + ] + ], "content-visibility-auto-state-changed.html": [ "65b501de1bfc22c1ff0488f8b570586ee70ff701", [ @@ -490563,6 +491486,13 @@ null, {} ] + ], + "display-interpolation.tentative.html": [ + "b6b58ee45ee87eee8aca1501af476ea3c48e12b7", + [ + null, + {} + ] ] }, "display-contents-blockify-dynamic.html": [ @@ -493373,7 +494303,7 @@ ] ], "font-face-src-format.html": [ - "36abbb44dc5e2f0b96cd58243b13d558e223dcfa", + "7a5bb5b97ec3e3d2bb1b4894865bca2086522f2c", [ null, {} @@ -493387,7 +494317,7 @@ ] ], "font-face-src-local.html": [ - "d7c8cba18cd88705ee98c0d5b719ce6fb499f429", + "30c435afaf43d009d72b7c818a187f03d78d3246", [ null, {} @@ -501317,6 +502247,13 @@ {} ] ], + "custom-property-transition-mismatched-inherited-property-numbers.html": [ + "292e23b1fe6f76eaf715ed6ed3693a6b229254c4", + [ + null, + {} + ] + ], "custom-property-transition-mismatched-list.html": [ "7796e36a2e38f6074113dff3e20498b33ecf8c7a", [ @@ -501324,6 +502261,13 @@ {} ] ], + "custom-property-transition-mismatched-property-numbers.html": [ + "713a035320b49beddd26ab8f9f73c68affff33b7", + [ + null, + {} + ] + ], "custom-property-transition-non-inherited-used-by-standard-property.html": [ "b96c28bc8825fbabbdb1a49ebacd08d62b874842", [ @@ -501382,7 +502326,7 @@ ] }, "at-property-animation.html": [ - "9f81ae846ef721e1fda9fc3cc8d026f95bdaa17f", + "6d467ab2b992b703a433de7212a061f8deab4144", [ null, {} @@ -501410,7 +502354,7 @@ ] ], "at-property-typedom.html": [ - "04c40c8be0f7fa9fe2ba025a359ebe3f0b93ff70", + "beee0324291cc668b066c9054ff9b5348d206863", [ null, {} @@ -501473,7 +502417,7 @@ ] ], "register-property-syntax-parsing.html": [ - "f9022764b1ad80aa648f2cae54b68db63d5803b0", + "33257fde0e67b7df9043191a08f48e57da4544a0", [ null, {} @@ -501571,7 +502515,7 @@ ] ], "var-reference-registered-properties.html": [ - "8adfb09666b2b1b6c519dda502d1c7e5887b8810", + "a6f26429e84761bdccd61b450559a93327f65be5", [ null, {} @@ -501593,20 +502537,6 @@ {} ] ], - "dir-pseudo-on-bdi-element.html": [ - "434434461ddd1726ddbbad7d7637644648b06bd5", - [ - null, - {} - ] - ], - "dir-pseudo-on-input-element.html": [ - "b61a829b30a8cac765953be2ffe190648fd3c802", - [ - null, - {} - ] - ], "file-selector-button-inherit.html": [ "4947e5e353914d856e93995b6e5b40c9460cec05", [ @@ -513478,7 +514408,7 @@ {} ] ], - "resolve-relative-to-base.html": [ + "resolve-relative-to-base.sub.html": [ "bfbe127ab2bd84d8a5965fa42bbe704f7bd0b6b9", [ null, @@ -513713,7 +514643,7 @@ ] ], "variable-definition.html": [ - "0f9cefc5e93c2391f6882a8fd5d074e27ac73668", + "aaaaf6be23201d8176cd00c34027229e263abdc3", [ null, {} @@ -517322,7 +518252,7 @@ ] ], "test_media_queries.html": [ - "06a9cd8cc5632df3ff0a1b821a7d844474c4522a", + "6a91c1119ddf7aeccab82bd4dd5c1031c880f896", [ null, {} @@ -517634,6 +518564,20 @@ {} ] ], + "dir-pseudo-on-bdi-element.html": [ + "434434461ddd1726ddbbad7d7637644648b06bd5", + [ + null, + {} + ] + ], + "dir-pseudo-on-input-element.html": [ + "b61a829b30a8cac765953be2ffe190648fd3c802", + [ + null, + {} + ] + ], "dir-selector-auto.html": [ "d53e989f69e172ea8cb0eb0a11863c767f4f5bf2", [ @@ -518473,6 +519417,20 @@ null, {} ] + ], + "lang-pseudo-class-disconnected.html": [ + "30bb773a3184a69aac94f8de8d1e3740001d9e3f", + [ + null, + {} + ] + ], + "lang-pseudo-class-empty-attribute.xhtml": [ + "5765e0bae18c5068747ec6c6c71c81adc53da0ab", + [ + null, + {} + ] ] }, "invalidation": { @@ -518681,6 +519639,15 @@ {} ] ], + "media-loading-pseudo-classes-in-has.html": [ + "62b18c1e0efbee8d87919e7abc91237dc7cda939", + [ + null, + { + "timeout": "long" + } + ] + ], "media-pseudo-classes-in-has.html": [ "f0df71534aef8b63743d1874c59980f82031900c", [ @@ -519155,7 +520122,7 @@ ] ], "ElementInternals-accessibility.html": [ - "b823a9ddea844749274c8913fd326051edae5cd0", + "8a8f1c9aea08466dbf5182159c307a6e79e7cbb3", [ null, {} @@ -519168,8 +520135,15 @@ {} ] ], + "HTMLElement-constructor-customized-bulitins.html": [ + "9244dfe4adc6f1facab71e770641c1f1fdda9d52", + [ + null, + {} + ] + ], "HTMLElement-constructor.html": [ - "b52c84147097a60ff87e5aa7214d2b345a5cf891", + "12ceb566cb548f807bc3254ff39fdf077f8f3413", [ null, {} @@ -519530,7 +520504,7 @@ ] ], "AriaMixin-element-attributes.html": [ - "09e62b2d39c5e75879046c52f910a297b9e70c93", + "eec6dee03b74fc6c89418598d4460e1e91894ae4", [ null, {} @@ -520831,7 +521805,7 @@ ] ], "Event-dispatch-click.html": [ - "010305775df7e9847b4e9634ef2ab8a07ee02ab5", + "ab4a24a5ad5096497ef65b075db89a146b38c115", [ null, {} @@ -524605,6 +525579,15 @@ ] ] }, + "ecmascript": { + "regexp-lookbehind.html": [ + "07156f570e7b3d5d967110c700642d85bae4a922", + [ + null, + {} + ] + ] + }, "editing": { "event.html": [ "16d640be2183722ca4f260452ed80b8bb09d2dd2", @@ -540282,6 +541265,16 @@ } ] ], + "event-click-visibilitychange.html": [ + "beb3ba3512d6e0ad800c8be041d0014a80ba375c", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "event-counts-zero.html": [ "e00eb40255b853b67ea959bf7ebeb12d066374ec", [ @@ -567826,14 +568819,14 @@ ] ], "createImageBitmap-exif-orientation.html": [ - "95d13d33fae0cd706dd79abee396306f23db3243", + "d476d090ce896b38df9a0785fe6364b5c648ddc7", [ null, {} ] ], "createImageBitmap-flipY.html": [ - "32791b039c6a6392935bac9ebc1a3b3f3195fea7", + "9b0d2dfb79efbd42646ec0b83270d688d7cd3634", [ null, {} @@ -567868,7 +568861,7 @@ ] ], "createImageBitmap-sizeOverflow.html": [ - "1be8184da60d63174972a82036d6b0d47d5f9a67", + "25c1fb688525693bc503cc4e2095e25da261bb72", [ null, {} @@ -586535,7 +587528,7 @@ ] ], "aria-element-reflection.html": [ - "991f7c7aa12d871ca8ae4742bc1e5a37b4c76f57", + "8d4d4b8f6a652ac79fae69a03aef50772098b5a5", [ null, {} @@ -597877,6 +598870,13 @@ {} ] ], + "focus-dynamic-type-change.html": [ + "a1d3dfa2a29787d59a65151996e6b5727289e06d", + [ + null, + {} + ] + ], "hidden-charset-case-sensitive.html": [ "537500c91f1391ac99b30d23664fd6ea3288c0b2", [ @@ -598890,6 +599890,13 @@ {} ] ], + "textarea-validity-valueMissing-inside-datalist.html": [ + "f0ce0028eec132614e8342afade5333d06fc4ab0", + [ + null, + {} + ] + ], "value-defaultValue-textContent-xhtml.xhtml": [ "9462e94935284f0cbbbf8fe30658f78941457caa", [ @@ -599771,8 +600778,15 @@ } }, "popovers": { + "hide-other-popover-side-effects.html": [ + "9fe6673d2ee9c8da59ca603eba5d30ce3729ebb5", + [ + null, + {} + ] + ], "idlharness.tentative.html": [ - "478dec84c8195ff7b3979bae81a2c32bd14c1b22", + "d1a258bb4ad3ac3031a882a2b20d58a483cebcf2", [ null, {} @@ -599834,7 +600848,7 @@ ] ], "popover-attribute-basic.tentative.html": [ - "d16e34f896e7bdc258595dda60319907fccb1df5", + "9b03c7bc1c65a14b2ad396713cf9203054231357", [ null, { @@ -599858,7 +600872,7 @@ ] ], "popover-events.tentative.html": [ - "c88dc21dfa23fbaf9a9501aec39ea198de52a93c", + "b96a0f5a53f489d8cf8c1bb2008cd4985fdf6c31", [ null, {} @@ -599908,7 +600922,7 @@ ] ], "popover-light-dismiss.tentative.html": [ - "3c48bd9274e88e61d023071610d765b83dd68f4b", + "587418bd86fcc170adae86a258163d9418252987", [ null, { @@ -599980,7 +600994,7 @@ ] ], "toggleevent-interface.tentative.html": [ - "8ee63c4071856c0132f952c4799f95c44ee0b446", + "4d437b0c0ad523c8c9837d917f5c3064933de479", [ null, {} @@ -611690,6 +612704,13 @@ {} ] ], + "position-absolute-overflow-visible-and-not-visible.html": [ + "c74d4c20210264854dde087be5b3ae2edf7f0491", + [ + null, + {} + ] + ], "position-relative.html": [ "4cdc429570036f0b3afbba24573c91574f836803", [ @@ -624754,7 +625775,7 @@ ] ], "performance-navigation-timing-cross-origin-bfcache.tentative.window.js": [ - "222ed3b54a29981a2b7e0bbc48ffca81073ea021", + "115ea81d4d4430313f67f8281c36222e1dd99b6a", [ "performance-timeline/not-restored-reasons/performance-navigation-timing-cross-origin-bfcache.tentative.window.html", { @@ -641492,6 +642513,13 @@ {} ] ], + "body-size-cross-origin.https.html": [ + "b0340139bf7f4021e457d13ae74ea5ef28e09884", + [ + null, + {} + ] + ], "buffer-full-add-after-full-event.html": [ "43dc3d84fd3dd1b6263dfdf961113edb9e1a0da6", [ @@ -641866,10 +642894,12 @@ ] ], "iframe-failed-commit.html": [ - "1da207d2fbe05ee15213ad92f81456a810171ad0", + "91094072a6d307384ef7cd2f0b793128d4658407", [ null, - {} + { + "timeout": "long" + } ] ], "iframe-non-html.html": [ @@ -641887,7 +642917,7 @@ ] ], "iframe-sequence-of-events.html": [ - "5f99a5cab2de6b1f813dbcd09232ac679ca308b1", + "02d1c362c9df491439fd81ed9be48d5859a2e94f", [ null, {} @@ -642078,6 +643108,13 @@ } ] ], + "nested-nav-fallback-timing.html": [ + "b8bba5614d0d12b71767ba7ec8d5b71bec532029", + [ + null, + {} + ] + ], "nextHopProtocol-is-tao-protected.https.html": [ "b16ff7af75dc7a61c2e458827b86340a6639b884", [ @@ -642136,6 +643173,13 @@ {} ] ], + "queue-entry-regardless-buffer-size.html": [ + "ea47ae3a7950a2390f6bc0d15bd0ca3ba1a4ec03", + [ + null, + {} + ] + ], "redirects.html": [ "ba69907a5f6e46a3e8a79041da17039d14d20feb", [ @@ -642353,7 +643397,7 @@ ] ], "sizes-redirect-img.html": [ - "786018d0c4634c3d8c6df2c4003b201e6e4bc4e1", + "e440029782b5d5e7637dfa30683d6f77a72d61b1", [ null, {} @@ -642526,7 +643570,7 @@ ] ], "sanitizer-config.https.html": [ - "4faa156ead3b152f92d102c23e2a575837d293f4", + "f60e6c9c9383ceb92afb4bfba92b664e9a04fad6", [ null, {} @@ -642540,7 +643584,7 @@ ] ], "sanitizer-names.https.html": [ - "49949927deccdb9c6b8e625de9917bcfa6abbbce", + "df5dd8549d1913ed800768a04853e76c9a5c096d", [ null, {} @@ -642575,7 +643619,7 @@ ] ], "sanitizer-unknown.https.html": [ - "a703f42f4962e024910fc84ff006dad82d34d91b", + "03d7c6966d62f595604e1d0e4476daf411317e61", [ null, {} @@ -644707,13 +645751,6 @@ {} ] ], - "view-timeline-delay-animation.html": [ - "dfb0e59f5d7798ab4958373fd5f3ff8208e13b96", - [ - null, - {} - ] - ], "view-timeline-dynamic.html": [ "74da8850d467e74c83401abcc459ddbce2b2720f", [ @@ -645008,20 +646045,6 @@ {} ] ], - "view-timeline-delay-large-subject.html": [ - "edb37c1379cc32f081dea6a06e88a07f2f2b2e74", - [ - null, - {} - ] - ], - "view-timeline-delay.html": [ - "1377dc339c3da8a21fc83d27e0be11a7dceb0817", - [ - null, - {} - ] - ], "view-timeline-get-current-time-range-name.html": [ "8f385e7b6ebaa208582bc3bec068cc1beb791fd8", [ @@ -645030,7 +646053,28 @@ ] ], "view-timeline-inset.html": [ - "72480ea9f3cad78676b1aae10bed5bed99bd7b87", + "357d8558f94eeb8342942ecb17a3e1a1bf86fa1d", + [ + null, + {} + ] + ], + "view-timeline-missing-subject.html": [ + "01ca0215246bb59e8c7976f68801fb00837869f5", + [ + null, + {} + ] + ], + "view-timeline-range-large-subject.html": [ + "5a7416eb54dd6e0004d7846d141c449958f40a53", + [ + null, + {} + ] + ], + "view-timeline-range.html": [ + "916b4c12bb770fd87f860e972a6d606f40a5e715", [ null, {} @@ -645051,7 +646095,7 @@ ] ], "view-timeline-subject-size-changes.html": [ - "b438317f7c599f3c897f53058cecabc6dfebb1a6", + "553facb52fa18323369c8061ce934ceb74d50f0e", [ null, {} @@ -652619,7 +653663,7 @@ ], "no-vary-search": { "prefetch-single.https.html": [ - "543b46c535ae4e1403c0d8e2dc5d0a2cc82d774f", + "fdbb6171353c9b986dc44be117af3e52c3fc77a6", [ "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?1-1", {} @@ -652693,13 +653737,29 @@ {} ], [ - "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?26-last", + "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?26-26", + {} + ], + [ + "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?27-27", + {} + ], + [ + "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?28-28", + {} + ], + [ + "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?29-29", {} ], [ "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?3-3", {} ], + [ + "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?30-last", + {} + ], [ "speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?4-4", {} @@ -665121,7 +666181,7 @@ ] ], "historical.any.js": [ - "c3067dfd730123585c3c5c81b082df9a07e4c556", + "cbeb36a63f25c2050991ff9e1a9a596a4f973c11", [ "url/historical.any.html", {} @@ -670713,6 +671773,13 @@ {} ] ], + "display.tentative.html": [ + "6b28dcd9648d3ad3034474f89aa06869b3d58e20", + [ + null, + {} + ] + ], "interpolation-per-property-001.html": [ "97f28224733511e37bf83bc7e653a2b4ff7f88b6", [ @@ -675171,7 +676238,7 @@ ] ], "createcredential-extensions.https.html": [ - "64690e7c506bb77ad260fe8606d499e2e1fb9b23", + "5a55a8d860ea5a93aa4fc857f19ccdaeb0238008", [ null, { @@ -675230,6 +676297,16 @@ } ] ], + "createcredential-prf.https.html": [ + "7243e088d40e05cadcc6fdedbadb19437e96ada0", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "createcredential-pubkeycredparams.https.html": [ "d1df7952d6766744280b460a18d2e561a5527e5d", [ @@ -675320,7 +676397,7 @@ ] ], "getcredential-extensions.https.html": [ - "2b5557d3f2b4bc97d146f3bc9b7158bc8c40ee80", + "16c1e5745719568f11a41697e2bbe2f0bb7b0a5e", [ null, { @@ -675359,6 +676436,16 @@ } ] ], + "getcredential-prf.https.html": [ + "6f8670f64d19e1a7366eb6cf42a83a3b6eedd387", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "getcredential-rk-passing.https.html": [ "8c0254fee4258478e5920c30f693c84e07cfcb2e", [ @@ -677808,7 +678895,7 @@ ] ], "videoDecoder-codec-specific.https.any.js": [ - "20553017f95f5fc49cff3805eb92f07e1792ff87", + "2a4ad6d6934ab5be4da903a846ad9b2cffb898ed", [ "webcodecs/videoDecoder-codec-specific.https.any.html?av1", { @@ -678615,7 +679702,7 @@ ], "ecmascript-binding": { "allow-resizable.html": [ - "be9df55e75a07babdcb2d7fa64ce3f88b3dd0e20", + "54daa57bce676ab692a5aff0bbd846c4cfbcb6fd", [ null, {} @@ -680372,8 +681459,59 @@ ] }, "webnn": { + "batch_normalization.https.any.js": [ + "6644a921723a6e83b9a38e0c5b3e69f75816efcd", + [ + "webnn/batch_normalization.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API batchNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/batch_normalization.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API batchNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "clamp.https.any.js": [ - "4cf54d1cea913791d8fa857747c5eb657f5e37df", + "9818aed7c12be552b24427efa3beb78547ef2e0e", [ "webnn/clamp.https.any.html", { @@ -680424,7 +681562,7 @@ ] ], "concat.https.any.js": [ - "2c8950fe99ddabe3f8099c9fc45226b09b68feb3", + "07a1289cef0add6581aaeb859881aadf68c81261", [ "webnn/concat.https.any.html", { @@ -680474,6 +681612,210 @@ } ] ], + "conv2d.https.any.js": [ + "52e267a6d3f437a4699976ca5f432ffde9111f91", + [ + "webnn/conv2d.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API conv2d operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conv2d.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API conv2d operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "elementwise_binary.https.any.js": [ + "06c2404f95489da2c2558639d9b631c8c2124295", + [ + "webnn/elementwise_binary.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API element-wise binary operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/elementwise_binary.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API element-wise binary operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "elementwise_unary.https.any.js": [ + "3a6ccc8daf638750378323c96e530919315d3fa6", + [ + "webnn/elementwise_unary.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API element-wise unary operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/elementwise_unary.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API element-wise unary operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "gemm.https.any.js": [ + "179a1649b6e3077ba0cfd73bbce449d9683d461f", + [ + "webnn/gemm.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gemm operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/gemm.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gemm operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "idlharness.https.any.js": [ "6122134268c82dfc96327bb5fd56b248aa809076", [ @@ -680534,7 +681876,7 @@ ] ], "leaky_relu.https.any.js": [ - "0755f33a904d2f7d07c23fdb336c0ea733ca7c0d", + "61539ce92ea8611f0c929e390fb8d06a9259c7c4", [ "webnn/leaky_relu.https.any.html", { @@ -680584,8 +681926,161 @@ } ] ], + "matmul.https.any.js": [ + "8a9882afe613c68fb1fd948c2310f91eb9cb8009", + [ + "webnn/matmul.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API matmul operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/matmul.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API matmul operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "pooling.https.any.js": [ + "df19e5770948402356177c8a0b11b88814912c0e", + [ + "webnn/pooling.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API pooling operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/pooling.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API pooling operations" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], + "reduction.https.any.js": [ + "bff8aa22baa1091018d4ef5abc9df470f7f3c684", + [ + "webnn/reduction.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API reduction operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/reduction.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API reduction operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "relu.https.any.js": [ - "19a0d986ca8a2f7f97752a57b14eacf9a026654a", + "42b64e11de0eda64f587cce901861fda8e2b7ce3", [ "webnn/relu.https.any.html", { @@ -680636,7 +682131,7 @@ ] ], "reshape.https.any.js": [ - "40829bd1c3cbef77a2714329cdbefd4983506fb9", + "9fa3262fe5240c549cf12e6cc39fad56e8bd7d88", [ "webnn/reshape.https.any.html", { @@ -680687,7 +682182,7 @@ ] ], "sigmoid.https.any.js": [ - "cb22b6eca1ed43ddfeba4fc133a5aa9c5f8aa0f2", + "e904d8dfa7814107f0f2f2707eaebaa600533941", [ "webnn/sigmoid.https.any.html", { @@ -680738,7 +682233,7 @@ ] ], "slice.https.any.js": [ - "8cbcf057c96014a1fcdaad9be711a313a963a976", + "e8b130d5f22b71ab79ed97087b3b643c5e8af2f3", [ "webnn/slice.https.any.html", { @@ -680789,7 +682284,7 @@ ] ], "softmax.https.any.js": [ - "91afc2838516f9c9d180443849dc46b191003911", + "8e5342bd75a0d85c671ecf9f7a5fbeadf805822f", [ "webnn/softmax.https.any.html", { @@ -680840,7 +682335,7 @@ ] ], "split.https.any.js": [ - "54314d7b7f98b1c3e2388b9d08ac2f7ab85d8f45", + "bb1c99565879ccb922bb3f492803138767f6deff", [ "webnn/split.https.any.html", { @@ -680891,7 +682386,7 @@ ] ], "squeeze.https.any.js": [ - "5e042f34bdeed366eda3e0114acacaab8c6f9f92", + "8b9310d65d4abed071bc081e9efc5f758740fc10", [ "webnn/squeeze.https.any.html", { @@ -680942,7 +682437,7 @@ ] ], "tanh.https.any.js": [ - "603f0930cf049cb2674bb85ab2d0c33e8052ef80", + "d0d45e754b271d9bed389f3e2958ad1c15e3bf78", [ "webnn/tanh.https.any.html", { @@ -680993,7 +682488,7 @@ ] ], "transpose.https.any.js": [ - "d1303f52acb2d793ae4651a7fe8f3b7e56f68907", + "63a123342aa3501ababcf14a0c811e7dc040ba4e", [ "webnn/transpose.https.any.html", { @@ -681129,7 +682624,7 @@ ] ], "RTCDataChannel-bufferedAmount.html": [ - "f663941162d93e511b1a5d6be01ed79fe28c9bbf", + "b1b793206cb2f3af72ad32d10857511e7f65b5d5", [ null, { @@ -682412,6 +683907,15 @@ } ] ], + "codec-specific-metadata.https.html": [ + "bef61b39f3090fc88472abf60d7604a19fc96ffa", + [ + null, + { + "testdriver": true + } + ] + ], "idlharness.https.window.js": [ "2c6ef19ca82a56c799b97b5eb9af3edb900a40b5", [ @@ -682488,6 +683992,15 @@ } ] ], + "set-metadata.https.html": [ + "3840bfc7a28d5dda404d48e5cdfef812350e8092", + [ + null, + { + "testdriver": true + } + ] + ], "sframe-keys.https.html": [ "c87ac12e2965af471eb30a5b60f35f43d3924d43", [ @@ -706488,6 +708001,20 @@ {} ] ], + "border-style-009.xht": [ + "faa412a00593c5d0641cf0023aa1542ee631623f", + [ + null, + {} + ] + ], + "border-style-010.xht": [ + "d172298f6f919704789d460d9deacb53114b47b9", + [ + null, + {} + ] + ], "border-style-applies-to-001.xht": [ "f46f5c6e64e314e0bfea17801a5c4c7163b0261b", [ @@ -726612,7 +728139,7 @@ }, "dom_content_loaded": { "dom_content_loaded.py": [ - "010e81190de65f63b3c2c33c2187ad2ea0a46e13", + "fe28005ae08e007e1aff523dacdc69a735229502", [ null, {} @@ -726651,7 +728178,7 @@ }, "load": { "load.py": [ - "c0d4b1442bc92f116e24f65edd10ca372ac08b71", + "d9a2da0990279688b2ad8edb0150ff8cc16f5f3f", [ null, {} @@ -726791,7 +728318,16 @@ }, "combined": { "network_events_tentative.py": [ - "a1d5b3bf8372e6ad7f7811654bc2167c24f24757", + "2defc6c2056e68e05aead532ca2449bfd056489a", + [ + null, + {} + ] + ] + }, + "response_completed": { + "response_completed_tentative.py": [ + "347f970c61d1283f249b46808aa6f32eed7585a9", [ null, {} @@ -726800,7 +728336,7 @@ }, "response_started": { "response_started_tentative.py": [ - "944d50fe88f9a9738a0137bc39901bdc25c7b320", + "18c78c6922a3e0b34de7be18e4fb7a5e8c70d82a", [ null, {} @@ -726811,7 +728347,7 @@ "script": { "call_function": { "arguments.py": [ - "06db051766c2383df5294eece9a38afd79de9c68", + "9fbe5fb81101054f9cafe1411a6c9a5937473324", [ null, {} @@ -726874,7 +728410,7 @@ ] ], "result_node.py": [ - "3e43428475028db958b22353090da14bd6d0d98c", + "c7ec990ba5c15c9f48975091ff5189c843d5d50e", [ null, {} @@ -726990,7 +728526,7 @@ ] ], "result_node.py": [ - "a5a3f2fc063b285d90b66bfa07f99c9c1979dcb8", + "d3eccc2fdad42e823ed8eb13edd2a97527fc45a9", [ null, {} diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini deleted file mode 100644 index 968f62a2553..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-002.html] - [Hit test float] - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 13bd6abf376..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini deleted file mode 100644 index 147f062e548..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini index a057f038339..5e3a96e5999 100644 --- a/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -8,8 +8,5 @@ [[data-expected-height\] 3] expected: FAIL - [[data-expected-height\] 1] - expected: FAIL - - [[data-expected-height\] 2] + [[data-expected-height\] 4] expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini b/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini index 51432362d66..ee34bc91078 100644 --- a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini +++ b/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini @@ -1,3 +1,6 @@ [block-in-inline-hittest-002.html] [elementsFromPoint] expected: FAIL + + [elementFromPoint] + expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-float-002.html.ini b/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-float-002.html.ini deleted file mode 100644 index 3e5096beef3..00000000000 --- a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-float-002.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[block-in-inline-hittest-float-002.html] - [block-in-inline-hittest-float-002] - expected: FAIL diff --git a/tests/wpt/metadata/css/compositing/root-element-opacity-change.html.ini b/tests/wpt/metadata/css/compositing/root-element-opacity-change.html.ini deleted file mode 100644 index c51daae123f..00000000000 --- a/tests/wpt/metadata/css/compositing/root-element-opacity-change.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[root-element-opacity-change.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html.ini new file mode 100644 index 00000000000..bf85ba1c3f5 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html.ini @@ -0,0 +1,2 @@ +[slice-block-fragmentation-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html.ini new file mode 100644 index 00000000000..a9df2738f62 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html.ini @@ -0,0 +1,2 @@ +[slice-block-fragmentation-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html.ini new file mode 100644 index 00000000000..512dc43cc5c --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html.ini @@ -0,0 +1,2 @@ +[slice-block-fragmentation-003.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html.ini new file mode 100644 index 00000000000..1ec7e495e55 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html.ini @@ -0,0 +1,2 @@ +[slice-inline-fragmentation-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html.ini new file mode 100644 index 00000000000..276ab6fe929 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html.ini @@ -0,0 +1,2 @@ +[slice-inline-fragmentation-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html.ini new file mode 100644 index 00000000000..070c1ba39f7 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html.ini @@ -0,0 +1,2 @@ +[slice-inline-fragmentation-003.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini b/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini deleted file mode 100644 index eb3cf41a070..00000000000 --- a/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[opacity-animation-ending-correctly-002.html] - expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-flexbox/abspos/position-absolute-013.html.ini b/tests/wpt/metadata/css/css-flexbox/abspos/position-absolute-013.html.ini index 80111fb0236..2b2e0fce8eb 100644 --- a/tests/wpt/metadata/css/css-flexbox/abspos/position-absolute-013.html.ini +++ b/tests/wpt/metadata/css/css-flexbox/abspos/position-absolute-013.html.ini @@ -1,4 +1,5 @@ [position-absolute-013.html] + expected: TIMEOUT [.flexbox 309] expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/hittest-before-pseudo.html.ini b/tests/wpt/metadata/css/css-flexbox/hittest-before-pseudo.html.ini new file mode 100644 index 00000000000..5b685485f3c --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/hittest-before-pseudo.html.ini @@ -0,0 +1,3 @@ +[hittest-before-pseudo.html] + [Hit-testing text within a pseudo-element flex-item should return the flexbox as the hittest result.] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/font-palette-empty-font-family.html.ini b/tests/wpt/metadata/css/css-fonts/font-palette-empty-font-family.html.ini deleted file mode 100644 index c45a76376c6..00000000000 --- a/tests/wpt/metadata/css/css-fonts/font-palette-empty-font-family.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[font-palette-empty-font-family.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini index 26894237445..c8f6e89d8d7 100644 --- a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -20,9 +20,6 @@ [Matching font-weight: '500' should prefer '501 550' over '502 560'] expected: FAIL - [Matching font-style: 'italic' should prefer 'oblique 40deg 50deg' over 'oblique 5deg 10deg'] - expected: FAIL - [Matching font-style: 'oblique 0deg' should prefer 'oblique -50deg -20deg' over 'oblique -40deg -30deg'] expected: FAIL @@ -38,9 +35,6 @@ [Matching font-style: 'oblique -20deg' should prefer 'oblique 0deg' over 'oblique 30deg 60deg'] expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] - expected: FAIL - [Descriptor mathcing priority: Style has higher priority than weight] expected: FAIL @@ -65,9 +59,6 @@ [Descriptor matching priority: Style has higher priority than weight] expected: FAIL - [Matching font-style: 'oblique -10deg' should prefer 'oblique -5deg' over 'oblique -1deg 0deg'] - expected: FAIL - [Matching font-weight: '501' should prefer '390 410' over '300 350'] expected: FAIL @@ -110,9 +101,6 @@ [Matching font-weight: '399' should prefer '450 460' over '500 501'] expected: FAIL - [Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%'] - expected: FAIL - [Matching font-weight: '500' should prefer '400' over '350 399'] expected: FAIL @@ -161,9 +149,6 @@ [Matching font-style: 'normal' should prefer 'normal' over 'oblique 0deg'] expected: FAIL - [Matching font-style: 'oblique 10deg' should prefer 'oblique 15deg 20deg' over 'oblique 30deg 60deg'] - expected: FAIL - [Matching font-style: 'oblique 0deg' should prefer 'oblique 0deg' over 'oblique 5deg'] expected: FAIL @@ -194,18 +179,12 @@ [Matching font-style: 'oblique -10deg' should prefer 'italic' over 'oblique 0deg 10deg'] expected: FAIL - [Matching font-stretch: '110%' should prefer '105%' over '100%'] - expected: FAIL - [Matching font-weight: '400' should prefer '400' over '450 460'] expected: FAIL [Matching font-style: 'italic' should prefer 'normal' over 'oblique 0deg'] expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'] - expected: FAIL - [Matching font-style: 'oblique -20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] expected: FAIL @@ -257,9 +236,6 @@ [Matching font-stretch: '110%' should prefer '50% 80%' over '60% 70%'] expected: FAIL - [Matching font-style: 'oblique 10deg' should prefer 'oblique 10deg' over 'oblique 5deg'] - expected: FAIL - [Matching font-style: 'oblique -21deg' should prefer 'italic' over 'oblique 0deg'] expected: FAIL @@ -320,8 +296,14 @@ [Matching font-weight: '399' should prefer '350 399' over '340 360'] expected: FAIL - [Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'] - expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'italic' over 'oblique 0deg'] expected: FAIL + + [Matching font-style: 'oblique 21deg' should prefer 'italic' over 'oblique 0deg'] + expected: FAIL + + [Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'italic'] + expected: FAIL + + [Matching font-style: 'oblique -20deg' should prefer 'oblique -60deg -40deg' over 'oblique -10deg'] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-content-rendering.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-content-rendering.html.ini new file mode 100644 index 00000000000..f223f933dfa --- /dev/null +++ b/tests/wpt/metadata/css/css-images/image-set/image-set-content-rendering.html.ini @@ -0,0 +1,2 @@ +[image-set-content-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/animation/rotate-animation-on-svg.html.ini b/tests/wpt/metadata/css/css-transforms/animation/rotate-animation-on-svg.html.ini new file mode 100644 index 00000000000..23f24914ffe --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/animation/rotate-animation-on-svg.html.ini @@ -0,0 +1,2 @@ +[rotate-animation-on-svg.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-transforms/animation/scale-animation-on-svg.html.ini b/tests/wpt/metadata/css/css-transforms/animation/scale-animation-on-svg.html.ini new file mode 100644 index 00000000000..854ac040709 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/animation/scale-animation-on-svg.html.ini @@ -0,0 +1,2 @@ +[scale-animation-on-svg.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-transforms/animation/translate-animation-on-svg.html.ini b/tests/wpt/metadata/css/css-transforms/animation/translate-animation-on-svg.html.ini new file mode 100644 index 00000000000..8fc4e3309b4 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/animation/translate-animation-on-svg.html.ini @@ -0,0 +1,2 @@ +[translate-animation-on-svg.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-transforms/transform-root-bg-002.html.ini b/tests/wpt/metadata/css/css-transforms/transform-root-bg-002.html.ini new file mode 100644 index 00000000000..440732f996d --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/transform-root-bg-002.html.ini @@ -0,0 +1,2 @@ +[transform-root-bg-002.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-transitions/properties-value-001.html.ini b/tests/wpt/metadata/css/css-transitions/properties-value-001.html.ini index 7727764a576..daa399d64cd 100644 --- a/tests/wpt/metadata/css/css-transitions/properties-value-001.html.ini +++ b/tests/wpt/metadata/css/css-transitions/properties-value-001.html.ini @@ -53,156 +53,6 @@ [background-position length(px) / events] expected: FAIL - [color color(rgba) / values] - expected: FAIL - - [font-size length(pt) / values] - expected: FAIL - - [font-size length(pc) / values] - expected: FAIL - - [font-size length(px) / values] - expected: FAIL - - [font-size length(em) / values] - expected: FAIL - - [font-size length(ex) / values] - expected: FAIL - - [font-size length(mm) / values] - expected: FAIL - - [font-size length(cm) / values] - expected: FAIL - - [font-size length(in) / values] - expected: FAIL - - [font-size percentage(%) / values] - expected: FAIL - - [font-weight font-weight(keyword) / values] - expected: FAIL - - [font-weight font-weight(numeric) / values] - expected: FAIL - - [line-height number(integer) / values] - expected: FAIL - - [line-height number(decimal) / values] - expected: FAIL - - [line-height length(pt) / values] - expected: FAIL - - [line-height length(pc) / values] - expected: FAIL - - [line-height length(px) / values] - expected: FAIL - - [line-height length(em) / values] - expected: FAIL - - [line-height length(ex) / values] - expected: FAIL - - [line-height length(mm) / values] - expected: FAIL - - [line-height length(cm) / values] - expected: FAIL - - [line-height length(in) / values] - expected: FAIL - - [line-height percentage(%) / values] - expected: FAIL - - [letter-spacing length(pt) / values] - expected: FAIL - - [letter-spacing length(pc) / values] - expected: FAIL - - [letter-spacing length(px) / values] - expected: FAIL - - [letter-spacing length(em) / values] - expected: FAIL - - [letter-spacing length(ex) / values] - expected: FAIL - - [letter-spacing length(mm) / values] - expected: FAIL - - [letter-spacing length(cm) / values] - expected: FAIL - - [letter-spacing length(in) / values] - expected: FAIL - - [word-spacing length(pt) / values] - expected: FAIL - - [word-spacing length(pc) / values] - expected: FAIL - - [word-spacing length(px) / values] - expected: FAIL - - [word-spacing length(em) / values] - expected: FAIL - - [word-spacing length(ex) / values] - expected: FAIL - - [word-spacing length(mm) / values] - expected: FAIL - - [word-spacing length(cm) / values] - expected: FAIL - - [word-spacing length(in) / values] - expected: FAIL - - [word-spacing percentage(%) / values] - expected: FAIL - - [text-indent length(pt) / values] - expected: FAIL - - [text-indent length(pc) / values] - expected: FAIL - - [text-indent length(px) / values] - expected: FAIL - - [text-indent length(em) / values] - expected: FAIL - - [text-indent length(ex) / values] - expected: FAIL - - [text-indent length(mm) / values] - expected: FAIL - - [text-indent length(cm) / values] - expected: FAIL - - [text-indent length(in) / values] - expected: FAIL - - [text-indent percentage(%) / values] - expected: FAIL - - [text-shadow shadow(shadow) / values] - expected: FAIL - [padding-bottom length(ex) / values] expected: FAIL @@ -352,3 +202,126 @@ [margin-right length(mm) / values] expected: FAIL + + [background-color color(rgba) / values] + expected: FAIL + + [border-top-width length(pt) / values] + expected: FAIL + + [border-top-width length(pc) / values] + expected: FAIL + + [border-top-width length(px) / values] + expected: FAIL + + [border-top-width length(em) / values] + expected: FAIL + + [border-top-width length(ex) / values] + expected: FAIL + + [border-top-width length(mm) / values] + expected: FAIL + + [border-top-width length(cm) / values] + expected: FAIL + + [border-top-width length(in) / values] + expected: FAIL + + [border-right-width length(pt) / values] + expected: FAIL + + [border-right-width length(pc) / values] + expected: FAIL + + [border-right-width length(px) / values] + expected: FAIL + + [border-right-width length(em) / values] + expected: FAIL + + [border-right-width length(ex) / values] + expected: FAIL + + [border-right-width length(mm) / values] + expected: FAIL + + [border-right-width length(cm) / values] + expected: FAIL + + [border-right-width length(in) / values] + expected: FAIL + + [border-bottom-width length(pt) / values] + expected: FAIL + + [border-bottom-width length(pc) / values] + expected: FAIL + + [border-bottom-width length(px) / values] + expected: FAIL + + [border-bottom-width length(em) / values] + expected: FAIL + + [border-bottom-width length(ex) / values] + expected: FAIL + + [border-bottom-width length(mm) / values] + expected: FAIL + + [border-bottom-width length(cm) / values] + expected: FAIL + + [border-bottom-width length(in) / values] + expected: FAIL + + [border-left-width length(pt) / values] + expected: FAIL + + [border-left-width length(pc) / values] + expected: FAIL + + [border-left-width length(px) / values] + expected: FAIL + + [border-left-width length(em) / values] + expected: FAIL + + [border-left-width length(ex) / values] + expected: FAIL + + [border-left-width length(mm) / values] + expected: FAIL + + [border-left-width length(cm) / values] + expected: FAIL + + [border-left-width length(in) / values] + expected: FAIL + + [border-top-color color(rgba) / values] + expected: FAIL + + [border-right-color color(rgba) / values] + expected: FAIL + + [border-bottom-color color(rgba) / values] + expected: FAIL + + [border-left-color color(rgba) / values] + expected: FAIL + + [padding-bottom length(pt) / values] + expected: FAIL + + [padding-bottom length(pc) / values] + expected: FAIL + + [padding-bottom length(px) / values] + expected: FAIL + + [padding-bottom length(em) / values] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-001.html.ini b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-001.html.ini index 5dc6354ad55..b0fdc6ab5f2 100644 --- a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-001.html.ini +++ b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-001.html.ini @@ -628,3 +628,153 @@ [text-shadow shadow(shadow) / events] expected: FAIL + + [max-height length(ex) / events] + expected: FAIL + + [max-height length(mm) / events] + expected: FAIL + + [max-height length(cm) / events] + expected: FAIL + + [max-height length(in) / events] + expected: FAIL + + [max-height percentage(%) / events] + expected: FAIL + + [max-width length(pt) / events] + expected: FAIL + + [max-width length(pc) / events] + expected: FAIL + + [max-width length(px) / events] + expected: FAIL + + [max-width length(em) / events] + expected: FAIL + + [max-width length(ex) / events] + expected: FAIL + + [max-width length(mm) / events] + expected: FAIL + + [max-width length(cm) / events] + expected: FAIL + + [max-width length(in) / events] + expected: FAIL + + [max-width percentage(%) / events] + expected: FAIL + + [top length(pt) / events] + expected: FAIL + + [top length(pc) / events] + expected: FAIL + + [top length(px) / events] + expected: FAIL + + [top length(em) / events] + expected: FAIL + + [top length(ex) / events] + expected: FAIL + + [top length(mm) / events] + expected: FAIL + + [top length(cm) / events] + expected: FAIL + + [top length(in) / events] + expected: FAIL + + [top percentage(%) / events] + expected: FAIL + + [right length(pt) / events] + expected: FAIL + + [right length(pc) / events] + expected: FAIL + + [right length(px) / events] + expected: FAIL + + [right length(em) / events] + expected: FAIL + + [right length(ex) / events] + expected: FAIL + + [right length(mm) / events] + expected: FAIL + + [right length(cm) / events] + expected: FAIL + + [right length(in) / events] + expected: FAIL + + [right percentage(%) / events] + expected: FAIL + + [bottom length(pt) / events] + expected: FAIL + + [bottom length(pc) / events] + expected: FAIL + + [bottom length(px) / events] + expected: FAIL + + [bottom length(em) / events] + expected: FAIL + + [bottom length(ex) / events] + expected: FAIL + + [bottom length(mm) / events] + expected: FAIL + + [bottom length(cm) / events] + expected: FAIL + + [bottom length(in) / events] + expected: FAIL + + [bottom percentage(%) / events] + expected: FAIL + + [left length(pt) / events] + expected: FAIL + + [left length(pc) / events] + expected: FAIL + + [left length(px) / events] + expected: FAIL + + [left length(em) / events] + expected: FAIL + + [left length(ex) / events] + expected: FAIL + + [left length(mm) / events] + expected: FAIL + + [left length(cm) / events] + expected: FAIL + + [left length(in) / events] + expected: FAIL + + [left percentage(%) / events] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini index 793afafa0e8..d316d0d03ec 100644 --- a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini +++ b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini @@ -175,153 +175,3 @@ [padding-bottom length(em) / values] expected: FAIL - - [color color(rgba) / values] - expected: FAIL - - [font-size length(pt) / values] - expected: FAIL - - [font-size length(pc) / values] - expected: FAIL - - [font-size length(px) / values] - expected: FAIL - - [font-size length(em) / values] - expected: FAIL - - [font-size length(ex) / values] - expected: FAIL - - [font-size length(mm) / values] - expected: FAIL - - [font-size length(cm) / values] - expected: FAIL - - [font-size length(in) / values] - expected: FAIL - - [font-size percentage(%) / values] - expected: FAIL - - [font-weight font-weight(keyword) / values] - expected: FAIL - - [font-weight font-weight(numeric) / values] - expected: FAIL - - [line-height number(integer) / values] - expected: FAIL - - [line-height number(decimal) / values] - expected: FAIL - - [line-height length(pt) / values] - expected: FAIL - - [line-height length(pc) / values] - expected: FAIL - - [line-height length(px) / values] - expected: FAIL - - [line-height length(em) / values] - expected: FAIL - - [line-height length(ex) / values] - expected: FAIL - - [line-height length(mm) / values] - expected: FAIL - - [line-height length(cm) / values] - expected: FAIL - - [line-height length(in) / values] - expected: FAIL - - [line-height percentage(%) / values] - expected: FAIL - - [letter-spacing length(pt) / values] - expected: FAIL - - [letter-spacing length(pc) / values] - expected: FAIL - - [letter-spacing length(px) / values] - expected: FAIL - - [letter-spacing length(em) / values] - expected: FAIL - - [letter-spacing length(ex) / values] - expected: FAIL - - [letter-spacing length(mm) / values] - expected: FAIL - - [letter-spacing length(cm) / values] - expected: FAIL - - [letter-spacing length(in) / values] - expected: FAIL - - [word-spacing length(pt) / values] - expected: FAIL - - [word-spacing length(pc) / values] - expected: FAIL - - [word-spacing length(px) / values] - expected: FAIL - - [word-spacing length(em) / values] - expected: FAIL - - [word-spacing length(ex) / values] - expected: FAIL - - [word-spacing length(mm) / values] - expected: FAIL - - [word-spacing length(cm) / values] - expected: FAIL - - [word-spacing length(in) / values] - expected: FAIL - - [word-spacing percentage(%) / values] - expected: FAIL - - [text-indent length(pt) / values] - expected: FAIL - - [text-indent length(pc) / values] - expected: FAIL - - [text-indent length(px) / values] - expected: FAIL - - [text-indent length(em) / values] - expected: FAIL - - [text-indent length(ex) / values] - expected: FAIL - - [text-indent length(mm) / values] - expected: FAIL - - [text-indent length(cm) / values] - expected: FAIL - - [text-indent length(in) / values] - expected: FAIL - - [text-indent percentage(%) / values] - expected: FAIL - - [text-shadow shadow(shadow) / values] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/urls/resolve-relative-to-base.sub.html.ini b/tests/wpt/metadata/css/css-values/urls/resolve-relative-to-base.sub.html.ini new file mode 100644 index 00000000000..10eaf8e04e0 --- /dev/null +++ b/tests/wpt/metadata/css/css-values/urls/resolve-relative-to-base.sub.html.ini @@ -0,0 +1,6 @@ +[resolve-relative-to-base.sub.html] + [base-relative URL: relative-image-url] + expected: FAIL + + [base-relative URL: relative-image-variable-url] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-variables/variable-definition.html.ini b/tests/wpt/metadata/css/css-variables/variable-definition.html.ini index f93f48bb132..f27f6aacc38 100644 --- a/tests/wpt/metadata/css/css-variables/variable-definition.html.ini +++ b/tests/wpt/metadata/css/css-variables/variable-definition.html.ini @@ -76,3 +76,48 @@ [can overwrite with no value (Cascading)] expected: FAIL + + [ trailing white space (single space)] + expected: FAIL + + [ middle white space (double space) 2] + expected: FAIL + + [ trailing white space (double space) 2] + expected: FAIL + + [!important] + expected: FAIL + + [!important (with space)] + expected: FAIL + + [ trailing white space (single space) (Computed Style)] + expected: FAIL + + [ middle white space (double space) 2 (Computed Style)] + expected: FAIL + + [ trailing white space (double space) 2 (Computed Style)] + expected: FAIL + + [!important (Computed Style)] + expected: FAIL + + [!important (with space) (Computed Style)] + expected: FAIL + + [ trailing white space (single space) (Cascading)] + expected: FAIL + + [ middle white space (double space) 2 (Cascading)] + expected: FAIL + + [ trailing white space (double space) 2 (Cascading)] + expected: FAIL + + [!important (Cascading)] + expected: FAIL + + [!important (with space) (Cascading)] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index f18b8d2fcf9..00000000000 --- a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini deleted file mode 100644 index 72b09371038..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[elementFromPoint-001.html] - [CSSOM View - 5 - extensions to the Document interface] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini new file mode 100644 index 00000000000..cf67b5d03dd --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-dynamic-anon-box.html] + [Link should be clickable after hiding a scrollbox with an anonymous table inside] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-ellipsis-in-inline-box.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-ellipsis-in-inline-box.html.ini deleted file mode 100644 index b905fe70fcb..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-ellipsis-in-inline-box.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[elementFromPoint-ellipsis-in-inline-box.html] - [elementFromPoint-ellipsis-in-inline-box] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini new file mode 100644 index 00000000000..7e9331b6bc2 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-float-in-relative.html] + [elementFromPoint-float-in-relative] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-table.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-table.html.ini new file mode 100644 index 00000000000..db065588308 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-table.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-float-in-table.html] + [float-in-div] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini deleted file mode 100644 index a6bca7ac372..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[elementFromPoint-visibility-hidden-resizer.html] - [elementFromPoint on resizer area of an element with visibility:hidden] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini index 898f39c4330..ceb43099040 100644 --- a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini @@ -17,6 +17,3 @@ [test some point of the element: bottom right corner] expected: FAIL - - [test the top of layer] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini new file mode 100644 index 00000000000..3e7b0a9bc9c --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini @@ -0,0 +1,3 @@ +[elementsFromPoint-iframes.html] + [elementsFromPoint on inner documents] + expected: FAIL diff --git a/tests/wpt/metadata/css/filter-effects/filter-region-calc-001.html.ini b/tests/wpt/metadata/css/filter-effects/filter-region-calc-001.html.ini new file mode 100644 index 00000000000..6a2a3e8d441 --- /dev/null +++ b/tests/wpt/metadata/css/filter-effects/filter-region-calc-001.html.ini @@ -0,0 +1,2 @@ +[filter-region-calc-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/filter-effects/filter-region-units-001.html.ini b/tests/wpt/metadata/css/filter-effects/filter-region-units-001.html.ini new file mode 100644 index 00000000000..8b011bfb8f2 --- /dev/null +++ b/tests/wpt/metadata/css/filter-effects/filter-region-units-001.html.ini @@ -0,0 +1,2 @@ +[filter-region-units-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/mediaqueries/test_media_queries.html.ini b/tests/wpt/metadata/css/mediaqueries/test_media_queries.html.ini index b72d85bbd71..786d117e2ec 100644 --- a/tests/wpt/metadata/css/mediaqueries/test_media_queries.html.ini +++ b/tests/wpt/metadata/css/mediaqueries/test_media_queries.html.ini @@ -4351,3 +4351,48 @@ ['not' keyword: should_not_apply: not ((width) and (not (height)))] expected: FAIL + + ['not' keyword: query_should_be_parseable: not unknown(width) ] + expected: FAIL + + [three-valued logic: should_not_apply: (unknown)] + expected: FAIL + + [three-valued logic: should_not_apply: not (unknown)] + expected: FAIL + + [three-valued logic: should_not_apply: ((unknown) and (width))] + expected: FAIL + + [three-valued logic: should_not_apply: not ((unknown) and (width))] + expected: FAIL + + [three-valued logic: should_not_apply: ((unknown) and (height))] + expected: FAIL + + [three-valued logic: should_not_apply: not ((unknown) or (width))] + expected: FAIL + + [three-valued logic: should_not_apply: ((unknown) or (height))] + expected: FAIL + + [three-valued logic: should_not_apply: not ((unknown) or (height))] + expected: FAIL + + [three-valued logic: should_not_apply: (width) and (not ((unknown) and (width)))] + expected: FAIL + + [three-valued logic: should_not_apply: (width) and (not ((unknown) or (width)))] + expected: FAIL + + [three-valued logic: should_not_apply: (width) and (not ((unknown) or (height)))] + expected: FAIL + + [three-valued logic: should_not_apply: unknown(width)] + expected: FAIL + + [three-valued logic: should_not_apply: not unknown(width)] + expected: FAIL + + [three-valued logic: should_not_apply: not (unknown(width) or (height))] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/dir-pseudo-in-has.html.ini b/tests/wpt/metadata/css/selectors/dir-pseudo-in-has.html.ini new file mode 100644 index 00000000000..673333a633e --- /dev/null +++ b/tests/wpt/metadata/css/selectors/dir-pseudo-in-has.html.ini @@ -0,0 +1,2 @@ +[dir-pseudo-in-has.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/dir-pseudo-on-bdi-element.html.ini b/tests/wpt/metadata/css/selectors/dir-pseudo-on-bdi-element.html.ini new file mode 100644 index 00000000000..3bb4ed89dbd --- /dev/null +++ b/tests/wpt/metadata/css/selectors/dir-pseudo-on-bdi-element.html.ini @@ -0,0 +1,15 @@ +[dir-pseudo-on-bdi-element.html] + [bdi element without dir content attribute] + expected: FAIL + + [bdi element with invalid dir content attribute] + expected: FAIL + + [bdi element with dir=auto content attribute] + expected: FAIL + + [bdi element with dir=ltr content attribute] + expected: FAIL + + [bdi element with dir=rtl content attribute] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/dir-pseudo-on-input-element.html.ini b/tests/wpt/metadata/css/selectors/dir-pseudo-on-input-element.html.ini new file mode 100644 index 00000000000..d00922ca86d --- /dev/null +++ b/tests/wpt/metadata/css/selectors/dir-pseudo-on-input-element.html.ini @@ -0,0 +1,54 @@ +[dir-pseudo-on-input-element.html] + [input element whose type attribute is in the telephone state] + expected: FAIL + + [input element whose type attribute is in the telephone state in a RTL block] + expected: FAIL + + [input element whose type attribute is in the text state] + expected: FAIL + + [input element whose type attribute is in the search state] + expected: FAIL + + [input element whose type attribute is in the url state] + expected: FAIL + + [input element whose type attribute is in the email state] + expected: FAIL + + [input element whose type attribute is in the password state] + expected: FAIL + + [input element whose type attribute is in the date state] + expected: FAIL + + [input element whose type attribute is in the time state] + expected: FAIL + + [input element whose type attribute is in the number state] + expected: FAIL + + [input element whose type attribute is in the range state] + expected: FAIL + + [input element whose type attribute is in the color state] + expected: FAIL + + [input element whose type attribute is in the checkbox state] + expected: FAIL + + [input element whose type attribute is in the radio state] + expected: FAIL + + [input element whose type attribute is in the submit state] + expected: FAIL + + [input element whose type attribute is in the image state] + expected: FAIL + + [input element whose type attribute is in the reset state] + expected: FAIL + + [input element whose type attribute is in the button state] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html.ini b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html.ini new file mode 100644 index 00000000000..f2f324e2968 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html.ini @@ -0,0 +1,2 @@ +[lang-pseudo-class-across-shadow-boundaries.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-disconnected.html.ini b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-disconnected.html.ini new file mode 100644 index 00000000000..b6f3dbe7731 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-disconnected.html.ini @@ -0,0 +1,3 @@ +[lang-pseudo-class-disconnected.html] + [:lang pseudo class should work in a disconnected subtree] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml.ini b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml.ini new file mode 100644 index 00000000000..528e031ad66 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml.ini @@ -0,0 +1,3 @@ +[lang-pseudo-class-empty-attribute.xhtml] + [Test if empty language attributes are supported] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/dir-pseudo-class-in-has.html.ini b/tests/wpt/metadata/css/selectors/invalidation/dir-pseudo-class-in-has.html.ini new file mode 100644 index 00000000000..3e4772dfde2 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/dir-pseudo-class-in-has.html.ini @@ -0,0 +1,2 @@ +[dir-pseudo-class-in-has.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html.ini b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html.ini new file mode 100644 index 00000000000..5d842c57896 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html.ini @@ -0,0 +1,2 @@ +[lang-pseudo-class-in-has-document-element.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html.ini b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html.ini new file mode 100644 index 00000000000..b985d446366 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html.ini @@ -0,0 +1,2 @@ +[lang-pseudo-class-in-has-multiple-document-elements.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml.ini b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml.ini new file mode 100644 index 00000000000..ea5033743db --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml.ini @@ -0,0 +1,2 @@ +[lang-pseudo-class-in-has-xhtml.xhtml] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has.html.ini b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has.html.ini new file mode 100644 index 00000000000..53bda84c4d0 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/lang-pseudo-class-in-has.html.ini @@ -0,0 +1,2 @@ +[lang-pseudo-class-in-has.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html.ini b/tests/wpt/metadata/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html.ini new file mode 100644 index 00000000000..6687d7a0f14 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html.ini @@ -0,0 +1,6 @@ +[media-loading-pseudo-classes-in-has.html] + [Test :has(:stalled) invalidation] + expected: FAIL + + [Test :has(:buffering) invalidation] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/nth-child-containing-ancestor.html.ini b/tests/wpt/metadata/css/selectors/invalidation/nth-child-containing-ancestor.html.ini new file mode 100644 index 00000000000..b10619740e3 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/nth-child-containing-ancestor.html.ini @@ -0,0 +1,2 @@ +[nth-child-containing-ancestor.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/nth-child-in-shadow-root.html.ini b/tests/wpt/metadata/css/selectors/invalidation/nth-child-in-shadow-root.html.ini new file mode 100644 index 00000000000..b9eada79e2a --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/nth-child-in-shadow-root.html.ini @@ -0,0 +1,2 @@ +[nth-child-in-shadow-root.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/nth-child-of-nesting.html.ini b/tests/wpt/metadata/css/selectors/nth-child-of-nesting.html.ini new file mode 100644 index 00000000000..f4e1d62b7ca --- /dev/null +++ b/tests/wpt/metadata/css/selectors/nth-child-of-nesting.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-nesting.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/nth-last-child-of-nesting.html.ini b/tests/wpt/metadata/css/selectors/nth-last-child-of-nesting.html.ini new file mode 100644 index 00000000000..655318ca578 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/nth-last-child-of-nesting.html.ini @@ -0,0 +1,2 @@ +[nth-last-child-of-nesting.html] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/AriaMixin-element-attributes.html.ini b/tests/wpt/metadata/custom-elements/reactions/AriaMixin-element-attributes.html.ini index 71839093669..90f0490bcc2 100644 --- a/tests/wpt/metadata/custom-elements/reactions/AriaMixin-element-attributes.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/AriaMixin-element-attributes.html.ini @@ -46,3 +46,9 @@ [ariaOwnsElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL + + [ariaErrorMessageElements in Element must enqueue an attributeChanged reaction when adding aria-errormessage content attribute] + expected: FAIL + + [ariaErrorMessageElements in Element must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-length/parsing.window.js.ini b/tests/wpt/metadata/fetch/content-length/parsing.window.js.ini index ac656410273..dbe03dd880c 100644 --- a/tests/wpt/metadata/fetch/content-length/parsing.window.js.ini +++ b/tests/wpt/metadata/fetch/content-length/parsing.window.js.ini @@ -77,8 +77,8 @@ [Input: "Content-Length: ". Expected: 42.] expected: FAIL - [Input: "Content-Length: 42\\r\\nContent-Length: 42". Expected: 42.] + [Input: "Content-Length: 42,42". Expected: 42.] expected: FAIL - [Input: "Content-Length: 30". Expected: 30.] + [Input: "Content-Length: 42\\r\\nContent-Length: 42,42". Expected: 42.] expected: FAIL diff --git a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini index f9de5391ad6..36a410bfecb 100644 --- a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -146,3 +146,6 @@ [list-style-image sec-fetch-site - HTTPS downgrade-upgrade] expected: FAIL + + [border-image sec-fetch-site - HTTPS downgrade (header not sent)] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index 736ff6130a5..ba47e36f3af 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -7,3 +7,6 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL + + [X-Content-Type-Options%3A%20%2Cnosniff] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini index c8a3c8f9e68..6e9f7acf151 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini @@ -1,6 +1,6 @@ [scroll-restoration-fragment-scrolling-cross-origin.html] type: testharness - expected: ERROR + expected: TIMEOUT [Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation] expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-204.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-204.html.ini index 6582f1e053b..c51f1290ef5 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-204.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/window-open-204.html.ini @@ -1,7 +1,7 @@ [window-open-204.html] expected: TIMEOUT [location.href] - expected: FAIL + expected: TIMEOUT [location.assign] - expected: TIMEOUT + expected: NOTRUN diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini index 5a245d61359..bcda478adb1 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini @@ -1,6 +1,10 @@ [javascript-url-referrer.window.html] + expected: TIMEOUT [unsafe-url referrer policy used to create the starting page] expected: FAIL [origin referrer policy used to create the starting page] expected: FAIL + + [no-referrer referrer policy used to create the starting page] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini deleted file mode 100644 index 4ecd6d9f753..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigation-unload-cross-origin.sub.window.html] - [Cross-origin navigation started from unload handler must be ignored] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini new file mode 100644 index 00000000000..7dc346632a4 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini @@ -0,0 +1,3 @@ +[navigation-unload-same-origin.window.html] + [Same-origin navigation started from unload handler must be ignored] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini deleted file mode 100644 index d6188c03424..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[traverse_the_history_4.html] - [Multiple history traversals, last would be aborted] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini deleted file mode 100644 index 7a5fcb79165..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[traverse_the_history_5.html] - [Multiple history traversals, last would be aborted] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini index 3a5c1fd357c..b01684d4e92 100644 --- a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini @@ -1,5 +1,5 @@ [embedded-opener-remove-frame.html] - expected: TIMEOUT + expected: CRASH [opener and "removed" embedded documents] expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html.ini b/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html.ini index e4c0fb798a3..886e606f855 100644 --- a/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html.ini +++ b/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html.ini @@ -11,3 +11,9 @@ [createImageBitmap with EXIF rotation, imageOrientation flipY, and cropping] expected: TIMEOUT + + [createImageBitmap with EXIF rotation, imageOrientation from-image, and no cropping] + expected: TIMEOUT + + [createImageBitmap with EXIF rotation, imageOrientation from-image, and cropping] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html.ini b/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html.ini index 0cf916bbf7d..a4620cd6816 100644 --- a/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html.ini +++ b/tests/wpt/metadata/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html.ini @@ -66,3 +66,35 @@ [createImageBitmap from a bitmap SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap] expected: TIMEOUT + [createImageBitmap from an HTMLCanvasElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap HTMLImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector HTMLImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap SVGImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: TIMEOUT + + [createImageBitmap from a vector SVGImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: NOTRUN + + [createImageBitmap from an OffscreenCanvas imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: NOTRUN + + [createImageBitmap from an ImageData imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: NOTRUN + + [createImageBitmap from an ImageBitmap imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: NOTRUN + + [createImageBitmap from a Blob imageOrientation: "from-image", and drawImage on the created ImageBitmap] + expected: NOTRUN diff --git a/tests/wpt/metadata/html/dom/aria-element-reflection.html.ini b/tests/wpt/metadata/html/dom/aria-element-reflection.html.ini index a585534c4b1..068b277bbff 100644 --- a/tests/wpt/metadata/html/dom/aria-element-reflection.html.ini +++ b/tests/wpt/metadata/html/dom/aria-element-reflection.html.ini @@ -70,3 +70,6 @@ [Caching invariant different elements.] expected: FAIL + + [ariaErrorMessageElement is not defined] + expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 8a926207630..d169bd2e9fa 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,5 +1,4 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL @@ -7,10 +6,10 @@ expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: TIMEOUT + expected: FAIL [Area element should support autofocus] - expected: NOTRUN + expected: FAIL [Host element with delegatesFocus should support autofocus] expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini index add66c12f92..9b27c5c1957 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini @@ -1,6 +1,7 @@ [update-the-rendering.html] + expected: TIMEOUT ["Flush autofocus candidates" should be happen after the first animation frame callbacks, and before a resize event in the next iteration of window event loop.] expected: TIMEOUT ["Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini index 2d3fbf0f308..25d9964f057 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini @@ -1,5 +1,4 @@ [iframe_sandbox_popups_escaping-1.html] type: testharness - expected: TIMEOUT [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index ff6467094b8..d5fd800f09d 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-3.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini index 31928ad3947..31745fdcdcf 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini @@ -1,5 +1,4 @@ [sandbox-top-navigation-child-special-cases.tentative.sub.window.html] - expected: TIMEOUT [Allow top with user activation + user activation] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini index 6d9838acfc4..579350c53fe 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini @@ -110,9 +110,6 @@ [application/x-www-form-urlencoded: double quote in filename (formdata event)] expected: FAIL - [application/x-www-form-urlencoded: single quote in name (normal form)] - expected: FAIL - [application/x-www-form-urlencoded: single quote in name (formdata event)] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/hide-other-popover-side-effects.html.ini b/tests/wpt/metadata/html/semantics/popovers/hide-other-popover-side-effects.html.ini new file mode 100644 index 00000000000..de110b37118 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/popovers/hide-other-popover-side-effects.html.ini @@ -0,0 +1,3 @@ +[hide-other-popover-side-effects.html] + [Removing a popover while it is opening and force closing another popover should throw an exception.] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/idlharness.tentative.html.ini b/tests/wpt/metadata/html/semantics/popovers/idlharness.tentative.html.ini index ff387f590c0..24fd1c2bdf0 100644 --- a/tests/wpt/metadata/html/semantics/popovers/idlharness.tentative.html.ini +++ b/tests/wpt/metadata/html/semantics/popovers/idlharness.tentative.html.ini @@ -277,3 +277,27 @@ [HTMLElement interface: document.getElementById("b3") must inherit property "popover" with the proper type] expected: FAIL + + [PopoverToggleEvent interface: existence and properties of interface object] + expected: FAIL + + [PopoverToggleEvent interface object length] + expected: FAIL + + [PopoverToggleEvent interface object name] + expected: FAIL + + [PopoverToggleEvent interface: existence and properties of interface prototype object] + expected: FAIL + + [PopoverToggleEvent interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [PopoverToggleEvent interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [PopoverToggleEvent interface: attribute currentState] + expected: FAIL + + [PopoverToggleEvent interface: attribute newState] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-events.tentative.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-events.tentative.html.ini index ee97734620b..4b460fa9032 100644 --- a/tests/wpt/metadata/html/semantics/popovers/popover-events.tentative.html.ini +++ b/tests/wpt/metadata/html/semantics/popovers/popover-events.tentative.html.ini @@ -28,3 +28,15 @@ [Beforetoggle event is not fired for element removal] expected: FAIL + + [The "beforetoggle" event (listener) get properly dispatched for popovers] + expected: FAIL + + [The "beforetoggle" event (attribute) get properly dispatched for popovers] + expected: FAIL + + [The "beforetoggle" event is cancelable for the "opening" transition] + expected: FAIL + + [The "beforetoggle" event is not fired for element removal] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/toggleevent-interface.tentative.html.ini b/tests/wpt/metadata/html/semantics/popovers/toggleevent-interface.tentative.html.ini index 919136e4b3c..59d720df5f8 100644 --- a/tests/wpt/metadata/html/semantics/popovers/toggleevent-interface.tentative.html.ini +++ b/tests/wpt/metadata/html/semantics/popovers/toggleevent-interface.tentative.html.ini @@ -109,3 +109,27 @@ [newState set to an object with a valueOf function] expected: FAIL + + [the event is an instance of PopoverToggleEvent] + expected: FAIL + + [PopoverToggleEventInit argument is null] + expected: FAIL + + [PopoverToggleEventInit argument is undefined] + expected: FAIL + + [PopoverToggleEventInit argument is empty dictionary] + expected: FAIL + + [PopoverToggleEventInit properties set value] + expected: FAIL + + [PopoverToggleEventInit properties set value 2] + expected: FAIL + + [PopoverToggleEventInit properties set value 3] + expected: FAIL + + [PopoverToggleEventInit properties set value 4] + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index e55f8f2ce3c..8845054116d 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -3,6 +3,3 @@ expected: TIMEOUT [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT - - [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index 7237f5792de..dbe1def99e3 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,10 +1,9 @@ [promise-job-entry-different-function-realm.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Thenable resolution] expected: FAIL @@ -13,4 +12,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.dedicatedworker.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.dedicatedworker.html.ini index 9d6cc1c43db..0c232fa74a6 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.dedicatedworker.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.dedicatedworker.html.ini @@ -1,5 +1,6 @@ [promise-rejection-events.dedicatedworker.html] type: testharness + expected: TIMEOUT [microtask nesting: attaching a handler inside a combination of mutationObserverMicrotask + promise microtasks, all inside a postMessageTask] expected: FAIL @@ -16,7 +17,7 @@ expected: FAIL [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: FAIL + expected: TIMEOUT [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index 4a48dd15a9d..1d71471b73c 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini @@ -1,6 +1,7 @@ [promise-rejection-events.html] + expected: TIMEOUT [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: FAIL + expected: TIMEOUT [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/body-size-cross-origin.https.html.ini b/tests/wpt/metadata/resource-timing/body-size-cross-origin.https.html.ini new file mode 100644 index 00000000000..f1aabdea4e7 --- /dev/null +++ b/tests/wpt/metadata/resource-timing/body-size-cross-origin.https.html.ini @@ -0,0 +1,18 @@ +[body-size-cross-origin.https.html] + [Retrieving a same-origin resource without Timing-Allow-Origin should expose body size] + expected: FAIL + + [Retrieving a same-origin resource with Timing-Allow-Origin should expose body size] + expected: FAIL + + [Retrieving a no-cors resource without Timing-Allow-Origin should not expose body size] + expected: FAIL + + [Retrieving a no-cors resource with Timing-Allow-Origin should not expose body size] + expected: FAIL + + [Retrieving a cors resource without Timing-Allow-Origin should expose body size] + expected: FAIL + + [Retrieving a cors resource with Timing-Allow-Origin should expose body size] + expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/content-type-parsing.html.ini b/tests/wpt/metadata/resource-timing/content-type-parsing.html.ini index 9342352e856..e3d3c3916cf 100644 --- a/tests/wpt/metadata/resource-timing/content-type-parsing.html.ini +++ b/tests/wpt/metadata/resource-timing/content-type-parsing.html.ini @@ -10,55 +10,55 @@ expected: FAIL [content-type 3 : text/plain;charset=gbk,text/html] - expected: FAIL + expected: TIMEOUT [content-type 4 : text/plain;charset=gbk,text/html;charset=windows-1254] - expected: FAIL + expected: NOTRUN [content-type 5 : text/plain;charset=gbk,text/plain] - expected: FAIL + expected: NOTRUN [content-type 6 : text/plain;charset=gbk,text/plain;charset=windows-1252] - expected: FAIL + expected: NOTRUN [content-type 7 : text/html;charset=gbk,text/html;x=",text/plain] - expected: FAIL + expected: NOTRUN [content-type 8 : text/plain;charset=gbk;x=foo,text/plain] - expected: FAIL + expected: NOTRUN [content-type 9 : text/html;charset=gbk,text/plain,text/html] - expected: FAIL + expected: NOTRUN [content-type 10 : text/plain,*/*] - expected: FAIL + expected: NOTRUN [content-type 11 : text/html,*/*] - expected: FAIL + expected: NOTRUN [content-type 12 : */*,text/html] - expected: FAIL + expected: NOTRUN [content-type 13 : text/plain,*/*;charset=gbk] - expected: FAIL + expected: NOTRUN [content-type 14 : text/html,*/*;charset=gbk] - expected: FAIL + expected: NOTRUN [content-type 15 : text/html;x=",text/plain] - expected: FAIL + expected: NOTRUN [content-type 16 : text/html;",text/plain] - expected: FAIL + expected: NOTRUN [content-type 17 : text/html;",\\",text/plain] - expected: FAIL + expected: NOTRUN [content-type 18 : text/html;",\\",text/plain,";charset=GBK] - expected: FAIL + expected: NOTRUN [content-type 19 : text/html;",",text/plain] - expected: TIMEOUT + expected: NOTRUN [mime-type 1 : text/html;charset=gbk] expected: NOTRUN diff --git a/tests/wpt/metadata/resource-timing/iframe-failed-commit.html.ini b/tests/wpt/metadata/resource-timing/iframe-failed-commit.html.ini index 58fcd50cef1..140db0ed311 100644 --- a/tests/wpt/metadata/resource-timing/iframe-failed-commit.html.ini +++ b/tests/wpt/metadata/resource-timing/iframe-failed-commit.html.ini @@ -1,5 +1,4 @@ [iframe-failed-commit.html] - expected: ERROR [Precondition] expected: FAIL @@ -7,13 +6,13 @@ expected: FAIL [Cross-origin iframe that doesn't comply with CSP attribute gets reported] - expected: NOTRUN + expected: FAIL [Same-origin iframe that complies with CSP attribute gets reported] expected: FAIL [Cross-origin iframe that complies with CSP attribute gets reported] - expected: TIMEOUT + expected: FAIL [Same-origin iframe that doesn't comply with CSP attribute gets reported] expected: FAIL @@ -22,13 +21,25 @@ expected: FAIL [Same-origin empty iframe with a 200 status gets reported] - expected: NOTRUN + expected: FAIL [Cross-origin empty iframe with a 200 status gets reported] - expected: NOTRUN + expected: FAIL [Test iframe from non-existent host gets reported] expected: FAIL [Test iframe redirecting to non-existent host gets reported] expected: FAIL + + [Same-origin empty iframe with a 204 status gets reported] + expected: FAIL + + [Same-origin empty iframe with a 205 status gets reported] + expected: FAIL + + [Cross-origin empty iframe with a 204 status gets reported] + expected: FAIL + + [Cross-origin empty iframe with a 205 status gets reported] + expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/iframe-sequence-of-events.html.ini b/tests/wpt/metadata/resource-timing/iframe-sequence-of-events.html.ini index 75cbf3c126d..4d788bfc7ab 100644 --- a/tests/wpt/metadata/resource-timing/iframe-sequence-of-events.html.ini +++ b/tests/wpt/metadata/resource-timing/iframe-sequence-of-events.html.ini @@ -4,3 +4,57 @@ [A iframe should report separate RT entries if its src changed from the outside] expected: FAIL + + [Changing the src of an iframe (ORIGIN->ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (ORIGIN->ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (ORIGIN->HTTP_REMOTE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (ORIGIN->HTTP_REMOTE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (ORIGIN->HTTP_NOTSAMESITE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (ORIGIN->HTTP_NOTSAMESITE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->HTTP_REMOTE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->HTTP_REMOTE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->HTTP_NOTSAMESITE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_REMOTE_ORIGIN->HTTP_NOTSAMESITE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->HTTP_REMOTE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->HTTP_REMOTE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->HTTP_NOTSAMESITE_ORIGIN) with TAO should result in an RT entry] + expected: FAIL + + [Changing the src of an iframe (HTTP_NOTSAMESITE_ORIGIN->HTTP_NOTSAMESITE_ORIGIN) without TAO should result in an RT entry] + expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/nested-nav-fallback-timing.html.ini b/tests/wpt/metadata/resource-timing/nested-nav-fallback-timing.html.ini new file mode 100644 index 00000000000..80726e769b2 --- /dev/null +++ b/tests/wpt/metadata/resource-timing/nested-nav-fallback-timing.html.ini @@ -0,0 +1,6 @@ +[nested-nav-fallback-timing.html] + [Cross-origin TAO-fail IFrame entries should report window load time] + expected: FAIL + + [Cross-origin TAO-fail object entries should report window load time] + expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/queue-entry-regardless-buffer-size.html.ini b/tests/wpt/metadata/resource-timing/queue-entry-regardless-buffer-size.html.ini new file mode 100644 index 00000000000..b68199d465a --- /dev/null +++ b/tests/wpt/metadata/resource-timing/queue-entry-regardless-buffer-size.html.ini @@ -0,0 +1,4 @@ +[queue-entry-regardless-buffer-size.html] + expected: TIMEOUT + [Test that buffer size has no impact to whether an entry is queued or not] + expected: TIMEOUT diff --git a/tests/wpt/metadata/url/historical.any.js.ini b/tests/wpt/metadata/url/historical.any.js.ini new file mode 100644 index 00000000000..b26363f4e74 --- /dev/null +++ b/tests/wpt/metadata/url/historical.any.js.ini @@ -0,0 +1,14 @@ +[historical.any.html] + [URL: no structured serialize/deserialize support] + expected: FAIL + + [URLSearchParams: no structured serialize/deserialize support] + expected: FAIL + + +[historical.any.worker.html] + [URL: no structured serialize/deserialize support] + expected: FAIL + + [URLSearchParams: no structured serialize/deserialize support] + expected: FAIL diff --git a/tests/wpt/metadata/url/toascii.window.js.ini b/tests/wpt/metadata/url/toascii.window.js.ini index 2c415c94aee..56b224e82de 100644 --- a/tests/wpt/metadata/url/toascii.window.js.ini +++ b/tests/wpt/metadata/url/toascii.window.js.ini @@ -296,3 +296,30 @@ [01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.ß (using .hostname)] expected: FAIL + + [xn--ls8h= (using )] + expected: FAIL + + [xn--ls8h= (using .host)] + expected: FAIL + + [xn--ls8h= (using .hostname)] + expected: FAIL + + [≠ (using .host)] + expected: FAIL + + [≠ (using .hostname)] + expected: FAIL + + [≮ (using .host)] + expected: FAIL + + [≮ (using .hostname)] + expected: FAIL + + [≯ (using .host)] + expected: FAIL + + [≯ (using .hostname)] + expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini b/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini index 39d039a0132..04c2032c723 100644 --- a/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini +++ b/tests/wpt/metadata/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/metadata/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini deleted file mode 100644 index c7946fc91b4..00000000000 --- a/tests/wpt/metadata/webmessaging/with-ports/017.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini similarity index 100% rename from tests/wpt/metadata/webmessaging/without-ports/018.html.ini rename to tests/wpt/metadata/webmessaging/with-ports/018.html.ini diff --git a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini deleted file mode 100644 index c7946fc91b4..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT diff --git a/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini b/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini new file mode 100644 index 00000000000..d0154d3e5d7 --- /dev/null +++ b/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini @@ -0,0 +1,3 @@ +[dedicated-worker-from-blob-url.window.html] + [Creating a dedicated worker from a blob URL works immediately before revoking.] + expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/stylesheet_media_queries.html.ini b/tests/wpt/mozilla/meta/css/stylesheet_media_queries.html.ini deleted file mode 100644 index 77ca6b0688d..00000000000 --- a/tests/wpt/mozilla/meta/css/stylesheet_media_queries.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[stylesheet_media_queries.html] - [Media queries within stylesheets] - expected: FAIL diff --git a/tests/wpt/mozilla/meta/mozilla/scrollBy.html.ini b/tests/wpt/mozilla/meta/mozilla/scrollBy.html.ini new file mode 100644 index 00000000000..f78f699f620 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/scrollBy.html.ini @@ -0,0 +1,3 @@ +[scrollBy.html] + [Ensure that the window.scrollBy function affects scroll position as expected] + expected: FAIL diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream-byob-crash.html b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream-byob-crash.html new file mode 100644 index 00000000000..5992ed1396c --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream-byob-crash.html @@ -0,0 +1,11 @@ + + diff --git a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py index 59593430578..432f5c61d5e 100644 --- a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py +++ b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py @@ -31,6 +31,10 @@ def decode_headers(headers: dict) -> dict: ] for key, value in headers.items() } +def get_request_origin(request: Request) -> str: + return "%s://%s" % (request.url_parts.scheme, + request.url_parts.netloc) + def handle_post_report(request: Request, headers: List[Header]) -> Response: """Handles POST request for reports. @@ -45,7 +49,7 @@ def handle_post_report(request: Request, headers: List[Header]) -> Response: "message": "Stash successfully cleared.", }) store_report( - request.server.stash, { + request.server.stash, get_request_origin(request), { "body": request.body.decode("utf-8"), "headers": decode_headers(request.headers) }) @@ -60,29 +64,36 @@ def handle_get_reports(request: Request, headers: List[Header]) -> Response: Retrieves and returns all reports from the stash. """ - reports = take_reports(request.server.stash) + reports = take_reports(request.server.stash, get_request_origin(request)) + headers.append(("Access-Control-Allow-Origin", "*")) return (200, "OK"), headers, json.dumps({ "code": 200, "reports": reports, }) -def store_report(stash: Stash, report: str) -> None: +def store_report(stash: Stash, origin: str, report: str) -> None: """Stores the report in the stash. Report here is a JSON.""" with stash.lock: - reports = stash.take(REPORTS) - if not reports: - reports = [] + reports_dict = stash.take(REPORTS) + if not reports_dict: + reports_dict = {} + reports = reports_dict.get(origin, []) reports.append(report) - stash.put(REPORTS, reports) + reports_dict[origin] = reports + stash.put(REPORTS, reports_dict) return None -def take_reports(stash: Stash) -> List[str]: +def take_reports(stash: Stash, origin: str) -> List[str]: """Takes all the reports from the stash and returns them.""" - reports = stash.take(REPORTS) - if not reports: - reports = [] + with stash.lock: + reports_dict = stash.take(REPORTS) + if not reports_dict: + reports_dict = {} + + reports = reports_dict.pop(origin, []) + stash.put(REPORTS, reports_dict) return reports diff --git a/tests/wpt/web-platform-tests/bluetooth/getAvailability/sandboxed_iframe.https.window.js b/tests/wpt/web-platform-tests/bluetooth/getAvailability/sandboxed_iframe.https.window.js index c5e3d1e8903..0fc520e4aec 100644 --- a/tests/wpt/web-platform-tests/bluetooth/getAvailability/sandboxed_iframe.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/getAvailability/sandboxed_iframe.https.window.js @@ -8,7 +8,6 @@ let iframe = document.createElement('iframe'); bluetooth_test(async () => { - await getConnectedHealthThermometerDevice(); await new Promise(resolve => { iframe.src = '/bluetooth/resources/health-thermometer-iframe.html'; iframe.sandbox.add('allow-scripts'); diff --git a/tests/wpt/web-platform-tests/bluetooth/getDevices/sandboxed_iframe.https.window.js b/tests/wpt/web-platform-tests/bluetooth/getDevices/sandboxed_iframe.https.window.js index 22cfd17d466..b9b0ac93c27 100644 --- a/tests/wpt/web-platform-tests/bluetooth/getDevices/sandboxed_iframe.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/getDevices/sandboxed_iframe.https.window.js @@ -8,7 +8,6 @@ let iframe = document.createElement('iframe'); bluetooth_test(async () => { - await getConnectedHealthThermometerDevice(); await new Promise(resolve => { iframe.src = '/bluetooth/resources/health-thermometer-iframe.html'; iframe.sandbox.add('allow-scripts'); diff --git a/tests/wpt/web-platform-tests/cookies/attributes/attributes-ctl.sub.html b/tests/wpt/web-platform-tests/cookies/attributes/attributes-ctl.sub.html index 7950751e27d..e741dfd9c25 100644 --- a/tests/wpt/web-platform-tests/cookies/attributes/attributes-ctl.sub.html +++ b/tests/wpt/web-platform-tests/cookies/attributes/attributes-ctl.sub.html @@ -30,80 +30,65 @@ // would not be rejected. That way, if the attribute value is ignored // instead of the cookie line being rejected, the test will catch it. for (const ctl of CTLS) { - // NOTE: 'expected' below is only expected in the case of the tab - // character. Otherwise, '' is expected. const controlCharacterAttributeTests = [ { cookie: `test${ctl.code}domain=t; Domain=test${ctl.chr}.co; Domain=${host};`, - expected: `test${ctl.code}domain=t`, name: `Cookie with %x${ctl.code.toString(16)} in Domain attribute value is handled correctly.`, }, { cookie: `test${ctl.code}domain2=t; Domain=${host}${ctl.chr};`, - expected: `test${ctl.code}domain2=t`, name: `Cookie with %x${ctl.code.toString(16)} after Domain attribute value is handled correctly.`, }, { cookie: `test${ctl.code}path=t; Path=/te${ctl.chr}st; Path=${path}`, - expected: `test${ctl.code}path=t`, name: `Cookie with %x${ctl.code.toString(16)} in Path attribute value is handled correctly.`, }, { cookie: `test${ctl.code}path2=t; Path=${path}${ctl.chr};`, - expected: `test${ctl.code}path2=t`, name: `Cookie with %x${ctl.code.toString(16)} after Path attribute value is handled correctly.`, }, { cookie: `test${ctl.code}maxage=t; Max-Age=10${ctl.chr}00; Max-Age=1000;`, - expected: `test${ctl.code}maxage=t`, name: `Cookie with %x${ctl.code.toString(16)} in Max-Age attribute value is handled correctly.`, }, { cookie: `test${ctl.code}maxage2=t; Max-Age=1000${ctl.chr};`, - expected: `test${ctl.code}maxage2=t`, name: `Cookie with %x${ctl.code.toString(16)} after Max-Age attribute value is handled correctly.`, }, { cookie: `test${ctl.code}expires=t; Expires=Fri, 01 Jan 20${ctl.chr}38 00:00:00 GMT; ` + 'Expires=Fri, 01 Jan 2038 00:00:00 GMT;', - expected: `test${ctl.code}expires=t`, name: `Cookie with %x${ctl.code.toString(16)} in Expires attribute value is handled correctly.`, }, { cookie: `test${ctl.code}expires2=t; Expires=Fri, 01 Jan 2038 00:00:00 GMT${ctl.chr};`, - expected: `test${ctl.code}expires2=t`, name: `Cookie with %x${ctl.code.toString(16)} after Expires attribute value is handled correctly.`, }, { cookie: `test${ctl.code}secure=t; Sec${ctl.chr}ure;`, - expected: `test${ctl.code}secure=t`, name: `Cookie with %x${ctl.code.toString(16)} in Secure attribute is handled correctly.`, }, { cookie: `test${ctl.code}secure2=t; Secure${ctl.chr};`, - expected: `test${ctl.code}secure2=t`, name: `Cookie with %x${ctl.code.toString(16)} after Secure attribute is handled correctly.`, }, { cookie: `test${ctl.code}httponly=t; Http${ctl.chr}Only;`, - expected: `test${ctl.code}httponly=t`, name: `Cookie with %x${ctl.code.toString(16)} in HttpOnly attribute is handled correctly.`, }, { cookie: `test${ctl.code}samesite=t; SameSite=La${ctl.chr}x; SameSite=Lax;`, - expected: `test${ctl.code}samesite=t`, name: `Cookie with %x${ctl.code.toString(16)} in SameSite attribute value is handled correctly.`, }, { cookie: `test${ctl.code}samesite2=t; SameSite=Lax${ctl.chr};`, - expected: `test${ctl.code}samesite2=t`, name: `Cookie with %x${ctl.code.toString(16)} after SameSite attribute value is handled correctly.`, }, ]; for (const test of controlCharacterAttributeTests) { if (ctl.code === 0x09) { - domCookieTest(test.cookie, test.expected, test.name); + domCookieTest(test.cookie, test.cookie.split(";")[0], test.name); } else { domCookieTest(test.cookie, "", test.name); } diff --git a/tests/wpt/web-platform-tests/cookies/name/name-ctl.html b/tests/wpt/web-platform-tests/cookies/name/name-ctl.html index f5359793559..6ff2305b3a8 100644 --- a/tests/wpt/web-platform-tests/cookies/name/name-ctl.html +++ b/tests/wpt/web-platform-tests/cookies/name/name-ctl.html @@ -25,12 +25,37 @@ domCookieTest( `test${ctl.code}${ctl.chr}name=${ctl.code}`, `test${ctl.code}${ctl.chr}name=${ctl.code}`, - `Cookie with %x${ctl.code.toString(16)} in name is accepted.`); + `Cookie with %x${ctl.code.toString(16)} in name is accepted (DOM).`); } else { domCookieTest( `test${ctl.code}${ctl.chr}name=${ctl.code}`, '', - `Cookie with %x${ctl.code.toString(16)} in name is rejected.`); + `Cookie with %x${ctl.code.toString(16)} in name is rejected (DOM).`); + } + } + + // Note that per RFC 9110, %x00, %x0A, and %x0D characters in the HTTP + // header MUST either cause the HTTP message to be rejected or be + // replaced with %x20 (space) characters. Both cases will result in a + // passing test here. For more info, see: + // https://www.rfc-editor.org/rfc/rfc9110.html#section-5.5 + for (const ctl of CTLS) { + if (ctl.code === 0x09) { + httpCookieTest( + `test${ctl.code}${ctl.chr}name=${ctl.code}`, + `test${ctl.code}${ctl.chr}name=${ctl.code}`, + `Cookie with %x${ctl.code.toString(16)} in name is accepted (HTTP).`); + } else if (ctl.code === 0x00 || ctl.code === 0x0A || ctl.code === 0x0D) { + httpCookieTest( + `test${ctl.code}${ctl.chr}name=${ctl.code}`, + `test${ctl.code} name=${ctl.code}`, + `Cookie with %x${ctl.code.toString(16)} in name is rejected or modified (HTTP).`, + /* defaultPath */ true, /* allowFetchFailure */ true); + } else { + httpCookieTest( + `test${ctl.code}${ctl.chr}name=${ctl.code}`, + '', + `Cookie with %x${ctl.code.toString(16)} in name is rejected (HTTP).`); } } diff --git a/tests/wpt/web-platform-tests/cookies/resources/cookie-test.js b/tests/wpt/web-platform-tests/cookies/resources/cookie-test.js index c73d4d756dc..a909e4d72fa 100644 --- a/tests/wpt/web-platform-tests/cookies/resources/cookie-test.js +++ b/tests/wpt/web-platform-tests/cookies/resources/cookie-test.js @@ -49,7 +49,10 @@ async function getAndExpireCookiesForRedirectTest(location) { // httpCookieTest sets a `cookie` (via HTTP), then asserts it was or was not set // via `expectedValue` (via the DOM). Then cleans it up (via test driver). Most -// tests do not set a Path attribute, so `defaultPath` defaults to true. +// tests do not set a Path attribute, so `defaultPath` defaults to true. If the +// cookie values are expected to cause the HTTP request or response to fail, the +// test can be made to pass when this happens via `allowFetchFailure`, which +// defaults to false. // // `cookie` may be a single cookie string, or an array of cookie strings, where // the order of the array items represents the order of the Set-Cookie headers @@ -57,27 +60,45 @@ async function getAndExpireCookiesForRedirectTest(location) { // // Note: this function has a dependency on testdriver.js. Any test files calling // it should include testdriver.js and testdriver-vendor.js -function httpCookieTest(cookie, expectedValue, name, defaultPath = true) { - return promise_test(async (t) => { - // The result is ignored as we're expiring cookies for cleaning here. - await getAndExpireCookiesForDefaultPathTest(); - await test_driver.delete_all_cookies(); - t.add_cleanup(test_driver.delete_all_cookies); +function httpCookieTest(cookie, expectedValue, name, defaultPath = true, + allowFetchFailure = false) { + return promise_test((t) => { + var skipAssertions = false; + return new Promise(async (resolve, reject) => { + // The result is ignored as we're expiring cookies for cleaning here. + await getAndExpireCookiesForDefaultPathTest(); + await test_driver.delete_all_cookies(); + t.add_cleanup(test_driver.delete_all_cookies); - let encodedCookie = encodeURIComponent(JSON.stringify(cookie)); - await fetch(`/cookies/resources/cookie.py?set=${encodedCookie}`); - let cookies = document.cookie; - if (defaultPath) { - // for the tests where a Path is set from the request-uri - // path, we need to go look for cookies in an iframe at that - // default path. - cookies = await getAndExpireCookiesForDefaultPathTest(); - } - if (Boolean(expectedValue)) { - assert_equals(cookies, expectedValue, 'The cookie was set as expected.'); - } else { - assert_equals(cookies, expectedValue, 'The cookie was rejected.'); - } + let encodedCookie = encodeURIComponent(JSON.stringify(cookie)); + try { + await fetch(`/cookies/resources/cookie.py?set=${encodedCookie}`); + } catch { + if (allowFetchFailure) { + skipAssertions = true; + resolve(); + } else { + reject('Failed to fetch /cookies/resources/cookie.py'); + } + } + let cookies = document.cookie; + if (defaultPath) { + // for the tests where a Path is set from the request-uri + // path, we need to go look for cookies in an iframe at that + // default path. + cookies = await getAndExpireCookiesForDefaultPathTest(); + } + resolve(cookies); + }).then((cookies) => { + if (skipAssertions) { + return; + } + if (Boolean(expectedValue)) { + assert_equals(cookies, expectedValue, 'The cookie was set as expected.'); + } else { + assert_equals(cookies, expectedValue, 'The cookie was rejected.'); + } + }); }, name); } diff --git a/tests/wpt/web-platform-tests/cookies/value/value-ctl.html b/tests/wpt/web-platform-tests/cookies/value/value-ctl.html index eb9fee83c0a..5a24064f43c 100644 --- a/tests/wpt/web-platform-tests/cookies/value/value-ctl.html +++ b/tests/wpt/web-platform-tests/cookies/value/value-ctl.html @@ -25,14 +25,40 @@ domCookieTest( `test=${ctl.code}${ctl.chr}value`, `test=${ctl.code}${ctl.chr}value`, - `Cookie with %x${ctl.code.toString(16)} in value is accepted.`); + `Cookie with %x${ctl.code.toString(16)} in value is accepted (DOM).`); } else { domCookieTest( `test=${ctl.code}${ctl.chr}value`, '', - `Cookie with %x${ctl.code.toString(16)} in value is rejected.`); + `Cookie with %x${ctl.code.toString(16)} in value is rejected (DOM).`); } } + + // Note that per RFC 9110, %x00, %x0A, and %x0D characters in the HTTP + // header MUST either cause the HTTP message to be rejected or be + // replaced with %x20 (space) characters. Both cases will result in a + // passing test here. For more info, see: + // https://www.rfc-editor.org/rfc/rfc9110.html#section-5.5 + for (const ctl of CTLS) { + if (ctl.code === 0x09) { + httpCookieTest( + `test=${ctl.code}${ctl.chr}value`, + `test=${ctl.code}${ctl.chr}value`, + `Cookie with %x${ctl.code.toString(16)} in value is accepted (HTTP).`); + } else if (ctl.code === 0x00 || ctl.code === 0x0A || ctl.code === 0x0D) { + httpCookieTest( + `test${ctl.code}${ctl.chr}name=${ctl.code}`, + `test${ctl.code} name=${ctl.code}`, + `Cookie with %x${ctl.code.toString(16)} in name is rejected or modified (HTTP).`, + /* defaultPath */ true, /* allowFetchFailure */ true); + } else { + httpCookieTest( + `test=${ctl.code}${ctl.chr}value`, + '', + `Cookie with %x${ctl.code.toString(16)} in value is rejected (HTTP).`); + } + } + diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-first-idp.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-first-idp.https.html new file mode 100644 index 00000000000..eb9f7da7b26 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-first-idp.https.html @@ -0,0 +1,35 @@ + +Federated Credential Management API multi IDP abort first IDP test. + + + + + diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-second-idp.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-second-idp.https.html new file mode 100644 index 00000000000..7e7ec2ce3d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/abort-multiple-gets-through-second-idp.https.html @@ -0,0 +1,35 @@ + +Federated Credential Management API multi IDP abort second IDP test. + + + + + diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html new file mode 100644 index 00000000000..b7b03e4a147 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-multi-idp/multiple-gets-after-abort.https.html @@ -0,0 +1,43 @@ + +Federated Credential Management API multi IDP get after abort test. + + + + + diff --git a/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-009.xht b/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-009.xht new file mode 100644 index 00000000000..faa412a0059 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-009.xht @@ -0,0 +1,23 @@ + + + + CSS Test: Border-style shorthand property set using a single value + + + + + +

Test passes if there is a box with groove borders.

+
+ + diff --git a/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-010.xht b/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-010.xht new file mode 100644 index 00000000000..d172298f6f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/borders/border-style-010.xht @@ -0,0 +1,24 @@ + + + + CSS Test: Border-style shorthand property set using a single value + + + + + +

Test passes if there is a box with groove borders.

+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-001.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-001.html index f85c9248d93..8d64d4a1a34 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-001.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-001.html @@ -34,5 +34,5 @@
-
+
diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-inline-001.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-inline-001.html index 024225fecbb..ae8c1d65140 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-inline-001.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-name-inline-001.html @@ -51,5 +51,5 @@ -
+
diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-dynamic-001.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-dynamic-001.html index 5b5ee82990e..95b90c9bf12 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-dynamic-001.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-position-dynamic-001.html @@ -50,13 +50,15 @@ height: 100px; } - -
-
-
-
+ +
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-shorthand-computed.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-shorthand-computed.html index 01b1375dc9d..0a1eb96041c 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-shorthand-computed.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-shorthand-computed.html @@ -13,25 +13,4 @@ test_computed_value("animation-delay", "1s, 2s"); test_computed_value("animation-delay", "1s 2s, 3s"); test_computed_value("animation-delay", "1s, 2s 3s"); test_computed_value("animation-delay", "1s, 2s, 3s"); - -test_computed_value("animation-delay", "cover"); -test_computed_value("animation-delay", "contain"); -test_computed_value("animation-delay", "enter"); -test_computed_value("animation-delay", "exit"); -test_computed_value("animation-delay", "enter, exit"); - -test_computed_value("animation-delay", "enter 0% enter 100%", "enter"); -test_computed_value("animation-delay", "exit 0% exit 100%", "exit"); -test_computed_value("animation-delay", "cover 0% cover 100%", "cover"); -test_computed_value("animation-delay", "contain 0% contain 100%", "contain"); - -test_computed_value("animation-delay", "cover 50%"); -test_computed_value("animation-delay", "contain 50%"); -test_computed_value("animation-delay", "enter 50%"); -test_computed_value("animation-delay", "exit 50%"); - -test_computed_value("animation-delay", "enter 50% 0s", "enter 50%"); -test_computed_value("animation-delay", "0s enter 50%"); -test_computed_value("animation-delay", "enter 50% exit 50%"); -test_computed_value("animation-delay", "cover 50% enter 50%, contain 50% exit 50%"); diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-start-computed.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-start-computed.html index 9e0326b387c..bfb89d0267f 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-start-computed.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-delay-start-computed.html @@ -9,15 +9,4 @@ test_computed_value("animation-delay-start", "initial", "0s"); test_computed_value("animation-delay-start", "-500ms", "-0.5s"); test_computed_value("animation-delay-start", "calc(2 * 3s)", "6s"); test_computed_value("animation-delay-start", "20s, 10s"); - -test_computed_value("animation-delay-start", "cover 0%"); -test_computed_value("animation-delay-start", "COVER 0%", "cover 0%"); -test_computed_value("animation-delay-start", "cover 100%"); -test_computed_value("animation-delay-start", "cover 120%"); -test_computed_value("animation-delay-start", "cover 42%"); -test_computed_value("animation-delay-start", "cover -42%"); -test_computed_value("animation-delay-start", "contain 42%"); -test_computed_value("animation-delay-start", "exit 42%"); -test_computed_value("animation-delay-start", "exit calc(41% + 1%)", "exit 42%"); -test_computed_value("animation-delay-start", "exit 1%, cover 2%, contain 100%"); diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html new file mode 100644 index 00000000000..7e64fa9f63b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001-ref.html @@ -0,0 +1,17 @@ + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html new file mode 100644 index 00000000000..1c7193fa7b0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-001.html @@ -0,0 +1,8 @@ + + + + + +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html new file mode 100644 index 00000000000..2c148d8a52c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002-ref.html @@ -0,0 +1,17 @@ + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html new file mode 100644 index 00000000000..b645ed82eaf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-002.html @@ -0,0 +1,8 @@ + + + + + +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html new file mode 100644 index 00000000000..a58e8101745 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003-ref.html @@ -0,0 +1,17 @@ + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html new file mode 100644 index 00000000000..4fca18bfdde --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-block-fragmentation-003.html @@ -0,0 +1,8 @@ + + + + + +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html new file mode 100644 index 00000000000..171e4935edd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001-ref.html @@ -0,0 +1,19 @@ + + + +
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html new file mode 100644 index 00000000000..46eab59ab24 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-001.html @@ -0,0 +1,13 @@ + + + + + + +
+ +  pppÉÉÉ 
+  pppÉÉÉ 
+  pppÉÉÉ  +
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html new file mode 100644 index 00000000000..baf297fe2c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002-ref.html @@ -0,0 +1,19 @@ + + + +
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html new file mode 100644 index 00000000000..516abcf2a93 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-002.html @@ -0,0 +1,13 @@ + + + + + + +
+ +  pppÉÉÉ 
+  pppÉÉÉ 
+  pppÉÉÉ  +
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html new file mode 100644 index 00000000000..4c1954b3e69 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003-ref.html @@ -0,0 +1,19 @@ + + + +
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
+ +  pppÉÉÉ  +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html new file mode 100644 index 00000000000..336c01f5bae --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow/slice-inline-fragmentation-003.html @@ -0,0 +1,13 @@ + + + + + + +
+ +  pppÉÉÉ 
+  pppÉÉÉ 
+  pppÉÉÉ  +
+
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/tiny-foreignObject-double-border-radius-crash.html b/tests/wpt/web-platform-tests/css/css-backgrounds/tiny-foreignObject-double-border-radius-crash.html new file mode 100644 index 00000000000..9d89640465f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/tiny-foreignObject-double-border-radius-crash.html @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print-ref.html new file mode 100644 index 00000000000..3d66305db0e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print-ref.html @@ -0,0 +1,17 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ There should be three pages. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print.html new file mode 100644 index 00000000000..04feb96e847 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-001-print.html @@ -0,0 +1,13 @@ + + + + + +
+ This should repeat on every page. +
+
+ There should be three pages. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print-ref.html new file mode 100644 index 00000000000..3d66305db0e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print-ref.html @@ -0,0 +1,17 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ There should be three pages. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print.html new file mode 100644 index 00000000000..c23c6be7d2a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-002-print.html @@ -0,0 +1,13 @@ + + + + + +
+ There should be three pages. +
+ This should repeat on every page. +
+
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print-ref.html new file mode 100644 index 00000000000..3d66305db0e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print-ref.html @@ -0,0 +1,17 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ There should be three pages. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print.html new file mode 100644 index 00000000000..1b06257175f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-003-print.html @@ -0,0 +1,13 @@ + + + + + +
+ There should be three pages. +
+
+ This should repeat on every page. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print-ref.html new file mode 100644 index 00000000000..3e3473bcb8e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print-ref.html @@ -0,0 +1,26 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ There should be three pages. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print.html new file mode 100644 index 00000000000..c138e9cd6aa --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-004-print.html @@ -0,0 +1,18 @@ + + + + + +
+ This should repeat on every page. +
+
+ There should be three pages. +
+
+ This should also repeat on every page. +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print-ref.html new file mode 100644 index 00000000000..e692ff8db37 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print-ref.html @@ -0,0 +1,42 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ There should be five pages. +
+
+ This should be on the second page. +
+This should be on the fifth page. diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print.html new file mode 100644 index 00000000000..0a2edc71788 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-005-print.html @@ -0,0 +1,22 @@ + + + + + +
+ There should be five pages. +
+
+ This should repeat on every page. +
+
+ This should be on the second page. +
+ This should also repeat on every page. +
+
+ This should be on the fifth page. +
+
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print-ref.html new file mode 100644 index 00000000000..b03e1d78d00 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print-ref.html @@ -0,0 +1,57 @@ + + + +
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ This should also repeat on every page. +
+
+ Even this should repeat on every page. +
+
+ Even this should repeat on every page. +
+
+ Even this should repeat on every page. +
+
+ Even this should repeat on every page. +
+
+ Even this should repeat on every page. +
+
+ There should be five pages. +
+
+ This should be on the second page. +
+This should be on the third page. diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print.html new file mode 100644 index 00000000000..2386c166c81 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-006-print.html @@ -0,0 +1,23 @@ + + + + + +There should be five pages. +
+ This should repeat on every page. +
+
+ This should be on the second page. +
+ This should also repeat on every page. +
+
+ This should be on the third page. +
+ Even this should repeat on every page. +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print-ref.html new file mode 100644 index 00000000000..f576c937715 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print-ref.html @@ -0,0 +1,26 @@ + + + +
+ There should be three pages. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print.html new file mode 100644 index 00000000000..8dcb700b96d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-007-print.html @@ -0,0 +1,19 @@ + + + + + +
+ There should be three pages. +
+
+
+
+ This should be repeated on every page. +
+
+
+ This should also be repeated on every page. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print-ref.html new file mode 100644 index 00000000000..6ed2528115a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print-ref.html @@ -0,0 +1,44 @@ + + + +
+ There should be six pages. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
+
+ This should also be repeated on every page. +
diff --git a/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print.html b/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print.html new file mode 100644 index 00000000000..02b5d63cc7c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fixedpos-008-print.html @@ -0,0 +1,23 @@ + + + + + +
+ There should be six pages. +
+
+ This should be repeated on every page. +
+
+
+
+
+
+ This should also be repeated on every page. +
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-break/out-of-flow-in-multicolumn-071.html b/tests/wpt/web-platform-tests/css/css-break/out-of-flow-in-multicolumn-071.html index 371f41a204b..629ebda48b8 100644 --- a/tests/wpt/web-platform-tests/css/css-break/out-of-flow-in-multicolumn-071.html +++ b/tests/wpt/web-platform-tests/css/css-break/out-of-flow-in-multicolumn-071.html @@ -7,7 +7,6 @@ +
+ +
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-li-container.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-li-container.html new file mode 100644 index 00000000000..40764073324 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-li-container.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> (<li> container) + + +
    +
  1. A
  2. +
  3. B
  4. +
  5. X
  6. +
  7. Y
  8. +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo-reversed.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo-reversed.html new file mode 100644 index 00000000000..dc895abda3b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo-reversed.html @@ -0,0 +1,17 @@ + +CSS Containment: contain:style and <ol> ordinals (pseudo, reversed) + + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo.html new file mode 100644 index 00000000000..a9ccfb5930e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-pseudo.html @@ -0,0 +1,17 @@ + +CSS Containment: contain:style and <ol> ordinals (pseudo) + + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-reversed.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-reversed.html new file mode 100644 index 00000000000..22f2f20cffe --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-reversed.html @@ -0,0 +1,14 @@ + +CSS Containment: contain:style and <ol> ordinals (reversed) + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start-reversed.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start-reversed.html new file mode 100644 index 00000000000..175aa814031 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start-reversed.html @@ -0,0 +1,14 @@ + +CSS Containment: contain:style and <ol> ordinals (start attribute, reversed) + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start.html new file mode 100644 index 00000000000..dc23b65f145 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal-start.html @@ -0,0 +1,14 @@ + +CSS Containment: contain:style and <ol> ordinals (start attribute) + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal.html b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal.html new file mode 100644 index 00000000000..0901325a4ef --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-style-ol-ordinal.html @@ -0,0 +1,14 @@ + +CSS Containment: contain:style and <ol> ordinals + + +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/dialog-backdrop-crash.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/dialog-backdrop-crash.html new file mode 100644 index 00000000000..3bbdf160cf6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/dialog-backdrop-crash.html @@ -0,0 +1,25 @@ + + + + Hello World + + diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/reversed-ol-crash.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/reversed-ol-crash.html new file mode 100644 index 00000000000..fa4d35380c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/reversed-ol-crash.html @@ -0,0 +1,29 @@ + +Don't crash with intermediate container in reversed list + + + + +
    +
  1. A
  2. +
    +
    + B +
    +
    +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-create.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-create.html new file mode 100644 index 00000000000..f72bb69f682 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-create.html @@ -0,0 +1,30 @@ + +CSS Container Queries Test: ::backdrop appearing conditionally on dialog container + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-remove.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-remove.html new file mode 100644 index 00000000000..47b40304924 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/dialog-backdrop-remove.html @@ -0,0 +1,30 @@ + +CSS Container Queries Test: ::backdrop disappearing conditionally on dialog container + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html new file mode 100644 index 00000000000..ae1c946fa31 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html @@ -0,0 +1,41 @@ + + + +Content Visibility: ContentVisibilityAutoStateChange event. + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-li-container-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-li-container-ref.html new file mode 100644 index 00000000000..e6c721ac2d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-li-container-ref.html @@ -0,0 +1,10 @@ + +CSS Containment: contain:style and <ol> ordinals (li container, ref) +
    +
  1. A
  2. +
  3. B
  4. +
  5. X
  6. +
  7. Y
  8. +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-ref.html new file mode 100644 index 00000000000..5b8e4d338c3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (pseudo, ref) +
    +
  1. 10A10
  2. +
  3. 11B11
  4. +
    +
  5. 1X1
  6. +
  7. 2Y2
  8. +
    +
  9. 12C12
  10. +
  11. 13D13
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-reversed-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-reversed-ref.html new file mode 100644 index 00000000000..04cc67139a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-pseudo-reversed-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (pseudo, reversed, ref) +
    +
  1. 10A10
  2. +
  3. 9B9
  4. +
    +
  5. 1X1
  6. +
  7. 2Y2
  8. +
    +
  9. 8C8
  10. +
  11. 7D7
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-ref.html new file mode 100644 index 00000000000..bee7deda2f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (ref) +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-reversed-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-reversed-ref.html new file mode 100644 index 00000000000..bb7531790ef --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-reversed-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (reversed, ref) +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-ref.html new file mode 100644 index 00000000000..93411804b18 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (start attribute, ref) +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-reversed-ref.html b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-reversed-ref.html new file mode 100644 index 00000000000..60aefdf5638 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/reference/contain-style-ol-ordinal-start-reversed-ref.html @@ -0,0 +1,12 @@ + +CSS Containment: contain:style and <ol> ordinals (start attribute, reversed, ref) +
    +
  1. A
  2. +
  3. B
  4. +
    +
  5. X
  6. +
  7. Y
  8. +
    +
  9. C
  10. +
  11. D
  12. +
diff --git a/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.tentative.html b/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.tentative.html new file mode 100644 index 00000000000..b6b58ee45ee --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.tentative.html @@ -0,0 +1,21 @@ + + +display interpolation + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-notref.html b/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-ref.html similarity index 82% rename from tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-notref.html rename to tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-ref.html index 6d742ae257d..e4f26eeb161 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-notref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family-ref.html @@ -11,13 +11,13 @@ src: url("resources/COLR-palettes-test-font.ttf") format("truetype"); } -@font-palette-values MyPalette { +@font-palette-values --MyPalette { font-family: "COLR-test-font"; base-palette: 1; } -
A
+
A
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html b/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html index 8b52bf04d0f..eb69f8fbc8e 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-palette-empty-font-family.html @@ -5,7 +5,7 @@ Tests that an empty font family name is handled correctly - + -
A
+
A
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-012.html b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-012.html index 57519edf18f..a6037ffbace 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-012.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-012.html @@ -19,7 +19,7 @@ --secondary-font: 'ahem-ex-250'; } .adjusted { - font-size-adjust: 50%; + font-size-adjust: 0.5; } .test { font-family: var(--primary-font), var(--secondary-font); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-format.html b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-format.html index 36abbb44dc5..7a5bb5b97ec 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-format.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-format.html @@ -13,6 +13,12 @@ { src: 'url("foo.ttf"), url("bar.ttf")', valid: true }, // Empty format() is not valid { src: 'url("foo.ttf") format()', valid: false }, + // Garbage data instead of format() is not valid + { src: 'url("foo.ttf") dummy()', valid: false }, + // Garbage data following valid format() is not valid + { src: 'url("foo.ttf") format("woff") dummy()', valid: false }, + // Garbage data preceding valid format() is not valid + { src: 'url("foo.ttf") dummy() format("woff")', valid: false }, // Quoted strings in format() { src: 'url("foo.ttf") format("collection")', valid: true }, { src: 'url("foo.ttf") format("opentype")', valid: true }, diff --git a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-local.html b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-local.html index d7c8cba18cd..30c435afaf4 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-local.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/parsing/font-face-src-local.html @@ -8,6 +8,10 @@ +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering-2.html index d7bd02e7677..688c60a688a 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering-2.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering.html index be18e85ffb0..3288034d529 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dpi-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dppx-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dppx-rendering.html index 1fc2f8c85d9..d111dfb7ff2 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dppx-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-dppx-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-empty-url-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-empty-url-rendering.html index 0286d7372f0..f5b99922216 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-empty-url-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-empty-url-rendering.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-first-match-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-first-match-rendering.html index 4d5b9d7d9ce..51d6aeeb241 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-first-match-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-first-match-rendering.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering-2.html index 88917e1e3f7..c8b560b7fcb 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering-2.html @@ -5,7 +5,6 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering.html index 0cdcf6018e6..91aeaccebdc 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-invalid-resolution-rendering.html @@ -5,10 +5,12 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-linear-gradient-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-linear-gradient-rendering.html index 62f41a743f2..2fc31b95a81 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-linear-gradient-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-linear-gradient-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering-2.html index 2cb98bb9c2e..f588980be33 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering-2.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering.html index 927d4c67f1d..577728894d9 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-res-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-url-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-url-rendering.html index 7af722d7c06..f50ebb676ab 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-url-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-no-url-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-radial-gradient-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-radial-gradient-rendering.html index 7bf950a4037..b4e09ea3519 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-radial-gradient-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-radial-gradient-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering-2.html index a6724553d62..fa1749518f4 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering-2.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering.html index ce4a900403d..a105438cc4b 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-first-match-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-first-match-rendering.html index 1283d22d1ff..7e6ea8fa1f7 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-first-match-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-first-match-rendering.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-2.html index 897118acd60..23e90ea9e43 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-2.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-3.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-3.html index 51dbe2c9221..b47c4d82a33 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-3.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering-3.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering.html index 16055dbccf7..069e2c867f5 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-rendering.html @@ -5,9 +5,11 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-skip-unsupported-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-skip-unsupported-rendering.html index e555633cdda..4473e816bd1 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-skip-unsupported-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-skip-unsupported-rendering.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering-2.html index 3f9fcd27d82..d9d2f457076 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering-2.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering-2.html @@ -15,7 +15,6 @@ Spec definition: If all the values in the image set are of an unsupported type, the set should be empty. --> - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering.html index 6e9e56a4eb0..a7cf98bb58b 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-type-unsupported-rendering.html @@ -15,10 +15,12 @@ Spec definition: If all the values in the image set are of an unsupported type, the set should be empty. --> - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-unordered-res-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-unordered-res-rendering.html index c1063b74df6..2085b416b6b 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-unordered-res-rendering.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-unordered-res-rendering.html @@ -5,12 +5,14 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-content-rendering-ref.html b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-content-rendering-ref.html deleted file mode 100644 index c1ef6d4531c..00000000000 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-content-rendering-ref.html +++ /dev/null @@ -1,11 +0,0 @@ - -Image set is supported in the content property - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-linear-gradient-rendering-ref.html b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-linear-gradient-rendering-ref.html index 272bab9c582..7f95f46eaf4 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-linear-gradient-rendering-ref.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-linear-gradient-rendering-ref.html @@ -4,7 +4,9 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-radial-gradient-rendering-ref.html b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-radial-gradient-rendering-ref.html index f5545af5e6b..3c49f87d910 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-radial-gradient-rendering-ref.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-radial-gradient-rendering-ref.html @@ -4,7 +4,9 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-rendering-ref.html b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-rendering-ref.html index 2ca6b3352d1..8a56bbf4d29 100644 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-rendering-ref.html +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/reference/image-set-rendering-ref.html @@ -4,7 +4,9 @@ - +
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/resources/image-set-rendering-helper.js b/tests/wpt/web-platform-tests/css/css-images/image-set/resources/image-set-rendering-helper.js deleted file mode 100644 index 5045679b4cc..00000000000 --- a/tests/wpt/web-platform-tests/css/css-images/image-set/resources/image-set-rendering-helper.js +++ /dev/null @@ -1,27 +0,0 @@ -function setupTest() { - createPassingNotice(); - createTestDiv(); -} - -function createPassingNotice() { - const notice = document.createElement('p'); - - notice.textContent = - 'Test passes if the image below is green when devicePixelRatio is 1, not red.'; - - document.body.appendChild(notice); -} - -function createTestDiv() { - const testDiv = document.createElement('div'); - - testDiv.id = 'test'; - - testDiv.style.width = '100px'; - testDiv.style.height = '100px'; - testDiv.style.backgroundColor = 'red'; - - document.body.appendChild(testDiv); -} - -document.addEventListener("DOMContentLoaded", setupTest); diff --git a/tests/wpt/web-platform-tests/css/css-multicol/abspos-after-spanner-static-pos.html b/tests/wpt/web-platform-tests/css/css-multicol/abspos-after-spanner-static-pos.html index d257016a251..0cc6b086500 100644 --- a/tests/wpt/web-platform-tests/css/css-multicol/abspos-after-spanner-static-pos.html +++ b/tests/wpt/web-platform-tests/css/css-multicol/abspos-after-spanner-static-pos.html @@ -5,7 +5,6 @@ + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg.html new file mode 100644 index 00000000000..fed931b00a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/rotate-animation-on-svg.html @@ -0,0 +1,42 @@ + + + +Animating the "rotate" property on an SVG element + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-ref.html new file mode 100644 index 00000000000..d555a5fbe5c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg-ref.html @@ -0,0 +1,26 @@ + + + +Animating the "scale" property on an SVG element + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg.html new file mode 100644 index 00000000000..8862545688e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/scale-animation-on-svg.html @@ -0,0 +1,41 @@ + + + +Animating the "scale" property on an SVG element + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-ref.html new file mode 100644 index 00000000000..d503f338511 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg-ref.html @@ -0,0 +1,26 @@ + + + +Animating the "translate" property on an SVG element + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg.html b/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg.html new file mode 100644 index 00000000000..e5cc697360c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/animation/translate-animation-on-svg.html @@ -0,0 +1,41 @@ + + + +Animating the "translate" property on an SVG element + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-values/urls/resolve-relative-to-base.html b/tests/wpt/web-platform-tests/css/css-values/urls/resolve-relative-to-base.sub.html similarity index 100% rename from tests/wpt/web-platform-tests/css/css-values/urls/resolve-relative-to-base.html rename to tests/wpt/web-platform-tests/css/css-values/urls/resolve-relative-to-base.sub.html diff --git a/tests/wpt/web-platform-tests/css/css-variables/variable-definition.html b/tests/wpt/web-platform-tests/css/css-variables/variable-definition.html index 0f9cefc5e93..aaaaf6be232 100644 --- a/tests/wpt/web-platform-tests/css/css-variables/variable-definition.html +++ b/tests/wpt/web-platform-tests/css/css-variables/variable-definition.html @@ -34,13 +34,13 @@ { varName:"-var4" , expectedValue:"", style:"-var4:value3", testName:"parsing multiple dashes with one dash at start of variable"}, { varName:"--var", expectedValue:"value", style:"--var: value", testName:" leading white space (single space)"}, { varName:"--var", expectedValue:"value1 value2", style:"--var:value1 value2", testName:" middle white space (single space)"}, - { varName:"--var", expectedValue:"value ", style:"--var:value ", testName:" trailing white space (single space)"}, + { varName:"--var", expectedValue:"value", style:"--var:value ", testName:" trailing white space (single space)"}, { varName:"--var", expectedValue:"value", style:"--var: value", testName:" leading white space (double space) 2"}, - { varName:"--var", expectedValue:"value1 value2", style:"--var:value1 value2",testName:" middle white space (double space) 2"}, - { varName:"--var", expectedValue:"value ", style:"--var:value ", testName:" trailing white space (double space) 2"}, - { varName:"--var", expectedValue:"value1 ", style:"--var:value1 !important;", testName:"!important"}, + { varName:"--var", expectedValue:"value1 value2", style:"--var:value1 value2",testName:" middle white space (double space) 2"}, + { varName:"--var", expectedValue:"value", style:"--var:value ", testName:" trailing white space (double space) 2"}, + { varName:"--var", expectedValue:"value1", style:"--var:value1 !important;", testName:"!important"}, { varName:"--var", expectedValue:"value1", style:"--var:value1!important;--var:value2;", testName:"!important 2"}, - { varName:"--var", expectedValue:"value1 ", style:"--var:value1 !important;--var:value2;", testName:"!important (with space)"} + { varName:"--var", expectedValue:"value1", style:"--var:value1 !important;--var:value2;", testName:"!important (with space)"} ]; templates.forEach(function (template) { diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe-ref.html new file mode 100644 index 00000000000..44ed0947abc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe-ref.html @@ -0,0 +1,19 @@ + + + + View transitions: Dialog element in RTL scrollable iframe + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe.html b/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe.html new file mode 100644 index 00000000000..7a4d200e034 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe.html @@ -0,0 +1,34 @@ + + + + View transitions: Dialog element in RTL scrollable iframe + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html b/tests/wpt/web-platform-tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html new file mode 100644 index 00000000000..f1b3f021cbc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html @@ -0,0 +1,47 @@ + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/filter-effects/filter-region-calc-001.html b/tests/wpt/web-platform-tests/css/filter-effects/filter-region-calc-001.html new file mode 100644 index 00000000000..7f894ef24bf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/filter-effects/filter-region-calc-001.html @@ -0,0 +1,23 @@ + +SVG Filters: <filter> with filter region using calc() for 'width' + + + + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/filter-effects/filter-region-units-001.html b/tests/wpt/web-platform-tests/css/filter-effects/filter-region-units-001.html new file mode 100644 index 00000000000..332ca1016ab --- /dev/null +++ b/tests/wpt/web-platform-tests/css/filter-effects/filter-region-units-001.html @@ -0,0 +1,23 @@ + +SVG Filters: <filter> with filter region using for 'width' w/ objectBoundingBox units + + + + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/mediaqueries/negation-001.html b/tests/wpt/web-platform-tests/css/mediaqueries/negation-001.html index 9badf8ee17f..eccfaa4338b 100644 --- a/tests/wpt/web-platform-tests/css/mediaqueries/negation-001.html +++ b/tests/wpt/web-platform-tests/css/mediaqueries/negation-001.html @@ -24,8 +24,9 @@ @media not (not (color)) { .test4 { background: green; } } + .test5 { background: green; } @media not ((unknown) or (monochrome)) { - .test5 { background: green; } + .test5 { background: red; } } diff --git a/tests/wpt/web-platform-tests/css/mediaqueries/test_media_queries.html b/tests/wpt/web-platform-tests/css/mediaqueries/test_media_queries.html index 06a9cd8cc56..6a91c1119dd 100644 --- a/tests/wpt/web-platform-tests/css/mediaqueries/test_media_queries.html +++ b/tests/wpt/web-platform-tests/css/mediaqueries/test_media_queries.html @@ -704,6 +704,31 @@ setup({ "explicit_done": true }); should_not_apply("not ((width) and (not (height)))"); query_should_not_be_parseable("not (width) and not (height)"); query_should_not_be_parseable("not not (width)"); + query_should_be_parseable("not unknown(width) "); + + testGroup = "three-valued logic" + should_not_apply("(unknown)"); + should_not_apply("not (unknown)"); + should_not_apply("((unknown) and (width))"); + should_not_apply("not ((unknown) and (width))"); + should_not_apply("((unknown) and (height))"); + should_apply("not ((unknown) and (height))"); + should_apply("((unknown) or (width))"); + should_not_apply("not ((unknown) or (width))"); + should_not_apply("((unknown) or (height))"); + should_not_apply("not ((unknown) or (height))"); + should_apply("(width) or (not ((unknown) and (width)))"); + should_not_apply("(width) and (not ((unknown) and (width)))"); + should_apply("(width) or (not ((unknown) or (width)))"); + should_not_apply("(width) and (not ((unknown) or (width)))"); + should_apply("(width) or (not ((unknown) and (height)))"); + should_apply("(width) and (not ((unknown) and (height)))"); + should_apply("(width) or (not ((unknown) or (height)))"); + should_not_apply("(width) and (not ((unknown) or (height)))"); + should_not_apply("unknown(width)"); + should_not_apply("not unknown(width)"); + should_apply("not (unknown(width) and (height))"); + should_not_apply("not (unknown(width) or (height))"); testGroup = "" done(); diff --git a/tests/wpt/web-platform-tests/css/selectors/dir-pseudo-in-has.html b/tests/wpt/web-platform-tests/css/selectors/dir-pseudo-in-has.html new file mode 100644 index 00000000000..3a3a0757a58 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/dir-pseudo-in-has.html @@ -0,0 +1,25 @@ + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+ + + diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/dir-pseudo-on-bdi-element.html b/tests/wpt/web-platform-tests/css/selectors/dir-pseudo-on-bdi-element.html similarity index 100% rename from tests/wpt/web-platform-tests/css/css-pseudo/dir-pseudo-on-bdi-element.html rename to tests/wpt/web-platform-tests/css/selectors/dir-pseudo-on-bdi-element.html diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/dir-pseudo-on-input-element.html b/tests/wpt/web-platform-tests/css/selectors/dir-pseudo-on-input-element.html similarity index 100% rename from tests/wpt/web-platform-tests/css/css-pseudo/dir-pseudo-on-input-element.html rename to tests/wpt/web-platform-tests/css/selectors/dir-pseudo-on-input-element.html diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/lang-pseudo-class-across-shadow-boundaries-ref.html b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries-ref.html similarity index 100% rename from tests/wpt/web-platform-tests/css/css-pseudo/lang-pseudo-class-across-shadow-boundaries-ref.html rename to tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries-ref.html diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/lang-pseudo-class-across-shadow-boundaries.html b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html similarity index 100% rename from tests/wpt/web-platform-tests/css/css-pseudo/lang-pseudo-class-across-shadow-boundaries.html rename to tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html diff --git a/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-disconnected.html b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-disconnected.html new file mode 100644 index 00000000000..30bb773a318 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-disconnected.html @@ -0,0 +1,24 @@ + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml new file mode 100644 index 00000000000..5765e0bae18 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/i18n/lang-pseudo-class-empty-attribute.xhtml @@ -0,0 +1,26 @@ + + + + + + +

Tests if empty language declarations are supported

+

+ + + +

+ + + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/dir-pseudo-class-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/dir-pseudo-class-in-has.html new file mode 100644 index 00000000000..0f5d0726567 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/dir-pseudo-class-in-has.html @@ -0,0 +1,36 @@ + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+ + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html new file mode 100644 index 00000000000..93ece465dd5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-document-element.html @@ -0,0 +1,27 @@ + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html new file mode 100644 index 00000000000..5dbe9c711a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html @@ -0,0 +1,32 @@ + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml new file mode 100644 index 00000000000..3a421c2e120 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has-xhtml.xhtml @@ -0,0 +1,43 @@ + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+ + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has.html new file mode 100644 index 00000000000..83404fcbc74 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/lang-pseudo-class-in-has.html @@ -0,0 +1,38 @@ + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+ + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html new file mode 100644 index 00000000000..62b18c1e0ef --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html @@ -0,0 +1,79 @@ + + +:has() invalidation with :buffering & :stalled pseudo-classes + + + + + + +
+ +
+ + + + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html new file mode 100644 index 00000000000..4dc7247e41e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html @@ -0,0 +1,12 @@ + + +CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S + + +
+
+
+
Should be green
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html new file mode 100644 index 00000000000..7266cd5a251 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html @@ -0,0 +1,23 @@ + + +CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S + + + + +
+
+
+
Should be green
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root-ref.html new file mode 100644 index 00000000000..f28d358cdc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root-ref.html @@ -0,0 +1,9 @@ + +CSS Selectors Invalidation: :nth-child(... of class) within shadow root + + +
+
No green
+
No green
+
Should be green
+
diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root.html new file mode 100644 index 00000000000..dfe2c36a5a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-in-shadow-root.html @@ -0,0 +1,22 @@ + +CSS Selectors Invalidation: :nth-child(... of class) within shadow root + + + + +
+ +
+ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting-ref.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting-ref.html new file mode 100644 index 00000000000..cdd66ed3027 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting-ref.html @@ -0,0 +1,17 @@ + + + +

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+ + diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html new file mode 100644 index 00000000000..851260623d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html @@ -0,0 +1,28 @@ + + + +:nth-last-child nesting + + + + + + +

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+ + diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html new file mode 100644 index 00000000000..0dd18f2c4b9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html @@ -0,0 +1,28 @@ + + + +:nth-last-child nesting + + + + + + +

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+

White

+

Green

+

White

+

White

+ + diff --git a/tests/wpt/web-platform-tests/css/tools/requirements.txt b/tests/wpt/web-platform-tests/css/tools/requirements.txt index 15d49f4d298..1dd5c6e8384 100644 --- a/tests/wpt/web-platform-tests/css/tools/requirements.txt +++ b/tests/wpt/web-platform-tests/css/tools/requirements.txt @@ -2,7 +2,7 @@ # dependencies without making sure that the build script still works. Template-Python==0.1.post1 html5lib==1.1 -lxml==4.8.0 +lxml==4.9.1 mercurial==4.6.1 six==1.16.0 webencodings==0.5.1 diff --git a/tests/wpt/web-platform-tests/custom-elements/ElementInternals-accessibility.html b/tests/wpt/web-platform-tests/custom-elements/ElementInternals-accessibility.html index b823a9ddea8..8a8f1c9aea0 100644 --- a/tests/wpt/web-platform-tests/custom-elements/ElementInternals-accessibility.html +++ b/tests/wpt/web-platform-tests/custom-elements/ElementInternals-accessibility.html @@ -38,7 +38,7 @@ const properties = [ "ariaDescribedByElements", "ariaDetailsElements", "ariaDisabled", - "ariaErrorMessageElement", + "ariaErrorMessageElements", "ariaExpanded", "ariaFlowToElements", "ariaHasPopup", @@ -76,4 +76,5 @@ for (const property of properties) { assert_inherits(element.internals, property); }, property + " is defined in ElementInternals"); } +test(() => assert_false('ariaErrorMessageElement' in element.internals), 'ariaErrorMessageElement is not defined in ElementInternals') diff --git a/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor-customized-bulitins.html b/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor-customized-bulitins.html new file mode 100644 index 00000000000..9244dfe4adc --- /dev/null +++ b/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor-customized-bulitins.html @@ -0,0 +1,62 @@ + + + +Custom Elements: HTMLElement must allow subclassing + + + + + + + +
+ + + + diff --git a/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor.html b/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor.html index b52c8414709..12ceb566cb5 100644 --- a/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor.html +++ b/tests/wpt/web-platform-tests/custom-elements/HTMLElement-constructor.html @@ -184,47 +184,6 @@ test(function() { assert_equals(getCount, 0, "Should never have gotten .prototype"); }, 'HTMLElement constructor must not get .prototype until it finishes its extends sanity checks, calling proxy constructor directly'); -test(function() { - class SomeCustomElement extends HTMLElement {}; - var getCount = 0; - var countingProxy = new Proxy(SomeCustomElement, { - get: function(target, prop, receiver) { - if (prop == "prototype") { - ++getCount; - } - return Reflect.get(target, prop, receiver); - } - }); - customElements.define("failure-counting-element-2", countingProxy, - { extends: "button" }); - // define() gets the prototype of the constructor it's passed, so - // reset the counter. - getCount = 0; - assert_throws_js(TypeError, - function () { Reflect.construct(HTMLElement, [], countingProxy) }, - "Should not be able to construct an HTMLElement named 'button'"); - assert_equals(getCount, 0, "Should never have gotten .prototype"); -}, 'HTMLElement constructor must not get .prototype until it finishes its extends sanity checks, calling via Reflect'); - -test(function() { - class SomeCustomElement extends HTMLElement {}; - var getCount = 0; - var countingProxy = new Proxy(SomeCustomElement, { - get: function(target, prop, receiver) { - if (prop == "prototype") { - ++getCount; - } - return Reflect.get(target, prop, receiver); - } - }); - - // Purposefully don't register it. - assert_throws_js(TypeError, - function () { new countingProxy() }, - "Should not be able to construct an HTMLElement named 'button'"); - assert_equals(getCount, 0, "Should never have gotten .prototype"); -}, 'HTMLElement constructor must not get .prototype until it finishes its registration sanity checks, calling proxy constructor directly'); - test(function() { class SomeCustomElement extends HTMLElement {}; var getCount = 0; diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/AriaMixin-element-attributes.html b/tests/wpt/web-platform-tests/custom-elements/reactions/AriaMixin-element-attributes.html index 09e62b2d39c..eec6dee03b7 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/AriaMixin-element-attributes.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/AriaMixin-element-attributes.html @@ -55,7 +55,7 @@ testElementReflectAttribute('ariaActiveDescendantElement', 'aria-activedescendan testElementReflectAttribute('ariaControlsElements', 'aria-controls', [dummy1], [dummy2], 'ariaControlsElements in Element'); testElementReflectAttribute('ariaDescribedByElements', 'aria-describedby', [dummy1], [dummy2], 'ariaDescribedByElements in Element'); testElementReflectAttribute('ariaDetailsElements', 'aria-details', [dummy1], [dummy2], 'ariaDetailsElements in Element'); -testElementReflectAttribute('ariaErrorMessageElement', 'aria-errormessage', dummy1, dummy2, 'ariaErrorMessageElement in Element'); +testElementReflectAttribute('ariaErrorMessageElements', 'aria-errormessage', [dummy1], [dummy2], 'ariaErrorMessageElements in Element'); testElementReflectAttribute('ariaFlowToElements', 'aria-flowto', [dummy1], [dummy2], 'ariaFlowToElements in Element'); testElementReflectAttribute('ariaLabelledByElements', 'aria-labelledby', [dummy1], [dummy2], 'ariaLabelledByElements in Element') testElementReflectAttribute('ariaOwnsElements', 'aria-owns', [dummy1], [dummy2], 'ariaOwnsElements in Element') diff --git a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html index 010305775df..ab4a24a5ad5 100644 --- a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html +++ b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-click.html @@ -87,6 +87,22 @@ async_test(function(t) { // as above with child.dispatchEvent(new MouseEvent("click", {bubbles:true})) }, "pick the first with activation behavior ") +async_test(function(t) { + var input = document.createElement("input") + input.type = "radio" + dump.appendChild(input) + input.onclick = t.step_func(function() { + assert_false(input.checked, "input pre-click must not be triggered") + }) + var child = input.appendChild(document.createElement("input")) + child.type = "radio" + child.onclick = t.step_func(function() { + assert_true(child.checked, "child pre-click must be triggered") + }) + child.dispatchEvent(new MouseEvent("click", {bubbles:true})) + t.done() +}, "pick the first with activation behavior ") + async_test(function(t) { var input = document.createElement("input") input.type = "checkbox" @@ -173,6 +189,46 @@ async_test(function(t) { t.done() }, "disabled checkbox still has activation behavior, part 2") +async_test(function(t) { + var state = "start" + + var form = document.createElement("form") + form.onsubmit = t.step_func(() => { + if(state == "start" || state == "radio") { + state = "failure" + } else if(state == "form") { + state = "done" + } + return false + }) + dump.appendChild(form) + var button = form.appendChild(document.createElement("button")) + button.type = "submit" + var radio = button.appendChild(document.createElement("input")) + radio.type = "radio" + radio.onclick = t.step_func(() => { + if(state == "start") { + assert_unreached() + } else if(state == "radio") { + assert_true(radio.checked) + } + }) + radio.disabled = true + radio.click() + assert_equals(state, "start") + + state = "radio" + radio.disabled = false + radio.click() + assert_equals(state, "radio") + + state = "form" + button.click() + assert_equals(state, "done") + + t.done() +}, "disabled radio still has activation behavior") + async_test(function(t) { var input = document.createElement("input") input.type = "checkbox" diff --git a/tests/wpt/web-platform-tests/ecmascript/regexp-lookbehind.html b/tests/wpt/web-platform-tests/ecmascript/regexp-lookbehind.html new file mode 100644 index 00000000000..07156f570e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/ecmascript/regexp-lookbehind.html @@ -0,0 +1,206 @@ + + + +JavaScript RegExp lookbehind assertions: alternations + + + + diff --git a/tests/wpt/web-platform-tests/editing/data/multitest.js b/tests/wpt/web-platform-tests/editing/data/multitest.js index 135f133ebc3..9948c338b40 100644 --- a/tests/wpt/web-platform-tests/editing/data/multitest.js +++ b/tests/wpt/web-platform-tests/editing/data/multitest.js @@ -2853,4 +2853,17 @@ var browserTests = [ [true,true,true], {}], +// element should be reused when the font-size is change for new text. +["{}
", + [["stylewithcss","false"],["fontsize","4"],["insertText","a"]], + ["a[]
", + "a[]"], + [true,true,true], + {"fontsize":[false,false,"7",false,false,"4"]}], +["{}
", + [["stylewithcss","true"],["italic",""],["insertText","a"]], + ["a[]
", + "a[]"], + [true,true,true], + {}], ] diff --git a/tests/wpt/web-platform-tests/event-timing/event-click-visibilitychange.html b/tests/wpt/web-platform-tests/event-timing/event-click-visibilitychange.html new file mode 100644 index 00000000000..beb3ba3512d --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/event-click-visibilitychange.html @@ -0,0 +1,98 @@ + + + + +Event Timing: eventCounts. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fs/resources/message-target.html b/tests/wpt/web-platform-tests/fs/resources/message-target.html index 32c7f0c56c6..cdd86bcc663 100644 --- a/tests/wpt/web-platform-tests/fs/resources/message-target.html +++ b/tests/wpt/web-platform-tests/fs/resources/message-target.html @@ -5,7 +5,7 @@
Click.
div
", result: "Click.
div
", message: "dropAttributes list {\"*\": [\"a\"]} with style attribute"}, - {config_input: {dropAttributes: {}}, value: "

Click.

", result: "

Click.

", message: "empty dropAttributes list with id attribute"}, - {config_input: {dropAttributes: {"id": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"id\": [\"*\"]} with id attribute"}, - {config_input: {dropAttributes: {"data-attribute-with-dashes": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"data-attribute-with-dashes\": [\"*\"]} with dom dataset js access"}, - {config_input: {allowAttributes: {"id": ["div"]}}, value: "

P

DIV
", result: "

P

DIV
", message: "allowAttributes list {\"id\": [\"div\"]} with id attribute"}, - {config_input: {allowAttributes: {"id": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "allowAttributes list {\"id\": [\"*\"]} with id attribute and onclick scripts"}, - {config_input: {allowAttributes: {"*": ["a"]}}, value: "Click.
div
", result: "Click.
div
", message: "allowAttributes list {\"*\": [\"a\"]} with style attribute"}, - {config_input: {dropAttributes: {"style": ["*"]}, allowAttributes: {"style": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "allowAttributes list has no influence to dropAttributes"}, + {config_input: {dropAttributes: [{name: "style", elements: ["p"]}]}, value: "

Click.

div
", result: "

Click.

div
", message: "dropAttributes list {\"style\": [\"p\"]} with style attribute"}, + // {config_input: {dropAttributes: [{name: "*": ["a"]}}, value: "Click.
div
", result: "Click.
div
", message: "dropAttributes list {\"*\": [\"a\"]} with style attribute"}, + {config_input: {dropAttributes: []}, value: "

Click.

", result: "

Click.

", message: "empty dropAttributes list with id attribute"}, + {config_input: {dropAttributes: [{name: "id", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"id\": [\"*\"]} with id attribute"}, + {config_input: {dropAttributes: [{name: "data-attribute-with-dashes", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"data-attribute-with-dashes\": [\"*\"]} with dom dataset js access"}, + {config_input: {allowAttributes: [{name: "id", elements: ["div"]}]}, value: "

P

DIV
", result: "

P

DIV
", message: "allowAttributes list {\"id\": [\"div\"]} with id attribute"}, + {config_input: {allowAttributes: [{name: "id", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "allowAttributes list {\"id\": [\"*\"]} with id attribute and onclick scripts"}, + // {config_input: {allowAttributes: {"*": ["a"]}}, value: "Click.
div
", result: "Click.
div
", message: "allowAttributes list {\"*\": [\"a\"]} with style attribute"}, + {config_input: {dropAttributes: [{name: "style", elements: "*"}], allowAttributes: [{name: "style", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "allowAttributes list has no influence to dropAttributes"}, {config_input: {allowElements: ["template", "div"]}, value: "", result: "", message: "Template element"}, {config_input: {}, value: "Click.", result: "Click.", message: "HTMLAnchorElement with javascript protocal"}, {config_input: {}, value: "Click.", result: "Click.", message: "HTMLAnchorElement with javascript protocal start with space"}, @@ -68,21 +68,21 @@ const testcases = [ {config_input: {dropElements: ["I", "DL"]}, value: "
balabala
test
", result: "
balabala
test
", message: "dropElements list [\"I\", \"DL\"]}"}, {config_input: {dropElements: ["i", "dl"]}, value: "
balabala
test
", result: "
balabala
", message: "dropElements list [\"i\", \"dl\"]}"}, {config_input: {dropElements: ["i", "dl"]}, value: "
balabala
test
", result: "
balabala
", message: "dropElements list [\"i\", \"dl\"]} with uppercase HTML"}, - {config_input: {dropAttributes: {"ID": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"ID\": [\"*\"]} with id attribute"}, - {config_input: {dropAttributes: {"ID": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"ID\": [\"*\"]} with ID attribute"}, - {config_input: {dropAttributes: {"id": ["*"]}}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"id\": [\"*\"]} with ID attribute"}, + {config_input: {dropAttributes: [{name: "ID", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"ID\": [\"*\"]} with id attribute"}, + {config_input: {dropAttributes: [{name: "ID", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"ID\": [\"*\"]} with ID attribute"}, + {config_input: {dropAttributes: [{name: "id", elements: "*"}]}, value: "

Click.

", result: "

Click.

", message: "dropAttributes list {\"id\": [\"*\"]} with ID attribute"}, // allowUnknownMarkup for elements (with and without) - {config_input: {dropElements: [123, [], "test", "i", "custom-element"]}, value: "
balabalatest
tcustom-element", result: "
balabala
", message: "dropElements with unknown elements and without allowUnknownMarkup"}, - {config_input: {blockElements: [123, [], "test", "i", "custom-element"]}, value: "
balabalatest
tcustom-element", result: "
balabalatest
", message: "blockElements with unknown elements and without allowUnknownMarkup"}, + {config_input: {dropElements: [123, "test", "i", "custom-element"]}, value: "
balabalatest
tcustom-element", result: "
balabala
", message: "dropElements with unknown elements and without allowUnknownMarkup"}, + {config_input: {blockElements: [123, "test", "i", "custom-element"]}, value: "
balabalatest
tcustom-element", result: "
balabalatest
", message: "blockElements with unknown elements and without allowUnknownMarkup"}, {config_input: {allowElements: ["p", "test"]}, value: "
test
p
tt

div

test", result: "testptt

div

", message: "allowElements with unknown elements and without allowUnknownMarkup"}, - {config_input: {dropElements: [123, [], "test", "i", "custom-element"], allowUnknownMarkup: true}, value: "
balabalatest
tcustom-element", result: "
balabala
", message: "dropElements with unknown elements and with allowUnknownMarkup"}, - {config_input: {blockElements: [123, [], "test", "i", "custom-element"], allowUnknownMarkup: true}, value: "
balabalatest
tcustom-element", result: "
balabalatest
t", message: "blockElements with unknown elements and with allowUnknownMarkup"}, + {config_input: {dropElements: [123, "test", "i", "custom-element"], allowUnknownMarkup: true}, value: "
balabalatest
tcustom-element", result: "
balabala
", message: "dropElements with unknown elements and with allowUnknownMarkup"}, + {config_input: {blockElements: [123, "test", "i", "custom-element"], allowUnknownMarkup: true}, value: "
balabalatest
tcustom-element", result: "
balabalatest
t", message: "blockElements with unknown elements and with allowUnknownMarkup"}, {config_input: {allowElements: ["p", "test"], allowUnknownMarkup: true}, value: "
test
p
tt

div

test
", result: "testptt

div

test", message: "allowElements with unknown elements and with allowUnknownMarkup"}, // allowUnknownMarkup for attributes (with and without) - {config_input: {allowAttributes: {"hello": ["*"], "world": ["b"]}}, value: "
", result: "
", message: "allowAttributes unknown attributes and without allowUnknownMarkup"}, - {config_input: {allowAttributes: {"hello": ["*"], "world": ["b"]}, allowUnknownMarkup: true}, value: "
", result: "
", message: "allowAttributes unknown attributes and with allowUnknownMarkup"}, - {config_input: {dropAttributes: {"hello": ["*"], "world": ["b"]}}, value: "
", result: "
", message: "dropAttributes unknown attributes and without allowUnknownMarkup"}, - {config_input: {dropAttributes: {"hello": ["*"], "world": ["b"]}, allowUnknownMarkup: true}, value: "
", result: "
", message: "dropAttributes unknown attributes and with allowUnknownMarkup"}, + {config_input: {allowAttributes: [{name: "hello", elements: "*"}, {name: "world", elements: ["b"]}]}, value: "
", result: "
", message: "allowAttributes unknown attributes and without allowUnknownMarkup"}, + {config_input: {allowAttributes: [{name: "hello", elements: "*"}, {name: "world", elements: ["b"]}], allowUnknownMarkup: true}, value: "
", result: "
", message: "allowAttributes unknown attributes and with allowUnknownMarkup"}, + {config_input: {dropAttributes: [{name: "hello", elements: "*"}, {name:"world", elements: ["b"]}]}, value: "
", result: "
", message: "dropAttributes unknown attributes and without allowUnknownMarkup"}, + {config_input: {dropAttributes: [{name: "hello", elements: "*"}, {name:"world", elements: ["b"]}], allowUnknownMarkup: true}, value: "
", result: "
", message: "dropAttributes unknown attributes and with allowUnknownMarkup"}, ]; diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-delay-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-delay-animation.html deleted file mode 100644 index dfb0e59f5d7..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-delay-animation.html +++ /dev/null @@ -1,144 +0,0 @@ - -Animations using named timeline ranges - - - - - - -
-
- - diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js index 969f282e678..12693c35d76 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js @@ -32,13 +32,13 @@ function CreateViewTimelineOpacityAnimation(test, target, options) { // the animation. // // Sample call: -// await runTimelineRangeTest(t, { +// await runTimelineBoundsTest(t, { // timeline: { inset: [ CSS.percent(0), CSS.percent(20)] }, // timing: { fill: 'both' } -// rangeStart: 600, -// rangeEnd: 900 +// startOffset: 600, +// endOffset: 900 // }); -async function runTimelineRangeTest(t, options, message) { +async function runTimelineBoundsTest(t, options, message) { container.scrollLeft = 0; await waitForNextFrame(); @@ -52,19 +52,19 @@ async function runTimelineRangeTest(t, options, message) { await anim.ready; // Advance to the start offset, which triggers entry to the active phase. - container.scrollLeft = options.rangeStart; + container.scrollLeft = options.startOffset; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity, '0.3', `Effect at the start of the active phase: ${message}`); // Advance to the midpoint of the animation. - container.scrollLeft = (options.rangeStart + options.rangeEnd) / 2; + container.scrollLeft = (options.startOffset + options.endOffset) / 2; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity,'0.5', `Effect at the midpoint of the active range: ${message}`); // Advance to the end of the animation. - container.scrollLeft = options.rangeEnd; + container.scrollLeft = options.endOffset; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity, '0.7', `Effect is in the active phase at effect end time: ${message}`); @@ -73,51 +73,51 @@ async function runTimelineRangeTest(t, options, message) { return anim; } -// Sets the start and end delays for a view timeline and ensures that the +// Sets the start and end range for a view timeline and ensures that the // range aligns with expected values. // // Sample call: -// await runTimelineDelayTest(t, { -// delay: { phase: 'cover', percent: CSS.percent(0) } , -// endDelay: { phase: 'cover', percent: CSS.percent(100) }, -// rangeStart: 600, -// rangeEnd: 900 +// await runTimelineRangeTest(t, { +// rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , +// rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, +// startOffset: 600, +// endOffset: 900 // }); -async function runTimelineDelayTest(t, options) { - const delayToString = delay => { +async function runTimelineRangeTest(t, options) { + const rangeToString = range => { const parts = []; - if (delay.phase) - parts.push(delay.phase); - if (delay.percent) - parts.push(`${delay.percent.value}%`); + if (range.rangeName) + parts.push(range.rangeName); + if (range.offset) + parts.push(`${range.offset.value}%`); return parts.join(' '); }; const range = - `${delayToString(options.delay)} to ` + - `${delayToString(options.endDelay)}`; + `${rangeToString(options.rangeStart)} to ` + + `${rangeToString(options.rangeEnd)}`; options.timeline = { axis: 'inline' }; options.timing = { - delay: options.delay, - endDelay: options.endDelay, + rangeStart: options.rangeStart, + rangeEnd: options.rangeEnd, // Set fill to accommodate floating point precision errors at the // endpoints. fill: 'both' }; - return runTimelineRangeTest(t, options, range); + return runTimelineBoundsTest(t, options, range); } // Sets the Inset for a view timeline and ensures that the range aligns with // expected values. // // Sample call: -// await runTimelineDelayTest(t, { +// await runTimelineInsetTest(t, { // inset: [ CSS.px(20), CSS.px(40) ] -// rangeStart: 600, -// rangeEnd: 900 +// startOffset: 600, +// endOffset: 900 // }); async function runTimelineInsetTest(t, options) { options.timeline = { @@ -133,5 +133,5 @@ async function runTimelineInsetTest(t, options) { const range = (options.inset instanceof Array) ? options.inset.join(' ') : options.inset; - return runTimelineRangeTest(t, options, range); + return runTimelineBoundsTest(t, options, range); } diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay-large-subject.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay-large-subject.html deleted file mode 100644 index edb37c1379c..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay-large-subject.html +++ /dev/null @@ -1,93 +0,0 @@ - - - -View timeline delay - - - - - - - - -
-
-
-
-
-
-
- - diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-inset.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-inset.html index 72480ea9f3c..357d8558f94 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-inset.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-inset.html @@ -61,24 +61,24 @@ promise_test(async t => { // These tests are all based on the cover range, which has bounds // [600, 900] if there are no insets. - // rangeStart = target_pos - viewport_size + end_side_inset - // = 600 + end_side_inset - // rangeEnd = target_pos + target_size - start_side_inset - // = 900 - start_side_inset + // startOffset = target_pos - viewport_size + end_side_inset + // = 600 + end_side_inset + // endOffset = target_pos + target_size - start_side_inset + // = 900 - start_side_inset await runTimelineInsetTest(t, { inset: [ CSS.px(0), CSS.px(0) ], - rangeStart: 600, - rangeEnd: 900 + startOffset: 600, + endOffset: 900 }).then(anim => verifyTimelineOffsets(anim, 600, 900)); await runTimelineInsetTest(t, { inset: [ CSS.px(10), CSS.px(20) ], - rangeStart: 620, - rangeEnd: 890 + startOffset: 620, + endOffset: 890 }).then(anim => verifyTimelineOffsets(anim, 620, 890)); await runTimelineInsetTest(t, { inset: [ CSS.px(10) ], - rangeStart: 610, - rangeEnd: 890 + startOffset: 610, + endOffset: 890 }).then(anim => verifyTimelineOffsets(anim, 610, 890)); }, 'View timeline with px based inset.'); @@ -89,18 +89,18 @@ // test. await runTimelineInsetTest(t, { inset: [ CSS.percent(0), CSS.percent(0) ], - rangeStart: 600, - rangeEnd: 900 + startOffset: 600, + endOffset: 900 }).then(anim => verifyTimelineOffsets(anim, 600, 900)); await runTimelineInsetTest(t, { inset: [ CSS.percent(10), CSS.percent(20) ], - rangeStart: 640, - rangeEnd: 880 + startOffset: 640, + endOffset: 880 }).then(anim => verifyTimelineOffsets(anim, 640, 880)); await runTimelineInsetTest(t, { inset: [ CSS.percent(10) ], - rangeStart: 620, - rangeEnd: 880 + startOffset: 620, + endOffset: 880 }).then(anim => verifyTimelineOffsets(anim, 620, 880)); }, 'View timeline with percent based inset.'); @@ -110,15 +110,15 @@ }); const anim = await runTimelineInsetTest(t, { inset: [ "auto", "auto" ], - rangeStart: 600, - rangeEnd: 900 + startOffset: 600, + endOffset: 900 }); verifyTimelineOffsets(anim, 600, 900); container.classList.add('scroll-padded'); - await runTimelineRangeTest(t, { + await runTimelineBoundsTest(t, { anim: anim, - rangeStart: 620, - rangeEnd: 890, + startOffset: 620, + endOffset: 890, }, 'Adjust for scroll-padding') .then(anim => verifyTimelineOffsets(anim, 620, 890)); }, 'view timeline with inset auto.'); @@ -129,15 +129,15 @@ promise_test(async t => { }); const anim = await runTimelineInsetTest(t, { inset: [ CSS.em(1), CSS.em(2) ], - rangeStart: 632, - rangeEnd: 884 + startOffset: 632, + endOffset: 884 }); verifyTimelineOffsets(anim, 632, 884); target.classList.add('big-font'); - await runTimelineRangeTest(t, { + await runTimelineBoundsTest(t, { anim: anim, - rangeStart: 640, - rangeEnd: 880, + startOffset: 640, + endOffset: 880, }, 'Adjust for font size increase') .then(anim => verifyTimelineOffsets(anim, 640, 880)); }, 'view timeline with font relative inset.'); @@ -148,46 +148,46 @@ promise_test(async t => { const vmin = Math.min(vw, vh); await runTimelineInsetTest(t, { inset: [ CSS.vw(10), CSS.vw(20) ], - rangeStart: 600 + 0.2 * vw, - rangeEnd: 900 - 0.1 * vw + startOffset: 600 + 0.2 * vw, + endOffset: 900 - 0.1 * vw }); await runTimelineInsetTest(t, { inset: [ CSS.vmin(10), CSS.vmin(20) ], - rangeStart: 600 + 0.2 * vmin, - rangeEnd: 900 - 0.1 * vmin + startOffset: 600 + 0.2 * vmin, + endOffset: 900 - 0.1 * vmin }); }, 'view timeline with viewport relative insets.'); promise_test(async t => { await runTimelineInsetTest(t, { inset: "10px", - rangeStart: 610, - rangeEnd: 890 + startOffset: 610, + endOffset: 890 }); await runTimelineInsetTest(t, { inset: "10px 20px", - rangeStart: 620, - rangeEnd: 890 + startOffset: 620, + endOffset: 890 }); await runTimelineInsetTest(t, { inset: "10%", - rangeStart: 620, - rangeEnd: 880 + startOffset: 620, + endOffset: 880 }); await runTimelineInsetTest(t, { inset: "10% 20%", - rangeStart: 640, - rangeEnd: 880 + startOffset: 640, + endOffset: 880 }); await runTimelineInsetTest(t, { inset: "auto", - rangeStart: 600, - rangeEnd: 900 + startOffset: 600, + endOffset: 900 }); await runTimelineInsetTest(t, { inset: "1em 2em", - rangeStart: 632, - rangeEnd: 884 + startOffset: 632, + endOffset: 884 }); assert_throws_js(TypeError, () => { new ViewTimeline({ diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-missing-subject.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-missing-subject.html new file mode 100644 index 00000000000..01ca0215246 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-missing-subject.html @@ -0,0 +1,54 @@ + + + + +ViewTimeline with missing subject + + + + + + +
+
+
+
+ + + diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html new file mode 100644 index 00000000000..5a7416eb54d --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html @@ -0,0 +1,93 @@ + + + +View timeline delay + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range.html similarity index 56% rename from tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay.html rename to tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range.html index 1377dc339c3..916b4c12bb7 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-delay.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-range.html @@ -52,51 +52,51 @@ assert_px_equals(timeline.startOffset, 600, 'startOffset'); assert_px_equals(timeline.endOffset, 900, 'endOffset'); }; - await runTimelineDelayTest(t, { - delay: { phase: 'cover', percent: CSS.percent(0) } , - endDelay: { phase: 'cover', percent: CSS.percent(100) }, - rangeStart: 600, - rangeEnd: 900 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: 600, + endOffset: 900 }).then(anim => { verifyTimelineOffsets(anim); }); - await runTimelineDelayTest(t, { - delay: { phase: 'contain', percent: CSS.percent(0) } , - endDelay: { phase: 'contain', percent: CSS.percent(100) }, - rangeStart: 700, - rangeEnd: 800 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: 700, + endOffset: 800 }).then(anim => { verifyTimelineOffsets(anim); }); - await runTimelineDelayTest(t, { - delay: { phase: 'enter', percent: CSS.percent(0) }, - endDelay: { phase: 'enter', percent: CSS.percent(100) }, - rangeStart: 600, - rangeEnd: 700 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'enter', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'enter', offset: CSS.percent(100) }, + startOffset: 600, + endOffset: 700 }); - await runTimelineDelayTest(t, { - delay: { phase: 'exit', percent: CSS.percent(0) }, - endDelay: { phase: 'exit', percent: CSS.percent(100) }, - rangeStart: 800, - rangeEnd: 900 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: 800, + endOffset: 900 }); - await runTimelineDelayTest(t, { - delay: { phase: 'contain', percent: CSS.percent(-50) }, - endDelay: { phase: 'enter', percent: CSS.percent(200) }, - rangeStart: 650, - rangeEnd: 800 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(-50) }, + rangeEnd: { rangeName: 'enter', offset: CSS.percent(200) }, + startOffset: 650, + endOffset: 800 }); - await runTimelineDelayTest(t, { - delay: { phase: 'enter' }, - endDelay: { phase: 'exit' }, - rangeStart: 600, - rangeEnd: 900 + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'enter' }, + rangeEnd: { rangeName: 'exit' }, + startOffset: 600, + endOffset: 900 }); - await runTimelineDelayTest(t, { - delay: { percent: CSS.percent(0) }, - endDelay: { percent: CSS.percent(100) }, - rangeStart: 600, - rangeEnd: 900 + await runTimelineRangeTest(t, { + rangeStart: { offset: CSS.percent(0) }, + rangeEnd: { offset: CSS.percent(100) }, + startOffset: 600, + endOffset: 900 }); }, 'View timeline with range set via delays.' ); diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html index b438317f7c5..553facb52fa 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html @@ -37,8 +37,8 @@ promise_test(async t => { const options = { axis: 'vertical', timing: { - delay: { phase: 'enter', percent: CSS.percent(0) }, - endDelay: { phase: 'enter', percent: CSS.percent(100) }, + rangeStart: { rangeName: 'enter', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'enter', offset: CSS.percent(100) }, // Set fill to accommodate floating point precision errors at the endpoints. fill: 'both' } @@ -48,6 +48,7 @@ promise_test(async t => { await waitForNextFrame(); const anim = CreateViewTimelineOpacityAnimation(t, target, options); + const timeline = anim.timeline; anim.effect.updateTiming(options.timing); await anim.ready; diff --git a/tests/wpt/web-platform-tests/selection/crashtests/selection-clip-crash.html b/tests/wpt/web-platform-tests/selection/crashtests/selection-clip-crash.html new file mode 100644 index 00000000000..66d10b47424 --- /dev/null +++ b/tests/wpt/web-platform-tests/selection/crashtests/selection-clip-crash.html @@ -0,0 +1,31 @@ + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html b/tests/wpt/web-platform-tests/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html index 543b46c535a..fdbb6171353 100644 --- a/tests/wpt/web-platform-tests/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html +++ b/tests/wpt/web-platform-tests/speculation-rules/prefetch/no-vary-search/prefetch-single.https.html @@ -27,7 +27,11 @@ - + + + + + @@ -273,6 +277,34 @@ navigateQuery: "", shouldUsePrefetch: true}, + {description:"Use the prefetched URL. Non-ASCII key - 2 UTF-8 code units." + + " Don't vary the response on the non-ASCII key.", + noVarySearch: 'params=("%C2%A2")', + prefetchQuery: "¢=3", + navigateQuery: "¢=4", + shouldUsePrefetch: true}, + + {description:"Use the prefetched URL. Non-ASCII key - 2 UTF-8 code units." + + " Don't vary the response on the non-ASCII key.", + noVarySearch: 'params=("%C2%A2")', + prefetchQuery: "a=2&¢=3", + navigateQuery: "¢=4&a=2", + shouldUsePrefetch: true}, + + {description:"Don't use the prefetched URL. Non-ASCII key - 2 UTF-8 code units." + + " Vary the response on the non-ASCII key.", + noVarySearch: 'params, except=("%C2%A2")', + prefetchQuery: "¢=3", + navigateQuery: "¢=4", + shouldUsePrefetch: false}, + + {description:"Use the prefetched URL. Non-ASCII key - 2 UTF-8 code units." + + " Vary the response on the non-ASCII key.", + noVarySearch: 'params, except=("%C2%A2")', + prefetchQuery: "¢=3&a=4", + navigateQuery: "a=5&¢=3", + shouldUsePrefetch: true}, + ].forEach(({description, noVarySearch, prefetchQuery, navigateQuery, shouldUsePrefetch}) => { subsetTest(prefetch_no_vary_search_test, description, noVarySearch, prefetchQuery, navigateQuery, diff --git a/tests/wpt/web-platform-tests/speculation-rules/prefetch/resources/utils.sub.js b/tests/wpt/web-platform-tests/speculation-rules/prefetch/resources/utils.sub.js index ea70939aff0..aaa73c2135d 100644 --- a/tests/wpt/web-platform-tests/speculation-rules/prefetch/resources/utils.sub.js +++ b/tests/wpt/web-platform-tests/speculation-rules/prefetch/resources/utils.sub.js @@ -157,6 +157,7 @@ function insertDocumentRule(predicate, extra_options={}) { insertSpeculationRules({ prefetch: [{ source: 'document', + eagerness: 'eager', where: predicate, ...extra_options }] diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt index 0c67c0805a0..7189b7b58f9 100644 --- a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt +++ b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt @@ -1,4 +1,4 @@ pygithub==1.56 pyyaml==6.0 requests==2.27.1 -taskcluster==44.22.1 +taskcluster==47.0.2 diff --git a/tests/wpt/web-platform-tests/tools/requirements_tests.txt b/tests/wpt/web-platform-tests/tools/requirements_tests.txt index 4e1e357d28e..4d8f2a5d223 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_tests.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_tests.txt @@ -2,4 +2,4 @@ httpx[http2]==0.22.0 json-e==4.4.3 jsonschema==3.2.0 pyyaml==6.0 -taskcluster==44.22.1 +taskcluster==47.0.2 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index dea3bbaa0a0..58641393b83 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -6,4 +6,4 @@ mozprocess==1.3.0 pillow==8.4.0 requests==2.27.1 six==1.16.0 -urllib3[secure]==1.26.9 +urllib3[secure]==1.26.14 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index 222c91622d2..1f9033c09fe 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -1,6 +1,6 @@ marionette_driver==3.1.0 mozcrash==2.1.0 -mozdevice==4.0.3 +mozdevice==4.1.0 mozinstall==2.0.1 mozleak==0.2 mozprofile==2.5.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py index d57804f977a..d0bf0a38ea3 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py @@ -93,19 +93,20 @@ class ServoBrowser(NullBrowser): class ServoWdspecBrowser(WebDriverBrowser): # TODO: could share an implemenation with servodriver.py, perhaps - def __init__(self, logger, binary="servo", webdriver_args=None, - binary_args=None, host="127.0.0.1", env=None, port=None): + def __init__(self, logger, binary="servo", webdriver_binary="servo", + binary_args=None, webdriver_args=None, env=None, port=None, + **kwargs): env = os.environ.copy() if env is None else env env["RUST_BACKTRACE"] = "1" super().__init__(logger, - binary, - None, + binary=binary, + webdriver_binary=webdriver_binary, webdriver_args=webdriver_args, - host=host, port=port, - env=env) + env=env, + **kwargs) self.binary_args = binary_args def make_command(self): diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py index 8038a78df85..1fac29a6a7f 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py @@ -414,7 +414,7 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): stream_queues[frame.stream_id] = (self.start_stream_thread(frame, queue), queue) stream_queues[frame.stream_id][1].put(frame) - if isinstance(frame, StreamEnded) or (hasattr(frame, "stream_ended") and frame.stream_ended): + if isinstance(frame, StreamEnded) or getattr(frame, "stream_ended", False): del stream_queues[frame.stream_id] except OSError as e: @@ -470,71 +470,71 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): if frame is None: return + # Needs to be unbuffered for websockets. rfile, wfile = os.pipe() - rfile, wfile = os.fdopen(rfile, 'rb'), os.fdopen(wfile, 'wb', 0) # needs to be unbuffer for websockets - stream_handler = H2HandlerCopy(self, frame, rfile) + with os.fdopen(rfile, 'rb') as rfile, os.fdopen(wfile, 'wb', 0) as wfile: + stream_handler = H2HandlerCopy(self, frame, rfile) - h2request = H2Request(stream_handler) - h2response = H2Response(stream_handler, h2request) + h2request = H2Request(stream_handler) + h2response = H2Response(stream_handler, h2request) - dispatcher = dispatch.Dispatcher(self.server.ws_doc_root, None, False) - if not dispatcher.get_handler_suite(stream_handler.path): - h2response.set_error(404) - h2response.write() - return + dispatcher = dispatch.Dispatcher(self.server.ws_doc_root, None, False) + if not dispatcher.get_handler_suite(stream_handler.path): + h2response.set_error(404) + h2response.write() + return - request_wrapper = _WebSocketRequest(stream_handler, h2response) + request_wrapper = _WebSocketRequest(stream_handler, h2response) - handshaker = WsH2Handshaker(request_wrapper, dispatcher) - try: - handshaker.do_handshake() - except HandshakeException as e: - self.logger.info('Handshake failed for error: %s' % e) - h2response.set_error(e.status) - h2response.write() - return - except AbortedByUserException: - h2response.write() - return - - # h2 Handshaker prepares the headers but does not send them down the - # wire. Flush the headers here. - try: - h2response.write_status_headers() - except StreamClosedError: - # work around https://github.com/web-platform-tests/wpt/issues/27786 - # The stream was already closed. - return - - request_wrapper._dispatcher = dispatcher - - # we need two threads: - # - one to handle the frame queue - # - one to handle the request (dispatcher.transfer_data is blocking) - # the alternative is to have only one (blocking) thread. That thread - # will call transfer_data. That would require a special case in - # handle_one_request, to bypass the queue and write data to wfile - # directly. - t = threading.Thread( - target=Http2WebTestRequestHandler._stream_ws_sub_thread, - args=(self, request_wrapper, stream_handler, queue) - ) - t.start() - - while not self.close_connection: + handshaker = WsH2Handshaker(request_wrapper, dispatcher) try: - frame = queue.get(True, 1) - except Empty: - continue + handshaker.do_handshake() + except HandshakeException as e: + self.logger.info('Handshake failed for error: %s' % e) + h2response.set_error(e.status) + h2response.write() + return + except AbortedByUserException: + h2response.write() + return - if isinstance(frame, DataReceived): - wfile.write(frame.data) - if frame.stream_ended: - raise NotImplementedError("frame.stream_ended") - wfile.close() - elif frame is None or isinstance(frame, (StreamReset, StreamEnded, ConnectionTerminated)): - self.logger.debug(f'({self.uid} - {stream_id}) Stream Reset, Thread Closing') - break + # h2 Handshaker prepares the headers but does not send them down the + # wire. Flush the headers here. + try: + h2response.write_status_headers() + except StreamClosedError: + # work around https://github.com/web-platform-tests/wpt/issues/27786 + # The stream was already closed. + return + + request_wrapper._dispatcher = dispatcher + + # we need two threads: + # - one to handle the frame queue + # - one to handle the request (dispatcher.transfer_data is blocking) + # the alternative is to have only one (blocking) thread. That thread + # will call transfer_data. That would require a special case in + # handle_one_request, to bypass the queue and write data to wfile + # directly. + t = threading.Thread( + target=Http2WebTestRequestHandler._stream_ws_sub_thread, + args=(self, request_wrapper, stream_handler, queue) + ) + t.start() + + while not self.close_connection: + try: + frame = queue.get(True, 1) + except Empty: + continue + + if isinstance(frame, DataReceived): + wfile.write(frame.data) + if frame.stream_ended: + raise NotImplementedError("frame.stream_ended") + elif frame is None or isinstance(frame, (StreamReset, StreamEnded, ConnectionTerminated)): + self.logger.error(f'({self.uid} - {stream_id}) Stream Reset, Thread Closing') + break t.join() @@ -568,9 +568,11 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): # The file-like pipe object that will be used to share data to request object if data is received wfile = None + rfile = None request = None response = None req_handler = None + while not self.close_connection: try: frame = queue.get(True, 1) @@ -579,10 +581,14 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): continue self.logger.debug(f'({self.uid} - {stream_id}) {str(frame)}') - if isinstance(frame, RequestReceived): - rfile, wfile = os.pipe() - rfile, wfile = os.fdopen(rfile, 'rb'), os.fdopen(wfile, 'wb') + if rfile: + rfile.close() + if wfile: + wfile.close() + + pipe_rfile, pipe_wfile = os.pipe() + (rfile, wfile) = os.fdopen(pipe_rfile, 'rb'), os.fdopen(pipe_wfile, 'wb') stream_handler = H2HandlerCopy(self, frame, rfile) @@ -605,8 +611,6 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): if hasattr(req_handler, 'handle_data'): req_handler.handle_data(frame, request, response) - if frame.stream_ended: - wfile.close() elif frame is None or isinstance(frame, (StreamReset, StreamEnded, ConnectionTerminated)): self.logger.debug(f'({self.uid} - {stream_id}) Stream Reset, Thread Closing') break @@ -614,13 +618,18 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler): if request is not None: request.frames.append(frame) - if hasattr(frame, "stream_ended") and frame.stream_ended: + if getattr(frame, "stream_ended", False): try: self.finish_handling(request, response, req_handler) except StreamClosedError: self.logger.debug('(%s - %s) Unable to write response; stream closed' % - (self.uid, stream_id)) - break + (self.uid, stream_id)) + break + + if rfile: + rfile.close() + if wfile: + wfile.close() def frame_handler(self, request, response, handler): try: diff --git a/tests/wpt/web-platform-tests/url/historical.any.js b/tests/wpt/web-platform-tests/url/historical.any.js index c3067dfd730..cbeb36a63f2 100644 --- a/tests/wpt/web-platform-tests/url/historical.any.js +++ b/tests/wpt/web-platform-tests/url/historical.any.js @@ -28,4 +28,12 @@ test(function() { assert_equals(URL.domainToUnicode, undefined); }, "URL.domainToUnicode should be undefined"); +test(() => { + assert_throws_dom("DataCloneError", () => self.structuredClone(new URL("about:blank"))); +}, "URL: no structured serialize/deserialize support"); + +test(() => { + assert_throws_dom("DataCloneError", () => self.structuredClone(new URLSearchParams())); +}, "URLSearchParams: no structured serialize/deserialize support"); + done(); diff --git a/tests/wpt/web-platform-tests/url/resources/toascii.json b/tests/wpt/web-platform-tests/url/resources/toascii.json index b9ceea31067..4cb41e94cd4 100644 --- a/tests/wpt/web-platform-tests/url/resources/toascii.json +++ b/tests/wpt/web-platform-tests/url/resources/toascii.json @@ -61,6 +61,10 @@ "input": "xn--a.ß", "output": null }, + { + "input": "xn--ls8h=", + "output": null + }, { "comment": "Invalid Punycode (contains non-ASCII character)", "input": "xn--tešla", @@ -172,5 +176,18 @@ { "input": "xn--", "output": null + }, + { + "comment": "Interesting UseSTD3ASCIIRules=false cases", + "input": "≠", + "output": "xn--1ch" + }, + { + "input": "≮", + "output": "xn--gdh" + }, + { + "input": "≯", + "output": "xn--hdh" } ] diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/display.tentative.html b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/display.tentative.html new file mode 100644 index 00000000000..6b28dcd9648 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/display.tentative.html @@ -0,0 +1,34 @@ + + +Animation type for the 'display' property + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webauthn/createcredential-extensions.https.html b/tests/wpt/web-platform-tests/webauthn/createcredential-extensions.https.html index 64690e7c506..5a55a8d860e 100644 --- a/tests/wpt/web-platform-tests/webauthn/createcredential-extensions.https.html +++ b/tests/wpt/web-platform-tests/webauthn/createcredential-extensions.https.html @@ -31,6 +31,19 @@ standardSetup(function() { new CreateCredentialsTest("options.publicKey.extensions", {appid: ""}).runTest("empty appid in create request", "NotSupportedError"); new CreateCredentialsTest("options.publicKey.extensions", {appid: null}).runTest("null appid in create request", "NotSupportedError"); new CreateCredentialsTest("options.publicKey.extensions", {appid: "anything"}).runTest("appid in create request", "NotSupportedError"); + + promise_test(async t => { + const credential = await createCredential({ + options: { + publicKey: { + extensions: { + prf: {}, + }, + }, + }, + }); + assert_false(credential.getClientExtensionResults().prf.enabled); + }, "navigator.credentials.create() with prf requested but no support in authenticator"); }); /* JSHINT */ diff --git a/tests/wpt/web-platform-tests/webauthn/createcredential-prf.https.html b/tests/wpt/web-platform-tests/webauthn/createcredential-prf.https.html new file mode 100644 index 00000000000..7243e088d40 --- /dev/null +++ b/tests/wpt/web-platform-tests/webauthn/createcredential-prf.https.html @@ -0,0 +1,44 @@ + + +navigator.credentials.create() prf extension tests with authenticator support + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webauthn/getcredential-extensions.https.html b/tests/wpt/web-platform-tests/webauthn/getcredential-extensions.https.html index 2b5557d3f2b..16c1e574571 100644 --- a/tests/wpt/web-platform-tests/webauthn/getcredential-extensions.https.html +++ b/tests/wpt/web-platform-tests/webauthn/getcredential-extensions.https.html @@ -53,6 +53,26 @@ standardSetup(function() { new GetCredentialsTest("options.publicKey.extensions", {payment: {isPayment:true}}) .addCredential(credPromise) .runTest("Payment extension is only supported at registration", "NotAllowedError"); + + promise_test(async t => { + const id = (await credPromise).rawId; + const assertion = await navigator.credentials.get({publicKey: { + challenge: new Uint8Array(), + allowCredentials: [{ + id: id, + type: "public-key", + }], + extensions: { + prf: { + eval: { + first: new Uint8Array([1,2,3,4]).buffer, + }, + }, + }, + }}); + + assert_not_own_property(assertion.getClientExtensionResults().prf, 'results'); + }, "navigator.credentials.get() with prf requested but no support in authenticator"); }); /* JSHINT */ diff --git a/tests/wpt/web-platform-tests/webauthn/getcredential-prf.https.html b/tests/wpt/web-platform-tests/webauthn/getcredential-prf.https.html new file mode 100644 index 00000000000..6f8670f64d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webauthn/getcredential-prf.https.html @@ -0,0 +1,157 @@ + + +navigator.credentials.get() prf extension tests with authenticator support + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js b/tests/wpt/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js index 20553017f95..2a4ad6d6934 100644 --- a/tests/wpt/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js +++ b/tests/wpt/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js @@ -351,6 +351,7 @@ promise_test(async t => { let errors = 0; callbacks.error = e => errors++; + callbacks.output = frame => { frame.close(); }; const decoder = createVideoDecoder(t, callbacks); decoder.configure(CONFIG); @@ -490,6 +491,7 @@ promise_test(async t => { promise_test(async t => { const callbacks = {}; + callbacks.output = frame => { frame.close(); }; const decoder = createVideoDecoder(t, callbacks); // No decodes yet. diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/__init__.py index 006b91fc3a6..a887aeb8a45 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/__init__.py @@ -1,3 +1,10 @@ +from .. import ( + any_int, + any_string, + any_string_or_null, + recursive_compare, +) + def assert_browsing_context( info, context, children=None, is_root=True, parent=None, url=None ): @@ -34,15 +41,25 @@ def assert_browsing_context( assert info["url"] == url -def assert_navigation_info(event, context, url): - assert "context" in event - assert isinstance(event["context"], str) - assert event["context"] == context +def assert_navigation_info(event, expected_navigation_info): + recursive_compare( + { + "context": any_string, + "navigation": any_string_or_null, + "timestamp": any_int, + "url": any_string, + }, + event, + ) - assert "url" in event - assert isinstance(event["url"], str) - assert event["url"] == url + if "context" in expected_navigation_info: + assert event["context"] == expected_navigation_info["context"] - assert "navigation" in event - if event["navigation"] is not None: - assert isinstance(event["navigation"], str) + if "navigation" in expected_navigation_info: + assert event["navigation"] == expected_navigation_info["navigation"] + + if "timestamp" in expected_navigation_info: + expected_navigation_info["timestamp"](event["timestamp"]) + + if "url" in expected_navigation_info: + assert event["url"] == expected_navigation_info["url"] diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/dom_content_loaded/dom_content_loaded.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/dom_content_loaded/dom_content_loaded.py index 010e81190de..fe28005ae08 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/dom_content_loaded/dom_content_loaded.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/dom_content_loaded/dom_content_loaded.py @@ -1,6 +1,7 @@ import pytest - from tests.support.sync import AsyncPoll + +from ... import int_interval from .. import assert_navigation_info pytestmark = pytest.mark.asyncio @@ -43,7 +44,25 @@ async def test_subscribe(bidi_session, subscribe_events, inline, new_tab, wait_f await bidi_session.browsing_context.navigate(context=new_tab["context"], url=url) event = await on_entry - assert_navigation_info(event, new_tab["context"], url) + assert_navigation_info(event, {"context": new_tab["context"], "url": url}) + + +async def test_timestamp(bidi_session, current_time, subscribe_events, inline, new_tab, wait_for_event): + await subscribe_events(events=[DOM_CONTENT_LOADED_EVENT]) + + time_start = await current_time() + + on_entry = wait_for_event(DOM_CONTENT_LOADED_EVENT) + url = inline("
foo
") + await bidi_session.browsing_context.navigate(context=new_tab["context"], url=url) + event = await on_entry + + time_end = await current_time() + + assert_navigation_info( + event, + {"context": new_tab["context"], "timestamp": int_interval(time_start, time_end)} + ) async def test_iframe(bidi_session, subscribe_events, new_tab, test_page, test_page_same_origin_frame): @@ -82,8 +101,11 @@ async def test_iframe(bidi_session, subscribe_events, new_tab, test_page, test_p root_event = events[0] if first_is_root else events[1] child_event = events[1] if first_is_root else events[0] - assert_navigation_info(root_event, root_info["context"], test_page_same_origin_frame) - assert_navigation_info(child_event, child_info["context"], test_page) + assert_navigation_info( + root_event, + {"context": root_info["context"], "url": test_page_same_origin_frame} + ) + assert_navigation_info(child_event, {"context": child_info["context"], "url": test_page}) remove_listener() @@ -96,4 +118,4 @@ async def test_new_context(bidi_session, subscribe_events, wait_for_event, type_ new_context = await bidi_session.browsing_context.create(type_hint=type_hint) event = await on_entry - assert_navigation_info(event, new_context["context"], "about:blank") + assert_navigation_info(event, {"context": new_context["context"], "url": "about:blank"}) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/load/load.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/load/load.py index c0d4b1442bc..d9a2da09902 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/load/load.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/browsing_context/load/load.py @@ -1,7 +1,8 @@ import pytest +from tests.support.sync import AsyncPoll from webdriver.error import TimeoutException -from tests.support.sync import AsyncPoll +from ... import int_interval from .. import assert_navigation_info pytestmark = pytest.mark.asyncio @@ -41,7 +42,25 @@ async def test_subscribe(bidi_session, subscribe_events, inline, new_tab, wait_f await bidi_session.browsing_context.navigate(context=new_tab["context"], url=url) event = await on_entry - assert_navigation_info(event, new_tab["context"], url) + assert_navigation_info(event, {"context": new_tab["context"], "url": url}) + + +async def test_timestamp(bidi_session, current_time, subscribe_events, inline, new_tab, wait_for_event): + await subscribe_events(events=[CONTEXT_LOAD_EVENT]) + + time_start = await current_time() + + on_entry = wait_for_event(CONTEXT_LOAD_EVENT) + url = inline("
foo
") + await bidi_session.browsing_context.navigate(context=new_tab["context"], url=url) + event = await on_entry + + time_end = await current_time() + + assert_navigation_info( + event, + {"context": new_tab["context"], "timestamp": int_interval(time_start, time_end)} + ) async def test_iframe(bidi_session, subscribe_events, new_tab, test_page, test_page_same_origin_frame): @@ -71,8 +90,11 @@ async def test_iframe(bidi_session, subscribe_events, new_tab, test_page, test_p child_info = root_info["children"][0] # First load event comes from iframe - assert_navigation_info(events[0], child_info["context"], test_page) - assert_navigation_info(events[1], root_info["context"], test_page_same_origin_frame) + assert_navigation_info(events[0], {"context": child_info["context"], "url": test_page}) + assert_navigation_info( + events[1], + {"context": root_info["context"], "url": test_page_same_origin_frame} + ) remove_listener() @@ -85,4 +107,4 @@ async def test_new_context(bidi_session, subscribe_events, wait_for_event, type_ new_context = await bidi_session.browsing_context.create(type_hint=type_hint) event = await on_entry - assert_navigation_info(event, new_context["context"], "about:blank") + assert_navigation_info(event, {"context": new_context["context"], "url": "about:blank"}) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py index dc6848c00f2..d0451d0f285 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py @@ -22,9 +22,7 @@ def assert_cookies(request_cookies, expected_cookies): return True for cookie in expected_cookies: - assert ( - next(c for c in request_cookies if match_cookie(c, cookie)) is not None - ) + assert next(c for c in request_cookies if match_cookie(c, cookie)) is not None def assert_headers(request_headers, expected_headers): @@ -170,7 +168,7 @@ def assert_response_data(response_data, expected_response): recursive_compare(expected_response, response_data) -def assert_response_started_event( +def assert_response_event( event, context=None, is_redirect=None, @@ -191,3 +189,42 @@ def assert_response_started_event( redirect_count=redirect_count, expected_request=expected_request, ) + +# Array of status and status text expected to be available in network events +HTTP_STATUS_AND_STATUS_TEXT = [ + (101, "Switching Protocols"), + (200, "OK"), + (201, "Created"), + (202, "Accepted"), + (203, "Non-Authoritative Information"), + (204, "No Content"), + (205, "Reset Content"), + (206, "Partial Content"), + (300, "Multiple Choices"), + (301, "Moved Permanently"), + (302, "Found"), + (303, "See Other"), + (305, "Use Proxy"), + (307, "Temporary Redirect"), + (400, "Bad Request"), + (401, "Unauthorized"), + (402, "Payment Required"), + (403, "Forbidden"), + (404, "Not Found"), + (405, "Method Not Allowed"), + (406, "Not Acceptable"), + (407, "Proxy Authentication Required"), + (408, "Request Timeout"), + (409, "Conflict"), + (410, "Gone"), + (411, "Length Required"), + (412, "Precondition Failed"), + (415, "Unsupported Media Type"), + (417, "Expectation Failed"), + (500, "Internal Server Error"), + (501, "Not Implemented"), + (502, "Bad Gateway"), + (503, "Service Unavailable"), + (504, "Gateway Timeout"), + (505, "HTTP Version Not Supported"), +] diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/combined/network_events_tentative.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/combined/network_events_tentative.py index a1d5b3bf837..2defc6c2056 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/combined/network_events_tentative.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/combined/network_events_tentative.py @@ -2,7 +2,10 @@ import asyncio import pytest -from .. import assert_before_request_sent_event, assert_response_started_event +from .. import ( + assert_before_request_sent_event, + assert_response_event, +) PAGE_EMPTY_HTML = "/webdriver/tests/bidi/network/support/empty.html" PAGE_EMPTY_TEXT = "/webdriver/tests/bidi/network/support/empty.txt" @@ -16,31 +19,106 @@ async def test_same_request_id( bidi_session, top_context, wait_for_event, url, setup_network_test, fetch ): network_events = await setup_network_test( - events=["network.beforeRequestSent", "network.responseStarted"] + events=[ + "network.beforeRequestSent", + "network.responseStarted", + "network.responseCompleted", + ] ) before_request_sent_events = network_events["network.beforeRequestSent"] response_started_events = network_events["network.responseStarted"] + response_completed_events = network_events["network.responseCompleted"] text_url = url(PAGE_EMPTY_TEXT) - on_response_started = wait_for_event("network.responseStarted") + on_response_completed = wait_for_event("network.responseCompleted") await fetch(text_url) - await on_response_started + await on_response_completed assert len(before_request_sent_events) == 1 assert len(response_started_events) == 1 + assert len(response_completed_events) == 1 expected_request = {"method": "GET", "url": text_url} assert_before_request_sent_event( before_request_sent_events[0], expected_request=expected_request ) expected_response = {"url": text_url} - assert_response_started_event( + assert_response_event( response_started_events[0], expected_request=expected_request, expected_response=expected_response, ) + assert_response_event( + response_completed_events[0], + expected_request=expected_request, + expected_response=expected_response, + ) assert ( before_request_sent_events[0]["request"]["request"] == response_started_events[0]["request"]["request"] ) + + assert ( + before_request_sent_events[0]["request"]["request"] + == response_completed_events[0]["request"]["request"] + ) + + +@pytest.mark.asyncio +async def test_subscribe_to_one_context( + bidi_session, top_context, wait_for_event, url, fetch, setup_network_test +): + other_context = await bidi_session.browsing_context.create(type_hint="tab") + await bidi_session.browsing_context.navigate( + context=other_context["context"], + url=url(PAGE_EMPTY_HTML), + wait="complete", + ) + + network_events = await setup_network_test( + events=[ + "network.beforeRequestSent", + "network.responseStarted", + "network.responseCompleted", + ], + contexts=[top_context["context"]], + ) + + # Perform a fetch request in the subscribed context and wait for the response completed event. + text_url = url(PAGE_EMPTY_TEXT) + on_response_completed = wait_for_event("network.responseCompleted") + await fetch(text_url, context=top_context) + await on_response_completed + + assert len(network_events["network.beforeRequestSent"]) == 1 + assert len(network_events["network.responseStarted"]) == 1 + assert len(network_events["network.responseCompleted"]) == 1 + + # Check the received events have the correct context. + expected_request = {"method": "GET", "url": text_url} + expected_response = {"url": text_url} + assert_before_request_sent_event( + network_events["network.beforeRequestSent"][0], + expected_request=expected_request, + context=top_context["context"], + ) + assert_response_event( + network_events["network.responseStarted"][0], + expected_response=expected_response, + context=top_context["context"], + ) + assert_response_event( + network_events["network.responseCompleted"][0], + expected_response=expected_response, + context=top_context["context"], + ) + + # Perform another fetch request in the other context. + await fetch(text_url, context=other_context) + await asyncio.sleep(0.5) + + # Check that no other event was received. + assert len(network_events["network.beforeRequestSent"]) == 1 + assert len(network_events["network.responseStarted"]) == 1 + assert len(network_events["network.responseCompleted"]) == 1 diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py index 65f0cd89112..3dd80f2896d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py @@ -4,13 +4,17 @@ import pytest from webdriver.bidi.modules.script import ContextTarget +RESPONSE_COMPLETED_EVENT = "network.responseCompleted" + PAGE_EMPTY_HTML = "/webdriver/tests/bidi/network/support/empty.html" @pytest.fixture def fetch(bidi_session, top_context): - """Perform a fetch from the page of the top level context.""" - async def fetch(url, method="GET", headers=None): + """Perform a fetch from the page of the provided context, default to the + top context. + """ + async def fetch(url, method="GET", headers=None, context=top_context): method_arg = f"method: '{method}'," headers_arg = "" @@ -26,7 +30,7 @@ def fetch(bidi_session, top_context): {method_arg} {headers_arg} }}).then(response => response.text());""", - target=ContextTarget(top_context["context"]), + target=ContextTarget(context["context"]), await_promise=True, ) @@ -34,7 +38,9 @@ def fetch(bidi_session, top_context): @pytest.fixture -async def setup_network_test(bidi_session, subscribe_events, top_context, url): +async def setup_network_test( + bidi_session, subscribe_events, wait_for_event, top_context, url +): """Navigate the current top level context to the provided url and subscribe to network.beforeRequestSent. @@ -44,21 +50,35 @@ async def setup_network_test(bidi_session, subscribe_events, top_context, url): """ listeners = [] - async def _setup_network_test(events, test_url=url(PAGE_EMPTY_HTML)): + async def _setup_network_test(events, test_url=url(PAGE_EMPTY_HTML), contexts=None): nonlocal listeners + # Listen for network.responseCompleted for the initial navigation to + # make sure this event will not be captured unexpectedly by the tests. + await bidi_session.session.subscribe( + events=[RESPONSE_COMPLETED_EVENT], contexts=[top_context["context"]] + ) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await bidi_session.browsing_context.navigate( context=top_context["context"], url=test_url, wait="complete", ) - await subscribe_events(events) + await on_response_completed + await bidi_session.session.unsubscribe( + events=[RESPONSE_COMPLETED_EVENT], contexts=[top_context["context"]] + ) + + await subscribe_events(events, contexts) network_events = {} for event in events: network_events[event] = [] + async def on_event(method, data, event=event): network_events[event].append(data) + listeners.append(bidi_session.add_event_listener(event, on_event)) return network_events diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_completed/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_completed/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_completed/response_completed_tentative.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_completed/response_completed_tentative.py new file mode 100644 index 00000000000..347f970c61d --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_completed/response_completed_tentative.py @@ -0,0 +1,274 @@ +import asyncio +import json + +import pytest + +from webdriver.bidi.modules.script import ContextTarget + +from tests.support.sync import AsyncPoll + +from ... import any_int +from .. import assert_response_event, HTTP_STATUS_AND_STATUS_TEXT + +PAGE_EMPTY_HTML = "/webdriver/tests/bidi/network/support/empty.html" +PAGE_EMPTY_IMAGE = "/webdriver/tests/bidi/network/support/empty.png" +PAGE_EMPTY_SCRIPT = "/webdriver/tests/bidi/network/support/empty.js" +PAGE_EMPTY_SVG = "/webdriver/tests/bidi/network/support/empty.svg" +PAGE_EMPTY_TEXT = "/webdriver/tests/bidi/network/support/empty.txt" + +RESPONSE_COMPLETED_EVENT = "network.responseCompleted" + +# The following tests are marked as tentative until +# https://github.com/w3c/webdriver-bidi/pull/204 is merged. + + +@pytest.mark.asyncio +async def test_subscribe_status(bidi_session, top_context, wait_for_event, url, fetch): + await bidi_session.session.subscribe(events=[RESPONSE_COMPLETED_EVENT]) + + # Track all received network.responseCompleted events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener( + RESPONSE_COMPLETED_EVENT, on_event + ) + + html_url = url(PAGE_EMPTY_HTML) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=html_url, + wait="complete", + ) + await on_response_completed + + assert len(events) == 1 + expected_request = {"method": "GET", "url": html_url} + expected_response = { + "url": url(PAGE_EMPTY_HTML), + "fromCache": False, + "mimeType": "text/html", + "status": 200, + "statusText": "OK", + } + assert_response_event( + events[0], + expected_request=expected_request, + expected_response=expected_response, + redirect_count=0, + is_redirect=False, + ) + + text_url = url(PAGE_EMPTY_TEXT) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await fetch(text_url) + await on_response_completed + + assert len(events) == 2 + expected_request = {"method": "GET", "url": text_url} + expected_response = { + "url": text_url, + "fromCache": False, + "mimeType": "text/plain", + "status": 200, + "statusText": "OK", + } + assert_response_event( + events[1], + expected_request=expected_request, + expected_response=expected_response, + redirect_count=0, + is_redirect=False, + ) + + await bidi_session.session.unsubscribe(events=[RESPONSE_COMPLETED_EVENT]) + + # Fetch the text url again, with an additional parameter to bypass the cache + # and check no new event is received. + await fetch(f"{text_url}?nocache") + await asyncio.sleep(0.5) + assert len(events) == 2 + + remove_listener() + + +@pytest.mark.asyncio +async def test_load_page_twice( + bidi_session, top_context, wait_for_event, url, fetch, setup_network_test +): + html_url = url(PAGE_EMPTY_HTML) + + network_events = await setup_network_test(events=[RESPONSE_COMPLETED_EVENT]) + events = network_events[RESPONSE_COMPLETED_EVENT] + + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=html_url, + wait="complete", + ) + await on_response_completed + + assert len(events) == 1 + expected_request = {"method": "GET", "url": html_url} + expected_response = { + "url": html_url, + "fromCache": False, + "mimeType": "text/html", + "status": 200, + "statusText": "OK", + "protocol": "http/1.1", + } + assert_response_event( + events[0], + expected_request=expected_request, + expected_response=expected_response, + redirect_count=0, + is_redirect=False, + ) + + +@pytest.mark.parametrize( + "status, status_text", + HTTP_STATUS_AND_STATUS_TEXT, +) +@pytest.mark.asyncio +async def test_response_status( + bidi_session, wait_for_event, url, fetch, setup_network_test, status, status_text +): + status_url = url( + f"/webdriver/tests/support/http_handlers/status.py?status={status}&nocache={RESPONSE_COMPLETED_EVENT}" + ) + + network_events = await setup_network_test(events=[RESPONSE_COMPLETED_EVENT]) + events = network_events[RESPONSE_COMPLETED_EVENT] + + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await fetch(status_url) + await on_response_completed + + assert len(events) == 1 + expected_request = {"method": "GET", "url": status_url} + expected_response = { + "url": status_url, + "fromCache": False, + "mimeType": "text/plain", + "status": status, + "statusText": status_text, + "protocol": "http/1.1", + } + assert_response_event( + events[0], + expected_response=expected_response, + redirect_count=0, + is_redirect=False, + ) + + +@pytest.mark.asyncio +async def test_response_headers( + bidi_session, wait_for_event, url, fetch, setup_network_test +): + headers_url = url( + "/webdriver/tests/support/http_handlers/headers.py?header=foo:bar&header=baz:biz" + ) + + network_events = await setup_network_test(events=[RESPONSE_COMPLETED_EVENT]) + events = network_events[RESPONSE_COMPLETED_EVENT] + + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await fetch(headers_url, method="GET") + await on_response_completed + + assert len(events) == 1 + + expected_request = {"method": "GET", "url": headers_url} + expected_response = { + "url": headers_url, + "fromCache": False, + "mimeType": "text/plain", + "status": 200, + "statusText": "OK", + "headers": ( + {"name": "foo", "value": "bar"}, + {"name": "baz", "value": "biz"}, + ), + "protocol": "http/1.1", + } + assert_response_event( + events[0], + expected_request=expected_request, + redirect_count=0, + is_redirect=False, + ) + + +@pytest.mark.parametrize( + "page_url, mime_type", + [ + (PAGE_EMPTY_HTML, "text/html"), + (PAGE_EMPTY_TEXT, "text/plain"), + (PAGE_EMPTY_SCRIPT, "text/javascript"), + (PAGE_EMPTY_IMAGE, "image/png"), + (PAGE_EMPTY_SVG, "image/svg+xml"), + ], +) +@pytest.mark.asyncio +async def test_response_mime_type_file( + bidi_session, url, wait_for_event, fetch, setup_network_test, page_url, mime_type +): + network_events = await setup_network_test(events=[RESPONSE_COMPLETED_EVENT]) + events = network_events[RESPONSE_COMPLETED_EVENT] + + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await fetch(url(page_url), method="GET") + await on_response_completed + + assert len(events) == 1 + + expected_request = {"method": "GET", "url": url(page_url)} + expected_response = {"url": url(page_url), "mimeType": mime_type} + assert_response_event( + events[0], + expected_request=expected_request, + expected_response=expected_response, + redirect_count=0, + is_redirect=False, + ) + + +@pytest.mark.asyncio +async def test_redirect(bidi_session, wait_for_event, url, fetch, setup_network_test): + text_url = url(PAGE_EMPTY_TEXT) + redirect_url = url( + f"/webdriver/tests/support/http_handlers/redirect.py?location={text_url}" + ) + + network_events = await setup_network_test(events=[RESPONSE_COMPLETED_EVENT]) + events = network_events[RESPONSE_COMPLETED_EVENT] + + await fetch(redirect_url, method="GET") + + # Wait until we receive two events, one for the initial request and one for + # the redirection. + wait = AsyncPoll(bidi_session, timeout=2) + await wait.until(lambda _: len(events) >= 2) + + assert len(events) == 2 + expected_request = {"method": "GET", "url": redirect_url} + assert_response_event( + events[0], + expected_request=expected_request, + redirect_count=0, + is_redirect=False, + ) + expected_request = {"method": "GET", "url": text_url} + assert_response_event( + events[1], expected_request=expected_request, redirect_count=1, is_redirect=True + ) + + # Check that both requests share the same requestId + assert events[0]["request"]["request"] == events[1]["request"]["request"] diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_started/response_started_tentative.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_started/response_started_tentative.py index 944d50fe88f..18c78c6922a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_started/response_started_tentative.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/response_started/response_started_tentative.py @@ -8,7 +8,7 @@ from webdriver.bidi.modules.script import ContextTarget from tests.support.sync import AsyncPoll from ... import any_int -from .. import assert_response_started_event +from .. import assert_response_event, HTTP_STATUS_AND_STATUS_TEXT PAGE_EMPTY_HTML = "/webdriver/tests/bidi/network/support/empty.html" PAGE_EMPTY_IMAGE = "/webdriver/tests/bidi/network/support/empty.png" @@ -16,13 +16,15 @@ PAGE_EMPTY_SCRIPT = "/webdriver/tests/bidi/network/support/empty.js" PAGE_EMPTY_SVG = "/webdriver/tests/bidi/network/support/empty.svg" PAGE_EMPTY_TEXT = "/webdriver/tests/bidi/network/support/empty.txt" +RESPONSE_STARTED_EVENT = "network.responseStarted" + # The following tests are marked as tentative until # https://github.com/w3c/webdriver-bidi/pull/204 is merged. @pytest.mark.asyncio async def test_subscribe_status(bidi_session, top_context, wait_for_event, url, fetch): - await bidi_session.session.subscribe(events=["network.responseStarted"]) + await bidi_session.session.subscribe(events=[RESPONSE_STARTED_EVENT]) await bidi_session.browsing_context.navigate( context=top_context["context"], @@ -37,11 +39,11 @@ async def test_subscribe_status(bidi_session, top_context, wait_for_event, url, events.append(data) remove_listener = bidi_session.add_event_listener( - "network.responseStarted", on_event + RESPONSE_STARTED_EVENT, on_event ) text_url = url(PAGE_EMPTY_TEXT) - on_response_started = wait_for_event("network.responseStarted") + on_response_started = wait_for_event(RESPONSE_STARTED_EVENT) await fetch(text_url) await on_response_started @@ -54,7 +56,7 @@ async def test_subscribe_status(bidi_session, top_context, wait_for_event, url, "status": 200, "statusText": "OK", } - assert_response_started_event( + assert_response_event( events[0], expected_request=expected_request, expected_response=expected_response, @@ -62,7 +64,7 @@ async def test_subscribe_status(bidi_session, top_context, wait_for_event, url, is_redirect=False, ) - await bidi_session.session.unsubscribe(events=["network.responseStarted"]) + await bidi_session.session.unsubscribe(events=[RESPONSE_STARTED_EVENT]) # Fetch the text url again, with an additional parameter to bypass the cache # and check no new event is received. @@ -79,10 +81,10 @@ async def test_load_page_twice( ): html_url = url(PAGE_EMPTY_HTML) - network_events = await setup_network_test(events=["network.responseStarted"]) - events = network_events["network.responseStarted"] + network_events = await setup_network_test(events=[RESPONSE_STARTED_EVENT]) + events = network_events[RESPONSE_STARTED_EVENT] - on_response_started = wait_for_event("network.responseStarted") + on_response_started = wait_for_event(RESPONSE_STARTED_EVENT) await bidi_session.browsing_context.navigate( context=top_context["context"], url=html_url, @@ -100,7 +102,7 @@ async def test_load_page_twice( "statusText": "OK", "protocol": "http/1.1", } - assert_response_started_event( + assert_response_event( events[0], expected_request=expected_request, expected_response=expected_response, @@ -111,55 +113,18 @@ async def test_load_page_twice( @pytest.mark.parametrize( "status, status_text", - [ - (101, "Switching Protocols"), - (200, "OK"), - (201, "Created"), - (202, "Accepted"), - (203, "Non-Authoritative Information"), - (204, "No Content"), - (205, "Reset Content"), - (206, "Partial Content"), - (300, "Multiple Choices"), - (301, "Moved Permanently"), - (302, "Found"), - (303, "See Other"), - (304, "Not Modified"), - (305, "Use Proxy"), - (307, "Temporary Redirect"), - (400, "Bad Request"), - (401, "Unauthorized"), - (402, "Payment Required"), - (403, "Forbidden"), - (404, "Not Found"), - (405, "Method Not Allowed"), - (406, "Not Acceptable"), - (407, "Proxy Authentication Required"), - (408, "Request Timeout"), - (409, "Conflict"), - (410, "Gone"), - (411, "Length Required"), - (412, "Precondition Failed"), - (415, "Unsupported Media Type"), - (417, "Expectation Failed"), - (500, "Internal Server Error"), - (501, "Not Implemented"), - (502, "Bad Gateway"), - (503, "Service Unavailable"), - (504, "Gateway Timeout"), - (505, "HTTP Version Not Supported"), - ], + HTTP_STATUS_AND_STATUS_TEXT, ) @pytest.mark.asyncio async def test_response_status( bidi_session, wait_for_event, url, fetch, setup_network_test, status, status_text ): - status_url = url(f"/webdriver/tests/support/http_handlers/status.py?status={status}") + status_url = url(f"/webdriver/tests/support/http_handlers/status.py?status={status}&nocache={RESPONSE_STARTED_EVENT}") - network_events = await setup_network_test(events=["network.responseStarted"]) - events = network_events["network.responseStarted"] + network_events = await setup_network_test(events=[RESPONSE_STARTED_EVENT]) + events = network_events[RESPONSE_STARTED_EVENT] - on_response_started = wait_for_event("network.responseStarted") + on_response_started = wait_for_event(RESPONSE_STARTED_EVENT) await fetch(status_url) await on_response_started @@ -173,7 +138,7 @@ async def test_response_status( "statusText": status_text, "protocol": "http/1.1", } - assert_response_started_event( + assert_response_event( events[0], expected_response=expected_response, redirect_count=0, @@ -189,10 +154,10 @@ async def test_response_headers( "/webdriver/tests/support/http_handlers/headers.py?header=foo:bar&header=baz:biz" ) - network_events = await setup_network_test(events=["network.responseStarted"]) - events = network_events["network.responseStarted"] + network_events = await setup_network_test(events=[RESPONSE_STARTED_EVENT]) + events = network_events[RESPONSE_STARTED_EVENT] - on_response_started = wait_for_event("network.responseStarted") + on_response_started = wait_for_event(RESPONSE_STARTED_EVENT) await fetch(headers_url, method="GET") await on_response_started @@ -211,7 +176,7 @@ async def test_response_headers( ), "protocol": "http/1.1", } - assert_response_started_event( + assert_response_event( events[0], expected_request=expected_request, redirect_count=0, @@ -233,10 +198,10 @@ async def test_response_headers( async def test_response_mime_type_file( bidi_session, url, wait_for_event, fetch, setup_network_test, page_url, mime_type ): - network_events = await setup_network_test(events=["network.responseStarted"]) - events = network_events["network.responseStarted"] + network_events = await setup_network_test(events=[RESPONSE_STARTED_EVENT]) + events = network_events[RESPONSE_STARTED_EVENT] - on_response_started = wait_for_event("network.responseStarted") + on_response_started = wait_for_event(RESPONSE_STARTED_EVENT) await fetch(url(page_url), method="GET") await on_response_started @@ -244,7 +209,7 @@ async def test_response_mime_type_file( expected_request = {"method": "GET", "url": url(page_url)} expected_response = {"url": url(page_url), "mimeType": mime_type} - assert_response_started_event( + assert_response_event( events[0], expected_request=expected_request, expected_response=expected_response, @@ -258,8 +223,8 @@ async def test_redirect(bidi_session, wait_for_event, url, fetch, setup_network_ text_url = url(PAGE_EMPTY_TEXT) redirect_url = url(f"/webdriver/tests/support/http_handlers/redirect.py?location={text_url}") - network_events = await setup_network_test(events=["network.responseStarted"]) - events = network_events["network.responseStarted"] + network_events = await setup_network_test(events=[RESPONSE_STARTED_EVENT]) + events = network_events[RESPONSE_STARTED_EVENT] await fetch(redirect_url, method="GET") @@ -270,14 +235,14 @@ async def test_redirect(bidi_session, wait_for_event, url, fetch, setup_network_ assert len(events) == 2 expected_request = {"method": "GET", "url": redirect_url} - assert_response_started_event( + assert_response_event( events[0], expected_request=expected_request, redirect_count=0, is_redirect=False, ) expected_request = {"method": "GET", "url": text_url} - assert_response_started_event( + assert_response_event( events[1], expected_request=expected_request, redirect_count=1, is_redirect=True ) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py index 06db051766c..9fbe5fb8110 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py @@ -313,3 +313,73 @@ async def test_remote_value_deserialization( await bidi_session.browsing_context.navigate( context=top_context["context"], url=top_context["url"], wait="complete" ) + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "expression, function_declaration, expected", + [ + ( + "document.getElementsByTagName('span')", + "(collection) => collection.item(0)", + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": [], + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + } + ), + ( + "document.querySelectorAll('span')", + "(nodeList) => nodeList.item(0)", + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": [], + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + } + ), + ], ids=[ + "htmlcollection", + "nodelist" + ] +) +async def test_remote_value_dom_collection( + bidi_session, + inline, + top_context, + call_function, + expression, + function_declaration, + expected +): + page_url = inline("""

""") + await bidi_session.browsing_context.navigate( + context=top_context['context'], url=page_url, wait="complete" + ) + + remote_value = await bidi_session.script.evaluate( + expression=expression, + result_ownership="root", + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + # Check that a remote value can be successfully deserialized as an "argument" + # parameter and the first element be extracted. + result = await call_function( + function_declaration=function_declaration, + arguments=[remote_value], + ) + + assert result == expected diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/result_node.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/result_node.py index 3e434284750..c7ec990ba5c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/result_node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/result_node.py @@ -151,7 +151,7 @@ page_data = """ async def test_element_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -207,7 +207,7 @@ async def test_element_node( async def test_attribute_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -243,7 +243,7 @@ async def test_attribute_node( ] ) async def test_text_node(bidi_session, inline, top_context, function_declaration, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -281,7 +281,7 @@ async def test_text_node(bidi_session, inline, top_context, function_declaration async def test_cdata_node(bidi_session, inline, new_tab, function_declaration, expected): xml_page = inline("""CDATA section: & ]]>.""", doctype="xml") - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=new_tab['context'], url=xml_page, wait="complete" ) @@ -321,7 +321,7 @@ async def test_processing_instruction_node( ): xml_page = inline("""""", doctype="xml") - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=new_tab['context'], url=xml_page, wait="complete" ) @@ -360,7 +360,7 @@ async def test_processing_instruction_node( async def test_comment_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -414,7 +414,7 @@ async def test_comment_node( async def test_document_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -451,7 +451,7 @@ async def test_document_node( async def test_doctype_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -488,7 +488,7 @@ async def test_doctype_node( async def test_document_fragment_node( bidi_session, inline, top_context, function_declaration, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -503,7 +503,7 @@ async def test_document_fragment_node( @pytest.mark.asyncio async def test_node_within_object(bidi_session, inline, top_context): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -529,3 +529,70 @@ async def test_node_within_object(bidi_session, inline, top_context): }] ] } + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "function_declaration, expected", + [ + ( + "() => document.getElementsByTagName('span')", + { + "type": "htmlcollection", + "value": [ + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": None, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + }, + ] + } + ), + ( + "() => document.querySelectorAll('span')", + { + "type": "nodelist", + "value": [ + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": None, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + }, + ] + } + ), + ], ids=[ + "htmlcollection", + "nodelist" + ] +) +async def test_node_within_dom_collection( + bidi_session, + inline, + top_context, + function_declaration, + expected +): + await bidi_session.browsing_context.navigate( + context=top_context['context'], url=inline(page_data), wait="complete" + ) + + result = await bidi_session.script.call_function( + function_declaration=function_declaration, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + assert result == expected diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/evaluate/result_node.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/evaluate/result_node.py index a5a3f2fc063..d3eccc2fdad 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/evaluate/result_node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/evaluate/result_node.py @@ -149,7 +149,7 @@ page_data = """ ] ) async def test_element_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -203,7 +203,7 @@ async def test_element_node(bidi_session, inline, top_context, expression, expec ] ) async def test_attribute_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -239,7 +239,7 @@ async def test_attribute_node(bidi_session, inline, top_context, expression, exp ] ) async def test_text_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -277,7 +277,7 @@ async def test_text_node(bidi_session, inline, top_context, expression, expected async def test_cdata_node(bidi_session, inline, new_tab, expression, expected): xml_page = inline("""CDATA section: & ]]>.""", doctype="xml") - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=new_tab['context'], url=xml_page, wait="complete" ) @@ -317,7 +317,7 @@ async def test_processing_instruction_node( ): xml_page = inline("""""", doctype="xml") - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=new_tab['context'], url=xml_page, wait="complete" ) @@ -354,7 +354,7 @@ async def test_processing_instruction_node( ] ) async def test_comment_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -406,7 +406,7 @@ async def test_comment_node(bidi_session, inline, top_context, expression, expec ] ) async def test_document_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -441,7 +441,7 @@ async def test_document_node(bidi_session, inline, top_context, expression, expe ] ) async def test_doctype_node(bidi_session, inline, top_context, expression, expected): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -478,7 +478,7 @@ async def test_doctype_node(bidi_session, inline, top_context, expression, expec async def test_document_fragment_node( bidi_session, inline, top_context, expression, expected ): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -493,7 +493,7 @@ async def test_document_fragment_node( @pytest.mark.asyncio async def test_node_within_object(bidi_session, inline, top_context): - result = await bidi_session.browsing_context.navigate( + await bidi_session.browsing_context.navigate( context=top_context['context'], url=inline(page_data), wait="complete" ) @@ -519,3 +519,70 @@ async def test_node_within_object(bidi_session, inline, top_context): }] ] } + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "expression, expected", + [ + ( + "document.getElementsByTagName('span')", + { + "type": "htmlcollection", + "value": [ + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": None, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + }, + ] + } + ), + ( + "document.querySelectorAll('span')", + { + "type": "nodelist", + "value": [ + { + "type": "node", + "value": { + "attributes": {}, + "childNodeCount": 0, + "children": None, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1 + } + }, + ] + } + ), + ], ids=[ + "htmlcollection", + "nodelist" + ] +) +async def test_node_within_dom_collection( + bidi_session, + inline, + top_context, + expression, + expected +): + await bidi_session.browsing_context.navigate( + context=top_context['context'], url=inline(page_data), wait="complete" + ) + + result = await bidi_session.script.evaluate( + expression=expression, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + assert result == expected diff --git a/tests/wpt/web-platform-tests/webidl/ecmascript-binding/allow-resizable.html b/tests/wpt/web-platform-tests/webidl/ecmascript-binding/allow-resizable.html index be9df55e75a..54daa57bce6 100644 --- a/tests/wpt/web-platform-tests/webidl/ecmascript-binding/allow-resizable.html +++ b/tests/wpt/web-platform-tests/webidl/ecmascript-binding/allow-resizable.html @@ -19,7 +19,7 @@ test(t => { const enc = new TextEncoder(); // Fixed-length SABs should not throw - const sab = createBuffer('SharedArrayBuffer', 16, { maxByteLength: 1024 }); + const sab = createBuffer('SharedArrayBuffer', 16); enc.encodeInto("foobar", new Uint8Array(sab)); const gsab = createBuffer('SharedArrayBuffer', 16, { maxByteLength: 1024 }); diff --git a/tests/wpt/web-platform-tests/webnn/batch_normalization.https.any.js b/tests/wpt/web-platform-tests/webnn/batch_normalization.https.any.js new file mode 100644 index 00000000000..6644a921723 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/batch_normalization.https.any.js @@ -0,0 +1,31 @@ +// META: title=test WebNN API batchNormalization operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-batchnorm + +const buildBatchNorm = (operationName, builder, resources) => { + // MLOperand batchNormalization(MLOperand input, MLOperand mean, MLOperand variance, + // optional MLBatchNormalizationOptions options = {}); + const namedOutputOperand = {}; + const [inputOperand, meanOperand, varianceOperand] = createMultiInputOperands(builder, resources); + const batchNormOptions = {...resources.options}; + if (batchNormOptions.scale) { + batchNormOptions.scale = createConstantOperand(builder, batchNormOptions.scale); + } + if (batchNormOptions.bias) { + batchNormOptions.bias = createConstantOperand(builder, batchNormOptions.bias); + } + if (batchNormOptions.activation) { + batchNormOptions.activation = builder[batchNormOptions.activation](); + } + // invoke builder.batchNormalization() + namedOutputOperand[resources.expected.name] = + builder[operationName](inputOperand, meanOperand, varianceOperand, batchNormOptions); + return namedOutputOperand; +}; + +testWebNNOperation('batchNormalization', buildBatchNorm); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/clamp.https.any.js b/tests/wpt/web-platform-tests/webnn/clamp.https.any.js index 4cf54d1cea9..9818aed7c12 100644 --- a/tests/wpt/web-platform-tests/webnn/clamp.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/clamp.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-clamp -testWebNNOperation('clamp', '/webnn/resources/test_data/clamp.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('clamp', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/concat.https.any.js b/tests/wpt/web-platform-tests/webnn/concat.https.any.js index 2c8950fe99d..07a1289cef0 100644 --- a/tests/wpt/web-platform-tests/webnn/concat.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/concat.https.any.js @@ -19,4 +19,4 @@ const buildConcat = (operationName, builder, resources) => { return namedOutputOperand; }; -testWebNNOperation('concat', '/webnn/resources/test_data/concat.json', buildConcat); \ No newline at end of file +testWebNNOperation('concat', buildConcat); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/conv2d.https.any.js b/tests/wpt/web-platform-tests/webnn/conv2d.https.any.js new file mode 100644 index 00000000000..52e267a6d3f --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/conv2d.https.any.js @@ -0,0 +1,25 @@ +// META: title=test WebNN API conv2d operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-conv2d + +const buildConv2d= (operationName, builder, resources) => { + // MLOperand conv2d(MLOperand input, MLOperand filter, optional MLConv2dOptions options = {}); + const namedOutputOperand = {}; + const [inputOperand, filterOperand] = createMultiInputOperands(builder, resources); + let conv2dOptions = {...resources.options}; + if (conv2dOptions.bias) { + conv2dOptions.bias = createConstantOperand(builder, conv2dOptions.bias); + } + if (conv2dOptions.activation) { + conv2dOptions.activation = builder[conv2dOptions.activation](); + } + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, filterOperand, conv2dOptions); + return namedOutputOperand; +}; + +testWebNNOperation('conv2d', buildConv2d); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/elementwise_binary.https.any.js b/tests/wpt/web-platform-tests/webnn/elementwise_binary.https.any.js new file mode 100644 index 00000000000..06c2404f954 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/elementwise_binary.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API element-wise binary operations +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-binary + +testWebNNOperation(['add', 'sub', 'mul', 'div', 'max', 'min', 'pow'], buildOperationWithTwoInputs); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/elementwise_unary.https.any.js b/tests/wpt/web-platform-tests/webnn/elementwise_unary.https.any.js new file mode 100644 index 00000000000..3a6ccc8daf6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/elementwise_unary.https.any.js @@ -0,0 +1,13 @@ +// META: title=test WebNN API element-wise unary operations +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary + +testWebNNOperation( + ['abs', 'ceil', 'cos', 'exp', 'floor', 'log', 'neg', 'sin', 'tan'], + buildOperationWithSingleInput +); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/gemm.https.any.js b/tests/wpt/web-platform-tests/webnn/gemm.https.any.js new file mode 100644 index 00000000000..179a1649b6e --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/gemm.https.any.js @@ -0,0 +1,28 @@ +// META: title=test WebNN API gemm operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gemm + +const buildGemm= (operationName, builder, resources) => { + // MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {}); + const namedOutputOperand = {}; + const [inputOperandA, inputOperandB] = createMultiInputOperands(builder, resources); + let gemmOptions = {...resources.options}; + if (gemmOptions.c) { + if (gemmOptions.c.shape) { + gemmOptions.c = createConstantOperand(builder, gemmOptions.c); + } else { + // MLOperand c; + // Create a single-value operand when c is a scalar + gemmOptions.c = builder.constant(gemmOptions.c); + } + } + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperandA, inputOperandB, gemmOptions); + return namedOutputOperand; +}; + +testWebNNOperation('gemm', buildGemm); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/leaky_relu.https.any.js b/tests/wpt/web-platform-tests/webnn/leaky_relu.https.any.js index 0755f33a904..61539ce92ea 100644 --- a/tests/wpt/web-platform-tests/webnn/leaky_relu.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/leaky_relu.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-leakyrelu -testWebNNOperation('leakyRelu', '/webnn/resources/test_data/leaky_relu.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('leakyRelu', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/matmul.https.any.js b/tests/wpt/web-platform-tests/webnn/matmul.https.any.js new file mode 100644 index 00000000000..8a9882afe61 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/matmul.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API matmul operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-matmul + +testWebNNOperation('matmul', buildOperationWithTwoInputs); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/pooling.https.any.js b/tests/wpt/web-platform-tests/webnn/pooling.https.any.js new file mode 100644 index 00000000000..df19e577094 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/pooling.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API pooling operations +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pool2d + +testWebNNOperation(['averagePool2d', 'maxPool2d'], buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/reduction.https.any.js b/tests/wpt/web-platform-tests/webnn/reduction.https.any.js new file mode 100644 index 00000000000..bff8aa22baa --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/reduction.https.any.js @@ -0,0 +1,13 @@ +// META: title=test WebNN API reduction operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reduce + +testWebNNOperation( + ['reduceMax', 'reduceMean', 'reduceMin', 'reduceProduct', 'reduceSum'], + buildOperationWithSingleInput +); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/relu.https.any.js b/tests/wpt/web-platform-tests/webnn/relu.https.any.js index 19a0d986ca8..42b64e11de0 100644 --- a/tests/wpt/web-platform-tests/webnn/relu.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/relu.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-relu -testWebNNOperation('relu', '/webnn/resources/test_data/relu.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('relu', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/reshape.https.any.js b/tests/wpt/web-platform-tests/webnn/reshape.https.any.js index 40829bd1c3c..9fa3262fe52 100644 --- a/tests/wpt/web-platform-tests/webnn/reshape.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/reshape.https.any.js @@ -16,5 +16,5 @@ const buildReshape = (operationName, builder, resources) => { return namedOutputOperand; }; -testWebNNOperation('reshape', '/webnn/resources/test_data/reshape.json', buildReshape); +testWebNNOperation('reshape', buildReshape); diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/abs.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/abs.json new file mode 100644 index 00000000000..c59054c3e50 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/abs.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "abs float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + }, + { + "name": "abs float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + }, + { + "name": "abs float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + }, + { + "name": "abs float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + }, + { + "name": "abs float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/add.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/add.json new file mode 100644 index 00000000000..0a12871ceba --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/add.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "add float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { + "name": "add float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { + "name": "add float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data":[ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { + "name": "add float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { + "name": "add float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2, 3], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { + "name": "add float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + -59.36157224952288 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -102.69488525390625, + -127.25952911376953, + -32.898834228515625, + -22.61880874633789, + -124.5389633178711, + -147.06822204589844, + 5.917243957519531, + -133.41383361816406, + -73.18938446044922, + -52.38008499145508, + 40.47594451904297, + -3.559234619140625, + -134.93353271484375, + -47.862064361572266, + -42.25146484375, + 36.450103759765625, + -1.9140739440917969, + -116.53744506835938, + -31.642518997192383, + -77.58078002929688, + -6.708473205566406, + -129.3561248779297, + -19.5399169921875, + -89.34809875488281 + ], + "type": "float32" + } + }, + { + "name": "add float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -17.98112396221225, + -70.45854393523281, + -12.762018804699252, + 24.254031986371018, + -68.125990738312, + 30.626274734168845 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -61.3144416809082, + -138.35650634765625, + 13.70072078704834, + 60.996795654296875, + -133.30337524414062, + -57.08037567138672, + 47.297691345214844, + -144.51080322265625, + -26.589828491210938, + 31.235519409179688, + 31.711524963378906, + 86.4286117553711, + -93.55308532714844, + -58.95903396606445, + 4.348090171813965, + 120.06570434570312, + -10.67849349975586, + -26.549598693847656, + 9.73792839050293, + -88.67774963378906, + 39.89107894897461, + -45.74052047729492, + -28.304336547851562, + 0.6397457122802734 + ], + "type": "float32" + } + }, + { + "name": "add float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -32.34067322728728, + 43.12499227028161, + 78.68874120227329, + -54.4989964261196 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -75.67398834228516, + -100.23863220214844, + -5.877931594848633, + 79.86775207519531, + -22.052398681640625, + -44.58165740966797, + 143.96755981445312, + 4.636482238769531, + 64.86093139648438, + -47.51750946044922, + 45.33852005004883, + 1.3033409118652344, + -107.91262817382812, + -20.841163635253906, + -15.230562210083008, + 138.93667602539062, + 100.57249450683594, + -14.050880432128906, + 106.40779876708984, + 60.46953582763672, + 131.3418426513672, + -124.49354553222656, + -14.67734146118164, + -84.48552703857422 + ], + "type": "float32" + } + }, + { + "name": "add float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + -59.36157224952288 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -102.69488525390625, + -127.25952911376953, + -32.898834228515625, + -22.61880874633789, + -124.5389633178711, + -147.06822204589844, + 5.917243957519531, + -133.41383361816406, + -73.18938446044922, + -52.38008499145508, + 40.47594451904297, + -3.559234619140625, + -134.93353271484375, + -47.862064361572266, + -42.25146484375, + 36.450103759765625, + -1.9140739440917969, + -116.53744506835938, + -31.642518997192383, + -77.58078002929688, + -6.708473205566406, + -129.3561248779297, + -19.5399169921875, + -89.34809875488281 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/average_pool2d.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/average_pool2d.json new file mode 100644 index 00000000000..5523137be00 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/average_pool2d.json @@ -0,0 +1,1368 @@ +{ + "tests": [ + { + "name": "averagePool2d float32 4D tensor default options", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + -5.997565746307373, + -14.21807861328125 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.windowDimensions", + "inputs":{ + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + -19.187166213989258, + -11.06234073638916, + -12.179718971252441, + -19.926599502563477, + -16.112550735473633, + -13.494997024536133, + 6.447011947631836, + -5.062127590179443, + -2.5472168922424316, + -45.38702392578125, + -12.495549201965332, + -10.51268482208252, + -57.62693786621094, + -42.174110412597656, + -18.61419105529785, + -17.34123420715332, + -19.694103240966797, + -14.67306900024414 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.padding", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 0, 0, 1] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + -9.91970157623291, + -16.252195358276367, + -5.997565746307373, + -13.595065116882324, + -23.570241928100586, + -18.207683563232422, + -14.21807861328125, + -12.60184097290039 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.strides", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + -19.187166213989258, + -12.179718971252441, + 6.447011947631836, + -2.5472168922424316, + -45.38702392578125, + -10.51268482208252, + -17.34123420715332, + -14.67306900024414 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.dilations", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "dilations": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 5.966423988342285, + -21.657337188720703 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.autoPad=explicit", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 0, 0, 1], + "autoPad": "explicit" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + -9.91970157623291, + -16.252195358276367, + -5.997565746307373, + -13.595065116882324, + -23.570241928100586, + -18.207683563232422, + -14.21807861328125, + -12.60184097290039 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.autoPad=same-upper", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 20.461893134001002, + 27.71435359605556, + -42.315830233414346, + -51.65346047769157, + 16.158363278823046, + -15.135269805305455, + -24.163065001995136, + 65.25802297619487, + 83.31473695044912, + -21.27687056752295, + 96.84630535255647, + -86.058102648049, + -99.80924333791678, + 34.56699232050829, + -97.49026531735568, + 50.82942572065798, + 72.09933087589434, + -24.73489073432367, + -32.74307455513252, + 48.922122350892096, + 31.59330496290545, + 33.73197892358871, + 2.7375341262959836, + -46.20138588909866, + -27.725801256338926, + -66.8780518480621, + -68.83558472458371, + -45.643418274624146, + 1.1055442599496814, + -88.63018057742154, + 40.13517468441114, + -14.216904330557824 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 15.733845710754395, + -7.014355182647705, + -0.6413905024528503, + -8.968159675598145, + -8.972806930541992, + -23.627302169799805, + -35.13814926147461, + -22.14018440246582 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.autoPad=same-lower", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 20.461893134001002, + 27.71435359605556, + -42.315830233414346, + -51.65346047769157, + 16.158363278823046, + -15.135269805305455, + -24.163065001995136, + 65.25802297619487, + 83.31473695044912, + -21.27687056752295, + 96.84630535255647, + -86.058102648049, + -99.80924333791678, + 34.56699232050829, + -97.49026531735568, + 50.82942572065798, + 72.09933087589434, + -24.73489073432367, + -32.74307455513252, + 48.922122350892096, + 31.59330496290545, + 33.73197892358871, + 2.7375341262959836, + -46.20138588909866, + -27.725801256338926, + -66.8780518480621, + -68.83558472458371, + -45.643418274624146, + 1.1055442599496814, + -88.63018057742154, + 40.13517468441114, + -14.216904330557824 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 12.299835205078125, + -6.715874671936035, + -0.3635484278202057, + 0.3752416968345642, + 28.17243003845215, + -3.047952651977539, + -19.467201232910156, + -28.200092315673828 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.autoPad=same-upper ignores options.padding", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 20.461893134001002, + 27.71435359605556, + -42.315830233414346, + -51.65346047769157, + 16.158363278823046, + -15.135269805305455, + -24.163065001995136, + 65.25802297619487, + 83.31473695044912, + -21.27687056752295, + 96.84630535255647, + -86.058102648049, + -99.80924333791678, + 34.56699232050829, + -97.49026531735568, + 50.82942572065798, + 72.09933087589434, + -24.73489073432367, + -32.74307455513252, + 48.922122350892096, + 31.59330496290545, + 33.73197892358871, + 2.7375341262959836, + -46.20138588909866, + -27.725801256338926, + -66.8780518480621, + -68.83558472458371, + -45.643418274624146, + 1.1055442599496814, + -88.63018057742154, + 40.13517468441114, + -14.216904330557824 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [2, 2, 2, 2], + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 15.733845710754395, + -7.014355182647705, + -0.6413905024528503, + -8.968159675598145, + -8.972806930541992, + -23.627302169799805, + -35.13814926147461, + -22.14018440246582 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.autoPad=same-lower ignores options.padding", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 20.461893134001002, + 27.71435359605556, + -42.315830233414346, + -51.65346047769157, + 16.158363278823046, + -15.135269805305455, + -24.163065001995136, + 65.25802297619487, + 83.31473695044912, + -21.27687056752295, + 96.84630535255647, + -86.058102648049, + -99.80924333791678, + 34.56699232050829, + -97.49026531735568, + 50.82942572065798, + 72.09933087589434, + -24.73489073432367, + -32.74307455513252, + 48.922122350892096, + 31.59330496290545, + 33.73197892358871, + 2.7375341262959836, + -46.20138588909866, + -27.725801256338926, + -66.8780518480621, + -68.83558472458371, + -45.643418274624146, + 1.1055442599496814, + -88.63018057742154, + 40.13517468441114, + -14.216904330557824 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [2, 2, 2, 2], + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 12.299835205078125, + -6.715874671936035, + -0.3635484278202057, + 0.3752416968345642, + 28.17243003845215, + -3.047952651977539, + -19.467201232910156, + -28.200092315673828 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.layout=nchw", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "layout": "nchw" + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + -5.997565746307373, + -14.21807861328125 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.layout=nhwc", + "inputs": { + "input": { + "shape": [1, 5, 5, 2], + "data": [ + 83.46227700254062, + -49.26129609640228, + 33.821312758080836, + 68.73554887005739, + -76.80760955483348, + 2.418686828435483, + -29.45969284637431, + 80.52496201764376, + -46.52967419678973, + -55.300870794659176, + -45.55183988629725, + -59.206964627797646, + -31.01262212241673, + -95.96083088125917, + -64.07866030681286, + -18.597523013363613, + -9.310889091915442, + 47.98993621629046, + -41.08586138776409, + -73.6978064325847, + -73.40547764047231, + -84.76842495411003, + 13.158153901575972, + -75.75077583450742, + -12.270027157926222, + -96.09162719339479, + 76.39896882134298, + -25.728314640543104, + 93.52596758105801, + 43.86839589244039, + 97.13613783584108, + 13.15480395039694, + -1.7500290525074718, + -48.46195196452694, + -61.565025090745664, + -52.95915779740401, + -54.58282317750749, + -14.006732047772985, + -48.486631084255414, + 21.69510814172409, + 60.32106196347354, + 76.66673883399159, + 4.079223599205321, + 48.12142294811815, + 32.319089892863815, + 64.0178574522754, + -41.34668340359866, + 23.612354911278203, + -6.917796525327361, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "layout": "nhwc" + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 2], + "data": [ + -5.997565746307373, + -14.21807861328125 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.roundingType=floor", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "floor" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + -16.694522857666016, + -44.5453987121582, + -19.926599502563477, + -13.494997024536133, + -25.312063217163086, + -2.777101993560791, + -57.62693786621094, + -18.61419105529785 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.roundingType=ceil", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "ceil" + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + -16.694522857666016, + -44.5453987121582, + -43.807769775390625, + -19.926599502563477, + -13.494997024536133, + 1.3178266286849976, + 21.756742477416992, + -30.09664535522461, + -27.702213287353516, + -25.312063217163086, + -2.777101993560791, + -64.49933624267578, + -57.62693786621094, + -18.61419105529785, + -2.7114341259002686, + 16.756620407104492, + -9.017679214477539, + -37.38520050048828 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "floor", + "outputSizes": [3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + -16.694522857666016, + -44.5453987121582, + -43.807769775390625, + -19.926599502563477, + -13.494997024536133, + 1.3178266286849976, + 21.756742477416992, + -30.09664535522461, + -27.702213287353516, + -25.312063217163086, + -2.777101993560791, + -64.49933624267578, + -57.62693786621094, + -18.61419105529785, + -2.7114341259002686, + 16.756620407104492, + -9.017679214477539, + -37.38520050048828 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 83.46227700254062, + 33.821312758080836, + -76.80760955483348, + -29.45969284637431, + -46.52967419678973, + -45.55183988629725, + -31.01262212241673, + -64.07866030681286, + -9.310889091915442, + -41.08586138776409, + -73.40547764047231, + 13.158153901575972, + -12.270027157926222, + 76.39896882134298, + 93.52596758105801, + 97.13613783584108, + -1.7500290525074718, + -61.565025090745664, + -54.58282317750749, + -48.486631084255414, + 60.32106196347354, + 4.079223599205321, + 32.319089892863815, + -41.34668340359866, + -6.917796525327361, + -49.26129609640228, + 68.73554887005739, + 2.418686828435483, + 80.52496201764376, + -55.300870794659176, + -59.206964627797646, + -95.96083088125917, + -18.597523013363613, + 47.98993621629046, + -73.6978064325847, + -84.76842495411003, + -75.75077583450742, + -96.09162719339479, + -25.728314640543104, + 43.86839589244039, + 13.15480395039694, + -48.46195196452694, + -52.95915779740401, + -14.006732047772985, + 21.69510814172409, + 76.66673883399159, + 48.12142294811815, + 64.0178574522754, + 23.612354911278203, + -96.46550907705537 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "ceil", + "outputSizes": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + -16.694522857666016, + -44.5453987121582, + -19.926599502563477, + -13.494997024536133, + -25.312063217163086, + -2.777101993560791, + -57.62693786621094, + -18.61419105529785 + ], + "type": "float32" + } + }, + { + "name": "averagePool2d float32 4D tensor options.dilations with options.strides", + "inputs": { + "input": { + "shape": [1, 7, 7, 2], + "data": [ + -68.62557020696815, + -94.69098419134498, + -21.020286159397685, + 50.44156641351182, + 15.071063373234892, + -44.041774749892994, + -9.447535219701692, + -55.94677811783235, + -14.496251290761379, + 84.60435209328762, + 32.08895103610101, + 30.02557486439966, + 12.77174047614156, + -59.43739359632647, + -44.74592459902858, + 80.70472647641557, + 9.297827824074247, + -5.1739910809300795, + 89.91646781270947, + 29.291514962542124, + -67.17106137197715, + -9.220385990302475, + -3.0612675345675484, + -6.069840480166505, + 79.06002710716876, + 10.560633293664125, + 8.571812725168598, + -83.74724204696471, + -68.48414629851965, + -82.49125080621505, + -2.1553453974851493, + -56.933084460286175, + -2.125115007914772, + 84.70250722493046, + -39.144590796189235, + -33.371187301614526, + -44.54592779846869, + -40.686313030806566, + -27.172248050584088, + -38.596764924548886, + 27.652375471925964, + -66.86280299047876, + 8.320570333120799, + -13.53865131680108, + 19.31360929339614, + 85.24203552494563, + -18.78237401325022, + -66.89417548435287, + -16.25868914233442, + -94.97973255441016, + -65.36039700301487, + -80.44886111849867, + 69.06993214251935, + 66.51368330240794, + 92.25735621185515, + 56.692574512549726, + -34.39699583715945, + 52.732857324738944, + -14.518666460378597, + -22.05865850318709, + -83.52539280923978, + -9.848713344657114, + -35.75608243340662, + 27.082336317817862, + 49.987108951102584, + -77.16894145966208, + 23.242241052087564, + -51.787454140404996, + 72.20162117050077, + -90.39583377665323, + 17.914254107150953, + -16.417600182021275, + 63.21771563714708, + 40.52269549913285, + -23.723125216545824, + -23.955614570055687, + 75.96313672248806, + -14.62187942622188, + -84.58195628508776, + -81.89524618494022, + 56.391043657837116, + -32.7322832219552, + 48.91379183687229, + 48.659523465516315, + -34.62242302694274, + -91.44232505260686, + -84.37861701086531, + 18.940246217480933, + -50.12198201410851, + -50.64309604521409, + -85.15202813282481, + -38.43618902572565, + 83.70284353724381, + -90.83333776018745, + -50.763776934107696, + -23.699537936690135, + 76.3757883969065, + 98.49473223819575 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "autoPad": "explicit", + "strides": [2, 2], + "dilations": [1, 1], + "layout": "nhwc" + }, + "expected": { + "name": "output", + "shape": [1, 3, 3, 2], + "data": [ + -3.351071357727051, + 2.755176067352295, + 1.8019026517868042, + -0.23048464953899384, + 19.15583610534668, + -4.010652542114258, + -1.0493813753128052, + 6.101070880889893, + -18.503662109375, + -24.186275482177734, + 15.163517951965332, + -20.293882369995117, + -7.353377819061279, + 2.864908218383789, + -22.448640823364258, + -46.9700927734375, + 29.124526977539062, + -26.951427459716797 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/batch_normalization.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/batch_normalization.json new file mode 100644 index 00000000000..429992c67c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/batch_normalization.json @@ -0,0 +1,976 @@ +{ + "tests": [ + { + "name": "batchNormalization float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [6], + "data": [ + -7.814267643537363, + -95.6412954353084, + 38.154405424391285, + -55.9520351570133, + -87.8650062484926, + -41.636455304505525 + ], + "type": "float32" + }, + "variance": { + "shape": [6], + "data": [ + 60.311864286118144, + 26.432604504927436, + 53.275636661772396, + 40.146120500534074, + 59.41098289103077, + 35.99981828466932 + ], + "type": "float32" + } + }, + "expected": { + "shape": [4, 6], + "data": [ + -4.312741756439209, + 31.068212509155273, + -13.910240173339844, + 1.4459478855133057, + 22.170541763305664, + -6.407354354858398, + -6.995829105377197, + 18.583200454711914, + -10.831125259399414, + 17.820920944213867, + 16.2480411529541, + 16.447195053100586, + 11.57226848602295, + 1.8526301383972168, + 5.306026458740234, + 24.145092010498047, + 8.629376411437988, + -9.216986656188965, + -0.1989477425813675, + 34.203548431396484, + -16.923160552978516, + 18.671411514282227, + 2.5159497261047363, + 4.921559810638428 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 12.810381162337634, + 63.13715247590298, + -61.6298331266107 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 18.35824023925998, + 41.847234441124506, + 16.128282835364406 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 4], + "data": [ + -12.630594253540039, + 11.967890739440918, + -17.781383514404297, + -13.910285949707031, + 3.0739352703094482, + -22.139259338378906, + -19.36661148071289, + -9.775517463684082, + 5.161267280578613, + 29.53006935119629, + 24.651947021484375, + 29.550840377807617, + 16.161500930786133, + -23.088642120361328, + 14.954023361206055, + 19.656957626342773, + -13.06058406829834, + -24.745210647583008, + -11.206846237182617, + 2.638929843902588, + -5.910898208618164, + 30.871898651123047, + -1.7038332223892212, + 12.331327438354492 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + -16.842504501342773, + 2.2579827308654785, + -20.842041015625, + -17.836172103881836, + -1.7581257820129395, + -19.30902862548828, + -17.37898826599121, + -10.702629089355469, + 6.4271392822265625, + 17.812623977661133, + 15.533489227294922, + 17.822328567504883, + 5.514280319213867, + -24.963077545166016, + 4.576685905456543, + 8.228469848632812, + -12.989363670349121, + -21.123029708862305, + -11.698976516723633, + -2.0609331130981445, + 1.2540507316589355, + 18.43954849243164, + 3.2196571826934814, + 9.777103424072266 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 5D tensor default options", + "inputs": { + "input": { + "shape": [6, 1, 1, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [1], + "data": [ + 35.407824570198215 + ], + "type": "float32" + }, + "variance": { + "shape": [1], + "data": [ + 40.931099315280846 + ], + "type": "float32" + } + }, + "expected": { + "shape": [6, 1, 1, 2, 2], + "data": [ + -11.990972518920898, + 4.4829583168029785, + -15.440524101257324, + -12.847999572753906, + 7.442382335662842, + -18.051416397094727, + -15.247910499572754, + -5.550075531005859, + -11.927642822265625, + 3.369194269180298, + 0.30708834528923035, + 3.382232427597046, + 7.291474342346191, + -18.99486541748047, + 6.4828104972839355, + 9.632428169250488, + -8.871702194213867, + -20.686368942260742, + -6.99733304977417, + 7.002535343170166, + -18.877885818481445, + 4.211489677429199, + -16.237018585205078, + -7.42683744430542 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NCHW tensor options.axis=1", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "axis": 1 + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + -16.842504501342773, + 2.2579827308654785, + -20.842041015625, + -17.836172103881836, + -1.7581257820129395, + -19.30902862548828, + -17.37898826599121, + -10.702629089355469, + 6.4271392822265625, + 17.812623977661133, + 15.533489227294922, + 17.822328567504883, + 5.514280319213867, + -24.963077545166016, + 4.576685905456543, + 8.228469848632812, + -12.989363670349121, + -21.123029708862305, + -11.698976516723633, + -2.0609331130981445, + 1.2540507316589355, + 18.43954849243164, + 3.2196571826934814, + 9.777103424072266 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NHWC tensor options.axis=3", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -41.30732967168238, + 83.0222726565018, + -40.902161220312074, + 64.08864045143429, + -80.08049213079853, + 56.963061967558474, + -63.376671841233104, + -62.144380499565784, + 37.37249789808206, + -46.7903680211994, + -0.10012771650340824, + 57.04647733193906, + 82.05679802728304, + -21.35103988063949, + -85.36802529512583, + -86.11642850667623, + -96.93823797160586, + 62.35185227095363, + 76.88317547014259, + -9.359310262561493, + -68.4724340974042, + 97.03362133579051, + 80.2082435478892, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "axis": 3 + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + -16.842504501342773, + -1.7581257820129395, + 6.4271392822265625, + 2.2579827308654785, + -19.30902862548828, + 17.812623977661133, + -20.842041015625, + -17.37898826599121, + 15.533489227294922, + -17.836172103881836, + -10.702629089355469, + 17.822328567504883, + 5.514280319213867, + -12.989363670349121, + 1.2540507316589355, + -24.963077545166016, + -21.123029708862305, + 18.43954849243164, + 4.576685905456543, + -11.698976516723633, + 3.2196571826934814, + 8.228469848632812, + -2.0609331130981445, + 9.777103424072266 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NCHW tensor options.scale", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "scale": { + "shape": [3], + "data": [ + 65.50171582968795, + -71.00757080938772, + -5.569730877611249 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + -1103.212890625, + 147.90174865722656, + -1365.189453125, + -1168.2999267578125, + 124.84024047851562, + 1371.087158203125, + 1234.0396728515625, + 759.9676513671875, + -35.79743576049805, + -99.2115249633789, + -86.51734924316406, + -99.26557159423828, + 361.19482421875, + -1635.1243896484375, + 299.78076171875, + 538.9788818359375, + 922.3430786132812, + 1499.89501953125, + 830.7158813476562, + 146.3418426513672, + -6.984724998474121, + -102.70331573486328, + -17.9326229095459, + -54.455833435058594 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NCHW tensor options.bias", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "bias": { + "shape": [3], + "data": [ + 64.20446782594775, + 75.28591851497856, + -84.57243127763437 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + 47.36196517944336, + 66.46244812011719, + 43.3624267578125, + 46.36829376220703, + 73.52779388427734, + 55.976890563964844, + 57.90693283081055, + 64.58329010009766, + -78.14529418945312, + -66.75981140136719, + -69.03894805908203, + -66.75010681152344, + 69.71875, + 39.241390228271484, + 68.7811508178711, + 72.43293762207031, + 62.29655456542969, + 54.16288757324219, + 63.586944580078125, + 73.22498321533203, + -83.3183822631836, + -66.13288879394531, + -81.35277557373047, + -74.79533386230469 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NCHW tensor options.epsilon", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "epsilon": 1e-6 // A small value to prevent computational error due to divide-by-zero. + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + -16.842506408691406, + 2.2579832077026367, + -20.842044830322266, + -17.8361759185791, + -1.758125901222229, + -19.309030532836914, + -17.37898826599121, + -10.702629089355469, + 6.427139759063721, + 17.812625885009766, + 15.533490180969238, + 17.822330474853516, + 5.514281272888184, + -24.96308135986328, + 4.576686382293701, + 8.228470802307129, + -12.989363670349121, + -21.123031616210938, + -11.698976516723633, + -2.0609331130981445, + 1.254050850868225, + 18.43954849243164, + 3.2196574211120605, + 9.777103424072266 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NCHW tensor options.activation relu", + "inputs": { + "input": { + "shape": [2, 3, 2, 2], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "activation": "relu" + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + 0, + 2.2579827308654785, + 0, + 0, + 0, + 0, + 0, + 0, + 6.4271392822265625, + 17.812623977661133, + 15.533489227294922, + 17.822328567504883, + 5.514280319213867, + 0, + 4.576685905456543, + 8.228469848632812, + 0, + 0, + 0, + 0, + 1.2540507316589355, + 18.43954849243164, + 3.2196571826934814, + 9.777103424072266 + ], + "type": "float32" + } + }, + { + "name": "batchNormalization float32 4D NHWC tensor all options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -41.30732967168238, + 83.0222726565018, + -40.902161220312074, + 64.08864045143429, + -80.08049213079853, + 56.963061967558474, + -63.376671841233104, + -62.144380499565784, + 37.37249789808206, + -46.7903680211994, + -0.10012771650340824, + 57.04647733193906, + 82.05679802728304, + -21.35103988063949, + -85.36802529512583, + -86.11642850667623, + -96.93823797160586, + 62.35185227095363, + 76.88317547014259, + -9.359310262561493, + -68.4724340974042, + 97.03362133579051, + 80.2082435478892, + -12.107167478351585 + ], + "type": "float32" + }, + "mean": { + "shape": [3], + "data": [ + 51.62914995931095, + 99.36075401019252, + -96.14736495234415 + ], + "type": "float32" + }, + "variance": { + "shape": [3], + "data": [ + 30.448016067921067, + 86.36218998771075, + 73.88454888724165 + ], + "type": "float32" + } + }, + "options": { + "scale": { + "shape": [3], + "data": [ + 65.50171582968795, + -71.00757080938772, + -5.569730877611249 + ], + "type": "float32" + }, + "bias": { + "shape": [3], + "data": [ + 64.20446782594775, + 75.28591851497856, + -84.57243127763437 + ], + "type": "float32" + }, + "axis": 3, + "epsilon": 1e-6, + "activation": "relu" + }, + "expected": { + "shape": [2, 3, 2, 2], + "data": [ + 0, + 200.12615966796875, + 0, + 212.10623168945312, + 1446.3731689453125, + 0, + 0, + 1309.32568359375, + 0, + 0, + 835.2536010742188, + 0, + 425.39935302734375, + 997.6290893554688, + 0, + 0, + 1575.1810302734375, + 0, + 363.98529052734375, + 906.0018310546875, + 0, + 603.1834106445312, + 221.62777709960938, + 0 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/ceil.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/ceil.json new file mode 100644 index 00000000000..6fa623977fc --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/ceil.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "ceil float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + }, + { + "name": "ceil float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + }, + { + "name": "ceil float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + }, + { + "name": "ceil float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + }, + { + "name": "ceil float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/conv2d.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/conv2d.json new file mode 100644 index 00000000000..a4b97d3c039 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/conv2d.json @@ -0,0 +1,2008 @@ +{ + "tests": [ + { + "name": "conv2d float32 4D input and filter tensors default options", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 1, 3, 3], + "data": [ + 2908.13525390625, + -11333.4560546875, + 5481.1240234375, + -1681.341796875, + 17408.30078125, + -18923.2109375, + 6809.322265625, + -3083.824951171875, + -836.0403442382812 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.padding", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 1, 1, 1] + }, + "expected": { + "name": "output", + "shape": [1, 1, 5, 5], + "data": [ + 8060.30126953125, + 11545.3017578125, + 20132.1953125, + -393.7949523925781, + 12431.6650390625, + -17477.419921875, + 2908.13525390625, + -11333.4560546875, + 5481.1240234375, + -19173.296875, + 2139.841552734375, + -1681.341796875, + 17408.30078125, + -18923.2109375, + 6080.80029296875, + -6936.1396484375, + 6809.322265625, + -3083.824951171875, + -836.0403442382812, + -2763.507080078125, + 10943.7373046875, + 9825.8564453125, + -8281.4091796875, + -19478.197265625, + 10950.630859375 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.strides", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "strides": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 1, 2, 2], + "data": [ + 2908.13525390625, + 5481.1240234375, + 6809.322265625, + -836.0403442382812 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.dilations", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "dilations": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 5739.92724609375 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.padding and options.autoPad='explicit'", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 1, 1, 1], + "autoPad": "explicit" + }, + "expected": { + "name": "output", + "shape": [1, 1, 5, 5], + "data": [ + 8060.30126953125, + 11545.3017578125, + 20132.1953125, + -393.7949523925781, + 12431.6650390625, + -17477.419921875, + 2908.13525390625, + -11333.4560546875, + 5481.1240234375, + -19173.296875, + 2139.841552734375, + -1681.341796875, + 17408.30078125, + -18923.2109375, + 6080.80029296875, + -6936.1396484375, + 6809.322265625, + -3083.824951171875, + -836.0403442382812, + -2763.507080078125, + 10943.7373046875, + 9825.8564453125, + -8281.4091796875, + -19478.197265625, + 10950.630859375 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.autoPad='same-upper'", + "inputs": { + "input": { + "shape": [1, 1, 4, 4], + "data": [ + 18.105934933689, + 70.55813791078003, + -65.62170074403721, + 24.848208727531556, + -93.62297692330142, + 83.37537025796374, + -9.196172033614673, + 1.5066891381375882, + 52.11260834588484, + 7.5185010931766385, + 21.054120533810178, + 96.40459791170377, + 14.476107346648888, + 19.978235702772906, + 70.3739360912835, + 84.51258388063664 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 1, 2, 2], + "data": [ + -1673.1219482421875, + 13417.794921875, + -9243.6953125, + 1282.342529296875 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.autoPad='same-upper' ignores options.padding", + "inputs": { + "input": { + "shape": [1, 1, 4, 4], + "data": [ + 18.105934933689, + 70.55813791078003, + -65.62170074403721, + 24.848208727531556, + -93.62297692330142, + 83.37537025796374, + -9.196172033614673, + 1.5066891381375882, + 52.11260834588484, + 7.5185010931766385, + 21.054120533810178, + 96.40459791170377, + 14.476107346648888, + 19.978235702772906, + 70.3739360912835, + 84.51258388063664 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 2, 1, 2], + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 1, 2, 2], + "data": [ + -1673.1219482421875, + 13417.794921875, + -9243.6953125, + 1282.342529296875 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.autoPad='same-lower'", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 1, 3, 3], + "data": [ + 8060.30126953125, + 20132.1953125, + 12431.6650390625, + 2139.841552734375, + 17408.30078125, + 6080.80029296875, + 10943.7373046875, + -8281.4091796875, + 10950.630859375 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.autoPad='same-lower' ignores options.padding", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + -36.64786517159748, + -11.288432057442094, + -76.58016110067685, + 27.405805828795508, + -80.47998789027426, + 76.04182611584571, + 72.35851634441039, + 96.98349851260227, + -27.84947185731808, + 50.58418221559799, + -32.43859311335213, + 23.48380170680882, + -85.38685191828938, + -73.94300271939952, + -15.851227160619004, + 31.57834732127077, + 0.42632253229469086, + -49.37459452307884, + -38.32858663836096, + 95.58856379258197, + -38.56091554697314, + -79.08006476009297, + -24.02026158435868, + 81.30008164674476, + 16.073515803100065 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + -38.07863707159655, + 54.79507725238136, + -88.91290358136841, + 71.58386890759388, + -97.45390798644782, + -69.46620941454853, + 72.25696967588178, + 91.71009194525874, + -45.17980970346187 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 2, 1, 2], + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 1, 3, 3], + "data": [ + 8060.30126953125, + 20132.1953125, + 12431.6650390625, + 2139.841552734375, + 17408.30078125, + 6080.80029296875, + 10943.7373046875, + -8281.4091796875, + 10950.630859375 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.groups", // fused depthwise conv2d + "inputs": { + "input": { + "shape": [1, 4, 2, 2], + "data": [ + -30.62098216953669, + 69.57790329256835, + -52.0063224541361, + 48.03140993290705, + 24.23277190561039, + -72.78153890198729, + -91.01277083869421, + 34.75316811159641, + -6.2202483463238, + -35.71425618316427, + 44.88746106661185, + -2.214918463191836, + 86.77535460315141, + 41.96710954974216, + 20.307392194528802, + 83.57836666526771 + ], + "type": "float32" + }, + "filter": { + "shape": [4, 1, 2, 2], + "data": [ + 54.056351465147884, + 46.60774659264476, + 1.102185243628412, + 92.79458038789136, + 43.4917628781904, + -1.1152923110231399, + -54.126049246965245, + 43.31931949984434, + 40.44247251051826, + -55.56165610054853, + -51.51863795048692, + -71.30274452926221, + 32.15193036680418, + 48.58019833429185, + 88.16357174255782, + 27.032330434044923 + ], + "type": "float32" + } + }, + "options": { + "groups": 4 + }, + "expected": { + "name": "output", + "shape": [1, 4, 1, 1], + "data": [ + 5987.3447265625, + 7566.744140625, + -421.8301696777344, + 8878.4560546875 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nchw'", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nchw" + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + -7795.8662109375, + -5263.5859375, + -3956.7958984375, + -2902.042236328125, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + -1011.6694946289062, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + -3961.98095703125, + -2630.359619140625, + 9567.416015625, + 1465.38720703125, + -330.37286376953125, + 966.962158203125, + -6172.25341796875, + 10064.87109375, + -6111.5146484375, + -3629.30078125, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nhwc'", + "inputs": { + "input": { + "shape": [2, 3, 3, 1], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nhwc" + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5568.4052734375, + -2902.042236328125, + -1011.6694946289062, + -7795.8662109375, + 5364.9755859375, + 12286.8837890625, + -5263.5859375, + 6444.9599609375, + 16343.427734375, + -3956.7958984375, + 1746.465087890625, + 2845.576416015625, + 7533.12744140625, + 1465.38720703125, + 10064.87109375, + -3961.98095703125, + -330.37286376953125, + -6111.5146484375, + -2630.359619140625, + 966.962158203125, + -3629.30078125, + 9567.416015625, + -6172.25341796875, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.filterLayout='oihw'", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "filterLayout": "oihw" + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + -7795.8662109375, + -5263.5859375, + -3956.7958984375, + -2902.042236328125, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + -1011.6694946289062, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + -3961.98095703125, + -2630.359619140625, + 9567.416015625, + 1465.38720703125, + -330.37286376953125, + 966.962158203125, + -6172.25341796875, + 10064.87109375, + -6111.5146484375, + -3629.30078125, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.filterLayout='hwio'", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 2, 1, 3], + "data": [ + -99.3435561600176, + 43.48291548484258, + 61.703687497454496, + -15.90380103916948, + 4.77126464077142, + 66.59348647087108, + -6.070945850968499, + 33.53585259686466, + 67.67284398422174, + -20.092214100373866, + -25.359619829289443, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "filterLayout": "hwio" + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + -7795.8662109375, + -5263.5859375, + -3956.7958984375, + -2902.042236328125, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + -1011.6694946289062, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + -3961.98095703125, + -2630.359619140625, + 9567.416015625, + 1465.38720703125, + -330.37286376953125, + 966.962158203125, + -6172.25341796875, + 10064.87109375, + -6111.5146484375, + -3629.30078125, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.filterLayout='ohwi'", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 2, 2, 1], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "filterLayout": "ohwi" + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + -7795.8662109375, + -5263.5859375, + -3956.7958984375, + -2902.042236328125, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + -1011.6694946289062, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + -3961.98095703125, + -2630.359619140625, + 9567.416015625, + 1465.38720703125, + -330.37286376953125, + 966.962158203125, + -6172.25341796875, + 10064.87109375, + -6111.5146484375, + -3629.30078125, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.filterLayout='ihwo'", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 2, 2, 3], + "data": [ + -99.3435561600176, + 43.48291548484258, + 61.703687497454496, + -15.90380103916948, + 4.77126464077142, + 66.59348647087108, + -6.070945850968499, + 33.53585259686466, + 67.67284398422174, + -20.092214100373866, + -25.359619829289443, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "filterLayout": "ihwo" + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + -7795.8662109375, + -5263.5859375, + -3956.7958984375, + -2902.042236328125, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + -1011.6694946289062, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + -3961.98095703125, + -2630.359619140625, + 9567.416015625, + 1465.38720703125, + -330.37286376953125, + 966.962158203125, + -6172.25341796875, + 10064.87109375, + -6111.5146484375, + -3629.30078125, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='oihw'", + "inputs": { + "input": { + "shape": [2, 3, 3, 1], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "oihw" + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5568.4052734375, + -2902.042236328125, + -1011.6694946289062, + -7795.8662109375, + 5364.9755859375, + 12286.8837890625, + -5263.5859375, + 6444.9599609375, + 16343.427734375, + -3956.7958984375, + 1746.465087890625, + 2845.576416015625, + 7533.12744140625, + 1465.38720703125, + 10064.87109375, + -3961.98095703125, + -330.37286376953125, + -6111.5146484375, + -2630.359619140625, + 966.962158203125, + -3629.30078125, + 9567.416015625, + -6172.25341796875, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='hwio'", + "inputs": { + "input": { + "shape": [2, 3, 3, 1], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 2, 1, 3], + "data": [ + -99.3435561600176, + 43.48291548484258, + 61.703687497454496, + -15.90380103916948, + 4.77126464077142, + 66.59348647087108, + -6.070945850968499, + 33.53585259686466, + 67.67284398422174, + -20.092214100373866, + -25.359619829289443, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "hwio" + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5568.4052734375, + -2902.042236328125, + -1011.6694946289062, + -7795.8662109375, + 5364.9755859375, + 12286.8837890625, + -5263.5859375, + 6444.9599609375, + 16343.427734375, + -3956.7958984375, + 1746.465087890625, + 2845.576416015625, + 7533.12744140625, + 1465.38720703125, + 10064.87109375, + -3961.98095703125, + -330.37286376953125, + -6111.5146484375, + -2630.359619140625, + 966.962158203125, + -3629.30078125, + 9567.416015625, + -6172.25341796875, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ohwi'", + "inputs": { + "input": { + "shape": [2, 3, 3, 1], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 2, 2, 1], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "ohwi" + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5568.4052734375, + -2902.042236328125, + -1011.6694946289062, + -7795.8662109375, + 5364.9755859375, + 12286.8837890625, + -5263.5859375, + 6444.9599609375, + 16343.427734375, + -3956.7958984375, + 1746.465087890625, + 2845.576416015625, + 7533.12744140625, + 1465.38720703125, + 10064.87109375, + -3961.98095703125, + -330.37286376953125, + -6111.5146484375, + -2630.359619140625, + 966.962158203125, + -3629.30078125, + 9567.416015625, + -6172.25341796875, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ihwo'", + "inputs": { + "input": { + "shape": [2, 3, 3, 1], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [1, 2, 2, 3], + "data": [ + -99.3435561600176, + 43.48291548484258, + 61.703687497454496, + -15.90380103916948, + 4.77126464077142, + 66.59348647087108, + -6.070945850968499, + 33.53585259686466, + 67.67284398422174, + -20.092214100373866, + -25.359619829289443, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "inputLayout": "nhwc", + "filterLayout": "ihwo" + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5568.4052734375, + -2902.042236328125, + -1011.6694946289062, + -7795.8662109375, + 5364.9755859375, + 12286.8837890625, + -5263.5859375, + 6444.9599609375, + 16343.427734375, + -3956.7958984375, + 1746.465087890625, + 2845.576416015625, + 7533.12744140625, + 1465.38720703125, + 10064.87109375, + -3961.98095703125, + -330.37286376953125, + -6111.5146484375, + -2630.359619140625, + 966.962158203125, + -3629.30078125, + 9567.416015625, + -6172.25341796875, + -11221.728515625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors 1D options.bias", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "bias": { + "shape": [3], + "data": [ + 81.55456400082096, + -82.00136508263851, + -31.392153284442344 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5649.9599609375, + -7714.3115234375, + -5182.03125, + -3875.2412109375, + -2984.04345703125, + 5282.974609375, + 6362.95849609375, + 1664.4637451171875, + -1043.0616455078125, + 12255.4921875, + 16312.03515625, + 2814.184326171875, + 7614.681640625, + -3880.426513671875, + -2548.80517578125, + 9648.970703125, + 1383.3858642578125, + -412.3742370605469, + 884.9608154296875, + -6254.2548828125, + 10033.478515625, + -6142.90673828125, + -3660.69287109375, + -11253.1201171875 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.activation=relu", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "activation": "relu" // relu operator + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 5568.4052734375, + 0, + 0, + 0, + 0, + 5364.9755859375, + 6444.9599609375, + 1746.465087890625, + 0, + 12286.8837890625, + 16343.427734375, + 2845.576416015625, + 7533.12744140625, + 0, + 0, + 9567.416015625, + 1465.38720703125, + 0, + 966.962158203125, + 0, + 10064.87109375, + 0, + 0, + 0 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.activation=sigmoid", + "inputs": { + "input": { + "shape": [2, 1, 3, 3], + "data": [ + -82.09745244425362, + 67.79213870968346, + 53.992295748407145, + 54.597159309376366, + 58.62164012776881, + -7.635677529217546, + 58.550440497224145, + -72.0703930158927, + -65.0955969572423, + -70.56037981665017, + 60.85068628898233, + -73.84324584046973, + 57.31129997992079, + -91.53292449526842, + -17.57212485674829, + -75.66331658122203, + -57.140511229462064, + 7.572594312616985 + ], + "type": "float32" + }, + "filter": { + "shape": [3, 1, 2, 2], + "data": [ + -99.3435561600176, + -15.90380103916948, + -6.070945850968499, + -20.092214100373866, + 43.48291548484258, + 4.77126464077142, + 33.53585259686466, + -25.359619829289443, + 61.703687497454496, + 66.59348647087108, + 67.67284398422174, + -70.88191146932456 + ], + "type": "float32" + } + }, + "options": { + "activation": "sigmoid" // sigmoid operator + }, + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors options.dilations with options.strides", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + -63.64424551608248, + -78.85768257418673, + -60.83822179117915, + 94.83022245640464, + 33.598670386901034, + -88.438692998837, + 86.1003946486648, + 7.941852027981213, + 60.93210371947637, + 95.28726918060943, + -74.96831230674812, + 92.28334872854867, + -89.83695850789539, + -37.436016366025356, + -77.60731561601948, + 70.44140310874613, + -10.40266266327636, + -35.1891761237796, + 28.266275343843944, + 33.6282817473446, + -57.109660491070045, + 44.09125200564071, + -39.14521304641481, + -82.66091610024824, + 80.29753538522587, + -72.26384100844805, + 17.19961941886767, + 4.85983376686292, + 93.07820565021129, + -85.13032431377093, + -40.325305017053736, + -25.618624652566794, + 45.85732611810843, + -39.63509418394877, + 25.346406505243024, + -52.69763900664244, + 70.88347135827169, + 47.39149460742266, + -34.54832529346072, + -26.775438820089775, + 50.4780008347264, + -77.34380943250395, + -34.39513299587746, + 81.59650931745654, + 14.412025546417297, + -2.472972233013323, + -28.8863012909609, + 85.48447589591751, + -33.97460254548692, + -0.2823406555404233 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 2, 2, 2], + "data": [ + -77.94031438882763, + 54.95497168261258, + 79.34394477783943, + 83.62774335109165, + -41.334312634771074, + -39.73021682110862, + -75.55663348349469, + 79.53395169504302, + -65.14621171202815, + 54.449177987681395, + -27.98560364141953, + 52.51775632097676, + 84.13392199650863, + 26.76643233672165, + 4.087872503607585, + -16.408531598421618 + ], + "type": "float32" + } + }, + "options": { + "strides": [2, 2], + "dilations": [2, 2] + }, + "expected": { + "shape": [2, 1, 2, 2], + "data": [ + -1299.27197265625, + -9558.9091796875, + 382.2482604980469, + -1030.2960205078125, + -8729.2177734375, + 2994.496826171875, + -5043.1591796875, + 10564.0634765625 + ], + "type": "float32" + } + }, + { + "name": "conv2d float32 4D input and filter tensors all options", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + -63.64424551608248, + -78.85768257418673, + -60.83822179117915, + 94.83022245640464, + 33.598670386901034, + -88.438692998837, + 86.1003946486648, + 7.941852027981213, + 60.93210371947637, + 95.28726918060943, + -74.96831230674812, + 92.28334872854867, + -89.83695850789539, + -37.436016366025356, + -77.60731561601948, + 70.44140310874613, + -10.40266266327636, + -35.1891761237796, + 28.266275343843944, + 33.6282817473446, + -57.109660491070045, + 44.09125200564071, + -39.14521304641481, + -82.66091610024824, + 80.29753538522587, + -72.26384100844805, + 17.19961941886767, + 4.85983376686292, + 93.07820565021129, + -85.13032431377093, + -40.325305017053736, + -25.618624652566794, + 45.85732611810843, + -39.63509418394877, + 25.346406505243024, + -52.69763900664244, + 70.88347135827169, + 47.39149460742266, + -34.54832529346072, + -26.775438820089775, + 50.4780008347264, + -77.34380943250395, + -34.39513299587746, + 81.59650931745654, + 14.412025546417297, + -2.472972233013323, + -28.8863012909609, + 85.48447589591751, + -33.97460254548692, + -0.2823406555404233 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 2, 1, 2], + "data": [ + -71.34640071984131, + 91.10855307083517, + 8.93481628625041, + -8.029865260584586, + -87.19957035899309, + 83.83408920645397, + 69.12384362305653, + -61.16795516567643 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 0, 0, 1], + "strides": [1, 1], + "autoPad": "explicit", + "dilations": [1, 1], + "groups": 2, + "inputLayout": "nchw", + "filterLayout": "hwio", + "bias": { + "shape": [2], + "data": [ + 0.8591272719236116, + 36.26041698896728 + ], + "type": "float32" + }, + "activation": "relu" // relu operator + }, + "expected": { + "name": "output", + "shape": [1, 2, 5, 5], + "data": [ + 99.66414642333984, + 2671.843505859375, + 11860.955078125, + 0, + 0, + 17500.47265625, + 0, + 8708.072265625, + 0, + 0, + 19996.1171875, + 0, + 5224.6767578125, + 0, + 0, + 0, + 0, + 11098.2734375, + 1838.085693359375, + 2605.48974609375, + 2909.8671875, + 0, + 463.63958740234375, + 11043.095703125, + 0, + 0, + 1180.9088134765625, + 0, + 13046.634765625, + 0, + 0, + 0, + 6000.43212890625, + 4326.90625, + 0, + 0, + 377.5670166015625, + 10618.79296875, + 0, + 100.84029388427734, + 3628.610107421875, + 1733.635009765625, + 0, + 3062.631103515625, + 0, + 6815.89501953125, + 0, + 5492.03076171875, + 4523.7138671875, + 1325.6494140625 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/cos.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/cos.json new file mode 100644 index 00000000000..4d992325509 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/cos.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "cos float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + }, + { + "name": "cos float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + }, + { + "name": "cos float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + }, + { + "name": "cos float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + }, + { + "name": "cos float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/div.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/div.json new file mode 100644 index 00000000000..d72544e8ec4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/div.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "div float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [24], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { + "name": "div float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [4, 6], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { + "name": "div float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 3, 4], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { + "name": "div float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { + "name": "div float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 1, 2, 3], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { + "name": "div float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + -41.8274145895075 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -0.6922348141670227, + 0.48120367527008057, + 2.145423412322998, + 2.7607734203338623, + -3.10864520072937, + -0.9206274151802063, + -0.6847651600837708, + -0.5914608240127563, + 1.337254285812378, + -0.7458055019378662, + -1.0726968050003052, + 12.770289421081543, + -1.2953946590423584, + 11.376836776733398, + -0.4729740023612976, + -2.910935878753662, + -2.999844551086426, + -2.48069167137146, + -8.683640480041504, + -0.9471967220306396, + 3.1970295906066895, + -0.9385499358177185, + 1.19874107837677, + 0.5645201802253723 + ], + "type": "float32" + } + }, + { + "name": "div float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + 97.32406923941622, + 36.32521858437477, + 26.03785877293791, + 99.4716629828894, + 10.39552272141377, + -30.788942189398625 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 0.6208509802818298, + -2.3928961753845215, + -0.7487602233886719, + -0.15231086313724518, + 1.2943254709243774, + -1.4756466150283813, + 0.627623438835144, + 1.946824550628662, + -1.2012730836868286, + 0.5638142228126526, + 3.7509193420410156, + 0.106381356716156, + 0.33177119493484497, + -0.10121183097362518, + 3.396397352218628, + 0.14445380866527557, + 1.3412691354751587, + -0.5476378798484802, + 0.049492448568344116, + 1.2156614065170288, + -0.5024688243865967, + 0.4480270743370056, + -3.356520175933838, + 2.4065051078796387 + ], + "type": "float32" + } + }, + { + "name": "div float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 75.08295083033457, + -46.22666869833023, + 15.761880659498928, + 8.922299330668352 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 0.8047597408294678, + -1.1576858758926392, + -0.2596609592437744, + 0.3277462124824524, + -0.2910698652267456, + -0.9828438758850098, + 3.8753535747528076, + 4.48669958114624, + -1.9844446182250977, + 6.285772323608398, + 4.370259761810303, + -0.36709925532341003, + 0.4300486445426941, + -0.04896639660000801, + 1.177829384803772, + -0.3108392059803009, + -0.30162662267684937, + -0.36475029587745667, + 0.3055984377861023, + 2.801643133163452, + -0.830053985118866, + 4.994900703430176, + -3.910738945007324, + -8.304333686828613 + ], + "type": "float32" + } + }, + { + "name": "div float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + -41.8274145895075 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -0.6922348141670227, + 0.48120367527008057, + 2.145423412322998, + 2.7607734203338623, + -3.10864520072937, + -0.9206274151802063, + -0.6847651600837708, + -0.5914608240127563, + 1.337254285812378, + -0.7458055019378662, + -1.0726968050003052, + 12.770289421081543, + -1.2953946590423584, + 11.376836776733398, + -0.4729740023612976, + -2.910935878753662, + -2.999844551086426, + -2.48069167137146, + -8.683640480041504, + -0.9471967220306396, + 3.1970295906066895, + -0.9385499358177185, + 1.19874107837677, + 0.5645201802253723 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/exp.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/exp.json new file mode 100644 index 00000000000..886729f2e8a --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/exp.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "exp float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 1.5401084737753479, + 12.774433809954473, + 61.46073034406041, + 30.371593690722648, + -23.07019138708837, + 6.286732075092644, + 24.049592392056553, + 59.17023846672603, + -72.39779325866608, + 76.17325870390891, + 42.745124211838345, + 31.50150770254453, + 15.485609808293518, + -11.397760090390022, + 50.36123123038939, + -83.05469409695672, + 24.110038122659418, + -28.330545051670825, + -53.749036944957986, + -78.11921866998134, + -83.41683875349166, + -89.72063026731117, + -68.90046001676907, + -71.89803038543928 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 4.665096282958984, + 353074.40625, + 4.92103607186909e+26, + 15495851933696, + 9.566272773930962e-11, + 537.3943481445312, + 27835916288, + 4.980902673917305e+25, + 3.614401801447914e-32, + 1.2067705660062333e+33, + 3664138167604216000, + 47965678862336, + 5312696, + 0.000011220586202398408, + 7.440557948065475e+21, + 8.507544403157469e-37, + 29570371584, + 4.968216051233487e-13, + 4.54034731570652e-24, + 1.1837368161912076e-34, + 5.922797145303594e-37, + 1.0834951830036632e-39, + 1.1937427251244527e-30, + 5.957731569649706e-32 + ], + "type": "float32" + } + }, + { + "name": "exp float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 1.5401084737753479, + 12.774433809954473, + 61.46073034406041, + 30.371593690722648, + -23.07019138708837, + 6.286732075092644, + 24.049592392056553, + 59.17023846672603, + -72.39779325866608, + 76.17325870390891, + 42.745124211838345, + 31.50150770254453, + 15.485609808293518, + -11.397760090390022, + 50.36123123038939, + -83.05469409695672, + 24.110038122659418, + -28.330545051670825, + -53.749036944957986, + -78.11921866998134, + -83.41683875349166, + -89.72063026731117, + -68.90046001676907, + -71.89803038543928 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 4.665096282958984, + 353074.40625, + 4.92103607186909e+26, + 15495851933696, + 9.566272773930962e-11, + 537.3943481445312, + 27835916288, + 4.980902673917305e+25, + 3.614401801447914e-32, + 1.2067705660062333e+33, + 3664138167604216000, + 47965678862336, + 5312696, + 0.000011220586202398408, + 7.440557948065475e+21, + 8.507544403157469e-37, + 29570371584, + 4.968216051233487e-13, + 4.54034731570652e-24, + 1.1837368161912076e-34, + 5.922797145303594e-37, + 1.0834951830036632e-39, + 1.1937427251244527e-30, + 5.957731569649706e-32 + ], + "type": "float32" + } + }, + { + "name": "exp float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 1.5401084737753479, + 12.774433809954473, + 61.46073034406041, + 30.371593690722648, + -23.07019138708837, + 6.286732075092644, + 24.049592392056553, + 59.17023846672603, + -72.39779325866608, + 76.17325870390891, + 42.745124211838345, + 31.50150770254453, + 15.485609808293518, + -11.397760090390022, + 50.36123123038939, + -83.05469409695672, + 24.110038122659418, + -28.330545051670825, + -53.749036944957986, + -78.11921866998134, + -83.41683875349166, + -89.72063026731117, + -68.90046001676907, + -71.89803038543928 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 4.665096282958984, + 353074.40625, + 4.92103607186909e+26, + 15495851933696, + 9.566272773930962e-11, + 537.3943481445312, + 27835916288, + 4.980902673917305e+25, + 3.614401801447914e-32, + 1.2067705660062333e+33, + 3664138167604216000, + 47965678862336, + 5312696, + 0.000011220586202398408, + 7.440557948065475e+21, + 8.507544403157469e-37, + 29570371584, + 4.968216051233487e-13, + 4.54034731570652e-24, + 1.1837368161912076e-34, + 5.922797145303594e-37, + 1.0834951830036632e-39, + 1.1937427251244527e-30, + 5.957731569649706e-32 + ], + "type": "float32" + } + }, + { + "name": "exp float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 1.5401084737753479, + 12.774433809954473, + 61.46073034406041, + 30.371593690722648, + -23.07019138708837, + 6.286732075092644, + 24.049592392056553, + 59.17023846672603, + -72.39779325866608, + 76.17325870390891, + 42.745124211838345, + 31.50150770254453, + 15.485609808293518, + -11.397760090390022, + 50.36123123038939, + -83.05469409695672, + 24.110038122659418, + -28.330545051670825, + -53.749036944957986, + -78.11921866998134, + -83.41683875349166, + -89.72063026731117, + -68.90046001676907, + -71.89803038543928 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 4.665096282958984, + 353074.40625, + 4.92103607186909e+26, + 15495851933696, + 9.566272773930962e-11, + 537.3943481445312, + 27835916288, + 4.980902673917305e+25, + 3.614401801447914e-32, + 1.2067705660062333e+33, + 3664138167604216000, + 47965678862336, + 5312696, + 0.000011220586202398408, + 7.440557948065475e+21, + 8.507544403157469e-37, + 29570371584, + 4.968216051233487e-13, + 4.54034731570652e-24, + 1.1837368161912076e-34, + 5.922797145303594e-37, + 1.0834951830036632e-39, + 1.1937427251244527e-30, + 5.957731569649706e-32 + ], + "type": "float32" + } + }, + { + "name": "exp float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 1.5401084737753479, + 12.774433809954473, + 61.46073034406041, + 30.371593690722648, + -23.07019138708837, + 6.286732075092644, + 24.049592392056553, + 59.17023846672603, + -72.39779325866608, + 76.17325870390891, + 42.745124211838345, + 31.50150770254453, + 15.485609808293518, + -11.397760090390022, + 50.36123123038939, + -83.05469409695672, + 24.110038122659418, + -28.330545051670825, + -53.749036944957986, + -78.11921866998134, + -83.41683875349166, + -89.72063026731117, + -68.90046001676907, + -71.89803038543928 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 4.665096282958984, + 353074.40625, + 4.92103607186909e+26, + 15495851933696, + 9.566272773930962e-11, + 537.3943481445312, + 27835916288, + 4.980902673917305e+25, + 3.614401801447914e-32, + 1.2067705660062333e+33, + 3664138167604216000, + 47965678862336, + 5312696, + 0.000011220586202398408, + 7.440557948065475e+21, + 8.507544403157469e-37, + 29570371584, + 4.968216051233487e-13, + 4.54034731570652e-24, + 1.1837368161912076e-34, + 5.922797145303594e-37, + 1.0834951830036632e-39, + 1.1937427251244527e-30, + 5.957731569649706e-32 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/floor.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/floor.json new file mode 100644 index 00000000000..f2fa797d416 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/floor.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "floor float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + }, + { + "name": "floor float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + }, + { + "name": "floor float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + }, + { + "name": "floor float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + }, + { + "name": "floor float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/gemm.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/gemm.json new file mode 100644 index 00000000000..909b8e31cea --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/gemm.json @@ -0,0 +1,1203 @@ +{ + "tests": [ + { + "name": "gemm two float32 2D tensors default options", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + // options.c + { + "name": "gemm two float32 2D tensors options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 18.889006452279048, + -95.25816081317973, + 95.1306201490001, + 1.13149868814682, + -19.256827241243798, + 88.62443187797436, + 44.22624546200123, + 50.84084356198235, + 71.1843403587792, + -25.72466683461711, + 30.327466397585, + -7.36454582600588, + -32.9412812749632, + 92.95072161949355, + -66.34577436039692 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11920.9443359375, + 10380.85546875, + 191.26019287109375, + 3628.372802734375, + 1477.8260498046875, + -4032.20166015625, + 1294.27685546875, + 6429.88720703125, + -963.8916625976562, + 11564.126953125, + 13295.388671875, + 209.7240753173828, + -910.6056518554688, + 2830.976318359375, + -1421.5560302734375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1, 5] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [1, 5], + "data": [ + -46.08045584247486, + 12.700104558525638, + -49.97597734818644, + -71.56076541839265, + -53.631344509247114 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11985.9140625, + 10488.8134765625, + 46.153594970703125, + 3555.6806640625, + 1443.4515380859375, + -4166.90673828125, + 1262.750732421875, + 6329.0703125, + -1106.63671875, + 11536.2197265625, + 13218.9814453125, + 229.78872680664062, + -927.640380859375, + 2666.46484375, + -1408.8416748046875 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [3, 1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [3, 1], + "data": [ + -48.95934179297048, + -43.55337151236051, + -31.267967919315296 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11988.79296875, + 10427.154296875, + 47.170230865478516, + 3578.281982421875, + 1448.12353515625, + -4164.37939453125, + 1206.4971923828125, + 6335.49267578125, + -1078.62939453125, + 11546.2978515625, + 13233.7939453125, + 185.82064819335938, + -908.932373046875, + 2706.757568359375, + -1386.478271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1, 1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [1, 1], + "data": [33.43519470307464], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11906.3984375, + 10509.548828125, + 129.5647735595703, + 3660.676513671875, + 1530.51806640625, + -4087.390869140625, + 1283.48583984375, + 6412.4814453125, + -1001.6408081054688, + 11623.287109375, + 13298.4970703125, + 250.52381896972656, + -844.2291870117188, + 2771.460693359375, + -1321.7750244140625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors broadcast options.c [1] => [3, 5]", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [1], + "data": [33.43519470307464], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11906.3984375, + 10509.548828125, + 129.5647735595703, + 3660.676513671875, + 1530.51806640625, + -4087.390869140625, + 1283.48583984375, + 6412.4814453125, + -1001.6408081054688, + 11623.287109375, + 13298.4970703125, + 250.52381896972656, + -844.2291870117188, + 2771.460693359375, + -1321.7750244140625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors scalar options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": 33.43519470307464 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11906.3984375, + 10509.548828125, + 129.5647735595703, + 3660.676513671875, + 1530.51806640625, + -4087.390869140625, + 1283.48583984375, + 6412.4814453125, + -1001.6408081054688, + 11623.287109375, + 13298.4970703125, + 250.52381896972656, + -844.2291870117188, + 2771.460693359375, + -1321.7750244140625 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.alpha", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "alpha": -14.57079495918343 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 173972.859375, + -152645.296875, + -1400.684326171875, + -52851.7890625, + -21813.6875, + 60043.71484375, + -18214.23046875, + -92947.7734375, + 15081.8798828125, + -168873.34375, + -193282.484375, + -3163.15380859375, + 12788.267578125, + -39895.2109375, + 19746.4921875 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.beta", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "beta": -3.201300236141151 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.c and options.beta", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 18.889006452279048, + -95.25816081317973, + 95.1306201490001, + 1.13149868814682, + -19.256827241243798, + 88.62443187797436, + 44.22624546200123, + 50.84084356198235, + 71.1843403587792, + -25.72466683461711, + 30.327466397585, + -7.36454582600588, + -32.9412812749632, + 92.95072161949355, + -66.34577436039692 + ], + "type": "float32" + }, + "beta": -3.201300236141151 + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -12000.302734375, + 10781.0634765625, + -208.41209411621094, + 3623.619140625, + 1558.729736328125, + -4404.53955078125, + 1108.4691162109375, + 6216.28955078125, + -1262.9583740234375, + 11672.2041015625, + 13167.974609375, + 240.66473388671875, + -772.20947265625, + 2440.46240234375, + -1142.8175048828125 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.aTranspose being true", + "inputs": { + "a": { + "shape": [4, 3], + "data": [ + -56.58740007894356, + -31.754871657825674, + 39.85443764279378, + -8.463693021275105, + -69.0880694716634, + 87.53626229197283, + -33.60814840979707, + -44.633812635599845, + -58.61979797511165, + -69.9345819964675, + 37.83359091108284, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "aTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.aTranspose being explicit false", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "aTranspose": false + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.bTranspose being true", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [5, 4], + "data": [ + 74.15699999092428, + 52.72523586750535, + 32.96952501732156, + 88.49965844336901, + -82.68551467440881, + 40.38894562832144, + -75.39375464830265, + -51.5503195367836, + 82.79218983203177, + -86.1538796254429, + -83.54552683809598, + -17.789968243371447, + -56.619649349016356, + 49.70186032210458, + -16.832533476778934, + -3.978486562449305, + -29.919301737430843, + -88.36174898219937, + -64.06752294643567, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "bTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors options.bTranspose being explicit false", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + -56.58740007894356, + -8.463693021275105, + -33.60814840979707, + -69.9345819964675, + -31.754871657825674, + -69.0880694716634, + -44.633812635599845, + 37.83359091108284, + 39.85443764279378, + 87.53626229197283, + -58.61979797511165, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + 74.15699999092428, + -82.68551467440881, + 82.79218983203177, + -56.619649349016356, + -29.919301737430843, + 52.72523586750535, + 40.38894562832144, + -86.1538796254429, + 49.70186032210458, + -88.36174898219937, + 32.96952501732156, + -75.39375464830265, + -83.54552683809598, + -16.832533476778934, + -64.06752294643567, + 88.49965844336901, + -51.5503195367836, + -17.789968243371447, + -3.978486562449305, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "bTranspose": false + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -11939.8330078125, + 10476.11328125, + 96.12957763671875, + 3627.241455078125, + 1497.0828857421875, + -4120.826171875, + 1250.050537109375, + 6379.04638671875, + -1035.075927734375, + 11589.8515625, + 13265.0615234375, + 217.088623046875, + -877.6643676757812, + 2738.025634765625, + -1355.2103271484375 + ], + "type": "float32" + } + }, + { + "name": "gemm two float32 2D tensors all options", + "inputs": { + "a": { + "shape": [4, 3], + "data": [ + -56.58740007894356, + -31.754871657825674, + 39.85443764279378, + -8.463693021275105, + -69.0880694716634, + 87.53626229197283, + -33.60814840979707, + -44.633812635599845, + -58.61979797511165, + -69.9345819964675, + 37.83359091108284, + 86.17968956956639 + ], + "type": "float32" + }, + "b": { + "shape": [5, 4], + "data": [ + 74.15699999092428, + 52.72523586750535, + 32.96952501732156, + 88.49965844336901, + -82.68551467440881, + 40.38894562832144, + -75.39375464830265, + -51.5503195367836, + 82.79218983203177, + -86.1538796254429, + -83.54552683809598, + -17.789968243371447, + -56.619649349016356, + 49.70186032210458, + -16.832533476778934, + -3.978486562449305, + -29.919301737430843, + -88.36174898219937, + -64.06752294643567, + 44.284669635083674 + ], + "type": "float32" + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 18.889006452279048, + -95.25816081317973, + 95.1306201490001, + 1.13149868814682, + -19.256827241243798, + 88.62443187797436, + 44.22624546200123, + 50.84084356198235, + 71.1843403587792, + -25.72466683461711, + 30.327466397585, + -7.36454582600588, + -32.9412812749632, + 92.95072161949355, + -66.34577436039692 + ], + "type": "float32" + }, + "alpha": -14.57079495918343, + "beta": -3.201300236141151, + "aTranspose": true, + "bTranspose": true + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 173912.390625, + -152340.34375, + -1705.2259521484375, + -52855.4140625, + -21752.041015625, + 59760, + -18355.8125, + -93110.53125, + 14853.9970703125, + -168791, + -193379.578125, + -3139.57763671875, + 12893.72265625, + -40192.7734375, + 19958.884765625 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/log.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/log.json new file mode 100644 index 00000000000..c48406e7075 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/log.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "log float32 positive 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + }, + { + "name": "log float32 positive 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + }, + { + "name": "log float32 positive 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + }, + { + "name": "log float32 positive 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + }, + { + "name": "log float32 positive 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/matmul.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/matmul.json new file mode 100644 index 00000000000..a4ca8d02640 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/matmul.json @@ -0,0 +1,1199 @@ +{ + "tests": [ + { + "name": "matmul float32 1D and 1D tensors produces a scalar", + "inputs": { + "a": { + "shape": [4], + "data": [ + 87.03187851067565, + 46.881337859824384, + 95.82432897408134, + -52.54386718300541 + ], + "type": "float32" + }, + "b": { + "shape": [4], + "data": [ + -26.21038924740793, + 84.99316107761908, + 23.556117398915518, + -36.493155020610416 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 5878.1943359375, + "type": "float32" + } + }, + { + "name": "matmul float32 1D and 2D tensors", + "inputs": { + "a": { + "shape": [4], + "data": [ + 87.03187851067565, + 46.881337859824384, + 95.82432897408134, + -52.54386718300541 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + -27.057616426197043, + -8.230676540860543, + -94.45044554838091, + 37.7386035523445, + 91.59427307661593, + 37.67096896611463, + 39.19007695966195, + -5.7469015282268145, + 60.80050537072776, + 85.74331632981222, + -16.164128914527836, + -16.941906803113767, + -14.541234403419878, + 85.87155145113644, + -5.575109242581533, + -21.09184412126517, + 20.888269634860862, + -34.29842780847672, + -64.89107885075947, + -86.25000925356088 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 5], + "data": [ + -1029.4796142578125, + -1600.045166015625, + -8080.85400390625, + 17773.08203125, + 15989.060546875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 1D and 4D tensors", + "inputs": { + "a": { + "shape": [4], + "data": [ + 87.03187851067565, + 46.881337859824384, + 95.82432897408134, + -52.54386718300541 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 4, 2], + "data": [ + 87.01571665914173, + -86.33499337193098, + 97.28276753778786, + -94.84310342173679, + -48.72689882867056, + -20.114251834386593, + 62.63220233763488, + -47.690344916487604, + -83.0711477010646, + -59.67053428723901, + -92.00803823230994, + -44.09381168273296, + 76.0571640857381, + -24.829392984049335, + 47.47448541811252, + 48.12596751510708, + -95.73054274856334, + 24.911311925192962, + -94.1377493475442, + 55.288037532054034, + 34.24235382729216, + 60.54612700235046, + -39.49250766586001, + -27.449229655771433, + 39.05426564859113, + 71.23308685185657, + 41.59154593231702, + -25.26216043800025, + 4.529367327251549, + -7.7623206692195765, + -61.27877810065749, + 88.54331288808689 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2], + "data": [ + 4173.7265625, + -11381.8671875, + -6749.6640625, + -12168.400390625, + -7388.57275390625, + 12004.1357421875, + 9002.6806640625, + -381.00213623046875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 2D and 1D tensors", + "inputs": { + "a": { + "shape": [5, 4], + "data": [ + -27.057616426197043, + 37.67096896611463, + -16.164128914527836, + -21.09184412126517, + -8.230676540860543, + 39.19007695966195, + -16.941906803113767, + 20.888269634860862, + -94.45044554838091, + -5.7469015282268145, + -14.541234403419878, + -34.29842780847672, + 37.7386035523445, + 60.80050537072776, + 85.87155145113644, + -64.89107885075947, + 91.59427307661593, + 85.74331632981222, + -5.575109242581533, + -86.25000925356088 + ], + "type": "float32" + }, + "b": { + "shape": [4], + "data": [ + 87.03187851067565, + 46.881337859824384, + 95.82432897408134, + -52.54386718300541 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [5, 1], + "data": [ + -1029.4796142578125, + -1600.045166015625, + -8080.85400390625, + 17773.08203125, + 15989.060546875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 2D and 2D tensors", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 53.587843102649884, + -28.04220227801993, + 15.124560502868789, + 9.369427405702211, + 29.073232186993266, + -22.80492074505088, + -1.4674728828148318, + 52.18999070274339, + -49.35624636707217, + 78.39141844611044, + -27.16858445326875, + -37.701154610703554 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + -27.057616426197043, + -8.230676540860543, + -94.45044554838091, + 37.7386035523445, + 91.59427307661593, + 37.67096896611463, + 39.19007695966195, + -5.7469015282268145, + 60.80050537072776, + 85.74331632981222, + -16.164128914527836, + -16.941906803113767, + -14.541234403419878, + 85.87155145113644, + -5.575109242581533, + -21.09184412126517, + 20.888269634860862, + -34.29842780847672, + -64.89107885075947, + -86.25000925356088 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + -2948.43017578125, + -1600.568115234375, + -5441.5263671875, + 1008.1275024414062, + 1611.4742431640625, + -2722.798583984375, + -17.998613357543945, + -4383.6181640625, + -3802.04638671875, + -3785.633544921875, + 5522.88623046875, + 3151.177001953125, + 5899.36669921875, + 3017.06201171875, + 5603.98291015625 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 3D and 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 58.728908586525506, + 20.984989443196596, + -36.853694809557155, + -79.26948512648524, + -31.068943219633155, + -16.201444534612236, + -50.60932522172865, + 2.158781021722419, + -72.35992861880858, + 80.72179024484393, + 91.79413777766845, + -32.80066808871243, + -7.748154791717482, + 47.04567455956982, + -69.93563358196235, + -2.857472923841442, + 61.11868807043689, + 15.150240159985088, + 37.32774132825227, + -4.4238024429129865, + 94.76521432994485, + -69.80973130621896, + -34.96991276425953, + -6.554412653425558 + ], + "type": "float32" + }, + "b": { + "shape": [2, 4, 5], + "data": [ + -37.54479939805191, + 62.03863390760466, + -59.58524466155506, + 87.46986567478658, + -50.24249814528532, + -58.06832556448569, + 23.301210236945906, + -72.89992470211942, + 9.570174232379543, + -81.2456676216478, + 48.35520180490283, + 41.81854877503463, + -50.21333174370568, + 4.21435975938671, + -96.19639534469364, + 67.85069325841712, + 21.29252639361772, + -16.455932756098562, + -50.2602146922619, + -66.71804190955655, + 38.190547173557434, + 18.932724208660005, + -79.76510066105024, + 50.23685112271045, + -55.41115098394904, + -23.46097001302381, + 60.487737276030884, + 42.73717646741534, + 62.90725873470754, + -33.23606967299759, + -36.86769406805803, + -91.52910565691018, + -80.54363103589677, + 4.079093694012187, + 95.70199024173527, + -44.45859861409356, + 52.830588721449885, + 68.41889201734026, + -11.707749491474402, + 75.9785719044454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 5], + "data": [ + -10584.0859375, + 903.4213256835938, + -1874.1802978515625, + 9166.6259765625, + 4178.27099609375, + -193.48135375976562, + -4375.4306640625, + 5538.07275390625, + -3194.43359375, + 7601.68359375, + 242.53622436523438, + 532.092529296875, + -5642.55224609375, + -3521.36962890625, + -9564.6201171875, + 1305.7613525390625, + 8949.1767578125, + 8065.99609375, + 2318.451904296875, + -8044.36474609375, + 799.2051391601562, + -1576.73974609375, + -7536.84326171875, + 4227.5263671875, + -653.9664916992188, + 6837.599609375, + 426.02252197265625, + -8174.26904296875, + 303.2590637207031, + -6775.53369140625 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 3D and 3D (broadcast) tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 58.728908586525506, + 20.984989443196596, + -36.853694809557155, + -79.26948512648524, + -31.068943219633155, + -16.201444534612236, + -50.60932522172865, + 2.158781021722419, + -72.35992861880858, + 80.72179024484393, + 91.79413777766845, + -32.80066808871243, + -7.748154791717482, + 47.04567455956982, + -69.93563358196235, + -2.857472923841442, + 61.11868807043689, + 15.150240159985088, + 37.32774132825227, + -4.4238024429129865, + 94.76521432994485, + -69.80973130621896, + -34.96991276425953, + -6.554412653425558 + ], + "type": "float32" + }, + "b": { + "shape": [1, 4, 1], + "data": [ + -26.21038924740793, + 84.99316107761908, + 23.556117398915518, + -36.493155020610416 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 1], + "data": [ + 2268.936767578125, + -1833.6229248046875, + 12116.6953125, + 2658.509033203125, + 726.4573364257812, + -9001.7470703125 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 3D and 2D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 58.728908586525506, + 20.984989443196596, + -36.853694809557155, + -79.26948512648524, + -31.068943219633155, + -16.201444534612236, + -50.60932522172865, + 2.158781021722419, + -72.35992861880858, + 80.72179024484393, + 91.79413777766845, + -32.80066808871243, + -7.748154791717482, + 47.04567455956982, + -69.93563358196235, + -2.857472923841442, + 61.11868807043689, + 15.150240159985088, + 37.32774132825227, + -4.4238024429129865, + 94.76521432994485, + -69.80973130621896, + -34.96991276425953, + -6.554412653425558 + ], + "type": "float32" + }, + "b": { + "shape": [4, 1], + "data": [ + -26.21038924740793, + 84.99316107761908, + 23.556117398915518, + -36.493155020610416 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 1], + "data": [ + 2268.936767578125, + -1833.6229248046875, + 12116.6953125, + 2658.509033203125, + 726.4573364257812, + -9001.7470703125 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 3D and 1D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 58.728908586525506, + 20.984989443196596, + -36.853694809557155, + -79.26948512648524, + -31.068943219633155, + -16.201444534612236, + -50.60932522172865, + 2.158781021722419, + -72.35992861880858, + 80.72179024484393, + 91.79413777766845, + -32.80066808871243, + -7.748154791717482, + 47.04567455956982, + -69.93563358196235, + -2.857472923841442, + 61.11868807043689, + 15.150240159985088, + 37.32774132825227, + -4.4238024429129865, + 94.76521432994485, + -69.80973130621896, + -34.96991276425953, + -6.554412653425558 + ], + "type": "float32" + }, + "b": { + "shape": [4], + "data": [ + -26.21038924740793, + 84.99316107761908, + 23.556117398915518, + -36.493155020610416 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 1], + "data": [ + 2268.936767578125, + -1833.6229248046875, + 12116.6953125, + 2658.509033203125, + 726.4573364257812, + -9001.7470703125 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 4D and 4D (broadcast) tensors", + "inputs": { + "a": { + "shape": [2, 2, 3, 4], + "data": [ + -57.78256298118967, + -97.60594774508071, + 65.81871222255083, + 15.513092740816958, + 23.98655054563386, + -21.967424588709946, + 18.886694823929503, + -24.35213075030606, + -14.290771884477223, + 27.107064409596987, + -30.5553771654659, + 62.92884749021695, + 21.303536293227893, + -8.442491388430852, + 17.763053699220464, + -82.98418612293332, + -61.72257181975205, + -78.53204624132334, + 19.007175025924596, + -74.80765254527185, + -18.60249486224501, + -72.09066341524397, + 80.89076690500559, + 5.581122924805243, + -18.024148599640455, + 50.81262521893612, + -38.77959477414357, + 8.017349716674758, + 78.64766425508046, + -9.9506827380321, + 12.373807304160238, + 27.171930514383064, + -59.760329260919235, + 83.40591150488996, + 15.431053425642105, + 50.84504411456078, + -70.6015952433627, + -81.89265843512862, + 91.66120960135197, + -41.97235924914904, + 80.61416970815279, + -56.76420682646275, + -11.13108082468139, + 7.567520367062343, + -54.871302687181924, + 32.13136431765244, + -14.166689175692596, + -91.38920754453154 + ], + "type": "float32" + }, + "b": { + "shape": [1, 1, 4, 5], + "data": [ + -27.057616426197043, + -8.230676540860543, + -94.45044554838091, + 37.7386035523445, + 91.59427307661593, + 37.67096896611463, + 39.19007695966195, + -5.7469015282268145, + 60.80050537072776, + 85.74331632981222, + -16.164128914527836, + -16.941906803113767, + -14.541234403419878, + 85.87155145113644, + -5.575109242581533, + -21.09184412126517, + 20.888269634860862, + -34.29842780847672, + -64.89107885075947, + -86.25000925356088 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 3, 5], + "data": [ + -3504.553955078125, + -4140.64794921875, + 4529.36083984375, + -3469.830810546875, + -15366.560546875, + -1268.2086181640625, + -1886.9810791015625, + -1578.69189453125, + 2771.654052734375, + 2308.547119140625, + 574.439208984375, + 3012.091796875, + -520.0595092773438, + -5598.548828125, + -4241.96728515625, + 568.7055053710938, + -2540.54052734375, + 624.3200073242188, + 7200.931640625, + 8285.75, + -17.715293884277344, + -4454.27880859375, + 8570.4375, + -617.5867919921875, + -6040.83837890625, + -3637.630615234375, + -3925.991455078125, + 803.6365356445312, + 1498.8699951171875, + -8817.521484375, + 2859.5888671875, + 2964.170654296875, + 1699.29443359375, + -1441.0911865234375, + 2230.63818359375, + -3275.98828125, + -679.3528442382812, + -8483.0068359375, + 1662.388671875, + 3937.906982421875, + 3437.1083984375, + 4561.18603515625, + 3196.772705078125, + 841.5494995117188, + -2793.61962890625, + -1771.0140380859375, + -5057.92626953125, + 7245.69970703125, + 2951.200927734375, + -10379.35546875, + -4299.2783203125, + -2541.44873046875, + -7385.52001953125, + -1855.9342041015625, + 1926.0032958984375, + 4851.66552734375, + 41.90695571899414, + 8338.470703125, + 4596.6650390625, + 5690.45263671875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 4D and 3D tensors", + "inputs": { + "a": { + "shape": [2, 2, 3, 4], + "data": [ + -57.78256298118967, + -97.60594774508071, + 65.81871222255083, + 15.513092740816958, + 23.98655054563386, + -21.967424588709946, + 18.886694823929503, + -24.35213075030606, + -14.290771884477223, + 27.107064409596987, + -30.5553771654659, + 62.92884749021695, + 21.303536293227893, + -8.442491388430852, + 17.763053699220464, + -82.98418612293332, + -61.72257181975205, + -78.53204624132334, + 19.007175025924596, + -74.80765254527185, + -18.60249486224501, + -72.09066341524397, + 80.89076690500559, + 5.581122924805243, + -18.024148599640455, + 50.81262521893612, + -38.77959477414357, + 8.017349716674758, + 78.64766425508046, + -9.9506827380321, + 12.373807304160238, + 27.171930514383064, + -59.760329260919235, + 83.40591150488996, + 15.431053425642105, + 50.84504411456078, + -70.6015952433627, + -81.89265843512862, + 91.66120960135197, + -41.97235924914904, + 80.61416970815279, + -56.76420682646275, + -11.13108082468139, + 7.567520367062343, + -54.871302687181924, + 32.13136431765244, + -14.166689175692596, + -91.38920754453154 + ], + "type": "float32" + }, + "b": { + "shape": [2, 4, 5], + "data": [ + -37.54479939805191, + 62.03863390760466, + -59.58524466155506, + 87.46986567478658, + -50.24249814528532, + -58.06832556448569, + 23.301210236945906, + -72.89992470211942, + 9.570174232379543, + -81.2456676216478, + 48.35520180490283, + 41.81854877503463, + -50.21333174370568, + 4.21435975938671, + -96.19639534469364, + 67.85069325841712, + 21.29252639361772, + -16.455932756098562, + -50.2602146922619, + -66.71804190955655, + 38.190547173557434, + 18.932724208660005, + -79.76510066105024, + 50.23685112271045, + -55.41115098394904, + -23.46097001302381, + 60.487737276030884, + 42.73717646741534, + 62.90725873470754, + -33.23606967299759, + -36.86769406805803, + -91.52910565691018, + -80.54363103589677, + 4.079093694012187, + 95.70199024173527, + -44.45859861409356, + 52.830588721449885, + 68.41889201734026, + -11.707749491474402, + 75.9785719044454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 3, 5], + "data": [ + 12072.5, + -2776.33203125, + 6998.1953125, + -6490.646484375, + 3466.6748046875, + -363.9977722167969, + 1247.5211181640625, + -375.4477233886719, + 3191.406982421875, + 387.5083923339844, + 1754.73681640625, + -192.81997680664062, + -625.8494262695312, + -4282.18115234375, + -2743.499755859375, + 4046.140380859375, + -6117.27294921875, + -9168.4736328125, + 1583.1436767578125, + -5504.91796875, + 2110.311767578125, + -11610.64453125, + -5082.09423828125, + -7087.62158203125, + 2165.461181640625, + -2249.5078125, + -11821.802734375, + -7730.50341796875, + -5204.93798828125, + 11592.2490234375, + -3605.103515625, + -1385.1947021484375, + -814.943603515625, + -1656.6690673828125, + -27.17203140258789, + 66.98078918457031, + 5743.3447265625, + -5029.3056640625, + 5470.5517578125, + -6146.1787109375, + 1596.490966796875, + -36.0668830871582, + -4130.99853515625, + -6919.4697265625, + -8650.5546875, + -2288.33740234375, + -16897.275390625, + -8122.7470703125, + -7833.14794921875, + 12217.06640625, + 4484.37841796875, + -488.6781311035156, + -7441.83984375, + 344.9179992675781, + -3070.60205078125, + 1735.93115234375, + -2626.791015625, + 638.3070068359375, + 276.9090881347656, + -6326.83935546875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 5D and 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 3, 4], + "data": [ + -57.78256298118967, + -97.60594774508071, + 65.81871222255083, + 15.513092740816958, + 23.98655054563386, + -21.967424588709946, + 18.886694823929503, + -24.35213075030606, + -14.290771884477223, + 27.107064409596987, + -30.5553771654659, + 62.92884749021695, + 21.303536293227893, + -8.442491388430852, + 17.763053699220464, + -82.98418612293332, + -61.72257181975205, + -78.53204624132334, + 19.007175025924596, + -74.80765254527185, + -18.60249486224501, + -72.09066341524397, + 80.89076690500559, + 5.581122924805243, + -18.024148599640455, + 50.81262521893612, + -38.77959477414357, + 8.017349716674758, + 78.64766425508046, + -9.9506827380321, + 12.373807304160238, + 27.171930514383064, + -59.760329260919235, + 83.40591150488996, + 15.431053425642105, + 50.84504411456078, + -70.6015952433627, + -81.89265843512862, + 91.66120960135197, + -41.97235924914904, + 80.61416970815279, + -56.76420682646275, + -11.13108082468139, + 7.567520367062343, + -54.871302687181924, + 32.13136431765244, + -14.166689175692596, + -91.38920754453154 + ], + "type": "float32" + }, + "b": { + "shape": [1, 1, 1, 4, 5], + "data": [ + -27.057616426197043, + -8.230676540860543, + -94.45044554838091, + 37.7386035523445, + 91.59427307661593, + 37.67096896611463, + 39.19007695966195, + -5.7469015282268145, + 60.80050537072776, + 85.74331632981222, + -16.164128914527836, + -16.941906803113767, + -14.541234403419878, + 85.87155145113644, + -5.575109242581533, + -21.09184412126517, + 20.888269634860862, + -34.29842780847672, + -64.89107885075947, + -86.25000925356088 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 3, 5], + "data": [ + -3504.553955078125, + -4140.64794921875, + 4529.36083984375, + -3469.830810546875, + -15366.560546875, + -1268.2086181640625, + -1886.9810791015625, + -1578.69189453125, + 2771.654052734375, + 2308.547119140625, + 574.439208984375, + 3012.091796875, + -520.0595092773438, + -5598.548828125, + -4241.96728515625, + 568.7055053710938, + -2540.54052734375, + 624.3200073242188, + 7200.931640625, + 8285.75, + -17.715293884277344, + -4454.27880859375, + 8570.4375, + -617.5867919921875, + -6040.83837890625, + -3637.630615234375, + -3925.991455078125, + 803.6365356445312, + 1498.8699951171875, + -8817.521484375, + 2859.5888671875, + 2964.170654296875, + 1699.29443359375, + -1441.0911865234375, + 2230.63818359375, + -3275.98828125, + -679.3528442382812, + -8483.0068359375, + 1662.388671875, + 3937.906982421875, + 3437.1083984375, + 4561.18603515625, + 3196.772705078125, + 841.5494995117188, + -2793.61962890625, + -1771.0140380859375, + -5057.92626953125, + 7245.69970703125, + 2951.200927734375, + -10379.35546875, + -4299.2783203125, + -2541.44873046875, + -7385.52001953125, + -1855.9342041015625, + 1926.0032958984375, + 4851.66552734375, + 41.90695571899414, + 8338.470703125, + 4596.6650390625, + 5690.45263671875 + ], + "type": "float32" + } + }, + { + "name": "matmul float32 5D and 2D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 3, 4], + "data": [ + -57.78256298118967, + -97.60594774508071, + 65.81871222255083, + 15.513092740816958, + 23.98655054563386, + -21.967424588709946, + 18.886694823929503, + -24.35213075030606, + -14.290771884477223, + 27.107064409596987, + -30.5553771654659, + 62.92884749021695, + 21.303536293227893, + -8.442491388430852, + 17.763053699220464, + -82.98418612293332, + -61.72257181975205, + -78.53204624132334, + 19.007175025924596, + -74.80765254527185, + -18.60249486224501, + -72.09066341524397, + 80.89076690500559, + 5.581122924805243, + -18.024148599640455, + 50.81262521893612, + -38.77959477414357, + 8.017349716674758, + 78.64766425508046, + -9.9506827380321, + 12.373807304160238, + 27.171930514383064, + -59.760329260919235, + 83.40591150488996, + 15.431053425642105, + 50.84504411456078, + -70.6015952433627, + -81.89265843512862, + 91.66120960135197, + -41.97235924914904, + 80.61416970815279, + -56.76420682646275, + -11.13108082468139, + 7.567520367062343, + -54.871302687181924, + 32.13136431765244, + -14.166689175692596, + -91.38920754453154 + ], + "type": "float32" + }, + "b": { + "shape": [4, 5], + "data": [ + -27.057616426197043, + -8.230676540860543, + -94.45044554838091, + 37.7386035523445, + 91.59427307661593, + 37.67096896611463, + 39.19007695966195, + -5.7469015282268145, + 60.80050537072776, + 85.74331632981222, + -16.164128914527836, + -16.941906803113767, + -14.541234403419878, + 85.87155145113644, + -5.575109242581533, + -21.09184412126517, + 20.888269634860862, + -34.29842780847672, + -64.89107885075947, + -86.25000925356088 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 3, 5], + "data": [ + -3504.553955078125, + -4140.64794921875, + 4529.36083984375, + -3469.830810546875, + -15366.560546875, + -1268.2086181640625, + -1886.9810791015625, + -1578.69189453125, + 2771.654052734375, + 2308.547119140625, + 574.439208984375, + 3012.091796875, + -520.0595092773438, + -5598.548828125, + -4241.96728515625, + 568.7055053710938, + -2540.54052734375, + 624.3200073242188, + 7200.931640625, + 8285.75, + -17.715293884277344, + -4454.27880859375, + 8570.4375, + -617.5867919921875, + -6040.83837890625, + -3637.630615234375, + -3925.991455078125, + 803.6365356445312, + 1498.8699951171875, + -8817.521484375, + 2859.5888671875, + 2964.170654296875, + 1699.29443359375, + -1441.0911865234375, + 2230.63818359375, + -3275.98828125, + -679.3528442382812, + -8483.0068359375, + 1662.388671875, + 3937.906982421875, + 3437.1083984375, + 4561.18603515625, + 3196.772705078125, + 841.5494995117188, + -2793.61962890625, + -1771.0140380859375, + -5057.92626953125, + 7245.69970703125, + 2951.200927734375, + -10379.35546875, + -4299.2783203125, + -2541.44873046875, + -7385.52001953125, + -1855.9342041015625, + 1926.0032958984375, + 4851.66552734375, + 41.90695571899414, + 8338.470703125, + 4596.6650390625, + 5690.45263671875 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/max.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/max.json new file mode 100644 index 00000000000..27a258248fc --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/max.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "max float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [24], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { + "name": "max float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [4, 6], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { + "name": "max float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 3, 4], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { + "name": "max float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { + "name": "max float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 1, 2, 3], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { + "name": "max float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 48.261154377933934 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 48.26115417480469, + 88.1480712890625, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 50.771915435791016, + 48.26115417480469, + 50.57254409790039, + 48.26115417480469, + 50.21434020996094, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 57.25886917114258, + 48.26115417480469, + 73.71659851074219, + 48.26115417480469, + 79.85667419433594, + 48.26115417480469, + 48.26115417480469, + 65.67964935302734, + 99.89971160888672, + 48.26115417480469 + ], + "type": "float32" + } + }, + { + "name": "max float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + 49.523128811715225, + -61.55576225687129, + -6.564808468730291, + 93.32226979251419, + 3.3104185798987515, + -98.31839935789897 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 49.523128509521484, + 88.1480712890625, + -6.564808368682861, + 93.32227325439453, + 19.51302146911621, + -62.87843704223633, + 50.771915435791016, + -56.91352081298828, + 50.57254409790039, + 93.32227325439453, + 50.21434020996094, + 20.59501075744629, + 49.523128509521484, + -61.555763244628906, + 57.25886917114258, + 93.32227325439453, + 73.71659851074219, + 21.347652435302734, + 79.85667419433594, + -22.918458938598633, + 1.2300019264221191, + 93.32227325439453, + 99.89971160888672, + -62.321685791015625 + ], + "type": "float32" + } + }, + { + "name": "max float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 39.32178507655172, + 44.523740611524744, + 58.046287381834105, + 84.13702482473266 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 39.32178497314453, + 88.1480712890625, + 39.32178497314453, + 44.523738861083984, + 44.523738861083984, + 44.523738861083984, + 58.046287536621094, + 58.046287536621094, + 58.046287536621094, + 84.13702392578125, + 84.13702392578125, + 84.13702392578125, + 39.32178497314453, + 39.32178497314453, + 57.25886917114258, + 44.523738861083984, + 73.71659851074219, + 44.523738861083984, + 79.85667419433594, + 58.046287536621094, + 58.046287536621094, + 84.13702392578125, + 99.89971160888672, + 84.13702392578125 + ], + "type": "float32" + } + }, + { + "name": "max float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 48.261154377933934 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 48.26115417480469, + 88.1480712890625, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 50.771915435791016, + 48.26115417480469, + 50.57254409790039, + 48.26115417480469, + 50.21434020996094, + 48.26115417480469, + 48.26115417480469, + 48.26115417480469, + 57.25886917114258, + 48.26115417480469, + 73.71659851074219, + 48.26115417480469, + 79.85667419433594, + 48.26115417480469, + 48.26115417480469, + 65.67964935302734, + 99.89971160888672, + 48.26115417480469 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/max_pool2d.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/max_pool2d.json new file mode 100644 index 00000000000..cf426620e56 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/max_pool2d.json @@ -0,0 +1,1368 @@ +{ + "tests": [ + { + "name": "maxPool2d float32 4D tensor default options", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 99.28312683105469, + 81.73119354248047 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.windowDimensions", + "inputs":{ + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + 99.28312683105469, + 99.28312683105469, + 66.09259033203125, + 99.28312683105469, + 99.28312683105469, + 72.1085205078125, + 97.90348052978516, + 72.1085205078125, + 72.1085205078125, + 81.73119354248047, + 72.44898986816406, + 72.44898986816406, + 81.73119354248047, + 72.8883056640625, + 72.44898986816406, + 80.30484008789062, + 72.8883056640625, + 72.33577728271484 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.padding", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 0, 0, 1] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 99.28312683105469, + 99.28312683105469, + 99.28312683105469, + 99.28312683105469, + 81.73119354248047, + 72.8883056640625, + 81.73119354248047, + 72.8883056640625 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.strides", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 99.28312683105469, + 66.09259033203125, + 97.90348052978516, + 72.1085205078125, + 81.73119354248047, + 72.44898986816406, + 80.30484008789062, + 72.33577728271484 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.dilations", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "dilations": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 89.00830078125, + 72.33577728271484 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.autoPad=explicit", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "padding": [1, 0, 0, 1], + "autoPad": "explicit" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 99.28312683105469, + 99.28312683105469, + 99.28312683105469, + 99.28312683105469, + 81.73119354248047, + 72.8883056640625, + 81.73119354248047, + 72.8883056640625 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.autoPad=same-upper", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 90.19580379109371, + 3.100482753598527, + 25.328822520960074, + 95.79016799138552, + -28.66704447898583, + -95.44752500898142, + -4.985161962403197, + -8.48460109616957, + -80.97691341362152, + -17.005109111308727, + -6.038760193142295, + 38.40922446364979, + -7.992178512477196, + 81.2006267730795, + 20.61885063772428, + -33.95224998477518, + -96.69404524982971, + -80.66036026545542, + 14.05812623156973, + 71.19384576769727, + 90.27735528668126, + -98.09758264975711, + 79.82735855507025, + 51.29492635990994, + 97.67522462775861, + -28.093948900517333, + 6.811551163368804, + 62.81929061329504, + -74.77656671772914, + 81.95471994368236, + 79.12276218750796, + -79.67557686936195 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 90.19580078125, + 95.79016876220703, + 81.20063018798828, + 38.40922546386719, + 97.67522430419922, + 79.82736206054688, + 97.67522430419922, + 79.12276458740234 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.autoPad=same-lower", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 90.19580379109371, + 3.100482753598527, + 25.328822520960074, + 95.79016799138552, + -28.66704447898583, + -95.44752500898142, + -4.985161962403197, + -8.48460109616957, + -80.97691341362152, + -17.005109111308727, + -6.038760193142295, + 38.40922446364979, + -7.992178512477196, + 81.2006267730795, + 20.61885063772428, + -33.95224998477518, + -96.69404524982971, + -80.66036026545542, + 14.05812623156973, + 71.19384576769727, + 90.27735528668126, + -98.09758264975711, + 79.82735855507025, + 51.29492635990994, + 97.67522462775861, + -28.093948900517333, + 6.811551163368804, + 62.81929061329504, + -74.77656671772914, + 81.95471994368236, + 79.12276218750796, + -79.67557686936195 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 90.19580078125, + 95.79016876220703, + 81.20063018798828, + 81.20063018798828, + 90.27735900878906, + 79.82736206054688, + 97.67522430419922, + 81.95471954345703 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.autoPad=same-upper ignores options.padding", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 90.19580379109371, + 3.100482753598527, + 25.328822520960074, + 95.79016799138552, + -28.66704447898583, + -95.44752500898142, + -4.985161962403197, + -8.48460109616957, + -80.97691341362152, + -17.005109111308727, + -6.038760193142295, + 38.40922446364979, + -7.992178512477196, + 81.2006267730795, + 20.61885063772428, + -33.95224998477518, + -96.69404524982971, + -80.66036026545542, + 14.05812623156973, + 71.19384576769727, + 90.27735528668126, + -98.09758264975711, + 79.82735855507025, + 51.29492635990994, + 97.67522462775861, + -28.093948900517333, + 6.811551163368804, + 62.81929061329504, + -74.77656671772914, + 81.95471994368236, + 79.12276218750796, + -79.67557686936195 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [2, 2, 2, 2], + "strides": [2, 2], + "autoPad": "same-upper" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 90.19580078125, + 95.79016876220703, + 81.20063018798828, + 38.40922546386719, + 97.67522430419922, + 79.82736206054688, + 97.67522430419922, + 79.12276458740234 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.autoPad=same-lower ignores options.padding", + "inputs": { + "input": { + "shape": [1, 2, 4, 4], + "data": [ + 90.19580379109371, + 3.100482753598527, + 25.328822520960074, + 95.79016799138552, + -28.66704447898583, + -95.44752500898142, + -4.985161962403197, + -8.48460109616957, + -80.97691341362152, + -17.005109111308727, + -6.038760193142295, + 38.40922446364979, + -7.992178512477196, + 81.2006267730795, + 20.61885063772428, + -33.95224998477518, + -96.69404524982971, + -80.66036026545542, + 14.05812623156973, + 71.19384576769727, + 90.27735528668126, + -98.09758264975711, + 79.82735855507025, + 51.29492635990994, + 97.67522462775861, + -28.093948900517333, + 6.811551163368804, + 62.81929061329504, + -74.77656671772914, + 81.95471994368236, + 79.12276218750796, + -79.67557686936195 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [2, 2, 2, 2], + "strides": [2, 2], + "autoPad": "same-lower" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 90.19580078125, + 95.79016876220703, + 81.20063018798828, + 81.20063018798828, + 90.27735900878906, + 79.82736206054688, + 97.67522430419922, + 81.95471954345703 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.layout=nchw", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "layout": "nchw" + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 99.28312683105469, + 81.73119354248047 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.layout=nhwc", + "inputs": { + "input": { + "shape": [1, 5, 5, 2], + "data": [ + 89.00830216793153, + -76.72171237621149, + -45.720390400208274, + 50.21706410294061, + -61.3061304134967, + -52.89547724835329, + -4.014514560596496, + -44.64233565670091, + -94.54893342858352, + -97.86752535352848, + 46.28090328619564, + 81.73119248706783, + 99.28312923953135, + 5.428491238061412, + -10.057873368956962, + -29.227728678237995, + 9.742474583994337, + 72.44899280781078, + -39.03501766575275, + -59.34124718116585, + 75.08192382950091, + 39.19959912145927, + 12.819415189421207, + -65.99438957588619, + -33.01505690327188, + -4.204323589500888, + 38.691340789603316, + -60.5458643662661, + 66.09259104681504, + 55.89052583821697, + 97.903480409299, + 80.30483906634527, + -8.737769993284147, + 72.88830243502153, + -53.4216238072017, + -46.59610987974246, + 72.10852084777076, + 20.503878887964206, + -40.42309116918719, + -31.126462826158445, + -35.68864442661396, + -57.29456052682171, + -87.64779401381033, + -26.62357805164706, + 38.87424286093716, + 15.93575469730375, + 39.38360329656629, + -78.77953474824318, + 7.429088108317444, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "layout": "nhwc" + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 2], + "data": [ + 99.28312683105469, + 81.73119354248047 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.roundingType=floor", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "floor" + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 99.28312683105469, + 9.742474555969238, + 99.28312683105469, + 72.1085205078125, + 81.73119354248047, + 72.44898986816406, + 81.73119354248047, + 72.44898986816406 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.roundingType=ceil", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "ceil" + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + 99.28312683105469, + 9.742474555969238, + -39.03501892089844, + 99.28312683105469, + 72.1085205078125, + 66.09259033203125, + 97.90348052978516, + 72.1085205078125, + 7.429088115692139, + 81.73119354248047, + 72.44898986816406, + -59.34124755859375, + 81.73119354248047, + 72.44898986816406, + 55.890525817871094, + 80.30484008789062, + 72.33577728271484, + 72.33577728271484 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "floor", + "outputSizes": [3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 3], + "data": [ + 99.28312683105469, + 9.742474555969238, + -39.03501892089844, + 99.28312683105469, + 72.1085205078125, + 66.09259033203125, + 97.90348052978516, + 72.1085205078125, + 7.429088115692139, + 81.73119354248047, + 72.44898986816406, + -59.34124755859375, + 81.73119354248047, + 72.44898986816406, + 55.890525817871094, + 80.30484008789062, + 72.33577728271484, + 72.33577728271484 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "strides": [2, 2], + "roundingType": "ceil", + "outputSizes": [2, 2] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 2], + "data": [ + 99.28312683105469, + 9.742474555969238, + 99.28312683105469, + 72.1085205078125, + 81.73119354248047, + 72.44898986816406, + 81.73119354248047, + 72.44898986816406 + ], + "type": "float32" + } + }, + { + "name": "maxPool2d float32 4D tensor options.dilations with options.strides", + "inputs": { + "input": { + "shape": [1, 7, 7, 2], + "data": [ + 34.69258129387845, + -24.706248375920524, + -60.42807114468629, + 35.93883484387953, + 60.896094267313345, + 79.42220031805164, + -77.85906306951374, + 54.18820945858141, + -21.57693529351286, + -49.103906741859404, + 78.55176346486067, + 74.28213308844582, + -87.92769416001408, + 79.82047109868057, + 11.680922626564922, + -12.1545053403525, + -22.332939699432202, + 33.08486279636597, + 8.640676946303174, + 47.04064404360258, + 95.78234680258441, + -88.01998403139729, + -98.53630176965567, + 16.15897660557981, + 21.396089910647248, + 95.13234999362083, + -40.80724330720389, + -88.70921764059032, + -40.772770487731826, + 67.89843024034857, + -50.337466344983504, + -96.56610664792846, + 12.508098405268967, + -6.63581156175988, + -44.80198313101762, + 80.27474506768564, + -65.68411481136147, + -14.884790604208746, + -66.54857566488332, + 20.07233794529273, + -27.954270006840204, + -56.62217270552601, + 82.74794838911092, + 93.30175304845017, + -34.07339352229894, + -22.871643145139146, + 73.25525716488457, + 41.14021562026471, + -19.755147411323023, + 80.07700931110838, + -69.89277244982563, + 14.013250274581338, + -61.36640253626604, + 51.53046561516868, + 43.538863140698226, + -89.5888690731458, + 51.45121768091764, + 73.92397095355011, + -80.25264684029128, + 94.72747432067723, + 95.25411370348488, + 58.12575321550594, + 19.885722826536778, + -70.030129951855, + 63.41951918063978, + -54.11785116480967, + -97.2280762988258, + -60.65826309587585, + -31.049980820398645, + -14.64655330832754, + -63.73688919275588, + 47.34630581820389, + 85.5640530081308, + -53.38925321464192, + -70.84739324778467, + 47.35504709117748, + 83.38397624574233, + 7.36169510433227, + 46.85823546522715, + 98.13465616102368, + -43.93968566738362, + 50.33780282391024, + 37.455634062049, + -54.52760852219014, + -6.212307719031031, + 34.41734148282714, + 11.816772365254153, + 72.44517799372989, + 86.34609553228327, + 4.146569170394486, + 88.33040249135547, + 98.29994529007328, + -66.72379613555366, + 58.06434425465281, + -51.168278021154954, + -17.768582927864657, + 9.961172472871425, + -52.738431655100946 + ], + "type": "float32" + } + }, + "options": { + "windowDimensions": [3, 3], + "padding": [1, 0, 0, 1], + "autoPad": "explicit", + "strides": [2, 2], + "dilations": [1, 1], + "layout": "nhwc" + }, + "expected": { + "name": "output", + "shape": [1, 3, 3, 2], + "data": [ + 60.896095275878906, + 79.42220306396484, + 95.7823486328125, + 79.42220306396484, + 78.55176544189453, + 95.1323471069336, + 82.7479476928711, + 93.30175018310547, + 95.7823486328125, + 80.27474212646484, + 43.53886413574219, + 95.1323471069336, + 95.25411224365234, + 94.72747802734375, + 95.25411224365234, + 98.13465881347656, + 63.419517517089844, + 98.13465881347656 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/min.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/min.json new file mode 100644 index 00000000000..f5ea4779f40 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/min.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "min float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [24], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [4, 6], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 3, 4], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 1, 2, 3], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 34.42634415560107 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -36.06953048706055, + -38.2254524230957, + 34.42634582519531, + -16.610267639160156, + 34.42634582519531, + -17.77212905883789, + -76.01380920410156, + -69.59134674072266, + 34.42634582519531, + -39.096099853515625, + 34.42634582519531, + -40.39130401611328, + 34.42634582519531, + 0.03283197432756424, + 34.42634582519531, + -17.720787048339844, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -19.072667739078668, + -78.27516046519088, + -13.43624418749556, + -93.01346559564098, + -72.27899383005467, + 63.141107125830274 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -36.06953048706055, + -78.27516174316406, + -13.436244010925293, + -93.01346588134766, + -72.27899169921875, + -17.77212905883789, + -76.01380920410156, + -78.27516174316406, + -13.436244010925293, + -93.01346588134766, + -72.27899169921875, + -40.39130401611328, + -19.072668075561523, + -78.27516174316406, + -13.436244010925293, + -93.01346588134766, + -72.27899169921875, + -82.3099365234375, + -80.47379302978516, + -78.27516174316406, + -73.2723617553711, + -93.01346588134766, + -72.27899169921875, + 4.945605278015137 + ], + "type": "float32" + } + }, + { + "name": "min float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 23.231731176710824, + 84.62673735224791, + -83.33529487921453, + -22.824559006255328 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -36.06953048706055, + -38.2254524230957, + 23.231731414794922, + -16.610267639160156, + 65.99324798583984, + -17.77212905883789, + -83.33529663085938, + -83.33529663085938, + -83.33529663085938, + -39.096099853515625, + -22.82455825805664, + -40.39130401611328, + 23.231731414794922, + 0.03283197432756424, + 23.231731414794922, + -17.720787048339844, + 17.383201599121094, + -82.3099365234375, + -83.33529663085938, + -83.33529663085938, + -83.33529663085938, + -33.74562072753906, + -22.82455825805664, + -22.82455825805664 + ], + "type": "float32" + } + }, + { + "name": "min float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 34.42634415560107 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -36.06953048706055, + -38.2254524230957, + 34.42634582519531, + -16.610267639160156, + 34.42634582519531, + -17.77212905883789, + -76.01380920410156, + -69.59134674072266, + 34.42634582519531, + -39.096099853515625, + 34.42634582519531, + -40.39130401611328, + 34.42634582519531, + 0.03283197432756424, + 34.42634582519531, + -17.720787048339844, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/mul.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/mul.json new file mode 100644 index 00000000000..e6487cfc591 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/mul.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "mul float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [24], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { + "name": "mul float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [4, 6], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { + "name": "mul float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 3, 4], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { + "name": "mul float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { + "name": "mul float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 1, 2, 3], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { + "name": "mul float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 67.50372094970106 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 3315.18994140625, + 803.7978515625, + -1425.394775390625, + 4775.82080078125, + -6380.20068359375, + -6331.1103515625, + 754.6165771484375, + -2214.52197265625, + 5624.34130859375, + 6150.98828125, + -7.5845537185668945, + 1039.4193115234375, + -908.5472412109375, + -3417.4755859375, + -2104.513427734375, + -446.6123352050781, + 1466.6925048828125, + 1487.208740234375, + -5671.7783203125, + -6349.91064453125, + 3969.7099609375, + -4256.77001953125, + 223.388916015625, + 667.20703125 + ], + "type": "float32" + } + }, + { + "name": "mul float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -97.2933957218157, + -81.70872307646576, + -63.85933809294562, + -25.192203473799253, + 94.61556753087658, + -20.3817901013323 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -4778.197265625, + -972.9432983398438, + 1348.440673828125, + -1782.3232421875, + -8942.7119140625, + 1911.5888671875, + -1087.6319580078125, + 2680.5302734375, + -5320.69482421875, + -2295.531982421875, + -10.630775451660156, + -313.8379211425781, + 1309.492919921875, + 4136.625, + 1990.89501953125, + 166.67449951171875, + 2055.767333984375, + -449.04156494140625, + 8174.7578125, + 7686.14013671875, + -3755.3935546875, + 1588.6148681640625, + 313.10968017578125, + -201.4536895751953 + ], + "type": "float32" + } + }, + { + "name": "mul float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 8.696772886979204, + 48.377688521793914, + 97.75158873035582, + 62.215746875745594 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 427.1091003417969, + 103.55646514892578, + -183.63926696777344, + 3422.673095703125, + -4572.4794921875, + -4537.2978515625, + 1092.7540283203125, + -3206.8310546875, + 8144.5625, + 5669.14404296875, + -6.990409851074219, + 957.995361328125, + -117.05175018310547, + -440.2869567871094, + -271.1328125, + -320.07232666015625, + 1051.130126953125, + 1065.8333740234375, + -8213.255859375, + -9195.2529296875, + 5748.50439453125, + -3923.3115234375, + 205.88949584960938, + 614.940673828125 + ], + "type": "float32" + } + }, + { + "name": "mul float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 67.50372094970106 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 3315.18994140625, + 803.7978515625, + -1425.394775390625, + 4775.82080078125, + -6380.20068359375, + -6331.1103515625, + 754.6165771484375, + -2214.52197265625, + 5624.34130859375, + 6150.98828125, + -7.5845537185668945, + 1039.4193115234375, + -908.5472412109375, + -3417.4755859375, + -2104.513427734375, + -446.6123352050781, + 1466.6925048828125, + 1487.208740234375, + -5671.7783203125, + -6349.91064453125, + 3969.7099609375, + -4256.77001953125, + 223.388916015625, + 667.20703125 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/neg.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/neg.json new file mode 100644 index 00000000000..8a1eea34f95 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/neg.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "neg float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + }, + { + "name": "neg float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + }, + { + "name": "neg float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + }, + { + "name": "neg float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + }, + { + "name": "neg float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/pow.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/pow.json new file mode 100644 index 00000000000..d6c9f592df7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/pow.json @@ -0,0 +1,1072 @@ +{ + "tests": [ + { + "name": "pow float32 1D base tensor and 1D integer exponent tensor", + "inputs": { + "a": { + "shape": [24], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 2D base tensor and 2D integer exponent tensor", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 3D base tensor and 3D integer exponent tensor", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D base tensor and 4D integer exponent tensor", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 5D base tensor and 5D integer exponent tensor", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2, 3], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 1D positive base tensor and 1D exponent tensor", + "inputs": { + "a": { + "shape": [24], + "data": [ + 1.4186520416325132, + 19.384846302672862, + 12.983916515701083, + 2.460315836803, + 7.818154966175683, + 6.944444510618668, + 12.183951502858129, + 17.91247403540764, + 11.35656818684932, + 8.924248275595188, + 17.63682367890858, + 11.49622917976384, + 18.51627975602645, + 2.2580489773802714, + 2.231948203000913, + 13.629855345962834, + 17.54841363842334, + 0.5390733851574936, + 5.891367616729561, + 0.12803148642270834, + 19.654494983574544, + 3.412272498152542, + 4.9450348267065225, + 4.437101298745225 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -1.5511157816056738, + 19.380577557084465, + -3.6426215860281452, + 16.167571318689518, + -2.0848799217875964, + 11.261693793617642, + 12.615325041672058, + -2.7793194614392647, + -11.366388615297627, + -5.648841807865415, + 11.413243516798275, + 12.879077210007082, + 0.4005270071745244, + -6.527585857242606, + 2.407976905841956, + -9.631716701331072, + -0.2599778139698401, + -9.364569334111161, + 15.316681121612149, + 7.0153143060793965, + -11.982424302485697, + -12.112285237422382, + 14.26965166637288, + -6.536952275641514 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.5813302397727966, + 8.948769192887517e+24, + 0.00008795983740128577, + 2095912.875, + 0.013739941641688347, + 3007905536, + 49839131852800, + 0.00032891242881305516, + 1.01309802560956e-12, + 0.000004269440978532657, + 168150804987904, + 45601043513344, + 3.218766689300537, + 0.004908796865493059, + 6.912310600280762, + 1.1827739308800655e-11, + 0.4748164415359497, + 325.8381042480469, + 626836635648, + 5.464456762638292e-7, + 3.170955982412547e-16, + 3.496410840853059e-7, + 8045534720, + 0.00005887653969693929 + ], + "type": "float32" + } + }, + { + "name": "pow float32 2D positive base tensor and 2D exponent tensor", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 1.4186520416325132, + 19.384846302672862, + 12.983916515701083, + 2.460315836803, + 7.818154966175683, + 6.944444510618668, + 12.183951502858129, + 17.91247403540764, + 11.35656818684932, + 8.924248275595188, + 17.63682367890858, + 11.49622917976384, + 18.51627975602645, + 2.2580489773802714, + 2.231948203000913, + 13.629855345962834, + 17.54841363842334, + 0.5390733851574936, + 5.891367616729561, + 0.12803148642270834, + 19.654494983574544, + 3.412272498152542, + 4.9450348267065225, + 4.437101298745225 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -1.5511157816056738, + 19.380577557084465, + -3.6426215860281452, + 16.167571318689518, + -2.0848799217875964, + 11.261693793617642, + 12.615325041672058, + -2.7793194614392647, + -11.366388615297627, + -5.648841807865415, + 11.413243516798275, + 12.879077210007082, + 0.4005270071745244, + -6.527585857242606, + 2.407976905841956, + -9.631716701331072, + -0.2599778139698401, + -9.364569334111161, + 15.316681121612149, + 7.0153143060793965, + -11.982424302485697, + -12.112285237422382, + 14.26965166637288, + -6.536952275641514 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0.5813302397727966, + 8.948769192887517e+24, + 0.00008795983740128577, + 2095912.875, + 0.013739941641688347, + 3007905536, + 49839131852800, + 0.00032891242881305516, + 1.01309802560956e-12, + 0.000004269440978532657, + 168150804987904, + 45601043513344, + 3.218766689300537, + 0.004908796865493059, + 6.912310600280762, + 1.1827739308800655e-11, + 0.4748164415359497, + 325.8381042480469, + 626836635648, + 5.464456762638292e-7, + 3.170955982412547e-16, + 3.496410840853059e-7, + 8045534720, + 0.00005887653969693929 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D positive base tensor and 4D exponent tensor", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 1.4186520416325132, + 19.384846302672862, + 12.983916515701083, + 2.460315836803, + 7.818154966175683, + 6.944444510618668, + 12.183951502858129, + 17.91247403540764, + 11.35656818684932, + 8.924248275595188, + 17.63682367890858, + 11.49622917976384, + 18.51627975602645, + 2.2580489773802714, + 2.231948203000913, + 13.629855345962834, + 17.54841363842334, + 0.5390733851574936, + 5.891367616729561, + 0.12803148642270834, + 19.654494983574544, + 3.412272498152542, + 4.9450348267065225, + 4.437101298745225 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -1.5511157816056738, + 19.380577557084465, + -3.6426215860281452, + 16.167571318689518, + -2.0848799217875964, + 11.261693793617642, + 12.615325041672058, + -2.7793194614392647, + -11.366388615297627, + -5.648841807865415, + 11.413243516798275, + 12.879077210007082, + 0.4005270071745244, + -6.527585857242606, + 2.407976905841956, + -9.631716701331072, + -0.2599778139698401, + -9.364569334111161, + 15.316681121612149, + 7.0153143060793965, + -11.982424302485697, + -12.112285237422382, + 14.26965166637288, + -6.536952275641514 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0.5813302397727966, + 8.948769192887517e+24, + 0.00008795983740128577, + 2095912.875, + 0.013739941641688347, + 3007905536, + 49839131852800, + 0.00032891242881305516, + 1.01309802560956e-12, + 0.000004269440978532657, + 168150804987904, + 45601043513344, + 3.218766689300537, + 0.004908796865493059, + 6.912310600280762, + 1.1827739308800655e-11, + 0.4748164415359497, + 325.8381042480469, + 626836635648, + 5.464456762638292e-7, + 3.170955982412547e-16, + 3.496410840853059e-7, + 8045534720, + 0.00005887653969693929 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D exponent tensor and broadcastable 1D positive base tensor", + "inputs": { + "a": { + "shape": [1], + "data": [ + 11.594479317507522 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 9831930832107864000, + 0.8567188382148743, + 3.145953983429983e-11, + 786871222272, + 3.4610242370650813e-19, + 4211286999040, + 1.2196345930224334e-18, + 673.3303833007812, + 0.0010909875854849815, + 2.2894641996167248e-15, + 94425837469696, + 0.34217458963394165, + 2.0603237680819727e-17, + 87906598912, + 7080751803662336, + 0.000005512045390787534, + 7.14127336841233e-16, + 2980.96923828125, + 2168419861221343200, + 0.0008485119906254113, + 0.029340136796236038, + 7.466013585144538e-7, + 3388161848544067600, + 3421086174482006000 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D base tensor and broadcastable 2D integer exponent tensor", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + 5, + -10, + -10, + 7, + -7, + -9 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1810113, + 998220038144, + 1.1418765932802444e-10, + 21800822, + -2.11619832768406e-9, + 2.1502860603206386e-10, + -1351182.875, + 0.00005692423656000756, + 0.000035836616007145494, + -93225256, + 1.4853429597394552e-8, + -1698.2552490234375, + -947433.5, + 7.562621362477984e-11, + 1.8626330946375225e-12, + -71917.1015625, + -8.45626324519344e-9, + 0.00002374253199377563, + 1518165.5, + 0.00002495513399480842, + 0.026081321761012077, + -209595.46875, + 2.0615180673644318e-9, + 6.786416914539295e-12 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D base tensor and broadcastable 3D integer exponent tensor", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -5, + -10, + 9, + -6 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 5.524516950572433e-7, + -999109.625, + -0.000010685862434911542, + 3.284485530774539e-11, + 4.0545030440680696e-13, + 1.81271334748212e-11, + -108463955968, + 6610.47265625, + -10025.4921875, + 1.4756086841316574e-7, + 1.9504606996179064e-7, + 142.34274291992188, + -0.0000010554830396358739, + 0.000008696333679836243, + 0.0000013647832020069472, + 1.1525726506533829e-7, + 2.9335795945217846e-12, + 0.000007272717084561009, + 133774827520, + -13885.326171875, + -26.625843048095703, + 0.000027467271138448268, + 3.5893645389251105e-8, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { + "name": "pow float32 4D exponent tensor and broadcastable 4D positive base tensor", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 11.594479317507522 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 9831930832107864000, + 0.8567188382148743, + 3.145953983429983e-11, + 786871222272, + 3.4610242370650813e-19, + 4211286999040, + 1.2196345930224334e-18, + 673.3303833007812, + 0.0010909875854849815, + 2.2894641996167248e-15, + 94425837469696, + 0.34217458963394165, + 2.0603237680819727e-17, + 87906598912, + 7080751803662336, + 0.000005512045390787534, + 7.14127336841233e-16, + 2980.96923828125, + 2168419861221343200, + 0.0008485119906254113, + 0.029340136796236038, + 7.466013585144538e-7, + 3388161848544067600, + 3421086174482006000 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_max.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_max.json new file mode 100644 index 00000000000..a1eb6d2b831 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_max.json @@ -0,0 +1,782 @@ +{ + "tests": [ + { + "name": "reduceMax float32 1D tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 90.42288208007812, + 75.90379333496094, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875, + 20.253753662109375 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 3D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [-1] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 90.42288208007812, + 75.90379333496094, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875, + 20.253753662109375 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 62.504642486572266, + 96.55397033691406, + 99.77313232421875, + -21.557384490966797, + 94.99645233154297, + 37.28493118286133 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [-4, -2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 62.504642486572266, + 96.55397033691406, + 99.77313232421875, + -21.557384490966797, + 94.99645233154297, + 37.28493118286133 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1], + "data": [ + 99.77313232421875 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 99.77313232421875 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + 90.42288208007812, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + 90.42288208007812, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor negative options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, -1] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + 90.42288208007812, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875 + ], + "type": "float32" + } + }, + { + "name": "reduceMax float32 4D tensor negative options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32" + } + }, + "options": { + "axes": [-3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + 90.42288208007812, + 94.99645233154297, + 96.55397033691406, + 99.77313232421875 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_mean.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_mean.json new file mode 100644 index 00000000000..af353b5ad11 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_mean.json @@ -0,0 +1,886 @@ +{ + "tests": [ + { + "name": "reduceMean float32 1D tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all negative default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -37.14687069315612, + -44.50042209159177, + -6.126548413219496, + -6.321792976064302, + -76.5389783512652, + -4.137693032746782, + -20.763563935321017, + -38.74917461116718, + -36.81039848179957, + -26.274377028592966, + -12.56681966278282, + -55.28200785289164, + -20.697565065775606, + -34.19586340660584, + -45.36002983401583, + -34.996193368480235, + -67.84308553425207, + -0.7434244205683882, + -21.981258134364538, + -61.31269509631454, + -58.59896180690518, + -76.02979877636918, + -23.917405754606236, + -22.941872716763513 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -34.74319839477539, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all positive integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + 42, + 24, + 44, + 38, + 82, + 93, + 64, + 40, + 48, + 78, + 81, + 59, + 45, + 18, + 3, + 77, + 60, + 19, + 66, + 8, + 21, + 19, + 62, + 71 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 48.41666793823242, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all negative integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + -73, + -8, + -55, + -73, + -61, + -54, + -5, + -39, + -66, + -53, + -57, + -39, + -62, + -98, + -36, + -1, + -75, + -8, + -71, + -72, + -67, + -16, + -21, + -31 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -47.54166793823242, + "type": "float32" + } + }, + { + "name": "reduceMean float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 45.46687316894531, + 49.670711517333984, + 50.94768142700195, + 44.734745025634766, + 27.777833938598633, + 23.264999389648438 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [-1] + }, + "expected": { + "shape": [2, 3], + "data": [ + 45.46687316894531, + 49.670711517333984, + 50.94768142700195, + 44.734745025634766, + 27.777833938598633, + 23.264999389648438 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 54.82453536987305, + 40.251548767089844, + 22.060470581054688, + 48.58541488647461, + 51.343353271484375, + 24.797523498535156 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [-4, -2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 54.82453536987305, + 40.251548767089844, + 22.060470581054688, + 48.58541488647461, + 51.343353271484375, + 24.797523498535156 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1], + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1, 1], + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [2, 2], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [1, 2, 2, 1], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor negative options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, -1] + }, + "expected": { + "shape": [2, 2], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor negative options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [-3, 3] + }, + "expected": { + "shape": [1, 2, 2, 1], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_min.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_min.json new file mode 100644 index 00000000000..8db681d7ea4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_min.json @@ -0,0 +1,782 @@ +{ + "tests": [ + { + "name": "reduceMin float32 1D tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + -87.9623031616211, + -39.50931167602539, + -53.747413635253906, + -31.713542938232422, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 3D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [-1] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + -87.9623031616211, + -39.50931167602539, + -53.747413635253906, + -31.713542938232422, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + -58.76195526123047, + -87.9623031616211, + -70.13690185546875, + -59.40851974487305, + -84.4076919555664, + -53.747413635253906 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [-4, -2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + -58.76195526123047, + -87.9623031616211, + -70.13690185546875, + -59.40851974487305, + -84.4076919555664, + -53.747413635253906 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1], + "data": [ + -87.9623031616211 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + -87.9623031616211 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + -87.9623031616211, + -53.747413635253906, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + -87.9623031616211, + -53.747413635253906, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor negative options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, -1] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + -87.9623031616211, + -53.747413635253906, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + }, + { + "name": "reduceMin float32 4D tensor negative options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32" + } + }, + "options": { + "axes": [-3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + -87.9623031616211, + -53.747413635253906, + -84.4076919555664, + -55.97655487060547 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_product.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_product.json new file mode 100644 index 00000000000..24c60f89359 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_product.json @@ -0,0 +1,782 @@ +{ + "tests": [ + { + "name": "reduceProduct float32 1D tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 7519895, + -1292816.375, + 2441721.75, + -110637.7734375, + -7380313.5, + -818030.5 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 3D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [-1] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 7519895, + -1292816.375, + 2441721.75, + -110637.7734375, + -7380313.5, + -818030.5 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 4227263.5, + -446960.5625, + 3811296.75, + 1280298.5, + -1343475.375, + 1280118.75 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [-4, -2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 4227263.5, + -446960.5625, + 3811296.75, + 1280298.5, + -1343475.375, + 1280118.75 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1], + "data": [ + 1.5855958784642327e+37 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 1.5855958784642327e+37 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + -3638925568, + 6523364352, + -414643360, + 1610916352 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + -3638925568, + 6523364352, + -414643360, + 1610916352 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor negative options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, -1] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + -3638925568, + 6523364352, + -414643360, + 1610916352 + ], + "type": "float32" + } + }, + { + "name": "reduceProduct float32 4D tensor negative options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32" + } + }, + "options": { + "axes": [-3, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + -3638925568, + 6523364352, + -414643360, + 1610916352 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_sum.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_sum.json new file mode 100644 index 00000000000..d382fb09447 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/reduce_sum.json @@ -0,0 +1,886 @@ +{ + "tests": [ + { + "name": "reduceSum float32 1D tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 1D tensor all negative default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -51.77016701194195, + -34.46467785404002, + -40.983506494422414, + -83.34922667410298, + -67.67525749941849, + -18.703119061215574, + -20.281060841405974, + -20.123054810748656, + -83.63451764199297, + -23.651085471445683, + -10.20843911447325, + -36.212902987180804, + -76.26201536868358, + -9.094745329540757, + -53.88933855716023, + -67.52341028201596, + -71.14580362299527, + -82.04484921713924, + -96.29924980334548, + -68.46700365583722, + -26.107193300700942, + -68.01821308673175, + -4.833076925370335, + -48.90069809349882 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -1163.642578125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 1D tensor all positive integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + 56, + 90, + 67, + 33, + 20, + 58, + 22, + 15, + 86, + 79, + 59, + 99, + 16, + 95, + 67, + 11, + 60, + 89, + 50, + 57, + 77, + 89, + 10, + 2 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1307, + "type": "float32" + } + }, + { + "name": "reduceSum float32 1D tensor all negative integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + -55, + -36, + -74, + -17, + -67, + -95, + -3, + -67, + -95, + -13, + -45, + -9, + -33, + -98, + -86, + -11, + -70, + -44, + -31, + -68, + -79, + -24, + -60, + -36 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -1216, + "type": "float32" + } + }, + { + "name": "reduceSum float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 210.44241333007812, + 104.54179382324219, + 226.2177734375, + 239.025390625, + 260.405029296875, + 273.2470397949219 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 3D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [-1] + }, + "expected": { + "shape": [2, 3], + "data": [ + 210.44241333007812, + 104.54179382324219, + 226.2177734375, + 239.025390625, + 260.405029296875, + 273.2470397949219 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 179.63900756835938, + 260.37457275390625, + 219.3611297607422, + 246.83712768554688, + 157.4895782470703, + 250.1780242919922 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor negative options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [-4, -2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 179.63900756835938, + 260.37457275390625, + 219.3611297607422, + 246.83712768554688, + 157.4895782470703, + 250.1780242919922 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1], + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1, 1], + "data": 1313.87939453125, + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [2, 2], + "data": [ + 355.21942138671875, + 185.98255920410156, + 362.3598937988281, + 410.3175354003906 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [1, 2, 2, 1], + "data": [ + 355.21942138671875, + 185.98255920410156, + 362.3598937988281, + 410.3175354003906 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor negative options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, -1] + }, + "expected": { + "shape": [2, 2], + "data": [ + 355.21942138671875, + 185.98255920410156, + 362.3598937988281, + 410.3175354003906 + ], + "type": "float32" + } + }, + { + "name": "reduceSum float32 4D tensor negative options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32" + } + }, + "options": { + "axes": [-3, 3] + }, + "expected": { + "shape": [1, 2, 2, 1], + "data": [ + 355.21942138671875, + 185.98255920410156, + 362.3598937988281, + 410.3175354003906 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/sin.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/sin.json new file mode 100644 index 00000000000..3cc4771a336 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/sin.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "sin float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + }, + { + "name": "sin float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + }, + { + "name": "sin float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + }, + { + "name": "sin float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + }, + { + "name": "sin float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/sub.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/sub.json new file mode 100644 index 00000000000..4a3096313e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/sub.json @@ -0,0 +1,784 @@ +{ + "tests": [ + { + "name": "sub float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [24], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { + "name": "sub float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [4, 6], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { + "name": "sub float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 3, 4], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { + "name": "sub float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { + "name": "sub float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 1, 2, 3], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { + "name": "sub float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + -97.04911633292723 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -170.641845703125, + -111.53379821777344, + -27.64710235595703, + -45.00383377075195, + -21.267745971679688, + -94.77507019042969, + -13.750038146972656, + -112.62688446044922, + -34.34831237792969, + -130.00311279296875, + -179.606201171875, + -22.142730712890625, + -175.27210998535156, + -145.4415283203125, + -77.89557647705078, + -11.116905212402344, + -186.17266845703125, + -119.92375183105469, + -177.6188507080078, + -194.67510986328125, + -149.79762268066406, + -186.21514892578125, + -76.54570007324219, + -196.53619384765625 + ], + "type": "float32" + } + }, + { + "name": "sub float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + 10.76283817728796, + -90.23991799972681, + 12.787367580497303, + -62.44633978281189, + 32.182575156356904, + 20.35949259849579 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 62.82989501953125, + 104.72460174560547, + -82.18938446044922, + 10.401054382324219, + -107.96394348144531, + -22.633544921875, + -94.06192016601562, + 105.81768798828125, + -75.48817443847656, + 95.40034484863281, + 50.374515533447266, + -95.26588439941406, + 67.46015167236328, + 138.63232421875, + -31.94091033935547, + -23.48587417602539, + 56.940975189208984, + 2.51513671875, + 69.80689239501953, + 187.86590576171875, + 39.96113967895508, + 151.6123809814453, + -52.68599319458008, + 79.12757873535156 + ], + "type": "float32" + } + }, + { + "name": "sub float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -8.393114200101877, + 75.54752975621165, + -32.32586947927443, + 8.088332085081447 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + 81.98584747314453, + 22.877796173095703, + -61.00890350341797, + -127.59281921386719, + -151.3289031982422, + -77.82157897949219, + -50.973209381103516, + 47.90364074707031, + -30.374935150146484, + 24.86566925048828, + 74.46875762939453, + -82.99472045898438, + 86.61610412597656, + 56.78551483154297, + -10.760427474975586, + -161.479736328125, + 13.576019287109375, + -52.67290115356445, + 112.89559936523438, + 129.9518585205078, + 85.07437896728516, + 81.07770538330078, + -28.591751098632812, + 91.39874267578125 + ], + "type": "float32" + } + }, + { + "name": "sub float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + -97.04911633292723 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32" + } + }, + "expected": { + "name": "ouput", + "shape": [2, 2, 2, 3], + "data": [ + -170.641845703125, + -111.53379821777344, + -27.64710235595703, + -45.00383377075195, + -21.267745971679688, + -94.77507019042969, + -13.750038146972656, + -112.62688446044922, + -34.34831237792969, + -130.00311279296875, + -179.606201171875, + -22.142730712890625, + -175.27210998535156, + -145.4415283203125, + -77.89557647705078, + -11.116905212402344, + -186.17266845703125, + -119.92375183105469, + -177.6188507080078, + -194.67510986328125, + -149.79762268066406, + -186.21514892578125, + -76.54570007324219, + -196.53619384765625 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/tan.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/tan.json new file mode 100644 index 00000000000..857e2b65059 --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/tan.json @@ -0,0 +1,334 @@ +{ + "tests": [ + { + "name": "tan float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + }, + { + "name": "tan float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + }, + { + "name": "tan float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + }, + { + "name": "tan float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + }, + { + "name": "tan float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/utils.js b/tests/wpt/web-platform-tests/webnn/resources/utils.js index f11ce7c6e00..4c7b6bc6ef1 100644 --- a/tests/wpt/web-platform-tests/webnn/resources/utils.js +++ b/tests/wpt/web-platform-tests/webnn/resources/utils.js @@ -19,12 +19,12 @@ const sizeOfShape = (array) => { }; /** - * Get JSON resources from specified test resources file. - * @param {String} file - A test resources file path - * @returns {Object} Test resources + * Get tests resources from test data JSON file of specified operation name. + * @param {String} operationName - An operation name + * @returns {Object} Tests resources */ -const loadResources = (file) => { - const loadJSON = () => { +const loadTests = (operationName) => { + const loadJSON = (file) => { let xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", file, false); xmlhttp.overrideMimeType("application/json"); @@ -36,8 +36,15 @@ const loadResources = (file) => { } }; - const json = loadJSON(); - return JSON.parse(json.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? "" : m)); + const capitalLetterMatches = operationName.match(/[A-Z]/); + if (capitalLetterMatches !== null) { + // for example: the test data JSON file for leakyRelu is leaky_relu.json + const capitalLetter = capitalLetterMatches[0]; + operationName = operationName.replace(capitalLetter, `_${capitalLetter.toLowerCase()}`); + } + const json = loadJSON(`/webnn/resources/test_data/${operationName}.json`); + const resources = JSON.parse(json.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? "" : m)); + return resources.tests; }; /** @@ -61,22 +68,212 @@ const getExpectedDataAndType = (resources, outputName) => { }; /** - * Get ULP tolerance of softmax operation. + * Get ULP tolerance of conv2d operation. * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name * @returns {Number} A tolerance number */ -const getSoftmaxPrecisionTolerance = (resources) => { +const getConv2dPrecisionTolerance = (resources, operationName) => { + // number of reduced input elements multiplied by filter and summed (a sliding dot product like pooling) + const inputNameArray = Object.keys(resources.inputs); + const inputShape = resources.inputs[inputNameArray[0]].shape; + const filterShape = resources.inputs[inputNameArray[1]].shape; + const options = resources.options; + let groups = 1; + let inputChannels = inputShape[1]; // default nchw inputLayout + let filterWidth = filterShape[3]; // default oihw filterLayout + let filterHeight = filterShape[2]; + if (options) { + if (options.groups) { + groups = options.groups; + } + if (options.inputLayout) { + if (!['nchw', 'nhwc'].includes(options.inputLayout)) { + throw new Error(`Unsupported inputLayout ${options.inputLayout}`); + } + inputChannels = options.inputLayout === 'nchw' ? inputChannels : inputShape[3]; + } + if (options.filterLayout) { + if (!['oihw', 'hwio', 'ohwi', 'ihwo'].includes(options.filterLayout)) { + throw new Error(`Unsupported filterLayout ${options.filterLayout}`); + } + switch (options.filterLayout) { + case 'oihw': + // Just use the existing filterWidth and filterHeight above. + break; + case 'hwio': + filterWidth = filterShape[1]; + filterHeight = filterShape[0]; + break; + case 'ohwi': + case 'ihwo': + filterWidth = filterShape[2]; + filterHeight = filterShape[1]; + break; + default: + break; + } + } + } + const tolerance = filterWidth * filterHeight * (inputChannels / groups) * 2; + return tolerance; +}; + +/** + * Get ULP tolerance of gemm operation. + * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name + * @returns {Number} A tolerance number + */ +const getGemmPrecisionTolerance = (resources, operationName) => { + // GEMM : alpha * (A x B) + beta * C + // An upper bound for the worst serial ordering is bounded by + // the number of lossy operations, where matrix multiplication + // is a dot product (mul and add times the number of elements) + // plus bias operations. + const shapeA = resources.inputs[Object.keys(resources.inputs)[0]].shape; + const options = {...resources.options}; + const width = options.aTranspose ? shapeA[0] : shapeA[1]; + let tolerance = width * 2; + // default options.alpha is 1.0 + if (options.alpha !== undefined && options.alpha !== 1.0) { + tolerance++; + } + if (options.c && options.beta !== 0.0) { + // default options.beta is 1.0 + if (options.beta !== undefined && options.beta !== 1.0) { + tolerance++; + } + tolerance++; + } + return tolerance; +}; + +/** + * Get ULP tolerance of matmul operation. + * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name + * @returns {Number} A tolerance number + */ +const getMatmulPrecisionTolerance = (resources, operationName) => { + // Matmul : Compute the matrix product of two input tensors. + // If a is 1-D, WebNN converts it to a 2-D tensor by prepending a 1 to its dimensions, [n] -> [1, n]. + // So we can just always check the last dimension here. + const shapeA = resources.inputs[Object.keys(resources.inputs)[0]].shape; + const tolerance = shapeA[shapeA.length - 1] * 2; + return tolerance; +}; + +/** + * Get ULP tolerance of averagePool2d operation. + * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name + * @returns {Number} A tolerance number + */ +const getAveragePool2dPrecisionTolerance = (resources, operationName) => { + const inputShape = resources.inputs[Object.keys(resources.inputs)[0]].shape; + let height; + let width; + const options = {...resources.options}; + if (options.windowDimensions) { + height = options.windowDimensions[0]; + width = options.windowDimensions[1]; + } else { + // If not present, the window dimensions are assumed to be the height and width dimensions of the input shape + if (options.layout && options.layout === 'nhwc') { + height = inputShape[1]; + width = inputShape[2]; + } else { + // nhwc layout of input + height = inputShape[2]; + width = inputShape[3]; + } + } + + const tolerance = height * width + 2; + return tolerance; +}; + +/** + * Get ULP tolerance of softmax operation. + * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name + * @returns {Number} A tolerance number + */ +const getSoftmaxPrecisionTolerance = (resources, operationName) => { // Compute the softmax values of the 2-D input tensor along axis 1. const inputShape = resources.inputs[Object.keys(resources.inputs)[0]].shape; const tolerance = inputShape[1] * 3 + 3; return tolerance; }; +/** + * Get ULP tolerance of reduceMean, reduceProduct, reduceSum operations. + * @param {Object} resources - Resources used for building a graph + * @param {String} operationName - An operation name + * @returns {Number} A tolerance number + */ +const getReductionPrecisionTolerance = (resources, operationName) => { + const inputShape = resources.inputs[Object.keys(resources.inputs)[0]].shape; + const rank = inputShape.length; + const options = {...resources.options}; + let sizes; + if (options && options.axes) { + sizes = options.axes.map( + (axis) => axis < 0 ? inputShape[axis + rank] : inputShape[axis] + ); + } else { + sizes = inputShape; + } + let tolerance = sizes.reduce( + (accumulator, currentValue) => accumulator * currentValue + ); + if (operationName === 'reduceMean') { + tolerance += 2; + } + return tolerance; +}; + // Refer to precision metrics on https://github.com/webmachinelearning/webnn/issues/265#issuecomment-1256242643 const PrecisionMetrics = { + batchNormalization: {ULP: {float32: 6, float16: 6}}, clamp: {ULP: {float32: 0, float16: 0}}, concat: {ULP: {float32: 0, float16: 0}}, + conv2d: {ULP: {float32: getConv2dPrecisionTolerance, float16: getConv2dPrecisionTolerance}}, + // Begin Element-wise binary operations + add: {ULP: {float32: 1, float16: 1}}, + sub: {ULP: {float32: 1, float16: 1}}, + mul: {ULP: {float32: 1, float16: 1}}, + div: {ULP: {float32: 2, float16: 2}}, + max: {ULP: {float32: 0, float16: 0}}, + min: {ULP: {float32: 0, float16: 0}}, + pow: {ULP: {float32: 32, float16: 2}}, + // End Element-wise binary operations + // Begin Element-wise unary operations + abs: {ULP: {float32: 0, float16: 0}}, + ceil: {ULP: {float32: 0, float16: 0}}, + cos: {ATOL: {float32: 1/1024, float16: 1/512}}, + exp: {ULP: {float32: 32, float16: 1}}, + floor: {ULP: {float32: 0, float16: 0}}, + log: {ATOL: {float32: 1/1024, float16: 1/1024}}, + neg: {ULP: {float32: 0, float16: 0}}, + sin: {ATOL: {float32: 1/1024, float16: 1/512}}, + tan: {ATOL: {float32: 1/1024, float16: 1/512}}, + // End Element-wise unary operations + gemm: {ULP: {float32: getGemmPrecisionTolerance, float16: getGemmPrecisionTolerance}}, leakyRelu: {ULP: {float32: 1, float16: 1}}, + matmul: {ULP: {float32: getMatmulPrecisionTolerance, float16: getMatmulPrecisionTolerance}}, + // Begin Pooling operations + averagePool2d: {ULP: {float32: getAveragePool2dPrecisionTolerance, float16: getAveragePool2dPrecisionTolerance}}, + maxPool2d: {ULP: {float32: 0, float16: 0}}, + // End Pooling operations + // Begin Reduction operations + reduceMax: {ULP: {float32: 0, float16: 0}}, + reduceMean: {ULP: {float32: getReductionPrecisionTolerance, float16: getReductionPrecisionTolerance}}, + reduceMin: {ULP: {float32: 0, float16: 0}}, + reduceProduct: {ULP: {float32: getReductionPrecisionTolerance, float16: getReductionPrecisionTolerance}}, + reduceSum: {ULP: {float32: getReductionPrecisionTolerance, float16: getReductionPrecisionTolerance}}, + // End Reduction operations relu: {ULP: {float32: 0, float16: 0}}, reshape: {ULP: {float32: 0, float16: 0}}, sigmoid: {ULP: {float32: 32+2, float16: 3}}, // float32 (leaving a few ULP for roundoff) @@ -92,12 +289,12 @@ const PrecisionMetrics = { * Get precison tolerance value. * @param {String} operationName - An operation name * @param {String} metricType - Value: 'ULP', 'ATOL' - * @param {String} precisionType - A precision type string, like "float32", "float16", - * more types, please see: - * https://webmachinelearning.github.io/webnn/#enumdef-mloperandtype + * @param {Object} resources - Resources used for building a graph * @returns {Number} A tolerance number */ -const getPrecisonTolerance = (operationName, metricType, precisionType) => { +const getPrecisonTolerance = (operationName, metricType, resources) => { + // the outputs by split or gru is a sequence + const precisionType = Array.isArray(resources.expected) ? resources.expected[0].type : resources.expected.type; let tolerance = PrecisionMetrics[operationName][metricType][precisionType]; // If the tolerance is dynamic, then evaluate the function to get the value. if (tolerance instanceof Function) { @@ -202,18 +399,29 @@ const checkResults = (operationName, namedOutputOperands, outputs, resources) => outputData = outputs[operandName]; // for some operations which may have multi outputs of different types [expectedData, operandType] = getExpectedDataAndType(expected, operandName); - tolerance = getPrecisonTolerance(operationName, metricType, operandType); + tolerance = getPrecisonTolerance(operationName, metricType, resources); doAssert(operationName, outputData, expectedData, tolerance, operandType, metricType) } } else { outputData = outputs[expected.name]; expectedData = expected.data; operandType = expected.type; - tolerance = getPrecisonTolerance(operationName, metricType, operandType); + tolerance = getPrecisonTolerance(operationName, metricType, resources); doAssert(operationName, outputData, expectedData, tolerance, operandType, metricType) } }; +/** + * Create a constant operand + * @param {MLGraphBuilder} builder - A ML graph builder + * @param {Object} resources - Resources used for constant operand + * @returns {MLOperand} A constant operand + */ +const createConstantOperand = (builder, resources) => { + const bufferView = new TypedArrayDict[resources.type](resources.data); + return builder.constant({type: resources.type, dimensions: resources.shape}, bufferView); +}; + /** * Create single input operands for a graph. * @param {MLGraphBuilder} builder - A ML graph builder @@ -227,6 +435,22 @@ const createSingleInputOperand = (builder, resources, inputOperandName) => { return builder.input(inputOperandName, {type: inputResources.type, dimensions: inputResources.shape}); }; +/** + * Create multi input operands for a graph. + * @param {MLGraphBuilder} builder - A ML graph builder + * @param {Object} resources - Resources used for building a graph + * @returns {MLOperand[]} Input operands array + */ +const createMultiInputOperands = (builder, resources) => { + let inputOperands = []; + const inputOperandNameArray = Object.keys(resources.inputs); + inputOperandNameArray.forEach(inputOperandName => { + const inputOperand = createSingleInputOperand(builder, resources, inputOperandName); + inputOperands.push(inputOperand); + }); + return inputOperands; +}; + /** * Build an operation which has a single input. * @param {String} operationName - An operation name @@ -243,6 +467,23 @@ const buildOperationWithSingleInput = (operationName, builder, resources) => { return namedOutputOperand; }; +/** + * Build an operation which has two inputs. + * @param {String} operationName - An operation name + * @param {MLGraphBuilder} builder - A ML graph builder + * @param {Object} resources - Resources used for building a graph + * @returns {MLNamedOperands} + */ +const buildOperationWithTwoInputs= (operationName, builder, resources) => { + // For example: MLOperand matmul(MLOperand a, MLOperand b); + const namedOutputOperand = {}; + const [inputOperandA, inputOperandB] = createMultiInputOperands(builder, resources); + const outputOperand = resources.options ? + builder[operationName](inputOperandA, inputOperandB, resources.options) : builder[operationName](inputOperandA, inputOperandB); + namedOutputOperand[resources.expected.name] = outputOperand; + return namedOutputOperand; +}; + /** * Build a graph. * @param {String} operationName - An operation name @@ -318,13 +559,17 @@ const run = async (operationName, context, builder, resources, buildFunc) => { /** * Run WebNN operation tests. - * @param {String} operationName - An operation name - * @param {String} file - A test resources file path + * @param {(String[]|String)} operationName - An operation name array or an operation name * @param {Function} buildFunc - A build function for an operation */ -const testWebNNOperation = (operationName, file, buildFunc) => { - const resources = loadResources(file); - const tests = resources.tests; +const testWebNNOperation = (operationName, buildFunc) => { + let operationNameArray; + if (typeof operationName === 'string') { + operationNameArray = [operationName]; + } else if (Array.isArray(operationName)) { + operationNameArray = operationName; + } + ExecutionArray.forEach(executionType => { const isSync = executionType === 'sync'; if (self.GLOBAL.isWindow() && isSync) { @@ -334,29 +579,35 @@ const testWebNNOperation = (operationName, file, buildFunc) => { let builder; if (isSync) { // test sync - DeviceTypeArray.forEach(deviceType => { - setup(() => { - context = navigator.ml.createContextSync({deviceType}); - builder = new MLGraphBuilder(context); + operationNameArray.forEach((subOperationName) => { + const tests = loadTests(subOperationName); + DeviceTypeArray.forEach(deviceType => { + setup(() => { + context = navigator.ml.createContextSync({deviceType}); + builder = new MLGraphBuilder(context); + }); + for (const subTest of tests) { + test(() => { + runSync(subOperationName, context, builder, subTest, buildFunc); + }, `${subTest.name} / ${deviceType} / ${executionType}`); + } }); - for (const subTest of tests) { - test(() => { - runSync(operationName, context, builder, subTest, buildFunc); - }, `${subTest.name} / ${deviceType} / ${executionType}`); - } }); } else { // test async - DeviceTypeArray.forEach(deviceType => { - promise_setup(async () => { - context = await navigator.ml.createContext({deviceType}); - builder = new MLGraphBuilder(context); + operationNameArray.forEach((subOperationName) => { + const tests = loadTests(subOperationName); + DeviceTypeArray.forEach(deviceType => { + promise_setup(async () => { + context = await navigator.ml.createContext({deviceType}); + builder = new MLGraphBuilder(context); + }); + for (const subTest of tests) { + promise_test(async () => { + await run(subOperationName, context, builder, subTest, buildFunc); + }, `${subTest.name} / ${deviceType} / ${executionType}`); + } }); - for (const subTest of tests) { - promise_test(async () => { - await run(operationName, context, builder, subTest, buildFunc); - }, `${subTest.name} / ${deviceType} / ${executionType}`); - } }); } }); diff --git a/tests/wpt/web-platform-tests/webnn/sigmoid.https.any.js b/tests/wpt/web-platform-tests/webnn/sigmoid.https.any.js index cb22b6eca1e..e904d8dfa78 100644 --- a/tests/wpt/web-platform-tests/webnn/sigmoid.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/sigmoid.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-sigmoid -testWebNNOperation('sigmoid', '/webnn/resources/test_data/sigmoid.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('sigmoid', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/slice.https.any.js b/tests/wpt/web-platform-tests/webnn/slice.https.any.js index 8cbcf057c96..e8b130d5f22 100644 --- a/tests/wpt/web-platform-tests/webnn/slice.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/slice.https.any.js @@ -16,4 +16,4 @@ const buildSlice = (operationName, builder, resources) => { return namedOutputOperand; }; -testWebNNOperation('slice', '/webnn/resources/test_data/slice.json', buildSlice); \ No newline at end of file +testWebNNOperation('slice', buildSlice); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/softmax.https.any.js b/tests/wpt/web-platform-tests/webnn/softmax.https.any.js index 91afc283851..8e5342bd75a 100644 --- a/tests/wpt/web-platform-tests/webnn/softmax.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/softmax.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softmax -testWebNNOperation('softmax', '/webnn/resources/test_data/softmax.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('softmax', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/split.https.any.js b/tests/wpt/web-platform-tests/webnn/split.https.any.js index 54314d7b7f9..bb1c9956587 100644 --- a/tests/wpt/web-platform-tests/webnn/split.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/split.https.any.js @@ -21,4 +21,4 @@ const buildSplit = (operationName, builder, resources) => { return namedOutputOperand; }; -testWebNNOperation('split', '/webnn/resources/test_data/split.json', buildSplit); \ No newline at end of file +testWebNNOperation('split', buildSplit); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/squeeze.https.any.js b/tests/wpt/web-platform-tests/webnn/squeeze.https.any.js index 5e042f34bde..8b9310d65d4 100644 --- a/tests/wpt/web-platform-tests/webnn/squeeze.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/squeeze.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-squeeze -testWebNNOperation('squeeze', '/webnn/resources/test_data/squeeze.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('squeeze', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/tanh.https.any.js b/tests/wpt/web-platform-tests/webnn/tanh.https.any.js index 603f0930cf0..d0d45e754b2 100644 --- a/tests/wpt/web-platform-tests/webnn/tanh.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/tanh.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-tanh -testWebNNOperation('tanh', '/webnn/resources/test_data/tanh.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('tanh', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/transpose.https.any.js b/tests/wpt/web-platform-tests/webnn/transpose.https.any.js index d1303f52acb..63a123342aa 100644 --- a/tests/wpt/web-platform-tests/webnn/transpose.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/transpose.https.any.js @@ -7,4 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-transpose -testWebNNOperation('transpose', '/webnn/resources/test_data/transpose.json', buildOperationWithSingleInput); \ No newline at end of file +testWebNNOperation('transpose', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webrtc-encoded-transform/codec-specific-metadata.https.html b/tests/wpt/web-platform-tests/webrtc-encoded-transform/codec-specific-metadata.https.html new file mode 100644 index 00000000000..bef61b39f30 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-encoded-transform/codec-specific-metadata.https.html @@ -0,0 +1,45 @@ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webrtc-encoded-transform/helper.js b/tests/wpt/web-platform-tests/webrtc-encoded-transform/helper.js new file mode 100644 index 00000000000..d4cec39ffce --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-encoded-transform/helper.js @@ -0,0 +1,26 @@ +"use strict"; + +async function setupLoopbackWithCodecAndGetReader(t, codec) { + const caller = new RTCPeerConnection({encodedInsertableStreams:true}); + t.add_cleanup(() => caller.close()); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + + await setMediaPermission("granted", ["camera"]); + const stream = await navigator.mediaDevices.getUserMedia({video:true}); + const videoTrack = stream.getVideoTracks()[0]; + t.add_cleanup(() => videoTrack.stop()); + + const transceiver = caller.addTransceiver(videoTrack); + const codecCapability = + RTCRtpSender.getCapabilities('video').codecs.find(capability => { + return capability.mimeType.includes(codec); + }); + assert_not_equals(codecCapability, undefined); + transceiver.setCodecPreferences([codecCapability]); + + const senderStreams = transceiver.sender.createEncodedStreams(); + exchangeIceCandidates(caller, callee); + await exchangeOfferAnswer(caller, callee); + return senderStreams.readable.getReader(); +} diff --git a/tests/wpt/web-platform-tests/webrtc-encoded-transform/set-metadata.https.html b/tests/wpt/web-platform-tests/webrtc-encoded-transform/set-metadata.https.html new file mode 100644 index 00000000000..3840bfc7a28 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-encoded-transform/set-metadata.https.html @@ -0,0 +1,83 @@ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webrtc/RTCDataChannel-bufferedAmount.html b/tests/wpt/web-platform-tests/webrtc/RTCDataChannel-bufferedAmount.html index f663941162d..b1b793206cb 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCDataChannel-bufferedAmount.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCDataChannel-bufferedAmount.html @@ -55,6 +55,9 @@ const helloString = 'hello'; const helloBuffer = Uint8Array.of(0x68, 0x65, 0x6c, 0x6c, 0x6f); const helloBlob = new Blob([helloBuffer]); +const emptyBuffer = Uint8Array.of(); +const emptyBlob = new Blob([emptyBuffer]); + // Unicode string with multiple code units const unicodeString = '世界你好'; // UTF-8 encoded buffer representation of the string @@ -96,6 +99,17 @@ for (const options of [{}, {negotiated: true, id: 0}]) { }, `${mode} bufferedAmount should increase to byte length of encoded` + `unicode string sent`); + promise_test(async (t) => { + const [dc1, dc2] = await createDataChannelPair(t, options); + + dc1.send(""); + assert_equals(dc1.bufferedAmount, 0, + 'Expect bufferedAmount to stay at zero after sending empty string'); + + await awaitMessage(dc2); + assert_equals(dc1.bufferedAmount, 0, 'Expect sender bufferedAmount unchanged'); + }, `${mode} bufferedAmount should stay at zero for empty string sent`); + /* 6.2. send() 3. Execute the sub step that corresponds to the type of the methods argument: @@ -116,6 +130,18 @@ for (const options of [{}, {negotiated: true, id: 0}]) { 'Expect sender bufferedAmount to be reduced after message is sent'); }, `${mode} bufferedAmount should increase to byte length of buffer sent`); + promise_test(async (t) => { + const [dc1, dc2] = await createDataChannelPair(t, options); + + dc1.send(emptyBuffer.buffer); + assert_equals(dc1.bufferedAmount, 0, + 'Expect bufferedAmount to stay at zero after sending empty buffer'); + + await awaitMessage(dc2); + assert_equals(dc1.bufferedAmount, 0, + 'Expect sender bufferedAmount unchanged'); + }, `${mode} bufferedAmount should stay at zero for empty buffer sent`); + /* 6.2. send() 3. Execute the sub step that corresponds to the type of the methods argument: @@ -135,6 +161,18 @@ for (const options of [{}, {negotiated: true, id: 0}]) { 'Expect sender bufferedAmount to be reduced after message is sent'); }, `${mode} bufferedAmount should increase to size of blob sent`); + promise_test(async (t) => { + const [dc1, dc2] = await createDataChannelPair(t, options); + + dc1.send(emptyBlob); + assert_equals(dc1.bufferedAmount, 0, + 'Expect bufferedAmount to stay at zero after sending empty blob'); + + await awaitMessage(dc2); + assert_equals(dc1.bufferedAmount, 0, + 'Expect sender bufferedAmount unchanged'); + }, `${mode} bufferedAmount should stay at zero for empty blob sent`); + // Test sending 3 messages: helloBuffer, unicodeString, helloBlob promise_test(async (t) => { const resolver = new Resolver();