diff options
431 files changed, 16496 insertions, 4808 deletions
diff --git a/Cargo.lock b/Cargo.lock index 5a297337f6d..b628ab3bfe3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,7 +93,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.16", "once_cell", "version_check", "zerocopy", @@ -355,9 +355,9 @@ dependencies = [ [[package]] name = "async-tungstenite" -version = "0.28.2" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c348fb0b6d132c596eca3dcd941df48fb597aafcb07a738ec41c004b087dc99" +checksum = "ef0f7efedeac57d9b26170f72965ecfd31473ca52ca7a64e925b0b6f5f079886" dependencies = [ "atomic-waker", "futures-core", @@ -370,7 +370,7 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots", + "webpki-roots 0.26.10", ] [[package]] @@ -1441,7 +1441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "typenum", ] @@ -2514,7 +2514,19 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -2754,9 +2766,9 @@ dependencies = [ [[package]] name = "grid" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36119f3a540b086b4e436bb2b588cf98a68863470e0e880f4d0842f112a3183a" +checksum = "71b01d27060ad58be4663b9e4ac9e2d4806918e8876af8912afbddd1a91d5eaa" [[package]] name = "gstreamer" @@ -3391,11 +3403,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "futures-util", "http 1.3.1", "hyper 1.6.0", "hyper-util", @@ -3405,7 +3416,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", + "webpki-roots 1.0.0", ] [[package]] @@ -4025,7 +4036,7 @@ dependencies = [ "lazy_static", "libc", "mio", - "rand", + "rand 0.8.5", "serde", "tempfile", "uuid", @@ -4672,7 +4683,7 @@ checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -4897,7 +4908,7 @@ dependencies = [ "tungstenite", "url", "uuid", - "webpki-roots", + "webpki-roots 1.0.0", "webrender_api", ] @@ -5635,7 +5646,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand", + "rand 0.8.5", ] [[package]] @@ -5976,7 +5987,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ "env_logger 0.8.4", "log", - "rand", + "rand 0.8.5", ] [[package]] @@ -5989,14 +6000,30 @@ dependencies = [ ] [[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] name = "rand" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -6006,7 +6033,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -6015,7 +6052,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", ] [[package]] @@ -6024,7 +6070,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fac4373cd91b4f55722c553fb0f286edbb81ef3ff6eec7b99d1898a4110a0b28" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6108,7 +6154,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ - "getrandom", + "getrandom 0.2.16", "libredox", "thiserror 2.0.9", ] @@ -6200,7 +6246,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -6982,8 +7028,8 @@ version = "0.0.1" dependencies = [ "log", "malloc_size_of_derive", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "rand_isaac", "servo_malloc_size_of", "uuid", @@ -7607,9 +7653,9 @@ dependencies = [ [[package]] name = "taffy" -version = "0.7.7" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4f4d046dd956a47a7e1a2947083d7ac3e6aa3cfaaead36173ceaa5ab11878c" +checksum = "7aaef0ac998e6527d6d0d5582f7e43953bb17221ac75bb8eb2fcc2db3396db1c" dependencies = [ "arrayvec", "grid", @@ -7649,7 +7695,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.2.16", "once_cell", "rustix", "windows-sys 0.59.0", @@ -8079,7 +8125,7 @@ dependencies = [ "bytes", "chrono", "prost", - "rand", + "rand 0.8.5", "thread-id", "tracing", "tracing-subscriber", @@ -8135,21 +8181,20 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.24.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ - "byteorder", "bytes", "data-encoding", "http 1.3.1", "httparse", "log", - "rand", + "rand 0.9.1", "rustls", "rustls-pki-types", "sha1", - "thiserror 1.0.69", + "thiserror 2.0.9", "utf-8", ] @@ -8388,7 +8433,7 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" dependencies = [ - "getrandom", + "getrandom 0.2.16", "serde", ] @@ -8481,6 +8526,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] name = "wasm-bindgen" version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -8820,6 +8874,15 @@ dependencies = [ ] [[package]] +name = "webpki-roots" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +dependencies = [ + "rustls-pki-types", +] + +[[package]] name = "webrender" version = "0.66.0" source = "git+https://github.com/servo/webrender?branch=0.67#ae2477d9a6da403e5b5dce8a17415a2cd1563074" @@ -9495,6 +9558,15 @@ dependencies = [ ] [[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] name = "wr_glyph_rasterizer" version = "0.1.0" source = "git+https://github.com/servo/webrender?branch=0.67#ae2477d9a6da403e5b5dce8a17415a2cd1563074" diff --git a/Cargo.toml b/Cargo.toml index 0fc9d90bf14..1abdc68ded3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ aes-kw = { version = "0.2.1", features = ["alloc"] } app_units = "0.7" arboard = "3" arrayvec = "0.7" -async-tungstenite = { version = "0.28", features = ["tokio-rustls-webpki-roots"] } +async-tungstenite = { version = "0.29", features = ["tokio-rustls-webpki-roots"] } atomic_refcell = "0.1.13" aws-lc-rs = { version = "1.13", default-features = false, features = ["aws-lc-sys"] } background_hang_monitor_api = { path = "components/shared/background_hang_monitor" } @@ -145,7 +145,7 @@ stylo_traits = { git = "https://github.com/servo/stylo", branch = "2025-05-01" } surfman = { git = "https://github.com/servo/surfman", rev = "f7688b4585f9e0b5d4bf8ee8e4a91e82349610b1", features = ["chains"] } syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } synstructure = "0.13" -taffy = { version = "0.7.7", default-features = false, features = ["detailed_layout_info", "grid", "serde", "std"] } +taffy = { version = "0.8.3", default-features = false, features = ["detailed_layout_info", "grid", "serde", "std"] } thin-vec = "0.2.14" tikv-jemalloc-sys = "0.6.0" tikv-jemallocator = "0.6.0" @@ -156,7 +156,7 @@ tower-service = "0.3" tracing = "0.1.41" tracing-perfetto = "0.1.5" tracing-subscriber = "0.3.19" -tungstenite = "0.24" +tungstenite = "0.26" uluru = "3.0" unicode-bidi = "0.3.18" unicode-properties = { version = "0.1.3", features = ["emoji"] } @@ -167,7 +167,7 @@ urlpattern = "0.3" uuid = { version = "1.12.1", features = ["v4"] } webdriver = "0.53.0" webgpu_traits = { path = "components/shared/webgpu" } -webpki-roots = "0.26" +webpki-roots = "1.0" webrender = { git = "https://github.com/servo/webrender", branch = "0.67", features = ["capture"] } webrender_api = { git = "https://github.com/servo/webrender", branch = "0.67" } webxr-api = { path = "components/shared/webxr" } diff --git a/components/layout/taffy/layout.rs b/components/layout/taffy/layout.rs index 61c4a0508e9..c5f66eee6d2 100644 --- a/components/layout/taffy/layout.rs +++ b/components/layout/taffy/layout.rs @@ -107,7 +107,7 @@ impl taffy::LayoutPartialTree for TaffyContainerContext<'_> { Self: 'a; fn get_core_container_style(&self, _node_id: taffy::NodeId) -> Self::CoreContainerStyle<'_> { - TaffyStyloStyle(self.style) + TaffyStyloStyle::new(self.style, false /* is_replaced */) } fn set_unrounded_layout(&mut self, node_id: taffy::NodeId, layout: &taffy::Layout) { @@ -311,7 +311,7 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> { &self, _node_id: taffy::prelude::NodeId, ) -> Self::GridContainerStyle<'_> { - TaffyStyloStyle(self.style) + TaffyStyloStyle::new(self.style, false /* is_replaced */) } fn get_grid_child_style( @@ -320,7 +320,10 @@ impl taffy::LayoutGridContainer for TaffyContainerContext<'_> { ) -> Self::GridItemStyle<'_> { let id = usize::from(child_node_id); let child = (*self.source_child_nodes[id]).borrow(); - TaffyStyloStyle(AtomicRef::map(child, |c| &*c.style)) + // TODO: account for non-replaced elements that are "compressible replaced" + let is_replaced = child.is_in_flow_replaced(); + let stylo_style = AtomicRef::map(child, |c| &*c.style); + TaffyStyloStyle::new(stylo_style, is_replaced) } fn set_detailed_grid_info( diff --git a/components/layout/taffy/mod.rs b/components/layout/taffy/mod.rs index 05fc09c5511..d34f36f249a 100644 --- a/components/layout/taffy/mod.rs +++ b/components/layout/taffy/mod.rs @@ -19,7 +19,9 @@ use crate::construct_modern::{ModernContainerBuilder, ModernItemKind}; use crate::context::LayoutContext; use crate::dom::LayoutBox; use crate::dom_traversal::{NodeAndStyleInfo, NonReplacedContents}; -use crate::formatting_contexts::IndependentFormattingContext; +use crate::formatting_contexts::{ + IndependentFormattingContext, IndependentFormattingContextContents, +}; use crate::fragment_tree::Fragment; use crate::positioned::{AbsolutelyPositionedBox, PositioningContext}; @@ -166,6 +168,16 @@ impl TaffyItemBox { .repair_style(context, node, new_style), } } + + fn is_in_flow_replaced(&self) -> bool { + match &self.taffy_level_box { + TaffyItemBoxInner::InFlowBox(fc) => match fc.contents { + IndependentFormattingContextContents::NonReplaced(_) => false, + IndependentFormattingContextContents::Replaced(_) => true, + }, + TaffyItemBoxInner::OutOfFlowAbsolutelyPositionedBox(_) => false, + } + } } /// Details from Taffy grid layout that will be stored diff --git a/components/layout/taffy/stylo_taffy/convert.rs b/components/layout/taffy/stylo_taffy/convert.rs index 5780be17c82..1b365cde6f6 100644 --- a/components/layout/taffy/stylo_taffy/convert.rs +++ b/components/layout/taffy/stylo_taffy/convert.rs @@ -7,6 +7,7 @@ mod stylo { pub(crate) use style::properties::generated::longhands::box_sizing::computed_value::T as BoxSizing; pub(crate) use style::properties::longhands::aspect_ratio::computed_value::T as AspectRatio; pub(crate) use style::properties::longhands::position::computed_value::T as Position; + pub(crate) use style::values::computed::length_percentage::Unpacked as UnpackedLengthPercentage; pub(crate) use style::values::computed::{LengthPercentage, Percentage}; pub(crate) use style::values::generics::NonNegative; pub(crate) use style::values::generics::length::{ @@ -32,15 +33,16 @@ mod stylo { pub(crate) use style::values::specified::GenericGridTemplateComponent; } +use taffy::MaxTrackSizingFunction; +use taffy::style_helpers::*; + #[inline] pub fn length_percentage(val: &stylo::LengthPercentage) -> taffy::LengthPercentage { - if let Some(length) = val.to_length() { - taffy::LengthPercentage::Length(length.px()) - } else if let Some(val) = val.to_percentage() { - taffy::LengthPercentage::Percent(val.0) - } else { + match val.unpack() { + stylo::UnpackedLengthPercentage::Length(len) => length(len.px()), + stylo::UnpackedLengthPercentage::Percentage(percentage) => percent(percentage.0), // TODO: Support calc - taffy::LengthPercentage::Percent(0.0) + stylo::UnpackedLengthPercentage::Calc(_) => percent(0.0), } } @@ -48,14 +50,14 @@ pub fn length_percentage(val: &stylo::LengthPercentage) -> taffy::LengthPercenta pub fn dimension(val: &stylo::Size) -> taffy::Dimension { match val { stylo::Size::LengthPercentage(val) => length_percentage(&val.0).into(), - stylo::Size::Auto => taffy::Dimension::Auto, + stylo::Size::Auto => taffy::Dimension::AUTO, // TODO: implement other values in Taffy - stylo::Size::MaxContent => taffy::Dimension::Auto, - stylo::Size::MinContent => taffy::Dimension::Auto, - stylo::Size::FitContent => taffy::Dimension::Auto, - stylo::Size::FitContentFunction(_) => taffy::Dimension::Auto, - stylo::Size::Stretch => taffy::Dimension::Auto, + stylo::Size::MaxContent => taffy::Dimension::AUTO, + stylo::Size::MinContent => taffy::Dimension::AUTO, + stylo::Size::FitContent => taffy::Dimension::AUTO, + stylo::Size::FitContentFunction(_) => taffy::Dimension::AUTO, + stylo::Size::Stretch => taffy::Dimension::AUTO, // Anchor positioning will be flagged off for time being stylo::Size::AnchorSizeFunction(_) => unreachable!(), @@ -67,14 +69,14 @@ pub fn dimension(val: &stylo::Size) -> taffy::Dimension { pub fn max_size_dimension(val: &stylo::MaxSize) -> taffy::Dimension { match val { stylo::MaxSize::LengthPercentage(val) => length_percentage(&val.0).into(), - stylo::MaxSize::None => taffy::Dimension::Auto, + stylo::MaxSize::None => taffy::Dimension::AUTO, // TODO: implement other values in Taffy - stylo::MaxSize::MaxContent => taffy::Dimension::Auto, - stylo::MaxSize::MinContent => taffy::Dimension::Auto, - stylo::MaxSize::FitContent => taffy::Dimension::Auto, - stylo::MaxSize::FitContentFunction(_) => taffy::Dimension::Auto, - stylo::MaxSize::Stretch => taffy::Dimension::Auto, + stylo::MaxSize::MaxContent => taffy::Dimension::AUTO, + stylo::MaxSize::MinContent => taffy::Dimension::AUTO, + stylo::MaxSize::FitContent => taffy::Dimension::AUTO, + stylo::MaxSize::FitContentFunction(_) => taffy::Dimension::AUTO, + stylo::MaxSize::Stretch => taffy::Dimension::AUTO, // Anchor positioning will be flagged off for time being stylo::MaxSize::AnchorSizeFunction(_) => unreachable!(), @@ -85,7 +87,7 @@ pub fn max_size_dimension(val: &stylo::MaxSize) -> taffy::Dimension { #[inline] pub fn margin(val: &stylo::MarginVal) -> taffy::LengthPercentageAuto { match val { - stylo::MarginVal::Auto => taffy::LengthPercentageAuto::Auto, + stylo::MarginVal::Auto => taffy::LengthPercentageAuto::AUTO, stylo::MarginVal::LengthPercentage(val) => length_percentage(val).into(), // Anchor positioning will be flagged off for time being @@ -97,7 +99,7 @@ pub fn margin(val: &stylo::MarginVal) -> taffy::LengthPercentageAuto { #[inline] pub fn inset(val: &stylo::InsetVal) -> taffy::LengthPercentageAuto { match val { - stylo::InsetVal::Auto => taffy::LengthPercentageAuto::Auto, + stylo::InsetVal::Auto => taffy::LengthPercentageAuto::AUTO, stylo::InsetVal::LengthPercentage(val) => length_percentage(val).into(), // Anchor positioning will be flagged off for time being @@ -214,7 +216,7 @@ pub fn gap(input: &stylo::Gap) -> taffy::LengthPercentage { match input { // For Flexbox and CSS Grid the "normal" value is 0px. This may need to be updated // if we ever implement multi-column layout. - stylo::Gap::Normal => taffy::LengthPercentage::Length(0.0), + stylo::Gap::Normal => taffy::LengthPercentage::ZERO, stylo::Gap::LengthPercentage(val) => length_percentage(&val.0), } } @@ -306,16 +308,18 @@ pub fn track_size( max: max_track(max), }, stylo::TrackSize::FitContent(limit) => taffy::MinMax { - min: taffy::MinTrackSizingFunction::Auto, - max: taffy::MaxTrackSizingFunction::FitContent(match limit { - stylo::TrackBreadth::Breadth(lp) => length_percentage(lp), + min: taffy::MinTrackSizingFunction::AUTO, + max: match limit { + stylo::TrackBreadth::Breadth(lp) => { + MaxTrackSizingFunction::fit_content(length_percentage(lp)) + }, // Are these valid? Taffy doesn't support this in any case stylo::TrackBreadth::Fr(_) => unreachable!(), stylo::TrackBreadth::Auto => unreachable!(), stylo::TrackBreadth::MinContent => unreachable!(), stylo::TrackBreadth::MaxContent => unreachable!(), - }), + }, }, } } @@ -325,13 +329,11 @@ pub fn min_track( input: &stylo::TrackBreadth<stylo::LengthPercentage>, ) -> taffy::MinTrackSizingFunction { match input { - stylo::TrackBreadth::Breadth(lp) => { - taffy::MinTrackSizingFunction::Fixed(length_percentage(lp)) - }, - stylo::TrackBreadth::Fr(_) => taffy::MinTrackSizingFunction::Auto, - stylo::TrackBreadth::Auto => taffy::MinTrackSizingFunction::Auto, - stylo::TrackBreadth::MinContent => taffy::MinTrackSizingFunction::MinContent, - stylo::TrackBreadth::MaxContent => taffy::MinTrackSizingFunction::MaxContent, + stylo::TrackBreadth::Breadth(lp) => length_percentage(lp).into(), + stylo::TrackBreadth::Fr(_) => taffy::MinTrackSizingFunction::AUTO, + stylo::TrackBreadth::Auto => taffy::MinTrackSizingFunction::AUTO, + stylo::TrackBreadth::MinContent => taffy::MinTrackSizingFunction::MIN_CONTENT, + stylo::TrackBreadth::MaxContent => taffy::MinTrackSizingFunction::MAX_CONTENT, } } @@ -340,12 +342,10 @@ pub fn max_track( input: &stylo::TrackBreadth<stylo::LengthPercentage>, ) -> taffy::MaxTrackSizingFunction { match input { - stylo::TrackBreadth::Breadth(lp) => { - taffy::MaxTrackSizingFunction::Fixed(length_percentage(lp)) - }, - stylo::TrackBreadth::Fr(val) => taffy::MaxTrackSizingFunction::Fraction(*val), - stylo::TrackBreadth::Auto => taffy::MaxTrackSizingFunction::Auto, - stylo::TrackBreadth::MinContent => taffy::MaxTrackSizingFunction::MinContent, - stylo::TrackBreadth::MaxContent => taffy::MaxTrackSizingFunction::MaxContent, + stylo::TrackBreadth::Breadth(lp) => length_percentage(lp).into(), + stylo::TrackBreadth::Fr(val) => fr(*val), + stylo::TrackBreadth::Auto => taffy::MaxTrackSizingFunction::AUTO, + stylo::TrackBreadth::MinContent => taffy::MaxTrackSizingFunction::MIN_CONTENT, + stylo::TrackBreadth::MaxContent => taffy::MaxTrackSizingFunction::MAX_CONTENT, } } diff --git a/components/layout/taffy/stylo_taffy/wrapper.rs b/components/layout/taffy/stylo_taffy/wrapper.rs index 35b19aa7838..22d02ffeb08 100644 --- a/components/layout/taffy/stylo_taffy/wrapper.rs +++ b/components/layout/taffy/stylo_taffy/wrapper.rs @@ -10,33 +10,44 @@ use super::convert; /// A wrapper struct for anything that Deref's to a [`ComputedValues`], which /// implements Taffy's layout traits and can used with Taffy's layout algorithms. -pub struct TaffyStyloStyle<T: Deref<Target = ComputedValues>>(pub T); +pub struct TaffyStyloStyle<T: Deref<Target = ComputedValues>> { + pub style: T, + pub is_compressible_replaced: bool, +} -impl<T: Deref<Target = ComputedValues>> From<T> for TaffyStyloStyle<T> { - fn from(value: T) -> Self { - Self(value) +impl<T: Deref<Target = ComputedValues>> TaffyStyloStyle<T> { + pub fn new(style: T, is_compressible_replaced: bool) -> Self { + Self { + style, + is_compressible_replaced, + } } } impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> { #[inline] fn box_generation_mode(&self) -> taffy::BoxGenerationMode { - convert::box_generation_mode(self.0.get_box().display) + convert::box_generation_mode(self.style.get_box().display) } #[inline] fn is_block(&self) -> bool { - convert::is_block(self.0.get_box().display) + convert::is_block(self.style.get_box().display) + } + + #[inline] + fn is_compressible_replaced(&self) -> bool { + self.is_compressible_replaced } #[inline] fn box_sizing(&self) -> taffy::BoxSizing { - convert::box_sizing(self.0.get_position().box_sizing) + convert::box_sizing(self.style.get_position().box_sizing) } #[inline] fn overflow(&self) -> taffy::Point<taffy::Overflow> { - let box_styles = self.0.get_box(); + let box_styles = self.style.get_box(); taffy::Point { x: convert::overflow(box_styles.overflow_x), y: convert::overflow(box_styles.overflow_y), @@ -50,12 +61,12 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn position(&self) -> taffy::Position { - convert::position(self.0.get_box().position) + convert::position(self.style.get_box().position) } #[inline] fn inset(&self) -> taffy::Rect<taffy::LengthPercentageAuto> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Rect { left: convert::inset(&position_styles.left), right: convert::inset(&position_styles.right), @@ -66,7 +77,7 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn size(&self) -> taffy::Size<taffy::Dimension> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Size { width: convert::dimension(&position_styles.width), height: convert::dimension(&position_styles.height), @@ -75,7 +86,7 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn min_size(&self) -> taffy::Size<taffy::Dimension> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Size { width: convert::dimension(&position_styles.min_width), height: convert::dimension(&position_styles.min_height), @@ -84,7 +95,7 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn max_size(&self) -> taffy::Size<taffy::Dimension> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Size { width: convert::max_size_dimension(&position_styles.max_width), height: convert::max_size_dimension(&position_styles.max_height), @@ -93,12 +104,12 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn aspect_ratio(&self) -> Option<f32> { - convert::aspect_ratio(self.0.get_position().aspect_ratio) + convert::aspect_ratio(self.style.get_position().aspect_ratio) } #[inline] fn margin(&self) -> taffy::Rect<taffy::LengthPercentageAuto> { - let margin_styles = self.0.get_margin(); + let margin_styles = self.style.get_margin(); taffy::Rect { left: convert::margin(&margin_styles.margin_left), right: convert::margin(&margin_styles.margin_right), @@ -109,7 +120,7 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn padding(&self) -> taffy::Rect<taffy::LengthPercentage> { - let padding_styles = self.0.get_padding(); + let padding_styles = self.style.get_padding(); taffy::Rect { left: convert::length_percentage(&padding_styles.padding_left.0), right: convert::length_percentage(&padding_styles.padding_right.0), @@ -120,12 +131,12 @@ impl<T: Deref<Target = ComputedValues>> taffy::CoreStyle for TaffyStyloStyle<T> #[inline] fn border(&self) -> taffy::Rect<taffy::LengthPercentage> { - let border_styles = self.0.get_border(); + let border_styles = self.style.get_border(); taffy::Rect { - left: taffy::LengthPercentage::Length(border_styles.border_left_width.to_f32_px()), - right: taffy::LengthPercentage::Length(border_styles.border_right_width.to_f32_px()), - top: taffy::LengthPercentage::Length(border_styles.border_top_width.to_f32_px()), - bottom: taffy::LengthPercentage::Length(border_styles.border_bottom_width.to_f32_px()), + left: taffy::LengthPercentage::length(border_styles.border_left_width.to_f32_px()), + right: taffy::LengthPercentage::length(border_styles.border_right_width.to_f32_px()), + top: taffy::LengthPercentage::length(border_styles.border_top_width.to_f32_px()), + bottom: taffy::LengthPercentage::length(border_styles.border_bottom_width.to_f32_px()), } } } @@ -142,32 +153,32 @@ impl<T: Deref<Target = ComputedValues>> taffy::GridContainerStyle for TaffyStylo #[inline] fn grid_template_rows(&self) -> Self::TemplateTrackList<'_> { - convert::grid_template_tracks(&self.0.get_position().grid_template_rows) + convert::grid_template_tracks(&self.style.get_position().grid_template_rows) } #[inline] fn grid_template_columns(&self) -> Self::TemplateTrackList<'_> { - convert::grid_template_tracks(&self.0.get_position().grid_template_columns) + convert::grid_template_tracks(&self.style.get_position().grid_template_columns) } #[inline] fn grid_auto_rows(&self) -> Self::AutoTrackList<'_> { - convert::grid_auto_tracks(&self.0.get_position().grid_auto_rows) + convert::grid_auto_tracks(&self.style.get_position().grid_auto_rows) } #[inline] fn grid_auto_columns(&self) -> Self::AutoTrackList<'_> { - convert::grid_auto_tracks(&self.0.get_position().grid_auto_columns) + convert::grid_auto_tracks(&self.style.get_position().grid_auto_columns) } #[inline] fn grid_auto_flow(&self) -> taffy::GridAutoFlow { - convert::grid_auto_flow(self.0.get_position().grid_auto_flow) + convert::grid_auto_flow(self.style.get_position().grid_auto_flow) } #[inline] fn gap(&self) -> taffy::Size<taffy::LengthPercentage> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Size { width: convert::gap(&position_styles.column_gap), height: convert::gap(&position_styles.row_gap), @@ -176,29 +187,29 @@ impl<T: Deref<Target = ComputedValues>> taffy::GridContainerStyle for TaffyStylo #[inline] fn align_content(&self) -> Option<taffy::AlignContent> { - convert::content_alignment(self.0.get_position().align_content.0) + convert::content_alignment(self.style.get_position().align_content.0) } #[inline] fn justify_content(&self) -> Option<taffy::JustifyContent> { - convert::content_alignment(self.0.get_position().justify_content.0) + convert::content_alignment(self.style.get_position().justify_content.0) } #[inline] fn align_items(&self) -> Option<taffy::AlignItems> { - convert::item_alignment(self.0.get_position().align_items.0) + convert::item_alignment(self.style.get_position().align_items.0) } #[inline] fn justify_items(&self) -> Option<taffy::AlignItems> { - convert::item_alignment(self.0.get_position().justify_items.computed.0) + convert::item_alignment(self.style.get_position().justify_items.computed.0) } } impl<T: Deref<Target = ComputedValues>> taffy::GridItemStyle for TaffyStyloStyle<T> { #[inline] fn grid_row(&self) -> taffy::Line<taffy::GridPlacement> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Line { start: convert::grid_line(&position_styles.grid_row_start), end: convert::grid_line(&position_styles.grid_row_end), @@ -207,7 +218,7 @@ impl<T: Deref<Target = ComputedValues>> taffy::GridItemStyle for TaffyStyloStyle #[inline] fn grid_column(&self) -> taffy::Line<taffy::GridPlacement> { - let position_styles = self.0.get_position(); + let position_styles = self.style.get_position(); taffy::Line { start: convert::grid_line(&position_styles.grid_column_start), end: convert::grid_line(&position_styles.grid_column_end), @@ -216,11 +227,11 @@ impl<T: Deref<Target = ComputedValues>> taffy::GridItemStyle for TaffyStyloStyle #[inline] fn align_self(&self) -> Option<taffy::AlignSelf> { - convert::item_alignment(self.0.get_position().align_self.0.0) + convert::item_alignment(self.style.get_position().align_self.0.0) } #[inline] fn justify_self(&self) -> Option<taffy::AlignSelf> { - convert::item_alignment(self.0.get_position().justify_self.0.0) + convert::item_alignment(self.style.get_position().justify_self.0.0) } } diff --git a/components/net/tests/fetch.rs b/components/net/tests/fetch.rs index e8c5077f12a..0deceab3055 100644 --- a/components/net/tests/fetch.rs +++ b/components/net/tests/fetch.rs @@ -225,7 +225,7 @@ fn test_fetch_blob() { #[test] fn test_file() { - let path = Path::new("../../resources/ahem.css") + let path = Path::new("../../components/net/tests/test.css") .canonicalize() .unwrap(); let url = ServoUrl::from_file_path(path.clone()).unwrap(); diff --git a/components/net/tests/http_loader.rs b/components/net/tests/http_loader.rs index 3e3adcedda9..494d14cb281 100644 --- a/components/net/tests/http_loader.rs +++ b/components/net/tests/http_loader.rs @@ -31,8 +31,6 @@ use http::{HeaderName, Method, StatusCode}; use http_body_util::combinators::BoxBody; use hyper::body::{Body, Bytes, Incoming}; use hyper::{Request as HyperRequest, Response as HyperResponse}; -use ipc_channel::ipc::{self, IpcSharedMemory}; -use ipc_channel::router::ROUTER; use net::cookie::ServoCookie; use net::cookie_storage::CookieStorage; use net::fetch::methods::{self}; @@ -41,8 +39,8 @@ use net::resource_thread::AuthCacheEntry; use net::test::{DECODER_BUFFER_SIZE, replace_host_table}; use net_traits::http_status::HttpStatus; use net_traits::request::{ - BodyChunkRequest, BodyChunkResponse, BodySource, CredentialsMode, Destination, Referrer, - Request, RequestBody, RequestBuilder, RequestMode, + CredentialsMode, Destination, Referrer, Request, RequestBuilder, RequestMode, + create_request_body_with_content, }; use net_traits::response::{Response, ResponseBody}; use net_traits::{CookieSource, FetchTaskTarget, NetworkError, ReferrerPolicy}; @@ -100,24 +98,6 @@ pub fn expect_devtools_http_response( } } -fn create_request_body_with_content(content: IpcSharedMemory) -> RequestBody { - let content_len = content.len(); - - let (chunk_request_sender, chunk_request_receiver) = ipc::channel().unwrap(); - ROUTER.add_typed_route( - chunk_request_receiver, - Box::new(move |message| { - let request = message.unwrap(); - if let BodyChunkRequest::Connect(sender) = request { - let _ = sender.send(BodyChunkResponse::Chunk(content.clone())); - let _ = sender.send(BodyChunkResponse::Done); - } - }), - ); - - RequestBody::new(chunk_request_sender, BodySource::Object, Some(content_len)) -} - #[test] fn test_check_default_headers_loaded_in_every_request() { let expected_headers = Arc::new(Mutex::new(None)); @@ -591,8 +571,8 @@ fn test_load_doesnt_send_request_body_on_any_redirect() { }; let (pre_server, pre_url) = make_server(pre_handler); - let content = b"Body on POST!"; - let request_body = create_request_body_with_content(IpcSharedMemory::from_bytes(content)); + let content = "Body on POST!"; + let request_body = create_request_body_with_content(content); let request = RequestBuilder::new(None, pre_url.clone(), Referrer::NoReferrer) .body(Some(request_body)) @@ -891,20 +871,21 @@ fn test_when_cookie_received_marked_secure_is_ignored_for_http() { #[test] fn test_load_sets_content_length_to_length_of_request_body() { - let content = b"This is a request body"; + let content = "This is a request body"; + let content_bytes = content.as_bytes(); let handler = move |request: HyperRequest<Incoming>, response: &mut HyperResponse<BoxBody<Bytes, hyper::Error>>| { - let content_length = ContentLength(content.len() as u64); + let content_length = ContentLength(content_bytes.len() as u64); assert_eq!( request.headers().typed_get::<ContentLength>(), Some(content_length) ); - *response.body_mut() = make_body(content.to_vec()); + *response.body_mut() = make_body(content_bytes.to_vec()); }; let (server, url) = make_server(handler); - let request_body = create_request_body_with_content(IpcSharedMemory::from_bytes(content)); + let request_body = create_request_body_with_content(content); let request = RequestBuilder::new(None, url.clone(), Referrer::NoReferrer) .method(Method::POST) diff --git a/components/net/tests/test.css b/components/net/tests/test.css new file mode 100644 index 00000000000..f7fa63bbaa7 --- /dev/null +++ b/components/net/tests/test.css @@ -0,0 +1,3 @@ +html { + color: red; +} diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs index 8ad7df5d376..0b5a81f47ae 100644 --- a/components/net/websocket_loader.rs +++ b/components/net/websocket_loader.rs @@ -169,12 +169,12 @@ fn setup_dom_listener( trace!("handling WS DOM action: {:?}", dom_action); match dom_action { WebSocketDomAction::SendMessage(MessageData::Text(data)) => { - if let Err(e) = sender.send(DomMsg::Send(Message::Text(data))) { + if let Err(e) = sender.send(DomMsg::Send(Message::Text(data.into()))) { warn!("Error sending websocket message: {:?}", e); } }, WebSocketDomAction::SendMessage(MessageData::Binary(data)) => { - if let Err(e) = sender.send(DomMsg::Send(Message::Binary(data))) { + if let Err(e) = sender.send(DomMsg::Send(Message::Binary(data.into()))) { warn!("Error sending websocket message: {:?}", e); } }, @@ -246,7 +246,7 @@ async fn run_ws_loop( }; match msg { Message::Text(s) => { - let message = MessageData::Text(s); + let message = MessageData::Text(s.as_str().to_owned()); if let Err(e) = resource_event_sender .send(WebSocketNetworkEvent::MessageReceived(message)) { @@ -256,7 +256,7 @@ async fn run_ws_loop( } Message::Binary(v) => { - let message = MessageData::Binary(v); + let message = MessageData::Binary(v.to_vec()); if let Err(e) = resource_event_sender .send(WebSocketNetworkEvent::MessageReceived(message)) { diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs index 75abc67aef1..9bec85afe5b 100644 --- a/components/script/dom/globalscope.rs +++ b/components/script/dom/globalscope.rs @@ -3501,7 +3501,8 @@ impl GlobalScope { Some(event_target) => Trusted::new(event_target.upcast()), }; // Step 3: Queue a task to run the following steps: - let task = CSPViolationReportTask::new(Trusted::new(self), target, report); + let task = + CSPViolationReportTask::new(Trusted::new(self), target, report, violation.policy); self.task_manager() .dom_manipulation_task_source() .queue(task); diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index e7f60e23772..1260fa9867a 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2280,6 +2280,14 @@ impl ScriptThread { can_gc, ) }, + WebDriverScriptCommand::GetElementShadowRoot(element_id, reply) => { + webdriver_handlers::handle_get_element_shadow_root( + &documents, + pipeline_id, + element_id, + reply, + ) + }, WebDriverScriptCommand::ElementClick(element_id, reply) => { webdriver_handlers::handle_element_click( &documents, diff --git a/components/script/security_manager.rs b/components/script/security_manager.rs index ee062594eb8..89a8ba6ed89 100644 --- a/components/script/security_manager.rs +++ b/components/script/security_manager.rs @@ -2,7 +2,16 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use net_traits::request::Referrer; +use std::sync::{Arc, Mutex}; + +use content_security_policy as csp; +use headers::{ContentType, HeaderMap, HeaderMapExt}; +use net_traits::request::{ + CredentialsMode, Referrer, RequestBody, RequestId, create_request_body_with_content, +}; +use net_traits::{ + FetchMetadata, FetchResponseListener, NetworkError, ResourceFetchTiming, ResourceTimingType, +}; use serde::Serialize; use servo_url::ServoUrl; use stylo_atoms::Atom; @@ -14,10 +23,14 @@ use crate::dom::bindings::codegen::Bindings::SecurityPolicyViolationEventBinding }; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; +use crate::dom::bindings::root::DomRoot; use crate::dom::event::{Event, EventBubbles, EventCancelable, EventComposed}; use crate::dom::eventtarget::EventTarget; +use crate::dom::performanceresourcetiming::InitiatorType; use crate::dom::securitypolicyviolationevent::SecurityPolicyViolationEvent; use crate::dom::types::GlobalScope; +use crate::fetch::create_a_potential_cors_request; +use crate::network_listener::{PreInvoke, ResourceTimingListener, submit_timing}; use crate::script_runtime::CanGc; use crate::task::TaskOnce; @@ -25,9 +38,10 @@ pub(crate) struct CSPViolationReportTask { global: Trusted<GlobalScope>, event_target: Trusted<EventTarget>, violation_report: SecurityPolicyViolationReport, + violation_policy: csp::Policy, } -#[derive(Debug, Serialize)] +#[derive(Clone, Debug, Serialize)] #[serde(rename_all = "camelCase")] pub(crate) struct SecurityPolicyViolationReport { sample: Option<String>, @@ -47,6 +61,30 @@ pub(crate) struct SecurityPolicyViolationReport { disposition: SecurityPolicyViolationEventDisposition, } +#[derive(Serialize)] +#[serde(rename_all = "kebab-case")] +struct CSPReportUriViolationReportBody { + document_uri: String, + referrer: String, + blocked_uri: String, + effective_directive: String, + violated_directive: String, + original_policy: String, + #[serde(serialize_with = "serialize_disposition")] + disposition: SecurityPolicyViolationEventDisposition, + status_code: u16, + script_sample: Option<String>, + source_file: Option<String>, + line_number: Option<u32>, + column_number: Option<u32>, +} + +#[derive(Serialize)] +#[serde(rename_all = "kebab-case")] +struct CSPReportUriViolationReport { + csp_report: CSPReportUriViolationReportBody, +} + #[derive(Default)] pub(crate) struct CSPViolationReportBuilder { pub report_only: bool, @@ -114,36 +152,19 @@ impl CSPViolationReportBuilder { self } - /// <https://w3c.github.io/webappsec-csp/#strip-url-for-use-in-reports> - fn strip_url_for_reports(&self, mut url: ServoUrl) -> String { - let scheme = url.scheme(); - // > Step 1: If url’s scheme is not an HTTP(S) scheme, then return url’s scheme. - if scheme != "https" && scheme != "http" { - return scheme.to_owned(); - } - // > Step 2: Set url’s fragment to the empty string. - url.set_fragment(None); - // > Step 3: Set url’s username to the empty string. - let _ = url.set_username(""); - // > Step 4: Set url’s password to the empty string. - let _ = url.set_password(None); - // > Step 5: Return the result of executing the URL serializer on url. - url.into_string() - } - pub fn build(self, global: &GlobalScope) -> SecurityPolicyViolationReport { SecurityPolicyViolationReport { violated_directive: self.effective_directive.clone(), effective_directive: self.effective_directive.clone(), - document_url: self.strip_url_for_reports(global.get_url()), + document_url: strip_url_for_reports(global.get_url()), disposition: match self.report_only { true => SecurityPolicyViolationEventDisposition::Report, false => SecurityPolicyViolationEventDisposition::Enforce, }, // https://w3c.github.io/webappsec-csp/#violation-referrer referrer: match global.get_referrer() { - Referrer::Client(url) => self.strip_url_for_reports(url), - Referrer::ReferrerUrl(url) => self.strip_url_for_reports(url), + Referrer::Client(url) => strip_url_for_reports(url), + Referrer::ReferrerUrl(url) => strip_url_for_reports(url), _ => "".to_owned(), }, sample: self.sample, @@ -162,22 +183,24 @@ impl CSPViolationReportTask { global: Trusted<GlobalScope>, event_target: Trusted<EventTarget>, violation_report: SecurityPolicyViolationReport, + violation_policy: csp::Policy, ) -> CSPViolationReportTask { CSPViolationReportTask { global, event_target, violation_report, + violation_policy, } } - fn fire_violation_event(self, can_gc: CanGc) { + fn fire_violation_event(&self, can_gc: CanGc) { let event = SecurityPolicyViolationEvent::new( &self.global.root(), Atom::from("securitypolicyviolation"), EventBubbles::Bubbles, EventCancelable::Cancelable, EventComposed::Composed, - &self.violation_report.convert(), + &self.violation_report.clone().convert(), can_gc, ); @@ -185,6 +208,72 @@ impl CSPViolationReportTask { .upcast::<Event>() .fire(&self.event_target.root(), can_gc); } + + /// <https://www.w3.org/TR/CSP/#deprecated-serialize-violation> + fn serialize_violation(&self) -> Option<RequestBody> { + let report_body = CSPReportUriViolationReport { + // Steps 1-3. + csp_report: self.violation_report.clone().into(), + }; + // Step 4. Return the result of serialize an infra value to JSON bytes given «[ "csp-report" → body ]». + Some(create_request_body_with_content( + &serde_json::to_string(&report_body).unwrap_or("".to_owned()), + )) + } + + /// Step 3.4 of <https://www.w3.org/TR/CSP/#report-violation> + fn post_csp_violation_to_report_uri(&self, report_uri_directive: &csp::Directive) { + let global = self.global.root(); + // Step 3.4.1. If violation’s policy’s directive set contains a directive named + // "report-to", skip the remaining substeps. + if self + .violation_policy + .contains_a_directive_whose_name_is("report-to") + { + return; + } + // Step 3.4.2. For each token of directive’s value: + for token in &report_uri_directive.value { + // Step 3.4.2.1. Let endpoint be the result of executing the URL parser with token as the input, + // and violation’s url as the base URL. + let Ok(endpoint) = ServoUrl::parse_with_base(Some(&global.get_url()), token) else { + // Step 3.4.2.2. If endpoint is not a valid URL, skip the remaining substeps. + continue; + }; + // Step 3.4.2.3. Let request be a new request, initialized as follows: + let mut headers = HeaderMap::with_capacity(1); + headers.typed_insert(ContentType::from( + "application/csp-report".parse::<mime::Mime>().unwrap(), + )); + let request_body = self.serialize_violation(); + let request = create_a_potential_cors_request( + None, + endpoint.clone(), + csp::Destination::Report, + None, + None, + global.get_referrer(), + global.insecure_requests_policy(), + global.has_trustworthy_ancestor_or_current_origin(), + global.policy_container(), + ) + .method(http::Method::POST) + .body(request_body) + .origin(global.origin().immutable().clone()) + .credentials_mode(CredentialsMode::CredentialsSameOrigin) + .headers(headers); + // Step 3.4.2.4. Fetch request. The result will be ignored. + global.fetch( + request, + Arc::new(Mutex::new(CSPReportUriFetchListener { + endpoint, + global: Trusted::new(&global), + resource_timing: ResourceFetchTiming::new(ResourceTimingType::None), + })), + global.task_manager().networking_task_source().into(), + ); + } + } } /// Corresponds to the operation in 5.5 Report Violation @@ -196,7 +285,15 @@ impl TaskOnce for CSPViolationReportTask { // > that uses the SecurityPolicyViolationEvent interface // > at target with its attributes initialized as follows: self.fire_violation_event(CanGc::note()); - // TODO: Support `report-to` directive that corresponds to 5.5.3.5. + // Step 3.4. If violation’s policy’s directive set contains a directive named "report-uri" directive: + if let Some(report_uri_directive) = self + .violation_policy + .directive_set + .iter() + .find(|directive| directive.name == "report-uri") + { + self.post_csp_violation_to_report_uri(report_uri_directive); + } } } @@ -220,6 +317,62 @@ impl Convert<SecurityPolicyViolationEventInit> for SecurityPolicyViolationReport } } +/// <https://www.w3.org/TR/CSP/#deprecated-serialize-violation> +impl From<SecurityPolicyViolationReport> for CSPReportUriViolationReportBody { + fn from(value: SecurityPolicyViolationReport) -> Self { + // Step 1. Let body be a map with its keys initialized as follows: + let mut converted = Self { + document_uri: value.document_url, + referrer: value.referrer, + blocked_uri: value.blocked_url, + effective_directive: value.effective_directive, + violated_directive: value.violated_directive, + original_policy: value.original_policy, + disposition: value.disposition, + status_code: value.status_code, + script_sample: None, + source_file: None, + line_number: None, + column_number: None, + }; + + // Step 2. If violation’s source file is not null: + if !value.source_file.is_empty() { + // Step 2.1. Set body["source-file'] to the result of + // executing § 5.4 Strip URL for use in reports on violation’s source file. + converted.source_file = ServoUrl::parse(&value.source_file) + .map(strip_url_for_reports) + .ok(); + // Step 2.2. Set body["line-number"] to violation’s line number. + converted.line_number = Some(value.line_number); + // Step 2.3. Set body["column-number"] to violation’s column number. + converted.column_number = Some(value.column_number); + } + + // Step 3. Assert: If body["blocked-uri"] is not "inline", then body["sample"] is the empty string. + debug_assert!(converted.blocked_uri == "inline" || converted.script_sample.is_none()); + + converted + } +} + +/// <https://w3c.github.io/webappsec-csp/#strip-url-for-use-in-reports> +fn strip_url_for_reports(mut url: ServoUrl) -> String { + let scheme = url.scheme(); + // > Step 1: If url’s scheme is not an HTTP(S) scheme, then return url’s scheme. + if scheme != "https" && scheme != "http" { + return scheme.to_owned(); + } + // > Step 2: Set url’s fragment to the empty string. + url.set_fragment(None); + // > Step 3: Set url’s username to the empty string. + let _ = url.set_username(""); + // > Step 4: Set url’s password to the empty string. + let _ = url.set_password(None); + // > Step 5: Return the result of executing the URL serializer on url. + url.into_string() +} + fn serialize_disposition<S: serde::Serializer>( val: &SecurityPolicyViolationEventDisposition, serializer: S, @@ -229,3 +382,71 @@ fn serialize_disposition<S: serde::Serializer>( SecurityPolicyViolationEventDisposition::Enforce => serializer.serialize_str("enforce"), } } + +struct CSPReportUriFetchListener { + /// Endpoint URL of this request. + endpoint: ServoUrl, + /// Timing data for this resource. + resource_timing: ResourceFetchTiming, + /// The global object fetching the report uri violation + global: Trusted<GlobalScope>, +} + +impl FetchResponseListener for CSPReportUriFetchListener { + fn process_request_body(&mut self, _: RequestId) {} + + fn process_request_eof(&mut self, _: RequestId) {} + + fn process_response( + &mut self, + _: RequestId, + fetch_metadata: Result<FetchMetadata, NetworkError>, + ) { + _ = fetch_metadata; + } + + fn process_response_chunk(&mut self, _: RequestId, chunk: Vec<u8>) { + _ = chunk; + } + + fn process_response_eof( + &mut self, + _: RequestId, + response: Result<ResourceFetchTiming, NetworkError>, + ) { + _ = response; + } + + fn resource_timing_mut(&mut self) -> &mut ResourceFetchTiming { + &mut self.resource_timing + } + + fn resource_timing(&self) -> &ResourceFetchTiming { + &self.resource_timing + } + + fn submit_resource_timing(&mut self) { + submit_timing(self, CanGc::note()) + } + + fn process_csp_violations(&mut self, _request_id: RequestId, violations: Vec<csp::Violation>) { + let global = &self.resource_timing_global(); + global.report_csp_violations(violations, None); + } +} + +impl ResourceTimingListener for CSPReportUriFetchListener { + fn resource_timing_information(&self) -> (InitiatorType, ServoUrl) { + (InitiatorType::Other, self.endpoint.clone()) + } + + fn resource_timing_global(&self) -> DomRoot<GlobalScope> { + self.global.root() + } +} + +impl PreInvoke for CSPReportUriFetchListener { + fn should_invoke(&self) -> bool { + true + } +} diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs index c81dcbd85fd..9c647ab5b8b 100644 --- a/components/script/webdriver_handlers.rs +++ b/components/script/webdriver_handlers.rs @@ -9,9 +9,7 @@ use std::ptr::NonNull; use base::id::{BrowsingContextId, PipelineId}; use cookie::Cookie; -use embedder_traits::{ - WebDriverCookieError, WebDriverFrameId, WebDriverJSError, WebDriverJSResult, WebDriverJSValue, -}; +use embedder_traits::{WebDriverFrameId, WebDriverJSError, WebDriverJSResult, WebDriverJSValue}; use euclid::default::{Point2D, Rect, Size2D}; use hyper_serde::Serde; use ipc_channel::ipc::{self, IpcSender}; @@ -843,6 +841,27 @@ pub(crate) fn handle_find_element_elements_tag_name( .unwrap(); } +/// <https://www.w3.org/TR/webdriver2/#dfn-get-element-shadow-root> +pub(crate) fn handle_get_element_shadow_root( + documents: &DocumentCollection, + pipeline: PipelineId, + element_id: String, + reply: IpcSender<Result<Option<String>, ErrorStatus>>, +) { + reply + .send( + find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| match node + .downcast::<Element>( + ) { + Some(element) => Ok(element + .GetShadowRoot() + .map(|x| x.upcast::<Node>().unique_id(pipeline))), + None => Err(ErrorStatus::NoSuchElement), + }), + ) + .unwrap(); +} + pub(crate) fn handle_will_send_keys( documents: &DocumentCollection, pipeline: PipelineId, @@ -973,7 +992,7 @@ pub(crate) fn handle_get_page_source( pub(crate) fn handle_get_cookies( documents: &DocumentCollection, pipeline: PipelineId, - reply: IpcSender<Vec<Serde<Cookie<'static>>>>, + reply: IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>, ) { reply .send( @@ -987,9 +1006,9 @@ pub(crate) fn handle_get_cookies( .as_global_scope() .resource_threads() .send(GetCookiesDataForUrl(url, sender, NonHTTP)); - receiver.recv().unwrap() + Ok(receiver.recv().unwrap()) }, - None => Vec::new(), + None => Ok(Vec::new()), }, ) .unwrap(); @@ -1000,7 +1019,7 @@ pub(crate) fn handle_get_cookie( documents: &DocumentCollection, pipeline: PipelineId, name: String, - reply: IpcSender<Vec<Serde<Cookie<'static>>>>, + reply: IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>, ) { reply .send( @@ -1015,12 +1034,12 @@ pub(crate) fn handle_get_cookie( .resource_threads() .send(GetCookiesDataForUrl(url, sender, NonHTTP)); let cookies = receiver.recv().unwrap(); - cookies + Ok(cookies .into_iter() .filter(|cookie| cookie.name() == &*name) - .collect() + .collect()) }, - None => Vec::new(), + None => Ok(Vec::new()), }, ) .unwrap(); @@ -1031,15 +1050,13 @@ pub(crate) fn handle_add_cookie( documents: &DocumentCollection, pipeline: PipelineId, cookie: Cookie<'static>, - reply: IpcSender<Result<(), WebDriverCookieError>>, + reply: IpcSender<Result<(), ErrorStatus>>, ) { // TODO: Return a different error if the pipeline doesn't exist let document = match documents.find_document(pipeline) { Some(document) => document, None => { - return reply - .send(Err(WebDriverCookieError::UnableToSetCookie)) - .unwrap(); + return reply.send(Err(ErrorStatus::UnableToSetCookie)).unwrap(); }, }; let url = document.url(); @@ -1052,7 +1069,7 @@ pub(crate) fn handle_add_cookie( let domain = cookie.domain().map(ToOwned::to_owned); reply .send(match (document.is_cookie_averse(), domain) { - (true, _) => Err(WebDriverCookieError::InvalidDomain), + (true, _) => Err(ErrorStatus::InvalidCookieDomain), (false, Some(ref domain)) if url.host_str().map(|x| x == domain).unwrap_or(false) => { let _ = document .window() @@ -1069,7 +1086,7 @@ pub(crate) fn handle_add_cookie( .send(SetCookieForUrl(url, Serde(cookie), method)); Ok(()) }, - (_, _) => Err(WebDriverCookieError::UnableToSetCookie), + (_, _) => Err(ErrorStatus::UnableToSetCookie), }) .unwrap(); } diff --git a/components/shared/embedder/webdriver.rs b/components/shared/embedder/webdriver.rs index ad1271a045c..4f58c10fb6f 100644 --- a/components/shared/embedder/webdriver.rs +++ b/components/shared/embedder/webdriver.rs @@ -94,7 +94,7 @@ pub enum WebDriverScriptCommand { serialize_with = "::hyper_serde::serialize" )] Cookie<'static>, - IpcSender<Result<(), WebDriverCookieError>>, + IpcSender<Result<(), ErrorStatus>>, ), DeleteCookies(IpcSender<Result<(), ErrorStatus>>), DeleteCookie(String, IpcSender<Result<(), ErrorStatus>>), @@ -130,11 +130,15 @@ pub enum WebDriverScriptCommand { IpcSender<Result<Vec<String>, ErrorStatus>>, ), FindElementElementsTagName(String, String, IpcSender<Result<Vec<String>, ErrorStatus>>), + GetElementShadowRoot(String, IpcSender<Result<Option<String>, ErrorStatus>>), ElementClick(String, IpcSender<Result<Option<String>, ErrorStatus>>), GetActiveElement(IpcSender<Option<String>>), GetComputedRole(String, IpcSender<Result<Option<String>, ErrorStatus>>), - GetCookie(String, IpcSender<Vec<Serde<Cookie<'static>>>>), - GetCookies(IpcSender<Vec<Serde<Cookie<'static>>>>), + GetCookie( + String, + IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>, + ), + GetCookies(IpcSender<Result<Vec<Serde<Cookie<'static>>>, ErrorStatus>>), GetElementAttribute( String, String, @@ -164,12 +168,6 @@ pub enum WebDriverScriptCommand { WillSendKeys(String, String, bool, IpcSender<Result<bool, ErrorStatus>>), } -#[derive(Debug, Deserialize, Serialize)] -pub enum WebDriverCookieError { - InvalidDomain, - UnableToSetCookie, -} - #[derive(Clone, Debug, Deserialize, Serialize)] pub enum WebDriverJSValue { Undefined, diff --git a/components/shared/net/request.rs b/components/shared/net/request.rs index 259132b55c4..7b39ac7b78d 100644 --- a/components/shared/net/request.rs +++ b/components/shared/net/request.rs @@ -9,6 +9,7 @@ use content_security_policy::{self as csp}; use http::header::{AUTHORIZATION, HeaderName}; use http::{HeaderMap, Method}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcSharedMemory}; +use ipc_channel::router::ROUTER; use malloc_size_of_derive::MallocSizeOf; use mime::Mime; use serde::{Deserialize, Serialize}; @@ -925,3 +926,22 @@ pub fn convert_header_names_to_sorted_lowercase_set( ordered_set.dedup(); ordered_set.into_iter().cloned().collect() } + +pub fn create_request_body_with_content(content: &str) -> RequestBody { + let content_bytes = IpcSharedMemory::from_bytes(content.as_bytes()); + let content_len = content_bytes.len(); + + let (chunk_request_sender, chunk_request_receiver) = ipc::channel().unwrap(); + ROUTER.add_typed_route( + chunk_request_receiver, + Box::new(move |message| { + let request = message.unwrap(); + if let BodyChunkRequest::Connect(sender) = request { + let _ = sender.send(BodyChunkResponse::Chunk(content_bytes.clone())); + let _ = sender.send(BodyChunkResponse::Done); + } + }), + ); + + RequestBody::new(chunk_request_sender, BodySource::Object, Some(content_len)) +} diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 1b585319703..0d92be01a3f 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -24,9 +24,9 @@ use constellation_traits::{EmbedderToConstellationMessage, TraversalDirection}; use cookie::{CookieBuilder, Expiration}; use crossbeam_channel::{Receiver, Sender, after, select, unbounded}; use embedder_traits::{ - MouseButton, WebDriverCommandMsg, WebDriverCommandResponse, WebDriverCookieError, - WebDriverFrameId, WebDriverJSError, WebDriverJSResult, WebDriverJSValue, WebDriverLoadStatus, - WebDriverMessageId, WebDriverScriptCommand, + MouseButton, WebDriverCommandMsg, WebDriverCommandResponse, WebDriverFrameId, WebDriverJSError, + WebDriverJSResult, WebDriverJSValue, WebDriverLoadStatus, WebDriverMessageId, + WebDriverScriptCommand, }; use euclid::{Rect, Size2D}; use http::method::Method; @@ -1214,6 +1214,28 @@ impl Handler { } } + fn handle_get_shadow_root(&self, element: WebElement) -> WebDriverResult<WebDriverResponse> { + let (sender, receiver) = ipc::channel().unwrap(); + let cmd = WebDriverScriptCommand::GetElementShadowRoot(element.to_string(), sender); + self.browsing_context_script_command(cmd)?; + match wait_for_script_response(receiver)? { + Ok(value) => { + if value.is_none() { + return Err(WebDriverError::new( + ErrorStatus::NoSuchShadowRoot, + "No shadow root found for the element", + )); + } + let value_resp = serde_json::to_value( + value.map(|x| serde_json::to_value(WebElement(x)).unwrap()), + )?; + let shadow_root_value = json!({ SHADOW_ROOT_IDENTIFIER: value_resp }); + Ok(WebDriverResponse::Generic(ValueResponse(shadow_root_value))) + }, + Err(error) => Err(WebDriverError::new(error, "")), + } + } + // https://w3c.github.io/webdriver/webdriver-spec.html#get-element-rect fn handle_element_rect(&self, element: &WebElement) -> WebDriverResult<WebDriverResponse> { let (sender, receiver) = ipc::channel().unwrap(); @@ -1343,7 +1365,10 @@ impl Handler { let (sender, receiver) = ipc::channel().unwrap(); let cmd = WebDriverScriptCommand::GetCookies(sender); self.browsing_context_script_command(cmd)?; - let cookies = wait_for_script_response(receiver)?; + let cookies = match wait_for_script_response(receiver)? { + Ok(cookies) => cookies, + Err(error) => return Err(WebDriverError::new(error, "")), + }; let response = cookies .into_iter() .map(|cookie| cookie_msg_to_cookie(cookie.into_inner())) @@ -1355,7 +1380,10 @@ impl Handler { let (sender, receiver) = ipc::channel().unwrap(); let cmd = WebDriverScriptCommand::GetCookie(name, sender); self.browsing_context_script_command(cmd)?; - let cookies = wait_for_script_response(receiver)?; + let cookies = match wait_for_script_response(receiver)? { + Ok(cookies) => cookies, + Err(error) => return Err(WebDriverError::new(error, "")), + }; let Some(response) = cookies .into_iter() .map(|cookie| cookie_msg_to_cookie(cookie.into_inner())) @@ -1388,16 +1416,7 @@ impl Handler { self.browsing_context_script_command(cmd)?; match wait_for_script_response(receiver)? { Ok(_) => Ok(WebDriverResponse::Void), - Err(response) => match response { - WebDriverCookieError::InvalidDomain => Err(WebDriverError::new( - ErrorStatus::InvalidCookieDomain, - "Invalid cookie domain", - )), - WebDriverCookieError::UnableToSetCookie => Err(WebDriverError::new( - ErrorStatus::UnableToSetCookie, - "Unable to set cookie", - )), - }, + Err(error) => Err(WebDriverError::new(error, "")), } } @@ -1936,6 +1955,7 @@ impl WebDriverHandler<ServoExtensionRoute> for Handler { WebDriverCommand::FindElementElements(ref element, ref parameters) => { self.handle_find_elements_from_element(element, parameters) }, + WebDriverCommand::GetShadowRoot(element) => self.handle_get_shadow_root(element), WebDriverCommand::GetNamedCookie(name) => self.handle_get_cookie(name), WebDriverCommand::GetCookies => self.handle_get_cookies(), WebDriverCommand::GetActiveElement => self.handle_active_element(), diff --git a/deny.toml b/deny.toml index cc0040081ce..037e09e8469 100644 --- a/deny.toml +++ b/deny.toml @@ -71,14 +71,17 @@ allow = [] # List of crates to deny: deny = [ "num", - { crate = "rand", wrappers = [ - "ipc-channel", - "phf_generator", - "quickcheck", - "servo_rand", - "tracing-perfetto", - "tungstenite", - ] }, + # cargo-deny does not allow denying the rand crate while also skipping + # it for duplicate checks. While the ecosystem is split between 0.8 and 0.9, + # we need to prioritize allowing duplicate versions. + #{ crate = "rand", wrappers = [ + # "ipc-channel", + # "phf_generator", + # "quickcheck", + # "servo_rand", + # "tracing-perfetto", + # "tungstenite", + #] }, ] # List of crates to skip for the duplicate check: @@ -160,6 +163,14 @@ skip = [ "objc2-app-kit", "objc2-foundation", "objc2", + + # duplicated by tungstenite + "getrandom", + "rand", + "rand_chacha", + "rand_core", + "wasi", + "webpki-roots", ] # github.com organizations to allow git sources for diff --git a/python/wpt/run.py b/python/wpt/run.py index 4d221f816e3..d44d24f5882 100644 --- a/python/wpt/run.py +++ b/python/wpt/run.py @@ -66,7 +66,7 @@ def run_tests(default_binary_path: str, **kwargs): # chunks and leads to more consistent timing on GitHub Actions. set_if_none(kwargs, "chunk_type", "id_hash") - kwargs["user_stylesheets"].append(os.path.join(SERVO_ROOT, "resources", "ahem.css")) + kwargs["user_stylesheets"].append(os.path.join(SERVO_ROOT, "tests", "wpt", "tests", "fonts", "ahem.css")) set_if_none(kwargs, "binary", default_binary_path) set_if_none(kwargs, "webdriver_binary", default_binary_path) diff --git a/resources/ahem.css b/resources/ahem.css deleted file mode 100644 index 4c7e979e64c..00000000000 --- a/resources/ahem.css +++ /dev/null @@ -1,4 +0,0 @@ -@font-face { - font-family: Ahem; - src: url(ahem/AHEM____.TTF); -} diff --git a/resources/ahem/AHEM____.TTF b/resources/ahem/AHEM____.TTF Binary files differdeleted file mode 100644 index ac81cb03165..00000000000 --- a/resources/ahem/AHEM____.TTF +++ /dev/null diff --git a/resources/ahem/Ahem.ps b/resources/ahem/Ahem.ps deleted file mode 100644 index 8bd54c6b64f..00000000000 --- a/resources/ahem/Ahem.ps +++ /dev/null @@ -1 +0,0 @@ -%!PS-AdobeFont-1.0: Ahem 001.000
%%CreationDate: 24.5.99 at 19:57
%%VMusage: 1024 22706
% Generated by Fontographer 4.1.5
% Most characters are the em square, except &EAcute and "p", which show ascent/descent from the baseline. Useful for testing composition systems. Produced by Todd Fahrner for the CSS Samurai's browser testing.
% ADL: 800 200 0
%%EndComments
FontDirectory/Ahem known{/Ahem findfont dup/UniqueID known{dup
/UniqueID get 4790119 eq exch/FontType get 1 eq and}{pop false}ifelse
{save true}{false}ifelse}{false}ifelse
20 dict begin
/FontInfo 16 dict dup begin
/version (001.000) readonly def
/FullName (Ahem) readonly def
/FamilyName (Ahem) readonly def
/Weight (Medium) readonly def
/ItalicAngle 0 def
/isFixedPitch true def
/UnderlinePosition -133 def
/UnderlineThickness 20 def
/Notice (Most characters are the em square, except &EAcute and "p", which show ascent/descent from the baseline. Useful for testing composition systems. Produced by Todd Fahrner for the CSS Samurai's browser testing.) readonly def
/em 1000 def
/ascent 800 def
/descent 200 def
end readonly def
/FontName /Ahem def
/Encoding 256 array
dup 0/.notdef put
dup 1/.notdef put
dup 2/.notdef put
dup 3/.notdef put
dup 4/.notdef put
dup 5/.notdef put
dup 6/.notdef put
dup 7/.notdef put
dup 8/.notdef put
dup 9/.notdef put
dup 10/.notdef put
dup 11/.notdef put
dup 12/.notdef put
dup 13/.notdef put
dup 14/.notdef put
dup 15/.notdef put
dup 16/.notdef put
dup 17/.notdef put
dup 18/.notdef put
dup 19/.notdef put
dup 20/.notdef put
dup 21/.notdef put
dup 22/.notdef put
dup 23/.notdef put
dup 24/.notdef put
dup 25/.notdef put
dup 26/.notdef put
dup 27/.notdef put
dup 28/.notdef put
dup 29/.notdef put
dup 30/.notdef put
dup 31/.notdef put
dup 32/space put
dup 33/exclam put
dup 34/quotedbl put
dup 35/numbersign put
dup 36/dollar put
dup 37/percent put
dup 38/ampersand put
dup 39/quoteright put
dup 40/parenleft put
dup 41/parenright put
dup 42/asterisk put
dup 43/plus put
dup 44/comma put
dup 45/minus put
dup 46/period put
dup 47/slash put
dup 48/zero put
dup 49/one put
dup 50/two put
dup 51/three put
dup 52/four put
dup 53/five put
dup 54/six put
dup 55/seven put
dup 56/eight put
dup 57/nine put
dup 58/colon put
dup 59/semicolon put
dup 60/less put
dup 61/equal put
dup 62/greater put
dup 63/question put
dup 64/at put
dup 65/A put
dup 66/B put
dup 67/C put
dup 68/D put
dup 69/E put
dup 70/F put
dup 71/G put
dup 72/H put
dup 73/I put
dup 74/J put
dup 75/K put
dup 76/L put
dup 77/M put
dup 78/N put
dup 79/O put
dup 80/P put
dup 81/Q put
dup 82/R put
dup 83/S put
dup 84/T put
dup 85/U put
dup 86/V put
dup 87/W put
dup 88/X put
dup 89/Y put
dup 90/Z put
dup 91/bracketleft put
dup 92/backslash put
dup 93/bracketright put
dup 94/asciicircum put
dup 95/underscore put
dup 96/quoteleft put
dup 97/a put
dup 98/b put
dup 99/c put
dup 100/d put
dup 101/e put
dup 102/f put
dup 103/g put
dup 104/h put
dup 105/i put
dup 106/j put
dup 107/k put
dup 108/l put
dup 109/m put
dup 110/n put
dup 111/o put
dup 112/p put
dup 113/q put
dup 114/r put
dup 115/s put
dup 116/t put
dup 117/u put
dup 118/v put
dup 119/w put
dup 120/x put
dup 121/y put
dup 122/z put
dup 123/braceleft put
dup 124/bar put
dup 125/braceright put
dup 126/asciitilde put
dup 127/.notdef put
dup 128/.notdef put
dup 129/.notdef put
dup 130/.notdef put
dup 131/.notdef put
dup 132/.notdef put
dup 133/.notdef put
dup 134/.notdef put
dup 135/.notdef put
dup 136/.notdef put
dup 137/.notdef put
dup 138/.notdef put
dup 139/.notdef put
dup 140/.notdef put
dup 141/.notdef put
dup 142/.notdef put
dup 143/.notdef put
dup 144/dotlessi put
dup 145/grave put
dup 146/acute put
dup 147/circumflex put
dup 148/tilde put
dup 149/macron put
dup 150/breve put
dup 151/dotaccent put
dup 152/dieresis put
dup 153/.notdef put
dup 154/ring put
dup 155/cedilla put
dup 156/.notdef put
dup 157/hungarumlaut put
dup 158/ogonek put
dup 159/caron put
dup 160/nbspace put
dup 161/exclamdown put
dup 162/cent put
dup 163/sterling put
dup 164/currency put
dup 165/yen put
dup 166/brokenbar put
dup 167/section put
dup 168/dieresis put
dup 169/copyright put
dup 170/ordfeminine put
dup 171/guillemotleft put
dup 172/logicalnot put
dup 173/hyphen put
dup 174/registered put
dup 175/macron put
dup 176/degree put
dup 177/plusminus put
dup 178/twosuperior put
dup 179/threesuperior put
dup 180/acute put
dup 181/mu put
dup 182/paragraph put
dup 183/periodcentered put
dup 184/cedilla put
dup 185/onesuperior put
dup 186/ordmasculine put
dup 187/guillemotright put
dup 188/onequarter put
dup 189/onehalf put
dup 190/threequarters put
dup 191/questiondown put
dup 192/Agrave put
dup 193/Aacute put
dup 194/Acircumflex put
dup 195/Atilde put
dup 196/Adieresis put
dup 197/Aring put
dup 198/AE put
dup 199/Ccedilla put
dup 200/Egrave put
dup 201/Eacute put
dup 202/Ecircumflex put
dup 203/Edieresis put
dup 204/Igrave put
dup 205/Iacute put
dup 206/Icircumflex put
dup 207/Idieresis put
dup 208/Eth put
dup 209/Ntilde put
dup 210/Ograve put
dup 211/Oacute put
dup 212/Ocircumflex put
dup 213/Otilde put
dup 214/Odieresis put
dup 215/multiply put
dup 216/Oslash put
dup 217/Ugrave put
dup 218/Uacute put
dup 219/Ucircumflex put
dup 220/Udieresis put
dup 221/Yacute put
dup 222/Thorn put
dup 223/germandbls put
dup 224/agrave put
dup 225/aacute put
dup 226/acircumflex put
dup 227/atilde put
dup 228/adieresis put
dup 229/aring put
dup 230/ae put
dup 231/ccedilla put
dup 232/egrave put
dup 233/eacute put
dup 234/ecircumflex put
dup 235/edieresis put
dup 236/igrave put
dup 237/iacute put
dup 238/icircumflex put
dup 239/idieresis put
dup 240/eth put
dup 241/ntilde put
dup 242/ograve put
dup 243/oacute put
dup 244/ocircumflex put
dup 245/otilde put
dup 246/odieresis put
dup 247/divide put
dup 248/oslash put
dup 249/ugrave put
dup 250/uacute put
dup 251/ucircumflex put
dup 252/udieresis put
dup 253/yacute put
dup 254/thorn put
dup 255/ydieresis put
readonly def
/PaintType 0 def
/FontType 1 def
/StrokeWidth 0 def
/FontMatrix[0.001 0 0 0.001 0 0]readonly def
/UniqueID 4790119 def
/FontBBox{0 -200 1000 800}readonly def
currentdict end
currentfile eexec
D8061D93A8246509E76A3EC656E953B7C22E43117F5A3D5F277C16E04EEF1E062177EBA1C7CD44CC
08EC69212435871DAE39145F9F511D31325A34487F72B91B61DF205DADD53B3626BEAC69A3EBD7A7
D1DCF6BB839B313143D219124CF63C16290FAF4759F32E6BC73D55DE9F71047CE1AB2D992BBA9040
CFB7C803C372371CF5D6EE966F903DE04BD5203314DA296E16E25A00333AE4BAE32D333A421DA78C
8EEC9DFC38A8CD91D7B463EFABEB7BB632B23B9FBF511C9076A64C977809E52EF5C6AFFB7BD57F5A
2CFCCA063E226D1F69EE6D82099789C7AACDCA9774086760D9125C5DC0B3C6B4CB02AAA3C691B600
2C10B806D9D9760F7796E080A92DCD951675EA909D77269CB6BFD767EB97F27AF43A993080DAE5AD
01E3FCCC2A5C687554002CE66DCFEC4EACF2C69215AF98E1851DAFE7244BDC6F3A0775F484A11634
2224EDD6565FEFC196EFB202AC2988599B989F7DBE219C075F90D6019F29683CCD25B4D4D31A54BA
E067CFE982A0A9C417FF87E4F8A40D0719DFE7A6220FA99D238FA32F856A4492D316CD1A578A79A4
F7D8005977CD1AB08EC17FD09C12EEB7BC57BD9D575D59D88B530A501FED9A1C18DD5B7F5BD8892E
8B77F6A795596DC0E0B4EAFFCFE7A9B1092B13852758C5C51466408C91B1C654EBE24659DA18A126
FF7B60295F9FC18B784438EC28144BCFCA3E58845CF1ABFF1CAEC75FA16F61B3469D5B3645638C07
46830E03A395C974274D8AC421C6B23C02C62E0295DFD74F50D045CE9A7EDD7C5A8115D28F2E9CA8
57701F425416D5EFA91396AD179718BB3F1350667055D1AE055659C758D420EFD0ADE14BA051D59D
108817CB54CA11DEBDA46F42435905809C6907AD86956D2DBA1926BED10755F4BCCC541787211E76
2BCD336A0C89B15162EE1BBDB4B93197D3E03DB4E1FB112D1C70FDF8099E3359DF117C2324B78F6C
945657533CCFF91712846718B1DF57D11E70EF1363BEAE4B01A2B6FF7C86B46C33D503219296AC8E
4B40E7988921D551F26223A25F51DDF434C42B99FDCCA388A9DC7C6FB0CB7B2589B756F38F83DF58
77217EE630C757DB7AF2007469A2D2E75DD95A6BE1F9F052A044D1A495934A3FE1229866AE35FB23
9CB735AAEA7C85501757C29D5A2DFB09569298E8E6A1BC9862C5958BB47E0C48E778BEDFFCF0F01D
401948B2CCE02D91A6975192CC8B4DE1F572A48B0B7E0B339EFDEFB7D24AA203D946F8D39D85C49E
510E8B863C2DBD046241446CD25EC35313EC5862E521B1F99A48AD1C3827AB3B8E4DA99CD6DB7AA4
A62B4EBEDFB6B965F64FF019BFEA94CCDF71BC33805047C371F2CA5813321639E9B26A5E1E46F46B
3CFE4374596CDEB791C2EC09D44A9ED140328B3B593316460EDD6E28F857D58A90E4D5B371DE8A30
C056FD3D4549C493A407456063CC74C4CEB661E9F18C4C22C7F0FB927CDD322A8672F3B0851B5AF1
6BBD8B6FDDD89A7D093B91A9481777FC9E00100F0C91C3F2955BD20E98974631E7D158AB9416A8F6
0CFEB787E532FF18CFCED64330B5ED66612C3E0AEC74D2066DDCC1C44CCDE1C72FCACFAC986EAE7C
5D65D6EF1CE27B143E7BE6267E29774D2670EF831CB9AD882BF4A4A5222DF9D853177E3732E65A28
0982816E4DEFC64DBA6A47D0344FCAF42322FC171AA713F263F58D4C8561D6D2D18807B012409528
374E9D58ACBAEF664B35942ABEBE0FE54A0207E9A6B977EB9335F6A455168320FFFBD0BCCFBB7628
66A6538221B324EFC98AB255F2A4A313E0D4E15892764B701D849F6E69726817EB2A26851DF3E524
6CCD30F71C80111ED88F5205D8C85828F69F969929413F81CE3785CA74497292538AC422FFAFB350
8B3EAA0E6E786F0F632BE36FF5F4264C923704CFC4A7A60E217807ADD069CD4D999CA03F0D839598
7ABED83E733E06DEDC4E8D03F409DEF33D70CB0E87396DA1ADE83E493C9302DA46977BE70B2AE397
3B0F9E1A0B2DE9F6D3492602E8BD259F74CB63E3991BB7F1950BABD83D787E154AF4EF004A4846B0
7ABC732FC32B889292851E809504382756C114C922BF7FAE42E2576D535DAABA7DAE820ADD0AE2E9
6F19E5C09CACACD5BAC4E795B526A7509C8AFBA7319E397F04FAC95863FFEDF45F0352A0C614F7B0
34E6E7F3AA0ED5FB4CD2BE21FC13908F0BBA29756E3622ED010C459015B4A0F897003EC8E616DBA6
DD8B5A8FE036EF78602EF1EDEE711190E11B6DA4B8277175B3A07E68B7C157C5DDB8DA54771E69C1
CC44CCD5C7B8F02074227F0EF3F4AA1671482691CC82D17BBC8D2266392B1548D1DD2D82C88935CA
45416A4F02E658A7AA6C3B3BE050D815795B1695BFEA08383481D90A6AF44576A7DDBA153162C5CB
3565642FD4BC52935AD67E8801495FC610DF826CEF773FF710EF72C446A39B0DD7CC2A2BAB6D715A
1F9EF13F054BBCD5616464E9A3231396DE8EE7F4201E52EF3ED113F6B7874CCB8010C8DA7A792111
FE52D5EE94C76544D0D29C0463392A94F557652FF6E10468948AE9201AE92FDDE8D6378240E04477
909C3B696FFEC95EBE7A60543525763E8C70B86634DB4491543675B9A722F35546BF91263D8FBF23
CB6515BC721B672DB7AD41A0151F15B4D97B0E3314012613DD2B2B7171BC6FD94FE29A7C4D44E657
9E659A33793D397C80576B0131E884A65E9740FC1966AB125BA8436919A61E46BD7E24F7DB75D206
E0E27F866F9412266643786B7BB1C27E4F136243B0E8F905B1877F598C537E0DF68DD19A4E5C908C
732F4E8782E6D65A2A0130407DAEDCEFB4E981F7140B94473B93EC11FE144823E3FB4F040DB22BFB
B01DE4FFCDA710E9F35D018285DA47B80DCEC844C7A43BDE81F9E7ADA697E11115524AEBCA48BE4B
6B351002757A1E2AB5AB573A18C82D8587FC576165A9D9E5610FAC401336DE657A7EA101FF8BBC16
D446C49CAAFE1EFC665247E63B297AA52D666CB9F08A0235A0726C4B2F9F66DE61FB48A5C8BE0DB5
998997B3B68F9D689ADBED55F803AE0086E73EDFF6FF74471B78D16FA63498EC5103F3401AB38AC8
7C3976133C405A6EC17C53E12E2411ECD5C129D5C53F93BB51095423486F3947E4CC90DCD653775F
3714068D53AC4BB6CEEDAC6314696F0199CBDAEF5ECBDE598A9AF75F4F965FA527D2D90A8C7562A4
1F0433A954E3CD4CBCE2F0CD26D04072B69DE1B59716A566E61354129957FF5A8A4BCB51C3FE1A9C
AE4510D2C6CCEAF776974D0201E8ED5E2CBDDACCD8F9674C7EE4DF64A1A37075D0393498CC6BD09C
5A0929B34A6F6C2FDC001F936EDE2654ECDA6AFA436368A90F0EB70954607AF1C8BBBFF9AD2D494D
8F5DD0F34DA08B0BA7354800EC1069155DD87A4F37943D9106FB69CB5812ED3FA513159E6AA47631
DD63BF72CF07D3A718DD6AB95ED187D919ED3F173A464CBCF3A1CAE65266F18642F3845F9244DFEC
A59033BCE4636824920FE36650BA71F9FD960625237B74903178320C8B999478A25E04A8CAD4D3EC
B54C1826CBDD5643594EE55F07F0EEDE18A6E392C5B989B5465FCD1A86DD4477DA4AEF6FDA8CD363
A808D23EBCB36A2EF281226FD0BCB0A0EF24C71ED24266E40397D1A5863C547124DA6BF596E30011
6005FA21FD0F0976F119ADDB8E95B5380CB51B4E5E219C2CB4769E90FABE6853425AF11E4A7F29E9
00085B8AEC2489F07B588C4D6DD29BBB06F2ACFC467CE5CD3F0AAF7A215C20370310F01E4B5B10F3
D4570C7A6FC9C4AA074A874DCD04EBD53D03E511B2FAE76B34AC5EEF7D5B50E055A49AB6461FFC42
541C2948E304A29C3C08798DFC13AB5F7DB95A0F51D91B66F4182E7858BBE86E5D19B2F303B04327
16BAD69E1B817E78B646E581E2A52FA25CBB43D5ABFAE2E41ABCFED31A0EBC548EDBCA39B4200DF6
05366409ED0E42468692C3C1126231E739AA88C6BD16A56C62249AEBE02F0F79541F64920AE4C942
95179A6F272AB83AFC011F11A109E472093B1101FEF61B04BB8D11535BFE994858B19961B10F4D5E
6228952D697A676A0712A70678D288F3E0E17E756AABB8173C6C0D19113CFC4151FEC2E7737E70F5
5B1D002AC76CBAB18CC55655BC4C759A4E54BF7F33558F31AF8148814F27E24877F40A4A34F3911F
F3A15F7D07231165E325D62ECB26B7F229C5637303A451F211BAE81FC87AFDD529FD05360B98EBE1
05D72BF444BDDF7A80F0C7A3212F36E7CD6F61947E3EBFD84B4A39F85C103CDA29A2D96EA56D29E1
FB798710DE64912DFDA45AE9F2B7E4316B8B7D1DE4D575EE8E36BEAFA3EA431BB9E917E249E78F07
CD9E8A0B95E6F4148D7366211A3CB79C461929C3538C2E54DD869A082C9E50A2617930896AAE8E33
A93B8D7E725E2F6C0C865D97D20C50E3806F08C598D9D976879A8B12EC441ACF4386929CEA07FB85
16F0EA4225EF4C42F88280F7D15A7CF54815B69BB2331AE602188FCD9E80E1B257DAF548E863FA71
91A1E4EA15FC354CA3C9A8EA0CED31FDC4834C2711BAE745E6FDFD4C54A373DDC146658D2D086969
5B0E91ECD20D4062872BC14F0526DCEE3F250FE4E615252E522276383B382E66B0D3932D07A47C23
BAB39DE68EC3541F85227000D886EB7191F0350361ADF6CFDBCFF657BDCD9EE53DA9F64BD7823A4E
C4FAF24A28316B2DAA1421931DCE2821DA9EEA6E0CCBA7A397D0FB6C2277CFBF70CEDB2B41A36F12
2E7191B29AFE79C5239EE03D3A0D125649B4E09E91614CD92C7F1F5C086E9F3794638F5E10178364
9AB4F5020CF2C1B585AACD1FD102F28B65352A28F82386FB0A8B8F6508DE129DE32748A371C6EA0C
0D35B4B2ADBCF08D34BD4B48025905402400482269DA9006F052726187572556E7D3C60F9F4B8624
D1B5812A10DD644672685711C8ACAD1E1C004DB5A428EC03DCA2692056D64116228D486B8AD66465
70E75CAB6C93109A00458E532DE15111541769C9932EC672E43743EB22383F590F63660FA53483CF
BF17086A0331B306F412738455B49C46B3D822E1294D0C62C5F805CE02A82F21CC36E8C7EA737C02
6A2F559F7375946E89AA02EF96A5102A7822F3609FC75B0CD60579D39564EE3082874A1E7F472C88
EC830F31E281DC618D39B3F9895FB3BAC49F8F5C0D5D6DA3EBA76567CBD09884869321514D62B70B
24BD92DC1A0F9E1D24B885E6E6EDF7DCF81E9FEAC4CAEA37C7B6505B2DA2A07490DCC3175943D516
E2533BCBD31810EE81971E311D5695A3E5AFE15E34DA11DEB353D4DFCB5CE2D8FE88D812CC5FE232
099F9F147CC87C47E017FD43C6C4B4657AAF946D4625B1ABAB856F0BE4D22BE1356A8AE9F74A3223
3D173D16ECA86557B1DF2F48120CD16D028C9D403DDD94C00245BB774F35C0A33317B641B5AC6BAC
BE1437BC11FE074BD53174CBB706F2227FADD928405955A40D32A3318CE3FDACB621FE8B2866C709
9F8863D5A712A71FF67E8A6001C388A3B0F5B4FD3A05088B84AC5FFDD155407F683B088D18394289
0D2493F608D12CBDEE6C5A4072A96B50DE71BAF53AD388AB4CC3342F8E733F2208B7E29E0B70C509
8FD25B4409EED781EC50B6EBD34E8C63D04CF2740EA628E3EF9A4462F338839A5EA90428E57E4836
4DFBD5EB4D980771B3C358D6274E83289ACCF4DF02DB5B476BC64F2E4A0D37B7FC7816FD3E742F74
84A693CEDC427708851C18A8BB18C0357A21A84E24B14F0B81D435CEE7644B62211F7943BB45540C
2C286FF0E7A869C7448C2F2A051695C98B73012C300BFC0E0B49B73AE834956D88934570EA804A80
5DD54487945D2638887F77181115C14E4D95BF6C4D55F913026B26DDC62DD6BD3CA6383B535D7EA5
CCA880A363A787920555ABB2EF8618FBC13EAF12E90A36A68156BC2D880D296ECF645A3E2D88AD20
C22A7F2B621652870F4AAE48ADC6465F55AA8C65E4474875BAB83252E0060FA6CDA59951B70ECAB4
ACD16C97E3E0CF54B566481871747832D607BA6E16852BD760D55D4D10AD2C58CD2FF25B162B78CB
B971DB3477F8D2ECA3EE9CBC90323B2C236E375337EA0848CD7CB5781A2B0A42DE7E4D99DB27460B
26796CEE129D23C76794B7CE21C13C7D4A998B752C8CF43A4821B736EBE246D2A2BD7BA3351FBCFB
D2E512A576B0A065241AC9C40151C4DA7D06C581077ACB4C3A7AFEC15FB5F5B78DC78535B79568D2
60A99B0A0835EB2906B749EBB364850D5B24F98839DDAC5A19FE5AC3CFDA91186287F22088018BA0
6C35F680553D7E5F3360CB9539931ADCCA910DA7AF02473957F1EC9D9492C429270D8B99E0029708
26FB1CB733512C696D3BD442C84E0759460AD00B03D5056C55CB597DAECBF98B422C75CDA119B062
FF5FA251B1E31AAE5E2A1DC63241CEA9236733789F2E9AFA3AE6326D8713BC7B35C5FECEE088DBCD
225A91BD5F851D954C8FA91DD27611532070464DF076DED556A3546C08B4E2082B6286A60F4390A5
F797427792D1AAEE2BA3941F6FE39589BBBDB00AD959F06D85077311D1CE96C271A8A52FFDC6521D
3D87B7EBD39B0A0481FB90B65DB562ECB94217E830A39E1251CC8AAFFCA7D65BF373C9D72870109C
862745D0DAB7B9A4A8BE2145B89893DFA9DF3A29EE82160CCEF63759C9D4043A92E7C5F9E1D3107B
F32910E9DBBF9FD4D4C949A96B72C420C1075FA2E6E376FA49ADD0866F0E0BFDAEE810F0807C1819
3CE19E7E81DF48E421D816B657F6D263B0DCA0EECB983DE88F0F7275F849B32579E6B4D47854B026
122CB9433E9E94C994BBF3649601CF9835FE5F56F090390AC8212A9AE61FC08CF436D9DF101EF1B0
BF8DE6E72877121AF321919AF90F53BBA4541541D222E7B40EB5ADB9CA202079471F3DC8FC2B3E83
C91C77F0628CEBD06F41CB5F0D45E872038EF0B996138A32E9CCD746D91FA08D6DDA83B8BB22AE58
172566FDC0B23642DCB3125846504DD6CD8A6D9C718005D8EA88C68160DC9F84406CBB5B6E8477FA
BF1D7F6CBD9A4DEB2CB2D4FD8E47939D31D3F4F229FBD32A61AD4EA360BDFC1D65C2874C8F3B48D7
0ED7F7605B44662C9AF75815F647BA5C9801A3D4F633DF5ED8B5727F59A37D24D6D57768F81B8DD9
7143A39240C4BF37D374059C9594B7681A590E001D7ADFBCBF7B6CFF419171F8659A36DA28BD125D
F1BE74AE67F2220F7B45AAA13F97D9BE9C1AB7DE04F2190C12BDD1A38289E36C5F811CD34AC2CD79
CE11A39C46C3D79D073C9E132546BAFCA615C18212488E556EDA969688FAE7D5DEB7B7C4CED3965F
449C59DC99F30110B9922D17258D0A749790B59432A81DF94080613D0C867BEFFDC9FAAD481021DB
2A41963C1E6741D39DFC6EAE2888D3E3C10DD03549F15CA0E196C496CD7C54A982938D076BAC29C3
532A909B1C1B4DA819695EA5A60BC00B27924E5F7B738AEE0B00005046555AC34B5793CED3419F1F
0DD0CB2AFB9F9687BFBBF19C2F048EE1B69D060E07192D8A30EA81E7C18808123A9535044B0F9B97
53848A56ACF74CA8422A86E0C520C5F08DAD0D798727020D92EAD72E617436CCF46F850C459565BE
DD2113730BCCC47957D6FE94A957D7CE041DD22F49499747F69EDE674DB15062551AD073E955404F
BBB0F80FA5BDBCEA635B2B437DE0AAD6422ABE3C354E312C27E9136EAADBD9C922BAFB6AB6DF5021
CAB56CE07FC11AFC3C620148B7BECF50F62CFDC605D893931538814A1EEEF75E7A4FF61C34A90101
49B7C93E442678CD841073516A4E2AE298E9B33CCADE663E51ADED4EDDFA8E12139EEA5481973B46
B818753D52DA6399970B71FDC6F7918E4E4A3628B083EC9922433AD99E26D0238B1CF66402E5222F
E0C25E5EBFC3F839885BCF2D16542F8F109503311C6CE80B29B7B7036A1F15FEC4761F1F66E05578
75412FC707E3F73E916229F8D0B6BEF0CF3ADF6C8544A006F23A9CAB785453A0C5308BB4A3F1A722
9427BEF3FD3AF4F72B0EA6AC62DD8D27F0F0F6D1F8DE6B9FE613473C8F9341DD441E1EE757CAE9E3
F5823F4317A0A332B7D3C122F34B681A46AC7B6EE2CFCFCE337297C02D8A2AC1C164C45C06D24E3F
0E34A366537875CB47BA9C1FEF822BFD0026688EF18C3C2533D08BD09BED88EF3D291A87539BD5A8
F50E7E5350662E053FD5FB6424960774C09A511DDE7CAC206EC3863D61D9DDD8460A0D1A7041F6A7
D7D269ACE95122FD5B6F78CFFE75D4E27AC30C49902E17D8EBAE8B4371C5A6D658106476F57BC410
EC523A9DFC321E3DAAD06C86B08CDAA8FC513CCA1F348E1F7891A31729106A133592FC49D6AE8F48
2BCB87F815EEF89C900250BEE5E7440315F05F1EAB1A243A1DC9747D9BCCB11AC97E0427B8AE0D85
2DD07A29E60CD758497FAA49641C1C87F2EEAB75701601520AB7377B5832B4CDF730F533833FEA23
810215F5CED3A3D2DDD5C6E09D2C1372F9C9C398C9BF53BE17C6D8C6391AD9DB00551A88335B4F17
C90B1F93A895BEB5BB38161E2C999A3550968D0E825112F1E5BC2CA8205214005D234415C1BE18D9
A901DC3D7DD23970B9248C0E1B3883394BA9DCAACAA839C97044B7E190EFE457360AEA940D61091B
4EB2000717FCC5768F664D536B7BFBD867BEB880FA518197F7A936D1249688BBC313197AFC5D4273
198690C3C5C5827A77DB5F3315DF7C66D0B7770996BFDEDB5A5F81BC20AF0CACA5C50906D8C55A6E
42E49BEE7AD5DD407E9C256F2151A3335FD102FD970D9A7D4F756A4EF161A7C773AAB8FFB63AF09C
DAA402066DFBC7B2EEA032893655EE59F3F6D54B8ECC37EAF5F5628B2FBF6182F15746A8DE9A9D47
D5CC6ED05C84F533BE40C0ADCB09448C46594147CF55DC14178B605C8F3CEAF1849192A3C660FE9C
DE62ED49152A88334556AA31CD9F60F07609B046A0A9FA87D823BF3FAE666EA92F348B27F474253D
EA96BC7158BDE6F2E8617CE71AA69DDB99797D1DAEFE81D4A54E790A30E595E284D2D0F29562CD6A
F153137676F08CB29324548D00E64398E9E4FB1C78FD6E6843964C45B67D81BA1B062D99517A34B9
C312D71B7BDD2D77E7E68BC335C60DCCA6895F94C422BDCBA910713AD0D9BD81E288062838B8B711
0D09A4C687EE8BC43CEC6D9306820B778462B8F647E0BD1AC38DC8AC5A902CCFF4D3CA00BD3CB326
F2C84BBDE72230590E59239EBAC07FCEAC808E59F77C805578CC2CB7904EA17BDEFFA7646ECD183C
A3DC1DFBF93258267984AE381DF783E203DD8890F0736359945C3D50511A8E7AAF8819B6E3FC71D8
22EDE5718E461C799090D3116747CC20F277326B30714B8CB788A16AA1092BD9AC23D98C3AE27DE1
3485005AC9DF490B93F245D6F8EF2E67619A29C031FCEF50D800CF6683311ACBBF85A98794C77D7B
EB073A19CD5512AE5A9147EF976A36EB965083FA48F8C9DE860174818477434A83AC97F9999F9BD5
E406A1E76EDFE1D316E31888E881712368C4C3CB639A115A3E6335F784B4F0C9204C1BBE064B60E2
3740DED48204079B15CE80F557CEA83F345B6DBC9A414A86ACD235A936D9142E5C2C824EBACBA4B3
3C349B0E04B8E16AE78B66697546429E3C9D1705D4DBFD121278C63B27D3A184A1AC2DBDEB1BE412
379EB99069D11CF102F6CA69A7E441357B284227F9AAD645C853BAF627A884DC1271B8F0F2D28BEC
608141CE484F0A88979A0CEC71083937F1E25E0EF7E5E94F3A774166FCA492A88A2B46F118248958
2D16AAD1A157764FF931F3402AE542EE641E70ED5E19C429A11F8D1E108E044E07A7CDFD52260483
8D080EE2710434587789A34EABEB855074472CAA0F594A9E30AD9C3755C16C7ADA4A3B7BBDE3AEAB
FDC2C2192DEC91C0143050139721801BF72EDBE78B1A684D2FCECEBF8813A74F872F1852DE29C81C
797A817A3E6073109E07791C7B9F3196FD1546BDFA34136CF67E8278A9C09DC9D149C9718AC0E6B6
CCF0CD1B446DA82241BCB48C13E74D96DC8723A4F4A883850F8D76042685B034B0AF478E02E0191E
A2820F327E0113BF8FADA1D29811D25FDB47268EBC8961EDD0B47F2EF2DD9941094C637EB8849568
A01616B9FF922914F4BAB5C3798DA5A78D775C8946BE0CD34957E4F972F56B5579A0062E5F0A3A74
4C4254413D07A630CA51E638DF1DDFD6E7376C959EB1924A11FCC8EF791B0EFAB668DAA528E848B3
57CE43E8B86D0A34E01531CEAD72030D133696210E0C1282485F6F2391E61904EFD996D5722482AC
3FD20D6D945ABCEA1D28DE683511B17E9E573A54E9C0DCBB0E9D18F33C9E4ADBDA524104D732D8E9
CB84194BBF2F93B5F3D16D54F449A85B3B6E3536567E3E57E5E49125ED39E2ED0E2C0AD0A08AF241
07A4829408553D6F4FD08C5DA2B785CA5A7ABAE7B9508DABEBE81A0BCEC9CDAA8AAB9CB711CFA6C1
6E71F2612D0818D8357C52C12A573B66985D052106264EFB96BD93258CA086BF48D85CFBE3C3C248
F6BFD839C2ADE5442F285A80DD29148A9808E5B733EA1F5F4CE4FB2A3C6FCC58E8D268E49178BA49
5B8BE7F3DF4775A03BD0F6B28F730CF146A819032769618AB056DBE2BF3D6DE5F44226F2F3BE95E6
945214804C0D11857CF8C31578A1364884C16A9B676D86167921059BDA50AB8C10455C3B8997D483
C4B8599690337AC7A7AD63FFF3EF5D1B67F2B8B2128C57C9AFB8D3C753F02CAC83AFF82490C8411A
0E8131F154B394C625A251D688F88E396969E576751C580CA70046408B47E5139E5C4D0FDCFBEAFC
B4B63428792EE7E318DD8366BB1E3A563795924F4A10CC8E8B85971BD412DC12708FF1215F715A15
99CCEC8FF74EEBA34FAC6AC730E790E3497A4B6794F8BDC5D3D6A0AF819B950A42C5B4B53BEC8579
57DAD79BDD3265CDA3DB3BDB57EEF6F7427DB559037ABF79FB5048CFE699EBCC7AD54DEF337D6D15
736C32D89FB4ABBD44CAD6BFABD26972ED888D4080F2CE1D1DD81DB9131A70CD085874AEDD920DAB
D2DF39B7B8301872B0224668C9B83CF3DD5322A0939C8E539A10DC92F7673FF3D6624C03202A1874
2DF7CBED2139833020144F52C4B9C6D9C00EE01279F12B117A516A5F63E8A487E7104DD22C51A9AD
4F84C57F6C60E5FD249565021E0C734B1F6C1F5E002BDB3CB52D0994C556A90E109F1B9CD9220AE3
67C119C0B517195F7A34C34CC896C1B86E6323DA27AAB83EFB09D1D0899BAAB39332B22E48C1131C
A1FFB8D94C0D3C5EF81DA9B1C4551F226F816716245DF35A660889F70D21EE09E2525EF2ECAAC681
C5F5D07692B6D933A4E74DFD6A01D285ED8DE7C0C8C43013D0C1D21F727F7E5FD957D84796162362
84A48C12B02AB8B7350EC721A7D44014DDE0F04CB516FC22AD865A7552D978FF883AB31A2E6E8465
D5DFD66F27EF29AB94C9A2D2C0ECD6510E234A4657BD6EE58D8F01A97541336E4E8B364C698B3FE4
0CF6CB375DF221D5EF1757E32744FAA0AE3498DEDF616715962099B1C3AA561287838D21538CF002
6846FA72D86C33244B839EC63D791B8AE88C9C86062FE84C902957300E4ED9FC8DFCC6E26F522D99
AA4CEDC233A5FD75B6C1A17F2213A09272594B6A52A2BE5475ABBB8E23092196A8400335ACE63551
78EE28CAAA34706303A33A1E220AA648F41C822025E2779A861A45ACF5E99A0A6C846AE1328D2C68
5D920FD29A2D41F10E49DD3B4371DE9FFD25C55B33A1071262A79A91127E6BA40CA6D2667102AE82
8223BB5A9324894FC335FDE30D9E820FF8550209F6F0F4224CE7133C5289C02CD70BECDC3B1E2F1A
C874B90BC518A180A1ED8CFB094DE78DBEE77B42BADFAE49D3FF1EBE7E0BB148C673D92AE5CE56F7
A5E6FB6AD3AE98F776735CE3A9668FA34EF42FDEA2B615705CE6C3090E9BCB4A690C88BA66C12DF6
51AD065B12C36D5AEA5C774A7E53A88F1822B2BD430C961406585BD2A5165A9BD39E2C717033681E
CACEC13133D94E2E89217E6C301EED2519B4932AAE8858DC1CF465DA315154A017C6AA27327AF497
D4FEF99E564AD49931A9E57F53FAD918974F0E8E87BC72064046C819F2371BDA383603D6B371AB6D
51F7BCEBD832255BF977837E8766D3D9ED92EA70764C53B89E260ADC415E05919D4EFEA0B7826827
6FA3A5844EB0A66DD261EADA4FC3836355249BE8D506839364B8A2CB7895CE8228853BC2715F8FD0
6AA5691D7ABE5E4E2E6BEB4EB1DA247F9D2C3D88C2300F2316C63DAB9C1223B1481B5C94D3A38C91
DAB2928D3BFD3480CE6202CD3E13C8879F1C67EF0A89E7135A4103DC6C58CF60AE60058EB29D6DD3
2EA7367624815A222BE9F05DB8D2451D110DAF352E995105F24D0E56BC168BC543EF7335CA8D4EBC
5B4FE119ADEA3E342E7BA4F23ED196BAC8215CEB10B4F1F7C93AF4CFC6B88E4753C61ED5F3CA7397
CA89AA133EAB2A287608D2FE33CBFBEAE29B1691BC35F7E72AB6D958F06AA3023C633D983F97B08A
846A0D99D66742891D2AA152ADF0A4BF996E22ABCD6E532BA9DA53970887A282D4EA7A7E15ACA15F
5EE3A88A99D7E4D069DF9EA55D340AE7622D764D2F50B3917956DCBA97580F7DDF7BBC45356145CE
EBB27FEC5A3F9AA5455F899C3797412659DF45AF87D26A57923AB3BD1975A570E7FEACEBDA3A5099
4A4ECE85EFA2CB883F8ABA5E60F74F5E022385C756D639A135923EA9EB09D8A136442071F8BD01B1
E5B88E0622D53DA2FB6C1054A45B40BEDDC805BB825DA4345EB2AA7709AF2AD49806F044C0A20CCC
DB71283BE79DF6C4104BB4599BFC9EDF219F1399FE804B12F010D893F404CB8EFD903F35B37FD80B
97251C59C73CFB89634B3EAED136986F9D946B719EB04B5396F4AE9C135382005745BFED67DA33F1
DD507DF06AF64C84305A99B731FD68879EE148D4C8B1DC43178EB4BFFCACEB0A6CB0E1959775191E
3AF0459A4FE0AD307ADE17A9E930916E9D579E379C037D575ECF7E0305B73EA2250B13C94D18045D
2A4C04664C5FA789C7A0098F165EB3286CFC8B882B39999178F7C74F6E45F8F7F2CBDED4EA9BB535
B3BA4F3C72006BB9CCD2F2EA58DC820E723E1987E86DC3C483A7EBD4ED4EECE791877102EB3A9035
93BD5DA3A3466B9C9E3E069B85A473E41549E763740FEAE5BC4314A601BA9CD7318ABCB3078DC2F8
EBCAC29DB2984B08EB561D37B767BF10442EB93F2038D91F46E953FE8D265EE8DB4D388EAAAAEF68
62FC9DC0620A21400182B5072990C9B9819EE14C2F9B8999A8771959C2DD3AAC2F3CA5EAA5DCACD8
2A33AE51C470CCCB2DDCAF24338AEAD5F7CA866388BF1FC62D6E7A6D96510C761B7EB58ACAE7DA61
18154AD5F2DE54C6775A4D8DD95A00368DDD71C5FE0F33DF6D52B6A2F163473278D2E1F1CE71E355
2D73D1BB2D9AE9EFDDE947598569A1079656C1C7CECB6706DE4EF3F442852DC2D97A2895396A8791
D80E45E8DE2D52BB8B7D88D2C3F49FDD03BD83C000E762E0DAAC0AF2608F30917EEDE517CD595008
0076EB009F602C51B3D8A794B3DFA38BB416B91E6A111A0852322C4FBD25DAD95ED33C3F996F67FD
71C4DDAD6C6112F66E587AE642E8EFFFB0DF0D1D23AA307D3129F67C16B5A17569FCDE2620F70AD4
DF94B1438B4BAFD1B311F995DB04FCAF4C721CBED94FF66B1DBD900BC4F4160AD1CF55D6C5F74019
02F32D62078B05975AA71C4FDEDF656966A0C1DF25FC4DF61E218D9A1BDF55B6BCB09771F6C8C6F1
64E7D06C06C094F99CB068ED782DDF291A8F236E6EB50B3117D3BDEC32E981CB5DDA0D72BA79FB72
EA3D88A87AC94687376AC4604D4C1473BC05BF263ADAD77F3EAD8186D66DA6298784228ADAD52B5D
3F4CD38CEC4E8D7B61F73DED591783618B005DB67171B151786B2C8B7208CB5FCB46471F766E6026
C8B7FDA28D251F399FF004ACB1AC2E5BFCE34DB39CE6C265E30AF64122392E77222A438A79B6F828
A83240961C9C9129C0A1F43FD3F0A27FA203321F7864291BDEB55E1991826F012E46945164388A6A
60A67823515F068605F3C660C0B46B0948A85A87CD0108DEC3E57D9209C1DF188A79985A8151F0D2
D39922A41B214D58C2B63778C412DAF06C35165B6B3769B5F33C7588955AF608F05768B61887585B
DA3A49E430181F789ADECB4E90ACC7188CE7932FB61EFA6CC6B5CC3F40802E0D33930A3CDCE226ED
6B91CE3D7BA1AB7A10FA0A346A8AC94834A5120C5B3C6EA481A8A462B499731BE63503DFB76C79B7
CDE10E9DE33504C778C96B3FF0D6FEDD3E893181DC73DE591FAD7F27493993D0673EDE1924C3DB66
DDB780AD7CD9A12CAADBB8B8DB2CEF92AF4C081219B9504CA74EEA27ACE7D345C52FBBE33503D596
87B0FCB863EFD3D7D777251E96B3173BD7C9B01951052F7946561D5412432E63FCBC74D664B1CD13
DD66E1573148FCCC155038272E053E2ABCA08FF984939BBFE02F052CEC6F6C4CAA6E9DCC3F281DD3
F7BEB819C3C122E7ED00BCA391E2C44E2CDF855D8E8A1E7E738A64212864F29F9FE5046BD8617A83
A1AD080801F9BD1419A7CA274C0B8C8C138B0D7AA71F63DD3A1B0E29EF16BD5F8C5CC636E1E2F69D
A1CABD42C65B2D849851713A356F28D00B908B5DB61AABB08180ACEBEB679FC7E2D4049AA4309BC6
E5725A0D9A8E74C3E607C1EE5C34C2AB3D1610B8B49928D6926C530CE4700C7C50E8DF0E3EE1B04F
FE6E0413EC2A31DA32F18600B9BB455B6A722E410DD8023FFF9FEB30A06098F4761F4506F076F988
B8C5A1FF827C5E7E95DC19AA5D4BE4A1724BECAB3222173D03560B9771DF7D3B208050EEA13DDF80
14378432FE0430F8FB7EB6ACE1EA82F2317AFCE8D2B45A65B7784C9E13F1193B6346F6A352E228C8
8A4D55D31695CAE971BDA2FBCC17960991B8E60947AC99CF2FABCB79A48E16283B2BA2164A930740
A9D18F0009AFF67DD34167BD41196B3D5DAFC9E1049CCA6FB774209DEA7E2C42F6E65A188D24896F
3653891ABBAB78FD1C23817CF3C5D8E3AB5F64D379282D2BC351525E9C76B76567E08A01F1E16255
0378016066F6BDDCB6D9E5F7D08AB20939EFAD81CF5E364A70D65EFB67B9E571880C3FE2835A747B
A63C62FC210735A2A3083FB9DE151D2E6E679B91C71D1DC6314D6CF5FB5E28ACA83FFF557700CA6F
21393495BF37F483773475E4A01D4A13CEA3AB3F3A48B732A0EDAD00D357E6FB319F9856E3C60D8B
5D12CD73DD6E781198F4E90AAC81D3EB4F81631C6CE5C0C15C10D3EF2646CFE66DCE4D96E9BF865B
757E8BF6166116AAC9CBD2F3740A4BB774C56929682454B42D94AB588F7F08C947B05160C69AC734
6850D92EA778FC283C8E426C20B5298872676067E9514628EAB2945EEAAD7B0B14B5897AC72E85E0
79D14BEEECF991C3B5520425DFECEECE27074E88764123B44DF55D6B0AC4B5907BD06A1597042E38
1620C3FC4FC060055F44CC990CB0CE4FA3413E25EE2946B320822602693D0A84A903219CD5BD4D80
A9E39FC7E3A3E005836161BF14BCDF1CA8CA53ADAA0EFC8EA9099B09F52B3E41D35D45ADFDB07A49
D728FECD98878114E540AB9EF742CD5C9D460457ECE43DDFE1A5D86E4D18B23CA9321641E132C15A
CFDB4160FFCD520F73B4953548FE979B1816EA0898FD5CB960B64F2D3825E62D5756E612E21DF873
1DFB0247E1EFD2703734B09BEFF822DCAA6D0E05A56A2460D8E6B77BD6318B449EB09EDD7377266A
E07FE52A9A487A419ABFCC76A68316E08B80BA83B34E9E47DBDF4579BC64EC21360EEFBDE14694B7
17F729A6BD42BE390CCE525A5DA99E98F34D9A7F3BFE9575E801925764EE7B1DBE3026EADB091F1D
55D7FC7150F6F9C7A0B018C60B24CB616A38179D8F87EE7AD45CB396BE8E80C28FC165D71C386E45
81BE50C467EA1A136F5524161D35B177A4B87ECD98738704C1AAF35511E2774A5CA6F552ECE4F1FF
B439E130E4888A970846B49C6DB033B426D4B8546C4B8EA3E664C7AFC6E957BD57B0A2DFA3F14A23
930FD17F2B8203D0ADEA1882229024764251D4E74709C7397AB4223D8EF5323C09861455D36F55C7
69048ACC0295ACC374B65000F7DFC1EC3A22F390A5FFFE871760BF89F37AA22397BF0675D630D2CB
E1BDC2A0897534E5E223916C2A6E9D012E93955D70597A9CD89187AFB4018A89F828F4491BE959F0
A387773E61B44748CC18377772089F99D3DFF8D8C7B2E82C34F4B9ADF5092E4197C86EAF396CAA00
F8CD06FF2C1B1B46955F30A6898F7AAC6AB3BA2657C41F972C7A23F76EF0382A4817F362364489B8
B009BB7147C7A1B44216B09C2731873F15E5AF07B2F0B9F35BC176ADFA37A0D668CD51175AF4CAB0
4D8F2E8E3B758C89A80A372DE05C0C4BCBEAD27FDD7A4AD65D4404D1D70607833057E12C1A7B57D5
8791F7022F156B273E41BFED870F73A6DA20ADA11055A0F1C7F0C7FD04D5E3A9FBBF578356598546
DC94211B501E13B5E8E3E6C2A7E8EFA083EFA69C4720AA78874BA25FA1DC6EC16BE1F98BBD6D9C7A
B9BCD387E18182A48EE6A355B7063CABED163499F433089FCA5B23C80049C32CBE669C518850144A
3A22DEE14676208C871E163013D00F8181CBEAC592FD328194C24E1C8897E43B92080C2F0EF20896
CD42CE9C7E7F7BE4C3F10797924923A5BFC901238A7370B623561C831153E1B0D99E8B7B0880BCC0
98403F8AD1D28D02A1D56B587570B761B21BCD31138BA52D5C2BD8C44E60CBE9C4CF29AEAF10A7E1
3AF3443CF7E59C5B2211C348DF9300240B7DFD026C86C6FF0DC13CE702A16FF580EAAE28ABEFDB6D
74857E0DAD7A133BE197E1DF368C83336739E180F62583D737B4FA1A7768E8A939C1B8B87A6EFDD8
CC7A7ABD2FD67D407DFE11AEE68C2A018ECB13A7962647AA73FABE65C263B99F4F64F8E783008F63
F08E60214FB8E87BB9F070BA1D525963212C969EE445489D5BE6A84F891DF035685B577250A04E2A
072910D98A4D0DA55EC11BCD68D6DC9FC9406AED3F29654A281320B832E55C4CE18148567C89DF73
3618F030784B8E33E279693662471ECDAE924EBD4C70E0A195E291C6326878F8F9D456E911F9097A
DBB6F65F063A1013A93E5F03A40DDB2B1A8F5653F4B9CE8D97DE9697950A61E7FFD9C1BE4BF0A4A9
B0D23033DECEF861F8105E0BC940D1AC0241431FFF30301EEC0AA5A92B1884D57784D65FF566DA67
F63E22F63CAD3B3C79AB163E06D3815C5B0FB77190A9AFDA28F20AAA7B27211687AA70DD145D991A
DEC5806C72CBC11842E71520FD506131FC2B1171707FE37B0088CF0741BBE9B1DA3C20B483C1EABC
6B8D001FE905EC49C083E743C80EB61F1C07D2EC900D29F555D1746C72E4FEE31B8C9BA2FF5AD86A
CA7C99AF7166E10BA511EFB374E6B4B6CC60A1BC411A0F0A99A235717311F9B5F13DA039CC809CE6
7A0DCE7E6789DC3855612B87A45A22ECDBB3D27A50D273A79DC536885497F45162EBDF611B28F08E
5E87F4DB33A4AF35EF1ABF036D0F20408C40C97BC7CD0C1BD67C63C8B579472C31DCAF6EFB3340C5
84EA880860E8270D0C9DE4EDC9A5ECAD002F8FC89AE35B5B1BAF0EE2622812722171C7EBE7456430
333B2BC721AC050608A248B749FA14425AE342A372ECEDC8D8575885FD9F8A01A1AC49600DF359CB
447240CE2BE67E2A87F8C667714CA293C73C32FBD81C68ED378098B4AA2F25F6833BDA37378122E2
B42B0D71455A107A5A8E1ECA62F90B344A721829ACABD7508CCAF5A5E4FD21FB7835904436332C34
B0C76E8D5AF8FD17DC4905B9240FF0A8463F382A4F994B983EF7181B2194C408BD78420EC166036E
85834828815B1F0E2B86054302022A579B326835E5C3A5E6004B65913AD3C850087768B98967CAED
1AE2D57ED0F571401B49454CBD6E0C0A56184AB53AF115E8E9EAE3DFA21C043ECB858DFC4719711E
F0276CBAC01060B468313C1F47A5F6D19827F0B2BC270A507053D3F1E7CC5103D851F31132BA7673
C00D8442B969991CBF2170867ED3CBE7DB83FB54280BE9A7F6409442E25F19450AD71303D9DF6C5B
87D94BB1BE7164B4304B6A4D5199B9C66CAF82F77D9EDB6AD9F9EDF53FE4771C77B9E2D0F66A9DF2
907EE8AB0B99A3C84E2A54695E31FD722CF866D92776EBE025A7E782316F31249CCC8ADAE49CAB8E
5EE47174BDBC51912526F12591BA50A9EFE34A811B4B742534DAF509037EE1120C9D34A5A10C3C50
86A7A7FD6725D41949A0CD6B09F315C84888653589B5D037EBB4A7994E2167A8A8C5A83EBBC7B2D7
3885E9CA771D458BE380A9A9C577675473E73AA1B8EC7B403B15487ACBE732E3473F0C657E7667FA
378E596CB60376BD4674F6F434BC0F1D74C53F16DD262F75E1126F0E9DC72AAF172D45927CAFFB78
19AAE5591F8499ACE69C55E540880472AD52E410F7EBACBFC5A425782BA6EFA0314AE9DB2A701D83
B6718CC8A193A881750E5D19764B41EA7F65D5407F8EDB7A0CE18FFBAE859D6A06E03CE95799427E
E6CFB40946DC4D91F16308DEEACACB1DEB688ACB8C9B066031D439DF464683C26AA72903F65043C8
24043F42269743B48B9F0FF7F1A03490D0488727A1E0AE777362336E91E07724491857EADF75C77E
5A0E9EB475858069D091ED36624675F318016EE24B2FC58CFE1CDF3B0E48CBAF0570A86919ACF9E6
0348717CEC01D9B06B133785964D25FB84F480F44F37DCC14C4410079F996845C3A6C3F687685831
31DACF9D31CD567909108660E25B31C8A54A7BFF987D8877E27EA80D450A582BD6E14C36D146036C
AE2203C923E77C45721931AD20FBB70DA40C424A81C3DF7D7F72906DEC2DCDCC6F48FB94F0B5F50F
1D5EE35258BF057E914F05880F75616D57CF722825988D1DF1029F6829A754629A104141E58AD0CF
2E80C798544F816622D5ECBF98F4FA691FADD53EA9A1C0F888C3E9F56B3AC3AD7FA5DF806B70BC93
104A950594E0C93596577111F806ACF86300CB419EA2AF287B0D8429E8860232129E66055C1494F8
4A33D24E85AFF56A6E0A8ABDA05ACCD8E7EFD2269107B96CC1E541288FFD0844265EC9C7973483AA
5CEE5E273EC905AF86F4E006C676DE7D5052F66602568FFD3C7EC31C796F7B8DC857F21132A5FFD2
C2056BC52DF2C6A05966ACED0E5EDCEF502FCB79DCA3BC0C2D7C08A256611E44F5F5D923FF120A35
9A8E378A68DB20FFDC4B04FD8C5EE9D70020F5409CDE41FBD28B8231FAFA932DB9B7851F2C981BD7
41048D58FB311CB5D5CA58E91D688AA7F96C11D341BD1CC285A4864C8B852945C0E7446658B9A168
89B0D2DBCAA9C3E19EBB69AA9E4461D92BB34BB7C108C054099BEFF7278C55738751A291D20F2285
A3A2B2CB9D395A945FD3ADC1C0A005EF6369B0375B93BA4F30A4C77CC425B31B7AB2192E69EF4C1B
13C6CEEA5E26E68D5507A0A163B2E3D45F1FEE90E6C242EA7A9954B723B68C424F6BF647727E8028
6BBFE003D0C422A4F6823ECB5825192AB1EBB2B1B16A5A786AA7C62CD02624B0CB9C0566627D001A
8B9DEAD47294AC97B0D75AB890A18F87663FA32553444411D96EF29C86E6FCA8636C3CEA00037A74
59D83A715275B77E3FFAAFFAC8F5AC1BA2ECB925B1F81725663DE85830A52E7E465485E22F4189B8
635D6C4B484684C938AA352FA813E2F00E5733DCB2E6F6CB03EA98E5AE658FD2725713F7FF9B0CEE
EC80D6D1FCED6A4047CCD98DC0C56BC9B64061FB458D2742FBFB46A3FC883D173AD767E7F5C91A90
F1611088DB87C6FC6FADDA141D8D598060EE144D0EC5BDF3B18FAA97919737270BDED59CFD1547F8
047D075F7CE8CBF1FB63E95AB4D34EE34C7001522D5FFED2F9BFF121035158DC4D011A3C32700D28
364526B06FC48FDE1E1DCE77BC120E93C85EB0C8B6589D1AA97338DA39D4CBB0C2CDEEBEA86EF069
367C53E571075D67E01B5BEE2CA83F27D341DB417A207A9DA8452E2D74B6B27909E976A96C7EF316
50CE7570532C3A9E502ED3812146ABFA12754D7E1871CCB59154254C9FF34AE07EC5033CAA68FB5F
0F64D7013B1976A373DDFC406420012E61F76D62F34D2FEF08751F54E8A2321D38BBF32CDBCBB619
A47EC4A4EBB92CDA9417B695131C99A895FDC7242CF93B29A12E6862871E1D07F6023574810627F5
655F14CB55F4062456C6DAC6FA4121E0C87E30FC0FEFD09F113B42C94AC0045BB6729AA4685D3C31
0CB92A3B8DA8229DE0CE4D1D39F575147FDF2238D243E15CD1BBA7AC2BB3744B95B103E3DA2C9EE5
2B053C200501C8D933CDDA4495CEA2C6C5731AEC14BD1E8CA27DFF3CC1A04C2FE936B16516673279
5E5EAB231CBE020039A5DBC94A198925001A338C2AEBE26C4C3C0242A2697865381775368D34D0E5
6225CDB95A62674D7027AD9C2786FD637D5762C378F2FBE5B44B2A93A4B047FA8D8E2FC020E24258
F3CB93ADCAFBF884C0B17847D7ED45C0EE756E9550CCCB65044572CB04E5C96833DBAEC0C71E8AF1
67A773389CEB9AD55C63A37D5B02986AD6574AB96EEAADAEA4BB069ED66C9421C3CD52514DA8636C
98306CE6B5DA2442304EF186C2C4AF16172AEDA79D25698D3FF457BCB8A8B4F532F4C7DBA8AC6702
9BED6D804755729F68AAD5D4C780FFE432E9038CEFC5FFA9D0B92C2E911AC259D52858ECE3B98CEB
7CB39386272DBCF4020C86E355465EE1A0C956ABD520D144444313C3DA655AFEC31B127788A52B11
9A6CF230880D2D0F9FAF9438F2B2C297913D1E65DA4DD056B72CD1EB5E299F13DA6EC29E90C18D4C
226284369D975011E08DE090DB02C940394C7FA2A9185B5DA872D3237C1042E7B1419F320FE0B2FA
D7BE54B21572211A860F0D83FACD214E045FAB5666686561507BB894197D8B9263F2C903D9DC7D12
F396482ED4AB4B8CF2BB5BAA3ABF991984D66650F0921FE26D4F3A278BC2AF17F1270267AD340D0D
B44E5B9492E0EC851E85178BEC1BE3EF265ADD71F89B44EBFB7AED2689875AF8D23AE2AB4074BD82
D02BBFACD555F78842D55654AF77B736E42527A8B87E92FE141D4B8AC9F86CDEE43CD8F458755629
7C386745A45D25F9C235436ED1A3F518CB3CB060F9E25F3053A46101F8A47E8E56D12F3BE60C9B24
D6E8CD106B21B918FADA3351072D466A4C611A3A22062654200FB562F8F226541624DD047EE2216E
15A23BD056931A7DBF1AB4837040695F92BE2828ED16E2E3151E8548B007B92040F2CE3E375C5258
881DE796857CB4F8B045E1B9C4BF7E592654E3D52947E66208F3C1068AB8EC1A5EFA08BA5A3DDA75
AF95CF256C26C247EA42E788438AD2F6C21AB08F36B65592E73C60C28C1A2B606DA7247BC9955727
9F7CCC3159BE92D298AE0F2B62F934D3B57BA952B7C9BAD9DC78448A5959694BEBD4FB9635A0F5DD
49A72C12150E2A83763F545B2613BD56E836BD1F0135FFB953160A24095C31EF7F7E5539C3CE9C32
43E0EF46776D83F450ABD074A6BE926A774681D2D7D70982E6198080B8CF113890403AACA80585C3
1050B9FAFE8339AE404F1FCED604E1B884A634C508E1C50B7C64FB3055043F5A3B336F0E0F9471F8
624113A49D197BB3D0D0643D73B9A93AAD1AEF9D6440D1D960537917952F85E063C38212D0C212F1
10CDDE659EDD02D9F0D62057FCF8F65798EC6EE9866ABDC74DA9CA98B909802F38AD7B2C5EB5F682
769D4E3715BDB46DDEF744CE75FE0D38D04EFFF7CF64DCB552F474C8D6861AC30D8269BCAC58B843
15214A035146AFCDD689B69E2529B632B097E4DC6E36C585A8C228C687A6CF9E69DBB752ABAE8E8A
6F880EFB2BA3DE28B126C0357E6ADF9BB92353CA98B1DC5EFF9B136BDDDF4D442435339DA03C979C
BA3DA87F14ACF3EA05C07793424C0586B56CB44581C6E969BFDD32862C11C5B561EDBE135A9A5939
EE591266B1A6FDBCA8147D4775F53B9B5016E00185608BB14637DE71B23B0A9D908E9594343C782B
CE1DE2409C3953CAD9129E8C250FF111B6C664D96820E059C67B1F37730F858AA9E40E33EC688D55
819B66A6443212175AE46C17FE2A2E1E5C800A803933BDB5577D749CE78590B7F133CBF5B33F61A9
9E478B00E679717299D3B4157E1383436A460A24390781CA9AF2D468CCD08BD6A0A1452AE459C1F5
A1DA700FB018BD928D57344BCBAD15A37F8AD3EC32A1F3A6F21CCE25D73D4E1F1DC93CAF76FDED7A
431B954C154A513B7982A7F72D03E24551E768545C81FF727D5EAB1E6F8B7F850BB96721151E88AE
CA305CD7576E47B0AA02E8058BF142C5F6C8D0F8A987070C98C7BB3EF7BF09EC255F6A959C04D04F
C456703E17961C88F5C22120C07868BE80D2EBC356B2653F2159675C2F8917AD7D9202FC65594728
374AA869A0B5EF2684D8DDCB8B8EF3B8FC8B04D31FD16C5132C174D9F23F72C3BF891960B1636150
1866C7F7C54B74A257579DCAB97B709D0D4A8B8FE99A1B7CCCF0899D09BECAD1C3B0ECCC8E9975EA
BDA1047ED99F3997467150A785B8ECF3B2C6D3FD1729F6AD8450DB4C4B6686B5F5A06C61CCCB0143
BF7C7836D79FBA68BEE6474240DF8675F8F2B780898236BBA20A63341ECC3B02D14F620B91641D58
93585DC32806A933F26F3B9840C95E637F0E233CEAFB31177EBE6BB9A3A0D82D46EF410560D6D10F
36FFACEAC9D735A80A06A5646698A4290D9EB02047996E741C212EC6FCEA3BF7502EE2F3E860BB7A
EAB485F1991FB28410DDD46A77A40178D8E0190ABD7817349A50A7EDFFB008742100E927445A4908
10E1FEE2869B4609838BBC219A3D6822C652C5A9F564C7AA7F3A3F934B2D4F0F06A54BF344BCA794
A4D3A2EF5B565D39D9241BC2A5EF7C96A11465166F480017DE4C884BABBCF33F072DCCAF833E0771
D105B449ED23DDC5D3C02DE2CBA45F8D22BA3E1B6842EEE791540BE727044CF7D99FADFEF45FE14C
74CEA615DFB5BB6F7B27A4A1EF8A1FFD4F838A8DE85D488F41E97B9ECE0EDF00604F922EE0EE4ADF
486CC0EAA2C3C60EC275F2792FEBAF4B6BC4FA59AC378212EFCB763CC794D2179FFD538A6C19F5F7
35084AE03A90AF00BE5821CFB9BF2C966B4AF8D66AEC8A58C1C683AD392F1DF20983D1210AB6BD73
9FF130869E652C09E9A61D8E892A86DE1B31BBB1B80239B6829368ED026C645F95FB953298411E84
003C85967FCC739651014E3AE23B578A64BF14F6AC87777A6719ACE6119D6393E8DC9B9C7AC424A7
857092DE86375831DC985ABA2133B44EAD072744924EA4A738DB94D432045A8035A9BE5F9DA3581B
E8D60FB428BFD91A4E145D11CC9E37B47179162B6721F02E943E3CC9CE5A14C89117F44E4113E47D
08A3D75BA6E33D52A7A479BB40A41DB53E3A9C6BE6298B2ACC8AA8A0CFC10954EDF1D3EA9EE3C5AC
8D8C4424603C5B41DB638FF08CD744DD8AF80D1D96587F12AAF4FECAE452DC350204E10740469ED1
ACA97C52C331A823C651E99021A7DCA218086B724D2B483F0484C158D238507834F478347418ED16
B42D30F04C3E1AB8E0C006E8943934B6AEDFA2A5B255F2B41F5EF8A1CA1FEA020A40A8A8AF420615
E2FC6237EDADAB7B8C8DEB09D78580B4C29782EF9551E55CD962FC17DC96FBA80DFE4AFB9806AD98
F06B021F84C35D19B5672E538EC00838588BE19932C79B79F630948E4A47D1C54025FA75AED05AFF
A16F675A7C089E7890618EBD3D0CEF29CCAB7F5BBBF5C6FCE56E64816ACA9895DC824E8BBE7A329C
DD7FF5925736B8FF8AEC4A56E6A980311F8F5A6B06520E74512270098436D99C5BD9C4BA2F81728B
1C82B52D9E9C33EFE65BDB233C6384471C0FAFAE94D7308B7EA591ECE5412151F0CA5C1F8214CA0E
FE6EC698D0AF6B64524C6FF9F3DF6B2AAFA270535F6484B743FF927C0284E56296C8BE8E77D566D2
EC6D45C933C5CE1128BDF66FFD0DA7864F1BB09F74604D2D27B4C7FB1DA5D28CEB0902A32C1EDDB3
6BEEA2D44FCBE59B0D0F3C37FFCBAC595D6110DA77605FF20042239CBC1B7B245CD25C99196105D9
9AB195319A9AE4287A0A46D32F8DFDFCABF792CE8105CF77F0AF50A011D7D58F17696FC68706B4C2
B9BF5AD816C492AE5248EB96622399A3AC9FE5FD926CAFE71279F7677820983BBDDF28625E4884A2
ECEEE746603B1E7E500239FEDC6A7DFAD82AE32A7A4A83046B3649EE86A77A39E5A165C28DA4FFBF
98652943738A6F3C4A83C092DC0A40B1065F429AA1B1C2B1A2DBD13F194ACC00D52E3D4C0A8C9CE9
C2EFDD9708F5CDA6334687D4E21DA5C5C734CE2574BF1E441D9BE03946EB7A35359AEDFCB84028D5
04D7393088C9A7DD1C0B185E72C51E7DD1BF6F7D074105C530963F3E463A98B2ED01DAFEC6AAE40E
E63CDF0CD8C180306692D12175F73D3175FADE69B4FA3B98D0A4358BEFDC972D8A26EBF8FEB0FC53
35FE9F528808E7ED2228172021278E0EB68ECEB7C3E6FDD42B27EFBC8D41530959317FF714928F77
FD36FB5723FC5F3890A8D91CF18BFA4073BE695FCCA6294F9B272E29352F72B9F420B881BE4543E0
C45650974079F8BD8D70A1CC24CE4112F201DCF2556325F5D62BE6606F72888937BB54BDBF744C25
E08CA867C757FB314E8D51DDFEA3905CA670E5F478F42033B569A754C686E3FE4F93FFB96BB1CB57
16334F15CBD2D37650D6C4BCB11DDC6BEBA5D33B862D2D9B7CDD4FA537F439DDCB13C966BF5CF6A9
395ED6E32DAD3F9BCEEABEFE91F4AB4F129982165F089F9D40159998F8D737641D6C32CE4DA1AE05
F0C1958EA4D2A9BDA6AA567BCC1F0DD5152624E66E4BE9F45791C0B1EC1E09EEADC0515E72E7C672
A63AB31E8B85EE2EA39B193618427C4134162604DBE8BE3BBA64B4F3A43FE6F56A08BDF26AD4C4B4
6BB12C4EDAE915E47C236364298A637ABCD18590C6EF2C096A2D3D53C48469D25B514A23A6568186
05E255F1B85F576638243CDB4FF8068DEBB912EF9674C80976DD3CD0C75CBB562BD3F3C6A31868F8
40CC9197E4FA01DF1A1422ED16B127A4059D2C63838BAAA0F7F620D89A4450916B2FA001FA4E9C77
3ECA2D2DE2775ECBC0CEBB9CA6903440EB1E4E83ECADC1B5EA255D953F91BC39846692CDCED695BE
F7EF5B838A34509B771F4C89CE01FD851E3CC0A02486FA574A1F09DB3DDEE582C27C5FB213ACBC35
C96CE631EC7FDCACE158B5814FA74101EDE2FE917928532AF7476C41857D972CA11EFAFB7CB42AA8
5E957769A16C570CC97CBA01F71E574AFC75C94A99939BC8EB001760829467FB5227539FAC3226EF
68D8E7D91870787C47285A3F08F0386B132024F2008C9C081CD741D691D9E7EFAF47B2BD7D552426
5F40CC31ABE23DC2A26CA215CA49700432DEC497ABDE6EBD4066207033879642B6CA884DA74281EE
C3F8EB4F40C89998ED7D4659604E95ACAA0F182625139D9F9E4DFFD97C20C09D88927F524FDE1E3F
C8AC0B149F9C4F4AE3F82FCCD553608AB401DA54BCA3A7FE854B01E5C07A20FF9AD6C7C7E25C68E3
92E48C88B5AF930920CFB487092CEE4937BF5E76F99D49289252DA678433A6877B37856C4D3402A7
ECB7C4E6FA9E1595CA25F15279EF185864D44A0389B1FE69AF3C271688B0E2EAA7147B4C2B4A1206
7CA524E7BB570434E1D1F0A886A4A368B93220E33B9041B979000A2FCEDCC494C05A1EA3EA79331F
CF6567C41FD5BA08829F094B7F0A1149E5738219A8FEB3FF04FC4A7EE3A620040D436AF600AE157D
F48A246B76B05BF836F7BB2950BFEBB9B2B34E1FF7150BA77E48D45ABC18D074906D136D9AED3BCF
FE951A7F707E
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
cleartomark{restore}if
\ No newline at end of file diff --git a/resources/ahem/Ahem.sit b/resources/ahem/Ahem.sit Binary files differdeleted file mode 100644 index 34057623140..00000000000 --- a/resources/ahem/Ahem.sit +++ /dev/null diff --git a/resources/ahem/COPIED-FROM b/resources/ahem/COPIED-FROM deleted file mode 100644 index 45bac8b4984..00000000000 --- a/resources/ahem/COPIED-FROM +++ /dev/null @@ -1 +0,0 @@ -The files in this directory are copied from http://www.w3.org/Style/CSS/Test/Fonts/Ahem/ diff --git a/resources/ahem/COPYING b/resources/ahem/COPYING deleted file mode 100644 index 6327b904bed..00000000000 --- a/resources/ahem/COPYING +++ /dev/null @@ -1,36 +0,0 @@ -The Ahem font in this directory belongs to the public domain. In -jurisdictions that do not recognize public domain ownership of these -files, the following Creative Commons Zero declaration applies: - -<http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcode> - -which is quoted below: - - The person who has associated a work with this document (the "Work") - affirms that he or she (the "Affirmer") is the/an author or owner of - the Work. The Work may be any work of authorship, including a - database. - - The Affirmer hereby fully, permanently and irrevocably waives and - relinquishes all of her or his copyright and related or neighboring - legal rights in the Work available under any federal or state law, - treaty or contract, including but not limited to moral rights, - publicity and privacy rights, rights protecting against unfair - competition and any rights protecting the extraction, dissemination - and reuse of data, whether such rights are present or future, vested - or contingent (the "Waiver"). The Affirmer makes the Waiver for the - benefit of the public at large and to the detriment of the Affirmer's - heirs or successors. - - The Affirmer understands and intends that the Waiver has the effect - of eliminating and entirely removing from the Affirmer's control all - the copyright and related or neighboring legal rights previously held - by the Affirmer in the Work, to that extent making the Work freely - available to the public for any and all uses and purposes without - restriction of any kind, including commercial use and uses in media - and formats or by methods that have not yet been invented or - conceived. Should the Waiver for any reason be judged legally - ineffective in any jurisdiction, the Affirmer hereby grants a free, - full, permanent, irrevocable, nonexclusive and worldwide license for - all her or his copyright and related or neighboring legal rights in - the Work. diff --git a/resources/ahem/README b/resources/ahem/README deleted file mode 100644 index 7a4fcea05a1..00000000000 --- a/resources/ahem/README +++ /dev/null @@ -1,30 +0,0 @@ -The Ahem font was developed by Todd Fahrner to help test writers -develop predictable tests. The font's em square is exactly square. -Its ascent and descent is exactly the size of the em square. This -means that the font's extent is exactly the same as its line-height, -meaning that it can be exactly aligned with padding, borders, margins, -and so forth. - -The font's alphabetic baseline is 0.2em above its bottom, and 0.8em -below its top. The font has an x-height of 0.8em. - -The font has four glyphs: - - 'X' U+0058 A square exactly 1em in height and width. - - 'p' U+0070 A rectangle exactly 0.2em high, 1em wide, and aligned so - that its top is flush with the baseline. - - 'É' U+00C9 A rectangle exactly 0.8em high, 1em wide, and aligned so - that its bottom is flush with the baseline. - - ' ' U+0020 A transparent space exactly 1em high and wide. - -Most other US-ASCII characters in the font have the same glyph as X. - -The Ahem font belongs to the public domain as described in COPYING. - -Acknowledgements: The font was originally created by Todd Fahrner in -the late 90s, and was updated by Paul Nelson in the mid 2000s. The -changes were the introduction of x-height information to the OS/2 -table and the addition of the space and non-breaking space glyphs. diff --git a/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini index b275cb58343..292dc852b9f 100644 --- a/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini +++ b/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini @@ -12,6 +12,3 @@ [Revoke blob URL after creating Request, then clone Request, will fetch] expected: FAIL - - [Revoke blob URL after calling fetch, fetch should succeed] - expected: FAIL diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 8c88bd5d094..2e311c7ceb4 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -2849,6 +2849,22 @@ ] }, "css-gaps": { + "agnostic": { + "gap-decorations-007-crash.html": [ + "46306a8ffaa200780a4413f72609131acecf3aee", + [ + null, + {} + ] + ], + "gap-decorations-008-crash.html": [ + "9c03f592cfec44750532d2f4f7e3bf6c327efd7c", + [ + null, + {} + ] + ] + }, "grid": { "grid-gap-decorations-041-crash.html": [ "be3e2280b5f52dcc60a4fe418ae67af3ec23da6b", @@ -2856,6 +2872,29 @@ null, {} ] + ], + "grid-gap-decorations-043-crash.html": [ + "920e1b4d05a63922614e5717a526df283075cb17", + [ + null, + {} + ] + ], + "grid-gap-decorations-044-crash.html": [ + "b4e69929d2de8f05b2d345461c4f3ac0abfbe8ff", + [ + null, + {} + ] + ] + }, + "parsing": { + "gap-decorations-rule-initial-value-crash.html": [ + "19309e87efca3efe22d0263e349d614910493849", + [ + null, + {} + ] ] } }, @@ -4274,6 +4313,13 @@ ] }, "css-overflow": { + "chrome-421199213-crash.html": [ + "1ab02f1a78736b96f6e24b8fa028634224742086", + [ + null, + {} + ] + ], "chrome-body-overflow-propagation-crash.html": [ "22607b4a4d037cdd9185ead784c9480f0926a79a", [ @@ -4411,6 +4457,15 @@ {} ] ], + "scroll-marker-focus-scroll-crash.html": [ + "97b3be1e8fb24c003cf0dec4c8cdc89da18b4f70", + [ + null, + { + "testdriver": true + } + ] + ], "scroll-marker-with-content-visibility-hidden-ancestor-crash.html": [ "451e9e9709a9a5b1bc2c371884249a26cfb6e391", [ @@ -5991,6 +6046,13 @@ null, {} ] + ], + "shuffle.html": [ + "fe110dbfe50d40f7e5ae0473082cd0e4cbedc67a", + [ + null, + {} + ] ] } } @@ -9535,6 +9597,19 @@ ] ] }, + "pointerevents": { + "crashtests": { + "longpress-crash.html": [ + "0ace661d5a9904b77e8edc73bab5f933c1dc45bc", + [ + null, + { + "testdriver": true + } + ] + ] + } + }, "print": { "crashtests": { "reload-crash.html": [ @@ -26548,7 +26623,7 @@ ] ], "SpeechRecognition-phrases-manual.https.html": [ - "2d0b19ab46ce3c41610b298750cbb0ca85832513", + "0f596a88015a1e7384618fa0e734e0683ff2b98e", [ null, {} @@ -125845,6 +125920,19 @@ {} ] ], + "anchor-position-non-anchored-fallback.html": [ + "26965fe8bf413ca199dae0a09940d46f0b29f62c", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "anchor-position-top-layer-001.html": [ "f40cc0dccf3ccbef010629ebc809229ba83c9b45", [ @@ -126303,6 +126391,19 @@ {} ] ], + "inherit-height-from-fallback.html": [ + "a1179c62ed04d671e9fdb5c43a270d066a13da38", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "position-anchor-001.html": [ "b0a964485c65ed1c8eeff89a1406bda9f4ea9b48", [ @@ -187470,6 +187571,19 @@ ], {} ] + ], + "flex-gap-decorations-025.html": [ + "42b46a301c3b0c0d9c0d50423334290fe1d781c0", + [ + null, + [ + [ + "/css/css-gaps/flex/flex-gap-decorations-025-ref.html", + "==" + ] + ], + {} + ] ] }, "grid": { @@ -187980,6 +188094,32 @@ {} ] ], + "grid-gap-decorations-045.html": [ + "a90d45df4423225f78c9dda739640ac2cebcae40", + [ + null, + [ + [ + "/css/css-gaps/grid/grid-gap-decorations-045-ref.html", + "==" + ] + ], + {} + ] + ], + "grid-gap-decorations-046.html": [ + "64ca1cdddffc856803726ec361a624a64572f1b7", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "grid-gap-decorations-38.html": [ "8b87bcd4860ac50a1c2f3de98cec9599bebb77a3", [ @@ -202065,7 +202205,7 @@ ] ], "image-orientation-exif-png-3.html": [ - "536b7d2560c2fb1e595033b5397a654ff68533c2", + "355c2f601fa903c36199559247c30d31a8e1ed33", [ null, [ @@ -215735,7 +215875,7 @@ {} ] ], - "clip-path-shape-007.tentative.html": [ + "clip-path-shape-007.html": [ "5e71923c01b54f937c8faf858987b6034fecc2f6", [ null, @@ -215748,7 +215888,7 @@ {} ] ], - "clip-path-shape-008.tentative.html": [ + "clip-path-shape-008.html": [ "fdeb79714296e6eb88ff37d8da40f4adc2cbc2df", [ null, @@ -215761,7 +215901,7 @@ {} ] ], - "clip-path-shape-009.tentative.html": [ + "clip-path-shape-009.html": [ "8fda73b055e7aafa62bf17eb1769d996dc6b327c", [ null, @@ -215774,7 +215914,7 @@ {} ] ], - "clip-path-shape-010.tentative.html": [ + "clip-path-shape-010.html": [ "d089a90104cedcda476c2ebde3c2424f071976f1", [ null, @@ -215829,7 +215969,7 @@ {} ] ], - "clip-path-shape-hline-vline-keywords.tentative.html": [ + "clip-path-shape-hline-vline-keywords.html": [ "11c28021741385facdd127dd78f157a342d6e6ec", [ null, @@ -225503,8 +225643,34 @@ {} ] ], - "contextually-invalid-selectors.html": [ - "f3cdc674fd5ff937cdb9db908cc38efc662d82c2", + "contextually-invalid-selectors-001.html": [ + "37c6c44f57b62953e193cb695503efc31bbd4caa", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "contextually-invalid-selectors-002.html": [ + "7c722468e1c2ab54f5a1fb8246f4c1727702b68a", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "contextually-invalid-selectors-003.html": [ + "01d0a819fa53328ec1690e9f48e386d764d9fbc9", [ null, [ @@ -225778,6 +225944,19 @@ {} ] ], + "clip-008.html": [ + "8fb45252aa758c3044498f27c3d6f01923b8ced8", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "clipped-scroller-add-content.html": [ "d7f2eb1c919e3bf48a045cb73cd632821b1fa5b2", [ @@ -229984,307 +230163,307 @@ {} ] ], - "scroll-marker-contain-001.tentative.html": [ - "93d7df72508d19d89ac6c2d775e24a1937b660aa", + "scroll-marker-counters.html": [ + "25e4fdfd24f849128c711cdc5a8610abba5e1d8f", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html", + "/css/css-overflow/scroll-marker-counters-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-002.tentative.html": [ - "af2a5e668be4673ae5d976fa901fd5106dc8ad1c", + "scroll-marker-dynamic.html": [ + "8d52c0e59164fc2bf10409b7ec1f7158b0d25b85", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-002-ref.tentative.html", + "/css/css-overflow/scroll-marker-dynamic-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-003.tentative.html": [ - "59daa5cf5ced7c57248cfbbf4fef637ad91728be", + "scroll-marker-group-001.html": [ + "bbde726f4ba2455cbea7545b473b90660b3c1aab", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-003-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-004.tentative.html": [ - "2ec6f6bde76fb3c16b04628f49415edda014985e", + "scroll-marker-group-002.html": [ + "9e91039c95ee5821232af9891fdea69e1903f477", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-005.tentative.html": [ - "3d435bf74cbe204857b62974bcd0f12ee1ec8430", + "scroll-marker-group-005.html": [ + "e80a95873d2cbfd5e4b958e6280ffdee32448bf4", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-005-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-006.tentative.html": [ - "234b57e5bbea2b29a1beb2671fb1b6a1ec1de976", + "scroll-marker-group-006.html": [ + "f24105ac5d2b1eb55e69e643885ed332f7805a0a", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-006-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-007.tentative.html": [ - "5f15c85819a3d00ca9d3088425345bbc9be60cb3", + "scroll-marker-group-007.html": [ + "b0910e138206fe4994d74703d9118d363c62690a", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-007-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-008.tentative.html": [ - "80801854a0f05abb47243873ae084a1564e5cd30", + "scroll-marker-group-008.html": [ + "ae1304b2c20f96389a7a3398c07905529fbcc077", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-008-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-008-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-009.tentative.html": [ - "8037adf8441168ec87f118c1da3a6a7bede7ef77", + "scroll-marker-group-009.html": [ + "9863f94f047565e503a5b044a0eef9f4d8740d26", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-009-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-010.tentative.html": [ - "fbdad62f84665ea55b8c7d647b631b0f215f1e19", + "scroll-marker-group-010.html": [ + "f63f2b85a26790a1cb4fc6acb2b4c93964106e97", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-006-ref.html", "==" ] ], {} ] ], - "scroll-marker-contain-011.tentative.html": [ - "8cfc78130e0f93ddf3a768b0b582f292d9c4291c", + "scroll-marker-group-011.html": [ + "7b64367e5f8c541f27837ec87a6fd4b98263c93b", [ null, [ [ - "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html", + "/css/css-overflow/scroll-marker-group-011-ref.html", "==" ] ], {} ] ], - "scroll-marker-counters.html": [ - "25e4fdfd24f849128c711cdc5a8610abba5e1d8f", + "scroll-marker-group-013.html": [ + "48a59c7d0cb75bca15d54f9a05c092a1c5f05f86", [ null, [ [ - "/css/css-overflow/scroll-marker-counters-ref.html", + "/css/css-overflow/scroll-marker-group-013-ref.html", "==" ] ], {} ] ], - "scroll-marker-dynamic.html": [ - "8d52c0e59164fc2bf10409b7ec1f7158b0d25b85", + "scroll-marker-group-015.html": [ + "49a5f2df73c60604860144afc43c17720a6d1e57", [ null, [ [ - "/css/css-overflow/scroll-marker-dynamic-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-001.html": [ - "bbde726f4ba2455cbea7545b473b90660b3c1aab", + "scroll-marker-group-016.html": [ + "c2c99c664055a5f7b8b5597458e73b182930e018", [ null, [ [ - "/css/css-overflow/scroll-marker-group-001-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-002.html": [ - "9e91039c95ee5821232af9891fdea69e1903f477", + "scroll-marker-group-017.html": [ + "54d5bcf178b23b4e96d5cb4abd5618862cc8c44b", [ null, [ [ - "/css/css-overflow/scroll-marker-group-001-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-005.html": [ - "e80a95873d2cbfd5e4b958e6280ffdee32448bf4", + "scroll-marker-group-018.html": [ + "927d8ba61b80b6a264c3c4b577a249e32029dc88", [ null, [ [ - "/css/css-overflow/scroll-marker-group-005-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-006.html": [ - "f24105ac5d2b1eb55e69e643885ed332f7805a0a", + "scroll-marker-group-019.html": [ + "9c2c5a0c0dc3360ab3a9ecde998a52277831ec0e", [ null, [ [ - "/css/css-overflow/scroll-marker-group-006-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-007.html": [ - "b0910e138206fe4994d74703d9118d363c62690a", + "scroll-marker-group-020.html": [ + "1f69fc80d3d991cfef992992702fc5b1b2b9f274", [ null, [ [ - "/css/css-overflow/scroll-marker-group-007-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-008.html": [ - "ae1304b2c20f96389a7a3398c07905529fbcc077", + "scroll-marker-group-add-dynamic-001.html": [ + "b12fcdef1b1259e916c3670223289b26b02cce22", [ null, [ [ - "/css/css-overflow/scroll-marker-group-008-ref.html", + "/css/css-overflow/scroll-marker-group-add-dynamic-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-009.html": [ - "9863f94f047565e503a5b044a0eef9f4d8740d26", + "scroll-marker-group-add-dynamic-002.html": [ + "aecf2d732703c2d4edf7a85c254b37703d12510c", [ null, [ [ - "/css/css-overflow/scroll-marker-group-009-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-010.html": [ - "f63f2b85a26790a1cb4fc6acb2b4c93964106e97", + "scroll-marker-group-add-dynamic-003.html": [ + "38f1a7b05c9488446f26d618fec72fb5ef72aaa6", [ null, [ [ - "/css/css-overflow/scroll-marker-group-006-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-011.html": [ - "7b64367e5f8c541f27837ec87a6fd4b98263c93b", + "scroll-marker-group-add-dynamic-004.html": [ + "e4e26fbf81b2065018aa8f6fac9ecd90432a30a8", [ null, [ [ - "/css/css-overflow/scroll-marker-group-011-ref.html", + "/css/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "scroll-marker-group-013.html": [ - "48a59c7d0cb75bca15d54f9a05c092a1c5f05f86", + "scroll-marker-group-keeps-active-in-view.html": [ + "b553ebef2481724c72eb56094f1e8b0f0d574d75", [ null, [ [ - "/css/css-overflow/scroll-marker-group-013-ref.html", + "/css/css-overflow/scroll-marker-group-keeps-active-in-view-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-015.html": [ - "49a5f2df73c60604860144afc43c17720a6d1e57", + "scroll-marker-group-layout-parent.html": [ + "c3ff8419ee660f0a61c43addc182be3d24008119", [ null, [ @@ -230296,221 +230475,221 @@ {} ] ], - "scroll-marker-group-016.html": [ - "c2c99c664055a5f7b8b5597458e73b182930e018", + "scroll-marker-group-snap-aligns-to-active.tentative.html": [ + "5db171c800aba1adb62eef5df530357773c3cc64", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-marker-group-snap-aligns-to-active-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-017.html": [ - "54d5bcf178b23b4e96d5cb4abd5618862cc8c44b", + "scroll-marker-group-style-remove.html": [ + "b9551181f856f4aa3f3a08881d046953e76b0d8a", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-marker-group-style-remove-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-018.html": [ - "927d8ba61b80b6a264c3c4b577a249e32029dc88", + "scroll-marker-selection-in-2d.html": [ + "2ec7806d4631f85567c2f10f95b6c8046e86a528", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-marker-selection-in-2d-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-019.html": [ - "9c2c5a0c0dc3360ab3a9ecde998a52277831ec0e", + "scroll-markers-added-after-content-visibility-auto.html": [ + "f58b6b5ff00707dd68fb5166b25c91819233fe4e", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-020.html": [ - "1f69fc80d3d991cfef992992702fc5b1b2b9f274", + "scroll-markers-added-before-content-visibility-auto.html": [ + "9da4bc5b352c07041c88aac74a194f7e134ace5d", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-add-dynamic-001.html": [ - "b12fcdef1b1259e916c3670223289b26b02cce22", + "scroll-markers-under-content-visibility-auto.html": [ + "a87f1f1e19673b8ad33a4db0fc7ba4419ae1f0e2", [ null, [ [ - "/css/css-overflow/scroll-marker-group-add-dynamic-001-ref.html", + "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-add-dynamic-002.html": [ - "aecf2d732703c2d4edf7a85c254b37703d12510c", + "scroll-target-group-001.html": [ + "c0f96cc557492e0ba9133596a5847e1b57f1ef1e", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-target-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-add-dynamic-003.html": [ - "38f1a7b05c9488446f26d618fec72fb5ef72aaa6", + "scroll-target-group-002.html": [ + "e3e83769db2ffab1b8cbab1b00e795bfc9ec4c4f", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-target-group-002-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-add-dynamic-004.html": [ - "e4e26fbf81b2065018aa8f6fac9ecd90432a30a8", + "scroll-target-group-003.html": [ + "39e1beff02acd0f29577e067f8e2cbe7aa42b82d", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-target-group-003-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-keeps-active-in-view.html": [ - "b553ebef2481724c72eb56094f1e8b0f0d574d75", + "scroll-target-group-004.html": [ + "3a61a6d8c8cf3cd9630e29197030a9c4036c1e4d", [ null, [ [ - "/css/css-overflow/scroll-marker-group-keeps-active-in-view-ref.html", + "/css/css-overflow/scroll-target-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-layout-parent.html": [ - "c3ff8419ee660f0a61c43addc182be3d24008119", + "scroll-target-group-005.html": [ + "c7da0d404ec4a5ebb8d08920cf661fb47dd9a6aa", [ null, [ [ - "/css/reference/ref-filled-green-100px-square.xht", + "/css/css-overflow/scroll-target-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-snap-aligns-to-active.tentative.html": [ - "5db171c800aba1adb62eef5df530357773c3cc64", + "scroll-target-group-006.html": [ + "6154845199a15cd1aa503f05e92ee15bf24f8754", [ null, [ [ - "/css/css-overflow/scroll-marker-group-snap-aligns-to-active-ref.html", + "/css/css-overflow/scroll-target-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-group-style-remove.html": [ - "b9551181f856f4aa3f3a08881d046953e76b0d8a", + "scroll-target-group-007.html": [ + "9c736381c3440c5758c908a15afa9f92c7d7d2fb", [ null, [ [ - "/css/css-overflow/scroll-marker-group-style-remove-ref.html", + "/css/css-overflow/scroll-target-group-001-ref.html", "==" ] ], {} ] ], - "scroll-marker-selection-in-2d.html": [ - "2ec7806d4631f85567c2f10f95b6c8046e86a528", + "scroll-target-group-008.html": [ + "217ff1aabe62d6cf30de44cca333df3c33d96662", [ null, [ [ - "/css/css-overflow/scroll-marker-selection-in-2d-ref.html", + "/css/css-overflow/scroll-target-group-008-ref.html", "==" ] ], {} ] ], - "scroll-markers-added-after-content-visibility-auto.html": [ - "f58b6b5ff00707dd68fb5166b25c91819233fe4e", + "scroll-target-group-009.html": [ + "c9df1e3ca4cef89d7ba18627d59a59262a52bc4f", [ null, [ [ - "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", + "/css/css-overflow/scroll-target-group-009-ref.html", "==" ] ], {} ] ], - "scroll-markers-added-before-content-visibility-auto.html": [ - "9da4bc5b352c07041c88aac74a194f7e134ace5d", + "scroll-target-group-010.html": [ + "fa311bf9fee0ee6ecc2cc64f8bdf2fd6206d0511", [ null, [ [ - "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", + "/css/css-overflow/scroll-target-group-009-ref.html", "==" ] ], {} ] ], - "scroll-markers-under-content-visibility-auto.html": [ - "a87f1f1e19673b8ad33a4db0fc7ba4419ae1f0e2", + "scroll-target-group-011.html": [ + "9062fef7a813bf4b31a8b0ee1a1a9ad3b8e0d7c8", [ null, [ [ - "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html", + "/css/css-overflow/scroll-target-group-009-ref.html", "==" ] ], @@ -241176,7 +241355,7 @@ ] ], "host-defined.html": [ - "9e9776754a3f360537e899e064a0d3b36dbe14c3", + "563bc52e527927030270658c4c965d51045edcbb", [ null, [ @@ -252421,7 +252600,7 @@ ] ], "replaced-aspect-ratio-stretch-fit-003.html": [ - "06dac275cabf3cdcbed864df9c5422745ea2d37f", + "0f6bffc2dceb1b02086ff2b88ea5a4705343afb6", [ null, [ @@ -264247,6 +264426,58 @@ {} ] ], + "text-autospace-dynamic-text-001.html": [ + "32c9c175d97b9877206cc7664cd196145bcc7073", + [ + null, + [ + [ + "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html", + "==" + ] + ], + {} + ] + ], + "text-autospace-dynamic-text-002.html": [ + "bd0a1107dae498f1f0f01e9e1795bfa061b1cc6c", + [ + null, + [ + [ + "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html", + "==" + ] + ], + {} + ] + ], + "text-autospace-dynamic-text-003.html": [ + "d53762233cc6f040d865d20505f2207fa917cd47", + [ + null, + [ + [ + "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html", + "==" + ] + ], + {} + ] + ], + "text-autospace-dynamic-text-004.html": [ + "4b3854c9608ab16d375833d7da768e2f7025da77", + [ + null, + [ + [ + "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html", + "==" + ] + ], + {} + ] + ], "text-autospace-edit-001.html": [ "80c46f54d20ff9249a49d73e55b331a8368df4e1", [ @@ -264367,6 +264598,19 @@ ], {} ] + ], + "text-autospace-zh-001.html": [ + "e8afdca931044d59ec56a05e72c9c9ce0dae58e8", + [ + null, + [ + [ + "/css/css-text/text-autospace/text-autospace-zh-001-ref.html", + "==" + ] + ], + {} + ] ] }, "text-encoding": { @@ -276604,7 +276848,7 @@ ] ], "text-emphasis-punctuation-2.html": [ - "1a48f9d32cb27be5cf2cd77832569e402d489b6f", + "53d261e9c8c11ae33642c893b8f3e098fb4c3e8c", [ null, [ @@ -310312,6 +310556,32 @@ } ] ], + "group-children-sizing-with-border.html": [ + "cb0cf819b428ed19b2e9c0071ce8ea2304aca0bf", + [ + null, + [ + [ + "/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html", + "==" + ] + ], + {} + ] + ], + "group-children-sizing.html": [ + "88916ddf48618717cac97c27fd3e1b6c55faab0b", + [ + null, + [ + [ + "/css/css-view-transitions/nested/group-children-sizing-ref.html", + "==" + ] + ], + {} + ] + ], "nearest-direct.tentative.html": [ "9bfd2e29c83a17c4244af589aa2877d4437da07f", [ @@ -310603,7 +310873,7 @@ ] ], "rounded-border-clipper.html": [ - "098e5566585930a89378c5a8a6ede536fea9e124", + "239bcdd791db41383dd66765269590d84627a0a3", [ null, [ @@ -330933,6 +331203,19 @@ {} ] ], + "css-backdrop-filter-transform-clip.html": [ + "29e8ce71e5a1e2ff3ef016c069d40dc993ea42d6", + [ + null, + [ + [ + "/css/filter-effects/css-backdrop-filter-transform-clip-ref.html", + "==" + ] + ], + {} + ] + ], "css-backdrop-filters-animation-blur.html": [ "0b3e429dc32cc48bce8750080202f527572b79c3", [ @@ -353217,6 +353500,112 @@ ] }, "the-select-element": { + "customizable-select": { + "min-height-in-flex.html": [ + "628c7ec51f4ec4ecc1c22964ecd89b4b6226b6f6", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html", + "==" + ] + ], + {} + ] + ], + "min-size-empty-001-ref.html": [ + "1c37e12b0bc4662faf2157216a5945490340e290", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html", + "==" + ] + ], + {} + ] + ], + "min-size-empty-001-ref2.html": [ + "69170af04b552602820d645c2df00aa217fdbe09", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html", + "!=" + ] + ], + {} + ] + ], + "min-size-empty-001.html": [ + "fd5cc4a0d022fff91f2edd294d68ceb034bfd4d6", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html", + "==" + ] + ], + {} + ] + ], + "min-size-empty-002-ref.html": [ + "c9e2d2333e7262fdcf043b68f6094cf0f70c169d", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html", + "==" + ] + ], + {} + ] + ], + "min-size-empty-002-ref2.html": [ + "dfbbbcac53308279e4b61e51f46e00db0d22df64", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html", + "!=" + ] + ], + {} + ] + ], + "min-size-empty-002.html": [ + "b6256c93b28939abee4617eba29db8e75797ec7e", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html", + "==" + ] + ], + {} + ] + ], + "min-width-in-flex.html": [ + "f3510a295856a988cb8a7a3e54db3e1d60c97b5a", + [ + null, + [ + [ + "/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html", + "==" + ] + ], + {} + ] + ] + }, "select-1-block-size-001-ref.html": [ "3d30c2bd9d0a105595ca6b1c75448fcdb801b101", [ @@ -356537,6 +356926,21 @@ ] ] }, + "list-box-important-colors.html": [ + "c05d595c30c0c0ce0369100c904295478910f068", + [ + null, + [ + [ + "/html/semantics/forms/the-select-element/list-box-important-colors-ref.html", + "==" + ] + ], + { + "testdriver": true + } + ] + ], "reset-algorithm-rendering.html": [ "67da173ff2eb0d90c063294db486eaa34ea8878a", [ @@ -357759,8 +358163,112 @@ ] ], "permission-icon": { + "icon-css-property-fill-reftest.html": [ + "130849e79ba0b572d453dbaf1e92764ae7d9acfe", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-css-property-height-reftest.html": [ + "9f52fd754797d1726b9d3ae04628861935b58c9d", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-css-property-margin-inline-end-reftest.html": [ + "b4edffbf00bc4544070d3f452c2dce6f5fcb236e", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-css-property-max-height-reftest.html": [ + "45abc0ffd471f9e78679578a8d35539a44779524", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html", + "==" + ] + ], + {} + ] + ], + "icon-css-property-min-height-reftest.html": [ + "d1fe8d0724c1204c7f5d1dce0834a75bd5bb98f7", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-css-property-stroke-reftest.html": [ + "9d0ff75c3d8da9a74178d9a91a55a5f17887e72e", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-css-property-stroke-width-reftest.html": [ + "a268e3c5fba911cabab1d8ac59f95b2542a62788", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html", + "!=" + ] + ], + {} + ] + ], + "icon-different-for-precise-location-reftest.html": [ + "bf58fdf93e5f45a439c6ba92c4ed99bfe071affc", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "!=" + ] + ], + {} + ] + ], "icon-hidden-reftest.html": [ - "79055da1badfc827e5cc02ed3be7db3842b49855", + "a5b5bb61d2b9de0499de45648a10597dc3a08f70", [ null, [ @@ -357772,8 +358280,21 @@ {} ] ], + "icon-restricted-css-no-effect-reftest.html": [ + "5c0ea13fde75c98796b1d034c1e3c3e082934d7a", + [ + null, + [ + [ + "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html", + "==" + ] + ], + {} + ] + ], "icon-unique-per-type-reftest.html": [ - "d51b1c4d398a42c8e59f047c0e457c533eae16ee", + "162a785852cea4410d9a824d2fa2b097d1027752", [ null, [ @@ -365534,7 +366055,7 @@ ] ], "image-embedding-nesteder-data-url.html": [ - "48fb4fa48b7439dde62fbe82a0ff20ff5d64e550", + "4f8335dcd19f3b592ec3e5da6a208da3b3694a2a", [ null, [ @@ -365690,7 +366211,7 @@ ] ], "image-modify-href-4.svg": [ - "f7e550e5defb0b1eba85edad430b0cef760223e6", + "e900ee7138700d81fd74c5e0822c9c3a820a5d15", [ null, [ @@ -367046,6 +367567,19 @@ {} ] ], + "marker-context-fill-transform.html": [ + "507e9a360cc9fc472e6324721a4f974e4ca6cd6d", + [ + null, + [ + [ + "/svg/painting/reftests/marker-context-fill-transform-ref.html", + "==" + ] + ], + {} + ] + ], "marker-external-reference.svg": [ "18dfe41c0f44b3a200d2b1768442b415b6d7c0d8", [ @@ -367544,7 +368078,7 @@ ] ], "small-nested-viewbox.html": [ - "3d9fb8cb45f57cc2e2fcf6293e9ebef5987704ce", + "308835ce5b45bf22920994d9b889e2a8d629c2fc", [ null, [ @@ -369422,6 +369956,32 @@ ] ] }, + "nested-svg-sizing-with-use.svg": [ + "5f3c4eed49024530cf05e0f832877974aa2b9d20", + [ + null, + [ + [ + "/svg/styling/nested-svg-sizing-with-use-expected.svg", + "==" + ] + ], + {} + ] + ], + "nested-svg-sizing.svg": [ + "6c8c45f6d42373d420f752c5d1d9c5ccd8946560", + [ + null, + [ + [ + "/svg/styling/nested-svg-sizing-expected.svg", + "==" + ] + ], + {} + ] + ], "padding-on-svg-via-img.tentative.html": [ "bdb0ce0212268ab0594a7d1a4a3def4b621dadf9", [ @@ -373746,7 +374306,7 @@ [] ], "docker.yml": [ - "06704fff106e8160ae54d66842dd6af6f49444c4", + "12b5adc7ee9d9d5391ff4b21b9a3a2de29a6b02a", [] ], "documentation.yml": [ @@ -373765,20 +374325,24 @@ "4ac2c8b27005a5468482f34364c6387debd9c9cb", [] ], + "pull_request_test_jobs.yml": [ + "4a4f623e84bf746dad558b1f7e6a688bad13a450", + [] + ], "regen_certs.yml": [ "d60c6b04b30800c6ffe2576cc81bb65d28d8d55c", [] ], "safari-wptrunner.yml": [ - "9cfc8a7eeeb56da91aa7456cc7cc36b67af9a73f", + "d90414d524193ff1b6dce932b1d8ce6707e0c897", [] ], "safari_stable.yml": [ - "7c344fe667f7dbf738f114bdc82893c8130e466e", + "4c2acce5c273ea0d90ebb721c0786293523a6c1d", [] ], "safari_technology_preview.yml": [ - "70827a365ac048f374a8f98ecf5d695bc472d78e", + "e2f4c64f46054411458b3a5d21f8cf08b24a8b66", [] ], "update-wasm-tests.yml": [ @@ -374498,11 +375062,11 @@ }, "resources": { "locale-util.js": [ - "cacb11f4f25e04555a4d2a29b9344b19fc79c4d1", + "70a00a5630b79cf40810ee5455db3c463771a5d9", [] ], "util.js": [ - "84507a409e94c58001c0197efb12e63eafab9767", + "eda6a17a24ff7377aa4252e0cc23382972257cc4", [] ] }, @@ -419640,7 +420204,7 @@ [] ], "WEB_FEATURES.yml": [ - "49ecf06d287f792b35b5d58ba28225f6b4bce965", + "1f47ce3fbaf4432b0bd509004339a3a8a61ac5f5", [] ], "abspos-in-clipped-overflow-print-ref.html": [ @@ -433789,6 +434353,10 @@ "flex-gap-decorations-021-ref.html": [ "1e28d73b4e2ce48d62880be1aa66e26f511ab7b1", [] + ], + "flex-gap-decorations-025-ref.html": [ + "d4cbf509854b9b7e8e9e003f0d785635c987cb21", + [] ] }, "grid": { @@ -433931,6 +434499,10 @@ "grid-gap-decorations-042-ref.html": [ "ed44f7a2de37d31d57391731b2b8d7f7886790ad", [] + ], + "grid-gap-decorations-045-ref.html": [ + "b002cf0fb3a3481e476ee6fc5adfed14b8d19f79", + [] ] }, "multicol": { @@ -441361,26 +441933,6 @@ "dca775fcecadf26d115e3961da6affb519b0fdba", [] ], - "scroll-marker-contain-001-ref.tentative.html": [ - "69e9167cc33a2ec61e47ea9c2199141c028424b2", - [] - ], - "scroll-marker-contain-002-ref.tentative.html": [ - "3fa777f7863f1f5e395e3304f6fbd763a9cf206e", - [] - ], - "scroll-marker-contain-003-ref.tentative.html": [ - "09bb93d4ebcefa99f22ae932626bf21c0b6ba528", - [] - ], - "scroll-marker-contain-008-ref.tentative.html": [ - "d74777d3bbf0b230048a17320afa6040a6b8eb62", - [] - ], - "scroll-marker-contain-009-ref.tentative.html": [ - "07b797ff789a382d91ee3207ba0172009bef0c77", - [] - ], "scroll-marker-counters-ref.html": [ "7113a5c5d23a97cf83f173a72ef96b57ecf09263", [] @@ -441445,6 +441997,26 @@ "559ff4e5aa2cffec5966938a824826a41fbc07d8", [] ], + "scroll-target-group-001-ref.html": [ + "ed2cb595c9a24fa916ca74ec2b3ef612109c59c9", + [] + ], + "scroll-target-group-002-ref.html": [ + "8571b11ba6adb78a90eb20467c1f1088edfd313d", + [] + ], + "scroll-target-group-003-ref.html": [ + "09bb93d4ebcefa99f22ae932626bf21c0b6ba528", + [] + ], + "scroll-target-group-008-ref.html": [ + "d2ba909f6445b7a095add1ea10acd2da8ae1f5fa", + [] + ], + "scroll-target-group-009-ref.html": [ + "82fbb988dfa9726a81be6a20bfa5ea28adc0f861", + [] + ], "scrollable-overflow-input-001-ref.html": [ "151843a72c00616dfb7ad723be6b1d3435cde65b", [] @@ -444595,7 +445167,7 @@ [] ], "scroll-start-with-text-fragment-navigation-target.html": [ - "c399a975732125f3792f9786ffc5ac26daaffe20", + "8b9fab966973ba2eca53125d15996a38d9e87230", [] ], "stash.py": [ @@ -449235,7 +449807,7 @@ [] ], "text-autospace-dynamic-text-001-ref.html": [ - "d26fae09b03fc19fc561abcc4ab4487b3be91b3f", + "499f8322fe4b7569b473e411b60955a4fac35a9a", [] ], "text-autospace-edit-001-ref.html": [ @@ -449277,6 +449849,10 @@ "text-autospace-vs-001-ref.html": [ "b02b4f7a20deeffd4f72b8ed8aa5103e3e2e6518", [] + ], + "text-autospace-zh-001-ref.html": [ + "266a69b298e458e0d8d431a6c3a1f13bcf9d2b07", + [] ] }, "text-encoding": { @@ -451466,7 +452042,7 @@ [] ], "text-emphasis-punctuation-2-ref.html": [ - "503e999788c55edf915b1e54ed8627fd22f39c41", + "6d824e73d560940249715614a0fa6872e675980b", [] ], "text-emphasis-punctuation-3-ref.html": [ @@ -456046,6 +456622,14 @@ } }, "nested": { + "group-children-sizing-ref.html": [ + "4f994bd03f67c7e73b03bb58b8eec220cb7720c5", + [] + ], + "group-children-sizing-with-border-ref.html": [ + "f1a484400e77b69372808af4d40c376c9a00aa14", + [] + ], "nested-opacity-ref.html": [ "7db20046e030aaa08582d44e3024cafe93f3fb2a", [] @@ -459885,6 +460469,10 @@ "3f57da1f706696789525adf24c6a9519850cd9ea", [] ], + "css-backdrop-filter-transform-clip-ref.html": [ + "73cfab22e7dbab00ad83c2e74faf0ffac1c6db2e", + [] + ], "css-backdrop-filters-animation-blur-ref.html": [ "643d084cecde6353a993013eaba93455bd9bd899", [] @@ -462249,7 +462837,7 @@ [] ], "refresh_session.py": [ - "d05340a318ce6bd0183d157e55db136fa5d98156", + "ab491e30104202d61857d976eb49d927a8a96a7c", [] ], "request_early_challenge.py": [ @@ -462269,7 +462857,7 @@ [] ], "start_session.py": [ - "b9d745e3ed60f900dadd077817da87a6675ccf1d", + "d2b7ee878188e0c928959445cc7722f5725e0da1", [] ], "verify_authenticated.py": [ @@ -465639,6 +466227,10 @@ "78d241cda952bccdeff05653f0cc7311afa73710", [] ], + "login_delay.html": [ + "469a7ee5cbe75fb842bcd247af6cba1963e6df86", + [] + ], "manifest-not-in-list.json": [ "00700666675413d378bba7c3f8bed12f2b9b4849", [] @@ -465679,6 +466271,10 @@ "e098cc4511a1980392097d0a26c020db3243ae35", [] ], + "manifest_no_accounts_login_delay.json": [ + "030e4a85bfa83927c2f2c2ac2c6ec6ecb9f48619", + [] + ], "manifest_no_login_url.json": [ "15a657c679df7b0dfb0be1058e7086b439781762", [] @@ -467577,11 +468173,11 @@ }, "resources": { "fetch-later-helper.js": [ - "ef1d7090a8f5e6f81d0db9572d7d2d4cc8dd7658", + "32220ae39e3e3abf3c8a69c584289a222e7e422b", [] ], "fetch-later.html": [ - "b295be116c731c5ceec2d222ecd999fc5342d5c6", + "955f815d940bf853a9c84a367bf2023d9738e1a0", [] ], "get_beacon.py": [ @@ -467676,20 +468272,20 @@ [] ], "resources": { - "fetch-private-http.html": [ - "517629b758e89d4e07f2278d0ae7cb1a45b19c17", + "fetch-local-http.html": [ + "dcad775bfece90756358236ff9d87cb924a2cb13", [] ], - "fetch-private.html": [ - "b96a207ec33a13e5dd4c53083ac3d73123b23cbb", + "fetch-local.html": [ + "bc12e2660bc65cfffa3b322a86d1bbf7b22471ed", [] ], "fetch-public-http-wrong-address-space.html": [ - "c15a87ff7b9206576710b5763a64ac6a9a704d71", + "fb306f99d3c8269a09109bcd4f473dd55adf52ba", [] ], "support.sub.js": [ - "6b7813fa89d3fd022840518e21bf275560a6295a", + "09e234c5f24218f556109881f50c6551286e252f", [] ], "target.py": [ @@ -470833,7 +471429,7 @@ [] ], "remote-context-helper.js": [ - "6c88b49fd4a0fdc4f1fe315ca2a85183a7c1a3d9", + "0181394f32dfcdc7e010277935f6c60692fb3b8f", [] ] } @@ -473613,7 +474209,7 @@ }, "imagebitmap": { "common.sub.js": [ - "525d28553aa0a6725db234df1dce1536b917ffd8", + "160a0cbf9ac373994a7bfbe56ef5aa2f4bf9c3f7", [] ], "createImageBitmap-worker.js": [ @@ -481153,6 +481749,24 @@ ] }, "the-select-element": { + "customizable-select": { + "min-height-in-flex-ref.html": [ + "04c000ad5ada7efadc135bb504c0a4deaa48f2b0", + [] + ], + "min-size-empty-001-notref.html": [ + "422f187dc69483030a213974aedbd5ca9694b46a", + [] + ], + "min-size-empty-002-notref.html": [ + "0500b54b75869ab1b1e509c5b8d513557fa91bba", + [] + ], + "min-width-in-flex-ref.html": [ + "33df77bd0f14c62891e7df494b892df28a1145a0", + [] + ] + }, "select-1-block-size-001-ref-2.html": [ "52461231862cfc998ccdb7ce9423d54b59d9e17e", [] @@ -483339,6 +483953,10 @@ ] } }, + "list-box-important-colors-ref.html": [ + "8e75a4e21e8966713245299f515608aa4666843e", + [] + ], "reset-algorithm-rendering-ref.html": [ "acf192d1d55b7da110d04651093e3ebe0cd48214", [] @@ -483823,8 +484441,16 @@ [] ], "permission-icon": { + "icon-css-property-max-height-reftest-ref.html": [ + "abda1adc1d88d6eb05c8daa49e5328158113159f", + [] + ], + "icon-css-property-stroke-width-reftest-ref.html": [ + "5ed8af57313a89d99644325bc3e2548b2c48416d", + [] + ], "standard-location-permission-element-ref.html": [ - "15ffe751c51b3f8caeaa8b93f1286a3950c9a815", + "d9f55b345f74aef0b5d1879e2919ea7f2bc0ae32", [] ] }, @@ -487683,7 +488309,7 @@ [] ], "pattern.webm": [ - "7cd3d31155723f61fc8678922c1626e1c7e99500", + "8b7ff388b8811952953eb75c10efef8f9c9ceef6", [] ], "red-16x16.png": [ @@ -488917,7 +489543,7 @@ [] ], "crash-reporting.idl": [ - "6eaee138a828f7749026458265e7db598822330f", + "ba21afcf39718207fe8f56308adc18f9287b9e88", [] ], "credential-management.idl": [ @@ -489069,7 +489695,7 @@ [] ], "cssom-view.idl": [ - "88abb078485fc2159c15b5401dc9944d47a47940", + "160c27ca05046cf543ecb575019826f2e9379a78", [] ], "cssom.idl": [ @@ -489121,7 +489747,7 @@ [] ], "element-timing.idl": [ - "ef73ca6c0f610ff8cdb14a8bd0859efb8eca743b", + "4f42823704a42d9c40beed4cce8ec9824cfcd65e", [] ], "encoding.idl": [ @@ -489229,7 +489855,7 @@ [] ], "html.idl": [ - "9c84e6a67efa4f7ffe6f9638c582af4424c473db", + "3a7dce9693ef3ecaaf1ea274029663b8068c4222", [] ], "idle-detection.idl": [ @@ -489493,7 +490119,7 @@ [] ], "privacy-preserving-attribution.idl": [ - "0ab5d0fc21e49d2140ee014819debc26998473ef", + "02a3579820469e72913220ce4e6086d486c33d28", [] ], "private-aggregation-api.idl": [ @@ -489549,7 +490175,7 @@ [] ], "resource-timing.idl": [ - "66f2841d744af3a39a55c907c739a9f1bb92aff0", + "499d27b6ee69b984ad57c66c929352be1eb17ab7", [] ], "saa-non-cookie-storage.idl": [ @@ -489568,12 +490194,8 @@ "6f93db15a74e052913a277e5130226280a3f9311", [] ], - "scoped-custom-elements-registry.idl": [ - "46ca2d6b9c45805d8aa684af7fe91af6dd5d7919", - [] - ], "screen-capture.idl": [ - "db9282ce0a57bb3b84ea45f5ed2d7e69bc3a8a32", + "eb5685eee4117d03d2b6dbad15edf430c1c2cac4", [] ], "screen-orientation.idl": [ @@ -489593,7 +490215,7 @@ [] ], "secure-payment-confirmation.idl": [ - "5b67ca6267839c4c54ba75c55a9da03231642303", + "0a2207684ec71074ffea786bf459b6073799e8d3", [] ], "selection-api.idl": [ @@ -489621,7 +490243,7 @@ [] ], "speech-api.idl": [ - "94a416f262b361e326c5b3c89fa8d160c1118b48", + "9620e60dc5057b5f48100bc4563d01aaf174d303", [] ], "sri.idl": [ @@ -489717,7 +490339,7 @@ [] ], "wai-aria.idl": [ - "deebc5626e2a925c4b7c7bad92c8492ebb4dcb08", + "3364bc9a76936b1eed3873af339e5c11feb10458", [] ], "wasm-js-api.idl": [ @@ -489729,7 +490351,7 @@ [] ], "web-animations-2.idl": [ - "c4a0c2532d97806eeead38d1e1924c485d775491", + "f18cdd4f4583d959119a07e4248e94210fad1036", [] ], "web-animations.idl": [ @@ -489825,7 +490447,7 @@ [] ], "webgpu.idl": [ - "4fec46a2557033a941b5da7a7481aa8125696ed2", + "1fc896c6b1625f13c6ed00ce14a34ce1dfa4db88", [] ], "webhid.idl": [ @@ -489941,7 +490563,7 @@ [] ], "writing-assistance-apis.idl": [ - "916daee754e3ef992ad8fa282882c88dd9aa0734", + "82acfdb48e2d3a051ae0e43d6d34355cf8259ae3", [] ], "xhr.idl": [ @@ -490306,7 +490928,7 @@ } }, "lint.ignore": [ - "60b0f65a6f43a560c5d86ffe937359d5c9717597", + "cf83e458213668188c73dc0b98048be24c31ffe4", [] ], "loading": { @@ -497706,7 +498328,7 @@ [] ], "conftest.py": [ - "1301e7a9f7701d40390ad19d9439d7d95bfc9ebc", + "0b67ca76761a9c59b56bba083f36489c56225016", [] ], "harness.html": [ @@ -499868,6 +500490,10 @@ "f43598e41c1acd8b425e6f07cbbbdb6eefb0d615", [] ], + "add-routes.js": [ + "796acd19c12f4f79b587fa816516ed5e0993da31", + [] + ], "basic-module-2.js": [ "189b1c87fee75c86ca08351872e402b84b8b844f", [] @@ -502424,7 +503050,7 @@ [] ], "soft-navigation-helper.js": [ - "5860738225b8ed03a2063b1c2b9eef7884f33ee5", + "4bc16b44e00097ce2e3ee63ac7d64c14db565b7a", [] ], "soft-navigation-test-helper.js": [ @@ -502569,7 +503195,7 @@ [] ], "background-sync.https.html": [ - "dd452aa34518c08b02340bec0469e830b60745de", + "6589b69b22f9d72baece7393b0cbe3bb264b162d", [] ], "battery-status.https.html": [ @@ -502937,7 +503563,7 @@ [] ], "utils.js": [ - "259f71f6a70c7f07e65c7620f5fafeb810e2de6f", + "e8397042e7f53a56da6c34a166dae00ad535b065", [] ], "wake-lock.https.html": [ @@ -503012,7 +503638,7 @@ }, "resources": { "utils.js": [ - "cb72f4468132896689de081ce45a1da97b48923d", + "f2fc21691133a0c7dd47d1469dabfda69d10e6c6", [] ] }, @@ -503982,6 +504608,10 @@ "120941444a4898197d6b6001f9908a6cd48b62ba", [] ], + "marker-context-fill-transform-ref.html": [ + "78117251a36ec26b26c74e40dc4bf822902bb38f", + [] + ], "marker-path-001-ref.svg": [ "202ac3420dc080f85c4a2cac5e13ccbea6d0235e", [] @@ -504098,6 +504728,14 @@ "resources.svg": [ "85b6833a6601a45d1847320efb7259080cba5359", [] + ], + "svg-marker-context-paint.svg": [ + "8c97058d71ee7a055f221f21e3fdc3f2adab3777", + [] + ], + "svg-marker-ref.svg": [ + "1e823431105069ea997566360358515fb29e1414", + [] ] } }, @@ -504561,6 +505199,14 @@ [] ] }, + "nested-svg-sizing-expected.svg": [ + "a8fa5211842b3a351660e047626517aeafe960b5", + [] + ], + "nested-svg-sizing-with-use-expected.svg": [ + "daef973aa5d1b0ae0a5c29cc3d94e8f893273ace", + [] + ], "padding-on-svg-via-img-ref.tentative.html": [ "37608e4b823b7b9e9a4cf9a1cc14bc00b23ae845", [] @@ -504853,7 +505499,7 @@ [] ], "META.yml": [ - "db7d4d786b4051882dc31aae67456a71848e33e3", + "b204d814921de6370dc74599491425eef2a355f7", [] ], "__init__.py": [ @@ -505006,7 +505652,7 @@ [] ], "jobs.py": [ - "be600ee397472dc0f4c9175dfd467dc89f08d3cb", + "f18cd66e42048fed58360fcdb2b00e503d0d8b4f", [] ], "macos_color_profile.py": [ @@ -515999,7 +516645,7 @@ ] }, "client.py": [ - "5a54bf66ac6bf58bf2953bc99cabfd966c91907c", + "f4e6259d547a662a42e01eb94034732e5782c530", [] ], "error.py": [ @@ -516352,7 +516998,7 @@ [] ], "firefox.py": [ - "f8629878213f3d00c90858e945bacb08cd30ced7", + "e5635c361cc75fff518233421cdd9ace8eba167c", [] ], "firefox_android.py": [ @@ -516432,7 +517078,7 @@ [] ], "base.py": [ - "76d703e78299c0e9728d18deed08f1b4e8c44908", + "4efe1660eb48816c22f7d4528fcccebf271349a1", [] ], "executorchrome.py": [ @@ -516583,7 +517229,7 @@ [] ], "testdriver-extra.js": [ - "3c2dd8b42dd5b572841b5b5529b42a17f724cef9", + "2a5bb3937fdd57b7223b09c9b881e17527e023a1", [] ], "testdriver-vendor.js": [ @@ -517404,7 +518050,7 @@ [] ], "csp-violations.js": [ - "46c2ca1b30f33bec538b2245ed8e9a8c1a1b7c6d", + "bc38da9e2210c2882cb70f1313e1cfd3b7bda245", [] ], "event-handler-attributes.mjs": [ @@ -517419,6 +518065,10 @@ "b680256b7a260655a1d90a63ea624725f23b43c3", [] ], + "logMessage-module.sub.js": [ + "e886bd54b31b577234a95bd00636365eb2836aa3", + [] + ], "namespaces.js": [ "72271293baea3f57deeec54a540235005b3912cc", [] @@ -517443,6 +518093,14 @@ "8449dd202b6c76d1830dc348fc84ef927baae9f4", [] ], + "passthroughpolicy.js": [ + "efe3ea62c0dd9eae79c03e9de6a5643fc76c16d6", + [] + ], + "script-messages.js": [ + "ad4138be25b9120ea7879438a437aa869cc2d309", + [] + ], "send-plain-string-to-trusted-type-sink.html": [ "73b297a7205e40f575a1e040c7fb501945d5a14f", [] @@ -553914,14 +554572,14 @@ ] ], "detector-locale.https.window.js": [ - "80cbfa485e3944ba13de2aec3ba317e2cc84026f", + "1e2efd11c6204421b24a240d9b159a9983a13039", [ "ai/language_detection/detector-locale.https.window.html", { "script_metadata": [ [ "title", - "Detect english" + "LanguageDetector locale tests" ], [ "global", @@ -553953,7 +554611,7 @@ ] ], "detector.https.window.js": [ - "379b87415347a1980209fb471d9b1ccb78ccd032", + "ae21b4635383772032a0b979932679895b06e2bd", [ "ai/language_detection/detector.https.window.html", { @@ -554554,14 +555212,14 @@ ] ], "translator-locale.https.window.js": [ - "73e7eff20d211c9eefcffd25b123920bdd35275c", + "27dd260557605d5b1a048fc0be5f6ca585b7289d", [ "ai/translator/translator-locale.https.window.html", { "script_metadata": [ [ "title", - "Detect english" + "Translator locale tests" ], [ "global", @@ -554592,15 +555250,15 @@ } ] ], - "translator.optional.https.window.js": [ - "2a4c5a6c5dd3cd8b2fea087aa910428c2a3041bf", + "translator.https.window.js": [ + "722430fe631c8b625ad95511b3ced26a770888c4", [ - "ai/translator/translator.optional.https.window.html", + "ai/translator/translator.https.window.html", { "script_metadata": [ [ "title", - "Translator Translate" + "Translator tests" ], [ "global", @@ -554616,7 +555274,38 @@ ], [ "script", - "../resources/language_codes.js" + "/resources/testdriver.js" + ], + [ + "script", + "resources/util.js" + ] + ], + "timeout": "long" + } + ] + ], + "translator.optional.https.window.js": [ + "ce01efed14399414c3617e0677c1f720b4cc872a", + [ + "ai/translator/translator.optional.https.window.html", + { + "script_metadata": [ + [ + "title", + "Optional Translator tests" + ], + [ + "global", + "window" + ], + [ + "timeout", + "long" + ], + [ + "script", + "../resources/util.js" ], [ "script", @@ -580720,6 +581409,13 @@ {} ] ], + "anchor-function-pseudo-element-basic.html": [ + "70977ca4c406e7ff405f42059ca8b2913f7a44ec", + [ + null, + {} + ] + ], "anchor-getComputedStyle-001.html": [ "7c2cbbb67955db11eef9874744d333e07bc45172", [ @@ -585659,7 +586355,7 @@ ] ], "scope-visited-cssom.html": [ - "aba4b752b2f04d84e6816df83a08ba0b282e1a6f", + "3dc29da6dd3e38ad62d5793722e2f8c12c12beef", [ null, {} @@ -588092,7 +588788,7 @@ ] ], "contain-invalid.html": [ - "9f96bbc2fed11a6db4516442e68393672c7a4356", + "d73e4b4c357c2eea7a23a8628e44e87431e4351d", [ null, {} @@ -588104,6 +588800,13 @@ null, {} ] + ], + "contain-valid.tentative.html": [ + "da358741b7b30d30eb5793c7fec64387170bfe17", + [ + null, + {} + ] ] } }, @@ -596275,7 +596978,7 @@ ] ], "Highlight-setlike.html": [ - "0093f9be232b5544c635ee343e660c4ee4b489e8", + "26b30d2a0be97e842981d8507bb84bed2d2e41d6", [ null, {} @@ -596324,7 +597027,7 @@ ] ], "HighlightRegistry-maplike.html": [ - "d8bbe4731f6a332efbf223bd69d48244d95560ca", + "50fccd2347d92607c1da94c5a30a3a94a40a243a", [ null, {} @@ -597968,7 +598671,7 @@ {} ] ], - "clip-path-interpolation-shape-control-points.tentative.html": [ + "clip-path-interpolation-shape-control-points.html": [ "03545a155835d3a5200ea37e7626221451789765", [ null, @@ -599583,6 +600286,13 @@ {} ] ], + "overflow-rtl-scroll-left.html": [ + "0c837737546a2ffbc21d29d4f95630bea706aed0", + [ + null, + {} + ] + ], "overflow-shorthand-001.html": [ "f425636c3bb4297e4e6564d1c2629dc10dde5607", [ @@ -599689,6 +600399,29 @@ {} ] ], + "parsing": { + "scroll-target-group-computed.html": [ + "589ae8835da2ddc75490d2d2a53f86e2ffd7722f", + [ + null, + {} + ] + ], + "scroll-target-group-invalid.html": [ + "ac6a6fa3191f8de193d06bb70f1fd16d019b7ef7", + [ + null, + {} + ] + ], + "scroll-target-group-valid.html": [ + "0da79fc118cbda6333fca3442333ccdb4d8c7797", + [ + null, + {} + ] + ] + }, "scroll-buttons-invalid.html": [ "a7306df84d6bd9695ec389a3dfa58e2c97065fe6", [ @@ -605434,21 +606167,21 @@ {} ] ], - "shape-function-computed.tentative.html": [ + "shape-function-computed.html": [ "a87bc2391a882930d9e068e79a2c831b2fad6f53", [ null, {} ] ], - "shape-function-invalid.tentative.html": [ + "shape-function-invalid.html": [ "9abe483c703119d87dda5a15535aad07e89d81f7", [ null, {} ] ], - "shape-function-valid.tentative.html": [ + "shape-function-valid.html": [ "2372290cb69f8b22b3ab764ff088bc7bb8984125", [ null, @@ -606994,6 +607727,41 @@ {} ] ], + "flex-line-001.html": [ + "04c12f20cdadf643c4e2c285680f7f44f2bf8913", + [ + null, + {} + ] + ], + "flex-line-002.html": [ + "232554d7eaf37f9a23d6c3543ad4874c00f54b3c", + [ + null, + {} + ] + ], + "flex-line-003.html": [ + "9aeb014ac1621d150cf33b4f569a06930e66af1b", + [ + null, + {} + ] + ], + "flex-line-004.html": [ + "4be0d02c393dd68594fd05c073b6f9472dd712a3", + [ + null, + {} + ] + ], + "flex-line-005.html": [ + "99cd331049260b71f32fbbd1d6f28702f96ec4b5", + [ + null, + {} + ] + ], "indefinite-1.html": [ "e69689c939f42b330f68eaa2ae07885557f65657", [ @@ -609796,7 +610564,7 @@ ] ], "css-text-line-break-zh-in-loose.html": [ - "56fec0bd3edba1ee681a0dc6ae906120f28c6677", + "54ce3c15735fd74f607029639e103ec5cd2c1b23", [ null, {} @@ -610183,7 +610951,7 @@ ] ], "text-autospace-computed.html": [ - "9656f70956e01304629368fd488d83310428b5ef", + "c8a4091eb99c19bb4355a8ed10a4f14a24fdbf39", [ null, {} @@ -610267,7 +611035,7 @@ ] ], "text-spacing-computed.html": [ - "845cf075a9b91cd1ebf59a3723db0c41714e7afc", + "2ba02e87c9f34291c1b997b4c802e718a5dbc82e", [ null, {} @@ -615969,7 +616737,7 @@ ] ], "acos-asin-atan-atan2-invalid.html": [ - "727fc4df18a59df19f1f90b37bd96e76d50359f6", + "5f894e35a56c910af74d0dedae6e40dbafa51257", [ null, {} @@ -618029,7 +618797,7 @@ ] }, "no-crash-set-exception.html": [ - "cc401b8bd6f91e7f98e628950827011908208585", + "b57fce0d73f27878efe733877201f05df9239bf0", [ null, {} @@ -618203,7 +618971,7 @@ ] ], "pseudo-computed-style-stays-in-sync-with-new-element.html": [ - "0a34a4b73ff0051f48445d7b461ef21fae04881b", + "9914097185b9c0b42f80835a24ab28061eb844af", [ null, {} @@ -618266,6 +619034,13 @@ {} ] ], + "contain-view-transition-name-discovery.html": [ + "10a1a1197b10a76f239f85339286d1245b22e2a0", + [ + null, + {} + ] + ], "display-none-during-transition.html": [ "f94d6f7fd76af7a889e5a9a1cf6fc6538377eb0e", [ @@ -621725,6 +622500,13 @@ {} ] ], + "drop-shadow-currentcolor-inheritance.html": [ + "92cf94e29b09037108c9f98c0c673a458d2957d7", + [ + null, + {} + ] + ], "filter-sign-function.html": [ "97e5a26073b097728cf4571712bb9bd472ed69fd", [ @@ -625439,24 +626221,6 @@ {} ] ], - "idlharness.window.js": [ - "b2727e3a8742a791ba51fabf0de02c744ae0d732", - [ - "custom-elements/registries/idlharness.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/WebIDLParser.js" - ], - [ - "script", - "/resources/idlharness.js" - ] - ] - } - ] - ], "initial-about-blank.window.js": [ "b3bb7e139b5c543bae2d4cc86d3f5ebe1fe197f1", [ @@ -625512,6 +626276,13 @@ null, {} ] + ], + "valid-custom-element-names.tentative.html": [ + "72a5999e3a9a76bd35b3f17402cf13f6ef43dc4d", + [ + null, + {} + ] ] }, "scoped-registry-initialize.html": [ @@ -630595,6 +631366,15 @@ ] ] }, + "name-validation.tentative.html": [ + "ca5e9c118248990c6ea629eafa41a331d79539a6", + [ + null, + { + "timeout": "long" + } + ] + ], "prepend-on-Document.html": [ "1d6d43a46392650796cbcaae413f7ad630633a57", [ @@ -652634,6 +653414,15 @@ } ] ], + "idp-login-with-failed-accounts-fetch.https.html": [ + "75d2c589b1d1fe5d39d0c52b9732976b9bdf4e32", + [ + null, + { + "testdriver": true + } + ] + ], "logged-out.https.html": [ "51c7c1a710b5e3d9cca1783d031350a5e98b6d4a", [ @@ -666501,7 +667290,7 @@ }, "local-network-access": { "fetch.tentative.https.html": [ - "ac2c3cca28eaf2c0a36d3350aa92d87d1ba75b34", + "b783269207b8906c2739f9b720f2bf517b1e437e", [ null, { @@ -686471,6 +687260,15 @@ } ] ], + "remove-first-sibling.html": [ + "be1f501afff701c57f71bc5441d59bf69b88a482", + [ + null, + { + "testdriver": true + } + ] + ], "remove-first.html": [ "ff1b251271c9cfd9b9ef2dbe432e7cb41d97c737", [ @@ -686480,6 +687278,15 @@ } ] ], + "remove-last-sibling.html": [ + "f893a3f9d5a35d3300d7677cd8944399e81bae9c", + [ + null, + { + "testdriver": true + } + ] + ], "remove-last.html": [ "72e7ed850aeef510642cac2ac546bd66698d9870", [ @@ -700601,6 +701408,47 @@ {} ] ], + "createImageBitmap-resolves-in-task.any.js": [ + "0d2ddf5855eba935a495819bcbea22570903d8ce", + [ + "html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.html", + { + "script_metadata": [ + [ + "title", + "createImageBitmap resolves in a task" + ], + [ + "script", + "/common/media.js" + ], + [ + "script", + "./common.sub.js" + ] + ] + } + ], + [ + "html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.worker.html", + { + "script_metadata": [ + [ + "title", + "createImageBitmap resolves in a task" + ], + [ + "script", + "/common/media.js" + ], + [ + "script", + "./common.sub.js" + ] + ] + } + ] + ], "createImageBitmap-serializable.html": [ "c185cd9cbd9c4964fac8a1f9d0a899d945a206c7", [ @@ -727705,7 +728553,7 @@ }, "processing-model": { "focus-fixup-rule-one-no-dialogs.html": [ - "2413fe266737720d6c3155c4c298d193ae6311fa", + "5471e8e9ec1ccfd3b75b20dbd7bf22ebb6518c32", [ null, {} @@ -734584,8 +735432,8 @@ {} ] ], - "naturalWidth-naturalHeight-unavailable.tentative.html": [ - "ae6fa0e432853d111aa63bd87f43206acec86024", + "naturalWidth-naturalHeight-width-height.tentative.html": [ + "c10a942069c775c3470a34d9fe1465267b100813", [ null, {} @@ -738110,7 +738958,7 @@ } ] ], - "details-toggle-source.tentative.html": [ + "details-toggle-source.html": [ "1a571f5441449a964bf9aea27246ef13f937944c", [ null, @@ -738508,8 +739356,8 @@ {} ] ], - "dialog-toggle-source.tentative.html": [ - "7e6fe25dabf79d9430fcfa98afe83f3520d62686", + "dialog-toggle-source.html": [ + "130d76451da4f26788cc08c10a910487b426aaac", [ null, { @@ -739040,7 +739888,7 @@ }, "permission-element": { "bounded-css-properties.tentative.html": [ - "9678286179ac494d92864836f4bb09e809e3382a", + "1455ba98bb31a5a07b701b9861ce8149dd5b3fe8", [ null, {} @@ -739546,7 +740394,7 @@ {} ] ], - "popover-toggle-source.tentative.html": [ + "popover-toggle-source.html": [ "00ced8f7070aa4ac677c7fc0a64b3b150f95039b", [ null, @@ -744396,6 +745244,15 @@ } ] ], + "interesttarget-invoker-descendants.tentative.html": [ + "d976c0eb011d4240d162418df077c412db5fb9b1", + [ + null, + { + "testdriver": true + } + ] + ], "interesttarget-keyboard-behavior.tentative.html": [ "997c2b9382508902ae2025bb4f71d6f2de0f56f5", [ @@ -767564,7 +768421,7 @@ ] ], "idlharness.window.js": [ - "049f0f18f1be64ad5d250f045b0dda3edbc931a4", + "9843a604b80dc7967798dcdc85df16e4f32041ef", [ "paint-timing/idlharness.window.html", { @@ -773206,7 +774063,7 @@ ] ], "pointerevent_click_during_parent_capture.html": [ - "f25e61aade3abb3d95185e4981b4740f15bfab52", + "fd6de4d0899ad5ed397fdd7f84f88d7f0a376855", [ "pointerevents/pointerevent_click_during_parent_capture.html?pointerType=mouse&preventDefault=", { @@ -791672,6 +792529,13 @@ }, "scroll-animations": { "animation-trigger": { + "animation-trigger-addAnimation.tentative.html": [ + "71fedebbcea1b54a67343045650c6372703b1114", + [ + null, + {} + ] + ], "animation-trigger-alternate.tentative.html": [ "aa92e32c5628392813cd576b64eb2bb32129e2ef", [ @@ -791693,6 +792557,20 @@ {} ] ], + "animation-trigger-multiple-animations.tentative.html": [ + "6914cb09b89c24263f9bc13cdeb3b7bc0d99501c", + [ + null, + {} + ] + ], + "animation-trigger-multiple-triggers.tentative.html": [ + "5fccdf27550946564faf774c14cdc6e74b37d125", + [ + null, + {} + ] + ], "animation-trigger-once-play-state.tentative.html": [ "23c6aa8ce9f697cab4121e713556b544cb4202cf", [ @@ -791720,13 +792598,6 @@ null, {} ] - ], - "animation-trigger.html": [ - "7506fb05829d8d2c84dbaf3915a9e08314302af1", - [ - null, - {} - ] ] }, "css": { @@ -795675,6 +796546,13 @@ {} ] ], + "add-routes.https.html": [ + "fbab7cdedfa388d8dbd47e1887beb2a02fd18721", + [ + null, + {} + ] + ], "claim-affect-other-registration.https.html": [ "52555ac271b5bad279ab37352c9d9937c780909a", [ @@ -800804,7 +801682,7 @@ "detection": { "tentative": { "racing-soft-navigations.html": [ - "d485f90813471704ffa62ce362b3d4517e41bec1", + "b513ff4f99bf8d3714fc8b6f12909747ca4fd549", [ null, { @@ -800814,6 +801692,54 @@ ] } }, + "dom": { + "tentative": { + "distant-leaf.window.js": [ + "c599985a2a29de4fe9472dddfce9ce6c1d95116e", + [ + "soft-navigation-heuristics/dom/tentative/distant-leaf.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "../../resources/soft-navigation-test-helper.js" + ] + ] + } + ] + ], + "insert-image-div-before.window.js": [ + "19e8a397c348be1f91b654ab48a93e4f2badfd93", + [ + "soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "../../resources/soft-navigation-test-helper.js" + ] + ] + } + ] + ] + } + }, "dropped-entries.tentative.html": [ "d27ad452be07b778aea1aff5525d1670fb66ec5f", [ @@ -800842,6 +801768,28 @@ } ] ], + "history": { + "tentative": { + "navigation-api-prevent-default.window.js": [ + "3df2192f560c8dfb5c85c0a956b3f80e4bae8d31", + [ + "soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ] + ] + } + ] + ] + } + }, "image-lcp-followed-by-image-softnav-lcp.tentative.html": [ "7a2018d20ee811ff1ec9ca88c80038b0f1239874", [ @@ -800960,15 +801908,6 @@ } ] ], - "navigation-api-preventDefault.tentative.html": [ - "b7b2a24c94203080d052411f080a0dd3c0d11cbe", - [ - null, - { - "testdriver": true - } - ] - ], "navigation-api-rejected.tentative.html": [ "693f876b6e188b4c8ec8531aa7723c6afada70af", [ @@ -801006,7 +801945,7 @@ ] ], "popstate-multiple-backs.tentative.html": [ - "fd87f5f03e753b3ac5a8d8268a76496d93c15969", + "a460b922eb798f61825b18e2802560056722628c", [ null, { @@ -801079,6 +802018,13 @@ } ] ], + "supported-entry-types.window.js": [ + "50e22df0f3ef666ed93d343d9cef91b56e00cf84", + [ + "soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.html", + {} + ] + ], "task-attribution.html": [ "0c27fbb06058b3fb949e609dee9ea857a9682d27", [ @@ -801171,13 +802117,6 @@ } ] ], - "supported-entry-types.tentative.html": [ - "4ab408e10b1e504961715779d3f08e70f37dc665", - [ - null, - {} - ] - ], "text-lcp-followed-by-anim-image-softnav-lcp.tentative.html": [ "b34a6e81a58333c61ccedb4e25551feba4893736", [ @@ -801216,6 +802155,21 @@ ] }, "speculation-rules": { + "invalid-rules.https.html": [ + "d887c6cafc88fc629b86ba86c1882673bd36b682", + [ + "speculation-rules/invalid-rules.https.html?prefetch", + { + "timeout": "long" + } + ], + [ + "speculation-rules/invalid-rules.https.html?prerender", + { + "timeout": "long" + } + ] + ], "prefetch": { "anonymous-client.https.html": [ "902724cdb0e08e603d0d41566a2fe889646088f0", @@ -801224,8 +802178,8 @@ {} ] ], - "clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html": [ - "48f6264e852b0e32e6be06367e16b27f7cc6d14b", + "clear-prefetch-cache-after-clear-site-data-cache.https.html": [ + "79078d30ab6dc1ce6aab1d4386bd44d00db1b72a", [ null, {} @@ -801457,13 +802411,6 @@ } ] ], - "invalid-rules.https.html": [ - "0fdfacde643958093d4b190f5bb8a5bfa733e47d", - [ - null, - {} - ] - ], "multiple-url.https.html": [ "34a8817a98213d50bc8c129356fc92fc6ca97d2a", [ @@ -802327,7 +803274,7 @@ ] ], "activation-start.https.html": [ - "7aee20c3465dcfb02e370ada84b62af6e99f35d0", + "a26af01161404cb98773a151f605668be2b65a0b", [ null, { @@ -802353,8 +803300,8 @@ } ] ], - "cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html": [ - "db52e758750f2757f722c025e3accf6fce13a9cc", + "cancel-prerendering-after-clear-site-data-cache-different-origins.https.html": [ + "c18df9e0cd9be13f69cd4e438901b075327c43cc", [ null, { @@ -802362,8 +803309,8 @@ } ] ], - "cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html": [ - "23d862c5130139bc5e20242e73cb8d2e4a93e332", + "cancel-prerendering-after-clear-site-data-cache-same-origin.https.html": [ + "a2668fc3bcac6e744ee171b8bb7b0f7752ce7c5c", [ null, { @@ -802390,7 +803337,7 @@ ] ], "credentialed-prerender-not-opt-in.https.html": [ - "697382a6dc8569600a34f866288f4a2405d62188", + "a02a2860990f50eb4b802d4dd0856d8a8acac3c2", [ null, { @@ -802399,7 +803346,7 @@ ] ], "credentialed-prerender-opt-in.https.html": [ - "91626bafce677b96fef8115a1a90ca533dd31482", + "c309abd2c6da89c47c0518986558639ffeb0d110", [ null, { @@ -802537,7 +803484,7 @@ ] ], "headers.https.html": [ - "2ef6b5ce072866d3c88ce7a86fcea6436de3364a", + "e05f72434e4f279c2fbd0efacda161bfdbe2c80c", [ null, { @@ -802597,7 +803544,7 @@ ] ], "navigation-api-location-replace.https.html": [ - "e3ecf1b72b61f5cfbb610906c2c4049ace2d51eb", + "3b4fb4195ca432cbce42ffedf09bb3efd5bc6daf", [ null, { @@ -802606,7 +803553,7 @@ ] ], "navigation-api-multiple-entries.https.html": [ - "e8e0f874597081ca12e653e04c3c9c43716778cf", + "060091e171e26e5a84fd99d5fde1dddf50d9321d", [ null, { @@ -802615,7 +803562,7 @@ ] ], "navigation-api.https.html": [ - "fd25e94b5b32d56faac7875f88f48fe484cde3d0", + "c6ee974271699e9f063f546d33beb1c83477fb23", [ null, { @@ -803058,7 +804005,7 @@ ] ], "referrer-policy-mismatch.https.html": [ - "fa2d424660a3674ba7c7db7a248df70ba6acde73", + "09cd98eb243e791902d926dfeada4cb7a54c8ddd", [ null, { @@ -803237,17 +804184,17 @@ } ] ], - "restriction-background-sync.tentative.https.html": [ + "restriction-background-sync.https.html": [ "53dbb56d99fc34c7c81fd259d3b819a066db7eb7", [ - "speculation-rules/prerender/restriction-background-sync.tentative.https.html?target_hint=_blank", + "speculation-rules/prerender/restriction-background-sync.https.html?target_hint=_blank", { "testdriver": true, "timeout": "long" } ], [ - "speculation-rules/prerender/restriction-background-sync.tentative.https.html?target_hint=_self", + "speculation-rules/prerender/restriction-background-sync.https.html?target_hint=_self", { "testdriver": true, "timeout": "long" @@ -803832,15 +804779,6 @@ } ] ], - "script-supports-speculationrules.https.html": [ - "2dc856fce5da7c8fa2fb24a8df70348fe5aa84e8", - [ - null, - { - "timeout": "long" - } - ] - ], "send-beacon.https.html": [ "34843efcde78c5338116ab2ae2dfbfab023df389", [ @@ -803938,7 +804876,7 @@ ] ], "visibility-state.https.html": [ - "e9e8548c4f686bd55b56210f8b9dd94d5900f7fa", + "8ab18113fda4416f43dd878e6f49fa0f4065810b", [ null, { @@ -803992,6 +804930,13 @@ ] ] }, + "script-supports.https.html": [ + "7446f2b6b5f2f8e1caecb09a9274abb1052c03bf", + [ + null, + {} + ] + ], "speculation-tags": { "cross-site-prefetch.https.html": [ "b10aecf40350cf9849b6e36e577a29cd9100ee64", @@ -804054,7 +804999,7 @@ ] ], "no-tags.https.html": [ - "176b3d20bb259e15692228266760ccd679c91429", + "088f0ba66b5177d0388777d472e3bf97895e9fd2", [ null, { @@ -804131,14 +805076,14 @@ }, "speech-api": { "SpeechRecognition-availableOnDevice.https.html": [ - "ace8edd91647dc0fb08d32353a68d4adde93f53f", + "fb4273f739219bd3083751461b7d6b86ebd0d62d", [ null, {} ] ], "SpeechRecognition-basics.https.html": [ - "91cf8e6d3e54a64a6cac0cf776fa618b99966cbc", + "0fbc4aa842634aff10bdab20af3fed5d0e2ee71d", [ null, {} @@ -804159,7 +805104,7 @@ ] ], "SpeechRecognition-installOnDevice.https.html": [ - "5f78fc8c9c17fffb544775f28c1bd11fb8ebba7c", + "52281f61b6c377bfdc12ec2cae02bff67d69d388", [ null, { @@ -817632,14 +818577,23 @@ ] ], "script.https.html": [ - "783374db920a24ae32a3492d8cfe2edc5d8eb5d3", + "57b4d3e35823adbef985b403516a8c76bfe0e980", [ null, { "timeout": "long" } ] - ] + ], + "tentative": { + "signature.https.html": [ + "d54a6dfb7b0fade8dc9cb864ba0482aae41b487e", + [ + null, + {} + ] + ] + } }, "signatures": { "tentative": { @@ -819634,6 +820588,13 @@ {} ] ], + "svgpath-animation-2.tentative.html": [ + "68114581172fdf83d0317e3be397a5a6cd0e5926", + [ + null, + {} + ] + ], "svgpointlist-animation-1.html": [ "a3340ba83a2a0f6846d0a9e7faa1c27dd49a1383", [ @@ -822972,6 +823933,83 @@ {} ] ], + "script-enforcement-001-outerHTML.xhtml": [ + "f8ce7fee89d90b6997bf31861a94f38fb42e2aee", + [ + null, + {} + ] + ], + "script-enforcement-001.html": [ + "9548987a22d67f952cb49ad472c28f5a37a21180", + [ + null, + {} + ] + ], + "script-enforcement-002-outerHTML.xhtml": [ + "79bb64852ce21caa271aff7917743c20ab23bb4b", + [ + null, + {} + ] + ], + "script-enforcement-002.html": [ + "ddbbc99ea6b3254dafe447af6aaef985587bd33a", + [ + null, + {} + ] + ], + "script-enforcement-003.html": [ + "9ad31b795bc36e1cc4b83c63220be2d3d1e2fee9", + [ + null, + {} + ] + ], + "script-enforcement-004.html": [ + "86e1020c3ad153a5fcbbbac2e3df6f65eb90e710", + [ + null, + {} + ] + ], + "script-enforcement-005.html": [ + "77b1e6b03c61fe891de0db817fd2e63e6789efdb", + [ + null, + {} + ] + ], + "script-enforcement-006.html": [ + "7673a686f4ec70376a50406f2f2518f51259962d", + [ + null, + {} + ] + ], + "script-enforcement-007.html": [ + "34d3831ab74006f7529e3a82855708db2b612187", + [ + null, + {} + ] + ], + "script-enforcement-008.https.html": [ + "86d9ec6985a5a248816a2b8c6e315e1cfcee732b", + [ + null, + {} + ] + ], + "script-enforcement-009.https.html": [ + "45f21b41eda59e913c01606a09e404ced613ec17", + [ + null, + {} + ] + ], "set-attributes-mutations-in-callback.tentative.html": [ "76ea84cf2543a11269983c871be09c8ec1fb18ea", [ @@ -823310,6 +824348,13 @@ {} ] ], + "trusted-types-reporting-for-HTMLScriptElement-children-change.html": [ + "c006bc2315fc7ef248be15d55cd492d6bb1b22cb", + [ + null, + {} + ] + ], "trusted-types-reporting-for-HTMLScriptElement-innerHTML.html": [ "edb7d674b2c766c62c7944cb06ad0a4f00054612", [ @@ -823331,6 +824376,13 @@ {} ] ], + "trusted-types-reporting-for-SVGScriptElement-children-change.html": [ + "c187971f7264e6e294cdf61424671f81c833a311", + [ + null, + {} + ] + ], "trusted-types-reporting-for-SVGScriptElement-innerHTML.html": [ "707c9d37a029e63d39834ac03fab8e8b26ead905", [ @@ -823951,7 +825003,7 @@ ] ], "focus-management-expectations.html": [ - "1845c15d71679276b6fbf4a19188d111da5ea70b", + "65fe639e95849196fb6ef5cd05ece4ceccc0b704", [ null, { @@ -839046,7 +840098,7 @@ ] ], "style-change-events.html": [ - "c64400e869df5e844e276facb7d975827027f68a", + "d1c1c96f7b03e8f8cd6596f1ae24772d292e77b4", [ null, {} @@ -841554,7 +842606,7 @@ ] ], "audiobuffer.html": [ - "a2c4581c4e80069f227fe29078bc3eb6409c8b4e", + "115e8aff1ac246a26762e4805cb17fd02eb9924c", [ null, {} @@ -854959,6 +856011,117 @@ } ] ], + "averagePool2d.https.any.js": [ + "c112cd89c036a5961d8e6b55a35c3581651e168c", + [ + "webnn/conformance_tests/averagePool2d.https.any.html?cpu", + { + "script_metadata": [ + [ + "title", + "test WebNN API averagePool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/averagePool2d.https.any.html?gpu", + { + "script_metadata": [ + [ + "title", + "test WebNN API averagePool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/averagePool2d.https.any.html?npu", + { + "script_metadata": [ + [ + "title", + "test WebNN API averagePool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "batch_normalization.https.any.js": [ "1da85777342c9cead346f2cfd96eaf965544a088", [ @@ -856886,7 +858049,7 @@ ] ], "equal.https.any.js": [ - "dc01aa19379465a4e9ea43cd0f621ab3613daef2", + "a974ec0004f1b9e7312dd03515dc2f49f7340681", [ "webnn/conformance_tests/equal.https.any.html?cpu", { @@ -857995,8 +859158,119 @@ } ] ], + "graph_devices.https.any.js": [ + "c380d810f36d2a0dc966058fd987d95ed0577345", + [ + "webnn/conformance_tests/graph_devices.https.any.html?cpu", + { + "script_metadata": [ + [ + "title", + "test graph.devices" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/graph_devices.https.any.html?gpu", + { + "script_metadata": [ + [ + "title", + "test graph.devices" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/graph_devices.https.any.html?npu", + { + "script_metadata": [ + [ + "title", + "test graph.devices" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "greater.https.any.js": [ - "704e0c45776c96c426fa8a5921d978ada173de7e", + "21e8b07bd4788496eb3d5ddb28c9f05301aef44c", [ "webnn/conformance_tests/greater.https.any.html?cpu", { @@ -858107,7 +859381,7 @@ ] ], "greater_or_equal.https.any.js": [ - "28a2e896027a5ced3d0f8971154b6abd988644f4", + "f9ab2d668147c4d8b9250dcb67f5b2d132ec1027", [ "webnn/conformance_tests/greater_or_equal.https.any.html?cpu", { @@ -859753,6 +861027,117 @@ } ] ], + "l2Pool2d.https.any.js": [ + "f0e16be927bd637fbebd4eb3a63a4fba237e0e8d", + [ + "webnn/conformance_tests/l2Pool2d.https.any.html?cpu", + { + "script_metadata": [ + [ + "title", + "test WebNN API l2Pool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/l2Pool2d.https.any.html?gpu", + { + "script_metadata": [ + [ + "title", + "test WebNN API l2Pool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/conformance_tests/l2Pool2d.https.any.html?npu", + { + "script_metadata": [ + [ + "title", + "test WebNN API l2Pool2d operation" + ], + [ + "global", + "window" + ], + [ + "variant", + "?cpu" + ], + [ + "variant", + "?gpu" + ], + [ + "variant", + "?npu" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "layer_normalization.https.any.js": [ "f22d0444cfa79285cc9860b7b5a75a7cdfb0f18e", [ @@ -859976,7 +861361,7 @@ ] ], "lesser.https.any.js": [ - "0588f3bcd6a26b6d81f4027158334f8c2b4950a9", + "8978435c6e3298b980056c7e498a3ad20737a87a", [ "webnn/conformance_tests/lesser.https.any.html?cpu", { @@ -860087,7 +861472,7 @@ ] ], "lesser_or_equal.https.any.js": [ - "cfcc74063ec34264ba990ee17fb1caad36c82529", + "16aa5888cc275e61869d1f5ab4e7eedc07a321c3", [ "webnn/conformance_tests/lesser_or_equal.https.any.html?cpu", { @@ -860420,7 +861805,7 @@ ] ], "logical_and.https.any.js": [ - "a4d71654bcb4c42629935c7cbf4166be05605527", + "1a03ef5444de4d5a5005b3de5fc1fb88aee26b29", [ "webnn/conformance_tests/logical_and.https.any.html?cpu", { @@ -860531,7 +861916,7 @@ ] ], "logical_not.https.any.js": [ - "9d1861dd548ec014367c1804cf71d7212d88ae61", + "f8949672cc5623a4f3810f32c3c50173a3623ba3", [ "webnn/conformance_tests/logical_not.https.any.html?cpu", { @@ -860642,7 +862027,7 @@ ] ], "logical_or.https.any.js": [ - "f8941b633c90583e95744086bcb221d13c8e773e", + "83c261969f62f1c6ab5e78ebc5ac6aebde9fca6b", [ "webnn/conformance_tests/logical_or.https.any.html?cpu", { @@ -860753,7 +862138,7 @@ ] ], "logical_xor.https.any.js": [ - "533d52aa6be38cb25c6c48cac3f92422ac1b27c0", + "7a9446ea2e4c6ab40dbc9976d6be404180e1d99b", [ "webnn/conformance_tests/logical_xor.https.any.html?cpu", { @@ -861307,15 +862692,15 @@ } ] ], - "min.https.any.js": [ - "5e324e412bf291b9973c6a5fb9594015a911c899", + "maxPool2d.https.any.js": [ + "6ee8b1976d27b3a7418ccdf9fea56a7ee62e1052", [ - "webnn/conformance_tests/min.https.any.html?cpu", + "webnn/conformance_tests/maxPool2d.https.any.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise min operation" + "test WebNN API maxPool2d operation" ], [ "global", @@ -861346,12 +862731,12 @@ } ], [ - "webnn/conformance_tests/min.https.any.html?gpu", + "webnn/conformance_tests/maxPool2d.https.any.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise min operation" + "test WebNN API maxPool2d operation" ], [ "global", @@ -861382,12 +862767,12 @@ } ], [ - "webnn/conformance_tests/min.https.any.html?npu", + "webnn/conformance_tests/maxPool2d.https.any.html?npu", { "script_metadata": [ [ "title", - "test WebNN API element-wise min operation" + "test WebNN API maxPool2d operation" ], [ "global", @@ -861418,15 +862803,15 @@ } ] ], - "mul.https.any.js": [ - "277d3e2fa0d5e1005781ba400d4870c6459e6f6e", + "min.https.any.js": [ + "5e324e412bf291b9973c6a5fb9594015a911c899", [ - "webnn/conformance_tests/mul.https.any.html?cpu", + "webnn/conformance_tests/min.https.any.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise mul operation" + "test WebNN API element-wise min operation" ], [ "global", @@ -861457,12 +862842,12 @@ } ], [ - "webnn/conformance_tests/mul.https.any.html?gpu", + "webnn/conformance_tests/min.https.any.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise mul operation" + "test WebNN API element-wise min operation" ], [ "global", @@ -861493,12 +862878,12 @@ } ], [ - "webnn/conformance_tests/mul.https.any.html?npu", + "webnn/conformance_tests/min.https.any.html?npu", { "script_metadata": [ [ "title", - "test WebNN API element-wise mul operation" + "test WebNN API element-wise min operation" ], [ "global", @@ -861529,15 +862914,15 @@ } ] ], - "neg.https.any.js": [ - "5c5045d355ef1a0f2e7abab561cf48e848189a59", + "mul.https.any.js": [ + "277d3e2fa0d5e1005781ba400d4870c6459e6f6e", [ - "webnn/conformance_tests/neg.https.any.html?cpu", + "webnn/conformance_tests/mul.https.any.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise neg operation" + "test WebNN API element-wise mul operation" ], [ "global", @@ -861568,12 +862953,12 @@ } ], [ - "webnn/conformance_tests/neg.https.any.html?gpu", + "webnn/conformance_tests/mul.https.any.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise neg operation" + "test WebNN API element-wise mul operation" ], [ "global", @@ -861604,12 +862989,12 @@ } ], [ - "webnn/conformance_tests/neg.https.any.html?npu", + "webnn/conformance_tests/mul.https.any.html?npu", { "script_metadata": [ [ "title", - "test WebNN API element-wise neg operation" + "test WebNN API element-wise mul operation" ], [ "global", @@ -861640,15 +863025,15 @@ } ] ], - "not_equal.https.any.js": [ - "3bba726d58528c2bab5e37cf311c638a791b444c", + "neg.https.any.js": [ + "5c5045d355ef1a0f2e7abab561cf48e848189a59", [ - "webnn/conformance_tests/not_equal.https.any.html?cpu", + "webnn/conformance_tests/neg.https.any.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise notEqual operation" + "test WebNN API element-wise neg operation" ], [ "global", @@ -861679,12 +863064,12 @@ } ], [ - "webnn/conformance_tests/not_equal.https.any.html?gpu", + "webnn/conformance_tests/neg.https.any.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API element-wise notEqual operation" + "test WebNN API element-wise neg operation" ], [ "global", @@ -861715,12 +863100,12 @@ } ], [ - "webnn/conformance_tests/not_equal.https.any.html?npu", + "webnn/conformance_tests/neg.https.any.html?npu", { "script_metadata": [ [ "title", - "test WebNN API element-wise notEqual operation" + "test WebNN API element-wise neg operation" ], [ "global", @@ -861751,15 +863136,15 @@ } ] ], - "pad.https.any.js": [ - "c2ba0e45b8f56fd4e4f75f780780c94cc4838df7", + "not_equal.https.any.js": [ + "5aed1247e06a6f7362bc90ba817c466d91ede332", [ - "webnn/conformance_tests/pad.https.any.html?cpu", + "webnn/conformance_tests/not_equal.https.any.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API pad operation" + "test WebNN API element-wise notEqual operation" ], [ "global", @@ -861790,12 +863175,12 @@ } ], [ - "webnn/conformance_tests/pad.https.any.html?gpu", + "webnn/conformance_tests/not_equal.https.any.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API pad operation" + "test WebNN API element-wise notEqual operation" ], [ "global", @@ -861826,12 +863211,12 @@ } ], [ - "webnn/conformance_tests/pad.https.any.html?npu", + "webnn/conformance_tests/not_equal.https.any.html?npu", { "script_metadata": [ [ "title", - "test WebNN API pad operation" + "test WebNN API element-wise notEqual operation" ], [ "global", @@ -861862,19 +863247,19 @@ } ] ], - "parallel-dispatch.https.any.js": [ - "6ad4cd93d65d059790a8d82e2678eca54411846f", + "pad.https.any.js": [ + "c2ba0e45b8f56fd4e4f75f780780c94cc4838df7", [ - "webnn/conformance_tests/parallel-dispatch.https.any.html?cpu", + "webnn/conformance_tests/pad.https.any.html?cpu", { "script_metadata": [ [ "title", - "test parallel WebNN API dispatch calls" + "test WebNN API pad operation" ], [ "global", - "window,worker" + "window" ], [ "variant", @@ -861901,16 +863286,16 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.html?gpu", + "webnn/conformance_tests/pad.https.any.html?gpu", { "script_metadata": [ [ "title", - "test parallel WebNN API dispatch calls" + "test WebNN API pad operation" ], [ "global", - "window,worker" + "window" ], [ "variant", @@ -861937,16 +863322,16 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.html?npu", + "webnn/conformance_tests/pad.https.any.html?npu", { "script_metadata": [ [ "title", - "test parallel WebNN API dispatch calls" + "test WebNN API pad operation" ], [ "global", - "window,worker" + "window" ], [ "variant", @@ -861971,9 +863356,12 @@ ], "timeout": "long" } - ], + ] + ], + "parallel-dispatch.https.any.js": [ + "6ad4cd93d65d059790a8d82e2678eca54411846f", [ - "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?cpu", + "webnn/conformance_tests/parallel-dispatch.https.any.html?cpu", { "script_metadata": [ [ @@ -862009,7 +863397,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?gpu", + "webnn/conformance_tests/parallel-dispatch.https.any.html?gpu", { "script_metadata": [ [ @@ -862045,7 +863433,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?npu", + "webnn/conformance_tests/parallel-dispatch.https.any.html?npu", { "script_metadata": [ [ @@ -862081,7 +863469,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?cpu", + "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?cpu", { "script_metadata": [ [ @@ -862117,7 +863505,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?gpu", + "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?gpu", { "script_metadata": [ [ @@ -862153,7 +863541,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?npu", + "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?npu", { "script_metadata": [ [ @@ -862189,7 +863577,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?cpu", + "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?cpu", { "script_metadata": [ [ @@ -862225,7 +863613,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?gpu", + "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?gpu", { "script_metadata": [ [ @@ -862261,7 +863649,7 @@ } ], [ - "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?npu", + "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?npu", { "script_metadata": [ [ @@ -862295,21 +863683,18 @@ ], "timeout": "long" } - ] - ], - "pooling.https.any.js": [ - "8f81ff565d232dec427381dfdae638cffceb0d91", + ], [ - "webnn/conformance_tests/pooling.https.any.html?cpu", + "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?cpu", { "script_metadata": [ [ "title", - "test WebNN API pooling operations" + "test parallel WebNN API dispatch calls" ], [ "global", - "window" + "window,worker" ], [ "variant", @@ -862336,16 +863721,16 @@ } ], [ - "webnn/conformance_tests/pooling.https.any.html?gpu", + "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?gpu", { "script_metadata": [ [ "title", - "test WebNN API pooling operations" + "test parallel WebNN API dispatch calls" ], [ "global", - "window" + "window,worker" ], [ "variant", @@ -862372,16 +863757,16 @@ } ], [ - "webnn/conformance_tests/pooling.https.any.html?npu", + "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?npu", { "script_metadata": [ [ "title", - "test WebNN API pooling operations" + "test parallel WebNN API dispatch calls" ], [ "global", - "window" + "window,worker" ], [ "variant", @@ -862631,7 +864016,7 @@ ] ], "qdq_subgraph.https.any.js": [ - "996a6b472c5689bc082388d5c267d2f5fe460080", + "a6155fb25ce36b2dbee504e87a20ece86713adbc", [ "webnn/conformance_tests/qdq_subgraph.https.any.html?cpu", { @@ -885149,7 +886534,7 @@ ] ], "h264-unidirectional-codec-offer.https.html": [ - "708d59e52423dae56f05ca04f913938831ac3844", + "d5429fa80fa94bf9980e8d7e6ff6d29542f3d6a0", [ null, {} @@ -885752,6 +887137,13 @@ ] ], "tentative": { + "RTCEncodedAudioFrame-audiolevel.html": [ + "14b76efb575513237911af4c628590433b9d0529", + [ + null, + {} + ] + ], "RTCEncodedAudioFrame-clone.https.html": [ "c93f8b3e54150b94334c33f30031d0b9f3afcd19", [ @@ -885762,7 +887154,7 @@ ] ], "RTCEncodedAudioFrame-metadata.https.html": [ - "1e148fe1b29a167e6451162125b7390151ec90bd", + "b9461940c639c523b89b6e9ed3c2222b4f64151f", [ null, { @@ -929291,36 +930683,6 @@ ] ] }, - "text-autospace": { - "text-autospace-dynamic-text-001.html": [ - "dfde20a265adbc64b38e198ebfbd45af27e3a68b", - [ - null, - {} - ] - ], - "text-autospace-dynamic-text-002.html": [ - "ffc3d907ee573861326042fb17dd45273d520b29", - [ - null, - {} - ] - ], - "text-autospace-dynamic-text-003.html": [ - "cf2237d48ef689b7ce36a358e38a267885ffd231", - [ - null, - {} - ] - ], - "text-autospace-dynamic-text-004.html": [ - "c1057fc90053005487b7ba0a30b760bd04a70edf", - [ - null, - {} - ] - ] - }, "text-justify": { "text-justify-002.html": [ "91b6381e7c07f67554139d216180318fa676ccf9", @@ -931232,7 +932594,7 @@ ] ], "invalid.py": [ - "9af6cdd5232244b46a3a3bc76ee4694c0704ba53", + "01a2ce1d083a188ade8cb0cdbe1e1f2f85d8d02d", [ null, {} @@ -931454,7 +932816,7 @@ }, "fragment_navigated": { "fragment_navigated.py": [ - "45a65cacdf03503325bc5357e6971e747a13d2fd", + "57680c5f630543cf9dafca9da2b7d494f1079591", [ null, {} @@ -931516,7 +932878,7 @@ }, "history_updated": { "history_updated.py": [ - "9fbb0f26c9e445663b509f6e304134e9ace0e147", + "6ad4bd22b326cd4f4003606c6b616fc20a93d56c", [ null, {} @@ -933281,7 +934643,7 @@ ] ], "partition.py": [ - "bb171c6141165ce321b3cd72cd861a187d2b7c9b", + "8866771b80c95100ae391c2f3a52854ce7be538f", [ null, {} @@ -933336,7 +934698,7 @@ }, "add_cookie": { "add.py": [ - "60b67d051ba18cf5eba33c3672b78d9c8cc2fe5d", + "581040f7000a37448160ac0a1e333192b679c822", [ null, {} diff --git a/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini b/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini deleted file mode 100644 index e3d7c23eef2..00000000000 --- a/tests/wpt/meta/content-security-policy/base-uri/report-uri-does-not-respect-base-uri.sub.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-does-not-respect-base-uri.sub.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/inside-worker/dedicatedworker-connect-src.html.ini b/tests/wpt/meta/content-security-policy/inside-worker/dedicatedworker-connect-src.html.ini index 72db221f4dd..c0755107957 100644 --- a/tests/wpt/meta/content-security-policy/inside-worker/dedicatedworker-connect-src.html.ini +++ b/tests/wpt/meta/content-security-policy/inside-worker/dedicatedworker-connect-src.html.ini @@ -1,7 +1,4 @@ [dedicatedworker-connect-src.html] - [Reports match in http: with connect-src 'self'] - expected: FAIL - [Cross-origin 'fetch()' in blob: with connect-src 'self'] expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-and-enforce.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-and-enforce.html.ini deleted file mode 100644 index db4b7b25753..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-and-enforce.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-and-enforce.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-blocked-data-uri.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-blocked-data-uri.html.ini deleted file mode 100644 index d8269171239..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-blocked-data-uri.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-blocked-data-uri.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri-cross-origin.sub.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri-cross-origin.sub.html.ini deleted file mode 100644 index e70dcdeca70..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri-cross-origin.sub.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-blocked-uri-cross-origin.sub.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri.html.ini deleted file mode 100644 index 2275d16dae2..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-blocked-uri.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-blocked-uri.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html.ini deleted file mode 100644 index c7665aab918..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-cross-origin-no-cookies.sub.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-cross-origin-no-cookies.sub.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-original-url.sub.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-original-url.sub.html.ini deleted file mode 100644 index f160ad3d25d..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-original-url.sub.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-original-url.sub.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-preload-and-consume.https.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-preload-and-consume.https.html.ini deleted file mode 100644 index 2d09ea340b3..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-preload-and-consume.https.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[report-preload-and-consume.https.html] - expected: TIMEOUT - [Reporting endpoints received credentials.] - expected: TIMEOUT diff --git a/tests/wpt/meta/content-security-policy/reporting/report-same-origin-with-cookies.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-same-origin-with-cookies.html.ini deleted file mode 100644 index 882211ab9fb..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-same-origin-with-cookies.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[report-same-origin-with-cookies.html] - [Violation report status OK.] - expected: FAIL - - [Test report cookies.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-effective-directive.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-effective-directive.html.ini deleted file mode 100644 index 1571539a4e4..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-effective-directive.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-effective-directive.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-child-frame.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-from-child-frame.html.ini deleted file mode 100644 index 4112d8054e5..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-child-frame.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-from-child-frame.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-inline-javascript.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-from-inline-javascript.html.ini deleted file mode 100644 index a37311b0d13..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-inline-javascript.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-from-inline-javascript.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-javascript.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-from-javascript.html.ini deleted file mode 100644 index 92daa7fe26d..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-from-javascript.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-from-javascript.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple-reversed.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple-reversed.html.ini deleted file mode 100644 index 1edf44b5887..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple-reversed.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-multiple-reversed.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple.html.ini deleted file mode 100644 index 1ea240219fa..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-multiple.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-multiple.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/content-security-policy/reporting/report-uri-scheme-relative.html.ini b/tests/wpt/meta/content-security-policy/reporting/report-uri-scheme-relative.html.ini deleted file mode 100644 index 6a803717b04..00000000000 --- a/tests/wpt/meta/content-security-policy/reporting/report-uri-scheme-relative.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[report-uri-scheme-relative.html] - [Violation report status OK.] - expected: FAIL diff --git a/tests/wpt/meta/css/css-align/blocks/align-content-block-002.html.ini b/tests/wpt/meta/css/css-align/blocks/align-content-block-002.html.ini index 4bdb2e838cf..20f2aa68cb1 100644 --- a/tests/wpt/meta/css/css-align/blocks/align-content-block-002.html.ini +++ b/tests/wpt/meta/css/css-align/blocks/align-content-block-002.html.ini @@ -28,4 +28,3 @@ [.test 16: space-around] expected: FAIL -
\ No newline at end of file diff --git a/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini b/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini new file mode 100644 index 00000000000..f1d853cdbe7 --- /dev/null +++ b/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini @@ -0,0 +1,2 @@ +[flex-gap-decorations-025.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini b/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini new file mode 100644 index 00000000000..0715aa55256 --- /dev/null +++ b/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini @@ -0,0 +1,2 @@ +[grid-gap-decorations-046.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-002.html.ini b/tests/wpt/meta/css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-002.html.ini index 531eaa307e7..416719765b0 100644 --- a/tests/wpt/meta/css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-002.html.ini +++ b/tests/wpt/meta/css/css-grid/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-002.html.ini @@ -1,2 +1,3 @@ [grid-self-baseline-changes-grid-area-size-002.html] - expected: FAIL + expected: + if os == "linux": FAIL diff --git a/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini b/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini deleted file mode 100644 index 8c0fc3310eb..00000000000 --- a/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[grid-auto-margin-and-replaced-item-001.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/implicit-grids/grid-support-grid-auto-columns-rows-003.html.ini b/tests/wpt/meta/css/css-grid/implicit-grids/grid-support-grid-auto-columns-rows-003.html.ini deleted file mode 100644 index ce383fa387c..00000000000 --- a/tests/wpt/meta/css/css-grid/implicit-grids/grid-support-grid-auto-columns-rows-003.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[grid-support-grid-auto-columns-rows-003.html] - expected: CRASH diff --git a/tests/wpt/meta/css/css-grid/parsing/grid-template-columns-computed-implicit-track.html.ini b/tests/wpt/meta/css/css-grid/parsing/grid-template-columns-computed-implicit-track.html.ini index 73fea439f38..eb585fb9b6a 100644 --- a/tests/wpt/meta/css/css-grid/parsing/grid-template-columns-computed-implicit-track.html.ini +++ b/tests/wpt/meta/css/css-grid/parsing/grid-template-columns-computed-implicit-track.html.ini @@ -1,11 +1,7 @@ [grid-template-columns-computed-implicit-track.html] - expected: CRASH [Property grid-template-columns value 'none' computes to '10px'] expected: FAIL - [Property grid-template-columns value '1px' computes to '10px 1px'] - expected: FAIL - [Property grid-template-columns value '1px [a\]' computes to '10px 1px [a\]'] expected: FAIL @@ -18,15 +14,6 @@ [Property grid-template-columns value '[a\] 1px [b\]' computes to '10px [a\] 1px [b\]'] expected: FAIL - [Property grid-template-columns value '1px repeat(1, 2px) 3px' computes to '10px 1px 2px 3px'] - expected: FAIL - - [Property grid-template-columns value '1px repeat(auto-fill, 2px) 3px' computes to '10px 1px 2px 3px'] - expected: FAIL - - [Property grid-template-columns value '1px repeat(auto-fit, 2px) 3px' computes to '10px 1px 0px 3px'] - expected: FAIL - [Property grid-template-columns value '1px [a\] repeat(1, 2px 3px) [b\] 4px' computes to '10px 1px [a\] 2px 3px [b\] 4px'] expected: FAIL diff --git a/tests/wpt/meta/css/css-grid/placement/grid-auto-flow-sparse-001.html.ini b/tests/wpt/meta/css/css-grid/placement/grid-auto-flow-sparse-001.html.ini deleted file mode 100644 index 2495aec7b54..00000000000 --- a/tests/wpt/meta/css/css-grid/placement/grid-auto-flow-sparse-001.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[grid-auto-flow-sparse-001.html] - [.grid 2] - expected: FAIL - - [.grid 6] - expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini new file mode 100644 index 00000000000..3fcf256a571 --- /dev/null +++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini @@ -0,0 +1,2 @@ +[clip-path-shape-007.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini deleted file mode 100644 index caf8b4fe457..00000000000 --- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-shape-007.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini new file mode 100644 index 00000000000..581637b4e9e --- /dev/null +++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini @@ -0,0 +1,2 @@ +[clip-path-shape-008.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini deleted file mode 100644 index 6e684dbce1e..00000000000 --- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-shape-008.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini new file mode 100644 index 00000000000..be619ed82c5 --- /dev/null +++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini @@ -0,0 +1,2 @@ +[clip-path-shape-009.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini deleted file mode 100644 index 2d52b5fb3ca..00000000000 --- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-shape-009.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini new file mode 100644 index 00000000000..d49fb65ffa7 --- /dev/null +++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini @@ -0,0 +1,2 @@ +[clip-path-shape-010.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini deleted file mode 100644 index 753d107a87c..00000000000 --- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-shape-010.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini new file mode 100644 index 00000000000..1d74c790586 --- /dev/null +++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini @@ -0,0 +1,2 @@ +[clip-path-shape-hline-vline-keywords.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini deleted file mode 100644 index bb49bedc129..00000000000 --- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-shape-hline-vline-keywords.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini b/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini new file mode 100644 index 00000000000..020fa118688 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini @@ -0,0 +1,3 @@ +[overflow-rtl-scroll-left.html] + [rtl scroll left should be 0 when overflow size is empty] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini new file mode 100644 index 00000000000..df8e332e478 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini @@ -0,0 +1,24 @@ +[scroll-target-group-computed.html] + [Property scroll-target-group value 'initial'] + expected: FAIL + + [Property scroll-target-group value 'inherit'] + expected: FAIL + + [Property scroll-target-group value 'unset'] + expected: FAIL + + [Property scroll-target-group value 'revert'] + expected: FAIL + + [Property scroll-target-group value 'none'] + expected: FAIL + + [Property scroll-target-group value 'auto'] + expected: FAIL + + [The scroll-target-group property shows up in CSSStyleDeclaration enumeration] + expected: FAIL + + [The scroll-target-group property shows up in CSSStyleDeclaration.cssText] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini new file mode 100644 index 00000000000..de1dbce0388 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini @@ -0,0 +1,18 @@ +[scroll-target-group-valid.html] + [e.style['scroll-target-group'\] = "initial" should set the property value] + expected: FAIL + + [e.style['scroll-target-group'\] = "inherit" should set the property value] + expected: FAIL + + [e.style['scroll-target-group'\] = "unset" should set the property value] + expected: FAIL + + [e.style['scroll-target-group'\] = "revert" should set the property value] + expected: FAIL + + [e.style['scroll-target-group'\] = "none" should set the property value] + expected: FAIL + + [e.style['scroll-target-group'\] = "auto" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini deleted file mode 100644 index 0d5590a9293..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-001.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini deleted file mode 100644 index fd0d2f5788e..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-002.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini deleted file mode 100644 index 04e56713889..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-003.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini deleted file mode 100644 index 908e3e40d04..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-004.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini deleted file mode 100644 index 47c67ec0661..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-005.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini deleted file mode 100644 index d23cf1f17aa..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-006.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini deleted file mode 100644 index 8d4a789ac8c..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-007.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini deleted file mode 100644 index 795e1770941..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-009.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini deleted file mode 100644 index a753743341b..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-010.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini deleted file mode 100644 index 79b26077e52..00000000000 --- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll-marker-contain-011.tentative.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini new file mode 100644 index 00000000000..126202f90c1 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-001.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini new file mode 100644 index 00000000000..0bc1a1e1913 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-002.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini new file mode 100644 index 00000000000..4ee994dd132 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-003.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini new file mode 100644 index 00000000000..bfd1c548d32 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-004.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini new file mode 100644 index 00000000000..c2a0549c59a --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-005.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini new file mode 100644 index 00000000000..31e579146fe --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-006.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini new file mode 100644 index 00000000000..0ae72f84178 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-007.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini new file mode 100644 index 00000000000..295993e8bd4 --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-009.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini new file mode 100644 index 00000000000..7b71301d0fd --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-010.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini new file mode 100644 index 00000000000..b86415ac7bb --- /dev/null +++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini @@ -0,0 +1,2 @@ +[scroll-target-group-011.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini new file mode 100644 index 00000000000..b1608595b34 --- /dev/null +++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini @@ -0,0 +1,3 @@ +[flex-line-002.html] + [.stretch 3] + expected: FAIL diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini new file mode 100644 index 00000000000..b640cf72b73 --- /dev/null +++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini @@ -0,0 +1,3 @@ +[flex-line-003.html] + [.stretch 3] + expected: FAIL diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini new file mode 100644 index 00000000000..978f6b96efe --- /dev/null +++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini @@ -0,0 +1,3 @@ +[flex-line-004.html] + [.stretch 3] + expected: FAIL diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini new file mode 100644 index 00000000000..5f0b034f9f1 --- /dev/null +++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini @@ -0,0 +1,3 @@ +[flex-line-005.html] + [.stretch 1] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini b/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini index 9b0fc900654..b39c17ebe88 100644 --- a/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini +++ b/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini @@ -13,3 +13,6 @@ [Property text-autospace value 'ideograph-numeric'] expected: FAIL + + [Property text-autospace value 'initial'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini b/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini index 45a3efb1821..d22c112b80f 100644 --- a/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini +++ b/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini @@ -58,3 +58,6 @@ [Property text-spacing value 'trim-start no-autospace'] expected: FAIL + + [Property text-spacing value 'initial'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini b/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini new file mode 100644 index 00000000000..4141ac378ef --- /dev/null +++ b/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini @@ -0,0 +1,2 @@ +[text-autospace-zh-001.html] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom-view/idlharness.html.ini b/tests/wpt/meta/css/cssom-view/idlharness.html.ini index 497db91deed..ad39324b4c6 100644 --- a/tests/wpt/meta/css/cssom-view/idlharness.html.ini +++ b/tests/wpt/meta/css/cssom-view/idlharness.html.ini @@ -595,3 +595,12 @@ [Document interface: calling caretPositionFromPoint(double, double, optional CaretPositionFromPointOptions) on document with too few arguments must throw TypeError] expected: FAIL + + [HTMLElement interface: attribute scrollParent] + expected: FAIL + + [HTMLElement interface: document.createElement("div") must inherit property "scrollParent" with the proper type] + expected: FAIL + + [HTMLElement interface: document.createElement("img") must inherit property "scrollParent" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini b/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini new file mode 100644 index 00000000000..0087a88ea29 --- /dev/null +++ b/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini @@ -0,0 +1,2 @@ +[css-backdrop-filter-transform-clip.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini b/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini deleted file mode 100644 index e033f991a62..00000000000 --- a/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini +++ /dev/null @@ -1,42 +0,0 @@ -[idlharness.window.html] - [idl_test setup] - expected: FAIL - - [idl_test validation] - expected: FAIL - - [Partial interface CustomElementRegistry: member names are unique] - expected: FAIL - - [Partial interface HTMLTemplateElement: member names are unique] - expected: FAIL - - [Partial interface Element: member names are unique] - expected: FAIL - - [Partial dictionary ShadowRootInit: member names are unique] - expected: FAIL - - [Partial dictionary ElementCreationOptions: member names are unique] - expected: FAIL - - [Document includes DocumentOrShadowRoot: member names are unique] - expected: FAIL - - [ShadowRoot includes DocumentOrShadowRoot: member names are unique] - expected: FAIL - - [HTMLTemplateElement interface: attribute shadowRootCustomElementRegistry] - expected: FAIL - - [CustomElementRegistry interface: operation initialize(Node)] - expected: FAIL - - [Document interface: attribute customElementRegistry] - expected: FAIL - - [ShadowRoot interface: attribute customElementRegistry] - expected: FAIL - - [Element interface: attribute customElementRegistry] - expected: FAIL diff --git a/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini b/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini new file mode 100644 index 00000000000..f8ef4dcdfc4 --- /dev/null +++ b/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini @@ -0,0 +1,3 @@ +[valid-custom-element-names.tentative.html] + [valid-custom-element-names] + expected: FAIL diff --git a/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini b/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini new file mode 100644 index 00000000000..1cb0619a479 --- /dev/null +++ b/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini @@ -0,0 +1,15 @@ +[name-validation.tentative.html] + [Valid and invalid characters in createElement.] + expected: FAIL + + [Valid and invalid characters in createElementNS and createDocument.] + expected: FAIL + + [Valid and invalid characters in setAttribute, toggleAttribute, and createAttribute.] + expected: FAIL + + [Valid and invalid characters in setAttributeNS and createAttributeNS.] + expected: FAIL + + [Valid and invalid characters in createDocumentType.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini index 3efe794ff69..bf00ced2c77 100644 --- a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini +++ b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini @@ -4,10 +4,10 @@ expected: FAIL [fetchLater() rejects max+1 payload in a parent-frame-origin POST request body of String in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() accepts max payload in a self-frame-origin POST request body of String in a default cross-origin iframe.] - expected: FAIL + expected: NOTRUN [fetchLater() rejects max+1 payload in a self-frame-origin POST request body of String in a default cross-origin iframe.] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini index 5aff34a1a85..c3269924c44 100644 --- a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini +++ b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini @@ -1,19 +1,19 @@ [oversized-payload.tentative.https.window.html] - expected: ERROR + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of String in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of ArrayBuffer in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of FormData in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of URLSearchParams in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of Blob in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of File in a default cross-origin iframe.] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini index 38b9ade3bf9..0e2ee3973ed 100644 --- a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini +++ b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini @@ -4,4 +4,4 @@ expected: FAIL [fetchLater() rejects max+1 payload in a POST request body of String in same-origin iframe.] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini index 967a5e13445..edf97053c56 100644 --- a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini +++ b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini @@ -1,19 +1,19 @@ [oversized-payload.tentative.https.window.html] - expected: ERROR + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of String in same-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of ArrayBuffer in same-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of FormData in same-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of URLSearchParams in same-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of Blob in same-origin iframe.] - expected: FAIL + expected: TIMEOUT [fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of File in same-origin iframe.] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini b/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini index 2254c59cae9..af4a680bb7a 100644 --- a/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini +++ b/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini @@ -49,3 +49,6 @@ [sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination] expected: FAIL + + [sec-fetch-storage-access - Not sent to non-trustworthy same-site destination] + expected: FAIL diff --git a/tests/wpt/meta/fetch/metadata/report.https.sub.html.ini b/tests/wpt/meta/fetch/metadata/report.https.sub.html.ini deleted file mode 100644 index 0348be9f384..00000000000 --- a/tests/wpt/meta/fetch/metadata/report.https.sub.html.ini +++ /dev/null @@ -1,10 +0,0 @@ -[report.https.sub.html] - expected: ERROR - [same-origin report] - expected: TIMEOUT - - [same-site report] - expected: TIMEOUT - - [cross-site report] - expected: TIMEOUT diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini new file mode 100644 index 00000000000..c253f779d78 --- /dev/null +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini @@ -0,0 +1,3 @@ +[008.html] + [Link with onclick form submit to javascript url and href navigation ] + expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini deleted file mode 100644 index 3fb21c9b2c6..00000000000 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[009.html] - [Link with onclick form submit to javascript url with document.write and href navigation ] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini new file mode 100644 index 00000000000..3e07e6b7d1f --- /dev/null +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini @@ -0,0 +1,6 @@ +[empty-iframe-load-event.html] + [Check execution order from nested timeout] + expected: FAIL + + [Check execution order on load handler] + expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini index 6313c3e33dd..02a8e91ea04 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini @@ -4,3 +4,6 @@ [link click] expected: FAIL + + [form submission] + expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini new file mode 100644 index 00000000000..d55bacae6b4 --- /dev/null +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini @@ -0,0 +1,3 @@ +[same-document-refresh.html] + [Same-Document Referrer from Refresh] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini b/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini new file mode 100644 index 00000000000..b01db0541f9 --- /dev/null +++ b/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini @@ -0,0 +1,59 @@ +[createImageBitmap-resolves-in-task.any.html] + [createImageBitmap with an HTMLCanvasElement source should resolve async] + expected: FAIL + + [createImageBitmap with an HTMLVideoElement source should resolve async] + expected: FAIL + + [createImageBitmap with an HTMLVideoElement from a data URL source should resolve async] + expected: FAIL + + [createImageBitmap with a bitmap HTMLImageElement source should resolve async] + expected: FAIL + + [createImageBitmap with a vector HTMLImageElement source should resolve async] + expected: FAIL + + [createImageBitmap with a bitmap SVGImageElement source and invalid cropHeight should reject sync] + expected: FAIL + + [createImageBitmap with a bitmap SVGImageElement source and invalid resizeHeight should reject sync] + expected: FAIL + + [createImageBitmap with a bitmap SVGImageElement source should resolve async] + expected: FAIL + + [createImageBitmap with a vector SVGImageElement source and invalid cropHeight should reject sync] + expected: FAIL + + [createImageBitmap with a vector SVGImageElement source and invalid resizeHeight should reject sync] + expected: FAIL + + [createImageBitmap with a vector SVGImageElement source should resolve async] + expected: FAIL + + [createImageBitmap with an OffscreenCanvas source should resolve async] + expected: FAIL + + [createImageBitmap with an ImageData source should resolve async] + expected: FAIL + + [createImageBitmap with an ImageBitmap source should resolve async] + expected: FAIL + + [createImageBitmap with a Blob source should resolve async] + expected: FAIL + + +[createImageBitmap-resolves-in-task.any.worker.html] + [createImageBitmap with an OffscreenCanvas source should resolve async] + expected: FAIL + + [createImageBitmap with an ImageData source should resolve async] + expected: FAIL + + [createImageBitmap with an ImageBitmap source should resolve async] + expected: FAIL + + [createImageBitmap with a Blob source should resolve async] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini b/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini deleted file mode 100644 index 5cdcce07c65..00000000000 --- a/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[canvas.2d.disconnected.html] - expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index ed387df6221..82ed190e10f 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -5237,6 +5237,12 @@ [CustomElementRegistry interface: operation initialize(Node)] expected: FAIL + [ToggleEvent interface: attribute source] + expected: FAIL + + [ToggleEvent interface: new ToggleEvent("beforetoggle") must inherit property "source" with the proper type] + expected: FAIL + [idlharness.https.html?include=HTML.+] [HTMLAllCollection interface: existence and properties of interface object] diff --git a/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini b/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini index 23aa1d4fb99..c89473579b6 100644 --- a/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini +++ b/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini @@ -4,3 +4,24 @@ [Disabling contenteditable] expected: FAIL + + [#button1] + expected: FAIL + + [#button2] + expected: FAIL + + [#button4] + expected: FAIL + + [#button5] + expected: FAIL + + [#div] + expected: FAIL + + [#editable] + expected: FAIL + + [#button6] + expected: FAIL diff --git a/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini b/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini index 865b8601bae..d30d032e7b5 100644 --- a/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini +++ b/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini @@ -1,3 +1,4 @@ [update-the-rendering.html] + 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/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini new file mode 100644 index 00000000000..b80a9096991 --- /dev/null +++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini @@ -0,0 +1,2 @@ +[min-size-empty-001-ref.html] + expected: FAIL diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini new file mode 100644 index 00000000000..976e37fe020 --- /dev/null +++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini @@ -0,0 +1,2 @@ +[min-size-empty-001.html] + expected: FAIL diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini new file mode 100644 index 00000000000..eba3bf68651 --- /dev/null +++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini @@ -0,0 +1,2 @@ +[min-size-empty-002-ref.html] + expected: FAIL diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini new file mode 100644 index 00000000000..8b0c16d052b --- /dev/null +++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini @@ -0,0 +1,2 @@ +[min-size-empty-002.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini index d7e7d1b9815..24903b5f66f 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini @@ -1,4 +1,4 @@ [iframe_sandbox_popups_escaping-1.html] - expected: CRASH + expected: TIMEOUT [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: TIMEOUT diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index e8872b3585b..bbc1f35d8d9 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-1.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index c6f1e5d7d84..4034793cc72 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-2.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini deleted file mode 100644 index 5c4c37fa7e1..00000000000 --- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini +++ /dev/null @@ -1,90 +0,0 @@ -[naturalWidth-naturalHeight-unavailable.tentative.html] - [SVG image, no natural dimensions] - expected: FAIL - - [SVG image, percengage natural dimensions] - expected: FAIL - - [SVG image, negative percengage natural dimensions] - expected: FAIL - - [SVG image, with natural width] - expected: FAIL - - [SVG image, with natural height] - expected: FAIL - - [SVG image, with natural width of 0] - expected: FAIL - - [SVG image, with natural height of 0] - expected: FAIL - - [SVG image, with natural width being negative] - expected: FAIL - - [SVG image, with natural height being negative] - expected: FAIL - - [SVG image, no natural dimensions, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, percengage natural dimensions, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural width, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural height, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural width of 0, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural height of 0, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural width being negative, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural height being negative, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, no natural dimensions, viewBox with 0 width/height] - expected: FAIL - - [SVG image, no natural dimensions, viewBox with 0 width] - expected: FAIL - - [SVG image, no natural dimensions, viewBox with 0 height] - expected: FAIL - - [SVG image, with natural width, viewBox with 0 width/height] - expected: FAIL - - [SVG image, with natural width, viewBox with 0 width] - expected: FAIL - - [SVG image, with natural width, viewBox with 0 height] - expected: FAIL - - [SVG image, with natural height, viewBox with 0 width/height] - expected: FAIL - - [SVG image, with natural height, viewBox with 0 width] - expected: FAIL - - [SVG image, with natural height, viewBox with 0 height] - expected: FAIL - - [SVG image, with natural width and height, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural width and height of 0, and aspect ratio from viewBox] - expected: FAIL - - [SVG image, with natural width and height being negative, and aspect ratio from viewBox] - expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini new file mode 100644 index 00000000000..cc6b4f3f186 --- /dev/null +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini @@ -0,0 +1,594 @@ +[naturalWidth-naturalHeight-width-height.tentative.html] + [raster image] + expected: FAIL + + [raster image with width/height attributes] + expected: FAIL + + [raster image with width/height attributes (when not rendered)] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions] + expected: FAIL + + [SVG image, no natural dimensions (when not rendered)] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions (when not rendered)] + expected: FAIL + + [SVG image with width attr, no natural dimensions] + expected: FAIL + + [SVG image with width attr, no natural dimensions (when not rendered)] + expected: FAIL + + [SVG image with height attr, no natural dimensions] + expected: FAIL + + [SVG image with height attr, no natural dimensions (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions] + expected: FAIL + + [SVG image, percengage natural dimensions (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions] + expected: FAIL + + [SVG image, negative percengage natural dimensions (when not rendered)] + expected: FAIL + + [SVG image, with natural width] + expected: FAIL + + [SVG image, with natural width (when not rendered)] + expected: FAIL + + [SVG image, with natural height] + expected: FAIL + + [SVG image, with natural height (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0] + expected: FAIL + + [SVG image, with natural width of 0 (when not rendered)] + expected: FAIL + + [SVG image, with natural height of 0] + expected: FAIL + + [SVG image, with natural height of 0 (when not rendered)] + expected: FAIL + + [SVG image, with natural width being negative] + expected: FAIL + + [SVG image, with natural width being negative (when not rendered)] + expected: FAIL + + [SVG image, with natural height being negative] + expected: FAIL + + [SVG image, with natural height being negative (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (when not rendered)] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox (when not rendered)] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural height of 0, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural width being negative, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural height being negative, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height (when not rendered)] + expected: FAIL + + [SVG image, with natural width and height] + expected: FAIL + + [SVG image, with natural width and height, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural width and height of 0, and aspect ratio from viewBox] + expected: FAIL + + [SVG image, with natural width and height being negative, and aspect ratio from viewBox] + expected: FAIL + + [raster image (with srcset/1x)] + expected: FAIL + + [raster image with width/height attributes (with srcset/1x)] + expected: FAIL + + [raster image with width/height attributes (with srcset/1x) (when not rendered)] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions (with srcset/1x)] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image with width attr, no natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image with width attr, no natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image with height attr, no natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image with height attr, no natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image, percengage natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions (with srcset/1x)] + expected: FAIL + + [SVG image, negative percengage natural dimensions (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0 (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width of 0 (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height of 0 (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height of 0 (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width being negative (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width being negative (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height being negative (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height being negative (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height (with srcset/1x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width and height (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/1x)] + expected: FAIL + + [raster image (with srcset/2x)] + expected: FAIL + + [raster image (with srcset/2x) (when not rendered)] + expected: FAIL + + [raster image with width/height attributes (with srcset/2x)] + expected: FAIL + + [raster image with width/height attributes (with srcset/2x) (when not rendered)] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions (with srcset/2x)] + expected: FAIL + + [non existent image with width/height attributes, no natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image with width/height attrs, no natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image with width attr, no natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image with width attr, no natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image with height attr, no natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image with height attr, no natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image, percengage natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions (with srcset/2x)] + expected: FAIL + + [SVG image, negative percengage natural dimensions (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0 (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width of 0 (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height of 0 (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height of 0 (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width being negative (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width being negative (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height being negative (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height being negative (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x)] + expected: FAIL + + [SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width/height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 width (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width, viewBox with 0 height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width/height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 width (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural height, viewBox with 0 height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width and height (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width and height (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x) (when not rendered)] + expected: FAIL + + [SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL + + [SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/2x)] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini new file mode 100644 index 00000000000..577341577fb --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-fill-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini new file mode 100644 index 00000000000..94aceea648d --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-height-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini new file mode 100644 index 00000000000..615bf22a217 --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-margin-inline-end-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini new file mode 100644 index 00000000000..6b0153832a2 --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-min-height-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini new file mode 100644 index 00000000000..5055af39a9e --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-stroke-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini new file mode 100644 index 00000000000..4c9fe9a31b2 --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-css-property-stroke-width-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini new file mode 100644 index 00000000000..f5f9a936120 --- /dev/null +++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini @@ -0,0 +1,2 @@ +[icon-different-for-precise-location-reftest.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.tentative.html.ini b/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.html.ini index 0792a3bfa23..50c2b92dac0 100644 --- a/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.tentative.html.ini +++ b/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.html.ini @@ -1,4 +1,4 @@ -[popover-toggle-source.tentative.html] +[popover-toggle-source.html] [ToggleEvent.source on popover elements: showPopover() without source.] expected: FAIL diff --git a/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini b/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini index 484aa044de7..4c0e53577a5 100644 --- a/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini +++ b/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini @@ -7,24 +7,3 @@ [Reload navigationStart > Original navigationStart] expected: FAIL - - [Reload domInteractive > Original domInteractive] - expected: FAIL - - [Reload domContentLoadedEventStart > Original domContentLoadedEventStart] - expected: FAIL - - [Reload fetchStart > Original fetchStart] - expected: FAIL - - [Reload domComplete > Original domComplete] - expected: FAIL - - [Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd] - expected: FAIL - - [Reload loadEventEnd > Original loadEventEnd] - expected: FAIL - - [Reload loadEventStart > Original loadEventStart] - expected: FAIL diff --git a/tests/wpt/meta/preload/preload-error.sub.html.ini b/tests/wpt/meta/preload/preload-error.sub.html.ini index f383c31f2fd..a1e25cb7fcd 100644 --- a/tests/wpt/meta/preload/preload-error.sub.html.ini +++ b/tests/wpt/meta/preload/preload-error.sub.html.ini @@ -80,8 +80,5 @@ [404 (xhr): main] expected: FAIL - [CORS (xhr): main] - expected: FAIL - [Decode-error (style): main] expected: FAIL diff --git a/tests/wpt/meta/resource-timing/idlharness.any.js.ini b/tests/wpt/meta/resource-timing/idlharness.any.js.ini index 1b04db72e66..017a702e581 100644 --- a/tests/wpt/meta/resource-timing/idlharness.any.js.ini +++ b/tests/wpt/meta/resource-timing/idlharness.any.js.ini @@ -44,6 +44,12 @@ [PerformanceResourceTiming interface: resource must inherit property "finalResponseHeadersStart" with the proper type] expected: FAIL + [PerformanceResourceTiming interface: attribute contentEncoding] + expected: FAIL + + [PerformanceResourceTiming interface: resource must inherit property "contentEncoding" with the proper type] + expected: FAIL + [idlharness.any.worker.html] [PerformanceResourceTiming interface: attribute workerStart] @@ -90,3 +96,9 @@ [PerformanceResourceTiming interface: resource must inherit property "finalResponseHeadersStart" with the proper type] expected: FAIL + + [PerformanceResourceTiming interface: attribute contentEncoding] + expected: FAIL + + [PerformanceResourceTiming interface: resource must inherit property "contentEncoding" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini b/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini new file mode 100644 index 00000000000..cc5bc5d7bcf --- /dev/null +++ b/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini @@ -0,0 +1,3 @@ +[add-routes.https.html] + [addRoutes() will not be executed outside of installing] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini b/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini new file mode 100644 index 00000000000..0c970ccf01d --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini @@ -0,0 +1,3 @@ +[script-enforcement-001-outerHTML.xhtml] + [Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini new file mode 100644 index 00000000000..2197bfc82f4 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini @@ -0,0 +1,78 @@ +[script-enforcement-001.html] + [Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.] + expected: FAIL + + [Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.] + expected: FAIL + + [Script source set via Node.nodeValue drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.data drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.appendData() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.insertData() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.replaceData() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.deleteData() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.before() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.after() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.remove() drops trustworthiness.] + expected: FAIL + + [Setting script source via CharacterData.replaceWith() drops trustworthiness.] + expected: FAIL + + [Setting script source via Node.appendChild() drops trustworthiness.] + expected: FAIL + + [Setting script source via Node.insertBefore() drops trustworthiness.] + expected: FAIL + + [Setting script source via Node.replaceChild() drops trustworthiness.] + expected: FAIL + + [Setting script source via Node.removeChild() drops trustworthiness.] + expected: FAIL + + [Setting script source via Element.prepend() drops trustworthiness.] + expected: FAIL + + [Setting script source via Element.append() drops trustworthiness.] + expected: FAIL + + [Setting script source via Element.replaceChildren() drops trustworthiness.] + expected: FAIL + + [Setting script source via Element.moveBefore() drops trustworthiness.] + expected: FAIL + + [Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness.] + expected: FAIL + + [Setting script source via Node.insertAdjacentText() drops trustworthiness.] + expected: FAIL + + [Setting script source via Range.insertNode() drops trustworthiness.] + expected: FAIL + + [Setting script source via Range.deleteContents() drops trustworthiness.] + expected: FAIL + + [Cloning a script via Node.cloneNode() drops trustworthiness.] + expected: FAIL + + [Cloning a script via Range.cloneContents() drops trustworthiness.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini b/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini new file mode 100644 index 00000000000..1ef88f7b5b8 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini @@ -0,0 +1,3 @@ +[script-enforcement-002-outerHTML.xhtml] + [Default policy's calls when setting script source via Element.outerHTML.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini new file mode 100644 index 00000000000..41e7738ccf6 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini @@ -0,0 +1,78 @@ +[script-enforcement-002.html] + [Default policy's calls when setting script source via Element.innerHTML.] + expected: FAIL + + [Default policy's calls when setting script source via Element.setHTMLUnsafe().] + expected: FAIL + + [Default policy's calls when setting script source via Node.nodeValue.] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.data.] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.appendData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.insertData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.replaceData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.deleteData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.before().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.after().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.remove().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.replaceWith().] + expected: FAIL + + [Default policy's calls when setting script source via Node.appendChild().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertBefore().] + expected: FAIL + + [Default policy's calls when setting script source via Node.replaceChild().] + expected: FAIL + + [Default policy's calls when setting script source via Node.removeChild().] + expected: FAIL + + [Default policy's calls when setting script source via Element.prepend().] + expected: FAIL + + [Default policy's calls when setting script source via Element.append().] + expected: FAIL + + [Default policy's calls when setting script source via Element.replaceChildren().] + expected: FAIL + + [Default policy's calls when setting script source via Element.moveBefore().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertAdjacentText().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertAdjacentHTML().] + expected: FAIL + + [Default policy's calls when setting source via Range.insertNode().] + expected: FAIL + + [Default policy's calls when setting script source via Range.deleteContents().] + expected: FAIL + + [Default policy's calls when cloning a script via Node.cloneNode().] + expected: FAIL + + [Default policy's calls when cloning a script via Range.cloneContents().] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini new file mode 100644 index 00000000000..bba588f2494 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini @@ -0,0 +1,16 @@ +[script-enforcement-003.html] + expected: ERROR + [The SVGScriptElement is initially trusted.] + expected: FAIL + + [Script source set via Element.textContent drops trustworthiness.] + expected: FAIL + + [Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.] + expected: FAIL + + [Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.] + expected: FAIL + + [Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini new file mode 100644 index 00000000000..4c417f4458c --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini @@ -0,0 +1,90 @@ +[script-enforcement-004.html] + [Default policy's calls when setting script source via SVGScriptElement.textContent.] + expected: FAIL + + [Default policy's calls when setting script source via Element.innerHTML.] + expected: FAIL + + [Default policy's calls when setting script source via Element.outerHTML.] + expected: FAIL + + [Default policy's calls when setting script source via Element.setHTMLUnsafe().] + expected: FAIL + + [Default policy when splitting script source via Text.splitText().] + expected: FAIL + + [Default policy when normalizing script source via Element.normalize().] + expected: FAIL + + [Default policy's calls when setting script source via Node.nodeValue.] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.data.] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.appendData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.insertData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.replaceData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.deleteData().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.before().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.after().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.remove().] + expected: FAIL + + [Default policy's calls when setting script source via CharacterData.replaceWith().] + expected: FAIL + + [Default policy's calls when setting script source via Node.appendChild().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertBefore().] + expected: FAIL + + [Default policy's calls when setting script source via Node.replaceChild().] + expected: FAIL + + [Default policy's calls when setting script source via Node.removeChild().] + expected: FAIL + + [Default policy's calls when setting script source via Element.prepend().] + expected: FAIL + + [Default policy's calls when setting script source via Element.append().] + expected: FAIL + + [Default policy's calls when setting script source via Element.replaceChildren().] + expected: FAIL + + [Default policy's calls when setting script source via Element.moveBefore().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertAdjacentText().] + expected: FAIL + + [Default policy's calls when setting script source via Node.insertAdjacentHTML().] + expected: FAIL + + [Default policy's calls when setting source via Range.insertNode().] + expected: FAIL + + [Default policy's calls when setting script source via Range.deleteContents().] + expected: FAIL + + [Default policy's calls when cloning a script via Node.cloneNode().] + expected: FAIL + + [Default policy's calls when cloning a script via Range.cloneContents().] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini new file mode 100644 index 00000000000..f727541ba68 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini @@ -0,0 +1,12 @@ +[script-enforcement-005.html] + [Empty HTMLScriptElement is executed if the default policy makes it non-empty.] + expected: FAIL + + [Non-empty HTMLScriptElement is not executed if the default policy makes it empty.] + expected: FAIL + + [Empty SVGScriptElement is executed if the default policy makes it non-empty.] + expected: FAIL + + [Non-empty SVGScriptElement is not executed if the default policy makes it empty.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini new file mode 100644 index 00000000000..7c5a0f69776 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini @@ -0,0 +1,10 @@ +[script-enforcement-006.html] + expected: ERROR + [Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy.] + expected: FAIL + + [Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy.] + expected: FAIL + + [Untrusted HTMLScriptElement of module type uses the source text returned by the default policy.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini new file mode 100644 index 00000000000..17441bdba75 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini @@ -0,0 +1,9 @@ +[script-enforcement-007.html] + [Untrusted SVGScriptElement with classic type uses the source text returned by the default policy.] + expected: FAIL + + [Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy.] + expected: FAIL + + [Untrusted SVGScriptElement of module type uses the source text returned by the default policy.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini new file mode 100644 index 00000000000..d5038450204 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini @@ -0,0 +1,12 @@ +[script-enforcement-008.https.html] + [script-src CSP directive is properly set.] + expected: FAIL + + [Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL + + [Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL + + [Untrusted HTMLScriptElement of module type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini new file mode 100644 index 00000000000..8f1e100dc66 --- /dev/null +++ b/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini @@ -0,0 +1,12 @@ +[script-enforcement-009.https.html] + [script-src CSP directive is properly set.] + expected: FAIL + + [Untrusted SVGScriptElement with classic type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL + + [Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL + + [Untrusted SVGScriptElement of module type uses the source text returned by the default policy for inline CSP check.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini new file mode 100644 index 00000000000..83853cd4511 --- /dev/null +++ b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini @@ -0,0 +1,3 @@ +[trusted-types-reporting-for-HTMLScriptElement-children-change.html] + [sink mismatch violation report when the script text is changed by manipulating its children.] + expected: FAIL diff --git a/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini new file mode 100644 index 00000000000..0bb7b27f96d --- /dev/null +++ b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini @@ -0,0 +1,6 @@ +[trusted-types-reporting-for-SVGScriptElement-children-change.html] + [sink mismatch violation report when the script text is changed by manipulating its children.] + expected: FAIL + + [inline check violation report when the script text is changed by manipulating its children.] + expected: FAIL diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 5d66c9ba352..9cb03196441 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -814,3 +814,12 @@ [X SNR (-9.749670615505378 dB) is not greater than or equal to 65.737. Got -9.749670615505378.] expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14650\]\t-1.5940678073099677e-36\t8.6956524848937988e-1\t8.6956524848937988e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[14651\]\t3.0547976493835449e-1\t8.9879405498504639e-1\t5.9331429004669189e-1\t6.6012262403823208e-1\t3.8985999999999999e-3\n\tMax AbsError of 8.6956524848937988e-1 at index of 14650.\n\tMax RelError of 1.0000000000000000e+0 at index of 14650.\n] + expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14650\]\t-2.9404888000000000e+7\t8.6956524848937988e-1\t2.9404888869565248e+7\t3.3815620990659192e+7\t3.8985999999999999e-3\n\t[14651\]\t3.0547976493835449e-1\t8.9879405498504639e-1\t5.9331429004669189e-1\t6.6012262403823208e-1\t3.8985999999999999e-3\n\tMax AbsError of 2.9404888869565248e+7 at index of 14650.\n\tMax RelError of 3.3815620990659192e+7 at index of 14650.\n] + expected: FAIL + + [X SNR (-105.9343049040375 dB) is not greater than or equal to 65.737. Got -105.9343049040375.] + expected: FAIL diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index cce286bb674..72c56c27fda 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -8608,7 +8608,7 @@ ], "css": { "ahem.css": [ - "51eede74aaa0b43f2c9235019bc73a508b1f14e4", + "a7db592e0df53e0b70f66ca7b31a7734db18887e", [] ] }, @@ -10654,7 +10654,7 @@ [] ], "no_mime_type.py": [ - "860005a42c237735287031133786352d7c732402", + "980eeee18f993f20a9df033f337a52ec93155ec4", [] ], "origin_helpers.js": [ diff --git a/tests/wpt/mozilla/tests/css/css/ahem.css b/tests/wpt/mozilla/tests/css/css/ahem.css index 51eede74aaa..a7db592e0df 100644 --- a/tests/wpt/mozilla/tests/css/css/ahem.css +++ b/tests/wpt/mozilla/tests/css/css/ahem.css @@ -1,3 +1,9 @@ +@font-face { + font-family: 'ahem'; + src: local('Ahem'), + url('/fonts/Ahem.ttf'); +} + body { font-family: 'ahem'; font-size: 100px; diff --git a/tests/wpt/mozilla/tests/mozilla/resources/no_mime_type.py b/tests/wpt/mozilla/tests/mozilla/resources/no_mime_type.py index 860005a42c2..980eeee18f9 100644 --- a/tests/wpt/mozilla/tests/mozilla/resources/no_mime_type.py +++ b/tests/wpt/mozilla/tests/mozilla/resources/no_mime_type.py @@ -7,5 +7,5 @@ def main(request, response): headers = [] if b'Content-Type' in request.GET: headers += [(b'Content-Type', request.GET[b'Content-Type'])] - with open('./resources/ahem/AHEM____.TTF', 'rb') as f: + with open('./tests/wpt/tests/fonts/Ahem.ttf', 'rb') as f: return 200, headers, f.read() diff --git a/tests/wpt/tests/.github/workflows/docker.yml b/tests/wpt/tests/.github/workflows/docker.yml index 06704fff106..12b5adc7ee9 100644 --- a/tests/wpt/tests/.github/workflows/docker.yml +++ b/tests/wpt/tests/.github/workflows/docker.yml @@ -40,7 +40,7 @@ jobs: latest type=raw,value=${{ inputs.tag }} - name: Build and push the Docker image - uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0 + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 with: context: ./tools/docker push: true diff --git a/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml b/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml new file mode 100644 index 00000000000..4a4f623e84b --- /dev/null +++ b/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml @@ -0,0 +1,59 @@ +name: "test-jobs" +on: + pull_request: + +jobs: + decision: + name: ./wpt test-jobs + runs-on: ubuntu-24.04 + outputs: + test_jobs: ${{ steps.test_jobs.outputs.test_jobs }} + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 2 + - name: ./wpt test-jobs + id: test_jobs + run: | + set -eux + echo "test_jobs=$( ./wpt test-jobs --json HEAD^1..HEAD )" >> $GITHUB_OUTPUT + + affected_safari_preview: + name: "affected tests: Safari Technology Preview" + needs: decision + if: contains(fromJSON(needs.decision.outputs.test_jobs), 'affected_tests') + uses: ./.github/workflows/safari-wptrunner.yml + with: + artifact-name: "safari-preview-affected-tests" + safari-technology-preview: true + safaridriver-diagnose: false + fetch-depth: 2 + extra-options: "--affected ${{ github.sha }}^1" + + affected_without_changes_safari_preview: + name: "affected tests without changes: Safari Technology Preview" + needs: decision + if: contains(fromJSON(needs.decision.outputs.test_jobs), 'affected_tests') + uses: ./.github/workflows/safari-wptrunner.yml + with: + artifact-name: safari-preview-affected-tests-without-changes + safari-technology-preview: true + safaridriver-diagnose: false + fetch-depth: 2 + test-rev: "HEAD^1" + extra-options: "--affected ${{ github.sha }}" + + infrastructure_mac: + name: "infrastructure/ tests: macOS" + needs: decision + if: contains(fromJSON(needs.decision.outputs.test_jobs), 'wptrunner_infrastructure') + uses: ./.github/workflows/safari-wptrunner.yml + with: + artifact-name: safari-infrastructure-results + safari-technology-preview: true + safaridriver-diagnose: false + extra-options: >- + --manifest MANIFEST.json + --metadata infrastructure/metadata/ + --include infrastructure/ diff --git a/tests/wpt/tests/.github/workflows/safari-wptrunner.yml b/tests/wpt/tests/.github/workflows/safari-wptrunner.yml index 9cfc8a7eeeb..d90414d5241 100644 --- a/tests/wpt/tests/.github/workflows/safari-wptrunner.yml +++ b/tests/wpt/tests/.github/workflows/safari-wptrunner.yml @@ -15,6 +15,26 @@ on: description: "Run safaridriver capturing diagnostics" required: true type: boolean + fetch-ref: + description: "The ref to fetch and initially checkout" + required: false + type: string + fetch-depth: + description: "The fetch-depth to checkout" + required: false + type: number + test-rev: + description: "The rev to checkout before running the tests" + required: false + type: string + matrix-include: + description: "Extra items to include in the matrix, to override test-type/current-chunk/total-chunks" + required: false + type: string + extra-options: + description: "Extra options to pass to wpt run" + required: false + type: string # We never interact with the GitHub API, thus we can simply disable all # permissions the GitHub token would have. @@ -29,13 +49,23 @@ jobs: timeout-minutes: 180 strategy: matrix: - current-chunk: [1, 2, 3, 4, 5, 6, 7, 8] - total-chunks: [8] + current-chunk: + - 1 + total-chunks: + - 1 + include: ${{ fromJSON(inputs.matrix-include || '[]') }} steps: - name: checkout uses: actions/checkout@v4.1.0 with: - fetch-depth: 1 + fetch-depth: ${{ inputs.fetch-depth || 1 }} + ref: ${{ inputs.fetch-ref }} + - name: test-checkout + if: inputs.test-rev + env: + REV: ${{ inputs.test-rev }} + run: |- + git switch --force --progress -d "$REV" - name: Set display color profile run: |- ./wpt macos-color-profile @@ -71,8 +101,9 @@ jobs: --no-manifest-update \ --no-restart-on-unexpected \ --no-fail-on-unexpected \ - --this-chunk=${{ matrix.current-chunk }} \ - --total-chunks=${{ matrix.total-chunks }} \ + --no-pause \ + --this-chunk ${{ matrix.current-chunk }} \ + --total-chunks ${{ matrix.total-chunks }} \ --chunk-type hash \ --log-wptreport ${{ runner.temp }}/wpt_report_${{ matrix.current-chunk }}.json \ --log-wptscreenshot ${{ runner.temp }}/wpt_screenshot_${{ matrix.current-chunk }}.txt \ @@ -81,6 +112,8 @@ jobs: --channel ${{ inputs.safari-technology-preview && 'preview' || 'stable' }} \ --kill-safari \ --max-restarts 100 \ + ${{ inputs.extra-options }} \ + -- \ safari - name: Publish results uses: actions/upload-artifact@v4.1.0 @@ -105,8 +138,8 @@ jobs: - name: Cleanup if: always() run: |- - set -ux - sudo sed -i '' '/^# Start web-platform-tests hosts$/,/^# End web-platform-tests hosts$/d' /etc/hosts + set -ux + sudo sed -i '' '/^# Start web-platform-tests hosts$/,/^# End web-platform-tests hosts$/d' /etc/hosts safari-notify: needs: safari-results diff --git a/tests/wpt/tests/.github/workflows/safari_stable.yml b/tests/wpt/tests/.github/workflows/safari_stable.yml index 7c344fe667f..4c2acce5c27 100644 --- a/tests/wpt/tests/.github/workflows/safari_stable.yml +++ b/tests/wpt/tests/.github/workflows/safari_stable.yml @@ -7,7 +7,8 @@ permissions: {} on: workflow_dispatch: workflow_run: - workflows: [epochs] + workflows: + - epochs types: - completed push: @@ -34,3 +35,12 @@ jobs: artifact-name: "safari-results" safari-technology-preview: false safaridriver-diagnose: false + matrix-include: >- + [{"current-chunk": 1, "total-chunks": 8}, + {"current-chunk": 2, "total-chunks": 8}, + {"current-chunk": 3, "total-chunks": 8}, + {"current-chunk": 4, "total-chunks": 8}, + {"current-chunk": 5, "total-chunks": 8}, + {"current-chunk": 6, "total-chunks": 8}, + {"current-chunk": 7, "total-chunks": 8}, + {"current-chunk": 8, "total-chunks": 8}] diff --git a/tests/wpt/tests/.github/workflows/safari_technology_preview.yml b/tests/wpt/tests/.github/workflows/safari_technology_preview.yml index 70827a365ac..e2f4c64f460 100644 --- a/tests/wpt/tests/.github/workflows/safari_technology_preview.yml +++ b/tests/wpt/tests/.github/workflows/safari_technology_preview.yml @@ -7,7 +7,8 @@ permissions: {} on: workflow_dispatch: workflow_run: - workflows: [epochs] + workflows: + - epochs types: - completed push: @@ -34,3 +35,12 @@ jobs: artifact-name: "safari-technology-preview-results" safari-technology-preview: true safaridriver-diagnose: false + matrix-include: >- + [{"current-chunk": 1, "total-chunks": 8}, + {"current-chunk": 2, "total-chunks": 8}, + {"current-chunk": 3, "total-chunks": 8}, + {"current-chunk": 4, "total-chunks": 8}, + {"current-chunk": 5, "total-chunks": 8}, + {"current-chunk": 6, "total-chunks": 8}, + {"current-chunk": 7, "total-chunks": 8}, + {"current-chunk": 8, "total-chunks": 8}] diff --git a/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js b/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js index 80cbfa485e3..1e2efd11c62 100644 --- a/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js +++ b/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js @@ -1,4 +1,4 @@ -// META: title=Detect english +// META: title=LanguageDetector locale tests // META: global=window // META: timeout=long // META: script=resources/util.js @@ -12,23 +12,6 @@ function getAvailability(expectedInputLanguages) { return LanguageDetector.availability({expectedInputLanguages}); } -function assert_availability_consistent( - language_subtag_availability, base_availability) { - if (base_availability == 'unavailable') { - // If the language subtag is not available then no variation of it should - // be available. - assert_equals(language_subtag_availability, 'unavailable'); - } else { - // If the language subtag is available, then it definitely shouldn't be - // unavailable since whatever backing it has could support any variation of - // it. A variation could have a different availability if a more specific - // backing is required. - assert_in_array( - language_subtag_availability, - ['downloadable', 'downloading', 'available']); - } -} - promise_test(async t => { for (const [languageSubtag, variations] of Object.entries( valid_language_tags)) { diff --git a/tests/wpt/tests/ai/language_detection/detector.https.window.js b/tests/wpt/tests/ai/language_detection/detector.https.window.js index 379b8741534..ae21b463538 100644 --- a/tests/wpt/tests/ai/language_detection/detector.https.window.js +++ b/tests/wpt/tests/ai/language_detection/detector.https.window.js @@ -66,16 +66,7 @@ promise_test(async t => { }, 'LanguageDetector.detect() returns valid results'); promise_test(async t => { - const error = new Error('CreateMonitorCallback threw an error'); - function monitor(m) { - m.addEventListener('downloadprogress', e => { - assert_unreached( - 'This should never be reached since monitor throws an error.'); - }); - throw error; - } - - await promise_rejects_exactly(t, error, createLanguageDetector({monitor})); + await testCreateMonitorCallbackThrowsError(t, createLanguageDetector); }, 'If monitor throws an error, LanguageDetector.create() rejects with that error'); promise_test(async t => { diff --git a/tests/wpt/tests/ai/resources/locale-util.js b/tests/wpt/tests/ai/resources/locale-util.js index cacb11f4f25..70a00a5630b 100644 --- a/tests/wpt/tests/ai/resources/locale-util.js +++ b/tests/wpt/tests/ai/resources/locale-util.js @@ -42,3 +42,20 @@ function assert_is_variation(variation_language_tag, expected_language_tag) { const expected_locale = new Intl.Locale(expected_language_tag); assert_equals(variation_locale.language, expected_locale.language); } + +function assert_availability_consistent( + language_subtag_availability, variation_availability) { + if (variation_availability == 'unavailable') { + // If the language subtag is not available then no variation of it should + // be available. + assert_equals(language_subtag_availability, 'unavailable'); + } else { + // If the language subtag is available, then it definitely shouldn't be + // unavailable since whatever backing it has could support any variation of + // it. A variation could have a different availability if a more specific + // backing is required. + assert_in_array( + language_subtag_availability, + ['downloadable', 'downloading', 'available']); + } +} diff --git a/tests/wpt/tests/ai/resources/util.js b/tests/wpt/tests/ai/resources/util.js index 84507a409e9..eda6a17a24f 100644 --- a/tests/wpt/tests/ai/resources/util.js +++ b/tests/wpt/tests/ai/resources/util.js @@ -182,6 +182,20 @@ async function testMonitor(createFunc, options = {}) { return result; } +async function testCreateMonitorCallbackThrowsError( + t, createFunc, options = {}) { + const error = new Error('CreateMonitorCallback threw an error'); + function monitor(m) { + m.addEventListener('downloadprogress', e => { + assert_unreached( + 'This should never be reached since monitor throws an error.'); + }); + throw error; + } + + await promise_rejects_exactly(t, error, createFunc({...options, monitor})); +} + function run_iframe_test(iframe, test_name) { const id = getId(); iframe.contentWindow.postMessage({id, type: test_name}, '*'); diff --git a/tests/wpt/tests/ai/translator/translator-locale.https.window.js b/tests/wpt/tests/ai/translator/translator-locale.https.window.js index 73e7eff20d2..27dd2605576 100644 --- a/tests/wpt/tests/ai/translator/translator-locale.https.window.js +++ b/tests/wpt/tests/ai/translator/translator-locale.https.window.js @@ -1,4 +1,4 @@ -// META: title=Detect english +// META: title=Translator locale tests // META: global=window // META: timeout=long // META: script=resources/util.js @@ -8,7 +8,68 @@ 'use strict'; -function assert_rejects_invalid_expected_input_languages( +function getAvailability(sourceLanguage, targetLanguage) { + return Translator.availability({sourceLanguage, targetLanguage}); +} + +promise_test(async t => { + for (const [sourceLanguageSubtag, sourceVariations] of Object.entries( + valid_language_tags)) { + for (const [targetLanguageSubtag, targetVariations] of Object.entries( + valid_language_tags)) { + const languageSubtagAvailability = + await getAvailability(sourceLanguageSubtag, targetLanguageSubtag); + + // All variations should be consistent with the language subtag. + for (const sourceVariation of sourceVariations) { + for (const targetVariation of targetVariations) { + assert_availability_consistent( + await getAvailability(sourceVariation, targetVariation), + languageSubtagAvailability); + } + } + } + } +}, 'Translator.availability() is consistent between language tag variations'); + +async function assert_valid_languages(inSourceLanguage, inTargetLanguage) { + if (['downloading', 'downloadable'].includes( + await getAvailability(inSourceLanguage, inTargetLanguage))) { + await test_driver.bless(); + } + + const {sourceLanguage: outSourceLanguage, targetLanguage: outTargetLanguage} = + await Translator.create( + {sourceLanguage: inSourceLanguage, targetLanguage: inTargetLanguage}); + + assert_is_variation(inSourceLanguage, outSourceLanguage); + assert_is_canonical(outSourceLanguage); + assert_is_variation(inTargetLanguage, outTargetLanguage); + assert_is_canonical(outTargetLanguage); +} + +promise_test(async t => { + for (const [sourceLanguageSubtag, sourceVariations] of Object.entries( + valid_language_tags)) { + for (const [targetLanguageSubtag, targetVariations] of Object.entries( + valid_language_tags)) { + if (await getAvailability(sourceLanguageSubtag, targetLanguageSubtag) === + 'unavailable') { + continue; + } + + await assert_valid_languages(sourceLanguageSubtag, targetLanguageSubtag); + + for (const sourceVariation of sourceVariations) { + for (const targetVariation of targetVariations) { + await assert_valid_languages(sourceVariation, targetVariation); + } + } + } + } +}, 'Translator has valid source and target languages'); + +function assert_rejects_invalid_languages( t, method, sourceLanguage, targetLanguage) { return promise_rejects_js( t, RangeError, method({sourceLanguage, targetLanguage})); @@ -19,21 +80,21 @@ function testInvalidLanguagePairs(t, method) { // Invalid source language. for (const sourceLanguage of invalid_language_tags) { for (const targetLanguage of allValidLanguageTags) { - assert_rejects_invalid_expected_input_languages( + assert_rejects_invalid_languages( t, method, sourceLanguage, targetLanguage); } } // Invalid target language. for (const sourceLanguage of allValidLanguageTags) { for (const targetLanguage of invalid_language_tags) { - assert_rejects_invalid_expected_input_languages( + assert_rejects_invalid_languages( t, method, sourceLanguage, targetLanguage); } } // Invalid source and target language for (const sourceLanguage of invalid_language_tags) { for (const targetLanguage of invalid_language_tags) { - assert_rejects_invalid_expected_input_languages( + assert_rejects_invalid_languages( t, method, sourceLanguage, targetLanguage); } } @@ -43,8 +104,8 @@ promise_test(async t => { // We don't need to consume user activation since it should throw a RangeError // before it even can check if it needs to consume user activation. testInvalidLanguagePairs(t, Translator.create); -}, 'LanguageDetector.create() throws RangeError for invalid language tags'); +}, 'Translator.create() throws RangeError for invalid language tags'); promise_test(async t => { testInvalidLanguagePairs(t, Translator.availability); -}, 'LanguageDetector.availability() throws RangeError for invalid language tags'); +}, 'Translator.availability() throws RangeError for invalid language tags'); diff --git a/tests/wpt/tests/ai/translator/translator.https.window.js b/tests/wpt/tests/ai/translator/translator.https.window.js new file mode 100644 index 00000000000..722430fe631 --- /dev/null +++ b/tests/wpt/tests/ai/translator/translator.https.window.js @@ -0,0 +1,16 @@ +// META: title=Translator tests +// META: global=window +// META: timeout=long +// META: script=../resources/util.js +// META: script=/resources/testdriver.js +// META: script=resources/util.js +// +// Setting `timeout=long` as this test may require downloading the translation +// library and the language models. + +promise_test(async t => { + // Can pass in valid but unsupported languages since the create monitor error + // should be thrown before language support is checked. + await testCreateMonitorCallbackThrowsError( + t, createTranslator, {sourceLanguage: 'und', targetLanguage: 'und'}); +}, 'If monitor throws an error, LanguageDetector.create() rejects with that error'); diff --git a/tests/wpt/tests/ai/translator/translator.optional.https.window.js b/tests/wpt/tests/ai/translator/translator.optional.https.window.js index 2a4c5a6c5dd..ce01efed143 100644 --- a/tests/wpt/tests/ai/translator/translator.optional.https.window.js +++ b/tests/wpt/tests/ai/translator/translator.optional.https.window.js @@ -1,8 +1,7 @@ -// META: title=Translator Translate +// META: title=Optional Translator tests // META: global=window // META: timeout=long // META: script=../resources/util.js -// META: script=../resources/language_codes.js // META: script=/resources/testdriver.js // META: script=resources/util.js // diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html b/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html new file mode 100644 index 00000000000..70977ca4c40 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<title>Positioning pseudo-elements using anchor functions</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#positioning"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +body { margin: 0 } +#anchor, #target::before, #target::after { + width: 100px; + height: 100px; + position: absolute; +} +#anchor.moved { + left: 200px; + top: 200px; +} +#anchor { + left: 50px; + top: 100px; + anchor-name: --a; + background: blue; +} +#target::before { + position-anchor: --a; + left: anchor(right); + top: anchor(top); + background: green; + content:''; +} +#target::after { + position-anchor: --a; + left: anchor(left); + top: anchor(bottom); + background: green; + content:''; +} +</style> +<div id=anchor></div> +<div id=target></div> +<script> +test(() => { + assert_equals(getComputedStyle(target, '::before').top, '100px', "#target::before top is positioned against anchor"); + assert_equals(getComputedStyle(target, '::before').left, '150px', "#target::before left is positioned against anchor"); + assert_equals(getComputedStyle(target, '::after').top, '200px', "#target::after top is positioned against anchor"); + assert_equals(getComputedStyle(target, '::after').left, '50px', "#target::after left is positioned against anchor"); +}, "Initial anchored position"); + +test(() => { + anchor.classList.add("moved"); + assert_equals(getComputedStyle(target, '::before').top, '200px', "#target::before top is positioned against anchor"); + assert_equals(getComputedStyle(target, '::before').left, '300px', "#target::before left is positioned against anchor"); + assert_equals(getComputedStyle(target, '::after').top, '300px', "#target::after top is positioned against anchor"); + assert_equals(getComputedStyle(target, '::after').left, '200px', "#target::after left is positioned against anchor"); +}, "Anchored position after moving"); +</script> diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html b/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html new file mode 100644 index 00000000000..26965fe8bf4 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>CSS Anchor Positioning Test: Invalidation of fallback without anchor references</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-apply"> +<link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> +<style> + #anchor { + anchor-name: --anchor; + background: green; + width: 100px; + height: 100vh; + } + #anchored { + background: green; + top: anchor(--anchor bottom); + width: 100px; + height: 50px; + position: absolute; + position-try: --bottom; + } + + @position-try --bottom { + top: auto; + bottom: 0px; + } +</style> +<p>Test passes if there is a filled green square.</p> +<div id="anchor"></div> +<div id="anchored"></div> +<script> + anchor.offsetTop; + anchor.style.height = "50px"; +</script> diff --git a/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html b/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html new file mode 100644 index 00000000000..a1179c62ed0 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>CSS Anchor Positioning Test: inherit height from fallback height</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks"> +<link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> +<style> + #container { + position: relative; + } + #anchor { + anchor-name: --a1; + width: 0px; + height: 100px; + } + #anchored { + position-area: left center; + position: absolute; + position-anchor: --a1; + position-try-fallbacks: --f1; + width: 100px; + } + #child { + height: inherit; + background: green; + } + @position-try --f1 { + position-area: right center; + height: 100px; + } +</style> +<p>Test passes if there is a filled green square.</p> +<div id="container"> + <div id="anchor"></div> + <div id="anchored"> + <div id="child"></div> + </div> +</div> diff --git a/tests/wpt/tests/css/css-break/WEB_FEATURES.yml b/tests/wpt/tests/css/css-break/WEB_FEATURES.yml index 49ecf06d287..1f47ce3fbaf 100644 --- a/tests/wpt/tests/css/css-break/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-break/WEB_FEATURES.yml @@ -2,3 +2,6 @@ features: - name: box-decoration-break files: - box-decoration-break-* +- name: page-break-aliases + files: + - page-break-legacy-shorthands.html diff --git a/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html b/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html index aba4b752b2f..3dc29da6dd3 100644 --- a/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html +++ b/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html @@ -50,8 +50,8 @@ test((t) => { test((t) => { main.append(test_visited.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':visited as scoped selector'); </script> @@ -68,8 +68,8 @@ test((t) => { test((t) => { main.append(test_not_link.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':not(:link) as scoped selector'); </script> @@ -86,8 +86,8 @@ test((t) => { test((t) => { main.append(test_not_visited.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':not(:visited) as scoped selector'); </script> @@ -106,8 +106,8 @@ test((t) => { test((t) => { main.append(test_link_root.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':link as scoping root'); </script> @@ -124,8 +124,8 @@ test((t) => { test((t) => { main.append(test_visited_root.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':visited as scoping root'); </script> @@ -142,8 +142,8 @@ test((t) => { test((t) => { main.append(test_not_visited_root.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':not(:visited) as scoping root'); </script> @@ -160,8 +160,8 @@ test((t) => { test((t) => { main.append(test_not_link_root.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':not(:link) as scoping root'); </script> @@ -180,8 +180,8 @@ test((t) => { test((t) => { main.append(test_link_root_scope.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':link as scoping root, :scope'); </script> @@ -198,8 +198,8 @@ test((t) => { test((t) => { main.append(test_visited_root_scope.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':visited as scoping root, :scope'); </script> @@ -216,8 +216,8 @@ test((t) => { test((t) => { main.append(test_not_visited_root_scope.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':not(:visited) as scoping root, :scope'); </script> @@ -234,8 +234,8 @@ test((t) => { test((t) => { main.append(test_not_link_root_scope.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':not(:link) as scoping root, :scope'); </script> @@ -254,8 +254,8 @@ test((t) => { test((t) => { main.append(test_link_scoping_limit.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':link as scoping limit'); </script> @@ -272,8 +272,8 @@ test((t) => { test((t) => { main.append(test_visited_scoping_limit.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':visited as scoping limit'); </script> @@ -290,8 +290,8 @@ test((t) => { test((t) => { main.append(test_not_link_scoping_limit.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited'); }, ':not(:link) as scoping limit'); </script> @@ -308,7 +308,7 @@ test((t) => { test((t) => { main.append(test_not_visited_scoping_limit.content.cloneNode(true)); t.add_cleanup(() => main.replaceChildren()); - assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)'); - assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)'); + assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited'); + assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited'); }, ':not(:visited) as scoping limit'); </script> diff --git a/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html b/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html index 9f96bbc2fed..d73e4b4c357 100644 --- a/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html +++ b/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html @@ -25,6 +25,7 @@ test_invalid_value("contain", "size layout size"); test_invalid_value("contain", "paint content"); test_invalid_value("contain", "size inline-size"); test_invalid_value("contain", "inline-size inline-size"); +test_invalid_value("contain", "view-transition view-transition"); </script> </body> </html> diff --git a/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html b/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html new file mode 100644 index 00000000000..da358741b7b --- /dev/null +++ b/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#contain-property"> +<!-- TODO link scoped-view-transition-spec once available --> +<meta name="assert" content="contain supports view-transition'."> +<meta name="assert" content="contain serializes in canonical order."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +</body> +<script> +/* Note this test is an extension of contain-valid. Once + contain: view-transition" is resolved, this test should be moved or + replaced, depending on the resolution. */ +test_valid_value("contain", "view-transition"); +test_valid_value("contain", "view-transition layout", "layout view-transition"); +test_valid_value("contain", + "paint view-transition style", + "style paint view-transition"); +</script> +</html> diff --git a/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html new file mode 100644 index 00000000000..46306a8ffaa --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<title>Crash test found by fuzzer. Multicol, non visible overflow without scrollable container and a visible gap rule +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +<div style="columns:2; column-fill:auto; height:100px; column-rule:solid; contain:paint;"> + <div style="height:101px;"></div> +</div> diff --git a/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html new file mode 100644 index 00000000000..9c03f592cfe --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<head> + <title>Crash test found by fuzzer.</title> + <link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> + <link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +</head> +<style> + body > * { + column-rule: repeat(5, 100px); + } +</style> +<body> + <fieldset> +</body> diff --git a/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html new file mode 100644 index 00000000000..d4cbf509854 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +<style> + body { + margin: 0; + } + + main { + display: flex; + flex-wrap: wrap; + gap: 10px; + } + + .item { + background-color: teal; + height: 50px; + flex-basis: 100%; + } + + .row-gap { + position: absolute; + top: 50px; + left: 0px; + background: gold; + width: 100%; + height: 10px; + } +</style> +<main> + <div class="item"></div> + <div class="item"></div> + <div class="row-gap"></div> +</main> diff --git a/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html new file mode 100644 index 00000000000..42b46a301c3 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<title> + CSS Gap Decorations: flex gaps are painted when there's only one flex line +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="match" href="flex-gap-decorations-025-ref.html"> +<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +<style> + body { + margin: 0; + } + + main { + display: flex; + flex-wrap: wrap; + gap: 10px; + row-rule: 10px solid gold; + } + + .item { + background-color: teal; + height: 50px; + flex-basis: 100%; + } +</style> +<main> + <div class="item"></div> + <div class="item"></div> +</main> diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html new file mode 100644 index 00000000000..920e1b4d05a --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title> + CSS Gap Decorations: Column gutter with no column gaps and row gaps with no row gutter should not crash. +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> +<style> + .grid-container { + display: grid; + column-gap: 40px; + + grid-template: 1fr 1fr / 1fr; + column-rule: solid blue; + } +</style> + +<div class="grid-container"></div> diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html new file mode 100644 index 00000000000..b4e69929d2d --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title> + CSS Gap Decorations: Row gutter with no row gaps and column gaps with no column gutter should not crash. +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> +<style> + .grid-container { + display: grid; + row-gap: 40px; + + grid-template: 1fr/ 1fr 1fr; + row-rule: solid red; + } +</style> + +<div class="grid-container"></div> diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html new file mode 100644 index 00000000000..b002cf0fb3a --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/#break"> +<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +<style> + #container, + body { + overflow: hidden; + margin: 0px; + } + + #container { + display: grid; + grid-template-rows: 4rem 2rem auto; + width: 80%; + gap: 2px; + border: solid 2px black; + row-rule: 2px solid hotpink, 1px dashed grey; + background-color: teal; + } + + #one { + height: 100px; + width: 100px; + } +</style> +<div id="container"> + <div id="one"></div> +</div> diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html new file mode 100644 index 00000000000..a90d45df442 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title> + CSS Gap Decorations: Make sure decorations resize when container/window resizes. +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="match" href="grid-gap-decorations-045-ref.html"> +<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com"> +<style> + #container, + body { + overflow: hidden; + margin: 0px; + } + + #container { + display: grid; + grid-template-rows: 4rem 2rem auto; + width: 50%; + gap: 2px; + border: solid 2px black; + row-rule: 2px solid hotpink, 1px dashed grey; + background-color: teal; + } + + #one { + height: 100px; + width: 100px; + } +</style> +<div id="container"> + <div id="one"></div> +</div> +<script> + window.addEventListener('load', function () { + const container = document.getElementById('container'); + container.style.width = '80%'; + }); +</script> diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html new file mode 100644 index 00000000000..64ca1cdddff --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<title> + CSS Gap Decorations: rules are painted when container contains an OOF child. +</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1/"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="position: relative; display: grid; grid-template-columns: 0px 0px; grid-template-rows: 100px; column-gap: 100px; column-rule: solid green 100px; width: max-content; background:red;"> + <div id="target" style="position: absolute; left: 0; top: 0;"></div> +</div> +<script> +document.body.offsetTop; +target.style.left = '10px'; +</script> diff --git a/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html b/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html new file mode 100644 index 00000000000..19309e87efc --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Gap Decoration: renderer doesn't crash when rule values are set to initial</title> +<link rel="help" href="https://drafts.csswg.org/css-gaps-1"> +<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> +</head> +<body> +<div id="target" style="column-rule-width: initial; column-rule-color: initial; column-rule-style: solid;"></div> +</body> +<script> + document.getElementById("target").style.columnRule; +</script> +</html> diff --git a/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html b/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html index 0093f9be232..26b30d2a0be 100644 --- a/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html +++ b/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html @@ -62,6 +62,15 @@ }, 'Highlight add and has methods work as expected' + rangesCombinationDescription); test(() => { + let customHighlight = new Highlight(); + customHighlight.add(rangeCollections[i][0]).add(rangeCollections[i][1]); + assert_true(customHighlight.has(rangeCollections[i][0]), 'Highlight.has returns true when it contains the first range added'); + assert_true(customHighlight.has(rangeCollections[i][1]), 'Highlight.has returns true when it contains the second range added'); + assert_false(customHighlight.has(rangeCollections[i][2]), 'Highlight.has returns false when it doesn\'t contain the range which is passed as the argument'); + assert_equals(customHighlight.size, 2, 'Highlight.size is 2 after adding two different ranges by chaining the add method'); + }, "Highlight add method is chainable" + rangesCombinationDescription); + + test(() => { let customHighlight = new Highlight(rangeCollections[i][0], rangeCollections[i][1]); assert_false(customHighlight.delete(rangeCollections[i][2]), 'Highlight.delete returns false when trying to delete a range that is not in the highlight'); assert_true(customHighlight.delete(rangeCollections[i][1]), 'Highlight.delete returns true when trying to delete a range that is in the highlight'); diff --git a/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html b/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html index d8bbe4731f6..50fccd2347d 100644 --- a/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html +++ b/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html @@ -70,6 +70,9 @@ assert_equals(CSS.highlights.size, 0, 'HighlightRegistry.clear empties the map.'); CSS.highlights.clear(); assert_equals(CSS.highlights.size, 0, 'HighlightRegistry.clear called with an empty registry keeps it empty.'); + + CSS.highlights.set(name1, h1).set(name2, h2); + assert_equals(CSS.highlights.size, 2, 'HighlightRegistry.size is 2 after inserting two different Highlights by chaining the set method.'); }, 'HighlightRegistry has a maplike interface.'); </script> diff --git a/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html b/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html index 536b7d2560c..355c2f601fa 100644 --- a/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html +++ b/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html @@ -7,7 +7,7 @@ <link rel="help" href="https://w3c.github.io/PNG-spec/#eXIf"> <link rel="match" href="reference/image-orientation-exif-png-ref.html"> <style> - div { width: 400px; height: 400px } + div { width: 400px; height: 400px; display: inline-block; } div.early { background-image: url(support/F-exif-chunk-early.png)} div.late {background-image: url(support/F-exif-late.png)} </style> diff --git a/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.tentative.html b/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.html index 03545a15583..03545a15583 100644 --- a/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.tentative.html +++ b/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.html diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.html index 5e71923c01b..5e71923c01b 100644 --- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.tentative.html +++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.html diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.html index fdeb7971429..fdeb7971429 100644 --- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.tentative.html +++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.html diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.html index 8fda73b055e..8fda73b055e 100644 --- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.tentative.html +++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.html diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.html index d089a90104c..d089a90104c 100644 --- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.tentative.html +++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.html diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html index 11c28021741..11c28021741 100644 --- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html +++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html new file mode 100644 index 00000000000..37c6c44f57b --- /dev/null +++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html @@ -0,0 +1,33 @@ +<!doctype html> +<meta charset="utf-8" /> +<title> + Contextually invalid selectors due to implicit :is() in nesting should not match and have no + specificity +</title> +<link rel="help" href="https://drafts.csswg.org/css-nesting/#nest-selector" /> +<link + rel="match" + href="/css/reference/ref-filled-green-100px-square-only.html" +/> +<style> + div { + color: green; + background-color: currentColor; + width: 100px; + height: 100px; + } + + p { + color: initial; + } + + *, + ::before { + & * { + color: red; + } + } +</style> + +<p>Test passes if there is a filled green square.</p> +<div></div> diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-002.html index f3cdc674fd5..7c722468e1c 100644 --- a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors.html +++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-002.html @@ -21,13 +21,6 @@ color: initial; } - *, - ::before { - & * { - color: red; - } - } - :is(*, ::before) * { color: purple; } diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html new file mode 100644 index 00000000000..01d0a819fa5 --- /dev/null +++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html @@ -0,0 +1,33 @@ +<!doctype html> +<meta charset="utf-8" /> +<title> + Contextually invalid selectors due to :is() should not match and have no + specificity +</title> +<link rel="help" href="https://drafts.csswg.org/css-nesting/#nest-selector" /> +<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=293230"> +<link + rel="match" + href="/css/reference/ref-filled-green-100px-square-only.html" +/> +<style> + div { + color: green; + background-color: currentColor; + width: 100px; + height: 100px; + } + + p { + color: initial; + } + + div::before { + & { /* `&` must not match the originating element */ + color: red; + } + } +</style> + +<p>Test passes if there is a filled green square.</p> +<div></div> diff --git a/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html b/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html new file mode 100644 index 00000000000..1ab02f1a787 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/421199213"> +<style> + #scroller { + overflow: scroll; + scroll-marker-group: before; + } + #item::scroll-marker { content: counter(x); } +</style> +<p>Pass if no crash</p> +<div id="scroller"> + <div id="item"></div> +</div> diff --git a/tests/wpt/tests/css/css-overflow/clip-008.html b/tests/wpt/tests/css/css-overflow/clip-008.html new file mode 100644 index 00000000000..8fb45252aa7 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/clip-008.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>border-radius should not clip contents if overflow is clipped in only one direction</title> +<link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com" /> +<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#corner-clipping"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<style> + #testHolder { + width: 100px; + height: 100px; + background-color: red; + } + #clipped { + width: 100px; + height: 100px; + overflow-x: clip; + background-color: wheat; + border-radius: 50%; + } + #contents { + width: 100px; + height: 100px; + background-color: green; + } +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="testHolder"> + <div id="clipped"> + <div id="contents"></div> + </div> +</div> diff --git a/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html b/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html new file mode 100644 index 00000000000..0c837737546 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html @@ -0,0 +1,49 @@ +<!doctype html> +<meta charset="utf-8"> +<title>overflow: rtl scroll left should return 0 when overflow size is empty</title> +<link rel="author" href="mailto:perryuwang@gmail.com"> +<link rel="help" href="https://issues.chromium.org/issues/40064904"> +<script src="/css/css-transitions/support/helper.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + #rtl-parent { + direction: rtl; + overflow: auto; + width: 300px; + height: 200px; + } + #rtl-child { + width: 500px; + height: 200px; + } +</style> + +<div id="rtl-parent"> + <div id="rtl-child"></div> +</div> + +<script> +promise_test(async () => { + const parent = document.getElementById('rtl-parent'); + const child = document.getElementById('rtl-child'); + + await waitForAnimationFrames(5); + assert_equals(parent.offsetWidth, 300); + assert_equals(parent.offsetHeight, 200); + assert_equals(child.offsetWidth, 500); + assert_equals(child.offsetHeight, 200); + + assert_equals(parent.scrollWidth, 500); + assert_equals(parent.scrollHeight, 200); + assert_equals(parent.scrollLeft, 0); + + child.style.height = '0px'; + parent.style.height = '0px'; + + await waitForAnimationFrames(5); + assert_equals(parent.offsetHeight, 0); + assert_equals(parent.scrollHeight, 0); + assert_equals(parent.scrollLeft, 0); +}, 'rtl scroll left should be 0 when overflow size is empty'); +</script> diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html new file mode 100644 index 00000000000..589ae8835da --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Overflow: parsing scroll-target-group property computed values</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<div id="target"></div> +<script> + test_computed_value('scroll-target-group', 'initial', 'none'); + test_computed_value('scroll-target-group', 'inherit', 'none'); + test_computed_value('scroll-target-group', 'unset', 'none'); + test_computed_value('scroll-target-group', 'revert', 'none'); + + test_computed_value('scroll-target-group', 'none'); + test_computed_value('scroll-target-group', 'auto'); + + test(() => { + let style = getComputedStyle(document.getElementById('target')); + assert_not_equals(Array.from(style).indexOf('scroll-target-group'), -1); + }, 'The scroll-target-group property shows up in CSSStyleDeclaration enumeration'); + + test(() => { + let style = document.getElementById('target').style; + assert_not_equals(style.cssText.indexOf('scroll-target-group'), -1); + }, 'The scroll-target-group property shows up in CSSStyleDeclaration.cssText'); +</script> diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html new file mode 100644 index 00000000000..ac6a6fa3191 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Overflow: parsing scroll-target-group property invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<div id="target"></div> +<script> + test_invalid_value('scroll-target-group', '10'); + test_invalid_value('scroll-target-group', 'true'); + test_invalid_value('scroll-target-group', 'default'); + test_invalid_value('scroll-target-group', 'all'); + test_invalid_value('scroll-target-group', 'auto, auto'); +</script> diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html new file mode 100644 index 00000000000..0da79fc118c --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Overflow: parsing scroll-target-group property valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<div id="target"></div> +<script> + test_valid_value('scroll-target-group', 'initial'); + test_valid_value('scroll-target-group', 'inherit'); + test_valid_value('scroll-target-group', 'unset'); + test_valid_value('scroll-target-group', 'revert'); + + test_valid_value("scroll-target-group", 'none'); + test_valid_value("scroll-target-group", 'auto'); +</script> diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html b/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html new file mode 100644 index 00000000000..97b3be1e8fb --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<link rel="help" href="crbug.com/421471058"> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<style> + body { + margin: 0; + } + + #scroller { + width: 600px; + height: 300px; + overflow: auto; + scroll-marker-group: before; + white-space: nowrap; + } + + #scroller div { + background: blue; + display: inline-block; + width: 600px; + height: 270px; + } + + #scroller::scroll-marker-group { + height: 20px; + width: 200px; + } + + #scroller div::scroll-marker { + content: "Marker"; + width: 100px; + height: 20px; + display: inline-block; + } + + #scroller::scroll-button(left) { + content: "<"; + } +</style> +<div id="scroller"> + <div></div> + <div></div> +</div> +<script> + async function run() { + const kTab = '\uE004'; + await new test_driver.Actions() + .keyDown(kTab) + .keyUp(kTab) + .send(); + // With a focused scroll marker, scroll to next target. + document.querySelector('#scroller').scrollLeft = 600; + document.documentElement.classList.remove('reftest-wait'); + } + run(); +</script> + +</html> diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-001-ref.html index 69e9167cc33..ed2cb595c9a 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001-ref.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-001-ref.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers</title> +<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers</title> <style> #scroller { overflow: auto; @@ -35,4 +35,3 @@ <div id="target3"></div> <div id="target4"></div> </div> - diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-001.html index 93d7df72508..c0f96cc5574 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-001.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-001-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> <style> #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { @@ -41,4 +41,3 @@ <div id="target3"></div> <div id="target4"></div> </div> - diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-002-ref.html index 3fa777f7863..8571b11ba6a 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002-ref.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-002-ref.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers and does scroll tracking</title> +<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers and does scroll tracking</title> <style> #scroller { overflow: auto; @@ -38,4 +38,3 @@ <script> scroller.scrollTop = 400; </script> - diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-002.html index af2a5e668be..e3e83769db2 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-002.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers and does scroll tracking</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-002-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers and does scroll tracking</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-002-ref.html"> <style> #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { @@ -45,4 +45,3 @@ scroller.scrollTop = 400; assert_equals(getComputedStyle(link4).color, "rgb(0, 128, 0)", "link4 should be :target-current"); </script> - diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-003-ref.html index 09bb93d4ebc..09bb93d4ebc 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003-ref.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-003-ref.html diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-003.html index 59daa5cf5ce..39e1beff02a 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-003.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSS Overflow Test: anchor scroll markers and pseudo element scroll markers</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker"> -<link rel="match" href="scroll-marker-contain-003-ref.tentative.html"> +<link rel="match" href="scroll-target-group-003-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> :root { @@ -11,7 +11,7 @@ } #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { @@ -63,4 +63,3 @@ scroller.scrollTop = 400; assert_equals(getComputedStyle(link4).color, "rgb(0, 128, 0)", "link4 should be :target-current"); </script> - diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-004.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-004.html index 2ec6f6bde76..3a61a6d8c8c 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-004.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-004.html @@ -1,15 +1,15 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers inside size containers</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-001-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers inside size containers</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> <style> html { container: my-container / size; } #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-005.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-005.html index 3d435bf74cb..c7da0d404ec 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-005.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-005.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - reparenting nested anchors</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-001-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - reparenting nested anchors</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> <style> .wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-006.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html index 234b57e5bbe..6154845199a 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-006.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - anchor and target removal and addition</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-001-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - anchor and target removal and addition</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> <style> .wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-007.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-007.html index 5f15c85819a..9c736381c34 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-007.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-007.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic creation</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-001-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic creation</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> <style> .wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-008-ref.html index d74777d3bbf..d2ba909f644 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008-ref.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-008-ref.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers - </title> +<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers - </title> <style> #scroller { overflow: auto; diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-008.html index 80801854a0f..217ff1aabe6 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-008.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic removal</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-008-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic removal</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-008-ref.html"> <style> .wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } #scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-009-ref.html index 07b797ff789..82fbb988dfa 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009-ref.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-009-ref.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test Reference: scroll-marker-contain property invalidation - dynamic change of href</title> +<title>CSS Overflow Test Reference: scroll-target-group property invalidation - dynamic change of href</title> <style> .scroller { overflow: auto; diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-009.html index 8037adf8441..c9df1e3ca4c 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-009.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic change of href</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-009-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic change of href</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-009-ref.html"> <style> #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } .scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-010.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-010.html index fbdad62f846..fa311bf9fee 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-010.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-010.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic addition of href</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-009-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic addition of href</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-009-ref.html"> <style> #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } .scroller { diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-011.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-011.html index 8cfc78130e0..9062fef7a81 100644 --- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-011.tentative.html +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-011.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic removal of href</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916"> -<link rel="match" href="scroll-marker-contain-009-ref.tentative.html"> +<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic removal of href</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-009-ref.html"> <style> #wrapper { - scroll-marker-contain: auto; + scroll-target-group: auto; } .scroller { diff --git a/tests/wpt/tests/css/css-scoping/host-defined.html b/tests/wpt/tests/css/css-scoping/host-defined.html index 9e9776754a3..563bc52e527 100644 --- a/tests/wpt/tests/css/css-scoping/host-defined.html +++ b/tests/wpt/tests/css/css-scoping/host-defined.html @@ -13,10 +13,10 @@ :host div { width: 100px; height: 100px; - background-color: red; + background-color: green; } :not(:defined) div { - background-color: green; + background-color: red; } </style> <div></div> diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html b/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html index c399a975732..8b9fab96697 100644 --- a/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html +++ b/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html @@ -51,7 +51,7 @@ if (document.scrollingElement.scrollTop == 100) { scroll_position = "AT_SCROLL_START"; - } else if (document.scrollingElement.scrollTop == expected_scroll_top) { + } else if (document.scrollingElement.scrollTop - expected_scroll_top < 1.0) { scroll_position = "AT_TEXT_FRAGMENT"; } @@ -71,4 +71,4 @@ </script> </body> -</html>
\ No newline at end of file +</html> diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.html index a87bc2391a8..a87bc2391a8 100644 --- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.tentative.html +++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.html diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.html index 9abe483c703..9abe483c703 100644 --- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.tentative.html +++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.html diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.html index 2372290cb69..2372290cb69 100644 --- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.tentative.html +++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.html diff --git a/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html b/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html index 06dac275cab..0f6bffc2dce 100644 --- a/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html +++ b/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html @@ -3,6 +3,6 @@ <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> <p>Test passes if there is a filled green square.</p> -<div style="width: 100px;"> - <svg viewBox="0 0 1 1" style="background: green; min-width: max-content; max-width: 50px;"></svg> +<div style="width: 100px; height: 100px;"> + <svg viewBox="0 0 1 1" style="background: green; min-width: max-content; max-width: 50px; height: 100%;"></svg> </div> diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html new file mode 100644 index 00000000000..04c12f20cda --- /dev/null +++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" + content="An item's cross-size:stretch should stretch to the line size, not the container size"> +<style> + .container { + /* inline just so they don't overflow on each other */ + display: inline-flex; + width: 100px; + height: 100px; + border: solid; + flex-wrap: wrap; + /* Prevent the lines from stretching. */ + align-content: start; + font: 20px/1 Ahem; + } + + .container > div { + border: 3px solid; + } + + .stretch { + width: -moz-available; + width: -webkit-fill-available; + width: stretch; + } +</style> + +<div class="container"> + <div class="stretch" style="width: 75px; border-color: cyan" + data-expected-height="26">a</div> + <div class="stretch" style="width: 75px; border-color: magenta" + data-expected-height="26">b</div> +</div> +<div class="container"> + <div class="stretch" style="width: 75px; border-color: cyan" + data-expected-height="156">a</div> + <div style="border-color: orange; height: 150px"></div> + <div class="stretch" style="width: 75px; border-color: magenta" + data-expected-height="26">b</div> +</div> + +<script> + document.fonts.ready.then(() => checkLayout(".stretch")); +</script> diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html new file mode 100644 index 00000000000..232554d7eaf --- /dev/null +++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" + content="An item's cross-size:stretch should stretch to the line size, not the container size; container has indefinite height"> +<style> + .container { + /* inline just so they don't overflow on each other */ + display: inline-flex; + width: 100px; + border: solid; + flex-wrap: wrap; + /* Prevent the lines from stretching. */ + align-content: start; + font: 20px/1 Ahem; + } + + .container>div { + border: 3px solid; + } + + .stretch { + height: -moz-available; + height: -webkit-fill-available; + height: stretch; + } +</style> + +<div class="container"> + <div class="stretch" style="width: 75px; border-color: cyan" + data-expected-height="26">a</div> + <div class="stretch" style="width: 75px; border-color: magenta" + data-expected-height="26">b</div> +</div> +<div class="container"> + <div class="stretch" style="width: 75px; border-color: cyan" + data-expected-height="156">a</div> + <div style="border-color: orange; height: 150px"></div> + <div class="stretch" style="width: 75px; border-color: magenta" + data-expected-height="26">b</div> +</div> + +<script> + document.fonts.ready.then(() => checkLayout(".stretch")); +</script> diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html new file mode 100644 index 00000000000..9aeb014ac16 --- /dev/null +++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" + content="width:stretch item stretches to container width during the measure pass; container has definite width"> +<style> + .container { + display: flex; + flex-direction: column; + width: 100px; + height: 100px; + border: solid; + flex-wrap: wrap; + /* Prevent the lines from stretching. */ + align-content: start; + font: 20px/1 Ahem; + } + + .container>div { + border: 3px solid; + } + + .stretch { + width: -moz-available; + width: -webkit-fill-available; + width: stretch; + } +</style> + +<div class="container"> + <div class="stretch" style="height: 75px; border-color: cyan" + data-expected-width="100">a</div> + <div class="stretch" style="height: 75px; border-color: magenta" + data-expected-width="100">b</div> +</div> +<div class="container"> + <div class="stretch" style="height: 75px; border-color: cyan" + data-expected-width="156">a</div> + <div style="border-color: orange; width: 150px"></div> + <div class="stretch" style="height: 75px; border-color: magenta" + data-expected-width="100">b</div> +</div> + +<script> + document.fonts.ready.then(() => checkLayout(".stretch")); +</script> diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html new file mode 100644 index 00000000000..4be0d02c393 --- /dev/null +++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" + content="width:stretch item stretches to container width during the measure pass; container has min-content width"> +<style> + .container { + display: flex; + flex-direction: column; + max-width: 100px; + width: min-content; + height: 100px; + border: solid; + flex-wrap: wrap; + /* Prevent the lines from stretching. */ + align-content: start; + font: 20px/1 Ahem; + } + + .container>div { + border: 3px solid; + } + + .stretch { + width: -moz-available; + width: -webkit-fill-available; + width: stretch; + } +</style> + +<div class="container"> + <div class="stretch" style="height: 75px; border-color: cyan" + data-expected-width="26">a</div> + <div class="stretch" style="height: 75px; border-color: magenta" + data-expected-width="26">b</div> +</div> +<div class="container"> + <div class="stretch" style="height: 75px; border-color: cyan" + data-expected-width="156">c</div> + <div style="border-color: orange; width: 150px"></div> + <div class="stretch" style="height: 75px; border-color: magenta" + data-expected-width="100">d</div> +</div> + +<script> + document.fonts.ready.then(() => checkLayout(".stretch")); +</script> diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html new file mode 100644 index 00000000000..99cd3310492 --- /dev/null +++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784"> +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src="/resources/check-layout-th.js"></script> +<meta name="assert" + content="An item's cross-size:stretch should stretch to the line size, not the container size; single-line container has indefinite height"> +<style> + .container { + display: inline-flex; + width: 100px; + border: solid; + margin: 10px; + } + + .container>div { + border: 3px solid; + } + + .stretch { + height: -moz-available; + height: -webkit-fill-available; + height: stretch; + } +</style> + +<div class="container"> + <div class="stretch" style="width: 75px; border-color: cyan" + data-expected-height="156"></div> + <div style="border-color: orange; height: 150px"></div> +</div> + +<script> + checkLayout(".stretch"); +</script> diff --git a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html index 503e999788c..6d824e73d56 100644 --- a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html +++ b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html @@ -3,6 +3,7 @@ <title>CSS text decoration test: emphasis marks and punctuation</title> <style> +:root { text-autospace: no-autospace; } span { text-emphasis: filled circle; } </style> diff --git a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html index 1a48f9d32cb..53d261e9c8c 100644 --- a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html +++ b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html @@ -6,6 +6,7 @@ <meta name="assert" content="emphasis marks are not drawn for punctuation (with a small set of exceptions)"> <style> +:root { text-autospace: no-autospace; } .emph { text-emphasis: filled circle; } </style> diff --git a/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html b/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html index 56fec0bd3ed..54ce3c15735 100644 --- a/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html +++ b/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html @@ -9,6 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <meta name="assert" content="When the language is Chinese, and line-break:loose, a browser allows a break before an inseparable character."> <style type="text/css"> +:root { text-autospace: no-autospace; } @font-face { font-family: 'mplus-1p-regular'; src: url('/fonts/mplus-1p-regular.woff') format('woff'); diff --git a/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html b/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html index 9656f70956e..c8a4091eb99 100644 --- a/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html +++ b/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html @@ -11,6 +11,8 @@ <body> <div id="target"></div> <script> +test_computed_value("text-autospace", "initial", "normal"); + test_computed_value("text-autospace", "normal"); test_computed_value("text-autospace", "no-autospace"); test_computed_value("text-autospace", "auto"); diff --git a/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html b/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html index 845cf075a9b..2ba02e87c9f 100644 --- a/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html +++ b/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html @@ -11,6 +11,8 @@ <body> <div id="target"></div> <script> +test_computed_value("text-spacing", "initial", "normal"); + test_computed_value("text-spacing", "normal"); test_computed_value("text-spacing", "none"); test_computed_value("text-spacing", "auto"); diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html index d26fae09b03..499f8322fe4 100644 --- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html @@ -1,2 +1,3 @@ <!DOCTYPE html> -<div id="target">国国AA国国AA国々</div> +<meta charset="utf-8"> +<div id="target">国国AA国国AA国国</div> diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html index dfde20a265a..32c9c175d97 100644 --- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html @@ -1,6 +1,7 @@ <!DOCTYPE html> +<meta charset="utf-8"> <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> -<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> +<link rel="match" href="text-autospace-dynamic-text-001-ref.html"> <div id="target">国国</div> <script> const target_text = document.getElementById('target').firstChild; diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html index ffc3d907ee5..bd0a1107dae 100644 --- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html @@ -1,6 +1,7 @@ <!DOCTYPE html> +<meta charset="utf-8"> <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> -<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> +<link rel="match" href="text-autospace-dynamic-text-001-ref.html"> <div id="target">国国国国</div> <script> const target_text = document.getElementById('target').firstChild; diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html index cf2237d48ef..d53762233cc 100644 --- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html @@ -1,6 +1,7 @@ <!DOCTYPE html> +<meta charset="utf-8"> <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> -<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> +<link rel="match" href="text-autospace-dynamic-text-001-ref.html"> <div id="target">国国国国国</div> <script> const target_text = document.getElementById('target').firstChild; diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html index c1057fc9005..4b3854c9608 100644 --- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html @@ -1,6 +1,7 @@ <!DOCTYPE html> +<meta charset="utf-8"> <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> -<link rel="help" href="text-autospace-dynamic-text-001-ref.html"> +<link rel="match" href="text-autospace-dynamic-text-001-ref.html"> <div id="target">国国AAAA国国AAAA国国</div> <script> const target_text = document.getElementById('target').firstChild; diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html new file mode 100644 index 00000000000..266a69b298e --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +.test { + font-family: Ahem; + font-size: 40px; + text-autospace: no-autospace; + + span { + margin-left: calc(1em / 8); + margin-right: calc(1em / 8); + } +} +</style> +<div id="container"> + <div lang="zh" class="test normal">国<span>!</span>国<span>#</span>国</div> +</div> diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html new file mode 100644 index 00000000000..e8afdca9310 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="match" href="text-autospace-zh-001-ref.html"> +<style> +.test { + font-family: Ahem; + font-size: 40px; + text-autospace: normal; +} +</style> +<div id="container"> + <div lang="zh" class="test">国!国#国</div> +</div> diff --git a/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html b/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html index 727fc4df18a..5f894e35a56 100644 --- a/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html +++ b/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html @@ -74,4 +74,6 @@ test_invalid_angle('atan2( 0 ,)'); test_invalid_angle('atan2( () 30deg - 0.523599rad )'); test_invalid_angle('atan2(45deg )'); test_invalid_angle('atan2(30deg, + 0.261799rad)'); +test_invalid_angle('atan2(2, 1px)'); +test_invalid_angle('atan2(2, 1%)'); </script> diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html new file mode 100644 index 00000000000..4f994bd03f6 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html @@ -0,0 +1,51 @@ +<!doctype html> +<html> +<title>Nested View Transitions: group children sizing (ref)</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> + +<style> +#wrapper { + position: relative; +} + +#clipper { + height: 200px; + width: 200px; + overflow: clip; +} + +.item { + background: blue; + position: relative; + top: -25px; + left: -10px; + + height: 50px; + width: 250px; + margin: 1px; + border: 1px solid black; +} + +.popout { + position: absolute; + left: -9px; + top: 81px; + background: blue; + + height: 50px; + width: 250px; + border: 1px solid black; +} + +</style> + +<div id=wrapper> + <div id=clipper> + <div class=item></div> + <div class=item></div> + <div class=item></div> + <div class=item></div> + <div class=item></div> + </div> + <div class=popout></div> +</div> diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html new file mode 100644 index 00000000000..f1a484400e7 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html @@ -0,0 +1,55 @@ +<!doctype html> +<html> +<title>Nested View Transitions: group children sizing (ref)</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> + +<style> +#wrapper { + position: relative; +} + +#clipper { + height: 200px; + width: 200px; + overflow: clip; + + border-width: 5px 10px 15px 20px; + border-style: solid; + border-color: green; +} + +.item { + background: blue; + position: relative; + top: -25px; + left: -10px; + + height: 50px; + width: 250px; + margin: 1px; + border: 1px solid black; +} + +.popout { + position: absolute; + left: 11px; + top: 87px; + background: blue; + + height: 50px; + width: 250px; + border: 1px solid black; +} + +</style> + +<div id=wrapper> + <div id=clipper> + <div class=item></div> + <div class=item></div> + <div class=item></div> + <div class=item></div> + <div class=item></div> + </div> + <div class=popout></div> +</div> diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html new file mode 100644 index 00000000000..cb0cf819b42 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html @@ -0,0 +1,70 @@ +<!doctype html> +<html class=reftest-wait> +<title>Nested View Transitions: group children sizing with border</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> +<link rel="match" href="group-children-sizing-with-border-ref.html"> +<script src="/common/reftest-wait.js"></script> +<script src="resources/compute-test.js"></script> +<script src="/dom/events/scrolling/scroll_support.js"></script> + +<style> +#clipper { + view-transition-group: contain; + view-transition-name: clipper; + + border-width: 5px 10px 15px 20px; + border-style: solid; + border-color: green; + + height: 200px; + width: 200px; +} + +.item { + view-transition-name: match-element; + background: blue; + position: relative; + top: -25px; + left: -10px; + + height: 50px; + width: 250px; + margin: 1px; + border: 1px solid black; +} + +.item.popout { + view-transition-group: none; +} + +::view-transition-group(*), +::view-transition-old(*), +::view-transition-new(*) { + animation-play-state: paused; +} + +::view-transition-group-children(clipper) { + overflow: clip; +} +</style> + +<div id=clipper> + <div class=item></div> + <div class=item></div> + <div class="item popout"></div> + <div class=item></div> + <div class=item></div> +</div> + +<script> + +function runTest() { + document.startViewTransition().ready.then(takeScreenshot); +} + +onload = () => { + waitForCompositorReady().then(runTest); +} +</script> + + diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html new file mode 100644 index 00000000000..88916ddf486 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html @@ -0,0 +1,66 @@ +<!doctype html> +<html class=reftest-wait> +<title>Nested View Transitions: group children sizing</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/"> +<link rel="match" href="group-children-sizing-ref.html"> +<script src="/common/reftest-wait.js"></script> +<script src="resources/compute-test.js"></script> +<script src="/dom/events/scrolling/scroll_support.js"></script> + +<style> +#clipper { + view-transition-group: contain; + view-transition-name: clipper; + + height: 200px; + width: 200px; +} + +.item { + view-transition-name: match-element; + background: blue; + position: relative; + top: -25px; + left: -10px; + + height: 50px; + width: 250px; + margin: 1px; + border: 1px solid black; +} + +.item.popout { + view-transition-group: root; +} + +::view-transition-group(*), +::view-transition-old(*), +::view-transition-new(*) { + animation-play-state: paused; +} + +::view-transition-group-children(clipper) { + overflow: clip; +} +</style> + +<div id=clipper> + <div class=item></div> + <div class=item></div> + <div class="item popout"></div> + <div class=item></div> + <div class=item></div> +</div> + +<script> + +function runTest() { + document.startViewTransition().ready.then(takeScreenshot); +} + +onload = () => { + waitForCompositorReady().then(runTest); +} +</script> + + diff --git a/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html b/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html index 098e5566585..239bcdd791d 100644 --- a/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html +++ b/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html @@ -33,9 +33,6 @@ ::view-transition-group(clipper) { animation-play-state: paused; -} - -::view-transition-group-children(clipper) { overflow: clip; border-radius: 20px; } diff --git a/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html b/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html index cc401b8bd6f..b57fce0d73f 100644 --- a/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html +++ b/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<title>View transitions: author styles ignored during prepare</title> +<title>View transitions: exception thrown during transition</title> <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> <link rel="author" href="mailto:khushalsagar@chromium.org"> @@ -32,12 +32,26 @@ html::view-transition-new(shared) { promise_test(async t => { assert_implements(document.startViewTransition, "Missing document.startViewTransition"); await waitForCompositorReady(); - return new Promise((resolve, reject) => { - document.startViewTransition(() => { - resolve(); - throw 'error'; - }); + const vt = document.startViewTransition(() => { + throw "error"; }); + let update_callback_resolution; + let ready_resolution; + let finished_resolution; + + await vt.updateCallbackDone.then( + () => { update_callback_resolution = "fulfilled" }, + () => { update_callback_resolution = "rejected" }); + await vt.ready.then( + () => { ready_resolution = "fulfilled" }, + () => { ready_resolution = "rejected" }); + await vt.finished.then( + () => { finished_resolution = "fulfilled" }, + () => { finished_resolution = "rejected" }); + + assert_equals(update_callback_resolution, "rejected"); + assert_equals(ready_resolution, "rejected"); + assert_equals(finished_resolution, "rejected"); }, "An exception thrown during a transition shouldn't crash."); </script> diff --git a/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html b/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html index 0a34a4b73ff..9914097185b 100644 --- a/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html +++ b/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html @@ -29,12 +29,12 @@ promise_test(async t => { let viewbox = window.getComputedStyle( document.documentElement, "::view-transition-new(target)").objectViewBox; - assert_equals(viewbox, "none", "incorrect viewbox " + viewbox); + assert_in_array(viewbox, ["none", undefined], "incorrect viewbox " + viewbox); first.style.filter = "blur(5px)"; viewbox = window.getComputedStyle( document.documentElement, "::view-transition-new(target)").objectViewBox; - assert_equals(viewbox, "none", "incorrect viewbox " + viewbox); + assert_in_array(viewbox, ["none", undefined], "incorrect viewbox " + viewbox); transition.finished.then(resolve, reject); }); diff --git a/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html b/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html new file mode 100644 index 00000000000..10a1a1197b1 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html @@ -0,0 +1,106 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <!-- TODO update link --> + <link rel="help" href="https://www.w3.org/TR/css-view-transitions-2/"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Contain and name discovery</title> +</head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + #outer { + view-transition-name: outer; + } + + #inner { + view-transition-name: inner; + } + + .containment { + contain: view-transition; + } +</style> +<body> + <div id="outer"> + <div id="inner"></div> + </div> +</body> +<script> + function capturedNames() { + const regexp = /\((?<name>[^\)]+)/; + const names = document.getAnimations() + .map(a => a.effect.pseudoElement) + .map(name => name.match(regexp).groups.name); + return [...new Set(names)].sort(); + } + + promise_test(async t => { + const outer = document.getElementById('outer'); + const inner = document.getElementById('inner'); + + let vt = document.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['inner', 'outer', 'root'], + 'Retrieve all names in absence of contain style'); + vt.skipTransition(); + + document.documentElement.classList.toggle('containment'); + vt = document.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['inner', 'outer', 'root'], + 'contain on the root element does not affect tag discovery'); + vt.skipTransition(); + + outer.classList.toggle('containment'); + vt = document.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['root'], + 'contain on outer element blocks tag discovery in subtree'); + vt.skipTransition(); + + vt = outer.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['inner', 'outer'], + 'contain on the scoped element includes self'); + vt.skipTransition(); + + vt = inner.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['inner'], + 'contain on ancestor of the scoped element does not affect tag ' + + 'discovery'); + vt.skipTransition(); + + outer.classList.toggle('containment'); + inner.classList.toggle('containment'); + vt = document.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['outer', 'root'], + 'contain on inner element still permits tag discovery of ancestor ' + + 'elements'); + vt.skipTransition(); + + vt = outer.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['outer'], + 'contain on inner element limits tag discovery on outer element'); + vt.skipTransition(); + + vt = inner.startViewTransition(() => {}); + await vt.ready; + assert_array_equals( + capturedNames(), ['inner'], + 'contain permits tag discovery on scoped element'); + vt.skipTransition(); + }, 'Contain: view-transition blocks propagation of name discovery.'); +</script> +</html> diff --git a/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html b/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html new file mode 100644 index 00000000000..fe110dbfe50 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html class="test-wait"> +<head> +<style> + +#s { + position: relative; + view-transition-name: wrapper; + border: 5px solid lightgrey; + height: 200px; + width: 250px; +} +.i { + position: relative; + width: 150px; height: 60px; + border: 5px solid #ace; +} +::view-transition-group(*), +::view-transition-old(*), +::view-transition-new(*) { animation: unset; } + +</style> +</head> +<body> +<div id="s"> + <div class="i">A</div> + <div class="i">B</div> +</div> +<script> + +onload = async () => { + await s.startViewTransition(() => { + s.appendChild(s.children[0]); + }).finished; + document.documentElement.classList.remove('test-wait'); +} + +</script> +</body> +</html> diff --git a/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html new file mode 100644 index 00000000000..73cfab22e7d --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<style> +#wrapper { + position: absolute; + width: 200px; + height: 200px; + border-radius: 50px; + overflow: hidden; +} +#child { + position: absolute; + width: 300px; + height: 300px; + backdrop-filter: invert(100%); +} +</style> +<body> +<div id="wrapper"> + <div id="child"></div> +</div> +</body> diff --git a/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html new file mode 100644 index 00000000000..29e8ce71e5a --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html class='reftest-wait'> +<title>CSS Backdrop Filter with transform and clip</title> +<link rel="author" href="mailto:kevers@chromium.org"> +<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty"> +<link rel="match" href="css-backdrop-filter-transform-clip-ref.html"> +<link rel="help" href="https://crbug.com/401816608"> +<script src="/common/reftest-wait.js"></script> +<style> +#wrapper { + position: absolute; + width: 200px; + height: 200px; + border-radius: 50px; + overflow: hidden; +} + +#child { + position: absolute; + left: 50px; + width: 300px; + height: 300px; + backdrop-filter: invert(100%); +} +@keyframes a { + 0% { transform: translateX(0px); } + 50% { transform: translateX(-100px); } + 100% { transform: translateX(100px); } +} +#animation { + animation: a 2s linear paused; +} +</style> +<body> +<div id="wrapper"> + <div id="animation"> + <div id="child"></div> + </div> +</div> +</body> +<script> + function rAF() { + return new Promise(resolve => { + requestAnimationFrame(resolve); + }); + } + async function runTest() { + await rAF(); + const anim = document.getAnimations()[0]; + anim.ready.then(async () => { + await rAF(); + // Initially the backdrop filter does not completely cover the clip area + // because of left: 50px. Shift the backdrop filter 100px to left. + // Ensure the filter now completely covers the clip and is not applied + // outside the left boundary of the clip. + anim.currentTime = 1000; + await rAF(); + takeScreenshot(); + }); + } + window.onload = runTest; +</script> +</html> diff --git a/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html b/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html new file mode 100644 index 00000000000..92cf94e29b0 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>Filter Effects: Inheritance of 'currentcolor' in drop-shadow()</title> +<link rel="help" href="https://drafts.fxtf.org/filter-effects/#funcdef-filter-drop-shadow"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +#filter { + color: red; + filter: drop-shadow(100px 0px 0px currentcolor); +} +#target { + background-color: black; + color: green; + width: 100px; + height: 100px; + filter: inherit; +} +</style> +<div id="filter"> + <div id="target"></div> +</div> +<script> +test(function() { + assert_equals(getComputedStyle(target).filter, "drop-shadow(rgb(0, 128, 0) 100px 0px 0px)"); +}, "Test currentcolor inheritance in drop-shadow()"); + +test(function() { + target.style.color = "blue"; + assert_equals(getComputedStyle(target).filter, "drop-shadow(rgb(0, 0, 255) 100px 0px 0px)"); +}, "Test currentcolor inheritance in drop-shadow() after color mutation"); + +</script> diff --git a/tests/wpt/tests/custom-elements/registries/idlharness.window.js b/tests/wpt/tests/custom-elements/registries/idlharness.window.js deleted file mode 100644 index b2727e3a874..00000000000 --- a/tests/wpt/tests/custom-elements/registries/idlharness.window.js +++ /dev/null @@ -1,20 +0,0 @@ -// META: script=/resources/WebIDLParser.js -// META: script=/resources/idlharness.js - -idl_test( - ["scoped-custom-elements-registry"], - ["html", "dom"], - (idl_array) => { - let element = document.createElement("div"); - let shadowRoot = element.attachShadow({ mode: "open" }); - let customElementRegistry = new CustomElementRegistry(); - let templateElement = document.createElement("template"); - idl_array.add_objects({ - document, - element, - shadowRoot, - customElementRegistry, - templateElement, - }); - }, -); diff --git a/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html b/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html new file mode 100644 index 00000000000..72a5999e3a9 --- /dev/null +++ b/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html @@ -0,0 +1,138 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/pull/7991"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +function isAsciiLowerAlpha(codePoint) { + return codePoint >= 0x61 && codePoint <= 0x7A; +} +function isAsciiUpperAlpha(codePoint) { + return codePoint >= 0x41 && codePoint <= 0x5A; +} +function isAsciiAlpha(codePoint) { + return isAsciiLowerAlpha(codePoint) || isAsciiUpperAlpha(codePoint); +} +function isAsciiDigit(codePoint) { + return codePoint >= 0x30 && codePoint <= 0x39; +} +function isAsciiWhitespace(codePoint) { + return codePoint == 0x9 || codePoint == 0xA || codePoint == 0xC || codePoint == 0xD || codePoint == 0x20; +} + +function debugString(str) { + const codePoints = []; + for (const c of str) { + codePoints.push(c.codePointAt(0)); + } + return `code points: ${JSON.stringify(codePoints)}, string: "${str}"`; +} + +const validCustomElementNames = [ + 'annotation-xml-custom', +]; +const invalidCustomElementNames = [ + '', + 'annotation-xml', + 'color-profile', + 'font-face', + 'font-face-src', + 'font-face-uri', + 'font-face-format', + 'font-face-name', + 'missing-glyph', +]; + +const testCodePoints = [0x1F171, 0x1F196, 0x10000]; +for (let i = 0; i < 0x80; i++) { + testCodePoints.push(i); +} + +const elementLocalNameRegex = /^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*|[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u; + +function isValidCustomElementName(str) { + if (!str.length) { + return false; + } + + if (!str.includes('-')) { + return false; + } + + let first = true; + for (const c of str) { + const codePoint = c.codePointAt(0); + if (first) { + if (!isAsciiLowerAlpha(codePoint)) { + return false; + } + first = false; + } + if (isAsciiUpperAlpha(codePoint)) { + return false; + } + } + + return elementLocalNameRegex.test(str); +} + +// In order to test the branching logic of valid element local names and the +// requirement of having a '-' character, this method generates different +// variations of potential custom element names given two code points. +function createStringWithSeparatorMode(codePoint, prefix, separatorMode) { + const str = String.fromCodePoint(codePoint); + if (separatorMode == 0) { + return `${prefix}${str}`; + } else if (separatorMode == 1) { + return `${prefix}-${str}`; + } else if (separatorMode == 2) { + return `${prefix}${str}-element`; + } +} + +for (const prefix of ['', 'a', 'A', ' ', '\0']) { + for (const codePoint of testCodePoints) { + for (const separatorMode of [0, 1, 2]) { + const str = createStringWithSeparatorMode( + codePoint, prefix, separatorMode); + if (isValidCustomElementName(str)) { + validCustomElementNames.push(str); + } else { + invalidCustomElementNames.push(str); + } + } + } +} + +let nextClassNumber = 1; +function createElementClass() { + const name = `CustomElement${nextClassNumber++}`; + const newClass = function() {}; + newClass.prototype = HTMLElement; + return newClass; +} + +promise_test(async t => { + for (const validName of validCustomElementNames) { + try { + const newClass = createElementClass(); + customElements.define(validName, newClass); + await customElements.whenDefined(validName); + } catch (error) { + assert_unreached(`Custom element name should have been valid but threw error: ${debugString(validName)} ${error.toString()}`); + } + } + + for (const invalidName of invalidCustomElementNames) { + const newClass = createElementClass(); + assert_throws_dom( + 'SyntaxError', + () => customElements.define(invalidName, newClass), + `customElements.define should have thrown for invalid name: ${debugString(invalidName)}`); + await promise_rejects_dom(t, 'SyntaxError', + customElements.whenDefined(invalidName), + `customElements.whenDefined should have thrown for invalid name: ${debugString(invalidName)}`); + } +}); +</script> diff --git a/tests/wpt/tests/device-bound-session-credentials/refresh_session.py b/tests/wpt/tests/device-bound-session-credentials/refresh_session.py index d05340a318c..ab491e30104 100644 --- a/tests/wpt/tests/device-bound-session-credentials/refresh_session.py +++ b/tests/wpt/tests/device-bound-session-credentials/refresh_session.py @@ -9,7 +9,8 @@ def main(request, response): session_id_header = request.headers.get("Sec-Session-Id") if session_id_header == None: return (400, response.headers, "") - session_id = int(session_id_header.decode('utf-8')) + session_id_header = session_id_header.decode('utf-8') + session_id = int(session_id_header) if test_session_manager.get_should_refresh_end_session(): response_body = { @@ -36,4 +37,7 @@ def main(request, response): if not verified or jwt_payload.get("jti") != challenge: return (400, response.headers, "") + if jwt_payload.get("sub") != session_id_header: + return (400, response.headers, "") + return test_session_manager.get_session_instructions_response(session_id, request) diff --git a/tests/wpt/tests/device-bound-session-credentials/start_session.py b/tests/wpt/tests/device-bound-session-credentials/start_session.py index b9d745e3ed6..d2b7ee87818 100644 --- a/tests/wpt/tests/device-bound-session-credentials/start_session.py +++ b/tests/wpt/tests/device-bound-session-credentials/start_session.py @@ -19,4 +19,7 @@ def main(request, response): if jwt_payload.get("authorization") != test_session_manager.get_authorization_value(): return (400, response.headers, "") + if jwt_payload.get("sub") is not None: + return (400, response.headers, "") + return test_session_manager.get_session_instructions_response(session_id, request) diff --git a/tests/wpt/tests/dom/nodes/name-validation.tentative.html b/tests/wpt/tests/dom/nodes/name-validation.tentative.html new file mode 100644 index 00000000000..ca5e9c11824 --- /dev/null +++ b/tests/wpt/tests/dom/nodes/name-validation.tentative.html @@ -0,0 +1,296 @@ +<!DOCTYPE html> +<meta name=timeout content=long> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/dom/pull/1079"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +function isAsciiAlpha(codePoint) { + return (codePoint >= 0x41 && codePoint <= 0x5A) || (codePoint >= 0x61 && codePoint <= 0x7A); +} +function isAsciiDigit(codePoint) { + return codePoint >= 0x30 && codePoint <= 0x39; +} +function isAsciiWhitespace(codePoint) { + return codePoint == 0x9 || codePoint == 0xA || codePoint == 0xC || codePoint == 0xD || codePoint == 0x20; +} + +function debugString(str) { + const codePoints = []; + for (let i = 0; i < str.length; i++) { + codePoints.push(str.charCodeAt(i)); + } + return `code points: ${JSON.stringify(codePoints)}, string: "${str}"`; +} + +const latin1CodePoint = 100; +const latin1 = String.fromCodePoint(latin1CodePoint); +const smallEmoji = 'smallEmoji🆖'; +const bigEmoji = 'bigEmoji🅱️'; + +// Testing every variation of a namespace prefix with every variation of a +// local name would make the test take too long to run, so use these instead when +// combining with a namespace prefix. +const validElementLocalNamesShortened = [ + 'div', `latin1${latin1}`, smallEmoji, bigEmoji +]; +const invalidElementLocalNamesShortened = [ + '', 'space ', 'newline\n', 'null\0', `:soh${String.fromCodePoint(1)}`, '5' +]; +const validAttributeLocalNamesShortened = [ + 'attr', `latin1${latin1}`, smallEmoji, bigEmoji +]; +const invalidAttributeLocalNamesShortened = [ + '', 'space ', 'newline\n', 'null\0' +]; + +const validElementLocalNames = validElementLocalNamesShortened.slice(); +const invalidElementLocalNames = invalidElementLocalNamesShortened.slice(); +const validAttributeLocalNames = validAttributeLocalNamesShortened.slice(); +const invalidAttributeLocalNames = invalidAttributeLocalNamesShortened.slice(); +const validNamespacePrefixes = ['', smallEmoji, bigEmoji]; +const invalidNamespacePrefixes = []; +const validDoctypes = ['']; +const invalidDoctypes = []; + +const codePoints = []; +for (let i = 0; i < 0x80; i++) { + codePoints.push(i); +} +codePoints.push(latin1CodePoint); + +// attributes and namespaces +for (const codePoint of codePoints) { + const str = String.fromCodePoint(codePoint); + if (codePoint == 0 || isAsciiWhitespace(codePoint) || codePoint == 0x2F || codePoint == 0x3E) { + invalidNamespacePrefixes.push(str); + invalidAttributeLocalNames.push(str); + } else if (codePoint == 0x3A) { + // colons are not valid namespace prefixes, but due to parsing they can + // never be considered as a namespace prefix, only as a separator between the + // prefix and the local name. + validAttributeLocalNames.push(str); + } else if (codePoint == 0x3D) { + validNamespacePrefixes.push(str); + invalidAttributeLocalNames.push(str); + } else { + validNamespacePrefixes.push(str); + validAttributeLocalNames.push(str); + } +} + +// valid element local names +for (const firstChar of codePoints) { + for (const secondChar of codePoints) { + const str = `${String.fromCodePoint(firstChar)}${String.fromCodePoint(secondChar)}`; + if (isAsciiAlpha(firstChar)) { + if (!secondChar || secondChar == 0x2F || secondChar == 0x3E || isAsciiWhitespace(secondChar)) { + invalidElementLocalNames.push(str); + } else { + validElementLocalNames.push(str); + } + } else { + if (firstChar == 0x3A || firstChar == 0x5F || firstChar >= 0x80) { + if (isAsciiAlpha(secondChar) || + isAsciiDigit(secondChar) || + secondChar == 0x2D || + secondChar == 0x2E || + secondChar == 0x3A || + secondChar == 0x5F || + secondChar >= 0x80) { + validElementLocalNames.push(str); + } else { + invalidElementLocalNames.push(str); + } + } else { + invalidElementLocalNames.push(str); + } + } + } +} + +// doctypes +for (const codePoint of codePoints) { + const str = String.fromCodePoint(codePoint); + if (codePoint == 0 || isAsciiWhitespace(codePoint) || codePoint == 0x3E) { + invalidDoctypes.push(str); + } else { + validDoctypes.push(str); + } +} + +test(() => { + // This regex is provided in the spec and is used here to double check our + // test input. + const validNameRegex = /^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*|[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u; + for (const validName of validElementLocalNames) { + assert_true( + validNameRegex.test(validName), + `Regex should match: ${debugString(validName)}`); + try { + document.createElement(validName); + } catch (error) { + assert_unreached( + `document.createElement should not have thrown an error for: ${debugString(validName)} ${error.toString()}`); + } + } + for (const invalidName of invalidElementLocalNames) { + assert_false( + validNameRegex.test(invalidName), + `Regex should not match: ${debugString(invalidName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.createElement(invalidName), + `document.createElement should throw an error for: ${debugString(invalidName)}`); + } +}, 'Valid and invalid characters in createElement.'); + +test(() => { + for (const validNamespace of validNamespacePrefixes) { + for (const validName of validElementLocalNamesShortened) { + try { + document.createElementNS('namespaceuri', `${validNamespace}:${validName}`); + } catch (error) { + assert_unreached( + `document.createElementNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validName)} ${error.toString()}`); + } + try { + document.implementation.createDocument('namespaceuri', `${validNamespace}:${validName}`); + } catch (error) { + assert_unreached( + `createDocument should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validName)} ${error.toString()}`); + } + } + for (const invalidName of invalidElementLocalNamesShortened) { + assert_throws_dom( + 'InvalidCharacterError', + () => document.createElementNS('namespaceuri', `${validNamespace}:${invalidName}`), + `document.createElementNS should throw an error for: ${debugString(validNamespace)} ${debugString(invalidName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.implementation.createDocument('namespaceuri', `${validNamespace}:${invalidName}`), + `createDocument should throw an error for: ${debugString(validNamespace)} ${debugString(invalidName)}`); + } + } + for (const invalidNamespace of invalidNamespacePrefixes) { + for (const localName of validElementLocalNamesShortened.concat(invalidElementLocalNamesShortened)) { + assert_throws_dom( + 'InvalidCharacterError', + () => document.createElementNS('namespaceuri', `${invalidNamespace}:${localName}`), + `document.createElementNS should throw an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.implementation.createDocument('namespaceuri', `${invalidNamespace}:${localName}`), + `createDocument should throw an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`); + } + } +}, 'Valid and invalid characters in createElementNS and createDocument.'); + +test(() => { + for (const validAttributeName of validAttributeLocalNames) { + const element = document.createElement('div'); + try { + element.setAttribute(validAttributeName, 'value'); + } catch (error) { + assert_unreached( + `element.setAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`); + } + try { + element.toggleAttribute(validAttributeName); + } catch (error) { + assert_unreached( + `element.toggleAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`); + } + try { + element.toggleAttribute(validAttributeName, false); + } catch (error) { + assert_unreached( + `element.toggleAttribute with false should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`); + } + try { + document.createAttribute(validAttributeName); + } catch (error) { + assert_unreached( + `document.createAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`); + } + } + for (const invalidAttributeName of invalidAttributeLocalNames) { + const element = document.createElement('div'); + assert_throws_dom( + 'InvalidCharacterError', + () => element.setAttribute(invalidAttributeName, 'value'), + `element.setAttribute should throw an error for: ${debugString(invalidAttributeName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => element.toggleAttribute(invalidAttributeName), + `element.toggleAttribute should throw an error for: ${debugString(invalidAttributeName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => element.toggleAttribute(invalidAttributeName, false), + `element.toggleAttribute with false should throw an error for: ${debugString(invalidAttributeName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.createAttribute(invalidAttributeName), + `document.createAttribute should throw an error for: ${debugString(invalidAttributeName)}`); + } +}, 'Valid and invalid characters in setAttribute, toggleAttribute, and createAttribute.'); + +test(() => { + for (const validNamespace of validNamespacePrefixes) { + for (const validLocalName of validAttributeLocalNamesShortened) { + const element = document.createElement('div'); + try { + element.setAttributeNS('namespaceuri', `${validNamespace}:${validLocalName}`, 'value'); + } catch (error) { + assert_unreached(`element.setAttributeNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validLocalName)} ${error.toString()}`); + } + try { + document.createAttributeNS('namespaceuri', `${validNamespace}:${validLocalName}`); + } catch (error) { + assert_unreached(`document.createAttributeNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validLocalName)} ${error.toString()}`); + } + } + for (const invalidLocalName of invalidAttributeLocalNamesShortened) { + const element = document.createElement('div'); + assert_throws_dom( + 'InvalidCharacterError', + () => element.setAttributeNS('namespaceuri', `${validNamespace}:${invalidLocalName}`, 'value'), + `element.setAttributeNS should have thrown an error for: ${debugString(validNamespace)} ${debugString(invalidLocalName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.createAttributeNS('namespaceuri', `${validNamespace}:${invalidLocalName}`), + `document.createAttributeNS should have thrown an error for: ${debugString(validNamespace)} ${debugString(invalidLocalName)}`); + } + } + for (const invalidNamespace of invalidNamespacePrefixes) { + for (const localName of validAttributeLocalNamesShortened.concat(invalidAttributeLocalNamesShortened)) { + const element = document.createElement('div'); + assert_throws_dom( + 'InvalidCharacterError', + () => element.setAttributeNS('namespaceuri', `${invalidNamespace}:${localName}`, ''), + `element.setAttributeNS should have thrown an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`); + assert_throws_dom( + 'InvalidCharacterError', + () => document.createAttributeNS('namespaceuri', `${invalidNamespace}:${localName}`), + `document.createAttributeNS should have thrown an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`); + } + } +}, 'Valid and invalid characters in setAttributeNS and createAttributeNS.'); + +test(() => { + for (const validDoctype of validDoctypes) { + try { + document.implementation.createDocumentType(validDoctype, 'publicid', 'systemid'); + } catch (error) { + assert_unreached(`createDocumentType should not have thrown an error for ${debugString(validDoctype)} ${error.toString()}`); + } + } + for (const invalidDoctype of invalidDoctypes) { + assert_throws_dom( + 'InvalidCharacterError', + () => document.implementation.createDocumentType(invalidDoctype, 'publicid', 'systemid'), + `createDocumentType should have thrown an error for: ${debugString(invalidDoctype)}`); + } +}, 'Valid and invalid characters in createDocumentType.'); +</script> diff --git a/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html b/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html new file mode 100644 index 00000000000..75d2c589b1d --- /dev/null +++ b/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>FedCM IDP log-in status API tests</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<script type="module"> +import {request_options_with_mediation_required, + fedcm_test, + fedcm_get_dialog_type_promise, + select_manifest, + mark_signed_out} from '../support/fedcm-helper.sub.js'; + +fedcm_test(async t => { + await mark_signed_out(); + + let test_options = request_options_with_mediation_required("manifest_no_accounts_login_delay.json"); + await select_manifest(t, test_options); + + test_options.identity.mode = "active"; + let cred_promise = navigator.credentials.get(test_options); + + // We should get the login popup window, which will automatically set + // the login status and close itself. + // The promise should get rejected because the accounts list is empty. + + return promise_rejects_dom(t, 'NetworkError', cred_promise); +}, 'Tests the IDP login dialog and subsequent account chooser.'); +</script> diff --git a/tests/wpt/tests/fedcm/support/login_delay.html b/tests/wpt/tests/fedcm/support/login_delay.html new file mode 100644 index 00000000000..469a7ee5cbe --- /dev/null +++ b/tests/wpt/tests/fedcm/support/login_delay.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<script> +async function doLogin() { + navigator.login.setStatus("logged-in"); + // Delay the close call to allow the accounts fetch to complete beforehand. + setTimeout(() => { + IdentityProvider.close(); + }, 200); +} +window.onload = doLogin; +</script> diff --git a/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json b/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json new file mode 100644 index 00000000000..030e4a85bfa --- /dev/null +++ b/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json @@ -0,0 +1,6 @@ +{ + "accounts_endpoint": "no_accounts.py", + "client_metadata_endpoint": "client_metadata.py", + "id_assertion_endpoint": "token_with_account_id.py", + "login_url": "login_delay.html" +} diff --git a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js index ef1d7090a8f..32220ae39e3 100644 --- a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js +++ b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js @@ -415,7 +415,10 @@ class FetchLaterIframeExpectation { } if (e.data.type === FetchLaterIframeMessageType.ERROR) { const actual = e.data.error.name || e.data.error.type; - if (e.data.error.constructor.name === 'DOMException' && + if (this.expectedDomErrorName === 'QuotaExceededError') { + return actual == this.expectedDomErrorName; + } else if ( + e.data.error.constructor.name === 'DOMException' && actual == this.expectedDomErrorName) { return true; } diff --git a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html index b295be116c7..955f815d940 100644 --- a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html +++ b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html @@ -30,6 +30,12 @@ fetchLater(TARGET_URL, REQUEST_INIT); postMessageBack({type: FetchLaterIframeMessageType.DONE}); } catch (e) { + if (e.name == "QuotaExceededError" && + e instanceof DOMException) { + // PostMessage is unable to serialize the QuotExceededError object. + // Therefore do basic checks here and pass error name if successful. + e = {name: e.name}; + } postMessageBack({type: FetchLaterIframeMessageType.ERROR, error: e}); } </script> diff --git a/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html b/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html index ac2c3cca28e..b783269207b 100644 --- a/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html +++ b/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html @@ -11,7 +11,7 @@ "use strict"; promise_test(t => { - const sourceUrl = resolveUrl("resources/fetch-private.html", + const sourceUrl = resolveUrl("resources/fetch-local.html", sourceResolveOptions({ server: Server.HTTPS_PUBLIC })); function checkResult(evt) { @@ -26,12 +26,12 @@ t.add_cleanup(() => popup.close()); return promise; - }, 'LNA Public to private with permission'); + }, 'LNA Public to local with permission'); promise_test(t => { // TODO(crbug.com/406991278): consider moving permission url param into // options - const sourceUrl = resolveUrl("resources/fetch-private.html?permission=denied", + const sourceUrl = resolveUrl("resources/fetch-local.html?permission=denied", sourceResolveOptions({ server: Server.HTTPS_PUBLIC })); function checkResult(evt) { @@ -46,10 +46,10 @@ t.add_cleanup(() => popup.close()); return promise; - }, 'LNA Public to private with permission denied'); + }, 'LNA Public to local with permission denied'); promise_test(t => { - const sourceUrl = resolveUrl("resources/fetch-private-http.html", + const sourceUrl = resolveUrl("resources/fetch-local-http.html", sourceResolveOptions({ server: Server.HTTPS_PUBLIC })); function checkResult(evt) { @@ -64,7 +64,7 @@ t.add_cleanup(() => popup.close()); return promise; - }, 'LNA Public to private http mixed content bypass'); + }, 'LNA Public to local http mixed content bypass'); promise_test(t => { const sourceUrl = resolveUrl("resources/fetch-public-http-wrong-address-space.html", diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private-http.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local-http.html index 517629b758e..dcad775bfec 100644 --- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private-http.html +++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local-http.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>Fetch HTTP private with targetAddressSpace private </title> +<title>Fetch HTTP local with targetAddressSpace local </title> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> @@ -8,17 +8,17 @@ <script> "use strict"; -// Fetch a private address over HTTP. Fetch is annotated with a -// targetAddressSpace of private to allow for mixed content check bypassing. +// Fetch a local address over HTTP. Fetch is annotated with a +// targetAddressSpace of local to allow for mixed content check bypassing. // -// TODO(crbug.com/406991278): consolidate with fetch-private.html adding +// TODO(crbug.com/406991278): consolidate with fetch-local.html adding // options to minimize # of resources needed. Promise.resolve().then(async () => { test_driver.set_test_context(opener); await test_driver.set_permission({ name: 'local-network-access' }, 'granted'); const target = { - server: Server.HTTP_PRIVATE, + server: Server.HTTP_LOCAL, behavior: { response: ResponseBehavior.allowCrossOrigin() }, }; const targetUrl = resolveTargetUrl(target); diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local.html index b96a207ec33..bc12e2660bc 100644 --- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private.html +++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>Fetch Private resource</title> +<title>Fetch Local resource</title> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> @@ -9,7 +9,7 @@ "use strict"; // Set the 'local-network-access' permission then attempt to fetch a resource -// in the private address space. +// in the local address space. // // By default, 'local-network-access' permission is set to 'granted'. This can // be changed by passing in a different value via the 'permission' URL parameter. @@ -30,7 +30,7 @@ Promise.resolve().then(async () => { await test_driver.set_permission({ name: 'local-network-access' }, permission_value); const target = { - server: Server.HTTPS_PRIVATE, + server: Server.HTTPS_LOCAL, behavior: { response: ResponseBehavior.allowCrossOrigin() }, }; const targetUrl = resolveTargetUrl(target); diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html index c15a87ff7b9..fb306f99d3c 100644 --- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html +++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> -<title>Fetch HTTP public targetAddress private resource</title> +<title>Fetch HTTP public targetAddress local resource</title> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> @@ -9,11 +9,11 @@ "use strict"; // Fetch a public address over HTTP. Fetch is annotated with a -// targetAddressSpace of private to try to bypass mixed content, but should +// targetAddressSpace of local to try to bypass mixed content, but should // fail because the address space of the resource does not match the target // address space. // -// TODO(crbug.com/406991278): consolidate with fetch-private.html adding +// TODO(crbug.com/406991278): consolidate with fetch-local.html adding // options to minimize # of resources needed. Promise.resolve().then(async () => { test_driver.set_test_context(opener); diff --git a/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js b/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js index 6b7813fa89d..09e234c5f24 100644 --- a/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js +++ b/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js @@ -4,28 +4,28 @@ // space names. const SERVER_PORTS = { "http": { - "local": {{ports[http][0]}}, - "private": {{ports[http-local][0]}}, + "loopback": {{ports[http][0]}}, + "local": {{ports[http-local][0]}}, "public": {{ports[http-public][0]}}, }, "https": { - "local": {{ports[https][0]}}, - "other-local": {{ports[https][1]}}, - "private": {{ports[https-local][0]}}, + "loopback": {{ports[https][0]}}, + "other-loopback": {{ports[https][1]}}, + "local": {{ports[https-local][0]}}, "public": {{ports[https-public][0]}}, }, "ws": { - "local": {{ports[ws][0]}}, + "loopback": {{ports[ws][0]}}, }, "wss": { - "local": {{ports[wss][0]}}, + "loopback": {{ports[wss][0]}}, }, }; // A `Server` is a web server accessible by tests. It has the following shape: // // { -// addressSpace: the IP address space of the server ("local", "private" or +// addressSpace: the IP address space of the server ("loopback", "local" or // "public"), // name: a human-readable name for the server, // port: the port on which the server listens for connections, @@ -56,15 +56,15 @@ class Server { }; } + static HTTP_LOOPBACK = Server.get("http", "loopback"); static HTTP_LOCAL = Server.get("http", "local"); - static HTTP_PRIVATE = Server.get("http", "private"); static HTTP_PUBLIC = Server.get("http", "public"); + static HTTPS_LOOPBACK = Server.get("https", "loopback"); + static OTHER_HTTPS_LOOPBACK = Server.get("https", "other-loopback"); static HTTPS_LOCAL = Server.get("https", "local"); - static OTHER_HTTPS_LOCAL = Server.get("https", "other-local"); - static HTTPS_PRIVATE = Server.get("https", "private"); static HTTPS_PUBLIC = Server.get("https", "public"); - static WS_LOCAL = Server.get("ws", "local"); - static WSS_LOCAL = Server.get("wss", "local"); + static WS_LOOPBACK = Server.get("ws", "loopback"); + static WSS_LOOPBACK = Server.get("wss", "loopback"); }; // Resolves a URL relative to the current location, returning an absolute URL. diff --git a/tests/wpt/tests/fullscreen/model/remove-first-sibling.html b/tests/wpt/tests/fullscreen/model/remove-first-sibling.html new file mode 100644 index 00000000000..be1f501afff --- /dev/null +++ b/tests/wpt/tests/fullscreen/model/remove-first-sibling.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<title>Remove the first of two sibling elements in the fullscreen stack</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="../trusted-click.js"></script> +<div id="log"></div> +<div id="a"></div> +<div id="b"></div> +<script> + promise_test(async (t) => { + t.add_cleanup(() => { + if (document.fullscreenElement) { + return document.exitFullscreen(); + } + }); + + const a = document.getElementById("a"); + const b = document.getElementById("b"); + await Promise.all([trusted_request(a), fullScreenChange()]); + + assert_equals(document.fullscreenElement, a, "fullscreen element after first request"); + assert_true(a.matches(":fullscreen"), "a matches :fullscreen after first request"); + + await Promise.all([trusted_request(b, a), fullScreenChange()]); + assert_equals(document.fullscreenElement, b, "fullscreen element after second request"); + assert_true(a.matches(":fullscreen"), "a matches :fullscreen after second request"); + assert_true(b.matches(":fullscreen"), "b matches :fullscreen after second request"); + + // Removing /a/ now shouldn't do anything except remove it from the top + // layer, which causes it to no longer match :fullscreen. + a.remove(); + assert_equals(document.fullscreenElement, b, "fullscreen element immediately after removal of a"); + assert_false(a.matches(":fullscreen"), "a should no longer match :fullscreen immediately after removal"); + assert_true(b.matches(":fullscreen"), "b matches :fullscreen immediately after removal of a"); + + // No fullscreenchange event should fire. If the removal triggered exiting + // fullscreen the event would be fired after an async section and an + // animation frame task, so wait until after that. + document.onfullscreenchange = t.unreached_func("fullscreenchange event"); + await new Promise((resolve) => { + requestAnimationFrame(resolve); + }); + }); +</script> diff --git a/tests/wpt/tests/fullscreen/model/remove-last-sibling.html b/tests/wpt/tests/fullscreen/model/remove-last-sibling.html new file mode 100644 index 00000000000..f893a3f9d5a --- /dev/null +++ b/tests/wpt/tests/fullscreen/model/remove-last-sibling.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<title>Remove the last of two sibling elements in the fullscreen stack</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="../trusted-click.js"></script> +<div id="log"></div> +<div id="a"></div> +<div id="b"></div> +<script> + promise_test(async (t) => { + t.add_cleanup(() => { + if (document.fullscreenElement) { + return document.exitFullscreen(); + } + }); + + const a = document.getElementById("a"); + const b = document.getElementById("b"); + await Promise.all([trusted_request(a), fullScreenChange()]); + + assert_equals(document.fullscreenElement, a, "fullscreen element after first request"); + assert_true(a.matches(":fullscreen"), "a matches :fullscreen after first request"); + + await Promise.all([trusted_request(b, a), fullScreenChange()]); + assert_equals(document.fullscreenElement, b, "fullscreen element after second request"); + assert_true(a.matches(":fullscreen"), "a matches :fullscreen after second request"); + assert_true(b.matches(":fullscreen"), "b matches :fullscreen after second request"); + + // Removing the fullscreen element (b) triggers exiting fullscreen. Some changes are + // visible synchronously and the others come when the event fires. + b.remove(); + assert_equals(document.fullscreenElement, a, "fullscreen element immediately after removal of b"); + assert_true(a.matches(":fullscreen"), "a matches :fullscreen immediately after removal of b"); + assert_false(b.matches(":fullscreen"), "b no longer matches :fullscreen immediately after removal"); + + // A fullscreenchange event should fire and all state should be cleared. + await fullScreenChange(); + assert_equals(document.fullscreenElement, null, "fullscreen element after event"); + assert_false(a.matches(":fullscreen"), "a no longer matches :fullscreen after event"); + assert_false(b.matches(":fullscreen"), "b no longer matches :fullscreen after event"); + }); +</script> diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js index 6c88b49fd4a..0181394f32d 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +++ b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js @@ -228,82 +228,6 @@ const DEFAULT_CONTEXT_CONFIG = new RemoteContextConfig(); /** - * This class represents a configuration for creating remote contexts. This is - * the entry-point - * for creating remote contexts, providing @see addWindow . - */ - class RemoteContextHelper { - /** - * @param {RemoteContextConfig|object} config The configuration - * for this remote context. - */ - constructor(config) { - this.config = RemoteContextConfig.ensure(config); - } - - /** - * Creates a new remote context and returns a `RemoteContextWrapper` giving - * access to it. - * @private - * @param {Object} options - * @param {(url: string) => Promise<undefined>} [options.executorCreator] A - * function that takes a URL and causes the browser to navigate some - * window to that URL, e.g. via an iframe or a new window. If this is - * not supplied, then the returned RemoteContextWrapper won't actually - * be communicating with something yet, and something will need to - * navigate to it using its `url` property, before communication can be - * established. - * @param {RemoteContextConfig|object} [options.extraConfig] If supplied, - * extra configuration for this remote context to be merged with - * `this`'s existing config. If it's not a `RemoteContextConfig`, it - * will be used to construct a new one. - * @returns {Promise<RemoteContextWrapper>} - */ - async createContext({ - executorCreator, - extraConfig, - isWorker = false, - }) { - const config = - this.config.merged(RemoteContextConfig.ensure(extraConfig)); - - // UUID is needed for executor. - const uuid = token(); - const url = await config.createExecutorUrl(uuid, isWorker); - - if (executorCreator) { - if (config.urlType == 'blank') { - await executorCreator(undefined, await fetchText(url)); - } else { - await executorCreator(url, undefined); - } - } - - return new RemoteContextWrapper(new RemoteContext(uuid), this, url); - } - - /** - * Creates a window with a remote context. @see createContext for - * @param {RemoteContextConfig|object} [extraConfig] Will be - * merged with `this`'s config. - * @param {Object} [options] - * @param {string} [options.target] Passed to `window.open` as the - * 2nd argument - * @param {string} [options.features] Passed to `window.open` as the - * 3rd argument - * @returns {Promise<RemoteContextWrapper>} - */ - addWindow(extraConfig, options) { - return this.createContext({ - executorCreator: windowExecutorCreator(options), - extraConfig, - }); - } - } - // Export this class. - self.RemoteContextHelper = RemoteContextHelper; - - /** * Attaches header to the URL. See * https://web-platform-tests.org/writing-tests/server-pipes.html#headers * @param {string} url the URL to which headers should be attached. @@ -736,4 +660,87 @@ } } } + + + /** + * This class represents a configuration for creating remote contexts. This is + * the entry-point + * for creating remote contexts, providing @see addWindow . + */ + class RemoteContextHelper { + /** + * The constructor to use when creating new remote context wrappers. + * Can be overridden by subclasses. + */ + static RemoteContextWrapper = RemoteContextWrapper; + + /** + * @param {RemoteContextConfig|object} config The configuration + * for this remote context. + */ + constructor(config) { + this.config = RemoteContextConfig.ensure(config); + } + + /** + * Creates a new remote context and returns a `RemoteContextWrapper` giving + * access to it. + * @private + * @param {Object} options + * @param {(url: string) => Promise<undefined>} [options.executorCreator] A + * function that takes a URL and causes the browser to navigate some + * window to that URL, e.g. via an iframe or a new window. If this is + * not supplied, then the returned RemoteContextWrapper won't actually + * be communicating with something yet, and something will need to + * navigate to it using its `url` property, before communication can be + * established. + * @param {RemoteContextConfig|object} [options.extraConfig] If supplied, + * extra configuration for this remote context to be merged with + * `this`'s existing config. If it's not a `RemoteContextConfig`, it + * will be used to construct a new one. + * @returns {Promise<RemoteContextWrapper>} + */ + async createContext({ + executorCreator, + extraConfig, + isWorker = false, + }) { + const config = + this.config.merged(RemoteContextConfig.ensure(extraConfig)); + + // UUID is needed for executor. + const uuid = token(); + const url = await config.createExecutorUrl(uuid, isWorker); + + if (executorCreator) { + if (config.urlType == 'blank') { + await executorCreator(undefined, await fetchText(url)); + } else { + await executorCreator(url, undefined); + } + } + + return new this.constructor.RemoteContextWrapper(new RemoteContext(uuid), this, url); + } + + /** + * Creates a window with a remote context. @see createContext for + * @param {RemoteContextConfig|object} [extraConfig] Will be + * merged with `this`'s config. + * @param {Object} [options] + * @param {string} [options.target] Passed to `window.open` as the + * 2nd argument + * @param {string} [options.features] Passed to `window.open` as the + * 3rd argument + * @returns {Promise<RemoteContextWrapper>} + */ + addWindow(extraConfig, options) { + return this.createContext({ + executorCreator: windowExecutorCreator(options), + extraConfig, + }); + } + } + // Export this class. + self.RemoteContextHelper = RemoteContextHelper; } diff --git a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js index 525d28553aa..160a0cbf9ac 100644 --- a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js +++ b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js @@ -57,7 +57,10 @@ function makeVideo() { return makeMakeVideo("/images/pattern")(); } -var imageBitmapDataUrlVideoPromise = fetch(getVideoURI("/images/pattern")) +var imageBitmapDataUrlVideoPromise = self.GLOBAL && self.GLOBAL.isWorker() + // /common/media.js can't load in a Worker so we don't have getVideoURI + ? null + : fetch(getVideoURI("/images/pattern")) .then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()])) .then(([type, data]) => { return new Promise(function(resolve, reject) { diff --git a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js new file mode 100644 index 00000000000..0d2ddf5855e --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js @@ -0,0 +1,117 @@ +// META: title=createImageBitmap resolves in a task +// META: script=/common/media.js +// META: script=./common.sub.js +function makeWorkerImageBitmap() { + return makeOffscreenCanvas().then(canvas => { + return createImageBitmap(canvas); + }); +} +var imageSourceTypes = self.GLOBAL.isWorker() ? + [ + { name: 'an OffscreenCanvas', factory: makeOffscreenCanvas }, + { name: 'an ImageData', factory: makeImageData }, + { name: 'an ImageBitmap', factory: makeWorkerImageBitmap }, + { name: 'a Blob', factory: makeBlob('/images/pattern.png') }, + ] : + imageSourceTypes; + +var testFuncs = { + reject_sync: (promiseFunc, source, t) => { + return new Promise((resolve, reject) => { + let rejected = false; + promiseFunc(source).then(() => { + reject(new Error('Expected this call to reject')); + }, (err) => { + rejected = true; + }); + Promise.resolve().then(() => { + try { + assert_equals(rejected, true, 'The promise should be rejected synchronously') + resolve(t); + } catch (err) { + reject(err); + } + }) + }); + + }, + resolve_async: (promiseFunc, source, t) => { + return new Promise((resolve, reject) => { + let taskRan = false; + promiseFunc(source).then(() => { + try { + assert_equals(taskRan, true, 'The promise should be resolved asynchronously') + resolve(t); + } catch (err) { + reject(err) + } + }, t.unreached_func('Expected this call to resolve')) + Promise.resolve().then(() => { + taskRan = true; + }); + }); + }, + reject_async: (promiseFunc, source, t) => { + return new Promise((resolve, reject) => { + let taskRan = false; + Promise.resolve().then(() => { + promiseFunc(source).then( + t.unreached_func('Expected this call to reject'), + () => { + try { + assert_equals(taskRan, true, 'The promise should be rejected asynchronously') + resolve(t); + } catch (err) { + reject(err) + } + }, + ); + }); + Promise.resolve().then(() => { + taskRan = true; + }); + }); + }, +}; + +var testCases = [{ + description: 'createImageBitmap with <sourceType> source and ' + + 'invalid cropHeight', + promiseTestFunction: (source) => createImageBitmap(source, 0, 0, 0, 0), + resolution: 'reject_sync' + }, + { + description: 'createImageBitmap with <sourceType> source and ' + + 'invalid resizeHeight', + promiseTestFunction: (source) => createImageBitmap(source, { + resizeWidth: 0, + resizeHeight: 0 + }), + resolution: 'reject_sync' + }, + { + description: 'createImageBitmap with <sourceType> source', + promiseTestFunction: (source) => createImageBitmap(source), + resolution: 'resolve_async' + }, +]; + +imageSourceTypes.forEach(imageSourceType => { + testCases.forEach(testCase => { + let description = `${testCase.description.replace('<sourceType>', + imageSourceType.name)} should ${testCase.resolution.replace('_', ' ')}`; + + promise_test(t => { + return imageSourceType.factory().then(source => { + const tester = testFuncs[testCase.resolution]; + return tester(testCase.promiseTestFunction, source, t); + }) + }, description); + + }); +}); +promise_test(t => { + return makeBlob('data:,')().then(image => { + return testFuncs.reject_async((source) => createImageBitmap(source), image, t); + }); +}, 'Invalid Blob source should reject async');
\ No newline at end of file diff --git a/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html b/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html index 2413fe26673..5471e8e9ec1 100644 --- a/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html +++ b/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html @@ -15,95 +15,98 @@ <fieldset id="fieldset2" disabled><legend><button id="button5">Button 5</button></legend></fieldset> <div id="div" tabindex="0">Div</div> <div id="editable" contenteditable=true>editor</div> + <button id="button6">Button 6</button> </div> <script> "use strict"; -test(() => { - const button = document.querySelector("#button1"); - button.focus(); +function test_focus_fixup(selector, change, expectSync = false) { + promise_test(async function(t) { + // Make sure we're not running from a ResizeObserver / etc notification. + await new Promise(r => t.step_timeout(r, 0)); - assert_equals(document.activeElement, button, "Sanity check: the button must start focused"); + const el = document.querySelector(selector); + el.focus(); - button.disabled = true; - - assert_not_equals(document.activeElement, button, "After disabling, the button must no longer be focused"); - assert_equals(document.activeElement, document.body, "After disabling, the body must be focused"); + assert_equals(document.activeElement, el, `Sanity check: ${selector} must start focused`); -}, "Disabling the active element (making it inert)"); + change(el); -test(() => { - const button = document.querySelector("#button2"); - button.focus(); + { + const fn = expectSync ? assert_not_equals : assert_equals; + fn(document.activeElement, el, `active element ${expectSync ? "is" : "isn't"} fixed-up sync`); + } - assert_equals(document.activeElement, button, "Sanity check: the button must start focused"); + // We don't expect blur events in the sync case per spec yet, at least. + if (!expectSync) { + // Fixup should run after animation frame callbacks, right before the end of + // "update the rendering", so after resize observations. + let ranFirstRaf = false; + let ranRO = false; - button.hidden = true; + let resolveDone; + let done = new Promise(r => { resolveDone = r; }); - assert_not_equals(document.activeElement, button, "After hiding, the button must no longer be focused"); - assert_equals(document.activeElement, document.body, "After hiding, the body must be focused"); + requestAnimationFrame(t.step_func(() => { + ranFirstRaf = true; + assert_equals(document.activeElement, el, "activeElement shouldn't have changed yet (rAF)"); + requestAnimationFrame(t.step_func(() => { + assert_true(ranRO, "ResizeObserver should've ran on the previous frame"); + resolveDone(); + })); + })); -}, "Hiding the active element"); + let ro = new ResizeObserver(t.step_func(() => { + assert_true(ranFirstRaf, "requestAnimationFrame should run before ResizeObserver"); + ranRO = true; + assert_equals(document.activeElement, el, "activeElement shouldn't have changed yet (ResizeObserver)"); + })); -test(() => { - const button = document.querySelector("#button3"); - button.focus(); + // TODO: Test IntersectionObserver timing. It's a bit trickier because it + // uses its own task source and so on. + ro.observe(document.documentElement); - assert_equals(document.activeElement, button, "Sanity check: the button must start focused"); + await done; - button.remove(); + ro.disconnect(); + } - assert_not_equals(document.activeElement, button, "After removing, the button must no longer be focused"); - assert_equals(document.activeElement, document.body, "After removing, the body must be focused"); + assert_not_equals(document.activeElement, el, "focus is fixed up"); + assert_equals(document.activeElement, document.body, "Body is focused"); + }, selector); +} -}, "Removing the active element from the DOM"); +test_focus_fixup("#button1", function(button) { + button.disabled = true; +}); -test(() => { - const fieldset = document.querySelector("#fieldset1"); - const button = document.querySelector("#button4"); - button.focus(); - assert_equals(document.activeElement, button, "Sanity check: the button must start focused"); +test_focus_fixup("#button2", function(button) { + button.hidden = true; +}); - fieldset.disabled = true; +test_focus_fixup("#button3", function(button) { + button.remove(); +}, /* expectSync = */ true); - assert_not_equals(document.activeElement, button, "After disabling ancestor fieldset, the button must no longer be focused"); - assert_equals(document.activeElement, document.body, "After disabling ancestor fieldset, the body must be focused"); -}, "Disabling <fieldset> affects its descendants"); +test_focus_fixup("#button4", function(button) { + document.querySelector("#fieldset1").disabled = true; +}); -test(() => { +test_focus_fixup("#button5", function(button) { const fieldset = document.querySelector("#fieldset2"); - const button = document.querySelector("#button5"); - button.focus(); - assert_equals(document.activeElement, button, "Sanity check: the button must start focused"); - fieldset.insertBefore(document.createElement("legend"), fieldset.firstChild); +}); - assert_not_equals(document.activeElement, button, "After changing a legend element, the button must no longer be focused"); - assert_equals(document.activeElement, document.body, "After changing a legend element, the body must be focused"); -}, "Changing the first legend element in disabled <fieldset>"); - -test(() => { - const div = document.querySelector("#div"); - div.focus(); - - assert_equals(document.activeElement, div, "Sanity check: the div must start focused"); - +test_focus_fixup("#div", function(div) { div.removeAttribute("tabindex"); +}); - assert_not_equals(document.activeElement, div, "After removing tabindex, the div must no longer be focused"); - assert_equals(document.activeElement, document.body, "After removing tabindex, the body must be focused"); - -}, "Removing the tabindex attribute from a div"); - -test(() => { - const div = document.querySelector("#editable"); - div.focus(); - assert_equals(document.activeElement, div, "Sanity check: the div must start focused"); - +test_focus_fixup("#editable", function(div) { div.contentEditable = false; +}); - assert_not_equals(document.activeElement, div, "After disabling contentEditable, the div must no longer be focused"); - assert_equals(document.activeElement, document.body, "After disabling contentEditable, the body must be focused"); -}, "Disabling contenteditable"); +test_focus_fixup("#button6", function(button) { + button.style.visibility = "hidden"; +}); </script> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html new file mode 100644 index 00000000000..04c000ad5ad --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE HTML> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + font-size: 60px; +} + +</style> + +<select> + <option>Option</option> +</select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html new file mode 100644 index 00000000000..628c7ec51f4 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html @@ -0,0 +1,30 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-height-in-flex-ref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + font-size: 60px; +} + +</style> + +<div style="display:flex; flex-direction: column; align-items: flex-start; height: 100px;"> + <select> + <option>Option</option> + </select> + <div style="color: transparent"> + This div has a lot of text in it but it should not make the select become smaller. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + A lot of text. Really a lot of text. + </div> +</div> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html new file mode 100644 index 00000000000..422f187dc69 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 25px; + height: calc(max(1lh, 24px) + 1px); +} + +</style> + +<select></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html new file mode 100644 index 00000000000..1c37e12b0bc --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-size-empty-001-ref2.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 24px; + height: max(1lh, 24px); +} + +</style> + +<select></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html new file mode 100644 index 00000000000..69170af04b5 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<link rel="mismatch" href="min-size-empty-001-notref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 23px; + height: calc(max(1lh, 24px) - 1px); +} + +</style> + +<select></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html new file mode 100644 index 00000000000..fd5cc4a0d02 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-size-empty-001-ref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +</style> + +<select></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html new file mode 100644 index 00000000000..0500b54b758 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 25px; + height: calc(max(1lh, 24px) + 1px); +} + +</style> + +<select><option></option></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html new file mode 100644 index 00000000000..c9e2d2333e7 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-size-empty-002-ref2.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 24px; + height: max(1lh, 24px); +} + +</style> + +<select><option></option></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html new file mode 100644 index 00000000000..dfbbbcac533 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<link rel="mismatch" href="min-size-empty-002-notref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +select { + width: 23px; + height: calc(max(1lh, 24px) - 1px); +} + +</style> + +<select><option></option></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html new file mode 100644 index 00000000000..b6256c93b28 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-size-empty-002-ref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} +select::picker-icon { + display: none; +} + +</style> + +<select><option></option></select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html new file mode 100644 index 00000000000..33df77bd0f1 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE HTML> +<style> + +select, select::picker(select) { + appearance: base-select; +} + +</style> + +<select> + <option>This is an option</option> +</select> diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html new file mode 100644 index 00000000000..f3510a29585 --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML> +<link rel="match" href="min-width-in-flex-ref.html"> +<style> + +select, select::picker(select) { + appearance: base-select; +} + +select { + white-space: nowrap; +} + +</style> + +<div style="display:flex; flex-direction: row; width: 400px"> + <select style="align-self: flex-start"> + <option>This is an option</option> + </select> + <div style="color: transparent"> + This div has a lot of text in it but it should not make the select become smaller. + A lot of text. Really a lot of text. + </div> +</div> diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html index ae6fa0e4328..c10a942069c 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html @@ -1,7 +1,7 @@ <!doctype html> <head> <meta charset="utf-8"> -<title>HTMLImageElement naturalWidth/naturalHeight behavior for SVG that lacks at least one natural dimension</title> +<title>HTMLImageElement attributes naturalWidth, naturalHeight, width, height</title> <!-- Note: this test asserts a different expectation from what the HTML spec requires, as of mid-2025 when this testcase is being written. The spec behavior doesn't appear to be web-compatible for some of the cases here, @@ -58,12 +58,50 @@ img { * The "title" attribute is a description of the scenario being tested, and it must be unique to satisfy the test harness requirements. --> -<!-- FIRST PART OF TEST: No viewBox. Just a missing (or edge-casey, i.e. - negative or percent-valued) values, for the width and height attrs on the +<!-- JPG images --> +<img src="resources/cat.jpg" + title="raster image" + data-natural-width="320" data-natural-height="240"> +<img src="resources/cat.jpg" width="10" height="10" + title="raster image with width/height attributes" + data-natural-width="320" data-natural-height="240" + data-width="10" data-height="10" + data-not-rendered-width="10" data-not-rendered-height="10"> +<!-- Use "size-comes-from-broken-image-icon" attribute to opt out of checking + img.width and img.height, because they come from the UA-dependent + size of the broken image icon: --> +<img src="non-existent.jpg" + title="non existent image, no natural dimensions" + data-natural-width="0" data-natural-height="0" + size-comes-from-broken-image-icon> +<img src="non-existent.jpg" width="10" height="10" + title="non existent image with width/height attributes, no natural dimensions" + data-natural-width="0" data-natural-height="0" + data-width="10" data-height="10" + data-not-rendered-width="10" data-not-rendered-height="10"> + +<!-- First group of SVG images: no viewBox, with a missing (or edge-casey, i.e. + negative or percent-valued) value for the width and/or height attr on the root svg element in a SVG image. --> <img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>" title="SVG image, no natural dimensions" data-natural-width="300" data-natural-height="150"> +<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>" + width="40" height="10" + data-width="40" data-height="10" + data-not-rendered-width="40" data-not-rendered-height="10" + title="SVG image with width/height attrs, no natural dimensions" + data-natural-width="300" data-natural-height="150"> +<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>" + width="40" + data-width="40" data-not-rendered-width="40" + title="SVG image with width attr, no natural dimensions" + data-natural-width="300" data-natural-height="150"> +<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>" + height="10" + data-height="10" data-not-rendered-height="10" + title="SVG image with height attr, no natural dimensions" + data-natural-width="300" data-natural-height="150"> <!-- Note: percent values can't be resolved when determining natural dimensions, so the exact percentage shouldn't matter. --> <img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='400%' height='10%'></svg>" @@ -95,7 +133,7 @@ img { title="SVG image, with natural height being negative" data-natural-width="300" data-natural-height="0"> -<!-- NEXT PART OF TEST: Same as above, but now with a viewBox that grants a +<!-- Second group of SVG images: Same as above, but now with a viewBox that grants a 3:1 aspect-ratio; whenever we know one natural dimension, that should combine with the aspect ratio to produce the other natural dimension. @@ -137,7 +175,7 @@ img { title="SVG image, with natural height being negative, and aspect ratio from viewBox" data-natural-width="0" data-natural-height="0"> -<!-- THIRD PART OF TEST: Check a degenerate 0-sized viewBox for some of the +<!-- Third group of SVG images: Check a degenerate 0-sized viewBox for some of the cases; it should have no impact. --> <img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 0 0'></svg>" title="SVG image, no natural dimensions, viewBox with 0 width/height" @@ -167,12 +205,15 @@ img { title="SVG image, with natural height, viewBox with 0 height" data-natural-width="300" data-natural-height="60"> -<!~- FINAL PART OF TEST: we have width/height/viewBox all specified on the - svg element. The width and height attrs should determine the natural - dimensions, with no impact from viewBox. --> -<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 600 200'></svg>" +<!~- Final group of SVG images: we have pixel-valued width/height on the root + svg element, and possibly viewBox as well. The width and height attrs should + determine the natural dimensions, with no impact from viewBox. --> +<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40'></svg>" + title="SVG image, with natural width and height" + data-natural-width="60" data-natural-height="40"> +<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' viewBox='0 0 600 200'></svg>" title="SVG image, with natural width and height, and aspect ratio from viewBox" - data-natural-width="60" data-natural-height="60"> + data-natural-width="60" data-natural-height="40"> <img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='0' height='0' viewBox='0 0 600 200'></svg>" title="SVG image, with natural width and height of 0, and aspect ratio from viewBox" data-natural-width="0" data-natural-height="0"> @@ -191,33 +232,144 @@ img { the window onload event: --> <script> setup({explicit_done:true}); + +// Utility function to generate a clone of imgTemplates using "srcset" and a +// given density value, with expectations adjusted per the density: +function cloneTemplateWithDensity(density) { + if (typeof(density) !== "number" || density <= 0) { + // If we get here, there's a bug in the test itself; throw an exception: + throw new Error("test error: param should be a positive number"); + } + let clone = imgTemplates.content.cloneNode("true"); + + for (let img of clone.children) { + // Swap out "src" for "srcset": + // The srcset attribute uses a space-separated list of tokens, + // so we need to encode any spaces that are in the URI itself + // before we put it in srcset: + let srcVal = img.getAttribute("src").replaceAll(" ", "%20"); + img.removeAttribute("src"); + img.setAttribute("srcSet", `${srcVal} ${density}x`); + + // Mention the density in the 'title' to keep the title values unique: + img.setAttribute("title", + `${img.getAttribute("title")} (with srcset/${density}x)`); + + const isUsingConcreteObjectWidth = (img.dataset.naturalWidth == "300"); + const isUsingConcreteObjectHeight = (img.dataset.naturalHeight == "150"); + + // Scale our 'data-natural-{width,height}' expectations by the density. + // But also: + // * Preserve the original 'data-natural-{width,height}' as the + // 'data-{width,height}' expectation if it's just the concrete object size + // (which doesn't actually get scaled by the density in practice when + // the image actually renders). + // * Preserve the original 'data-natural-{width,height}' as the + // 'data-not-rendered-{width,height}' expectation (if we don't already have + // one) since browsers don't do density-correction on .width and .height when + // the image is not being rendered, as discussed in + // https://github.com/whatwg/html/issues/11287#issuecomment-2923467541 + for (let name in img.dataset) { + if (name.startsWith("natural")) { + let origExpectation = img.dataset[name]; + + // Scale our img.natural{Width,Height} expectation: + img.dataset[name] = origExpectation / density; + + let isWidthAxis = (name == "naturalWidth"); + let nameWithoutNatural = (isWidthAxis ? "width" : "height"); + + let isConcreteObjectSize = + (isWidthAxis ? isUsingConcreteObjectWidth : isUsingConcreteObjectHeight); + if (isConcreteObjectSize && !(nameWithoutNatural in img.dataset)) { + img.dataset[nameWithoutNatural] = origExpectation; + } + + // Construct a string for "data-not-rendered-{width,height}" for + // whichever axis we're currently handling, and stash the + // origExpectation in there if we don't already have some expectation + // set there: + let notRenderedName = name.replace("natural", "notRendered"); + if (!(notRenderedName in img.dataset)) { + img.dataset[notRenderedName] = origExpectation; + } + } + } + } + return clone; +} + // Clone and append a copy of the contents of imgTemplates, for testing: let clone = imgTemplates.content.cloneNode("true"); containingBlock.appendChild(clone); +// Append additional clones, modified to use srcset with specified density. +// Note: +// * '1' is the trivial case; we're just testing that for completeness, +// to be sure there aren't any unexpected differences between +// <img src="..."> and <img srcset="... 1x">). +// * It's best for whatever density we test here to be something that evenly +// divides all of the image sizes in this test (so 1 and 2 are easy choices). +containingBlock.appendChild(cloneTemplateWithDensity(1)); +containingBlock.appendChild(cloneTemplateWithDensity(2)); + // After all the img elements have loaded (indicated by the window load event), // we run the various tests: onload = function() { Array.from(document.images).forEach(img => { + const expectedNaturalWidth = parseFloat(img.dataset.naturalWidth); + const expectedNaturalHeight = parseFloat(img.dataset.naturalHeight); + test(function() { // We expect naturalWidth to match the provided data-natural-width // (and similar for 'height'). - const expectedNaturalWidth = parseFloat(img.dataset.naturalWidth); - const expectedNaturalHeight = parseFloat(img.dataset.naturalHeight); assert_equals(img.naturalWidth, expectedNaturalWidth, 'naturalWidth'); assert_equals(img.naturalHeight, expectedNaturalHeight, 'naturalHeight'); - // If 'data-width' is provided, then we expect img.width to match it. - // Otherwise we expect img.width to match the 'data-natural-width'. - // (And similar for 'height'.) - const expectedWidth = 'width' in img.dataset ? - parseFloat(img.dataset.width) : expectedNaturalWidth; - const expectedHeight = 'height' in img.dataset ? - parseFloat(img.dataset.height) : expectedNaturalHeight; - assert_equals(img.width, expectedWidth, 'width'); - assert_equals(img.height, expectedHeight, 'height'); + let shouldCheckWidthAndHeight = + !img.hasAttribute("size-comes-from-broken-image-icon"); + if (shouldCheckWidthAndHeight) { + // If 'data-width' is provided, then we expect img.width to match it. + // Otherwise we expect img.width to match the 'data-natural-width'. + // (And similar for 'height'.) + const expectedWidth = 'width' in img.dataset ? + parseFloat(img.dataset.width) : expectedNaturalWidth; + const expectedHeight = 'height' in img.dataset ? + parseFloat(img.dataset.height) : expectedNaturalHeight; + assert_equals(img.width, expectedWidth, 'width'); + assert_equals(img.height, expectedHeight, 'height'); + } }, `${img.title}`); + + test(function() { + // Now test what we get when the img is not rendered. + // * naturalWidth and naturalHeight shouldn't change. + // * width and height should generally match naturalWidth and + // naturalHeight. (Exceptions are indicated via the + // 'data-not-rendered-{width/height} attributes). + this.add_cleanup(function() { + img.style.display = ""; + }); + + img.style.display = "none"; + img.getBoundingClientRect(); // Flush layout. + + assert_equals(img.naturalWidth, expectedNaturalWidth, + 'naturalWidth when not rendered'); + assert_equals(img.naturalHeight, expectedNaturalHeight, + 'naturalHeight when not rendered'); + + const expectedNotRenderedWidth = 'notRenderedWidth' in img.dataset ? + parseFloat(img.dataset.notRenderedWidth) : expectedNaturalWidth; + const expectedNotRenderedHeight = 'notRenderedHeight' in img.dataset ? + parseFloat(img.dataset.notRenderedHeight) : expectedNaturalHeight; + + assert_equals(img.width, expectedNotRenderedWidth, + 'width when not rendered'); + assert_equals(img.height, expectedNotRenderedHeight, + 'height when not rendered'); + }, `${img.title} (when not rendered)`); }); done(); }; diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html new file mode 100644 index 00000000000..8e75a4e21e8 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testdriver-actions.js"></script> + +<style> +option:not(:checked) { + background-color: green; + color: blue; +} +</style> + +<select multiple size=4 autofocus> + <option>option</option> + <option id=target>focused and checked</option> +</select> + +<script> +const target = document.getElementById('target'); +(async () => { + await (new test_driver.Actions() + .pointerMove(0, 0, {origin: target}) + .pointerDown() + .pointerUp()) + .send(); + document.documentElement.classList.remove('reftest-wait'); +})(); +</script> diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html new file mode 100644 index 00000000000..c05d595c30c --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://issues.chromium.org/issues/415953695"> +<link rel=match href="list-box-important-colors-ref.html"> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testdriver-actions.js"></script> + +<style> +option { + background-color: green; + color: blue; +} +</style> + +<select multiple size=4 autofocus> + <option>option</option> + <option id=target>focused and checked</option> +</select> + +<script> +const target = document.getElementById('target'); +(async () => { + await (new test_driver.Actions() + .pointerMove(0, 0, {origin: target}) + .pointerDown() + .pointerUp()) + .send(); + document.documentElement.classList.remove('reftest-wait'); +})(); +</script> diff --git a/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.html index 1a571f54414..1a571f54414 100644 --- a/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.tentative.html +++ b/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.html diff --git a/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html index 7e6fe25dabf..130d76451da 100644 --- a/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.tentative.html +++ b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html @@ -9,14 +9,18 @@ <script src="../../popovers/resources/toggle-event-source-test.js"></script> <button id=showmodalbutton commandfor=dialog command=show-modal>show modal</button> -<dialog id=dialog> +<button id=lightdismiss>light dismiss</button> +<dialog id=dialog closedby=any> dialog <button id=closebutton commandfor=dialog command=close>close</button> + <button id=requestclosebutton commandfor=dialog command=request-close>request close</button> </dialog> <script> const showmodalbutton = document.getElementById('showmodalbutton'); const dialog = document.getElementById('dialog'); +const requestclosebutton = document.getElementById('requestclosebutton'); +const lightdismiss = document.getElementById('lightdismiss'); createToggleEventSourceTest({ description: 'ToggleEvent.source on <dialog> elements: dialog.showModal().', @@ -53,4 +57,34 @@ createToggleEventSourceTest({ openSource: showmodalbutton, closeSource: null }); + +createToggleEventSourceTest({ + description: 'ToggleEvent.source on <dialog> elements: open with showModal, close with request-close button.', + target: dialog, + openFunc: async () => dialog.showModal(), + closeFunc: async () => requestclosebutton.click(), + openSource: null, + closeSource: requestclosebutton +}); + +createToggleEventSourceTest({ + description: 'ToggleEvent.source on <dialog> elements: open with button, close with light dismiss.', + target: dialog, + openFunc: async () => { + await test_driver.click(showmodalbutton); + }, + closeFunc: async () => { + dialog.addEventListener('cancel', event => event.preventDefault(), {once: true}); + requestclosebutton.click(); + assert_true(dialog.matches(':open'), + 'cancel preventDefault should have prevented dialog from closing.'); + await (new test_driver.Actions() + .pointerMove(0, 0, {origin: lightdismiss}) + .pointerDown() + .pointerUp()) + .send(); + }, + openSource: showmodalbutton, + closeSource: null +}); </script> diff --git a/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html b/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html index 9678286179a..1455ba98bb3 100644 --- a/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html +++ b/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html @@ -17,11 +17,13 @@ word-spacing: 1em; font-size: 100px; letter-spacing: 21px; + box-shadow: 5px 5px inset; } #id-under-bounds { word-spacing: -1px; font-size: 100px; letter-spacing: -6px; + box-shadow: rgb(255, 0, 0) 5px 4px 3px 2px, 5px 5px inset; } #id-within-bounds { font-weight: 300; @@ -29,6 +31,7 @@ word-spacing: 0.4em; font-size: 100px; letter-spacing: 15px; + box-shadow: rgb(255, 0, 0) 5px 4px 3px 2px; } </style> @@ -44,10 +47,12 @@ assert_equals(getComputedStyle(el).fontStyle, "normal", "font-style"); assert_equals(getComputedStyle(el).wordSpacing, "50px", "word-spacing"); assert_equals(getComputedStyle(el).letterSpacing, "20px", "letter-spacing"); + assert_equals(getComputedStyle(el).boxShadow, "none", "box-shadow"); el = document.getElementById("id-under-bounds"); assert_equals(getComputedStyle(el).wordSpacing, "0px", "word-spacing, negative"); assert_equals(getComputedStyle(el).letterSpacing, "-5px", "letter-spacing, negative"); + assert_equals(getComputedStyle(el).boxShadow, "none", "box-shadow, multiple"); }, "Properties with out-of-bounds values should be corrected"); test(function(){ @@ -56,6 +61,7 @@ assert_equals(getComputedStyle(el).fontStyle, "italic", "font-style"); assert_equals(getComputedStyle(el).wordSpacing, "40px", "word-spacing"); assert_equals(getComputedStyle(el).letterSpacing, "15px", "letter-spacing"); + assert_equals(getComputedStyle(el).boxShadow, "rgb(255, 0, 0) 5px 4px 3px 2px", "box-shadow"); el.style.letterSpacing = "-4px"; assert_equals(getComputedStyle(el).letterSpacing, "-4px", "letter-spacing, negative"); diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html new file mode 100644 index 00000000000..130849e79ba --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the fill color is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + fill: red; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html new file mode 100644 index 00000000000..9f52fd75479 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the height is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + height: 20px; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html new file mode 100644 index 00000000000..b4edffbf00b --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the margin-inline-end is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + margin-inline-end: 50px; + } +</style> +<permission id="geolocation" type="geolocation"/> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html new file mode 100644 index 00000000000..abda1adc1d8 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title> + A standard permission element of type location, without 50px height. +</title> + +<style> + ::permission-icon { + height: 50px; + } +</style> + +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html new file mode 100644 index 00000000000..45abc0ffd47 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html @@ -0,0 +1,12 @@ +<!doctype html> +<title>The icon of the element should be restricted to 50px due to the max-height property.</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="match" href="icon-css-property-max-height-reftest-ref.html"> +<style> + ::permission-icon { + height: 60px; + max-height: 50px; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html new file mode 100644 index 00000000000..d1fe8d0724c --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the min-height is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + min-height: 50px; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html new file mode 100644 index 00000000000..9d0ff75c3d8 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the stroke is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + stroke: red; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html new file mode 100644 index 00000000000..5ed8af57313 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html @@ -0,0 +1,12 @@ +<!doctype html> +<title> + A standard permission element of type location, with a red stroke with the + default stroke-width of 1px. +</title> + +<style> + ::permission-icon { + stroke: red; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html new file mode 100644 index 00000000000..a268e3c5fba --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>The icon of the element should change if the stroke-width is changed</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="icon-css-property-stroke-width-reftest-ref.html"> +<style> + ::permission-icon { + stroke-width: 2px; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html new file mode 100644 index 00000000000..bf58fdf93e5 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html @@ -0,0 +1,6 @@ +<!doctype html> +<title>The precise and non-precise location icons should be different.</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="mismatch" href="standard-location-permission-element-ref.html"> +<permission id="geolocation" type="geolocation" preciselocation></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html index 79055da1bad..a5b5bb61d2b 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html @@ -8,4 +8,4 @@ display: none; } </style> -<permission id="geolocation" type="geolocation"/> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html new file mode 100644 index 00000000000..5c0ea13fde7 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html @@ -0,0 +1,16 @@ +<!doctype html> +<title>The icon of the permission element should not change when any of the restricted CSS properties are changed.</title> +<!-- TODO: Update the link to the permission icon spec --> +<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> +<link rel="match" href="standard-location-permission-element-ref.html"> +<style> + ::permission-icon { + margin-inline-start: 100px; + float: inline-end; + padding: 50px; + opacity: 0.5; + stroke-opacity: 0.5; + fill-rule: evenodd; + } +</style> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html index d51b1c4d398..162a785852c 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html @@ -3,4 +3,4 @@ <!-- TODO: Update the link to the permission icon spec --> <link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md"> <link rel="mismatch" href="standard-location-permission-element-ref.html"> -<permission id="camera" type="camera"/> +<permission id="camera" type="camera"></permission> diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html index 15ffe751c51..d9f55b345f7 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html @@ -1,4 +1,4 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>A standard permission element of type location, without any non-default styling</title> -<permission id="geolocation" type="geolocation"/> +<permission id="geolocation" type="geolocation"></permission> diff --git a/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.html index 00ced8f7070..00ced8f7070 100644 --- a/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.tentative.html +++ b/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.html diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html new file mode 100644 index 00000000000..d976c0eb011 --- /dev/null +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel="help" href="https://open-ui.org/components/interest-invokers.explainer/" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/invoker-utils.js"></script> + +<button id=invoker interesttarget=target> + Button content + <span id=inner tabindex=0>Inner content</span> +</button> +<div id=target>Target</div> +<button id=otherbutton>Other button</button> +<style> + [interesttarget] { interest-target-delay: 0s; } +</style> + +<script> +const invoker = document.getElementById('invoker'); +const innerSpan = document.getElementById('inner'); +const target = document.getElementById('target'); +const otherbutton = document.getElementById('otherbutton'); + +promise_test(async function (t) { + t.add_cleanup(() => otherbutton.focus()); + const signal = t.get_signal(); + let interestCount = 0; + let loseInterestCount = 0; + target.addEventListener('interest',() => (++interestCount),{signal}); + target.addEventListener('loseinterest',() => (++loseInterestCount),{signal}); + await focusOn(invoker); + assert_true(invoker.matches(':has-interest'),'focusing invoker should show interest'); + assert_equals(interestCount,1,'One interest event'); + interestCount = 0; + assert_equals(loseInterestCount,0,'No loseinterest events'); + await focusOn(innerSpan); + assert_true(invoker.matches(':has-interest'),'focusing inner span should keep interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,0,'No loseinterest events'); + await focusOn(invoker); + assert_true(invoker.matches(':has-interest'),'focusing back to outer button should keep interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,0,'No loseinterest events'); + await focusOn(otherbutton); + assert_false(invoker.matches(':has-interest'),'focusing outside should lose interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,1,'Finally got loseinterest event'); +},'Moving focus within invoker works correctly'); + +promise_test(async function (t) { + t.add_cleanup(() => otherbutton.focus()); + const signal = t.get_signal(); + let interestCount = 0; + let loseInterestCount = 0; + target.addEventListener('interest',() => (++interestCount),{signal}); + target.addEventListener('loseinterest',() => (++loseInterestCount),{signal}); + await hoverOver(invoker); + assert_true(invoker.matches(':has-interest'),'hovering invoker should show interest'); + assert_equals(interestCount,1,'One interest event'); + interestCount = 0; + assert_equals(loseInterestCount,0,'No loseinterest events'); + await hoverOver(innerSpan); + assert_true(invoker.matches(':has-interest'),'hovering inner span should keep interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,0,'No loseinterest events'); + await hoverOver(invoker); + assert_true(invoker.matches(':has-interest'),'hovering back to outer button should keep interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,0,'No loseinterest events'); + await hoverOver(otherbutton); + assert_false(invoker.matches(':has-interest'),'hovering outside should lose interest'); + assert_equals(interestCount,0,'No extra interest events'); + assert_equals(loseInterestCount,1,'Finally got loseinterest event'); +},'Moving hover within invoker works correctly'); +</script> diff --git a/tests/wpt/tests/images/pattern.webm b/tests/wpt/tests/images/pattern.webm Binary files differindex 7cd3d311557..8b7ff388b88 100644 --- a/tests/wpt/tests/images/pattern.webm +++ b/tests/wpt/tests/images/pattern.webm diff --git a/tests/wpt/tests/interfaces/crash-reporting.idl b/tests/wpt/tests/interfaces/crash-reporting.idl index 6eaee138a82..ba21afcf397 100644 --- a/tests/wpt/tests/interfaces/crash-reporting.idl +++ b/tests/wpt/tests/interfaces/crash-reporting.idl @@ -8,6 +8,6 @@ interface CrashReportBody : ReportBody { [Default] object toJSON(); readonly attribute DOMString? reason; readonly attribute DOMString? stack; - readonly attribute DOMString? is_top_level; + readonly attribute boolean? is_top_level; readonly attribute DocumentVisibilityState? page_visibility; }; diff --git a/tests/wpt/tests/interfaces/cssom-view.idl b/tests/wpt/tests/interfaces/cssom-view.idl index 88abb078485..160c27ca050 100644 --- a/tests/wpt/tests/interfaces/cssom-view.idl +++ b/tests/wpt/tests/interfaces/cssom-view.idl @@ -141,6 +141,7 @@ partial interface Element { }; partial interface HTMLElement { + readonly attribute Element? scrollParent; readonly attribute Element? offsetParent; readonly attribute long offsetTop; readonly attribute long offsetLeft; diff --git a/tests/wpt/tests/interfaces/element-timing.idl b/tests/wpt/tests/interfaces/element-timing.idl index ef73ca6c0f6..4f42823704a 100644 --- a/tests/wpt/tests/interfaces/element-timing.idl +++ b/tests/wpt/tests/interfaces/element-timing.idl @@ -13,7 +13,7 @@ interface PerformanceElementTiming : PerformanceEntry { readonly attribute unsigned long naturalHeight; readonly attribute DOMString id; readonly attribute Element? element; - readonly attribute DOMString url; + readonly attribute USVString url; [Default] object toJSON(); }; diff --git a/tests/wpt/tests/interfaces/html.idl b/tests/wpt/tests/interfaces/html.idl index 9c84e6a67ef..3a7dce9693e 100644 --- a/tests/wpt/tests/interfaces/html.idl +++ b/tests/wpt/tests/interfaces/html.idl @@ -1235,18 +1235,19 @@ interface HTMLDialogElement : HTMLElement { interface HTMLScriptElement : HTMLElement { [HTMLConstructor] constructor(); - [CEReactions] attribute USVString src; [CEReactions] attribute DOMString type; + [CEReactions] attribute USVString src; [CEReactions] attribute boolean noModule; [CEReactions] attribute boolean async; [CEReactions] attribute boolean defer; + [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; [CEReactions] attribute DOMString? crossOrigin; - [CEReactions] attribute DOMString text; - [CEReactions] attribute DOMString integrity; [CEReactions] attribute DOMString referrerPolicy; - [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; + [CEReactions] attribute DOMString integrity; [CEReactions] attribute DOMString fetchPriority; + [CEReactions] attribute DOMString text; + static boolean supports(DOMString type); // also has obsolete members @@ -1694,6 +1695,7 @@ interface ToggleEvent : Event { constructor(DOMString type, optional ToggleEventInit eventInitDict = {}); readonly attribute DOMString oldState; readonly attribute DOMString newState; + readonly attribute Element source; }; dictionary ToggleEventInit : EventInit { diff --git a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl index 0ab5d0fc21e..02a35798204 100644 --- a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl +++ b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl @@ -30,9 +30,12 @@ dictionary PrivateAttributionImpressionOptions { unsigned long lifetimeDays = 30; }; +dictionary PrivateAttributionImpressionResult { +}; + [SecureContext, Exposed=Window] partial interface PrivateAttribution { - undefined saveImpression(PrivateAttributionImpressionOptions options); + Promise<PrivateAttributionImpressionResult> saveImpression(PrivateAttributionImpressionOptions options); }; dictionary PrivateAttributionConversionOptions { diff --git a/tests/wpt/tests/interfaces/resource-timing.idl b/tests/wpt/tests/interfaces/resource-timing.idl index 66f2841d744..499d27b6ee6 100644 --- a/tests/wpt/tests/interfaces/resource-timing.idl +++ b/tests/wpt/tests/interfaces/resource-timing.idl @@ -28,6 +28,7 @@ interface PerformanceResourceTiming : PerformanceEntry { readonly attribute unsigned short responseStatus; readonly attribute RenderBlockingStatusType renderBlockingStatus; readonly attribute DOMString contentType; + readonly attribute DOMString contentEncoding; [Default] object toJSON(); }; diff --git a/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl b/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl deleted file mode 100644 index 46ca2d6b9c4..00000000000 --- a/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl +++ /dev/null @@ -1,38 +0,0 @@ -[Exposed=Window] -partial interface CustomElementRegistry { - constructor(); - undefined initialize(Node root); -}; - -[Exposed=Window] -partial interface HTMLTemplateElement { - [CEReactions] attribute DOMString shadowRootCustomElementRegistry; -}; - -[Exposed=Window] -partial interface Document { - readonly attribute CustomElementRegistry? customElementRegistry; -}; - -[Exposed=Window] -partial interface Element { - readonly attribute CustomElementRegistry? customElementRegistry; -}; - -[Exposed=Window] -partial interface ShadowRoot { - readonly attribute CustomElementRegistry? customElementRegistry; -}; - -dictionary ImportNodeOptions { - CustomElementRegistry customElementRegistry; - boolean selfOnly = false; -}; - -partial dictionary ShadowRootInit { - CustomElementRegistry customElementRegistry; -}; - -partial dictionary ElementCreationOptions { - CustomElementRegistry customElementRegistry; -}; diff --git a/tests/wpt/tests/interfaces/screen-capture.idl b/tests/wpt/tests/interfaces/screen-capture.idl index db9282ce0a5..eb5685eee41 100644 --- a/tests/wpt/tests/interfaces/screen-capture.idl +++ b/tests/wpt/tests/interfaces/screen-capture.idl @@ -29,6 +29,12 @@ enum SystemAudioPreferenceEnum { "exclude" }; +enum WindowAudioPreferenceEnum { + "system", + "window", + "exclude" +}; + enum SurfaceSwitchingPreferenceEnum { "include", "exclude" @@ -45,6 +51,7 @@ dictionary DisplayMediaStreamOptions { CaptureController controller; SelfCapturePreferenceEnum selfBrowserSurface; SystemAudioPreferenceEnum systemAudio; + WindowAudioPreferenceEnum windowAudio; SurfaceSwitchingPreferenceEnum surfaceSwitching; MonitorTypeSurfacesEnum monitorTypeSurfaces; }; diff --git a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl index 5b67ca62678..0a2207684ec 100644 --- a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl +++ b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl @@ -11,6 +11,7 @@ dictionary SecurePaymentConfirmationRequest { unsigned long timeout; USVString payeeName; USVString payeeOrigin; + sequence<PaymentEntityLogo> paymentEntitiesLogos; AuthenticationExtensionsClientInputs extensions; sequence<USVString> locale; boolean showOptOut; @@ -40,6 +41,7 @@ dictionary AuthenticationExtensionsPaymentInputs { USVString topOrigin; USVString payeeName; USVString payeeOrigin; + sequence<PaymentEntityLogo> paymentEntitiesLogos; PaymentCurrencyAmount total; PaymentCredentialInstrument instrument; }; @@ -53,6 +55,7 @@ dictionary CollectedClientAdditionalPaymentData { required USVString topOrigin; USVString payeeName; USVString payeeOrigin; + sequence<PaymentEntityLogo> paymentEntitiesLogos; required PaymentCurrencyAmount total; required PaymentCredentialInstrument instrument; }; @@ -62,3 +65,8 @@ dictionary PaymentCredentialInstrument { required USVString icon; boolean iconMustBeShown = true; }; + +dictionary PaymentEntityLogo { + required USVString url; + required USVString label; +}; diff --git a/tests/wpt/tests/interfaces/speech-api.idl b/tests/wpt/tests/interfaces/speech-api.idl index 94a416f262b..9620e60dc50 100644 --- a/tests/wpt/tests/interfaces/speech-api.idl +++ b/tests/wpt/tests/interfaces/speech-api.idl @@ -12,7 +12,7 @@ interface SpeechRecognition : EventTarget { attribute boolean continuous; attribute boolean interimResults; attribute unsigned long maxAlternatives; - attribute SpeechRecognitionMode mode; + attribute boolean processLocally; attribute SpeechRecognitionPhraseList phrases; // methods to drive the speech interaction @@ -20,8 +20,8 @@ interface SpeechRecognition : EventTarget { undefined start(MediaStreamTrack audioTrack); undefined stop(); undefined abort(); - static Promise<AvailabilityStatus> availableOnDevice(DOMString lang); - static Promise<boolean> installOnDevice(DOMString lang); + static Promise<AvailabilityStatus> available(SpeechRecognitionOptions options); + static Promise<boolean> install(SpeechRecognitionOptions options); // event methods attribute EventHandler onaudiostart; @@ -37,6 +37,11 @@ interface SpeechRecognition : EventTarget { attribute EventHandler onend; }; +dictionary SpeechRecognitionOptions { + required sequence<DOMString> langs; + boolean processLocally = false; +}; + enum SpeechRecognitionErrorCode { "no-speech", "aborted", @@ -48,12 +53,6 @@ enum SpeechRecognitionErrorCode { "phrases-not-supported" }; -enum SpeechRecognitionMode { - "ondevice-preferred", // On-device speech recognition if available, otherwise use Cloud speech recognition as a fallback. - "ondevice-only", // On-device speech recognition only. Returns an error if on-device speech recognition is not available. - "cloud-only", // Cloud speech recognition only. -}; - enum AvailabilityStatus { "unavailable", "downloadable", diff --git a/tests/wpt/tests/interfaces/wai-aria.idl b/tests/wpt/tests/interfaces/wai-aria.idl index deebc5626e2..3364bc9a769 100644 --- a/tests/wpt/tests/interfaces/wai-aria.idl +++ b/tests/wpt/tests/interfaces/wai-aria.idl @@ -57,4 +57,4 @@ interface mixin ARIAMixin { [CEReactions] attribute DOMString? ariaValueNow; [CEReactions] attribute DOMString? ariaValueText; }; -Element includes ARIAMixin; + Element includes ARIAMixin; diff --git a/tests/wpt/tests/interfaces/web-animations-2.idl b/tests/wpt/tests/interfaces/web-animations-2.idl index c4a0c2532d9..f18cdd4f458 100644 --- a/tests/wpt/tests/interfaces/web-animations-2.idl +++ b/tests/wpt/tests/interfaces/web-animations-2.idl @@ -118,7 +118,7 @@ dictionary AnimationPlaybackEventInit : EventInit { interface AnimationTrigger { constructor(optional AnimationTriggerOptions options = {}); attribute AnimationTimeline timeline; - attribute AnimationTriggerType type; + attribute AnimationTriggerBehavior behavior; attribute any rangeStart; attribute any rangeEnd; attribute any exitRangeStart; @@ -127,11 +127,11 @@ interface AnimationTrigger { dictionary AnimationTriggerOptions { AnimationTimeline? timeline; - AnimationTriggerType? type = "once"; + AnimationTriggerBehavior? behavior = "once"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeStart = "auto"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeEnd = "auto"; }; -enum AnimationTriggerType { "once", "repeat", "alternate", "state" }; +enum AnimationTriggerBehavior { "once", "repeat", "alternate", "state" }; diff --git a/tests/wpt/tests/interfaces/webgpu.idl b/tests/wpt/tests/interfaces/webgpu.idl index 4fec46a2557..1fc896c6b16 100644 --- a/tests/wpt/tests/interfaces/webgpu.idl +++ b/tests/wpt/tests/interfaces/webgpu.idl @@ -127,6 +127,7 @@ enum GPUFeatureName { "clip-distances", "dual-source-blending", "subgroups", + "texture-formats-tier1", }; [Exposed=(Window, Worker), SecureContext] @@ -295,6 +296,8 @@ enum GPUTextureFormat { "r8sint", // 16-bit formats + "r16unorm", + "r16snorm", "r16uint", "r16sint", "r16float", @@ -307,6 +310,8 @@ enum GPUTextureFormat { "r32uint", "r32sint", "r32float", + "rg16unorm", + "rg16snorm", "rg16uint", "rg16sint", "rg16float", @@ -327,6 +332,8 @@ enum GPUTextureFormat { "rg32uint", "rg32sint", "rg32float", + "rgba16unorm", + "rgba16snorm", "rgba16uint", "rgba16sint", "rgba16float", @@ -556,7 +563,11 @@ dictionary GPUBindGroupDescriptor required sequence<GPUBindGroupEntry> entries; }; -typedef (GPUSampler or GPUTextureView or GPUBufferBinding or GPUExternalTexture) GPUBindingResource; +typedef (GPUSampler or + GPUTextureView or + GPUBuffer or + GPUBufferBinding or + GPUExternalTexture) GPUBindingResource; dictionary GPUBindGroupEntry { required GPUIndex32 binding; @@ -990,7 +1001,7 @@ interface mixin GPUBindingCommandsMixin { optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup, - Uint32Array dynamicOffsetsData, + [AllowShared] Uint32Array dynamicOffsetsData, GPUSize64 dynamicOffsetsDataStart, GPUSize32 dynamicOffsetsDataLength); }; diff --git a/tests/wpt/tests/interfaces/writing-assistance-apis.idl b/tests/wpt/tests/interfaces/writing-assistance-apis.idl index 916daee754e..82acfdb48e2 100644 --- a/tests/wpt/tests/interfaces/writing-assistance-apis.idl +++ b/tests/wpt/tests/interfaces/writing-assistance-apis.idl @@ -56,7 +56,7 @@ dictionary SummarizerSummarizeOptions { DOMString context; }; -enum SummarizerType { "tl;dr", "teaser", "key-points", "headline" }; +enum SummarizerType { "tldr", "teaser", "key-points", "headline" }; enum SummarizerFormat { "plain-text", "markdown" }; enum SummarizerLength { "short", "medium", "long" }; diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index 60b0f65a6f4..cf83e458213 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -173,6 +173,7 @@ SET TIMEOUT: encrypted-media/polyfill/clearkey-polyfill.js SET TIMEOUT: encrypted-media/scripts/playback-temporary-events.js SET TIMEOUT: fedcm/support/fedcm-iframe.html SET TIMEOUT: fedcm/support/fedcm/disconnect-iframe.html +SET TIMEOUT: fedcm/support/login_delay.html SET TIMEOUT: fetch/fetch-later/resources/fetch-later-helper.js SET TIMEOUT: fetch/metadata/resources/helper.sub.js SET TIMEOUT: fetch/metadata/resources/message-opener.html @@ -423,6 +424,7 @@ SET TIMEOUT: speculation-rules/prerender/resources/media-play.html SET TIMEOUT: html/browsers/browsing-the-web/back-forward-cache/timers.html SET TIMEOUT: dom/abort/crashtests/timeout-close.html SET TIMEOUT: storage-access-api/storage-access-beyond-cookies.locks.sub.https.window.js +SET TIMEOUT: pointerevents/crashtests/longpress-crash.html # setTimeout use in reftests SET TIMEOUT: acid/acid3/test.html @@ -818,6 +820,7 @@ TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/change-shipping-address-manual.h TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/change-shipping-option-manual.https.html TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/payment-request-event-manual.https.html TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/supports-shipping-contact-delegation-manual.https.html +TESTDRIVER-IN-UNSUPPORTED-TYPE: speech-api/SpeechRecognition-phrases-manual.https.html # Tests automatically imported from the WebAssembly/spec repository that should be removed after getting fixed upstream. SET TIMEOUT: wasm/core/js/harness/testharness.js diff --git a/tests/wpt/tests/paint-timing/idlharness.window.js b/tests/wpt/tests/paint-timing/idlharness.window.js index 049f0f18f1b..9843a604b80 100644 --- a/tests/wpt/tests/paint-timing/idlharness.window.js +++ b/tests/wpt/tests/paint-timing/idlharness.window.js @@ -7,7 +7,7 @@ idl_test( ['paint-timing'], - ['performance-timeline'], + ['performance-timeline', 'hr-time'], (idl_array, t) => { idl_array.add_objects({ PerformancePaintTiming: ['paintTiming'], diff --git a/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html b/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html new file mode 100644 index 00000000000..0ace661d5a9 --- /dev/null +++ b/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel="help" href="https://crbug.com/421119389"> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<html class=test-wait> + +<button>Button</button> + +<script> +async function longPress(element) { + const actions = new test_driver.Actions(); + await actions.addPointer("touchPointer", "touch") + .pointerMove(0, 0, {sourceName: "touchPointer",origin: element}) + .pointerDown({sourceName: "touchPointer",origin: element}) + .send(); + // This needs to be long enough to trigger long-press: + await new Promise(resolve => setTimeout(resolve,1000)); + await actions.pointerUp({sourceName: "touchPointer"}) + .send(); +} + +async function test() { + const el = document.querySelector('button'); + await longPress(el); + await longPress(el); + document.documentElement.classList.remove('test-wait'); +} +// This test should pass if nothing crashes. +test(); + +</script> diff --git a/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html b/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html index f25e61aade3..fd6de4d0899 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html +++ b/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html @@ -240,6 +240,7 @@ addEventListener( .pointerMove(0, 0, { origin: target }) .pointerDown() .pointerUp() + .pause(100) // XXX Required for preventing intermittent failure of Firefox .send(); test(() => { diff --git a/tests/wpt/tests/resources/test/conftest.py b/tests/wpt/tests/resources/test/conftest.py index 1301e7a9f77..0b67ca76761 100644 --- a/tests/wpt/tests/resources/test/conftest.py +++ b/tests/wpt/tests/resources/test/conftest.py @@ -55,6 +55,7 @@ def pytest_configure(config): config.driver = webdriver.Session("localhost", 4444, capabilities=capabilities) + config.driver.start() config.add_cleanup(config.driver.end) # Although the name of the `_create_unverified_context` method suggests diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html new file mode 100644 index 00000000000..71fedebbcea --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html @@ -0,0 +1,148 @@ + +<!DOCTYPE html> +<html> + <head> + <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/web-animations/testcommon.js"></script> + <script src="/dom/events/scrolling/scroll_support.js"></script> + <script src="support/support.js"></script> + </head> + <body> + <style> + .subject, .target { + height: 50px; + width: 50px; + background-color: red; + } + .scroller { + overflow-y: scroll; + height: 500px; + width: 500px; + border: solid 1px; + position: relative; + } + #space { + width: 50px; + height: 600px; + } + </style> + <div id="wrapper"> + <div id="scroller" class="scroller"> + <div id="space"></div> + <div id="subject" class="subject"></div> + <div id="space"></div> + </div> + <div id="target" class="target"></div> + </div> + <script> + // The trigger and exit ranges are the same for this test. + const TRIGGER_START_PX = 150; + const TRIGGER_END_PX = 200; + const scroller = document.getElementById("scroller"); + const target = document.getElementById("target"); + const COVER_START_OFFSET = 100; + const rangeBoundaries = getRangeBoundariesForTest( + COVER_START_OFFSET + TRIGGER_START_PX, + COVER_START_OFFSET + TRIGGER_END_PX, + COVER_START_OFFSET + TRIGGER_START_PX, + COVER_START_OFFSET + TRIGGER_END_PX, + scroller); + const ANIMATION_DURATION_MS = 1; + const view_timeline = new ViewTimeline({ subject: subject }); + function setupAnimation() { + const animation = new Animation( + new KeyframeEffect( + target, + [ + { transform: "scaleX(1)", backgroundColor: "pink", left: "0px" }, + { transform: "scaleX(5)", backgroundColor: "pink", left: "10px" } + ], + { duration: ANIMATION_DURATION_MS, fill: "both" } + )); + return animation; + } + function setupAnimationTrigger(use_default_trigger=false) { + const trigger = use_default_trigger ? new AnimationTrigger() + : new AnimationTrigger({ + type: "alternate", + timeline: view_timeline, + rangeStart: `${TRIGGER_START_PX}px`, + rangeEnd: `${TRIGGER_END_PX}px` + }); + return trigger; + } + + promise_test(async (test) => { + const animation = setupAnimation(); + const trigger = setupAnimationTrigger(/*use_default_trigger=*/true); + + // As the default trigger is always in the tripped state, the animation + // should be played right away. + trigger.addAnimation(animation); + await animation.finished; + + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + "animation finish reflected in currentTime"); + assert_equals(animation.playState, "finished", + "animation finish reflected in playeState"); + }, "Animation attached to tripped (default) trigger plays."); + + promise_test(async (test) => { + const animation = setupAnimation(); + const trigger = setupAnimationTrigger(); + + assert_equals(animation.playState, "idle", "animation is idle"); + assert_equals(animation.currentTime, null, "currentTime is null"); + + assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " + + "not within the trigger range"); + + trigger.addAnimation(animation); + + await waitForAnimationFrames(2); + + assert_equals(animation.playState, "paused", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, 0, "currentTime is 0"); + + // Entering the trigger range should play the animation. + rangeBoundaries.enterTriggerRange(); + await animation.finished; + + assert_equals(animation.playState, "finished", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + "currentTime is 0"); + }, "Animation attached to untripped trigger is paused at the beginning."); + + promise_test(async (test) => { + await waitForScrollReset(test, scroller); + + assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " + + "not within the trigger range"); + + const animation = setupAnimation(); + const trigger = setupAnimationTrigger(); + + assert_equals(animation.playState, "idle", "animation is idle"); + assert_equals(animation.currentTime, null, "currentTime is null"); + + rangeBoundaries.enterTriggerRange(); + await waitForAnimationFrames(2); + + assert_equals(animation.playState, "idle", "animation is still idle"); + assert_equals(animation.currentTime, null, "currentTime is still null"); + + trigger.addAnimation(animation); + await animation.finished; + + assert_equals(animation.playState, "finished", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + `currentTime is ${ANIMATION_DURATION_MS}`); + }, "Animation attached to tripped trigger is played immediately."); + </script> + </body> +</html> diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html new file mode 100644 index 00000000000..6914cb09b89 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html @@ -0,0 +1,132 @@ +<!DOCTYPE html> +<html> + <head> + <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/web-animations/testcommon.js"></script> + <script src="/dom/events/scrolling/scroll_support.js"></script> + <script src="support/support.js"></script> + </head> + <body> + <style> + .subject, .target { + height: 50px; + width: 50px; + background-color: red; + } + .scroller { + overflow-y: scroll; + height: 500px; + width: 500px; + border: solid 1px; + position: relative; + } + #space { + width: 50px; + height: 600px; + } + </style> + <div id="wrapper"> + <div id="scroller" class="scroller"> + <div id="space"></div> + <div id="subject" class="subject"></div> + <div id="space"></div> + </div> + <div id="target1" class="target"></div> + <div id="target2" class="target"></div> + </div> + <script> + // The trigger and exit ranges are the same for this test. + const TRIGGER_START_PX = 150; + const TRIGGER_END_PX = 200; + const scroller = document.getElementById("scroller"); + const subject = document.getElementById("subject"); + const target = document.getElementById("target"); + + const ANIMATION_DURATION_MS = 1; + + const COVER_START_OFFSET = 100; + const rangeBoundaries = getRangeBoundariesForTest( + COVER_START_OFFSET + TRIGGER_START_PX, + COVER_START_OFFSET + TRIGGER_END_PX, + COVER_START_OFFSET + TRIGGER_START_PX, + COVER_START_OFFSET + TRIGGER_END_PX, + scroller); + + function setupAnimation(target) { + const animation = new Animation( + new KeyframeEffect( + target, + [ + { transform: "scaleX(1)", backgroundColor: "pink", left: "0px" }, + { transform: "scaleX(5)", backgroundColor: "pink", left: "10px" } + ], + { duration: ANIMATION_DURATION_MS, fill: "both" } + )); + return animation; + } + + const view_timeline = new ViewTimeline({ subject: subject }); + function setupAnimationTrigger() { + const trigger = new AnimationTrigger({ + type: "alternate", + timeline: view_timeline, + rangeStart: `${TRIGGER_START_PX}px`, + rangeEnd: `${TRIGGER_END_PX}px` + }); + return trigger; + } + + promise_test(async (test) => { + const animation1 = setupAnimation(target1); + const animation2 = setupAnimation(target2); + const trigger = setupAnimationTrigger(); + + assert_equals(animation1.playState, "idle", "animation1 is idle"); + assert_equals(animation1.currentTime, null, + "animation1's currentTime is null"); + assert_equals(animation2.playState, "idle", "animation is idle"); + assert_equals(animation2.currentTime, null, + "animations2's currentTime is null"); + assert_equals(scroller.scrollTop, 0, + "scroller is not scrolled, i.e. not within the trigger range"); + + trigger.addAnimation(animation1); + + assert_equals(animation1.playState, "paused", + "animation1 is paused, awaiting trigger event"); + assert_times_equal(animation1.currentTime, 0, + "animation1's currentTime is 0"); + assert_equals(animation2.playState, "idle", "animation2 is idle"); + assert_equals(animation2.currentTime, null, + "animations2's currentTime is null"); + + trigger.addAnimation(animation2); + + assert_equals(animation1.playState, "paused", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation1.currentTime, 0, + "animation1's currentTime is 0"); + assert_equals(animation2.playState, "paused", + "animation2 is paused, awaiting trigger event"); + assert_times_equal(animation2.currentTime, 0, + "animation2's currentTime is 0"); + + rangeBoundaries.enterTriggerRange(); + + await animation1.finished; + await animation2.finished; + + assert_equals(animation1.playState, "finished", + "animation1 is paused, awaiting trigger event"); + assert_times_equal(animation1.currentTime, ANIMATION_DURATION_MS, + `animation1's currentTime is ${ANIMATION_DURATION_MS}`); + assert_equals(animation2.playState, "finished", + "animation2 is paused, awaiting trigger event"); + assert_times_equal(animation2.currentTime, ANIMATION_DURATION_MS, + `animation2's currentTime is ${ANIMATION_DURATION_MS}`); + }, "Single trigger controls multiple animations"); + </script> + </body> +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html new file mode 100644 index 00000000000..5fccdf27550 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html @@ -0,0 +1,175 @@ + +<!DOCTYPE html> +<html> + <head> + <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/web-animations/testcommon.js"></script> + <script src="/dom/events/scrolling/scroll_support.js"></script> + <script src="support/support.js"></script> + </head> + <body> + <style> + .subject, .target { + height: 50px; + width: 50px; + background-color: red; + } + .scroller { + overflow-y: scroll; + height: 500px; + width: 500px; + border: solid 1px; + position: relative; + } + #space { + width: 50px; + height: 600px; + } + </style> + <div id="wrapper"> + <div id="scroller" class="scroller"> + <div id="space"></div> + <div id="subject1" class="subject"></div> + <div id="space"></div> + <div id="subject2" class="subject"></div> + <div id="space"></div> + </div> + <div id="target" class="target"></div> + </div> + <script> + // The trigger and exit ranges are the same for this test. + const TRIGGER_START_PX = 150; + const TRIGGER_END_PX = 200; + const scroller = document.getElementById("scroller"); + const subject1 = document.getElementById("subject1"); + const subject2 = document.getElementById("subject2"); + const target = document.getElementById("target"); + + function getRangeBoundariesForSubject(subject, scroller) { + const cover_start_offset = subject.offsetTop - scroller.clientHeight; + return getRangeBoundariesForTest( + cover_start_offset + TRIGGER_START_PX, + cover_start_offset + TRIGGER_END_PX, + cover_start_offset + TRIGGER_START_PX, + cover_start_offset + TRIGGER_END_PX, + scroller); + } + const rangeBoundaries1 = getRangeBoundariesForSubject(subject1, + scroller); + const rangeBoundaries2 = getRangeBoundariesForSubject(subject2, + scroller); + + const ANIMATION_DURATION_MS = 1; + const view_timeline1 = new ViewTimeline({ subject: subject1 }); + const view_timeline2 = new ViewTimeline({ subject: subject2 }); + function setupAnimation() { + const animation = new Animation( + new KeyframeEffect( + target, + [ + { transform: "scaleX(1)", backgroundColor: "pink" }, + { transform: "scaleX(5)", backgroundColor: "pink" } + ], + { duration: ANIMATION_DURATION_MS, fill: "both" } + )); + return animation; + } + function setupAnimationTrigger(view_timeline) { + const trigger = new AnimationTrigger({ + type: "repeat", + timeline: view_timeline, + rangeStart: `${TRIGGER_START_PX}px`, + rangeEnd: `${TRIGGER_END_PX}px` + }); + return trigger; + } + + promise_test(async (test) => { + const animation = setupAnimation(); + const trigger1 = setupAnimationTrigger(view_timeline1); + const trigger2 = setupAnimationTrigger(view_timeline2); + + // Test preconditions. + assert_equals(animation.playState, "idle", "animation is idle"); + assert_equals(animation.currentTime, null, "currentTime is null"); + assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " + + "not within the trigger range"); + + trigger1.addAnimation(animation); + trigger2.addAnimation(animation); + + // Test preconditions. + assert_equals(animation.playState, "paused", "animation is idle"); + assert_equals(animation.currentTime, 0, "currentTime is null"); + + await rangeBoundaries1.enterTriggerRange(); + await animation.finished; + assert_equals(animation.playState, "finished", + "animation is played by trigger1"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + `currentTime is ${ANIMATION_DURATION_MS}`); + + await rangeBoundaries1.exitExitRangeBelow(); + await waitForNextFrame(); + assert_equals(animation.playState, "paused", + "animation should be reset by trigger1"); + assert_times_equal(animation.currentTime, 0, "currentTime is 0"); + + // animation should be played by trigger2. + rangeBoundaries2.enterTriggerRange(); + await animation.finished; + assert_equals(animation.playState, "finished", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + `currentTime is ${ANIMATION_DURATION_MS}`); + + // animation should be reversed by trigger2. + rangeBoundaries2.exitExitRangeBelow(); + await waitForNextFrame(); + assert_equals(animation.playState, "paused", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, 0, `currentTime is 0`); + }, "Triggers on same animation; no conflict."); + + promise_test(async (test) => { + await waitForScrollReset(test, scroller); + const animation = setupAnimation(); + const trigger1 = setupAnimationTrigger(view_timeline1); + const trigger2 = setupAnimationTrigger(view_timeline2); + + // Test preconditions. + assert_equals(animation.playState, "idle", "animation is idle"); + assert_equals(animation.currentTime, null, "currentTime is null"); + assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " + + "not within the trigger range"); + + trigger1.addAnimation(animation); + trigger2.addAnimation(animation); + + // Test preconditions. + assert_equals(animation.playState, "paused", "animation is paused"); + assert_equals(animation.currentTime, 0, "currentTime is null"); + + await rangeBoundaries1.enterTriggerRange(); + await animation.finished; + assert_equals(animation.playState, "finished", + "animation is played by trigger1"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + `currentTime is ${ANIMATION_DURATION_MS}`); + + // Entering trigger2's trigger range exits trigger1's exit range. + // So trigger1 wants to do a reset and trigger2 wants to play the + // animation. As trigger2 was the most recently created, it wins and the + // animation is played. + rangeBoundaries2.enterTriggerRange(); + await animation.finished; + assert_equals(animation.playState, "finished", + "animation is paused, awaiting trigger event"); + assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS, + `currentTime is ${ANIMATION_DURATION_MS}`); + }, "Triggers on same animation; conflict."); + </script> + </body> +</html> diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html deleted file mode 100644 index 7506fb05829..00000000000 --- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html +++ /dev/null @@ -1,169 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/web-animations/testcommon.js"></script> - <script src="/css/css-typed-om/resources/testhelper.js"></script> - </head> - <body> - <style> - @keyframes myAnim { - from { transform: scaleX(1); } - to { transform: scaleX(5); } - } - .subject, .target { - height: 50px; - width: 50px; - background-color: red; - } - .subject { - view-timeline: --viewtimeline; - } - .target { - animation: myAnim linear 0.5s forwards; - } - #scroll_target { - animation-trigger: repeat scroll(inline) 150px 200px 100px 250px; - } - #view_target { - animation-trigger: state view(x) contain 10% contain 90% cover 10% cover 90%; - } - #deferred_target { - animation-trigger: alternate --viewtimeline contain 5% contain 80% cover 5% cover 80%; - } - .scroller { - overflow-y: scroll; - height: 500px; - width: 500px; - border: solid 1px; - position: relative; - } - #wrapper { - timeline-scope: --viewtimeline; - } - #space { - width: 50px; - height: 600px; - } - </style> - <div id="wrapper"> - <div id="default_target" class="target"></div> - <div id="scroller" class="scroller"> - <div id="space"></div> - <div id="scroll_target" class="target"></div> - <div id="space"></div> - <div id="view_target" class="target"></div> - <div id="space"></div> - <div id="deferred_subject" class="subject"></div> - <div id="space"></div> - </div> - <div id="deferred_target" class="target"></div> - </div> - <script> - function assert_timeline_offset(actual, expected, errorMessage) { - assert_equals(actual.rangeName, expected.rangeName, errorMessage); - assert_style_value_equals(actual.offset, expected.offset); - } - - function testTrigger(trigger, expectation) { - assert_equals(trigger.type, expectation.type, "trigger type matches"); - assert_timeline_offset(trigger.rangeStart, expectation.rangeStart, - "trigger rangeStart matches"); - assert_timeline_offset(trigger.rangeEnd, expectation.rangeEnd, - "trigger rangeEnd matches"); - assert_timeline_offset(trigger.exitRangeStart, expectation.exitRangeStart, - "trigger exitRangeStart matches"); - assert_timeline_offset(trigger.exitRangeEnd, expectation.exitRangeEnd, - "trigger exitRangeEnd matches"); - if (expectation.timeline === document.timeline) { - assert_equals(trigger.timeline, document.timeline, "timeline matches"); - } else { - assert_equals(trigger.timeline.source, expectation.timelineSource, - "trigger timeline source matches"); - assert_equals(trigger.timeline.axis, expectation.timelineAxis, - "trigger timeline axis matches"); - assert_equals(trigger.timeline.subject, expectation.timelineSubject, - "trigger timeline subject matches"); - } - } - - promise_test(async() => { - await waitForNextFrame(); - const animation = default_target.getAnimations()[0]; - const trigger = animation.trigger; - - const expectation = { - type: "once", - rangeStart: "normal", - rangeEnd: "normal", - exitRangeStart: "normal", - exitRangeEnd: "normal", - timeline: document.timeline - }; - - testTrigger(trigger, expectation); - }, "Default AnimationTrigger for CSS Animation"); - - promise_test(async() => { - await waitForNextFrame(); - const animation = scroll_target.getAnimations()[0]; - const trigger = animation.trigger; - await waitForNextFrame(); - - const expectation = { - type: "repeat", - rangeStart: { rangeName: "none", offset: CSS.px(150) }, - rangeEnd: { rangeName: "none", offset: CSS.px(200) }, - exitRangeStart: { rangeName: "none", offset: CSS.px(100) }, - exitRangeEnd: { rangeName: "none", offset: CSS.px(250) }, - timelineSource: scroller, - timelineAxis: "inline" - }; - - testTrigger(trigger, expectation); - }, "AnimationTrigger for CSS Animation with scroll() timeline"); - - promise_test(async() => { - await waitForNextFrame(); - const animation = view_target.getAnimations()[0]; - const trigger = animation.trigger; - await waitForNextFrame(); - - const expectation = { - type: "state", - rangeStart: { rangeName: 'contain', offset: CSS.percent(10) }, - rangeEnd: { rangeName: 'contain', offset: CSS.percent(90) }, - exitRangeStart: { rangeName: 'cover', offset: CSS.percent(10) }, - exitRangeEnd: { rangeName: 'cover', offset: CSS.percent(90) }, - timelineSource: scroller, - timelineAxis: "x", - timelineSubject: view_target - }; - - testTrigger(trigger, expectation); - }, "AnimationTrigger for CSS Animation with view() timeline"); - - promise_test(async() => { - await waitForNextFrame(); - const animation = deferred_target.getAnimations()[0]; - const trigger = animation.trigger; - await waitForNextFrame(); - - const expectation = { - type: "alternate", - rangeStart: { rangeName: 'contain', offset: CSS.percent(5) }, - rangeEnd: { rangeName: 'contain', offset: CSS.percent(80) }, - exitRangeStart: { rangeName: 'cover', offset: CSS.percent(5) }, - exitRangeEnd: { rangeName: 'cover', offset: CSS.percent(80) }, - timelineSource: scroller, - timelineAxis: "block", - timelineSubject: deferred_subject - }; - - testTrigger(trigger, expectation); - }, "AnimationTrigger for CSS Animation with deferred timeline"); - </script> - </body> -</html>
\ No newline at end of file diff --git a/tests/wpt/tests/service-workers/service-worker/add-routes.https.html b/tests/wpt/tests/service-workers/service-worker/add-routes.https.html new file mode 100644 index 00000000000..fbab7cdedfa --- /dev/null +++ b/tests/wpt/tests/service-workers/service-worker/add-routes.https.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Service Worker: addRoutes() executes in installing</title> +<script src="/common/get-host-info.sub.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<script src="resources/static-router-helpers.sub.js"></script> +<script> + +promise_test(async t => { + const script = 'resources/add-routes.js'; + const scope = 'resources/blank.html'; + const reg = await service_worker_unregister_and_register(t, script, scope); + t.add_cleanup(() => reg.unregister()); + await wait_for_state(t, reg.installing, 'activated'); + const sw = reg.active; + const addRoutesError = await get_info_from_worker(sw); + + assert_equals(addRoutesError.install, null, + 'addRoutes() should execute successfully in installing'); + assert_true(addRoutesError.activate instanceof Error, + 'addRoutes() should throw outside of installing'); + +}, 'addRoutes() will not be executed outside of installing'); + +</script>
\ No newline at end of file diff --git a/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js b/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js new file mode 100644 index 00000000000..796acd19c12 --- /dev/null +++ b/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js @@ -0,0 +1,37 @@ +let globalAddRoutes; +let addRoutesError = {}; + +self.addEventListener('install', event => { + globalAddRoutes = event.addRoutes.bind(event); + globalAddRoutes([ + { + condition: { urlPattern: '/', runningStatus: 'not-running' }, + source: 'network', + }, + ]) + .then(() => { + addRoutesError.install = null; + }) + .catch(error => { + addRoutesError.install = error; + }); +}); + +self.addEventListener('activate', event => { + globalAddRoutes([ + { + condition: { urlPattern: '/', runningStatus: 'not-running' }, + source: 'network', + }, + ]) + .then(() => { + addRoutesError.activate = null; + }) + .catch(error => { + addRoutesError.activate = error; + }); +}); + +self.addEventListener('message', event => { + event.ports[0].postMessage(addRoutesError); +});
\ No newline at end of file diff --git a/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html b/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html index d485f908134..b513ff4f99b 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html +++ b/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html @@ -10,68 +10,240 @@ <script></script> </head> <body> - <div id="slow-soft-navigation">Click here!</div> - <div id="fast-soft-navigation">Click here!</div> + <div id="first_interaction">Click here!</div> + <div id="second_interaction">Click here!</div> <script> - // This soft navigation is slow - it will wait 1s before processing. - function slowSoftNavigation(t) { - t.step_timeout(() => { + const FIRST_URL = "first-url"; + const SECOND_URL = "second-url"; + + const button1 = document.getElementById("first_interaction"); + const button2 = document.getElementById("second_interaction"); + + async function updateUI() { const greeting = document.createElement("div"); greeting.textContent = "Hello, World."; document.body.appendChild(greeting); - history.pushState({}, "", "/slow-soft-navigation"); - }, 1000); } - // This soft navigation is fast - it will process immediately. - function fastSoftNavigation() { - const greeting = document.createElement("div"); - greeting.textContent = "Hello, World."; - document.body.appendChild(greeting); - history.pushState({}, "", "/fast-soft-navigation"); + function updateUrl(t, url) { + t.state.numPushStateCalls++; + const actual_url = t.state.urlPrefix + url; + history.pushState({}, "", actual_url); + } + + async function waitForSoftNavEntry(t, count = 1) { + return t.step_wait(() => t.state.softNavEntries.length >= count); } - promise_test(async (t) => { - document.getElementById("slow-soft-navigation").addEventListener("click", () => { - slowSoftNavigation(t); - }); - document - .getElementById("fast-soft-navigation") - .addEventListener("click", fastSoftNavigation); - - // Wait for both soft navigations to complete. - const promise = new Promise((resolve) => { - let entries = []; - new PerformanceObserver((list, observer) => { - entries.push(...list.getEntries()); - if (entries.length >= 2) { - observer.disconnect(); - resolve(entries); + async function create_test(urlPrefix, callback) { + return promise_test(async (t) => { + const currentUrl = location.pathname.replace(/.*\//, ""); + assert_equals(currentUrl, "racing-soft-navigations.html"); + + t.state = {}; + t.state.urlPrefix = urlPrefix; + t.state.numPushStateCalls = 0; + t.state.softNavEntries = []; + const observer = new PerformanceObserver((list, observer) => { + // If we get two soft-navs in one observer callback... + // that is a sign that we emitted multiple for a single effect + const entries = list.getEntries(); + assert_equals(entries.length, 1, "Expecting a single soft navigation"); + t.state.softNavEntries.push(entries[0]); + }); + observer.observe({ type: 'soft-navigation' }); + + // We have multiple test cases with side effects, so add some cleanup. + t.add_cleanup(async () => { + observer.disconnect(); + + // Go back to the original URL + for (let i = 0; i < t.state.numPushStateCalls; i++) { + history.back(); + await new Promise(resolve => { + addEventListener('popstate', resolve, {once: true}); + }); } - }).observe({ type: "soft-navigation" }); - }); + }); + + return callback(t); + }, "Racing multiple overlapping interactions and soft navs: " + urlPrefix); + } + + async function expectationsMultipleInteractionTest(t, expected = [FIRST_URL, SECOND_URL]) { + const count = expected.length; + await t.step_wait(() => t.state.softNavEntries.length >= count, `Wait for ${count} soft navigation entries`); + + // Although we await at least `count` (above), we also assert exactly `count` (here) + assert_equals(t.state.softNavEntries.length, count, `Expected ${count} soft navigation entries`); + + for (let i = 0; i < count; i++) { + const entry = t.state.softNavEntries[i]; + const actual_expected_url = t.state.urlPrefix + expected[i]; + assert_equals( + entry.name.replace(/.*\//, ""), + actual_expected_url, + "Expect to observe the first URL change.", + ); + } + } + + // The following tests will trigger two interaction back to back, and each + // interaction will do a sequence of the following: + // - Triggers event listener, which schedules async work + // - updates URL + // - updates UI + // - yield, or timeout of some kind + // - Emit a soft nav entry + // + // Because there are two interactions per test, we manipulate the + // sequence of operations in various ways. + + // Baseline, non overlapping interactions. + create_test("click1,url1,ui1,sn1,yield,click2,url2,ui2,sn2", async (t) => { + button1.addEventListener('click', async () => { + updateUrl(t, FIRST_URL); + updateUI(); + }, { once: true }); + + button2.addEventListener('click', async () => { + updateUrl(t, SECOND_URL); + updateUI(); + }, { once: true }); + + if (test_driver) { + test_driver.click(button1); + } + + await waitForSoftNavEntry(t); + + if(test_driver) { + test_driver.click(button2); + } + + await expectationsMultipleInteractionTest(t); + }); + + // Both interactions start and yield (simulate network), then finish all + // required effects and emit soft nav without overlap. First interaction + // wins the "network" race. + create_test("click1,yield,click2,yield,url1,ui1,sn1,yield,url2,ui2,sn2", async (t) => { + button1.addEventListener('click', async () => { + t.step_timeout(() => { + updateUrl(t, FIRST_URL); + updateUI(); + }, 0); + }, { once: true }); + + button2.addEventListener('click', async () => { + await waitForSoftNavEntry(t); + + updateUrl(t, SECOND_URL); + updateUI(); + }, { once: true }); + + // Start both soft navigations in rapid succession. + if (test_driver) { + test_driver.click(button1); + test_driver.click(button2); + } + + await expectationsMultipleInteractionTest(t); + + }); + + // Both interactions start and yield (simulate network), then finish all + // required effects and emit soft nav without overlap. Second interaction + // wins the "network" race. + create_test("click1,yield,click2,yield,url2,ui2,sn2,yield,url1,ui1,sn1", async (t) => { + button1.addEventListener('click', async () => { + await waitForSoftNavEntry(t); + // In this test, the first interaction sets the second URL + updateUrl(t, FIRST_URL); + updateUI(); + }, { once: true }); + + button2.addEventListener('click', async () => { + t.step_timeout(() => { + updateUrl(t, SECOND_URL); + updateUI(); + }, 0); + }, { once: true }); + // Start both soft navigations in rapid succession. if (test_driver) { - test_driver.click(document.getElementById("slow-soft-navigation")); - test_driver.click(document.getElementById("fast-soft-navigation")); + test_driver.click(button1); + test_driver.click(button2); } - // Notice that both navigations are detected, with the fast one - // arriving first. - const entries = await promise; - assert_equals(entries.length, 2, "Expected two soft navigation entries"); - assert_equals( - entries[0].name.replace(/.*\//, ""), - "fast-soft-navigation", - "First entry should be the fast soft navigation.", - ); - assert_equals( - entries[1].name.replace(/.*\//, ""), - "slow-soft-navigation", - "Second entry should be the slow soft navigation.", - ); - }, "Two soft navigations that race each other should be detected correctly."); + await expectationsMultipleInteractionTest(t, [SECOND_URL, FIRST_URL]); + }); + + // Both interactions start, immediately update URL and yield (simulate + // navigate interception), then finish all required effects later. + // Only the second URL update emits a soft nav entry. + create_test("click1,url1,yield,click2,url2,ui1,yield,ui2,sn2", async (t) => { + let first_interaction_did_finish_paint = false; + let second_interaction_did_run = false; + + button1.addEventListener('click', async () => { + updateUrl(t, FIRST_URL); + + await t.step_wait(() => second_interaction_did_run); + + updateUI(); + + await new Promise(r => requestAnimationFrame(r)); + await new Promise(r => t.step_timeout(r, 0)); + first_interaction_did_finish_paint = true; + }, { once: true }); + + button2.addEventListener('click', async () => { + updateUrl(t, SECOND_URL); + second_interaction_did_run = true; + + await t.step_wait(() => first_interaction_did_finish_paint); + + updateUI(); + }, { once: true }); + + // Start both soft navigations in rapid succession. + if (test_driver) { + test_driver.click(button1); + test_driver.click(button2); + } + + await expectationsMultipleInteractionTest(t,[SECOND_URL]); + }); + + // Both interactions start, immediately update URL and yield (simulate + // navigate interception), then finish all required effects later. + // Only the second URL update emits a soft nav entry. + create_test("click1,url1,yield,click2,url2,yield,ui2,sn2,yield,ui1", async (t) => { + button1.addEventListener('click', async () => { + updateUrl(t, FIRST_URL); + await waitForSoftNavEntry(t); + updateUI(); + }, { once: true }); + + button2.addEventListener('click', async () => { + updateUrl(t, SECOND_URL); + + t.step_timeout(async () => { + updateUI(); + }, 100); + }, { once: true }); + + // Start both soft navigations in rapid succession. + if (test_driver) { + test_driver.click(button1); + test_driver.click(button2); + } + + await expectationsMultipleInteractionTest(t,[SECOND_URL]); + }); + </script> </body> </html> diff --git a/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js new file mode 100644 index 00000000000..c599985a2a2 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js @@ -0,0 +1,47 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +// META: script=../../resources/soft-navigation-test-helper.js + +// This test is intended to verify that when a distant leaf of a +// deeply nested div element is attached to the DOM, its painting can +// trigger a soft navigation. +// +// To show this, we create a button that, when clicked, creates a deeply +// nested div element and attaches it to the DOM - only the leaf, a text +// node saying "Hello, World.", 10 levels below the attachment point actually +// gets painted. + +function clickHandler() { + let div = document.createElement('div'); + div.textContent = 'Hello, World.'; // The leaf node that gets painted. + for (let i = 0; i < 10; i++) { + const tmp = document.createElement('div'); + tmp.appendChild(div); + div = tmp; + } + document.body.appendChild(div); + history.pushState({}, '', '/greeting'); +} + +const button = document.createElement('div'); +button.textContent = 'Click here!'; +button.onclick = clickHandler; +document.body.appendChild(button); + +promise_test(async (t) => { + if (test_driver) { + test_driver.click(button); + } + const helper = new SoftNavigationTestHelper(t); + const entries = await helper.getBufferedPerformanceEntriesWithTimeout( + /*type=*/ 'soft-navigation', + /*includeSoftNavigationObservations=*/ false, + /*minNumEntries=*/ 1, + ); + assert_equals(entries.length, 1, 'Expected exactly one soft navigation.'); + assert_equals( + entries[0].name.replace(/.*\//, ''), + 'greeting', + 'URL ends with \'greeting\'.', + ); +}, 'DOM: Distant leaf satisfies Soft Navigation paint criterion.'); diff --git a/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js new file mode 100644 index 00000000000..19e8a397c34 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js @@ -0,0 +1,47 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +// META: script=../../resources/soft-navigation-test-helper.js + +// This test shows a relatively simple case where a div with an image inside +// is inserted before another element, and the image is painted, and yet +// we don't detect a soft navigation. +// https://g-issues.chromium.org/issues/419822831#comment5 + +function clickHandler() { + const div = document.createElement("div"); + const img = new Image(); + img.src = "/images/lcp-256x256.png" + // Uncomment the following line => test passes (image should work too though). + // div.textContent = "Hello, World."; + div.appendChild(img); + document.body.insertBefore(div, document.getElementById("insert-before")); + history.pushState({}, '', '/test'); +} + +const div = document.createElement('div'); +div.id = 'insert-before'; +document.body.appendChild(div); + +const button = document.createElement('div'); +button.textContent = 'Click here!'; +button.onclick = clickHandler; +document.body.appendChild(button); + +promise_test(async (t) => { + if (test_driver) { + test_driver.click(button); + } + const helper = new SoftNavigationTestHelper(t); + const entries = await helper.getBufferedPerformanceEntriesWithTimeout( + /*type=*/ 'soft-navigation', + /*includeSoftNavigationObservations=*/ false, + /*minNumEntries=*/ 1, + /*timeout=*/ 3000, + ); + assert_equals(entries.length, 1, 'Expected exactly one soft navigation.'); + assert_equals( + entries[0].name.replace(/.*\//, ''), + 'test', + 'URL ends with \'test\'.', + ); +}, 'DOM: Insert image div satisfies Soft Navigation paint criterion.'); diff --git a/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js b/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js new file mode 100644 index 00000000000..3df2192f560 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js @@ -0,0 +1,48 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js + +// This test shows that preventDefault() on the navigate event can +// prevent a soft navigation, because it ensures that neither the a.href +// (foobar.html in our example) is visited, nor the handler specified in the +// intercept on the navigate event is called. + +const link = document.createElement('a'); +link.href = 'foobar.html'; +link.textContent = 'Click me!'; +document.body.appendChild(link); + +promise_test(async (t) => { + let navigateProcessed = false; + + navigation.addEventListener('navigate', (e) => { + e.intercept({ + async handler() { + assert_unreached('preventDefault() should prevent the navigation'); + }, + }); + e.preventDefault(); + navigateProcessed = true; + }); + + if (test_driver) { + test_driver.click(link); + } + + await t.step_wait( + () => navigateProcessed, '\'navigate\' event not processed'); + + const observer = new PerformanceObserver(() => { + assert_unreached('Soft navigation should not be triggered'); + }); + observer.observe({type: 'soft-navigation', buffered: true}); + + await new Promise((resolve) => { + t.step_timeout(resolve, 3000); + }).then(() => { + observer.disconnect(); + }); + if (document.softNavigations) { + assert_equals(document.softNavigations, 0, 'Soft Navigation not detected'); + } + assert_false(location.href.includes('foobar.html'), 'foobar.html not visited'); +}, 'Navigation API: Aborted navigate event is not a soft navigation'); diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html deleted file mode 100644 index b7b2a24c942..00000000000 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta charset="utf-8"> -<title>Don't detect a navigate event which got aborted as a soft navigation. -</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-vendor.js"></script> -<script src="resources/soft-navigation-helper.js"></script> -</head> -<body> - <main id=main> - <a href="foobar.html" id=link>Click me!</a> - </main> - <script> - const link = document.getElementById("link"); - testSoftNavigationNotDetected({ - testName: "Aborted navigate event is not a soft navigation", - eventHandler: e => { - e.intercept({handler: async () => { - await addImageToMain(); - main.appendChild(img); - }}); - e.preventDefault(); - timestamps[counter]["eventEnd"] = performance.now(); - }, - eventTarget: navigation, - eventName: "navigate", - link: link}); - </script> -</body> -</html> - diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html index fd87f5f03e7..a460b922eb7 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html @@ -1,64 +1,77 @@ -<!DOCTYPE HTML> +<!DOCTYPE html> <html> -<head> -<meta charset="utf-8"> -<title>Soft navigation with multiple popstate calls.</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-vendor.js"></script> -<script src="resources/soft-navigation-helper.js"></script> -</head> -<body> - <main id=main> - <div> - <a id=link>Click me!</a> - </div> - </main> - <script> - // Push state 4 times, as history.back() calls will trigger popstate - // events. - history.pushState({}, "", "foobar.html"); - history.pushState({}, "", "another_one.html"); - history.pushState({}, "", "and_another.html"); - history.pushState({}, "", "and_yet_another.html"); + <head> + <meta charset="utf-8" /> + <title>Soft navigation with multiple popstate calls.</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="resources/soft-navigation-helper.js"></script> + </head> + <body> + <main id="main"> + <div> + <a id="link">Click me!</a> + </div> + </main> + <script> + // Push state 4 times, as history.back() calls will trigger popstate + // events. + history.pushState({}, "", "three.html"); + history.pushState({}, "", "two.html"); + history.pushState({}, "", "one.html"); + history.pushState({}, "", "zero.html"); - // This function runs at the start of the popstate event. - const eventPrepWork = t => { - // If this is an event due to the first click, go back() twice more. - if (!t.popped) { - step_timeout(()=>history.back(), 0); - step_timeout(()=>history.back(), 0); - t.popped = 0; - } - ++t.popped; - // return true for the second time the event fires, which is the first - // back() triggered by the popstate event. The means that the first one - // of those back() navigations would trigger a soft navigation, but not - // the last one. - return t.popped == 2; - } - const link = document.getElementById("link"); - link.addEventListener("click", () => { - history.back(); - timestamps[counter]["eventEnd"] = performance.now(); - }); - testSoftNavigation({ - addContent: () => { - // Add the content to the main element - const main = document.getElementById("main"); - main.removeChild(document.getElementsByTagName("div")[0]); - const div = document.createElement("div"); - const text = document.createTextNode("Lorem ipsum"); - div.appendChild(text); - div.style="font-size: 3em"; - main.appendChild(div); - }, - link: link, - eventPrepWork: eventPrepWork, - testName: "A soft navigation that started from a back() call inside a " - + "popstate event is recognized by SoftNavigationHeuristics", - eventType: "popstate"}); - </script> -</body> + // When the link is clicked by the driver, this click handler will call + // history.back(), which will (of course) also trigger a popstate event. + // The history.back() destination is one.html, the first URL visited by + // this interaction. + const link = document.getElementById("link"); + link.addEventListener("click", async () => { + history.back(); + timestamps[counter]["eventEnd"] = performance.now(); + await waitForUrlToEndWith("one.html"); + }); + + let shouldPrepWorkFail = false; + testSoftNavigation({ + link: link, + // The popstate event handler triggers two additional history.back() + // events, which don't cascade further (see shouldPrepWorkFail). + // After the pushState method runs, the contents get added, and the + // soft navigation is detected. + eventType: "popstate", + eventPrepWork: () => { + return !shouldPrepWorkFail; + }, + pushState: async () => { + shouldPrepWorkFail = true; + history.back(); + await waitForUrlToEndWith("two.html"); // Second URL visited by interaction. + history.back(); + await waitForUrlToEndWith("three.html"); // Third and final URL visited by interaction. + }, + // This is the URL we expect to see in the 'name' field of the soft navigation entry. + pushUrl: "one.html", + addContent: async () => { + assert_true( + location.href.endsWith("three.html"), + "addContent should see the effect of all history.back() calls", + ); + // Add the content to the main element + const main = document.getElementById("main"); + main.removeChild(document.getElementsByTagName("div")[0]); + const div = document.createElement("div"); + const text = document.createTextNode("Lorem ipsum"); + div.appendChild(text); + div.style = "font-size: 3em"; + main.appendChild(div); + }, + testName: + "A soft navigation that started from a back() call inside a " + + "popstate event is recognized by SoftNavigationHeuristics", + }); + </script> + </body> </html> diff --git a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js index 5860738225b..4bc16b44e00 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js +++ b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js @@ -24,7 +24,7 @@ const withTimeoutMessage = // Helper method for use with history.back(), when we want to be // sure that its asynchronous effect has completed. const waitForUrlToEndWith = async (url) => { - return new Promise((resolve) => { + return new Promise((resolve, reject) => { window.addEventListener('popstate', () => { if (location.href.endsWith(url)) { resolve(); @@ -44,7 +44,7 @@ const testSoftNavigation = options => { const clicks = readValue(options.clicks, 1); const extraValidations = readValue(options.extraValidations, () => {}); const testName = options.testName; - const pushUrl = readValue(options.pushUrl, true); + const pushUrl = readValue(options.pushUrl, URL); const eventType = readValue(options.eventType, 'click'); const interactionFunc = options.interactionFunc; const eventPrepWork = options.eventPrepWork; @@ -67,7 +67,7 @@ const testSoftNavigation = options => { interact(link, interactionFunc); const navigation_id = await withTimeoutMessage( - t, soft_nav_promise, 'Timed out waiting for soft navigation'); + t, soft_nav_promise, 'Timed out waiting for soft navigation', 3000); if (!first_navigation_id) { first_navigation_id = navigation_id; } @@ -113,28 +113,6 @@ const testNavigationApi = (testName, navigateEventHandler, link) => { }, testName); }; -const testSoftNavigationNotDetected = options => { - promise_test(async t => { - const preClickLcp = await getLcpEntries(); - options.eventTarget.addEventListener( - options.eventName, options.eventHandler); - interact(options.link); - await new Promise((resolve, reject) => { - new PerformanceObserver(() => { - reject('Soft navigation should not be triggered'); - }).observe({type: 'soft-navigation', buffered: true}); - t.step_timeout(resolve, 1000); - }); - if (document.softNavigations) { - assert_equals( - document.softNavigations, 0, 'Soft Navigation not detected'); - } - const postClickLcp = await getLcpEntries(); - assert_equals( - preClickLcp.length, postClickLcp.length, 'No LCP entries accumulated'); - }, options.testName); -}; - const runEntryValidations = async ( preClickLcp, first_navigation_id, entries_expected_number = 2, validate = null) => { @@ -233,7 +211,7 @@ const validateSoftNavigationEntry = for (let i = 0; i < entries.length; ++i) { const entry = entries[i]; assert_true( - entry.name.includes(pushUrl ? URL : document.location.href), + entry.name.includes(pushUrl ? pushUrl : document.location.href), 'The soft navigation name is properly set'); const entryTimestamp = entry.startTime; assert_less_than_equal( diff --git a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js new file mode 100644 index 00000000000..50e22df0f3e --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js @@ -0,0 +1,7 @@ +// PerformanceObserver.supportedEntryTypes is a good way to detect whether +// soft navigations are supported. See also: +// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/supportedEntryTypes_static + +test(() => { + assert_in_array('soft-navigation', PerformanceObserver.supportedEntryTypes); +}, 'Soft navigations are a supported entry type for PerformanceObserver'); diff --git a/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html deleted file mode 100644 index 4ab408e10b1..00000000000 --- a/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<meta charset="utf-8"> -<title>Soft navigations are a supported entry type</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - promise_test(async () => { - assert_true(PerformanceObserver.supportedEntryTypes.includes( - "soft-navigation")); - }, "Soft navigations are a supported entry type"); -</script> - - diff --git a/tests/wpt/tests/speculation-rules/invalid-rules.https.html b/tests/wpt/tests/speculation-rules/invalid-rules.https.html new file mode 100644 index 00000000000..d887c6cafc8 --- /dev/null +++ b/tests/wpt/tests/speculation-rules/invalid-rules.https.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script> +<script src="resources/utils.js"></script> + +<meta name="variant" content="?prefetch"> +<meta name="variant" content="?prerender"> + +<script> +setup(() => assertSpeculationRulesIsSupported()); + +const preloadingType = location.search.substring(1); + +promise_test(async t => { + const rcHelper = new PreloadingRemoteContextHelper(); + const referrerRC = await rcHelper.addWindow(); + + const destinationRC = await referrerRC.addPreload(preloadingType, { + extrasInSpeculationRule: { invalid_key: "value" } + }); + + await referrerRC.navigateTo(destinationRC.url); + + const headers = await destinationRC.getRequestHeaders(); + assert_false(headers.has("Sec-Purpose")); +}, `an unrecognized key in a ${preloadingType} rule should prevent it from being preloaded`); +</script> diff --git a/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html b/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.https.html index 48f6264e852..79078d30ab6 100644 --- a/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html +++ b/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.https.html @@ -1,9 +1,4 @@ <!DOCTYPE html> -<!-- -This file is marked as "tentative" until: -* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and - https://github.com/WICG/nav-speculation/issues/357 is added to the specification. ---> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/common/dispatcher/dispatcher.js"></script> diff --git a/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html b/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html deleted file mode 100644 index 0fdfacde643..00000000000 --- a/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html +++ /dev/null @@ -1,19 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/common/dispatcher/dispatcher.js"></script> -<script src="/common/utils.js"></script> -<script src="../resources/utils.js"></script> -<script src="resources/utils.sub.js"></script> -<script> - setup(() => assertSpeculationRulesIsSupported()); - - promise_test(async t => { - let agent = await spawnWindow(t); - let nextUrl = agent.getExecutorURL({ page: 2 }); - await agent.forceSinglePrefetch(nextUrl, { invalid_key: "value" }); - await agent.navigate(nextUrl); - - assert_not_prefetched(await agent.getRequestHeaders()); - }, "an unrecognized key in a prefetch rule should prevent it from being fetched"); -</script> diff --git a/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html b/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html index 7aee20c3465..a26af011614 100644 --- a/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html @@ -16,9 +16,9 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { const ACTIVATION_DELAY = 10; - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const iframeRC = await prerenderedRC.addIframe(); assert_equals( @@ -36,7 +36,7 @@ promise_test(async t => { // Wait ACTIVATION_DELAY ms before activation. await new Promise(resolve => t.step_timeout(resolve, ACTIVATION_DELAY)); - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); assert_greater_than_equal( await getActivationStart(prerenderedRC), diff --git a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.https.html index db52e758750..c18df9e0cd9 100644 --- a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.https.html @@ -1,32 +1,26 @@ <!DOCTYPE html> -<!-- -This file is marked as "tentative" until: -* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and - https://github.com/WICG/nav-speculation/issues/357 is added to the specification. ---> <title>clear-site-data-cache cancels prerenders</title> <meta name="timeout" content="long"> -<body> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/speculation-rules/resources/utils.js"></script> -<script src="/speculation-rules/prerender/resources/utils.js"></script> <script src="/common/utils.js"></script> <script src="/common/get-host-info.sub.js"></script> <script src="/common/dispatcher/dispatcher.js"></script> <script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script> +<script src="../resources/utils.js"></script> +<script src="resources/utils.js"></script> <script> setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow({ origin: 'HTTPS_ORIGIN' }, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC, { + const prerenderedRC = await referrerRC.addPrerender({ origin: 'HTTPS_REMOTE_ORIGIN', headers: [ ['Supports-Loading-Mode', 'credentialed-prerender'] @@ -52,8 +46,6 @@ promise_test(async t => { // the initiator origin, the existing prerender is not expected to be // canceled. // And the prerender is expected to be activated. - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); }); </script> -</body> -</html> diff --git a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.https.html index 23d862c5130..a2668fc3bca 100644 --- a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.https.html @@ -1,33 +1,26 @@ <!DOCTYPE html> -<!-- -This file is marked as "tentative" until: -* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and - https://github.com/WICG/nav-speculation/issues/357 is added to the specification. ---> <title>clear-site-data-cache cancels prerenders</title> <meta name="timeout" content="long"> -<body> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/speculation-rules/resources/utils.js"></script> -<script src="/speculation-rules/prerender/resources/utils.js"></script> <script src="/common/utils.js"></script> <script src="/common/get-host-info.sub.js"></script> <script src="/common/dispatcher/dispatcher.js"></script> <script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script> +<script src="../resources/utils.js"></script> +<script src="resources/utils.js"></script> <script> setup(() => assertSpeculationRulesIsSupported()); -// Test that Clear-Site-Data header value "prerenderCache" clears prerender cache promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow({ origin: 'HTTPS_ORIGIN' }, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC, { + const prerenderedRC = await referrerRC.addPrerender({ origin: 'HTTPS_ORIGIN' }); @@ -48,20 +41,18 @@ promise_test(async t => { // Because Clear-Site-Data response header is sent, the existing prerender // is expected to be canceled. // And the navigation is expected to create another page instead of activation. - referrerRC.navigateTo(prerenderedRC.url); - assert_equals(await getActivationStart(prerenderedRC), 0); + await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC); }, "clear-site-data prerenderCache headers should prevent it from being activated"); -// Test that Clear-Site-Data header value "cache" clears prerender cache promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow({ origin: 'HTTPS_ORIGIN' }, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC, { + const prerenderedRC = await referrerRC.addPrerender({ origin: 'HTTPS_ORIGIN' }); @@ -83,9 +74,6 @@ promise_test(async t => { // Because Clear-Site-Data response header is sent, the existing prerender // is expected to be canceled. // And the navigation is expected to create another page instead of activation. - referrerRC.navigateTo(prerenderedRC.url); - assert_equals(await getActivationStart(prerenderedRC), 0); + await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC); }, "clear-site-data cache headers should prevent it from being activated"); </script> -</body> -</html> diff --git a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html index 697382a6dc8..a02a2860990 100644 --- a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html @@ -15,13 +15,12 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow({origin: 'HTTPS_ORIGIN'}, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC, {origin: 'HTTPS_REMOTE_ORIGIN'}); + const prerenderedRC = await referrerRC.addPrerender({origin: 'HTTPS_REMOTE_ORIGIN'}); // Because the prerender doesn't use opt-in header, it is expected to be canceled. // And the navigation is expected to create another page instead of activation. - referrerRC.navigateTo(prerenderedRC.url); - assert_equals(await getActivationStart(prerenderedRC), 0); + await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC); }); </script> diff --git a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html index 91626bafce6..c309abd2c6d 100644 --- a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html @@ -15,10 +15,10 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow({origin: 'HTTPS_ORIGIN'}, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC, {origin: 'HTTPS_REMOTE_ORIGIN', headers: [['Supports-Loading-Mode', 'credentialed-prerender']] }); + const prerenderedRC = await referrerRC.addPrerender({origin: 'HTTPS_REMOTE_ORIGIN', headers: [['Supports-Loading-Mode', 'credentialed-prerender']] }); - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); }); </script> diff --git a/tests/wpt/tests/speculation-rules/prerender/headers.https.html b/tests/wpt/tests/speculation-rules/prerender/headers.https.html index 2ef6b5ce072..e05f72434e4 100644 --- a/tests/wpt/tests/speculation-rules/prerender/headers.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/headers.https.html @@ -15,9 +15,9 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async () => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const prerenderedHeaders = await prerenderedRC.getRequestHeaders(); assertHeaders(prerenderedHeaders, true, true, 'prerendered page'); @@ -53,14 +53,14 @@ promise_test(async () => { }, 'Headers before activation, including prerendered page navigation'); promise_test(async () => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); // Add the iframe now, but only check its headers after activation. const crossOriginIframeBeforeActivationRC = await prerenderedRC.addIframe({ origin: 'HTTPS_REMOTE_ORIGIN' }); - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); const crossOriginIframeBeforeActivationHeaders = await crossOriginIframeBeforeActivationRC.getRequestHeaders(); assertHeaders(crossOriginIframeBeforeActivationHeaders, true, false, 'cross-origin iframe before activation'); diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html index e3ecf1b72b6..3b4fb4195ca 100644 --- a/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html @@ -13,12 +13,12 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); assert_equals(await referrerRC.executeScript(() => navigation.entries().length), 1); let referrerRCCurrentId = await referrerRC.executeScript(() => navigation.currentEntry.id); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); let activationStateBeforeActivation = await prerenderedRC.executeScript(() => { return { entries: navigation.entries().map(e => ({ id: e.id, })), @@ -35,7 +35,7 @@ promise_test(async t => { // Save the current entry before activation. await prerenderedRC.executeScript(() => window.currentEntryBeforeActivation = navigation.currentEntry); - await activatePrerenderRC(referrerRC, prerenderedRC, url => { + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => { location.replace(url); }); diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html index e8e0f874597..060091e171e 100644 --- a/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html @@ -13,7 +13,7 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC1 = await rcHelper.addWindow(undefined, { features: 'noopener' }); const referrerRC2 = await referrerRC1.navigateToNew(); @@ -22,7 +22,7 @@ promise_test(async t => { let referrerRC3CurrentId = await referrerRC3.executeScript(() => navigation.currentEntry.id); - const prerenderedRC = await addPrerenderRC(referrerRC3); + const prerenderedRC = await referrerRC3.addPrerender(); let activationStateBeforeActivation = await prerenderedRC.executeScript(() => { return { entries: navigation.entries().map(e => ({ id: e.id, })), @@ -36,7 +36,7 @@ promise_test(async t => { assert_equals(activationStateBeforeActivation.activationEntryId, activationStateBeforeActivation.entries[0].id); assert_equals(activationStateBeforeActivation.activationNavigationType, "push"); - await activatePrerenderRC(referrerRC3, prerenderedRC); + await referrerRC3.navigateExpectingPrerenderingActivation(prerenderedRC); let activationStateAfterActivation = await prerenderedRC.executeScript(() => { return { diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html index fd25e94b5b3..c6ee9742716 100644 --- a/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html @@ -13,12 +13,12 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); assert_equals(await referrerRC.executeScript(() => navigation.entries().length), 1); let referrerRCCurrentId = await referrerRC.executeScript(() => navigation.currentEntry.id); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); let activationStateBeforeActivation = await prerenderedRC.executeScript(() => { return { entries: navigation.entries().map(e => ({ id: e.id, })), @@ -35,7 +35,7 @@ promise_test(async t => { // Save the current entry before activation. await prerenderedRC.executeScript(() => window.currentEntryBeforeActivation = navigation.currentEntry); - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); let activationStateAfterActivation = await prerenderedRC.executeScript(() => { return { diff --git a/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html b/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html index fa2d424660a..09cd98eb243 100644 --- a/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html @@ -15,17 +15,17 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" }); await setReferrerPolicy(referrerRC, "strict-origin-when-cross-origin"); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const referrerURL = await referrerRC.executeScript(() => location.href); assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true); assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerURL); - await activatePrerenderRC(referrerRC, prerenderedRC, url => { + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => { const a = document.createElement("a"); a.href = url; a.referrerPolicy = "no-referrer"; @@ -37,17 +37,17 @@ promise_test(async t => { }, 'prerendered with "strict-origin-when-cross-origin", activated with "no-referrer"'); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" }); await setReferrerPolicy(referrerRC, "strict-origin-when-cross-origin"); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const referrerURL = await referrerRC.executeScript(() => location.href); assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true); assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerURL); - await activatePrerenderRC(referrerRC, prerenderedRC, url => { + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => { const a = document.createElement("a"); a.href = url; a.referrerPolicy = "strict-origin"; @@ -59,10 +59,10 @@ promise_test(async t => { }, 'prerendered with "strict-origin-when-cross-origin", activated with "strict-origin"'); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" }); await setReferrerPolicy(referrerRC, "strict-origin"); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const referrerURL = await referrerRC.executeScript(() => location.href); const referrerOrigin = (new URL(referrerURL)).origin + "/"; @@ -70,7 +70,7 @@ promise_test(async t => { assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true); assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerOrigin); - await activatePrerenderRC(referrerRC, prerenderedRC, url => { + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => { const a = document.createElement("a"); a.href = url; a.referrerPolicy = "unsafe-url"; diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html b/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html index dd452aa3451..6589b69b22f 100644 --- a/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html @@ -5,7 +5,7 @@ <script src="/speculation-rules/prerender/resources/deferred-promise-utils.js"></script> <script> -// The main test page (restriction-background-sync.tentative.https.html) +// The main test page (restriction-background-sync.https.html) // loads the initiator page, then the initiator page will prerender itself // with the `prerendering` parameter. const params = new URLSearchParams(location.search); diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js index 259f71f6a70..e8397042e7f 100644 --- a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js +++ b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js @@ -375,98 +375,108 @@ function test_prerender_defer(fn, label) { }, label); } -/** - * Starts prerendering a page from the given referrer `RemoteContextWrapper`, - * using `<script type="speculationrules">`. - * - * See - * /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js - * for more details on the `RemoteContextWrapper` framework, and supported fields for extraConfig. - * - * The returned `RemoteContextWrapper` for the prerendered remote - * context will have an extra `url` property, which is used by - * @see activatePrerenderRC. (Most `RemoteContextWrapper` uses should not care - * about the URL, but prerendering is unique in that you need to navigate to - * a prerendered page after creating it.) - * - * @param {RemoteContextWrapper} referrerRemoteContext - * @param {RemoteContextConfig|object} extraConfig - * @returns {Promise<RemoteContextWrapper>} - */ -function addPrerenderRC(referrerRemoteContext, extraConfig) { - return referrerRemoteContext.helper.createContext({ - executorCreator(url) { - return referrerRemoteContext.executeScript(url => { - const script = document.createElement("script"); - script.type = "speculationrules"; - script.textContent = JSON.stringify({ - prerender: [ - { - source: "list", - urls: [url] - } - ] +// If you want access to these, be sure to include +// /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js +// and /speculation-rules/resources/utils.js. So as to avoid requiring everyone +// to do that, we only conditionally define this infrastructure. +if (globalThis.PreloadingRemoteContextHelper) { + class PrerenderingRemoteContextWrapper extends PreloadingRemoteContextHelper.RemoteContextWrapper { + /** + * Activates a prerendered page represented by `destinationRC` by navigating + * the page currently displayed in this `PrerenderingRemoteContextWrapper` to + * it. If the navigation does not result in a prerender activation, the + * returned promise will be rejected with a testharness.js AssertionError. + * + * @param {PrerenderingRemoteContextWrapper} destinationRC - The + * `PrerenderingRemoteContextWrapper` pointing to the prerendered + * content. This is monitored to ensure the navigation results in a + * prerendering activation. + * @param {(string) => Promise<undefined>} [navigateFn] - An optional + * function to customize the navigation. It will be passed the URL of the + * prerendered content, and will run as a script in this (see + * `RemoteContextWrapper.prototype.executeScript`). If not given, + * navigation will be done via the `location.href` setter (see + * `RemoteContextWrapper.prototype.navigateTo`). + * @returns {Promise<undefined>} + */ + async navigateExpectingPrerenderingActivation(destinationRC, navigateFn) { + // Store a promise that will fulfill when the `prerenderingchange` event + // fires. + await destinationRC.executeScript(() => { + window.activatedPromise = new Promise(resolve => { + document.addEventListener("prerenderingchange", () => resolve("activated"), { once: true }); }); - document.head.append(script); - }, [url]); - }, extraConfig - }); -} + }); -/** - * Activates a prerendered RemoteContextWrapper `prerenderedRC` by navigating - * the referrer RemoteContextWrapper `referrerRC` to it. If the navigation does - * not result in a prerender activation, the returned - * promise will be rejected with a testharness.js AssertionError. - * - * See - * /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js - * for more on the RemoteContext helper framework. - * - * @param {RemoteContextWrapper} referrerRC - The referrer - * `RemoteContextWrapper` in which the prerendering was triggered, - * probably via `addPrerenderRC()`. - * @param {RemoteContextWrapper} prerenderedRC - The `RemoteContextWrapper` - * pointing to the prerendered content. This is monitored to ensure the - * navigation results in a prerendering activation. - * @param {(string) => Promise<undefined>} [navigateFn] - An optional function - * to customize the navigation. It will be passed the URL of the prerendered - * content, and will run as a script in `referrerRC` (see - * `RemoteContextWrapper.prototype.executeScript`). If not given, navigation - * will be done via the `location.href` setter (see - * `RemoteContextWrapper.prototype.navigateTo`). - * @returns {Promise<undefined>} - */ -async function activatePrerenderRC(referrerRC, prerenderedRC, navigateFn) { - // Store a promise that will fulfill when the prerenderingchange event fires. - await prerenderedRC.executeScript(() => { - window.activatedPromise = new Promise(resolve => { - document.addEventListener("prerenderingchange", () => resolve("activated")); - }); - }); + if (navigateFn === undefined) { + await this.navigateTo(destinationRC.url); + } else { + await this.navigate(navigateFn, [destinationRC.url]); + } - if (navigateFn === undefined) { - referrerRC.navigateTo(prerenderedRC.url); - } else { - referrerRC.navigate(navigateFn, [prerenderedRC.url]); - } + // Wait until that event fires. If the activation fails and a normal + // navigation happens instead, then `destinationRC` will start pointing to + // that other page, where `window.activatedPromise` is undefined. In that + // case this assert will fail since `undefined !== "activated"`. + assert_equals( + await destinationRC.executeScript(() => window.activatedPromise), + "activated", + "The prerendered page must be activated; instead a normal navigation happened." + ); + } - // Wait until that event fires. If the activation fails and a normal - // navigation happens instead, then prerenderedRC will start pointing to that - // other page, where window.activatedPromise is undefined. In that case this - // assert will fail since undefined !== "activated". - assert_equals( - await prerenderedRC.executeScript(() => window.activatedPromise), - "activated", - "The prerendered page must be activated; instead a normal navigation happened." - ); -} + /** + * Navigates to the URL identified by `destinationRC`, but expects that the + * navigation does not cause a prerendering activation. (E.g., because the + * prerender was canceled by something in the test code.) If the navigation + * results in a prerendering activation, the returned promise will be + * rejected with a testharness.js AssertionError. + * @param {RemoteContextWrapper} destinationRC - The `RemoteContextWrapper` + * pointing to the destination URL. Usually this is obtained by + * prerendering (e.g., via `addPrerender()`), even though we are testing + * that the prerendering does not activate. + * @param {(string) => Promise<undefined>} [navigateFn] - An optional + * function to customize the navigation. It will be passed the URL of the + * prerendered content, and will run as a script in this (see + * `RemoteContextWrapper.prototype.executeScript`). If not given, + * navigation will be done via the `location.href` setter (see + * `RemoteContextWrapper.prototype.navigateTo`). + * @returns {Promise<undefined>} + */ + async navigateExpectingNoPrerenderingActivation(destinationRC, navigateFn) { + if (navigateFn === undefined) { + await this.navigateTo(destinationRC.url); + } else { + await this.navigate(navigateFn, [destinationRC.url]); + } + + assert_equals( + await destinationRC.executeScript(() => { + return performance.getEntriesByType("navigation")[0].activationStart; + }), + 0, + "The prerendered page must not be activated." + ); + } -async function getActivationStart(prerenderedRC) { - return await prerenderedRC.executeScript(() => { - const entry = performance.getEntriesByType("navigation")[0]; - return entry.activationStart; - });; + /** + * Starts prerendering a page with this `PreloadingRemoteContextWrapper` as the + * referrer, using `<script type="speculationrules">`. + * + * @param {object} [extrasInSpeculationRule] - Additional properties to add + * to the speculation rule JSON. + * @param {RemoteContextConfig|object} [extraConfig] - Additional remote + * context configuration for the preloaded context. + * @returns {Promise<PreloadingRemoteContextWrapper>} + */ + addPrerender(options) { + return this.addPreload("prerender", options); + } + } + + globalThis.PrerenderingRemoteContextHelper = class extends PreloadingRemoteContextHelper { + static RemoteContextWrapper = PrerenderingRemoteContextWrapper; + }; } // Used by the opened window, to tell the main test runner to terminate a diff --git a/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.https.html index 53dbb56d99f..53dbb56d99f 100644 --- a/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.tentative.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.https.html diff --git a/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html b/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html index e9e8548c4f6..8ab18113fda 100644 --- a/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html +++ b/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html @@ -14,13 +14,13 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); assert_equals(await prerenderedRC.executeScript(() => document.visibilityState), "hidden"); - await activatePrerenderRC(referrerRC, prerenderedRC); + await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC); assert_equals(await prerenderedRC.executeScript(() => document.visibilityState), "visible"); }); diff --git a/tests/wpt/tests/speculation-rules/resources/utils.js b/tests/wpt/tests/speculation-rules/resources/utils.js index cb72f446813..f2fc2169113 100644 --- a/tests/wpt/tests/speculation-rules/resources/utils.js +++ b/tests/wpt/tests/speculation-rules/resources/utils.js @@ -1,4 +1,4 @@ -window.assertSpeculationRulesIsSupported = () => { +globalThis.assertSpeculationRulesIsSupported = () => { assert_implements( 'supports' in HTMLScriptElement, 'HTMLScriptElement.supports must be supported'); @@ -6,3 +6,49 @@ window.assertSpeculationRulesIsSupported = () => { HTMLScriptElement.supports('speculationrules'), '<script type="speculationrules"> must be supported'); }; + +// If you want access to these, be sure to include +// /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js. +// So as to avoid requiring everyone to do that, we only conditionally define this infrastructure. +if (globalThis.RemoteContextHelper) { + class PreloadingRemoteContextWrapper extends RemoteContextHelper.RemoteContextWrapper { + /** + * Starts preloading a page with this `PreloadingRemoteContextWrapper` as the + * referrer, using `<script type="speculationrules">`. + * + * @param {"prefetch"|"prerender"} preloadType - The preload type to use. + * @param {object} [extrasInSpeculationRule] - Additional properties to add + * to the speculation rule JSON. + * @param {RemoteContextConfig|object} [extraConfig] - Additional remote + * context configuration for the preloaded context. + * @returns {Promise<PreloadingRemoteContextWrapper>} + */ + addPreload(preloadType, { extrasInSpeculationRule = {}, ...extraConfig } = {}) { + const referrerRemoteContext = this; + + return this.helper.createContext({ + executorCreator(url) { + return referrerRemoteContext.executeScript((url, preloadType, extrasInSpeculationRule) => { + const script = document.createElement("script"); + script.type = "speculationrules"; + script.textContent = JSON.stringify({ + [preloadType]: [ + { + source: "list", + urls: [url], + ...extrasInSpeculationRule + } + ] + }); + document.head.append(script); + }, [url, preloadType, extrasInSpeculationRule]); + }, + extraConfig + }); + } + } + + globalThis.PreloadingRemoteContextHelper = class extends RemoteContextHelper { + static RemoteContextWrapper = PreloadingRemoteContextWrapper; + }; +} diff --git a/tests/wpt/tests/speculation-rules/prerender/script-supports-speculationrules.https.html b/tests/wpt/tests/speculation-rules/script-supports.https.html index 2dc856fce5d..7446f2b6b5f 100644 --- a/tests/wpt/tests/speculation-rules/prerender/script-supports-speculationrules.https.html +++ b/tests/wpt/tests/speculation-rules/script-supports.https.html @@ -1,15 +1,14 @@ <!DOCTYPE html> -<html> <title>HTMLScriptElement.supports speculationrules</title> -<meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> + <script> -test(function() { +test(() => { assert_true(HTMLScriptElement.supports('speculationrules')); }, 'HTMLScriptElement.supports returns true for \'speculationrules\''); -test(function() { +test(() => { assert_false(HTMLScriptElement.supports(' speculationrules')); assert_false(HTMLScriptElement.supports('speculationrules ')); assert_false(HTMLScriptElement.supports('Speculationrules')); @@ -17,5 +16,4 @@ test(function() { assert_false(HTMLScriptElement.supports('speculationRules')); assert_false(HTMLScriptElement.supports('speculation-rules')); }, 'HTMLScriptElement.supports returns false for unsupported types'); - </script> diff --git a/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html b/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html index 176b3d20bb2..088f0ba66b5 100644 --- a/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html +++ b/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html @@ -6,9 +6,9 @@ <script src="/common/dispatcher/dispatcher.js"></script> <script src="/common/utils.js"></script> <script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script> -<script src="/speculation-rules/prerender/resources/utils.js"></script> <script src="/speculation-rules/resources/utils.js"></script> <script src="/speculation-rules/prefetch/resources/utils.sub.js"></script> +<script src="/speculation-rules/prerender/resources/utils.js"></script> <script src="resources/speculation-tags-utils.js"></script> <script> "use strict"; @@ -30,10 +30,10 @@ promise_test(async t => { }, "Sec-Speculation-Tags: no tags (prefetch)"); promise_test(async t => { - const rcHelper = new RemoteContextHelper(); + const rcHelper = new PrerenderingRemoteContextHelper(); const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const prerenderedRC = await addPrerenderRC(referrerRC); + const prerenderedRC = await referrerRC.addPrerender(); const headers = await prerenderedRC.getRequestHeaders(); assert_equals(headers.get("sec-purpose"), "prefetch;prerender"); assert_equals(headers.get("sec-speculation-tags"), "null"); diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html index ace8edd9164..fb4273f7392 100644 --- a/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html +++ b/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html @@ -1,34 +1,34 @@ <!DOCTYPE html> -<title>SpeechRecognition availableOnDevice</title> +<title>SpeechRecognition available</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> promise_test(async (t) => { - const lang = "en-US"; + const options = { langs: ["en-US", "fr-FR"], processLocally: true }; window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; // Test that it returns a promise. - const resultPromise = SpeechRecognition.availableOnDevice(lang); + const resultPromise = SpeechRecognition.available(options); assert_true( resultPromise instanceof Promise, - "availableOnDevice should return a Promise." + "available should return a Promise." ); // Verify the resolved value is a string. const result = await resultPromise; assert_true( typeof result === "string", - "The resolved value of the availableOnDevice promise should be a string." + "The resolved value of the available promise should be a string." ); assert_true( result === "unavailable" || result === "downloadable" || result === "downloading" || result === "available", - "The resolved value of the availableOnDevice promise should be a " + + "The resolved value of the available promise should be a " + "valid value." ); -}, "SpeechRecognition.availableOnDevice resolves with a string value."); +}, "SpeechRecognition.available resolves with a string value for on-device."); promise_test(async (t) => { const iframe = document.createElement("iframe"); @@ -38,14 +38,15 @@ promise_test(async (t) => { const frameSpeechRecognition = frameWindow.SpeechRecognition || frameWindow.webkitSpeechRecognition; + const options = { langs: ["en-US"], processLocally: true }; iframe.remove(); await promise_rejects_dom( t, "InvalidStateError", frameDOMException, - frameSpeechRecognition.availableOnDevice("en-US"), + frameSpeechRecognition.available(options), ); -}, "SpeechRecognition.availableOnDevice rejects in a detached context."); +}, "SpeechRecognition.available rejects in a detached context for on-device."); promise_test(async (t) => { const iframe = document.createElement("iframe"); @@ -70,17 +71,18 @@ promise_test(async (t) => { assert_true(!!frameSpeechRecognition, "SpeechRecognition should exist in iframe."); - assert_true(!!frameSpeechRecognition.availableOnDevice, - "availableOnDevice method should exist on SpeechRecognition in iframe."); + assert_true(!!frameSpeechRecognition.available, + "available method should exist on SpeechRecognition in iframe."); - // Call availableOnDevice and expect it to resolve to "unavailable". + const options = { langs: ["en-US"], processLocally: true }; + // Call available and expect it to resolve to "unavailable". const availabilityStatus = - await frameSpeechRecognition.availableOnDevice("en-US"); + await frameSpeechRecognition.available(options); assert_equals(availabilityStatus, "unavailable", - "availableOnDevice should resolve to 'unavailable' if " + + "available should resolve to 'unavailable' if " + "'on-device-speech-recognition' Permission Policy is 'none'." ); -}, "SpeechRecognition.availableOnDevice resolves to 'unavailable' if " + +}, "SpeechRecognition.available resolves to 'unavailable' for on-device if " + "'on-device-speech-recognition' Permission Policy is 'none'."); promise_test(async (t) => { @@ -89,24 +91,25 @@ promise_test(async (t) => { <script> window.addEventListener('message', async (event) => { // Ensure we only process the message intended to trigger the test. - if (event.data !== "runTestCallAvailableOnDevice") return; + if (event.data !== "runTestCallAvailable") return; try { const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; - if (!SpeechRecognition || !SpeechRecognition.availableOnDevice) { + if (!SpeechRecognition || !SpeechRecognition.available) { parent.postMessage({ type: "error", // Use "error" for API not found or other issues. name: "NotSupportedError", - message: "SpeechRecognition.availableOnDevice API not " + + message: "SpeechRecognition.available API not " + "available in iframe" }, "*"); return; } - // Call availableOnDevice and post its resolution. + const options = { langs: ["en-US"], processLocally: true }; + // Call available and post its resolution. const availabilityStatus = - await SpeechRecognition.availableOnDevice("en-US"); + await SpeechRecognition.available(options); parent.postMessage( { type: "resolution", result: availabilityStatus }, "*" @@ -155,7 +158,7 @@ promise_test(async (t) => { })); // Send a distinct message to the iframe to trigger its test logic. - iframe.contentWindow.postMessage("runTestCallAvailableOnDevice", "*"); + iframe.contentWindow.postMessage("runTestCallAvailable", "*"); }); // Check if the iframe's script reported an error (e.g., API not found). @@ -175,9 +178,9 @@ promise_test(async (t) => { assert_equals( testResult.result, // Expecting the string "unavailable". "unavailable", - "availableOnDevice should resolve to 'unavailable' in a cross-origin " + + "available should resolve to 'unavailable' for on-device in a cross-origin " + "iframe." ); -}, "SpeechRecognition.availableOnDevice should resolve to 'unavailable' " + +}, "SpeechRecognition.available should resolve to 'unavailable' for on-device " + "in a cross-origin iframe."); </script> diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html index 91cf8e6d3e5..0fbc4aa8426 100644 --- a/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html +++ b/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html @@ -11,7 +11,7 @@ test(function() { assert_false(reco.continuous, 'SpeechRecognition.continuous'); assert_false(reco.interimResults, 'SpeechRecognition.interimResults'); assert_equals(reco.maxAlternatives, 1, 'SpeechRecognition.maxAlternatives'); - assert_equals(reco.mode, 'ondevice-preferred', 'SpeechRecognition.mode'); + assert_false(reco.processLocally, 'SpeechRecognition.processLocally'); assert_equals(reco.phrases.length, 0, 'SpeechRecognition.phrases.length'); }); </script> diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html index 5f78fc8c9c1..52281f61b6c 100644 --- a/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html +++ b/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<title>SpeechRecognition installOnDevice</title> +<title>SpeechRecognition install</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> @@ -11,148 +11,155 @@ promise_test(async (t) => { const invalidLang = "invalid language code"; window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; + const validOptions = { langs: [validLang], processLocally: true }; + const validAlternateOptions = { langs: [validLangAlternateLocale], processLocally: true }; + const invalidOptions = { langs: [invalidLang], processLocally: true }; // Check the availablility of the on-device language pack. const initialAvailabilityPromise = - SpeechRecognition.availableOnDevice(validLang); + SpeechRecognition.available(validOptions); assert_true( initialAvailabilityPromise instanceof Promise, - "availableOnDevice should return a Promise." + "available should return a Promise." ); const initialAvailabilityResult = await initialAvailabilityPromise; assert_true( typeof initialAvailabilityResult === "string", - "The resolved value of the availableOnDevice promise should be a string." + "The resolved value of the available promise should be a string." ); if (initialAvailabilityResult === "downloadable") { - // Attempt to call installOnDevice directly, without a user gesture with a + // Attempt to call install directly, without a user gesture with a // language that is downloadable but not installed. const installWithoutUserGesturePromise = - SpeechRecognition.installOnDevice(validLang); + SpeechRecognition.install(validOptions); // Assert that the promise rejects with NotAllowedError. await promise_rejects_dom( t, "NotAllowedError", window.DOMException, - installWithoutUserGesturePromise, "SpeechRecognition.installOnDevice() " + - "must reject with NotAllowedError if called without a user gesture." + installWithoutUserGesturePromise, "SpeechRecognition.install() " + + "must reject with NotAllowedError if called without a user gesture for on-device." ); // Test that it returns a promise when called with a valid language. const validResultPromise = test_driver.bless( - "Call SpeechRecognition.installOnDevice with a valid language", - () => SpeechRecognition.installOnDevice(validLang) + "Call SpeechRecognition.install with a valid language", + () => SpeechRecognition.install(validOptions) + ); + const validInstallPromise = test_driver.bless( + "Call SpeechRecognition.install with valid options for on-device", + () => SpeechRecognition.install(validOptions) ); assert_true( - validResultPromise instanceof Promise, - "installOnDevice (with gesture) should return a Promise." + validInstallPromise instanceof Promise, + "install (with gesture, for on-device) should return a Promise." ); // Verify the resolved value is a boolean. - const validResult = await validResultPromise; + const validInstallResult = await validInstallPromise; assert_true( - typeof validResult === "boolean", - "The resolved value of the installOnDevice promise should be a boolean." + typeof validInstallResult === "boolean", + "The resolved value of the install promise (on-device) should be a boolean." ); // Verify that the method returns true when called with a supported language. assert_equals( - validResult, + validInstallResult, true, - "installOnDevice should resolve with `true` when called with a " + - "supported language code." + "install should resolve with `true` when called with " + + "supported options for on-device." ); // Verify that the newly installed language pack is available. const availableOnDeviceResultPromise = - SpeechRecognition.availableOnDevice(validLang); + SpeechRecognition.available(validOptions); assert_true( availableOnDeviceResultPromise instanceof Promise, - "availableOnDevice should return a Promise." + "available should return a Promise." ); const availableOnDeviceResult = await availableOnDeviceResultPromise; assert_true( typeof availableOnDeviceResult === "string", - "The resolved value of the availableOnDevice promise should be a string." + "The resolved value of the available promise should be a string." ); assert_true( availableOnDeviceResult === "available", - "The resolved value of the availableOnDevice promise should be " + + "The resolved value of the available promise (on-device) should be " + "'available'." ); // Verify that the newly installed language pack is available for an alternate locale. const alternateLocaleResultPromise = - SpeechRecognition.availableOnDevice(validLangAlternateLocale); + SpeechRecognition.available(validAlternateOptions); assert_true( alternateLocaleResultPromise instanceof Promise, - "availableOnDevice should return a Promise." + "available should return a Promise." ); const alternateLocaleResult = await alternateLocaleResultPromise; assert_true( typeof alternateLocaleResult === "string", - "The resolved value of the availableOnDevice promise should be a string." + "The resolved value of the available promise should be a string." ); assert_true( alternateLocaleResult === "available", - "The resolved value of the availableOnDevice promise should be " + + "The resolved value of the available promise (on-device, alternate locale) should be " + "'available'." ); // Verify that installing an already installed language resolves to true. - const secondResultPromise = test_driver.bless( - "Call SpeechRecognition.installOnDevice for an already installed language", - () => SpeechRecognition.installOnDevice(validLang) + const secondInstallPromise = test_driver.bless( + "Call SpeechRecognition.install for an already installed on-device language", + () => SpeechRecognition.install(validOptions) ); assert_true( - secondResultPromise instanceof Promise, - "installOnDevice (with gesture, for already installed language) should " + + secondInstallPromise instanceof Promise, + "install (with gesture, for already installed on-device language) should " + "return a Promise." ); - const secondResult = await secondResultPromise; + const secondInstallResult = await secondInstallPromise; assert_true( - typeof secondResult === "boolean", - "The resolved value of the second installOnDevice promise should be a " + + typeof secondInstallResult === "boolean", + "The resolved value of the second install promise (on-device) should be a " + "boolean." ); assert_equals( - secondResult, + secondInstallResult, true, - "installOnDevice should resolve with `true` if the language is already " + + "install should resolve with `true` if the on-device language is already " + "installed." ); } // Test that it returns a promise and resolves to false for unsupported lang. - const invalidResultPromise = test_driver.bless( - "Call SpeechRecognition.installOnDevice with an unsupported language code", - () => SpeechRecognition.installOnDevice(invalidLang) + const invalidInstallPromise = test_driver.bless( + "Call SpeechRecognition.install with unsupported on-device options", + () => SpeechRecognition.install(invalidOptions) ); assert_true( - invalidResultPromise instanceof Promise, - "installOnDevice (with gesture, for unsupported language) should return " + + invalidInstallPromise instanceof Promise, + "install (with gesture, for unsupported on-device options) should return " + "a Promise." ); - const invalidResult = await invalidResultPromise; + const invalidInstallResult = await invalidInstallPromise; assert_true( - typeof invalidResult === "boolean", - "The resolved value of the installOnDevice promise (unsupported language) " + + typeof invalidInstallResult === "boolean", + "The resolved value of the install promise (unsupported on-device options) " + "should be a boolean." ); assert_equals( - invalidResult, + invalidInstallResult, false, - "installOnDevice should resolve with `false` when called with an " + - "unsupported language code." + "install should resolve with `false` when called with " + + "unsupported on-device options." ); -}, "SpeechRecognition.installOnDevice resolves with a boolean value " + +}, "SpeechRecognition.install resolves with a boolean value for on-device " + "(with user gesture)."); promise_test(async (t) => { @@ -162,6 +169,7 @@ promise_test(async (t) => { const frameDOMException = frameWindow.DOMException; const frameSpeechRecognition = frameWindow.SpeechRecognition || frameWindow.webkitSpeechRecognition; + const options = { langs: ["en-US"], processLocally: true }; iframe.remove(); await promise_rejects_dom( @@ -169,13 +177,13 @@ promise_test(async (t) => { "InvalidStateError", frameDOMException, test_driver.bless( - "Call SpeechRecognition.installOnDevice in a detached frame context", + "Call SpeechRecognition.install in a detached frame context for on-device", () => { - return frameSpeechRecognition.installOnDevice("en-US"); + return frameSpeechRecognition.install(options); } ) ); -}, "SpeechRecognition.installOnDevice rejects in a detached context."); +}, "SpeechRecognition.install rejects in a detached context for on-device."); promise_test(async (t) => { const iframe = document.createElement("iframe"); @@ -200,19 +208,20 @@ promise_test(async (t) => { assert_true(!!frameSpeechRecognition, "SpeechRecognition should exist in iframe."); - assert_true(!!frameSpeechRecognition.installOnDevice, - "installOnDevice method should exist on SpeechRecognition in iframe."); + assert_true(!!frameSpeechRecognition.install, + "install method should exist on SpeechRecognition in iframe."); + const options = { langs: ["en-US"], processLocally: true }; await promise_rejects_dom( t, "NotAllowedError", frameDOMException, - frameSpeechRecognition.installOnDevice("en-US"), - "installOnDevice should reject with NotAllowedError if " + + frameSpeechRecognition.install(options), + "install should reject with NotAllowedError if " + "'install-on-device-speech-recognition' Permission Policy is " + "disabled." ); -}, "SpeechRecognition.installOnDevice rejects if " + +}, "SpeechRecognition.install rejects for on-device if " + "'install-on-device-speech-recognition' Permission Policy is disabled."); promise_test(async (t) => { @@ -223,7 +232,7 @@ promise_test(async (t) => { try { const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; - if (!SpeechRecognition || !SpeechRecognition.installOnDevice) { + if (!SpeechRecognition || !SpeechRecognition.install) { parent.postMessage({ type: "rejection", name: "NotSupportedError", @@ -232,7 +241,8 @@ promise_test(async (t) => { return; } - await SpeechRecognition.installOnDevice("en-US"); + const options = { langs: ["en-US"], processLocally: true }; + await SpeechRecognition.install(options); parent.postMessage({ type: "resolution", result: "success" }, "*"); } catch (err) { parent.postMessage({ @@ -286,5 +296,5 @@ promise_test(async (t) => { testResult.message.includes("cross-site subframe"), `Error message should reference cross-origin. Got: "${testResult.message}"` ); -}, "SpeechRecognition.installOnDevice should reject in a cross-origin iframe."); +}, "SpeechRecognition.install should reject for on-device in a cross-origin iframe."); </script> diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html index 2d0b19ab46c..0f596a88015 100644 --- a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html +++ b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html @@ -1,7 +1,10 @@ <!DOCTYPE html> <html lang="en"> +<meta name="timeout" content="long"> <title>SpeechRecognition Phrases</title> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -22,6 +25,24 @@ async function getAudioTrackFromFile(filePath) { } promise_test(async (t) => { + window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; + + // Install en-US for on-device speech recognition. + const installOptions = { langs: ["en-US"], processLocally: true }; + const installPromise = test_driver.bless( + "Install on-device en-US speech recognition", + () => SpeechRecognition.install(installOptions) + ); + assert_true( + installPromise instanceof Promise, + "SpeechRecognition.install() should return a Promise." + ); + const installResult = await installPromise; + assert_true( + installResult, + "SpeechRecognition.install() for en-US should resolve with true." + ); + // Verify the audio track for recognition context exists. const audioTrack = await getAudioTrackFromFile("/media/recognition_context.mp3"); assert_true( @@ -31,9 +52,8 @@ promise_test(async (t) => { // Create the first speech recognition with a mode that does not support contextual biasing. // Note that this may vary between browsers in the future. - window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; const recognition1 = new SpeechRecognition(); - recognition1.mode = "cloud-only"; + recognition1.processLocally = false; recognition1.lang = "en-US"; recognition1.onerror = function(event) { @@ -50,7 +70,7 @@ promise_test(async (t) => { // Create the second speech recognition with a mode that supports contextual biasing. const recognition2 = new SpeechRecognition(); - recognition2.mode = "ondevice-only"; + recognition2.processLocally = true; recognition2.lang = "en-US"; recognition2.onerror = function(event) { @@ -67,7 +87,11 @@ promise_test(async (t) => { const recognitionPromise = new Promise((resolve) => { recognition2.onresult = (event) => { const transcript = event.results[0][0].transcript; - resolve(transcript); + const words = transcript.toLowerCase().split(' '); + // Resolve when the last word is "expectations". + if (words.length > 0 && words[words.length - 1] === "expectations") { + resolve(transcript); + } }; }); recognition2.start(audioTrack); diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html index 783374db920..57b4d3e3582 100644 --- a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html +++ b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html @@ -31,12 +31,6 @@ const blob_url = URL.createObjectURL(blob); - // Generated using https://sha2.it/ed25519.html (In Chrome Canary, with Experimental Web Platform Features enabled) - const signature = encodeURIComponent( - 'header(Unencoded-Digest, sha-384=:tqyFpeo21WFM8HDeUtLqH20GUq\/q3D1R6mqTzW3RtyTZ3dAYZJhC1wUcnkgOE2ak:)' + - '|header(Signature-Input, signature=\\("unencoded-digest";sf\\); keyid="JrQLj5P\/89iXES9+vFgrIy29clF9CC\/oPPsw3c5D0bs="; tag="sri")' + - '|header(Signature, signature=:qM19uLskHm2TQG5LJcH/hY0n0BWWzYOJztVWYlwk0cZb3u0JdgUMre1J4Jn8Tma0x2u5/kPBfbXRMbB+X+vTBw==:)'); - const test_cases = [ { description: "Ensure that a script without integrity did not run", @@ -99,16 +93,6 @@ expected: {blocked: "", ran: true }, }, { - description: "Ensure that a script with signature integrity runs", - url: "/content-security-policy/resources/ran.js?pipe=" + signature, - cross_origin: true, - integrity: "ed25519-JrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs=", - policy_violation: false, - block: true, - endpoints: true, - expected: {blocked: "", ran: true }, - }, - { description: "Ensure that a data URI script with no integrity runs", url: "data:application/javascript,window.ran=true", cross_origin: true, diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html new file mode 100644 index 00000000000..d54a6dfb7b0 --- /dev/null +++ b/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html @@ -0,0 +1,51 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/utils.js"></script> +<script src="/reporting/resources/report-helper.js"></script> + +<body> +<script> + promise_test(async () => { + // Generated using https://sha2.it/ed25519.html in a browser that supports Signature-Based SRI (e.g. Chrome 136+, with Experimental Web Platform Features enabled) + const signature = encodeURIComponent( + 'header(Unencoded-Digest, sha-384=:tqyFpeo21WFM8HDeUtLqH20GUq\/q3D1R6mqTzW3RtyTZ3dAYZJhC1wUcnkgOE2ak:)' + + '|header(Signature-Input, signature=\\("unencoded-digest";sf\\); keyid="JrQLj5P\/89iXES9+vFgrIy29clF9CC\/oPPsw3c5D0bs="; tag="sri")' + + '|header(Signature, signature=:qM19uLskHm2TQG5LJcH/hY0n0BWWzYOJztVWYlwk0cZb3u0JdgUMre1J4Jn8Tma0x2u5/kPBfbXRMbB+X+vTBw==:)'); + + const REMOTE_EXECUTOR = + `/common/dispatcher/remote-executor.html`; + const iframe_uuid = token(); + + let header = + `header(Integrity-Policy,blocked-destinations=\\(script\\)\\, endpoints=\\(integrity-endpoint-1 integrity-endpoint-2\\))`; + header += + `|header(Integrity-Policy-Report-Only,blocked-destinations=\\(script\\)\\, endpoints=\\(integrity-endpoint-3\\))`; + const params = new URLSearchParams(); + params.set('uuid', iframe_uuid); + params.set('pipe', header); + + const iframe = document.createElement('iframe'); + iframe.src = `${REMOTE_EXECUTOR}?${params}`; + document.body.appendChild(iframe); + + // Execute code directly from the iframe. + const ctx = new RemoteContext(iframe_uuid); + const result = await ctx.execute_script(async (signature) => { + window.ran = false; + // Load the script + await new Promise(resolve => { + const script = document.createElement('script'); + script.crossOrigin="anonymous"; + script.integrity = "ed25519-JrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs="; + script.onload = resolve; + script.onerror = resolve; + script.src = "/content-security-policy/resources/ran.js?pipe=" + signature; + document.body.appendChild(script); + }); + return { ran: window.ran }; + }, [signature]); + assert_equals(result.ran, true); + }, "Ensure that a script with signature integrity runs"); +</script> diff --git a/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html b/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html new file mode 100644 index 00000000000..68114581172 --- /dev/null +++ b/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html @@ -0,0 +1,34 @@ +<!doctype html> +<title>'inherit' path animation</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> +<script src="support/animated-path-helpers.js"></script> +<svg> + <g style="d: path('M0,50h100')"> + <path stroke-width="100" stroke="green"> + <animate attributeName="d" attributeType="CSS" values="M0,50h50; inherit" + dur="5s" fill="freeze"/> + </path> + </g> +</svg> +<script> +const rootSVGElement = document.querySelector("svg"); + +smil_async_test(t => { + const path = document.querySelector("svg > g > path"); + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0, () => { + assert_animated_path_equals(path, "M 0 50 h 50"); + }], + ["animation", 2.5, () => { + assert_animated_path_equals(path, "M 0 50 h 75"); + }], + ["animation", 5, () => { + assert_animated_path_equals(path, "M 0 50 h 100"); + }] + ]; + runAnimationTest(t, expectedValues); +}); +</script> diff --git a/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html b/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html index 48fb4fa48b7..4f8335dcd19 100644 --- a/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html +++ b/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html @@ -1,6 +1,9 @@ <!doctype html> +<html class="reftest-wait"> <title>SVG image that uses a data: URL and then again</title> <link rel="match" href="../struct/reftests/reference/green-100x100.html"> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> <img src="data:image/svg+xml, <svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'> <image href='data:image/svg+xml, @@ -14,3 +17,9 @@ '/> </svg> "> +<script> +waitForAtLeastOneFrame().then(() => { + takeScreenshot(); +}); +</script> +</html> diff --git a/tests/wpt/tests/svg/embedded/image-modify-href-4.svg b/tests/wpt/tests/svg/embedded/image-modify-href-4.svg index f7e550e5def..e900ee71387 100644 --- a/tests/wpt/tests/svg/embedded/image-modify-href-4.svg +++ b/tests/wpt/tests/svg/embedded/image-modify-href-4.svg @@ -16,15 +16,17 @@ const doc = document.implementation.createDocument(SVG_NS, "svg"); const image = doc.createElementNS(SVG_NS, "image"); + image.addEventListener('load', function() { + waitForAtLeastOneFrame().then(() => { + takeScreenshot(); + }); + }); image.setAttribute("width", 100); image.setAttribute("height", 100); image.setAttribute("href", "reference/green-rect-100x100.svg"); doc.documentElement.appendChild(image); document.documentElement.appendChild(document.adoptNode(image)); - - await waitForAtLeastOneFrame(); - takeScreenshot(); } </script> </svg> diff --git a/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html new file mode 100644 index 00000000000..78117251a36 --- /dev/null +++ b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> + +<style> +iframe { + display: block; + border: none; +} +</style> + +<p>None of the marker rects should be visible as disruptions in the gradient, regardless of transforms:</p> +<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe> +<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe> +<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe> diff --git a/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html new file mode 100644 index 00000000000..507e9a360cc --- /dev/null +++ b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + +<title>SVG rendering test: context-fill in markers with transform</title> + +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1969782"> +<link rel="match" href="marker-context-fill-transform-ref.html"> + +<style> +iframe { + display: block; + border: none; +} +#a { + zoom: 1; +} +#b { + zoom: 2; +} +#c { + zoom: 0.25; +} +</style> + +<p>None of the marker rects should be visible as disruptions in the gradient, regardless of transforms:</p> +<iframe id=a width=300 height=150 src='support/svg-marker-context-paint.svg'></iframe> +<iframe id=b width=150 height=75 src='support/svg-marker-context-paint.svg'></iframe> +<iframe id=c width=1200 height=600 src='support/svg-marker-context-paint.svg'></iframe> diff --git a/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html b/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html index 3d9fb8cb45f..308835ce5b4 100644 --- a/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html +++ b/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html @@ -5,14 +5,14 @@ <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="match" href="small-nested-viewbox-ref.html"> <style> - svg { + svg#root { width: 16px; padding: 4px; background: #ccc; color: #000; } </style> -<svg viewBox="0 0 4 4"> +<svg id="root" viewBox="0 0 4 4"> <svg viewBox='0 0 256 256'> <rect width="256" height="256" x="0" y="0" fill="green" /> </svg> diff --git a/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg new file mode 100644 index 00000000000..8c97058d71e --- /dev/null +++ b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg @@ -0,0 +1,29 @@ +<svg id="svg-root" viewBox="0 0 1600 900" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <defs> + <linearGradient id="lg"> + <stop offset="0" stop-color="red"/> + <stop offset="1" stop-color="blue"/> + </linearGradient> + + <!-- + This marker will render two rectangles, both within the filled area + of the path we're using, so they should be indistinguishable from it. + --> + <marker id="marker" refX="-10" refY="-10" markerWidth="600" markerHeight="400" > + <rect y="0" width="200" height="100" fill="context-fill"/> + <rect x="250" y="270" width="300" height="100" fill="context-fill"/> + </marker> + </defs> + + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/> + + <g transform="translate(300 450) scale(0.75 0.5) rotate(60)"> + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/> + </g> + + <g transform="translate(600 450) scale(1.5 0.5) rotate(-30)"> + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/> + </g> +</svg> diff --git a/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg new file mode 100644 index 00000000000..1e823431105 --- /dev/null +++ b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg @@ -0,0 +1,20 @@ +<svg id="svg-root" viewBox="0 0 1600 900" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <defs> + <linearGradient id="lg"> + <stop offset="0" stop-color="red"/> + <stop offset="1" stop-color="blue"/> + </linearGradient> + </defs> + + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/> + + <g transform="translate(300 450) scale(0.75 0.5) rotate(60)"> + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/> + </g> + + <g transform="translate(600 450) scale(1.5 0.5) rotate(-30)"> + <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/> + </g> +</svg> diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg new file mode 100644 index 00000000000..a8fa5211842 --- /dev/null +++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg @@ -0,0 +1,5 @@ +<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"> + <svg width="50" height="50"> + <circle cx="50" cy="50" r="40" fill="green" /> + </svg> +</svg> diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg new file mode 100644 index 00000000000..daef973aa5d --- /dev/null +++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg @@ -0,0 +1,5 @@ +<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg"> + <svg id="target" width="50" height="50"> + <circle cx="50" cy="50" r="40" fill="green" /> + </svg> +</svg> diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg new file mode 100644 index 00000000000..5f3c4eed490 --- /dev/null +++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg @@ -0,0 +1,12 @@ +<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Width and Height as presentation attributes on nested svg</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/styling.html#TermPresentationAttribute"/> + <html:link rel="match" href="nested-svg-sizing-with-use-expected.svg" /> + <defs> + <svg id="target" style="width:50px; height:50px;"> + <circle cx="50" cy="50" r="40" fill="green" /> + </svg> + </defs> + + <use href="#target"/> +</svg> diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing.svg new file mode 100644 index 00000000000..6c8c45f6d42 --- /dev/null +++ b/tests/wpt/tests/svg/styling/nested-svg-sizing.svg @@ -0,0 +1,8 @@ +<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Width and Height as presentation attributes on nested svg</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/styling.html#TermPresentationAttribute"/> + <html:link rel="match" href="nested-svg-sizing-expected.svg" /> + <svg style="width:50px;height:50px;"> + <circle cx="50" cy="50" r="40" fill="green" /> + </svg> +</svg> diff --git a/tests/wpt/tests/tools/META.yml b/tests/wpt/tests/tools/META.yml index db7d4d786b4..b204d814921 100644 --- a/tests/wpt/tests/tools/META.yml +++ b/tests/wpt/tests/tools/META.yml @@ -2,3 +2,4 @@ suggested_reviewers: - jgraham - foolip - DanielRyanSmith + - jonathan-j-lee diff --git a/tests/wpt/tests/tools/ci/jobs.py b/tests/wpt/tests/tools/ci/jobs.py index be600ee3974..f18cd66e420 100644 --- a/tests/wpt/tests/tools/ci/jobs.py +++ b/tests/wpt/tests/tools/ci/jobs.py @@ -145,6 +145,8 @@ def create_parser(): help="Jobs to check for. Return code is 0 if all jobs are found, otherwise 1") parser.add_argument("--json", action="store_true", help="Output jobs as JSON, instead of one per line") + parser.add_argument("--json-indent", type=int, + help="Indent the JSON with this many spaces (default: no indentation, single line output)") return parser @@ -153,7 +155,7 @@ def run(**kwargs): jobs = get_jobs(paths, **kwargs) if not kwargs["includes"]: if kwargs["json"]: - json.dump(sorted(jobs), sys.stdout, indent=2) + json.dump(sorted(jobs), sys.stdout, indent=kwargs["json_indent"]) sys.stdout.write("\n") else: for item in sorted(jobs): diff --git a/tests/wpt/tests/tools/webdriver/webdriver/client.py b/tests/wpt/tests/tools/webdriver/webdriver/client.py index 5a54bf66ac6..f4e6259d547 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/client.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/client.py @@ -9,24 +9,6 @@ from . import transport from .bidi.client import BidiSession -def command(func): - def inner(self, *args, **kwargs): - if hasattr(self, "session"): - session = self.session - else: - session = self - - if session.session_id is None: - session.start() - - return func(self, *args, **kwargs) - - inner.__name__ = func.__name__ - inner.__doc__ = func.__doc__ - - return inner - - class Timeouts: def __init__(self, session): @@ -111,7 +93,6 @@ class ActionSequence: d["parameters"] = self._pointer_params return d - @command def perform(self): """Perform all queued actions.""" self.session.actions.perform([self.dict]) @@ -271,7 +252,6 @@ class Actions: def __init__(self, session): self.session = session - @command def perform(self, actions=None): """Performs actions by tick from each action sequence in `actions`. @@ -283,7 +263,6 @@ class Actions: actions = self.session.send_session_command("POST", "actions", body) return actions - @command def release(self): return self.session.send_session_command("DELETE", "actions") @@ -299,7 +278,6 @@ class BrowserWindow: def __init__(self, session): self.session = session - @command def close(self): handles = self.session.send_session_command("DELETE", "window") if handles is not None and len(handles) == 0: @@ -309,24 +287,20 @@ class BrowserWindow: return handles @property - @command def rect(self): return self.session.send_session_command("GET", "window/rect") @rect.setter - @command def rect(self, new_rect): self.session.send_session_command("POST", "window/rect", new_rect) @property - @command def size(self): """Gets the window size as a tuple of `(width, height)`.""" rect = self.rect return (rect["width"], rect["height"]) @size.setter - @command def size(self, new_size): """Set window size by passing a tuple of `(width, height)`.""" try: @@ -339,14 +313,12 @@ class BrowserWindow: pass @property - @command def position(self): """Gets the window position as a tuple of `(x, y)`.""" rect = self.rect return (rect["x"], rect["y"]) @position.setter - @command def position(self, new_position): """Set window position by passing a tuple of `(x, y)`.""" try: @@ -358,15 +330,12 @@ class BrowserWindow: # for Android. Revert this once it is implemented. pass - @command def maximize(self): return self.session.send_session_command("POST", "window/maximize") - @command def minimize(self): return self.session.send_session_command("POST", "window/minimize") - @command def fullscreen(self): return self.session.send_session_command("POST", "window/fullscreen") @@ -375,7 +344,6 @@ class Find: def __init__(self, session): self.session = session - @command def css(self, element_selector, all=True): elements = self._find_element("css selector", element_selector, all) return elements @@ -391,21 +359,17 @@ class UserPrompt: def __init__(self, session): self.session = session - @command def dismiss(self): self.session.send_session_command("POST", "alert/dismiss") - @command def accept(self): self.session.send_session_command("POST", "alert/accept") @property - @command def text(self): return self.session.send_session_command("GET", "alert/text") @text.setter - @command def text(self, value): body = {"text": value} self.session.send_session_command("POST", "alert/text", body=body) @@ -591,41 +555,33 @@ class Session: return self.send_command(method, url, body, timeout) @property - @command def url(self): return self.send_session_command("GET", "url") @url.setter - @command def url(self, url): if urlparse.urlsplit(url).netloc is None: return self.url(url) body = {"url": url} return self.send_session_command("POST", "url", body) - @command def back(self): return self.send_session_command("POST", "back") - @command def forward(self): return self.send_session_command("POST", "forward") - @command def refresh(self): return self.send_session_command("POST", "refresh") @property - @command def title(self): return self.send_session_command("GET", "title") @property - @command def source(self): return self.send_session_command("GET", "source") - @command def new_window(self, type_hint="tab"): body = {"type": type_hint} value = self.send_session_command("POST", "window/new", body) @@ -633,12 +589,10 @@ class Session: return value["handle"] @property - @command def window_handle(self): return self.send_session_command("GET", "window") @window_handle.setter - @command def window_handle(self, handle): body = {"handle": handle} return self.send_session_command("POST", "window", body=body) @@ -654,16 +608,13 @@ class Session: return self.send_session_command("POST", url, body) @property - @command def handles(self): return self.send_session_command("GET", "window/handles") @property - @command def active_element(self): return self.send_session_command("GET", "element/active") - @command def cookies(self, name=None): if name is None: url = "cookie" @@ -673,7 +624,6 @@ class Session: raise TypeError("cookie name must be a str or None") return self.send_session_command("GET", url, {}) - @command def set_cookie(self, name, value, path=None, domain=None, secure=None, expiry=None, http_only=None): body = { @@ -704,7 +654,6 @@ class Session: #[...] - @command def execute_script(self, script, args=None): if args is None: args = [] @@ -715,7 +664,6 @@ class Session: } return self.send_session_command("POST", "execute/sync", body) - @command def execute_async_script(self, script, args=None): if args is None: args = [] @@ -728,11 +676,9 @@ class Session: #[...] - @command def screenshot(self): return self.send_session_command("GET", "screenshot") - @command def print(self, background=None, margin=None, @@ -785,13 +731,11 @@ class ShadowRoot: url = f"shadow/{self.id}/{uri}" return self.session.send_session_command(method, url, body) - @command def find_element(self, strategy, selector): body = {"using": strategy, "value": selector} return self.send_shadow_command("POST", "element", body) - @command def find_elements(self, strategy, selector): body = {"using": strategy, "value": selector} @@ -839,39 +783,31 @@ class WebElement: url = "element/%s/%s" % (self.id, uri) return self.session.send_session_command(method, url, body) - @command def find_element(self, strategy, selector): body = {"using": strategy, "value": selector} return self.send_element_command("POST", "element", body) - @command def click(self): self.send_element_command("POST", "click", {}) - @command def tap(self): self.send_element_command("POST", "tap", {}) - @command def clear(self): self.send_element_command("POST", "clear", {}) - @command def send_keys(self, text): return self.send_element_command("POST", "value", {"text": text}) @property - @command def text(self): return self.send_element_command("GET", "text") @property - @command def name(self): return self.send_element_command("GET", "name") - @command def style(self, property_name): if not isinstance(property_name, str): raise TypeError("property_name must be a str") @@ -879,42 +815,34 @@ class WebElement: return self.send_element_command("GET", "css/%s" % property_name) @property - @command def rect(self): return self.send_element_command("GET", "rect") @property - @command def selected(self): return self.send_element_command("GET", "selected") - @command def screenshot(self): return self.send_element_command("GET", "screenshot") @property - @command def shadow_root(self): return self.send_element_command("GET", "shadow") - @command def attribute(self, name): if not isinstance(name, str): raise TypeError("name must be a str") return self.send_element_command("GET", "attribute/%s" % name) - @command def get_computed_label(self): return self.send_element_command("GET", "computedlabel") - @command def get_computed_role(self): return self.send_element_command("GET", "computedrole") # This MUST come last because otherwise @property decorators above # will be overridden by this. - @command def property(self, name): if not isinstance(name, str): raise TypeError("name must be a str") diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py index f8629878213..e5635c361cc 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py @@ -256,6 +256,7 @@ def update_properties(): return ([ "os", "debug", + "display", "fission", "processor", "swgl", diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py index 76d703e7829..4efe1660eb4 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py @@ -767,15 +767,16 @@ class CallbackHandler: def process_action(self, url, payload): action = payload["action"] cmd_id = payload["id"] + params = payload["params"] self.logger.debug(f"Got action: {action}") try: action_handler = self.actions[action] except KeyError as e: raise ValueError(f"Unknown action {action}") from e try: - with ActionContext(self.logger, self.protocol, payload.get("context")): + with ActionContext(self.logger, self.protocol, params.get("context")): try: - result = action_handler(payload) + result = action_handler(params) except AttributeError as e: # If we fail to get an attribute from the protocol presumably that's a # ProtocolPart we don't implement @@ -839,8 +840,9 @@ class AsyncCallbackHandler(CallbackHandler): """ async_action_handler = self.async_actions[action] cmd_id = payload["id"] + params = payload["params"] try: - result = await async_action_handler(payload) + result = await async_action_handler(params) except AttributeError as e: # If we fail to get an attribute from the protocol presumably that's a # ProtocolPart we don't implement diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js index 3c2dd8b42dd..2a5bb3937fd 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -160,7 +160,7 @@ let cmd_id; const action_msg = {type: "action", action: name, - ...params}; + params}; if (is_test_context()) { cmd_id = window.__wptrunner_message_queue.push(action_msg); } else { diff --git a/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml b/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml new file mode 100644 index 00000000000..f8ce7fee89d --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml @@ -0,0 +1,35 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"/> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"/> +</head> +<body> + <!--- See script-enforcement-001.html an explanation of this test. + The HTML parser won't create a child element for the span child of + scriptForOuterHTMLTest below, so we instead rely on the XHTML parser. --> +<div> + <script id="scriptForOuterHTMLTest" type="unknown"><span></span></script> +</div> +<div id="container"></div> +<script> + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").outerHTML = LOG_RUN_MESSAGE; + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.getElementById("scriptForOuterHTMLTest"); + script.remove(); + script.removeAttribute("type"); + script.firstElementChild.outerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE); + document.getElementById("container").appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-001.html b/tests/wpt/tests/trusted-types/script-enforcement-001.html new file mode 100644 index 00000000000..9548987a22d --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-001.html @@ -0,0 +1,327 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"> +<!-- This test modifies the source of a new (initially disconnected) + HTMLScriptElement by various DOM APIs and verifies whether it will + remain trustworthy. This can be done by checking whether the script + is actually executed after insertion, because this page enforces + Trusted Types without defining any default policy. --> +<div id="container"></div> +<script> + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "The HTMLScriptElement is initially trusted."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").innerText = LOG_RUN_MESSAGE; + }), "TrustedScript required."); + let message = await script_message_for(_ => { + let script = document.createElement("script"); + script.innerText = passthroughpolicy.createScript(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Script source set via TrustedScript sink HTMLScriptElement.innerText keeps trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").textContent = LOG_RUN_MESSAGE; + }), "TrustedScript required."); + let message = await script_message_for(_ => { + let script = document.createElement("script"); + script.textContent = passthroughpolicy.createScript(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Script source set via TrustedScript sink HTMLScriptElement.textContent keeps trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").text = LOG_RUN_MESSAGE; + }), "TrustedScript required."); + let message = await script_message_for(_ => { + let script = document.createElement("script"); + script.text = passthroughpolicy.createScript(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Script source set via TrustedScript sink HTMLScriptElement.text keeps trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").innerHTML = LOG_RUN_MESSAGE; + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.createElement("script"); + script.innerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").setHTMLUnsafe(LOG_RUN_MESSAGE); + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.createElement("script"); + script.setHTMLUnsafe(passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness."); + + if (HTMLScriptElement.prototype.setHTML) { + promise_test(async t => { + // https://wicg.github.io/sanitizer-api/#set-and-filter-html + let script = document.createElement("script"); + script.setHTML(LOG_RUN_MESSAGE); + assert_equals(script.text, ""); + }, "Script source cannot be set via Element.setHTML()."); + } + + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Splitting script source via Text.splitText() keeps trustworthiness."); + + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + script.normalize(); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Normalizing script source via Element.normalize() keeps trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.nodeValue = LOG_RUN_MESSAGE; + container.appendChild(script); + }); + }, "Script source set via Node.nodeValue drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.data = LOG_RUN_MESSAGE; + container.appendChild(script); + }); + }, "Setting script source via CharacterData.data drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.appendData(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.appendData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.insertData(0, LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.insertData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.replaceData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`); + script.firstChild.deleteData(0, 2); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.deleteData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.before(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.before() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.after(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.after() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + script.firstChild.remove(); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.remove() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.replaceWith() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.appendChild(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Node.appendChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.insertBefore() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.replaceChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + script.removeChild(script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.removeChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.prepend(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.prepend() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.append(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.append() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.replaceChildren() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Element.moveBefore() drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE); + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.insertAdjacentHTML("afterbegin", passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.insertAdjacentHTML("beforeend", passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE); + container.appendChild(script); + }); + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via Node.insertAdjacentText() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`;`); + let range = new Range(); + range.selectNode(script.firstChild); + range.insertNode(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Range.insertNode() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(2); + let range = new Range(); + range.setStart(script.firstChild, 0); + range.setEnd(script.lastChild, 3); + range.deleteContents(); + container.appendChild(script); + }); + }, "Setting script source via Range.deleteContents() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + let clone = script.cloneNode(true); + container.appendChild(clone); + }); + }, "Cloning a script via Node.cloneNode() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let div = document.createElement("div"); + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + div.appendChild(script); + let range = new Range(); + range.selectNode(script); + let documentFragment = range.cloneContents(); + container.appendChild(documentFragment.firstElementChild); + }); + }, "Cloning a script via Range.cloneContents() drops trustworthiness."); +</script> +</body> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml b/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml new file mode 100644 index 00000000000..79bb64852ce --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml @@ -0,0 +1,48 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"/> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"/> +</head> +<body> + <!--- See script-enforcement-002.html an explanation of this test. + The HTML parser won't create a child element for the span child of + scriptForOuterHTMLTest below, so we instead rely on the XHTML parser. --> +<div> + <script id="scriptForOuterHTMLTest" type="unknown"><span></span></script> +</div> +<div id="container"></div> +<script> + trustedTypes.createPolicy("default", { + createHTML: (value, _, sink) => { + window.log_message("CREATE_HTML"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_HTML"); + }, + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_SCRIPT"); + }, + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.getElementById("scriptForOuterHTMLTest"); + script.remove(); + script.removeAttribute("type"); + window.log_message("SET"); + script.firstElementChild.outerHTML = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + document.getElementById("container").appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element outerHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.outerHTML."); +</script> +</body> +</html> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-002.html b/tests/wpt/tests/trusted-types/script-enforcement-002.html new file mode 100644 index 00000000000..ddbbc99ea6b --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-002.html @@ -0,0 +1,398 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"> +<!-- This test is similar to script-enforcement-001 but it defines a + default policy, so we can track precisely when its callbacks + are called, the sink names used as well as their effect on + the original script's source. --> +<div id="container"></div> +<script> + trustedTypes.createPolicy("default", { + createHTML: (value, _, sink) => { + window.log_message("CREATE_HTML"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_HTML"); + }, + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_SCRIPT"); + }, + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElement("script"); + window.log_message("SET"); + script.innerText = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement innerText", "APPEND", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via HTMLScriptElement.innerText."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElement("script"); + window.log_message("SET"); + script.textContent = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement textContent", "APPEND", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via HTMLScriptElement.textContent."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElement("script"); + window.log_message("SET"); + script.text = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement text", "APPEND", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via HTMLScriptElement.text."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElement("script"); + window.log_message("SET"); + script.innerHTML = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element innerHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.innerHTML."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElement("script"); + window.log_message("SET"); + script.setHTMLUnsafe(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element setHTMLUnsafe", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.setHTMLUnsafe()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + window.log_message("SET"); + script.firstChild.splitText(3); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "RUN"]); + }, "Default policy when splitting script source via Text.splitText()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.normalize(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "RUN"]); + }, "Default policy when normalizing script source via Element.normalize()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.nodeValue = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.nodeValue."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.data = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.data."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.appendData(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.appendData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.insertData(0, LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.insertData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.replaceData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`); + window.log_message("SET"); + script.firstChild.deleteData(0, 2); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.deleteData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.before(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.before()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.after(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.after()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.firstChild.remove(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.remove()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.replaceWith()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.appendChild(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.appendChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.insertBefore()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.replaceChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.removeChild(script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.removeChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.prepend(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.prepend()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.append(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.append()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.replaceChildren()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.moveBefore()."); + + promise_test(async t => { + let messages1 = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages1, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + let messages2 = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages2, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.insertAdjacentText()."); + + promise_test(async t => { + let messages1 = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages1, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + let messages2 = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentHTML("beforeend", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages2, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Node.insertAdjacentHTML()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`;`); + let range = new Range(); + range.selectNode(script.firstChild); + window.log_message("SET"); + range.insertNode(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting source via Range.insertNode()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(2); + let range = new Range(); + range.setStart(script.firstChild, 0); + range.setEnd(script.lastChild, 3); + window.log_message("SET"); + range.deleteContents(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Range.deleteContents()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + window.log_message("CLONE"); + let clone = script.cloneNode(true); + window.log_message("APPEND"); + container.appendChild(clone); + }); + assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when cloning a script via Node.cloneNode()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let div = document.createElement("div"); + let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + div.appendChild(script); + let range = new Range(); + range.selectNode(script); + window.log_message("CLONE"); + let documentFragment = range.cloneContents(); + window.log_message("APPEND"); + container.appendChild(documentFragment.firstElementChild); + }); + assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when cloning a script via Range.cloneContents()."); +</script> +</body> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-003.html b/tests/wpt/tests/trusted-types/script-enforcement-003.html new file mode 100644 index 00000000000..9ad31b795bc --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-003.html @@ -0,0 +1,354 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://github.com/w3c/trusted-types/issues/512"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"> +<!-- This test is similar to script-enforcement-001 but for the + SVGScriptElement, which has slightly different behavior: + - No equivalent to HTMLElement.innerText. + - No equivalent to HTMLScriptElement.text. + - innerHTML and textContent are not Trusted sinks. + - The HTML parser can insert elements inside the <script> tag. + --> +<svg> + <!-- Provide some static SVGScriptElements for use by + document.createElementNS(NSURI_SVG, "script"). See explanation in script-messages.js. --> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">//;;;window.log_message("RUN")</script> + <script type="unknown">//;;;window.log_message("RUN")</script> + <script type="unknown">//window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")/////</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN");;;</script> + <script type="unknown">window.log_message("RUN");;;</script> + <script type="unknown">window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN")</script> +</svg> +<svg> + <script id="scriptForOuterHTMLTest" type="unknown"><g></g></script> +</svg> +<svg id="container"></svg> +<script> + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "The SVGScriptElement is initially trusted."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + script.textContent = passthroughpolicy.createScript(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Script source set via Element.textContent drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElementNS(NSURI_SVG, "script").innerHTML = LOG_RUN_MESSAGE; + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + script.innerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElement("script").outerHTML = LOG_RUN_MESSAGE; + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.getElementById("scriptForOuterHTMLTest"); + script.remove(); + script.removeAttribute("type"); + script.firstElementChild.outerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElementNS(NSURI_SVG, "script").setHTMLUnsafe(LOG_RUN_MESSAGE); + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + script.setHTMLUnsafe(passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness."); + + if (SVGScriptElement.prototype.setHTML) { + promise_test(async t => { + // https://wicg.github.io/sanitizer-api/#set-and-filter-html + let script = document.createElementNS(NSURI_SVG, "script"); + script.setHTML(LOG_RUN_MESSAGE); + assert_equals(script.textContent, ""); + }, "Script source cannot be set via Element.setHTML()."); + } + + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Splitting script source via Text.splitText() keeps trustworthiness."); + + promise_test(async t => { + let message = await script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + script.normalize(); + container.appendChild(script); + }); + assert_equals(message, "RUN"); + }, "Normalizing script source via Element.normalize() keeps trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.nodeValue = LOG_RUN_MESSAGE; + container.appendChild(script); + }); + }, "Script source set via Node.nodeValue drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.data = LOG_RUN_MESSAGE; + container.appendChild(script); + }); + }, "Setting script source via CharacterData.data drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.appendData(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.appendData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.insertData(0, LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.insertData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.replaceData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`); + script.firstChild.deleteData(0, 2); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.deleteData() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.before(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.before() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.after(LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.after() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + script.firstChild.remove(); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.remove() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via CharacterData.replaceWith() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.appendChild(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Node.appendChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.insertBefore() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.replaceChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + script.removeChild(script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via Node.removeChild() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.prepend(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.prepend() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.append(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.append() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Element.replaceChildren() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + container.appendChild(script); + }); + }, "Setting script source via ElementmoveBefore() drops trustworthiness."); + + promise_test(async t => { + await promise_rejects_js(t, TypeError, script_messages_for(_ => { + document.createElementNS(NSURI_SVG, "script").insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE); + }), "TrustedHTML required."); + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.insertAdjacentHTML("afterbegin", passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.insertAdjacentHTML("beforeend", passthroughpolicy.createHTML(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE); + container.appendChild(script); + }); + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE); + container.appendChild(script); + }); + }, "Setting script source via Node.insertAdjacentText() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_html_script_with_trusted_source_text(`;`); + let range = new Range(); + range.selectNode(script.firstChild); + range.insertNode(document.createTextNode(LOG_RUN_MESSAGE)); + container.appendChild(script); + }); + }, "Setting script source via Range.insertNode() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(2); + let range = new Range(); + range.setStart(script.firstChild, 0); + range.setEnd(script.lastChild, 3); + range.deleteContents(); + container.appendChild(script); + }); + }, "Setting script source via Range.deleteContents() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + let clone = script.cloneNode(true); + container.appendChild(clone); + }); + }, "Cloning a script via Node.cloneNode() drops trustworthiness."); + + promise_test(async t => { + await no_script_message_for(_ => { + let div = document.createElement("div"); + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + div.appendChild(script); + let range = new Range(); + range.selectNode(script); + let documentFragment = range.cloneContents(); + container.appendChild(documentFragment.firstElementChild); + }); + }, "Cloning a script via Range.cloneContents() drops trustworthiness."); +</script> +</body> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-004.html b/tests/wpt/tests/trusted-types/script-enforcement-004.html new file mode 100644 index 00000000000..86e1020c3ad --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-004.html @@ -0,0 +1,432 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"> +<!-- This test is similar to script-enforcement-002 but for the + SVGScriptElement, which has slightly different behavior: + - No equivalent to HTMLElement.innerText. + - No equivalent to HTMLScriptElement.text. + - innerHTML and textContent are not Trusted sinks. + - The HTML parser can insert elements inside the <script> tag. + - Sink name uses "SVGScriptElement". + --> +<svg> + <!-- Provide some static SVGScriptElements for use by + document.createElementNS(NSURI_SVG, "script"). See explanation in script-messages.js. --> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">;</script> + <script type="unknown">//;;;window.log_message("RUN")</script> + <script type="unknown">//;;;window.log_message("RUN")</script> + <script type="unknown">//window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")/////</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">;;;window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN");;;</script> + <script type="unknown">window.log_message("RUN");;;</script> + <script type="unknown">window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN")</script> + <script type="unknown">window.log_message("RUN")</script> +</svg> +<svg> + <script id="scriptForOuterHTMLTest" type="unknown"><g></g></script> +</svg> +<svg id="container"></svg> +<script> + trustedTypes.createPolicy("default", { + createHTML: (value, _, sink) => { + window.log_message("CREATE_HTML"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_HTML"); + }, + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return value.replace("RUN", "RUN_TRUSTED_SCRIPT"); + }, + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + window.log_message("SET"); + script.textContent = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via SVGScriptElement.textContent."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + window.log_message("SET"); + script.innerHTML = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element innerHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.innerHTML."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.getElementById("scriptForOuterHTMLTest"); + script.remove(); + script.removeAttribute("type"); + window.log_message("SET"); + script.firstElementChild.outerHTML = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element outerHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.outerHTML."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + window.log_message("SET"); + script.setHTMLUnsafe(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "CREATE_HTML", "Element setHTMLUnsafe", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Element.setHTMLUnsafe()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + window.log_message("SET"); + script.firstChild.splitText(3); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "RUN"]); + }, "Default policy when splitting script source via Text.splitText()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.normalize(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "RUN"]); + }, "Default policy when normalizing script source via Element.normalize()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.nodeValue = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.nodeValue."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.data = LOG_RUN_MESSAGE; + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.data."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.appendData(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.appendData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.insertData(0, LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.insertData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.replaceData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`); + window.log_message("SET"); + script.firstChild.deleteData(0, 2); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.deleteData()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.before(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.before()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.after(LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.after()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.firstChild.remove(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.remove()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via CharacterData.replaceWith()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.appendChild(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.appendChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.insertBefore()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.replaceChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(3); + window.log_message("SET"); + script.removeChild(script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.removeChild()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.prepend(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.prepend()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.append(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.append()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.replaceChildren()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Element.moveBefore()."); + + promise_test(async t => { + let messages1 = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages1, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + let messages2 = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages2, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Node.insertAdjacentText()."); + + promise_test(async t => { + let messages1 = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages1, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + let messages2 = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(";"); + window.log_message("SET"); + script.insertAdjacentHTML("beforeend", LOG_RUN_MESSAGE); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages2, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]); + }, "Default policy's calls when setting script source via Node.insertAdjacentHTML()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_trusted_source_text(`;`); + let range = new Range(); + range.selectNode(script.firstChild); + window.log_message("SET"); + range.insertNode(document.createTextNode(LOG_RUN_MESSAGE)); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting source via Range.insertNode()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`); + script.firstChild.splitText(2); + let range = new Range(); + range.setStart(script.firstChild, 0); + range.setEnd(script.lastChild, 3); + window.log_message("SET"); + range.deleteContents(); + window.log_message("APPEND"); + container.appendChild(script); + }); + assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when setting script source via Range.deleteContents()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + window.log_message("CLONE"); + let clone = script.cloneNode(true); + window.log_message("APPEND"); + container.appendChild(clone); + }); + assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when cloning a script via Node.cloneNode()."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let div = document.createElement("div"); + let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`); + div.appendChild(script); + let range = new Range(); + range.selectNode(script); + window.log_message("CLONE"); + let documentFragment = range.cloneContents(); + window.log_message("APPEND"); + container.appendChild(documentFragment.firstElementChild); + }); + assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]); + }, "Default policy's calls when cloning a script via Range.cloneContents()."); +</script> +</body> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-005.html b/tests/wpt/tests/trusted-types/script-enforcement-005.html new file mode 100644 index 00000000000..77b1e6b03c6 --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-005.html @@ -0,0 +1,78 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"> +<!-- This test covers the following step from the "prepare the script element" + algorithm, verifying that "source text" is the one after application of + the default policy: "If el has no src attribute, and source text is the + empty string, then return." --> +<div id="htmlContainer"> + <script id="scriptToCreateNonEmptyHTMLScript" type="unknown">;</script> +</div> +<svg id="svgContainer"> + <script id="scriptToCreateNonEmptySVGScript" type="unknown">;</script> +</svg> +<script> + // Define a default policy that transforms empty script string to some source + // logging a RUN message and other script strings to empty. + trustedTypes.createPolicy("default", { + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return value.length ? "" : LOG_RUN_MESSAGE; + } + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + // Current version of the specification requires the script text to change + // in order to force a call to the default policy callback with sink + // "HTMLScriptElement text". If the following PR is accepted, this could + // be simplified to create_html_script_with_untrusted_source_text(""). + // https://github.com/w3c/trusted-types/pull/579 + let script = document.getElementById("scriptToCreateNonEmptyHTMLScript"); + script.remove(); + script.removeAttribute("type"); + script.firstChild.remove(); + htmlContainer.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "RUN"]); + }, "Empty HTMLScriptElement is executed if the default policy makes it non-empty."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_untrusted_source_text(LOG_RUN_MESSAGE); + htmlContainer.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text"]); + + }, "Non-empty HTMLScriptElement is not executed if the default policy makes it empty."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + // Note: Using create_html_script_with_untrusted_source_text("") may not + // guarantee the script to be untrusted for implementations using a + // script-based enforcement mechanism. So make sure we do modify the text. + let script = document.getElementById("scriptToCreateNonEmptySVGScript"); + script.remove(); + script.removeAttribute("type"); + script.firstChild.remove(); + svgContainer.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "RUN"]); + }, "Empty SVGScriptElement is executed if the default policy makes it non-empty."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_untrusted_source_text(LOG_RUN_MESSAGE); + svgContainer.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text"]); + + }, "Non-empty SVGScriptElement is not executed if the default policy makes it empty."); +</script> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-006.html b/tests/wpt/tests/trusted-types/script-enforcement-006.html new file mode 100644 index 00000000000..7673a686f4e --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-006.html @@ -0,0 +1,72 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"> +<!-- This test covers the following step from the "prepare the script element" + algorithm, verifying that "source text" is the one after application of + the default policy: "If el does not have a src content attribute: ... + Switch on el's type:" --> +<div id="container"></div> +<script> + const logMessageModulePath = "./support/logMessage-module.sub.js"; + + // Define a default policy that transforms the script's type to some valid + // source content. + trustedTypes.createPolicy("default", { + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + switch (value) { + case "classic": + return `window.log_message('CLASSIC');`; + case "module": + return `window.log_message('MODULE');`; + case "importmap": + return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`; + } + } + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_untrusted_source_text("classic"); + script.setAttribute("type", "application/ecmascript"); + // Appending the script will log "CLASSIC". + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "CLASSIC"]); + }, "Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy."); + + // Firefox disallows import map after a module load, so place this promise + // test before the module test. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4 + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_html_script_with_untrusted_source_text("importmap"); + script.setAttribute("type", "importmap"); + + // Appending the script sets up an import map for logMessageModulePath. + container.appendChild(script); + + // Importing logMessageModulePath will log message "IMPORTMAP" + await import(`${logMessageModulePath}?message=UNMAPPED`); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "IMPORTMAP"]); + }, "Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy."); + + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_html_script_with_untrusted_source_text("module"); + script.setAttribute("type", "module"); + + // Appending the script will log message "MODULE" + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "MODULE"]); + }, "Untrusted HTMLScriptElement of module type uses the source text returned by the default policy."); +</script> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-007.html b/tests/wpt/tests/trusted-types/script-enforcement-007.html new file mode 100644 index 00000000000..34d3831ab74 --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-007.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"> +<!-- This is the same test as script-enforcement-006 but for SVGScriptElement. --> +<svg id="container"></svg> +<script> + const logMessageModulePath = "./support/logMessage-module.sub.js"; + + // Define a default policy that transforms the script's type to some valid + // source content. + trustedTypes.createPolicy("default", { + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + switch (value) { + case "classic": + return `window.log_message('CLASSIC');`; + case "module": + return `window.log_message('MODULE');`; + case "importmap": + return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`; + } + } + }); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_untrusted_source_text("classic"); + script.setAttribute("type", "application/ecmascript"); + // Appending the script will log "CLASSIC". + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "CLASSIC"]); + }, "Untrusted SVGScriptElement with classic type uses the source text returned by the default policy."); + + // Firefox disallows import map after a module load, so place this promise + // test before the module test. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4 + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_svg_script_with_untrusted_source_text("importmap"); + script.setAttribute("type", "importmap"); + + // Appending the script sets up an import map for logMessageModulePath. + container.appendChild(script); + + // Importing logMessageModulePath will log message "IMPORTMAP". + await import(`${logMessageModulePath}?message=UNMAPPED`); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "IMPORTMAP"]); + }, "Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy."); + + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_svg_script_with_untrusted_source_text("module"); + script.setAttribute("type", "module"); + + // Appending the script will log message "MODULE". + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "MODULE"]); + }, "Untrusted SVGScriptElement of module type uses the source text returned by the default policy."); +</script> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-008.https.html b/tests/wpt/tests/trusted-types/script-enforcement-008.https.html new file mode 100644 index 00000000000..86d9ec6985a --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-008.https.html @@ -0,0 +1,87 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element"> +<link rel="help" href="https://w3c.github.io/webappsec-csp/#should-block-inline"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"> +<meta id="metaTagForScriptSrc" http-equiv="Content-Security-Policy" content="script-src 'nonce-script-messages' 'nonce-self' 'sha256-IpCtvKVFQbqDBhwCvQEsZoqgVXvAd6T2uRWd/Pz7FuI=' 'sha256-xanaWuoRdfLzI0+K8zpwr8eHi4RK2P6GglgCFXv0r00=' 'sha256-BPWjrQT1GMyyQ+6Fmycn7pSqh8L945ToMJ/nfGClLBc='"> +<!-- This test covers the following step from the "prepare the script element" + algorithm, verifying that "source text" is the one after application of + the default policy: "If el does not have a src content attribute, and the + Should element's inline behavior be blocked by Content Security Policy? + algorithm returns "Blocked" when given el, "script", and source text, then + return." --> +<div id="container"></div> +<script nonce="self"> + const logMessageModulePath = "./support/logMessage-module.sub.js"; + + // Define a default policy that transforms the script's type to some valid + // source content. + function scriptTypeToValue(value) { + switch (value) { + case "classic": + return `window.log_message('CLASSIC');`; + case "module": + return `window.log_message('MODULE');`; + case "importmap": + return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`; + } + } + trustedTypes.createPolicy("default", { + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return scriptTypeToValue(value); + } + }); + + promise_test(async t => { + let classicHash = await base64_hash_for_inline_script(scriptTypeToValue("classic"), "SHA-256"); + let moduleHash = await base64_hash_for_inline_script(scriptTypeToValue("module"), "SHA-256"); + let importmapHash = await base64_hash_for_inline_script(scriptTypeToValue("importmap"), "SHA-256"); + let metaTagContent = document.getElementById("metaTagForScriptSrc").getAttribute("content"); + assert_equals(metaTagContent, `script-src 'nonce-script-messages' 'nonce-self' 'sha256-${classicHash}' 'sha256-${moduleHash}' 'sha256-${importmapHash}'`); + }, "script-src CSP directive is properly set."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_html_script_with_untrusted_source_text("classic"); + script.setAttribute("type", "application/ecmascript"); + // Appending the script will log "CLASSIC". + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "CLASSIC"]); + }, "Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy for inline CSP check."); + + // Firefox disallows import map after a module load, so place this promise + // test before the module test. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4 + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_html_script_with_untrusted_source_text("importmap"); + script.setAttribute("type", "importmap"); + + // Appending the script sets up an import map for logMessageModulePath. + container.appendChild(script); + + // Importing logMessageModulePath will log message "IMPORTMAP" + await import(`${logMessageModulePath}?message=UNMAPPED`); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "IMPORTMAP"]); + }, "Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy for inline CSP check."); + + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_html_script_with_untrusted_source_text("module"); + script.setAttribute("type", "module"); + + // Appending the script will log message "MODULE" + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "MODULE"]); + }, "Untrusted HTMLScriptElement of module type uses the source text returned by the default policy for inline CSP check."); +</script> diff --git a/tests/wpt/tests/trusted-types/script-enforcement-009.https.html b/tests/wpt/tests/trusted-types/script-enforcement-009.https.html new file mode 100644 index 00000000000..45f21b41eda --- /dev/null +++ b/tests/wpt/tests/trusted-types/script-enforcement-009.https.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/passthroughpolicy.js"></script> +<script src="support/script-messages.js"></script> +<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"> +<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element"> +<link rel="help" href="https://w3c.github.io/webappsec-csp/#should-block-inline"> +<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'"> +<meta id="metaTagForScriptSrc" http-equiv="Content-Security-Policy" content="script-src 'nonce-script-messages' 'nonce-self' 'sha256-IpCtvKVFQbqDBhwCvQEsZoqgVXvAd6T2uRWd/Pz7FuI=' 'sha256-xanaWuoRdfLzI0+K8zpwr8eHi4RK2P6GglgCFXv0r00=' 'sha256-BPWjrQT1GMyyQ+6Fmycn7pSqh8L945ToMJ/nfGClLBc='"> +<!-- This is the same test as script-enforcement-008 but for SVGScriptElement. --> +<svg id="container"></svg> +<script nonce="self"> + const logMessageModulePath = "./support/logMessage-module.sub.js"; + + // Define a default policy that transforms the script's type to some valid + // source content. + function scriptTypeToValue(value) { + switch (value) { + case "classic": + return `window.log_message('CLASSIC');`; + case "module": + return `window.log_message('MODULE');`; + case "importmap": + return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`; + } + } + trustedTypes.createPolicy("default", { + createScript: (value, _, sink) => { + window.log_message("CREATE_SCRIPT"); + window.log_message(sink); + return scriptTypeToValue(value); + } + }); + + promise_test(async t => { + let classicHash = await base64_hash_for_inline_script(scriptTypeToValue("classic"), "SHA-256"); + let moduleHash = await base64_hash_for_inline_script(scriptTypeToValue("module"), "SHA-256"); + let importmapHash = await base64_hash_for_inline_script(scriptTypeToValue("importmap"), "SHA-256"); + let metaTagContent = document.getElementById("metaTagForScriptSrc").getAttribute("content"); + assert_equals(metaTagContent, `script-src 'nonce-script-messages' 'nonce-self' 'sha256-${classicHash}' 'sha256-${moduleHash}' 'sha256-${importmapHash}'`); + }, "script-src CSP directive is properly set."); + + promise_test(async t => { + let messages = await script_messages_for(_ => { + let script = create_svg_script_with_untrusted_source_text("classic"); + script.setAttribute("type", "application/ecmascript"); + // Appending the script will log "CLASSIC". + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "CLASSIC"]); + }, "Untrusted SVGScriptElement with classic type uses the source text returned by the default policy for inline CSP check."); + + // Firefox disallows import map after a module load, so place this promise + // test before the module test. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4 + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_svg_script_with_untrusted_source_text("importmap"); + script.setAttribute("type", "importmap"); + + // Appending the script sets up an import map for logMessageModulePath. + container.appendChild(script); + + // Importing logMessageModulePath will log message "IMPORTMAP" + await import(`${logMessageModulePath}?message=UNMAPPED`); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "IMPORTMAP"]); + }, "Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy for inline CSP check."); + + promise_test(async t => { + let messages = await script_messages_for(async _ => { + let script = create_svg_script_with_untrusted_source_text("module"); + script.setAttribute("type", "module"); + + // Appending the script will log message "MODULE" + container.appendChild(script); + }); + assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "MODULE"]); + }, "Untrusted SVGScriptElement of module type uses the source text returned by the default policy for inline CSP check."); +</script> diff --git a/tests/wpt/tests/trusted-types/support/csp-violations.js b/tests/wpt/tests/trusted-types/support/csp-violations.js index 46c2ca1b30f..bc38da9e221 100644 --- a/tests/wpt/tests/trusted-types/support/csp-violations.js +++ b/tests/wpt/tests/trusted-types/support/csp-violations.js @@ -5,6 +5,8 @@ const cspDirectives = [ "trusted-types", // https://w3c.github.io/webappsec-csp/#script-src "script-src", + // https://w3c.github.io/webappsec-csp/#directive-script-src-elem + "script-src-elem", ]; // A generic helper that runs function fn and returns a promise resolving with diff --git a/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js b/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js new file mode 100644 index 00000000000..e886bd54b31 --- /dev/null +++ b/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js @@ -0,0 +1 @@ +window.log_message("{{GET[message]}}"); diff --git a/tests/wpt/tests/trusted-types/support/passthroughpolicy.js b/tests/wpt/tests/trusted-types/support/passthroughpolicy.js new file mode 100644 index 00000000000..efe3ea62c0d --- /dev/null +++ b/tests/wpt/tests/trusted-types/support/passthroughpolicy.js @@ -0,0 +1,7 @@ +'use strict' + +const passthroughpolicy = trustedTypes.createPolicy("passthroughpolicy", { + createHTML: s => s, + createScript: s => s, + createScriptURL: s => s, +}); diff --git a/tests/wpt/tests/trusted-types/support/script-messages.js b/tests/wpt/tests/trusted-types/support/script-messages.js new file mode 100644 index 00000000000..ad4138be25b --- /dev/null +++ b/tests/wpt/tests/trusted-types/support/script-messages.js @@ -0,0 +1,104 @@ +'use strict' + +const LOG_RUN_MESSAGE = `window.log_message("RUN")`; + +function create_html_script_with_trusted_source_text(source_text) { + let script = document.createElement("script"); + script.text = passthroughpolicy.createScript(source_text); + return script; +} + +function create_html_script_with_untrusted_source_text(source_text) { + let script = document.createElement("script"); + // Setting script source via Node.appendChild() drops trustworthiness. + script.appendChild(document.createTextNode(source_text)); + return script; +} + +function create_svg_script_with_trusted_source_text(source_text) { + // SVGScriptElement has no API to set its source while preserving its + // trustworthiness. For now, we just expect a <script type="unknown"> tag + // with the desired source to already be present in the page, so we can just + // reuse it. See https://github.com/w3c/trusted-types/issues/512 + let script = + Array.from(document.querySelectorAll("svg script[type='unknown']")). + find(script => script.textContent === source_text); + assert_true(!!script, `<script type="unknown">${source_text}</script> not found!`); + script.remove(); + script.removeAttribute("type"); + return script; +} + +function create_svg_script_with_untrusted_source_text(source_text) { + let script = document.createElementNS(NSURI_SVG, "script") + // Setting script source via Node.appendChild() drops trustworthiness. + script.appendChild(document.createTextNode(source_text)); + return script; +} + +// A generic helper that runs function fn and returns a promise resolving with +// an array of received messages. A script forcing a "done" message is appended +// after calling fn, to make sure that all the messages reported by fn have been +// delivered. +function script_messages_for(fn) { + return new Promise(async (resolve, reject) => { + // Listen for messages. + let messages = []; + let exception = null; + window.log_message = message => { + if (message === "DONE") { + window.log_message = null; + if (exception) { + reject(exception); + } else { + resolve(messages); + } + } else { + messages.push(message); + } + }; + + // Execute the function. + try { + await fn(); + } catch(e) { + exception = e; + } + + // Indicate the last message. + // This is done by appending an inline script to make sure it is executed + // after processing any previously inserted inline script. Additionally, we + // delay by a double requestAnimationFrame to work around incompatible + // interop bugs: + // - WebKit/Chromium seems to give lower priority to module, so it looks + // like the appended script should have type="module" here to work with + // tests for inline modules. + // - but Firefox does not allow type="importmaps" after a type="module" so + // making the appended script a module would make importmap tests fail... + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4 + requestAnimationFrame(_ => requestAnimationFrame(_ => { + let script = create_html_script_with_trusted_source_text(`window.log_message("DONE")`); + script.setAttribute("nonce", "script-messages"); + document.body.appendChild(script); + })); + }); +} + +async function script_message_for(fn) { + let messages = await script_messages_for(fn); + assert_equals(messages.length, 1, `Number of messages (${messages})`); + return messages[0]; +} + +async function no_script_message_for(fn) { + let messages = await script_messages_for(fn); + assert_equals(messages.length, 0, `Number of messages (${messages})`); +} + +async function base64_hash_for_inline_script(source_text, algorithm) { + const encoder = new TextEncoder(); + const data = encoder.encode(source_text); + const hashBuffer = await window.crypto.subtle.digest(algorithm, data); + const base64Array = (new Uint8Array(hashBuffer)).toBase64(); + return base64Array.toString(); +} diff --git a/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html new file mode 100644 index 00000000000..c006bc2315f --- /dev/null +++ b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/csp-violations.js"></script> +<meta http-equiv="Content-Security-Policy" + content="require-trusted-types-for 'script'; connect-src 'none';"> +<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-self'"> +<div id="container"></div> +<script nonce="self"> + const originalSource = `${';'.repeat(100)}`; + promise_test(async t => { + let violation = await trusted_type_violation_without_exception_for(_ => { + let script = document.createElement("script"); + script.setAttribute("nonce", "self"); + + // Node.appendChild() makes the script text untrusted. + script.appendChild(document.createTextNode(originalSource)); + document.body.appendChild(script); + }); + assert_equals(violation.blockedURI, "trusted-types-sink"); + assert_equals(violation.sample, `HTMLScriptElement text|${clipSampleIfNeeded(originalSource)}`); + }, `sink mismatch violation report when the script text is changed by manipulating its children.`); + + + promise_test(async t => { + const sourceAfterApplicationOfDefaultPolicy = `${';'.repeat(100)}`; + trustedTypes.createPolicy("default", { + createScript: value => sourceAfterApplicationOfDefaultPolicy, + }); + let violation = await trusted_type_violation_without_exception_for(async _ => { + let script = document.createElement("script"); + + // Node.appendChild() makes the script text untrusted. + script.appendChild(document.createTextNode(originalSource)); + document.body.appendChild(script); + }); + assert_equals(violation.effectiveDirective, "script-src-elem"); + assert_equals(violation.blockedURI, "inline"); + assert_equals(violation.sample, ""); + assert_equals(violation.originalPolicy, "script-src 'nonce-self'"); + }, `inline check violation report when the script text is changed by manipulating its children.`); +</script> diff --git a/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html new file mode 100644 index 00000000000..c187971f726 --- /dev/null +++ b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/namespaces.js"></script> +<script src="support/csp-violations.js"></script> +<meta http-equiv="Content-Security-Policy" + content="require-trusted-types-for 'script'; connect-src 'none';"> +<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-self'"> +<svg id="container"></svg> +<script nonce="self"> + const originalSource = `${';'.repeat(100)}`; + promise_test(async t => { + let violation = await trusted_type_violation_without_exception_for(_ => { + let script = document.createElementNS(NSURI_SVG, "script"); + script.setAttribute("nonce", "self"); + + // Node.appendChild() makes the script text untrusted. + script.appendChild(document.createTextNode(originalSource)); + document.body.appendChild(script); + }); + assert_equals(violation.blockedURI, "trusted-types-sink"); + assert_equals(violation.sample, `SVGScriptElement text|${clipSampleIfNeeded(originalSource)}`); + }, `sink mismatch violation report when the script text is changed by manipulating its children.`); + + promise_test(async t => { + const sourceAfterApplicationOfDefaultPolicy = `${';'.repeat(100)}`; + trustedTypes.createPolicy("default", { + createScript: value => sourceAfterApplicationOfDefaultPolicy, + }); + let violation = await trusted_type_violation_without_exception_for(async _ => { + let script = document.createElementNS(NSURI_SVG, "script"); + + // Node.appendChild() makes the script text untrusted. + script.appendChild(document.createTextNode(originalSource)); + document.body.appendChild(script); + }); + assert_equals(violation.effectiveDirective, "script-src-elem"); + assert_equals(violation.blockedURI, "inline"); + assert_equals(violation.sample, ""); + assert_equals(violation.originalPolicy, "script-src 'nonce-self'"); + }, `inline check violation report when the script text is changed by manipulating its children.`); +</script> diff --git a/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html b/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html index 1845c15d716..65fe639e958 100644 --- a/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html +++ b/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html @@ -32,10 +32,10 @@ let buttonFocused = false to.addEventListener("click", t.unreached_func("Button should not be clicked")) to.addEventListener("focus", () => buttonFocused = true) - endTest.addEventListener('click', () => { + endTest.addEventListener('click', t.step_func(() => { assert_true(buttonFocused, "Button should be focused") t.step_timeout(() => t.done(), 200) - }) + })) // execute test from.focus() diff --git a/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html b/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html index c64400e869d..d1c1c96f7b0 100644 --- a/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html +++ b/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html @@ -306,13 +306,6 @@ const tests = { ), }); }, - trigger: UsePropertyTest(animation => { - // Get the trigger property. - animation.trigger; - - // Set the trigger property. - animation.trigger = new AnimationTrigger(); - }) }; // Check that each enumerable property and the constructor follow the diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html index a2c4581c4e8..115e8aff1ac 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html @@ -1,71 +1,65 @@ <!DOCTYPE html> <html> - <head> - <title> - audiobuffer.html - </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/webaudio/resources/audit-util.js"></script> - <script src="/webaudio/resources/audit.js"></script> - </head> - <body> - <script id="layout-test-code"> - let sampleRate = 44100.0 - let lengthInSeconds = 2; - let numberOfChannels = 4; +<head> + <title>AudioBuffer API Test</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <script> + const sampleRate = 44100.0; + const lengthInSeconds = 2; + const numberOfChannels = 4; - let audit = Audit.createTaskRunner(); - - audit.define('Basic tests for AudioBuffer', function(task, should) { - let context = new AudioContext(); - let buffer = context.createBuffer( - numberOfChannels, sampleRate * lengthInSeconds, sampleRate); - - // Just for printing out a message describing what "buffer" is in the - // following tests. - should( - true, - 'buffer = context.createBuffer(' + numberOfChannels + ', ' + - (sampleRate * lengthInSeconds) + ', ' + sampleRate + ')') - .beTrue(); - - should(buffer.sampleRate, 'buffer.sampleRate').beEqualTo(sampleRate); - - should(buffer.length, 'buffer.length') - .beEqualTo(sampleRate * lengthInSeconds); - - should(buffer.duration, 'buffer.duration').beEqualTo(lengthInSeconds); + test(() => { + const buffer = new AudioBuffer({ + numberOfChannels, + length: sampleRate * lengthInSeconds, + sampleRate + }); - should(buffer.numberOfChannels, 'buffer.numberOfChannels') - .beEqualTo(numberOfChannels); + assert_true( + true, + `buffer = new AudioBuffer({numberOfChannels: ${numberOfChannels}, ` + + `length: ${sampleRate * lengthInSeconds}, ` + + `sampleRate: ${sampleRate}})`); - for (let index = 0; index < buffer.numberOfChannels; ++index) { - should( - buffer.getChannelData(index) instanceof window.Float32Array, - 'buffer.getChannelData(' + index + - ') instanceof window.Float32Array') - .beTrue(); - } + assert_equals(buffer.sampleRate, sampleRate, 'buffer.sampleRate'); + assert_equals( + buffer.length, sampleRate * lengthInSeconds, 'buffer.length'); + assert_equals(buffer.duration, lengthInSeconds, 'buffer.duration'); + assert_equals( + buffer.numberOfChannels, numberOfChannels, 'buffer.numberOfChannels'); - should( - function() { - buffer.getChannelData(buffer.numberOfChannels); - }, - 'buffer.getChannelData(' + buffer.numberOfChannels + ')') - .throw(DOMException, 'IndexSizeError'); + for (let i = 0; i < buffer.numberOfChannels; ++i) { + assert_true( + buffer.getChannelData(i) instanceof Float32Array, + `buffer.getChannelData(${i}) instanceof Float32Array`); + } - let buffer2 = context.createBuffer(1, 1000, 24576); - let expectedDuration = 1000 / 24576; + assert_throws_dom( + 'IndexSizeError', + () => buffer.getChannelData(buffer.numberOfChannels), + `buffer.getChannelData(${buffer.numberOfChannels}) throws`); - should( - buffer2.duration, 'context.createBuffer(1, 1000, 24576).duration') - .beEqualTo(expectedDuration); + // Non-standard values (1000 & 24576) to test edge-case duration behavior. + const testSampleRate = 24576; + const testLength = 1000; - task.done(); + const buffer2 = new AudioBuffer({ + numberOfChannels: 1, + length: testLength, + sampleRate: testSampleRate }); - audit.run(); - </script> - </body> + const expectedDuration = testLength / testSampleRate; + + assert_equals( + buffer2.duration, + expectedDuration, + 'new AudioBuffer({numberOfChannels: 1,\n' + + `length: ${testLength},sampleRate: ${testSampleRate}}).duration`); + }, 'AudioBuffer: creation and property validation'); + </script> +</body> </html> diff --git a/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py index 9af6cdd5232..01a2ce1d083 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py @@ -66,3 +66,107 @@ async def test_proxy_proxy_type_manual_socks_proxy_without_socks_version( "proxyType": "manual", "socksProxy": "127.0.0.1:1080" }) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_proxy_ftp_proxy_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "ftpProxy": value}) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_proxy_http_proxy_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "httpProxy": value}) + + +@pytest.mark.parametrize("value", [ + "http://foo", + "foo:-1", + "foo:65536", + "foo/test", + "foo#42", + "foo?foo=bar", + "2001:db8::1", +]) +async def test_params_proxy_http_proxy_invalid_value(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "httpProxy": value}) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_proxy_ssl_proxy_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "sslProxy": value}) + + +@pytest.mark.parametrize("value", [ + "https://foo", + "foo:-1", + "foo:65536", + "foo/test", + "foo#42", + "foo?foo=bar", + "2001:db8::1", +]) +async def test_params_proxy_ssl_proxy_invalid_value(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "sslProxy": value}) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_proxy_socks_proxy_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context( + proxy={"proxyType": "manual", "socksProxy": value, "socksVersion": 4} + ) + + +@pytest.mark.parametrize("value", [ + "https://foo", + "foo:-1", + "foo:65536", + "foo/test", + "foo#42", + "foo?foo=bar", + "2001:db8::1", +]) +async def test_params_proxy_socks_proxy_invalid_value(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "socksProxy": value}) + + +@pytest.mark.parametrize("value", ["foo", True, [], {}]) +async def test_params_socks_version_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context( + proxy={"proxyType": "manual", "socksProxy": "foo:1", "socksVersion": value} + ) + + +@pytest.mark.parametrize("value", [42, True, "foo", {}]) +async def test_params_no_proxy_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "noProxy": value}) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_no_proxy_element_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context(proxy={"proxyType": "manual", "noProxy": [value]}) + + +@pytest.mark.parametrize("value", [42, True, [], {}, None]) +async def test_params_autoconfig_url_invalid_type(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context( + proxy={"proxyType": "pac", "proxyAutoconfigUrl": value} + ) + + +@pytest.mark.parametrize("value", [42, True, [], {}]) +async def test_params_autoconfig_missing(create_user_context, value): + with pytest.raises(error.InvalidArgumentException): + await create_user_context( + proxy={"proxyType": "pac"} + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py index 45a65cacdf0..57680c5f630 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py @@ -143,6 +143,16 @@ async def test_iframe( await subscribe_events([FRAGMENT_NAVIGATED_EVENT]) + # Track all received browsingContext.fragmentNavigated events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener( + FRAGMENT_NAVIGATED_EVENT, on_event + ) + on_fragment_navigated = wait_for_event(FRAGMENT_NAVIGATED_EVENT) target_url = url(EMPTY_PAGE + '#bar') @@ -158,6 +168,10 @@ async def test_iframe( await wait_for_future_safe(on_fragment_navigated), ) + # Check that we only received one event for the iframe navigation. + assert len(events) == 1 + remove_listener() + @pytest.mark.parametrize( "hash_before, hash_after", diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py index 9fbb0f26c9e..6ad4bd22b32 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py @@ -4,7 +4,7 @@ from webdriver.bidi.modules.script import ContextTarget from webdriver.error import TimeoutException from tests.support.sync import AsyncPoll -from ... import recursive_compare +from ... import any_int, int_interval, recursive_compare pytestmark = pytest.mark.asyncio @@ -13,6 +13,7 @@ FRAGMENT_NAVIGATED_EVENT = "browsingContext.fragmentNavigated" HISTORY_UPDATED_EVENT = "browsingContext.historyUpdated" CREATED_EVENT = "browsingContext.contextCreated" + @pytest.mark.parametrize( "hash_before, hash_after, history_method", [ @@ -24,10 +25,17 @@ CREATED_EVENT = "browsingContext.contextCreated" ("#foo", "#bar", "replaceState"), ("#foo", "#foo", "replaceState"), ("#bar", "", "replaceState"), - ] + ], ) async def test_history_url_update( - bidi_session, new_tab, url, subscribe_events, hash_before, hash_after, history_method + bidi_session, + new_tab, + url, + subscribe_events, + current_time, + hash_before, + hash_after, + history_method, ): target_context = new_tab["context"] @@ -39,43 +47,54 @@ async def test_history_url_update( fragment_navigated_events = [] history_updated_events = [] + async def on_event(method, data): if method == FRAGMENT_NAVIGATED_EVENT: - fragment_navigated_events.append(data) + fragment_navigated_events.append(data) if method == HISTORY_UPDATED_EVENT: - history_updated_events.append(data) + history_updated_events.append(data) - remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event) - remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event) + remove_fragment_navigated_listener = bidi_session.add_event_listener( + FRAGMENT_NAVIGATED_EVENT, on_event + ) + remove_history_updated_listener = bidi_session.add_event_listener( + HISTORY_UPDATED_EVENT, on_event + ) try: - target_url = url(EMPTY_PAGE + hash_after) - - await bidi_session.script.call_function( - raw_result=True, - function_declaration="""(method, url) => { - history[method](null, null, url); - }""", - arguments=[ - {"type": "string", "value": history_method}, - {"type": "string", "value": target_url}, - ], - await_promise=False, - target=ContextTarget(target_context), - ) - - recursive_compare( - [{ - 'context': target_context, - 'url': target_url - }], - history_updated_events - ) - - assert len(fragment_navigated_events) == 0 + target_url = url(EMPTY_PAGE + hash_after) + + await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(method, url) => { + history[method](null, null, url); + }""", + arguments=[ + {"type": "string", "value": history_method}, + {"type": "string", "value": target_url}, + ], + await_promise=False, + target=ContextTarget(target_context), + ) + + recursive_compare( + [ + { + "context": target_context, + "timestamp": any_int, + "url": target_url, + } + ], + history_updated_events, + ) + + # browsingContext.historyUpdated should not contain any navigation id. + assert "navigation" not in history_updated_events[0] + + assert len(fragment_navigated_events) == 0 finally: - remove_fragment_navigated_listener() - remove_history_updated_listener() + remove_fragment_navigated_listener() + remove_history_updated_listener() @pytest.mark.parametrize( @@ -83,7 +102,7 @@ async def test_history_url_update( [ ("pushState"), ("replaceState"), - ] + ], ) async def test_history_state_update( bidi_session, new_tab, url, subscribe_events, history_method @@ -99,45 +118,44 @@ async def test_history_state_update( fragment_navigated_events = [] history_updated_events = [] + async def on_event(method, data): if method == FRAGMENT_NAVIGATED_EVENT: - fragment_navigated_events.append(data) + fragment_navigated_events.append(data) if method == HISTORY_UPDATED_EVENT: - history_updated_events.append(data) + history_updated_events.append(data) - remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event) - remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event) + remove_fragment_navigated_listener = bidi_session.add_event_listener( + FRAGMENT_NAVIGATED_EVENT, on_event + ) + remove_history_updated_listener = bidi_session.add_event_listener( + HISTORY_UPDATED_EVENT, on_event + ) try: - await bidi_session.script.call_function( - raw_result=True, - function_declaration="""(method) => { - history[method]({}, null); - }""", - arguments=[ - {"type": "string", "value": history_method}, - ], - await_promise=False, - target=ContextTarget(target_context), - ) - - recursive_compare( - [{ - 'context': target_context, - 'url': target_url - }], - history_updated_events - ) - - assert len(fragment_navigated_events) == 0 + await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(method) => { + history[method]({}, null); + }""", + arguments=[ + {"type": "string", "value": history_method}, + ], + await_promise=False, + target=ContextTarget(target_context), + ) + + recursive_compare( + [{"context": target_context, "url": target_url}], history_updated_events + ) + + assert len(fragment_navigated_events) == 0 finally: - remove_fragment_navigated_listener() - remove_history_updated_listener() + remove_fragment_navigated_listener() + remove_history_updated_listener() -async def test_history_document_open( - bidi_session, new_tab, url, subscribe_events -): +async def test_history_document_open(bidi_session, new_tab, url, subscribe_events): target_context = new_tab["context"] target_url = url(EMPTY_PAGE) @@ -145,30 +163,34 @@ async def test_history_document_open( context=new_tab["context"], url=target_url, wait="complete" ) - await subscribe_events([FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT, CREATED_EVENT]) + await subscribe_events( + [FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT, CREATED_EVENT] + ) fragment_navigated_events = [] history_updated_events = [] browsing_context_created_events = [] - async def on_event(method, data): if method == FRAGMENT_NAVIGATED_EVENT: - fragment_navigated_events.append(data) + fragment_navigated_events.append(data) if method == HISTORY_UPDATED_EVENT: - history_updated_events.append(data) + history_updated_events.append(data) if method == CREATED_EVENT: - browsing_context_created_events.append(data) - + browsing_context_created_events.append(data) - remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event) - remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event) + remove_fragment_navigated_listener = bidi_session.add_event_listener( + FRAGMENT_NAVIGATED_EVENT, on_event + ) + remove_history_updated_listener = bidi_session.add_event_listener( + HISTORY_UPDATED_EVENT, on_event + ) remove_created_listener = bidi_session.add_event_listener(CREATED_EVENT, on_event) try: - await bidi_session.script.call_function( - raw_result=True, - function_declaration="""() => { + await bidi_session.script.call_function( + raw_result=True, + function_declaration="""() => { const frame = document.createElement("iframe"); document.body.append(frame); frame.contentDocument.open(); @@ -180,37 +202,144 @@ async def test_history_document_open( window.location.hash = "heya"; }); }""", - await_promise=True, - target=ContextTarget(target_context), - ) - - recursive_compare( - [{ - 'url': 'about:blank' - }], - browsing_context_created_events - ) - - recursive_compare( - [{ - 'context': target_context, - 'url': target_url + '#heya' - }], - fragment_navigated_events - ) - - # History updated URL should match the target_context's URL - # without the fragment per - # https://html.spec.whatwg.org/#document-open-steps step 12.2. - recursive_compare( - [{ - 'context': browsing_context_created_events[0]['context'], - 'url': target_url - }], - history_updated_events - ) + await_promise=True, + target=ContextTarget(target_context), + ) + + recursive_compare([{"url": "about:blank"}], browsing_context_created_events) + + recursive_compare( + [{"context": target_context, "url": target_url + "#heya"}], + fragment_navigated_events, + ) + + # History updated URL should match the target_context's URL + # without the fragment per + # https://html.spec.whatwg.org/#document-open-steps step 12.2. + recursive_compare( + [ + { + # This event is for the first document.open before setting the + # location hash, per spec it should be set to the parent's document + # url. + "context": browsing_context_created_events[0]["context"], + "url": target_url, + }, + { + # This is for the second document.open, after setting the hash. + # Again this should be set to target_url since the fragment should not + # be included. + "context": browsing_context_created_events[0]["context"], + "url": target_url, + }, + ], + history_updated_events, + ) + + finally: + remove_fragment_navigated_listener() + remove_history_updated_listener() + remove_created_listener() + + +async def test_history_back_forward( + bidi_session, new_tab, url, subscribe_events, wait_for_event, wait_for_future_safe +): + target_context = new_tab["context"] + + target_url = url(EMPTY_PAGE) + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=target_url, wait="complete" + ) + + await subscribe_events([FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT]) + + fragment_navigated_events = [] + history_updated_events = [] + + async def on_event(method, data): + if method == FRAGMENT_NAVIGATED_EVENT: + fragment_navigated_events.append(data) + elif method == HISTORY_UPDATED_EVENT: + history_updated_events.append(data) + + remove_fragment_navigated_listener = bidi_session.add_event_listener( + FRAGMENT_NAVIGATED_EVENT, on_event + ) + remove_history_updated_listener = bidi_session.add_event_listener( + HISTORY_UPDATED_EVENT, on_event + ) + try: + await bidi_session.script.evaluate( + expression=""" + history.pushState({}, "", "test1.html"); + history.pushState({}, "", "test2.html"); + """, + await_promise=False, + target=ContextTarget(target_context), + ) + + assert len(history_updated_events) == 2 + assert len(fragment_navigated_events) == 0 + + on_entry = wait_for_event(HISTORY_UPDATED_EVENT) + await bidi_session.script.evaluate( + expression="history.back();", + await_promise=False, + target=ContextTarget(target_context), + ) + + await wait_for_future_safe(on_entry) + assert len(history_updated_events) == 3 + assert len(fragment_navigated_events) == 0 + + on_entry = wait_for_event(HISTORY_UPDATED_EVENT) + await bidi_session.script.evaluate( + expression="history.forward();", + await_promise=False, + target=ContextTarget(target_context), + ) + + await wait_for_future_safe(on_entry) + assert len(history_updated_events) == 4 + assert len(fragment_navigated_events) == 0 finally: - remove_fragment_navigated_listener() - remove_history_updated_listener() - remove_created_listener() + remove_fragment_navigated_listener() + remove_history_updated_listener() + + +async def test_timestamp( + bidi_session, + current_time, + subscribe_events, + url, + new_tab, + wait_for_event, + wait_for_future_safe, +): + target_context = new_tab["context"] + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url(EMPTY_PAGE), wait="complete" + ) + + await subscribe_events(events=[HISTORY_UPDATED_EVENT]) + + on_entry = wait_for_event(HISTORY_UPDATED_EVENT) + time_start = await current_time() + + await bidi_session.script.evaluate( + expression="""history.pushState({}, "", "test1.html")""", + await_promise=False, + target=ContextTarget(target_context), + ) + event = await wait_for_future_safe(on_entry) + time_end = await current_time() + + recursive_compare( + { + "context": target_context, + "timestamp": int_interval(time_start, time_end), + }, + event, + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py index bb171c61411..8866771b80c 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py @@ -44,6 +44,7 @@ async def test_partition_context(bidi_session, set_cookie, top_context, test_pag domain=domain_value(), name=cookie_name, value=NetworkStringValue(cookie_value), + secure=True, ), partition=partition, ) diff --git a/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py b/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py index 60b67d051ba..581040f7000 100644 --- a/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py +++ b/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py @@ -237,7 +237,8 @@ def test_add_cookie_with_valid_samesite_flag(session, url, same_site): new_cookie = { "name": "hello", "value": "world", - "sameSite": same_site + "secure": True, + "sameSite": same_site, } session.url = url("/common/blank.html") diff --git a/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js new file mode 100644 index 00000000000..c112cd89c03 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js @@ -0,0 +1,1753 @@ +// META: title=test WebNN API averagePool2d operation +// META: global=window +// META: variant=?cpu +// META: variant=?gpu +// META: variant=?npu +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d +// Compute a pooling operation across all the elements within the moving window +// over the input tensor. +// +// enum MLRoundingType { +// "floor", +// "ceil" +// }; +// +// dictionary MLPool2dOptions { +// sequence<[EnforceRange] unsigned long> windowDimensions; +// sequence<[EnforceRange] unsigned long> padding; +// sequence<[EnforceRange] unsigned long> strides; +// sequence<[EnforceRange] unsigned long> dilations; +// MLInputOperandLayout layout = "nchw"; +// MLRoundingType roundingType = "floor"; +// sequence<[EnforceRange] unsigned long> outputSizes; +// }; +// +// MLOperand averagePool2d( +// MLOperand input, optional MLPool2dOptions options = {}); + +const averagePool2dTests = [ + // float32 tests + { + 'name': + 'averagePool2d float32 4D constant tensor all positive default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor all positive default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor all negative default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + -83.87757873535156, -2.0740277767181396, -7.561108589172363, + -45.274261474609375, -16.36655616760254, -44.908512115478516, + -42.04186248779297, -44.77231979370117, -1.5066279172897339, + -52.65203857421875, -92.01856231689453, -48.004093170166016, + -61.522972106933594, -93.44403839111328, -25.780330657958984, + -95.51873779296875, -10.963757514953613, -59.132747650146484, + -32.60173797607422, -21.4510440826416, -87.115966796875, + -61.326114654541016, -41.989723205566406, -87.8764877319336, + -71.69316101074219, -80.24160766601562, -97.48886108398438, + -75.89422607421875, -45.08991622924805, -88.27134704589844, + -90.71282958984375, -93.32392120361328, -59.14753341674805, + -45.33106231689453, -51.32562255859375, -31.154796600341797, + -31.62424087524414, -62.80168151855469, -63.558509826660156, + -68.96183013916016, -43.09415054321289, -15.803443908691406, + -64.31092071533203, -66.45872497558594, -42.027252197265625, + -26.032955169677734, -22.73752784729004, -70.32036590576172, + -85.28227996826172, -92.10668182373047 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [-49.258975982666016, -60.52408981323242], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 43.46498107910156, 49.37273406982422, 42.7481689453125, + 50.038944244384766, 52.452327728271484, 58.46046447753906, + 32.15948486328125, 34.75465393066406, 54.00202560424805, + 49.65404510498047, 41.824440002441406, 35.84912109375, + 43.23125457763672, 37.842769622802734, 32.67961120605469, + 41.17021942138672, 42.79708480834961, 38.987247467041016 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'global averagePool2d float32 4D tensor all positive options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [5, 5]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.padding', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 52.43666076660156, 49.84208297729492, 47.26926803588867, + 46.15715408325195, 46.63268280029297, 43.616947174072266, + 44.72445297241211, 44.05451583862305 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.strides', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 43.46498107910156, 42.7481689453125, 32.15948486328125, + 54.00202560424805, 49.65404510498047, 35.84912109375, + 41.17021942138672, 38.987247467041016 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [32.2001838684082, 42.971012115478516], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': + [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 91.59549713134766, 78.15438079833984, + 65.64701080322266, 9.686111450195312, 55.14215087890625, + 51.298038482666016, 18.432437896728516, 32.193084716796875, + 49.34624099731445, 87.65037536621094, 15.648024559020996, + 87.25082397460938, 68.02723693847656, 39.49794006347656, + 20.342548370361328, 80.0996322631836, 26.727949142456055, + 10.220142364501953, 64.87446594238281, 52.602699279785156, + 46.5671501159668, 1.4128639698028564, 79.57833099365234, + 11.95406436920166, 4.33846378326416, 85.00074768066406, + 38.183837890625, 64.78374481201172, 45.25398254394531, + 88.03128814697266, 80.9718017578125, 11.333850860595703, + 67.58124542236328, 70.61659240722656, 6.0264997482299805, + 84.90442657470703, 29.7788143157959, 79.06687927246094, + 58.58993148803711, 7.3287248611450195, 2.2384984493255615, + 35.97796630859375, 14.50549030303955, 10.177306175231934, + 68.72449493408203, 1.4140757322311401, 76.45657348632812, + 78.10037994384766, 23.53263282775879 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': + [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'global averagePool2d float32 4D tensor options.layout=nhwc and options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 91.59549713134766, 78.15438079833984, + 65.64701080322266, 9.686111450195312, 55.14215087890625, + 51.298038482666016, 18.432437896728516, 32.193084716796875, + 49.34624099731445, 87.65037536621094, 15.648024559020996, + 87.25082397460938, 68.02723693847656, 39.49794006347656, + 20.342548370361328, 80.0996322631836, 26.727949142456055, + 10.220142364501953, 64.87446594238281, 52.602699279785156, + 46.5671501159668, 1.4128639698028564, 79.57833099365234, + 11.95406436920166, 4.33846378326416, 85.00074768066406, + 38.183837890625, 64.78374481201172, 45.25398254394531, + 88.03128814697266, 80.9718017578125, 11.333850860595703, + 67.58124542236328, 70.61659240722656, 6.0264997482299805, + 84.90442657470703, 29.7788143157959, 79.06687927246094, + 58.58993148803711, 7.3287248611450195, 2.2384984493255615, + 35.97796630859375, 14.50549030303955, 10.177306175231934, + 68.72449493408203, 1.4140757322311401, 76.45657348632812, + 78.10037994384766, 23.53263282775879 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.26926803588867, 44.72445297241211], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 37.16582489013672, 50.038944244384766, + 58.46046447753906, 52.73374557495117, 39.1442985534668, + 43.23125457763672, 32.67961120605469 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'averagePool2d float32 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 37.16582489013672, 21.206613540649414, + 50.038944244384766, 58.46046447753906, 51.3569221496582, + 37.24428939819336, 54.04661178588867, 78.58363342285156, + 52.73374557495117, 39.1442985534668, 57.1103515625, + 43.23125457763672, 32.67961120605469, 56.23945999145508, + 40.00800323486328, 43.85149002075195, 41.061283111572266 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.roundingType=ceil and no padding', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656 + ], + 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 51.20364761352539, 40.29140853881836, 50.77684020996094, + 51.70764923095703, 50.63130187988281, 49.3919792175293, + 53.128265380859375, 51.11610412597656 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 91.59549713134766, 78.15438079833984, + 65.64701080322266, 9.686111450195312, 55.14215087890625, + 51.298038482666016, 18.432437896728516, 32.193084716796875, + 49.34624099731445, 87.65037536621094, 15.648024559020996, + 87.25082397460938, 68.02723693847656, 39.49794006347656, + 20.342548370361328, 80.0996322631836, 26.727949142456055, + 10.220142364501953, 64.87446594238281, 52.602699279785156, + 46.5671501159668, 1.4128639698028564, 79.57833099365234, + 11.95406436920166, 4.33846378326416, 85.00074768066406, + 38.183837890625, 64.78374481201172, 45.25398254394531, + 88.03128814697266, 80.9718017578125, 11.333850860595703, + 67.58124542236328, 70.61659240722656, 6.0264997482299805, + 84.90442657470703, 29.7788143157959, 79.06687927246094, + 58.58993148803711, 7.3287248611450195, 2.2384984493255615, + 35.97796630859375, 14.50549030303955, 10.177306175231934, + 68.72449493408203, 1.4140757322311401, 76.45657348632812, + 78.10037994384766, 23.53263282775879 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc', + 'roundingType': 'floor' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 52.73374557495117, 37.16582489013672, + 39.1442985534668, 50.038944244384766, 43.23125457763672, + 58.46046447753906, 32.67961120605469 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 91.59549713134766, 78.15438079833984, + 65.64701080322266, 9.686111450195312, 55.14215087890625, + 51.298038482666016, 18.432437896728516, 32.193084716796875, + 49.34624099731445, 87.65037536621094, 15.648024559020996, + 87.25082397460938, 68.02723693847656, 39.49794006347656, + 20.342548370361328, 80.0996322631836, 26.727949142456055, + 10.220142364501953, 64.87446594238281, 52.602699279785156, + 46.5671501159668, 1.4128639698028564, 79.57833099365234, + 11.95406436920166, 4.33846378326416, 85.00074768066406, + 38.183837890625, 64.78374481201172, 45.25398254394531, + 88.03128814697266, 80.9718017578125, 11.333850860595703, + 67.58124542236328, 70.61659240722656, 6.0264997482299805, + 84.90442657470703, 29.7788143157959, 79.06687927246094, + 58.58993148803711, 7.3287248611450195, 2.2384984493255615, + 35.97796630859375, 14.50549030303955, 10.177306175231934, + 68.72449493408203, 1.4140757322311401, 76.45657348632812, + 78.10037994384766, 23.53263282775879 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc', + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 52.73374557495117, 37.16582489013672, + 39.1442985534668, 21.206613540649414, 57.1103515625, + 50.038944244384766, 43.23125457763672, 58.46046447753906, + 32.67961120605469, 51.3569221496582, 56.23945999145508, + 37.24428939819336, 40.00800323486328, 54.04661178588867, + 43.85149002075195, 78.58363342285156, 41.061283111572266 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 37.16582489013672, 21.206613540649414, + 50.038944244384766, 58.46046447753906, 51.3569221496582, + 37.24428939819336, 54.04661178588867, 78.58363342285156, + 52.73374557495117, 39.1442985534668, 57.1103515625, + 43.23125457763672, 32.67961120605469, 56.23945999145508, + 40.00800323486328, 43.85149002075195, 41.061283111572266 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.975555419921875, 78.15438079833984, 9.686111450195312, + 51.298038482666016, 32.193084716796875, 87.65037536621094, + 87.25082397460938, 39.49794006347656, 80.0996322631836, + 10.220142364501953, 52.602699279785156, 1.4128639698028564, + 11.95406436920166, 85.00074768066406, 64.78374481201172, + 88.03128814697266, 11.333850860595703, 70.61659240722656, + 84.90442657470703, 79.06687927246094, 7.3287248611450195, + 35.97796630859375, 10.177306175231934, 1.4140757322311401, + 78.10037994384766, 91.59549713134766, 65.64701080322266, + 55.14215087890625, 18.432437896728516, 49.34624099731445, + 15.648024559020996, 68.02723693847656, 20.342548370361328, + 26.727949142456055, 64.87446594238281, 46.5671501159668, + 79.57833099365234, 4.33846378326416, 38.183837890625, + 45.25398254394531, 80.9718017578125, 67.58124542236328, + 6.0264997482299805, 29.7788143157959, 58.58993148803711, + 2.2384984493255615, 14.50549030303955, 68.72449493408203, + 76.45657348632812, 23.53263282775879 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.20252990722656, 37.16582489013672, 50.038944244384766, + 58.46046447753906, 52.73374557495117, 39.1442985534668, + 43.23125457763672, 32.67961120605469 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'averagePool2d float32 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 70.71148681640625, 99.33489990234375, 76.41767883300781, + 39.40980911254883, 38.16328811645508, 45.971256256103516, + 65.3527603149414, 64.51607513427734, 7.725966930389404, + 41.7672004699707, 94.92633819580078, 53.475772857666016, + 95.46460723876953, 58.461795806884766, 15.831390380859375, + 78.41020202636719, 24.454092025756836, 20.630916595458984, + 32.06352233886719, 47.85192108154297, 91.60813903808594, + 72.3534927368164, 74.69429779052734, 28.860214233398438, + 71.82395935058594, 7.989691734313965, 88.16659545898438, + 58.69850540161133, 63.6061897277832, 55.88187789916992, + 52.809974670410156, 72.91474151611328, 46.957664489746094, + 22.10279655456543, 87.14309692382812, 89.6496810913086, + 63.19610595703125, 11.760882377624512, 70.68730926513672, + 57.70444107055664, 1.183821439743042, 25.26912498474121, + 95.29122924804688, 1.9658530950546265, 53.368465423583984, + 21.400854110717773, 55.86185836791992, 27.824508666992188, + 7.642839431762695, 82.34233093261719, 91.75215911865234, + 62.79155731201172, 28.11526107788086, 28.72478675842285, + 29.887035369873047, 66.4310302734375, 7.0103044509887695, + 34.33702087402344, 73.20159912109375, 7.8835601806640625, + 17.82563591003418, 33.799156188964844, 65.01251220703125, + 30.264028549194336, 75.76551818847656, 21.150800704956055, + 60.84249496459961, 98.56522369384766, 62.60990905761719, + 42.42991256713867, 53.142147064208984, 36.29545974731445, + 79.95863342285156, 79.60734558105469, 16.059114456176758, + 19.27552032470703, 53.93022918701172, 48.41620635986328, + 93.00965118408203, 62.086524963378906, 83.50532531738281, + 61.07964324951172, 75.51439666748047, 54.193782806396484, + 2.572873830795288, 59.47652053833008, 34.22541427612305, + 13.07015323638916, 12.419061660766602, 55.82337188720703, + 4.553813934326172, 63.47830581665039, 62.3555908203125, + 56.961090087890625, 34.77016067504883, 0.9611223936080933, + 35.30686950683594, 98.00790405273438 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 42.940242767333984, 55.268165588378906, 51.6013298034668, + 50.220027923583984, 72.13362884521484, 41.542198181152344, + 48.91604232788086, 38.775962829589844, 61.21329879760742, + 49.504154205322266, 57.72294998168945, 38.6922492980957, + 50.19099807739258, 29.15436363220215, 52.98439025878906, + 43.10562515258789, 66.77796936035156, 55.2725830078125 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} + } + } + } + }, + + // float16 tests + { + 'name': + 'averagePool2d float16 4D constant tensor all positive default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor all positive default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor all negative default options', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + -83.875, -2.07421875, -7.5625, -45.28125, -16.359375, + -44.90625, -42.03125, -44.78125, -1.5068359375, -52.65625, + -92, -48, -61.53125, -93.4375, -25.78125, + -95.5, -10.9609375, -59.125, -32.59375, -21.453125, + -87.125, -61.3125, -42, -87.875, -71.6875, + -80.25, -97.5, -75.875, -45.09375, -88.25, + -90.6875, -93.3125, -59.15625, -45.34375, -51.3125, + -31.15625, -31.625, -62.8125, -63.5625, -68.9375, + -43.09375, -15.8046875, -64.3125, -66.4375, -42.03125, + -26.03125, -22.734375, -70.3125, -85.3125, -92.125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [{'input': 'averagePool2dInput'}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [-49.25, -60.53125], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 43.46875, 49.375, 42.75, 50.03125, 52.4375, 58.46875, 32.15625, + 34.75, 54, 49.65625, 41.8125, 35.84375, 43.21875, 37.84375, 32.6875, + 41.1875, 42.78125, 39 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'global averagePool2d float16 4D tensor all positive options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [5, 5]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.padding', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 52.4375, 49.84375, 47.28125, 46.15625, 46.625, 43.625, 44.71875, + 44.0625 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.strides', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': + [43.46875, 42.75, 32.15625, 54, 49.65625, 35.84375, 41.1875, 39], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [32.21875, 42.96875], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': + [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 91.625, 78.125, 65.625, 9.6875, + 55.15625, 51.3125, 18.4375, 32.1875, 49.34375, + 87.625, 15.6484375, 87.25, 68, 39.5, + 20.34375, 80.125, 26.734375, 10.21875, 64.875, + 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125, + 4.33984375, 85, 38.1875, 64.8125, 45.25, + 88.0625, 81, 11.3359375, 67.5625, 70.625, + 6.02734375, 84.875, 29.78125, 79.0625, 58.59375, + 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875, + 68.75, 1.4140625, 76.4375, 78.125, 23.53125 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': + [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'global averagePool2d float16 4D tensor options.layout=nhwc and options.windowDimensions', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 91.625, 78.125, 65.625, 9.6875, + 55.15625, 51.3125, 18.4375, 32.1875, 49.34375, + 87.625, 15.6484375, 87.25, 68, 39.5, + 20.34375, 80.125, 26.734375, 10.21875, 64.875, + 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125, + 4.33984375, 85, 38.1875, 64.8125, 45.25, + 88.0625, 81, 11.3359375, 67.5625, 70.625, + 6.02734375, 84.875, 29.78125, 79.0625, 58.59375, + 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875, + 68.75, 1.4140625, 76.4375, 78.125, 23.53125 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, + {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}} + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [47.28125, 44.71875], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875, + 32.6875 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'averagePool2d float16 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25, + 54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875, + 56.25, 40, 43.84375, 41.0625 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.roundingType=ceil and no padding', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, 87.625, + 87.25, 39.5, 80.125, 10.21875, 52.59375, 1.4130859375, + 11.953125, 85, 64.8125, 88.0625, 11.3359375, 70.625, + 84.875, 79.0625, 7.328125, 35.96875, 10.1796875, 1.4140625, + 78.125, 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68 + ], + 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 51.1875, 40.28125, 50.78125, 51.71875, 50.625, 49.375, 53.125, + 51.09375 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 91.625, 78.125, 65.625, 9.6875, + 55.15625, 51.3125, 18.4375, 32.1875, 49.34375, + 87.625, 15.6484375, 87.25, 68, 39.5, + 20.34375, 80.125, 26.734375, 10.21875, 64.875, + 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125, + 4.33984375, 85, 38.1875, 64.8125, 45.25, + 88.0625, 81, 11.3359375, 67.5625, 70.625, + 6.02734375, 84.875, 29.78125, 79.0625, 58.59375, + 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875, + 68.75, 1.4140625, 76.4375, 78.125, 23.53125 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc', + 'roundingType': 'floor' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 52.71875, 37.1875, 39.15625, 50.03125, 43.21875, 58.46875, + 32.6875 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 91.625, 78.125, 65.625, 9.6875, + 55.15625, 51.3125, 18.4375, 32.1875, 49.34375, + 87.625, 15.6484375, 87.25, 68, 39.5, + 20.34375, 80.125, 26.734375, 10.21875, 64.875, + 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125, + 4.33984375, 85, 38.1875, 64.8125, 45.25, + 88.0625, 81, 11.3359375, 67.5625, 70.625, + 6.02734375, 84.875, 29.78125, 79.0625, 58.59375, + 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875, + 68.75, 1.4140625, 76.4375, 78.125, 23.53125 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc', + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 52.71875, 37.1875, 39.15625, 21.203125, 57.125, 50.03125, + 43.21875, 58.46875, 32.6875, 51.375, 56.25, 37.25, 40, 54.0625, + 43.84375, 78.625, 41.0625 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25, + 54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875, + 56.25, 40, 43.84375, 41.0625 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 22.96875, 78.125, 9.6875, 51.3125, 32.1875, + 87.625, 87.25, 39.5, 80.125, 10.21875, + 52.59375, 1.4130859375, 11.953125, 85, 64.8125, + 88.0625, 11.3359375, 70.625, 84.875, 79.0625, + 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125, + 91.625, 65.625, 55.15625, 18.4375, 49.34375, + 15.6484375, 68, 20.34375, 26.734375, 64.875, + 46.5625, 79.5625, 4.33984375, 38.1875, 45.25, + 81, 67.5625, 6.02734375, 29.78125, 58.59375, + 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875, + 32.6875 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'averagePool2d float16 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'averagePool2dInput': { + 'data': [ + 70.6875, 99.3125, 76.4375, 39.40625, 38.15625, + 45.96875, 65.375, 64.5, 7.7265625, 41.78125, + 94.9375, 53.46875, 95.4375, 58.46875, 15.828125, + 78.4375, 24.453125, 20.625, 32.0625, 47.84375, + 91.625, 72.375, 74.6875, 28.859375, 71.8125, + 7.98828125, 88.1875, 58.6875, 63.59375, 55.875, + 52.8125, 72.9375, 46.96875, 22.109375, 87.125, + 89.625, 63.1875, 11.7578125, 70.6875, 57.71875, + 1.18359375, 25.265625, 95.3125, 1.9658203125, 53.375, + 21.40625, 55.875, 27.828125, 7.64453125, 82.3125, + 91.75, 62.78125, 28.109375, 28.71875, 29.890625, + 66.4375, 7.01171875, 34.34375, 73.1875, 7.8828125, + 17.828125, 33.8125, 65, 30.265625, 75.75, + 21.15625, 60.84375, 98.5625, 62.625, 42.4375, + 53.15625, 36.28125, 79.9375, 79.625, 16.0625, + 19.28125, 53.9375, 48.40625, 93, 62.09375, + 83.5, 61.09375, 75.5, 54.1875, 2.572265625, + 59.46875, 34.21875, 13.0703125, 12.421875, 55.8125, + 4.5546875, 63.46875, 62.34375, 56.96875, 34.78125, + 0.9609375, 35.3125, 98 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'averagePool2d', + 'arguments': [ + {'input': 'averagePool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'averagePool2dOutput' + }], + 'expectedOutputs': { + 'averagePool2dOutput': { + 'data': [ + 42.9375, 55.25, 51.59375, 50.21875, 72.125, 41.53125, 48.90625, + 38.78125, 61.21875, 49.5, 57.71875, 38.6875, 50.1875, 29.15625, + 52.96875, 43.09375, 66.75, 55.28125 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'} + } + } + } + } +]; + +if (navigator.ml) { + averagePool2dTests.forEach((test) => { + webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + }); +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js index dc01aa19379..a974ec0004f 100644 --- a/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js @@ -987,7 +987,8 @@ const equalTests = [ if (navigator.ml) { equalTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getEqualPrecisionTolerance, test); + buildAndExecuteGraph, getEqualPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js b/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js new file mode 100644 index 00000000000..c380d810f36 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js @@ -0,0 +1,22 @@ +// META: title=test graph.devices +// META: global=window +// META: variant=?cpu +// META: variant=?gpu +// META: variant=?npu +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +if (navigator.ml) { + promise_test(async () => { + const context = await navigator.ml.createContext(contextOptions); + const builder = new MLGraphBuilder(context); + const a = builder.input('A', {dataType: 'float32', shape: []}); + const o = builder.add(a, a); + const graph = await builder.build({'o': o}); + assert_greater_than(graph.devices.length, 0, 'graph.devices is empty.'); + }); +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js b/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js index 704e0c45776..21e8b07bd47 100644 --- a/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js @@ -991,7 +991,8 @@ const greaterTests = [ if (navigator.ml) { greaterTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getGreaterPrecisionTolerance, test); + buildAndExecuteGraph, getGreaterPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js index 28a2e896027..f9ab2d66814 100644 --- a/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js @@ -986,7 +986,8 @@ const greaterOrEqualTests = [ if (navigator.ml) { greaterOrEqualTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getGreaterOrEqualPrecisionTolerance, test); + buildAndExecuteGraph, getGreaterOrEqualPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js new file mode 100644 index 00000000000..f0e16be927b --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js @@ -0,0 +1,1366 @@ +// META: title=test WebNN API l2Pool2d operation +// META: global=window +// META: variant=?cpu +// META: variant=?gpu +// META: variant=?npu +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d +// Compute a pooling operation across all the elements within the moving window +// over the input tensor. +// +// enum MLRoundingType { +// "floor", +// "ceil" +// }; +// +// dictionary MLPool2dOptions { +// sequence<[EnforceRange] unsigned long> windowDimensions; +// sequence<[EnforceRange] unsigned long> padding; +// sequence<[EnforceRange] unsigned long> strides; +// sequence<[EnforceRange] unsigned long> dilations; +// MLInputOperandLayout layout = "nchw"; +// MLRoundingType roundingType = "floor"; +// sequence<[EnforceRange] unsigned long> outputSizes; +// }; +// +// MLOperand l2Pool2d( +// MLOperand input, optional MLPool2dOptions options = {}); + +const l2Pool2dTests = [ + // float32 tests + { + 'name': 'l2Pool2d float32 4D constant tensor all positive default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289.01953125, 292.6146545410156], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor all positive default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289.01953125, 292.6146545410156], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor all negative default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + -1.1957088708877563, -9.706199645996094, -39.54935836791992, + -82.34971618652344, -32.87415313720703, -50.22603225708008, + -31.17849349975586, -55.817893981933594, -46.70829391479492, + -38.68181228637695, -63.299320220947266, -35.09224319458008, + -80.93848419189453, -82.8619613647461, -40.41627502441406, + -34.86458206176758, -84.33639526367188, -84.11852264404297, + -5.525088787078857, -99.03114318847656, -75.505126953125, + -91.43389129638672, -96.71258544921875, -16.722585678100586, + -17.98292350769043, -58.06570816040039, -11.846800804138184, + -97.90313720703125, -38.69822692871094, -80.19510650634766, + -48.72047805786133, -90.86722564697266, -99.10758209228516, + -79.70288848876953, -59.3824462890625, -9.967330932617188, + -39.27534866333008, -10.469644546508789, -27.565326690673828, + -2.0468990802764893, -81.88761901855469, -66.88040161132812, + -85.98504638671875, -29.674592971801758, -19.649417877197266, + -89.39192199707031, -61.13504409790039, -84.16869354248047, + -77.36112213134766, -91.17266082763672 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [298.928955078125, 326.83587646484375], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 194.45481872558594, 189.54539489746094, 189.85488891601562, + 160.0518341064453, 167.1435546875, 149.63897705078125, + 161.15570068359375, 190.5449981689453, 168.4636688232422, + 170.331787109375, 155.60073852539062, 174.72145080566406, + 165.07762145996094, 165.45819091796875, 161.11062622070312, + 176.6307373046875, 174.245361328125, 180.60714721679688 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.padding', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 254.81358337402344, 233.14259338378906, 289.01953125, + 269.777587890625, 241.52200317382812, 212.99337768554688, + 292.6146545410156, 253.77178955078125 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.strides', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 194.45481872558594, 189.85488891601562, 161.15570068359375, + 168.4636688232422, 170.331787109375, 174.72145080566406, + 176.6307373046875, 180.60714721679688 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [189.47933959960938, 207.25343322753906], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': + [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289.01953125, 292.6146545410156], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 52.027313232421875, 76.55464172363281, + 6.397815227508545, 62.71847152709961, 84.54785919189453, + 83.8726577758789, 18.622516632080078, 73.10235595703125, + 34.10626220703125, 41.52470779418945, 73.96932220458984, + 39.3339729309082, 36.1437873840332, 86.59486389160156, + 60.73781967163086, 23.09039306640625, 55.09187316894531, + 53.650146484375, 63.8924446105957, 0.00902052316814661, + 59.36124038696289, 42.78899383544922, 50.91202926635742, + 81.03960418701172, 50.339813232421875, 33.48585510253906, + 59.31963348388672, 33.67196273803711, 70.78031921386719, + 0.42822372913360596, 35.56179428100586, 80.07991790771484, + 82.53382873535156, 5.929991722106934, 7.572360038757324, + 48.89164733886719, 61.90089416503906, 15.282920837402344, + 14.084012985229492, 13.335721969604492, 90.86540985107422, + 39.06557846069336, 39.56248474121094, 97.06050109863281, + 67.77167510986328, 83.68133544921875, 69.69512176513672, + 21.79571533203125, 89.54518127441406 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': + [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289.01953125, 292.6146545410156], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5061492919922, 164.9919891357422, 160.0518341064453, + 149.63897705078125, 142.6990966796875, 139.51637268066406, + 165.07762145996094, 161.11062622070312 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5061492919922, 164.9919891357422, 90.6768569946289, + 160.0518341064453, 149.63897705078125, 65.15908813476562, + 132.56260681152344, 139.84808349609375, 26.61993408203125, + 142.6990966796875, 139.51637268066406, 72.42569732666016, + 165.07762145996094, 161.11062622070312, 96.38701629638672, + 150.1616668701172, 146.8201904296875, 90.64601135253906 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5061492919922, 164.9919891357422, 90.6768569946289, + 160.0518341064453, 149.63897705078125, 65.15908813476562, + 132.56260681152344, 139.84808349609375, 26.61993408203125, + 142.6990966796875, 139.51637268066406, 72.42569732666016, + 165.07762145996094, 161.11062622070312, 96.38701629638672, + 150.1616668701172, 146.8201904296875, 90.64601135253906 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.07447814941406, 76.55464172363281, 62.71847152709961, + 83.8726577758789, 73.10235595703125, 41.52470779418945, + 39.3339729309082, 86.59486389160156, 23.09039306640625, + 53.650146484375, 0.00902052316814661, 42.78899383544922, + 81.03960418701172, 33.48585510253906, 33.67196273803711, + 0.42822372913360596, 80.07991790771484, 5.929991722106934, + 48.89164733886719, 15.282920837402344, 13.335721969604492, + 39.06557846069336, 97.06050109863281, 83.68133544921875, + 21.79571533203125, 52.027313232421875, 6.397815227508545, + 84.54785919189453, 18.622516632080078, 34.10626220703125, + 73.96932220458984, 36.1437873840332, 60.73781967163086, + 55.09187316894531, 63.8924446105957, 59.36124038696289, + 50.91202926635742, 50.339813232421875, 59.31963348388672, + 70.78031921386719, 35.56179428100586, 82.53382873535156, + 7.572360038757324, 61.90089416503906, 14.084012985229492, + 90.86540985107422, 39.56248474121094, 67.77167510986328, + 69.69512176513672, 89.54518127441406 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5061492919922, 164.9919891357422, 160.0518341064453, + 149.63897705078125, 142.6990966796875, 139.51637268066406, + 165.07762145996094, 161.11062622070312 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'l2Pool2d float32 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 6.5550384521484375, 26.254413604736328, 28.47271156311035, + 64.81202697753906, 39.65838623046875, 10.465584754943848, + 47.94060134887695, 42.208946228027344, 36.834041595458984, + 68.50249481201172, 2.0496721267700195, 49.73927688598633, + 59.97947311401367, 71.08380889892578, 0.20033331215381622, + 19.39293670654297, 70.1269302368164, 86.8837661743164, + 84.28858184814453, 9.695697784423828, 62.69126510620117, + 51.924110412597656, 5.412675857543945, 70.82118225097656, + 81.61302947998047, 29.148712158203125, 85.83409881591797, + 71.36548614501953, 44.09445571899414, 58.343570709228516, + 43.37118148803711, 54.025882720947266, 85.50556945800781, + 93.19215393066406, 10.992993354797363, 34.864158630371094, + 96.2605209350586, 44.29584503173828, 61.12482833862305, + 79.62699127197266, 4.066447734832764, 64.89644622802734, + 97.5897445678711, 11.257055282592773, 61.151283264160156, + 20.312341690063477, 39.862640380859375, 68.747314453125, + 89.61034393310547, 22.28224754333496, 41.36311721801758, + 62.9378662109375, 79.54936218261719, 55.64254379272461, + 54.47548294067383, 77.04864501953125, 56.83576965332031, + 80.57747650146484, 70.43293762207031, 85.67094421386719, + 19.527807235717773, 33.87490463256836, 14.498117446899414, + 92.85955810546875, 96.8167724609375, 28.399721145629883, + 99.917236328125, 48.76692199707031, 86.08634948730469, + 47.32324981689453, 7.223662376403809, 82.97200775146484, + 38.374778747558594, 22.10988426208496, 14.797550201416016, + 2.3872148990631104, 83.26342010498047, 46.41500473022461, + 28.659175872802734, 13.919462203979492, 55.413089752197266, + 62.68498992919922, 78.54127502441406, 31.142845153808594, + 4.806727886199951, 33.233642578125, 24.749773025512695, + 1.529007077217102, 42.976322174072266, 93.08572387695312, + 77.908935546875, 45.74395751953125, 62.868892669677734, + 60.689762115478516, 20.046878814697266, 13.203198432922363, + 33.33952713012695, 0.5279953479766846 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'dilations': [1, 1], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 120.20333862304688, 114.0977783203125, 127.63969421386719, + 119.95613861083984, 137.89837646484375, 152.24261474609375, + 194.9647216796875, 168.20205688476562, 197.7173309326172, + 169.85887145996094, 195.1484832763672, 190.96127319335938, + 158.64576721191406, 166.2051544189453, 171.07916259765625, + 148.70985412597656, 218.7123260498047, 153.33311462402344 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} + } + } + } + }, + + // float16 tests + { + 'name': 'l2Pool2d float16 4D constant tensor all positive default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289, 292.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor all positive default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289, 292.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor all negative default options', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + -1.1953125, -9.703125, -39.5625, -82.375, -32.875, -50.21875, + -31.171875, -55.8125, -46.71875, -38.6875, -63.3125, -35.09375, + -80.9375, -82.875, -40.40625, -34.875, -84.3125, -84.125, + -5.5234375, -99, -75.5, -91.4375, -96.6875, -16.71875, + -17.984375, -58.0625, -11.84375, -97.875, -38.6875, -80.1875, + -48.71875, -90.875, -99.125, -79.6875, -59.375, -9.96875, + -39.28125, -10.46875, -27.5625, -2.046875, -81.875, -66.875, + -86, -29.671875, -19.65625, -89.375, -61.125, -84.1875, + -77.375, -91.1875 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [{'input': 'l2Pool2dInput'}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [299, 326.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 194.5, 189.625, 189.875, 160.125, 167.125, 149.625, 161.125, 190.5, + 168.5, 170.375, 155.625, 174.75, 165.125, 165.5, 161.125, 176.625, + 174.25, 180.625 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.padding', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [254.875, 233.125, 289, 269.75, 241.5, 213, 292.75, 253.75], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.strides', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 194.5, 189.875, 161.125, 168.5, 170.375, 174.75, 176.625, 180.625 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [189.5, 207.25], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': + [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289, 292.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 52.03125, 76.5625, + 6.3984375, 62.71875, 84.5625, + 83.875, 18.625, 73.125, + 34.09375, 41.53125, 74, + 39.34375, 36.15625, 86.625, + 60.75, 23.09375, 55.09375, + 53.65625, 63.90625, 0.0090179443359375, + 59.375, 42.78125, 50.90625, + 81.0625, 50.34375, 33.5, + 59.3125, 33.6875, 70.75, + 0.42822265625, 35.5625, 80.0625, + 82.5625, 5.9296875, 7.57421875, + 48.90625, 61.90625, 15.28125, + 14.0859375, 13.3359375, 90.875, + 39.0625, 39.5625, 97.0625, + 67.75, 83.6875, 69.6875, + 21.796875, 89.5625 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': + [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [289, 292.75], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': + [171.5, 165, 160.125, 149.625, 142.75, 139.5, 165.125, 161.125], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5, 165, 90.6875, 160.125, 149.625, 65.1875, 132.5, 139.875, + 26.625, 142.75, 139.5, 72.4375, 165.125, 161.125, 96.375, 150.125, + 146.875, 90.6875 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'l2Pool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 171.5, 165, 90.6875, 160.125, 149.625, 65.1875, 132.5, 139.875, + 26.625, 142.75, 139.5, 72.4375, 165.125, 161.125, 96.375, 150.125, + 146.875, 90.6875 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'l2Pool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 94.0625, 76.5625, 62.71875, + 83.875, 73.125, 41.53125, + 39.34375, 86.625, 23.09375, + 53.65625, 0.0090179443359375, 42.78125, + 81.0625, 33.5, 33.6875, + 0.42822265625, 80.0625, 5.9296875, + 48.90625, 15.28125, 13.3359375, + 39.0625, 97.0625, 83.6875, + 21.796875, 52.03125, 6.3984375, + 84.5625, 18.625, 34.09375, + 74, 36.15625, 60.75, + 55.09375, 63.90625, 59.375, + 50.90625, 50.34375, 59.3125, + 70.75, 35.5625, 82.5625, + 7.57421875, 61.90625, 14.0859375, + 90.875, 39.5625, 67.75, + 69.6875, 89.5625 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': + [171.5, 165, 160.125, 149.625, 142.75, 139.5, 165.125, 161.125], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'l2Pool2d float16 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'l2Pool2dInput': { + 'data': [ + 6.5546875, 26.25, 28.46875, 64.8125, 39.65625, + 10.46875, 47.9375, 42.21875, 36.84375, 68.5, + 2.048828125, 49.75, 59.96875, 71.0625, 0.2003173828125, + 19.390625, 70.125, 86.875, 84.3125, 9.6953125, + 62.6875, 51.9375, 5.4140625, 70.8125, 81.625, + 29.15625, 85.8125, 71.375, 44.09375, 58.34375, + 43.375, 54.03125, 85.5, 93.1875, 10.9921875, + 34.875, 96.25, 44.28125, 61.125, 79.625, + 4.06640625, 64.875, 97.5625, 11.2578125, 61.15625, + 20.3125, 39.875, 68.75, 89.625, 22.28125, + 41.375, 62.9375, 79.5625, 55.65625, 54.46875, + 77.0625, 56.84375, 80.5625, 70.4375, 85.6875, + 19.53125, 33.875, 14.5, 92.875, 96.8125, + 28.40625, 99.9375, 48.78125, 86.0625, 47.3125, + 7.22265625, 83, 38.375, 22.109375, 14.796875, + 2.38671875, 83.25, 46.40625, 28.65625, 13.921875, + 55.40625, 62.6875, 78.5625, 31.140625, 4.80859375, + 33.21875, 24.75, 1.529296875, 42.96875, 93.0625, + 77.9375, 45.75, 62.875, 60.6875, 20.046875, + 13.203125, 33.34375, 0.52783203125 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'l2Pool2d', + 'arguments': [ + {'input': 'l2Pool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'dilations': [1, 1], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'l2Pool2dOutput' + }], + 'expectedOutputs': { + 'l2Pool2dOutput': { + 'data': [ + 120.1875, 114.0625, 127.625, 119.9375, 137.875, 152.25, 195, 168.25, + 197.75, 169.875, 195.125, 191, 158.625, 166.25, 171.125, 148.75, + 218.75, 153.375 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'} + } + } + } + } +]; + +if (navigator.ml) { + l2Pool2dTests.forEach((test) => { + webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + }); +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js b/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js index 0588f3bcd6a..8978435c6e3 100644 --- a/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js @@ -998,7 +998,8 @@ const lesserTests = [ if (navigator.ml) { lesserTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getLesserPrecisionTolerance, test); + buildAndExecuteGraph, getLesserPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js index cfcc74063ec..16aa5888cc2 100644 --- a/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js @@ -1105,7 +1105,8 @@ const lesserOrEqualTests = [ if (navigator.ml) { lesserOrEqualTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getLesserOrEqualPrecisionTolerance, test); + buildAndExecuteGraph, getLesserOrEqualPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js index a4d71654bcb..1a03ef5444d 100644 --- a/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js @@ -414,7 +414,9 @@ const logicalAndTests = [ if (navigator.ml) { logicalAndTests.forEach((test) => { - webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + webnn_conformance_test( + buildAndExecuteGraph, getPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js index 9d1861dd548..f8949672cc5 100644 --- a/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js @@ -214,7 +214,8 @@ const logicalNotTests = [ if (navigator.ml) { logicalNotTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getLogicalNotPrecisionTolerance, test); + buildAndExecuteGraph, getLogicalNotPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js index f8941b633c9..83c261969f6 100644 --- a/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js @@ -414,7 +414,9 @@ const logicalOrTests = [ if (navigator.ml) { logicalOrTests.forEach((test) => { - webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + webnn_conformance_test( + buildAndExecuteGraph, getPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js index 533d52aa6be..7a9446ea2e4 100644 --- a/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js @@ -414,7 +414,9 @@ const logicalXorTests = [ if (navigator.ml) { logicalXorTests.forEach((test) => { - webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + webnn_conformance_test( + buildAndExecuteGraph, getPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js new file mode 100644 index 00000000000..6ee8b1976d2 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js @@ -0,0 +1,1216 @@ +// META: title=test WebNN API maxPool2d operation +// META: global=window +// META: variant=?cpu +// META: variant=?gpu +// META: variant=?npu +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d +// Compute a pooling operation across all the elements within the moving window +// over the input tensor. +// +// enum MLRoundingType { +// "floor", +// "ceil" +// }; +// +// dictionary MLPool2dOptions { +// sequence<[EnforceRange] unsigned long> windowDimensions; +// sequence<[EnforceRange] unsigned long> padding; +// sequence<[EnforceRange] unsigned long> strides; +// sequence<[EnforceRange] unsigned long> dilations; +// MLInputOperandLayout layout = "nchw"; +// MLRoundingType roundingType = "floor"; +// sequence<[EnforceRange] unsigned long> outputSizes; +// }; +// +// MLOperand maxPool2d( +// MLOperand input, optional MLPool2dOptions options = {}); + +const maxPool2dTests = [ + // float32 tests + { + 'name': 'maxPool2d float32 4D constant tensor default options', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [{'input': 'maxPool2dInput'}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.28312683105469, 81.73119354248047], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor default options', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [{'input': 'maxPool2dInput'}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.28312683105469, 81.73119354248047], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + '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 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.padding', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.28312683105469, 99.28312683105469, 99.28312683105469, + 99.28312683105469, 81.73119354248047, 72.8883056640625, + 81.73119354248047, 72.8883056640625 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.strides', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.28312683105469, 66.09259033203125, 97.90348052978516, + 72.1085205078125, 81.73119354248047, 72.44898986816406, + 80.30484008789062, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [89.00830078125, 72.33577728271484], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': + [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.28312683105469, 81.73119354248047], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -76.72171020507812, -45.72039031982422, + 50.217063903808594, -61.306129455566406, -52.895477294921875, + -4.014514446258545, -44.642333984375, -94.54893493652344, + -97.86752319335938, 46.28090286254883, 81.73119354248047, + 99.28312683105469, 5.428491115570068, -10.057873725891113, + -29.22772789001465, 9.742474555969238, 72.44898986816406, + -39.03501892089844, -59.34124755859375, 75.08192443847656, + 39.19960021972656, 12.819415092468262, -65.99439239501953, + -33.01505661010742, -4.204323768615723, 38.691341400146484, + -60.54586410522461, 66.09259033203125, 55.890525817871094, + 97.90348052978516, 80.30484008789062, -8.737770080566406, + 72.8883056640625, -53.42162322998047, -46.59611129760742, + 72.1085205078125, 20.50387954711914, -40.423091888427734, + -31.126462936401367, -35.68864440917969, -57.294559478759766, + -87.64779663085938, -26.623577117919922, 38.874244689941406, + 15.935754776000977, 39.383602142333984, -78.77953338623047, + 7.429088115692139, 72.33577728271484 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': + [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.28312683105469, 81.73119354248047], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.28312683105469, 9.742474555969238, 99.28312683105469, + 72.1085205078125, 81.73119354248047, 72.44898986816406, + 81.73119354248047, 72.44898986816406 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': 'maxPool2d float32 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + '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 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + '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 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89.00830078125, -45.72039031982422, -61.306129455566406, + -4.014514446258545, -94.54893493652344, 46.28090286254883, + 99.28312683105469, -10.057873725891113, 9.742474555969238, + -39.03501892089844, 75.08192443847656, 12.819415092468262, + -33.01505661010742, 38.691341400146484, 66.09259033203125, + 97.90348052978516, -8.737770080566406, -53.42162322998047, + 72.1085205078125, -40.423091888427734, -35.68864440917969, + -87.64779663085938, 38.874244689941406, 39.383602142333984, + 7.429088115692139, -76.72171020507812, 50.217063903808594, + -52.895477294921875, -44.642333984375, -97.86752319335938, + 81.73119354248047, 5.428491115570068, -29.22772789001465, + 72.44898986816406, -59.34124755859375, 39.19960021972656, + -65.99439239501953, -4.204323768615723, -60.54586410522461, + 55.890525817871094, 80.30484008789062, 72.8883056640625, + -46.59611129760742, 20.50387954711914, -31.126462936401367, + -57.294559478759766, -26.623577117919922, 15.935754776000977, + -78.77953338623047, 72.33577728271484 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.28312683105469, 9.742474555969238, 99.28312683105469, + 72.1085205078125, 81.73119354248047, 72.44898986816406, + 81.73119354248047, 72.44898986816406 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} + } + } + } + }, + { + 'name': + 'maxPool2d float32 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 34.69258117675781, -24.706249237060547, -60.428070068359375, + 35.93883514404297, 60.896095275878906, 79.42220306396484, + -77.85906219482422, 54.188209533691406, -21.576934814453125, + -49.10390853881836, 78.55176544189453, 74.28213500976562, + -87.92769622802734, 79.82047271728516, 11.680922508239746, + -12.154505729675293, -22.33293914794922, 33.084861755371094, + 8.640676498413086, 47.040645599365234, 95.7823486328125, + -88.01998138427734, -98.53630065917969, 16.158977508544922, + 21.396089553833008, 95.1323471069336, -40.80724334716797, + -88.70922088623047, -40.772769927978516, 67.89842987060547, + -50.337467193603516, -96.56610870361328, 12.508098602294922, + -6.6358113288879395, -44.80198287963867, 80.27474212646484, + -65.68411254882812, -14.884790420532227, -66.54857635498047, + 20.072338104248047, -27.954269409179688, -56.62217330932617, + 82.7479476928711, 93.30175018310547, -34.073394775390625, + -22.87164306640625, 73.25525665283203, 41.14021682739258, + -19.75514793395996, 80.07701110839844, -69.89276885986328, + 14.013250350952148, -61.36640167236328, 51.53046417236328, + 43.53886413574219, -89.5888671875, 51.45121765136719, + 73.9239730834961, -80.25264739990234, 94.72747802734375, + 95.25411224365234, 58.12575149536133, 19.885723114013672, + -70.0301284790039, 63.419517517089844, -54.11785125732422, + -97.22807312011719, -60.65826416015625, -31.04998016357422, + -14.646553039550781, -63.73688888549805, 47.34630584716797, + 85.56405639648438, -53.389251708984375, -70.84739685058594, + 47.355045318603516, 83.38397979736328, 7.361695289611816, + 46.85823440551758, 98.13465881347656, -43.9396858215332, + 50.33780288696289, 37.45563507080078, -54.52760696411133, + -6.212307929992676, 34.41734313964844, 11.8167724609375, + 72.44517517089844, 86.3460922241211, 4.14656925201416, + 88.33040618896484, 98.29994201660156, -66.72379302978516, + 58.0643424987793, -51.168277740478516, -17.768583297729492, + 9.961172103881836, -52.73843002319336 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'dilations': [1, 1], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + '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 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} + } + } + } + }, + + // float16 tests + { + 'name': 'maxPool2d float16 4D constant tensor default options', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [{'input': 'maxPool2dInput'}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.3125, 81.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor default options', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [{'input': 'maxPool2dInput'}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.3125, 81.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.windowDimensions', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 99.3125, 66.0625, 99.3125, 99.3125, 72.125, 97.875, 72.125, + 72.125, 81.75, 72.4375, 72.4375, 81.75, 72.875, 72.4375, 80.3125, + 72.875, 72.3125 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.padding', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 99.3125, 99.3125, 99.3125, 81.75, 72.875, 81.75, 72.875 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.strides', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 66.0625, 97.875, 72.125, 81.75, 72.4375, 80.3125, 72.3125 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.dilations', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, + {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [89, 72.3125], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.layout=nchw', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': + [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.3125, 81.75], + 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.layout=nhwc', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -76.75, -45.71875, 50.21875, -61.3125, + -52.90625, -4.015625, -44.65625, -94.5625, -97.875, + 46.28125, 81.75, 99.3125, 5.4296875, -10.0546875, + -29.234375, 9.7421875, 72.4375, -39.03125, -59.34375, + 75.0625, 39.1875, 12.8203125, -66, -33, + -4.203125, 38.6875, -60.53125, 66.0625, 55.875, + 97.875, 80.3125, -8.734375, 72.875, -53.40625, + -46.59375, 72.125, 20.5, -40.4375, -31.125, + -35.6875, -57.28125, -87.625, -26.625, 38.875, + 15.9375, 39.375, -78.75, 7.4296875, 72.3125 + ], + 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': + [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [99.3125, 81.75], + 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.roundingType=floor', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 9.7421875, 99.3125, 72.125, 81.75, 72.4375, 81.75, 72.4375 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': 'maxPool2d float16 4D tensor options.roundingType=ceil', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 9.7421875, -39.03125, 99.3125, 72.125, 66.0625, 97.875, + 72.125, 7.4296875, 81.75, 72.4375, -59.34375, 81.75, 72.4375, + 55.875, 80.3125, 72.3125, 72.3125 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'floor', + 'outputSizes': [3, 3] + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 9.7421875, -39.03125, 99.3125, 72.125, 66.0625, 97.875, + 72.125, 7.4296875, 81.75, 72.4375, -59.34375, 81.75, 72.4375, + 55.875, 80.3125, 72.3125, 72.3125 + ], + 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 89, -45.71875, -61.3125, -4.015625, -94.5625, + 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125, + 75.0625, 12.8203125, -33, 38.6875, 66.0625, + 97.875, -8.734375, -53.40625, 72.125, -40.4375, + -35.6875, -87.625, 38.875, 39.375, 7.4296875, + -76.75, 50.21875, -52.90625, -44.65625, -97.875, + 81.75, 5.4296875, -29.234375, 72.4375, -59.34375, + 39.1875, -66, -4.203125, -60.53125, 55.875, + 80.3125, 72.875, -46.59375, 20.5, -31.125, + -57.28125, -26.625, 15.9375, -78.75, 72.3125 + ], + 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'roundingType': 'ceil', + 'outputSizes': [2, 2] + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 99.3125, 9.7421875, 99.3125, 72.125, 81.75, 72.4375, 81.75, 72.4375 + ], + 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'} + } + } + } + }, + { + 'name': + 'maxPool2d float16 4D tensor options.dilations with options.strides', + 'graph': { + 'inputs': { + 'maxPool2dInput': { + 'data': [ + 34.6875, -24.703125, -60.4375, 35.9375, 60.90625, + 79.4375, -77.875, 54.1875, -21.578125, -49.09375, + 78.5625, 74.3125, -87.9375, 79.8125, 11.6796875, + -12.15625, -22.328125, 33.09375, 8.640625, 47.03125, + 95.8125, -88, -98.5625, 16.15625, 21.390625, + 95.125, -40.8125, -88.6875, -40.78125, 67.875, + -50.34375, -96.5625, 12.5078125, -6.63671875, -44.8125, + 80.25, -65.6875, -14.8828125, -66.5625, 20.078125, + -27.953125, -56.625, 82.75, 93.3125, -34.0625, + -22.875, 73.25, 41.125, -19.75, 80.0625, + -69.875, 14.015625, -61.375, 51.53125, 43.53125, + -89.5625, 51.4375, 73.9375, -80.25, 94.75, + 95.25, 58.125, 19.890625, -70, 63.40625, + -54.125, -97.25, -60.65625, -31.046875, -14.6484375, + -63.75, 47.34375, 85.5625, -53.375, -70.875, + 47.34375, 83.375, 7.36328125, 46.84375, 98.125, + -43.9375, 50.34375, 37.46875, -54.53125, -6.2109375, + 34.40625, 11.8203125, 72.4375, 86.375, 4.1484375, + 88.3125, 98.3125, -66.75, 58.0625, -51.15625, + -17.765625, 9.9609375, -52.75 + ], + 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'maxPool2d', + 'arguments': [ + {'input': 'maxPool2dInput'}, { + 'options': { + 'windowDimensions': [3, 3], + 'padding': [1, 0, 0, 1], + 'strides': [2, 2], + 'dilations': [1, 1], + 'layout': 'nhwc' + } + } + ], + 'outputs': 'maxPool2dOutput' + }], + 'expectedOutputs': { + 'maxPool2dOutput': { + 'data': [ + 60.90625, 79.4375, 95.8125, 79.4375, 78.5625, 95.125, 82.75, + 93.3125, 95.8125, 80.25, 43.53125, 95.125, 95.25, 94.75, 95.25, + 98.125, 63.40625, 98.125 + ], + 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'} + } + } + } + } +]; + +if (navigator.ml) { + maxPool2dTests.forEach((test) => { + webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); + }); +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js index 3bba726d585..5aed1247e06 100644 --- a/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js @@ -22,6 +22,7 @@ const getNotEqualPrecisionTolerance = (graphResources) => { }; const notEqualTests = [ + // float32 tests { 'name': 'notEqual float32 0D scalar', 'graph': { @@ -524,13 +525,471 @@ const notEqualTests = [ } } } + }, + + // float16 tests + { + 'name': 'notEqual float16 0D scalar', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [-0.62841796875], + 'descriptor': {shape: [], dataType: 'float16'} + }, + 'inputB': { + 'data': [-4.41796875], + 'descriptor': {shape: [], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': {'data': [1], 'descriptor': {shape: [], dataType: 'uint8'}} + } + } + }, + { + 'name': 'notEqual float16 1D constant tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [24], dataType: 'float16'}, + 'constant': true + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [24], dataType: 'float16'}, + 'constant': true + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [24], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 1D tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [24], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [24], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [24], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 2D tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [4, 6], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [4, 6], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [4, 6], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 3D tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 3, 4], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [2, 3, 4], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 3, 4], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 4D tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 5D tensors', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.83984375, 4.99609375, + 0.97265625, -6.171875, 2.806640625, 5.58984375, + 7.765625, -4.30859375, -5.89453125, -8.53125, + 2.806640625, 5.58984375, 0.1783447265625, -4.48046875, + 0.68212890625, -6.6875, 2.806640625, 5.58984375, + -9.0390625, -1.97265625, -3.01171875, 3.626953125 + ], + 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 broadcast 0D to 4D', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [2.806640625], + 'descriptor': {shape: [], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 broadcast 1D to 4D', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [2.806640625], + 'descriptor': {shape: [1], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 broadcast 2D to 4D', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, -4.9609375, -2.86328125, -3.01171875, + 3.626953125 + ], + 'descriptor': {shape: [2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 broadcast 3D to 4D', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + }, + 'inputB': { + 'data': [2.806640625, 5.58984375, -9.0390625, 3.626953125], + 'descriptor': {shape: [2, 2, 1], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } + }, + { + 'name': 'notEqual float16 broadcast 4D to 4D', + 'graph': { + 'inputs': { + 'inputA': { + 'data': [2.806640625], + 'descriptor': {shape: [1, 1, 1, 1], dataType: 'float16'} + }, + 'inputB': { + 'data': [ + 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625, + -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625, + -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875, + -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375, + -6.24609375, -2.849609375, -2.6953125, 5.81640625 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'} + } + }, + 'operators': [{ + 'name': 'notEqual', + 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}], + 'outputs': 'output' + }], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1 + ], + 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'} + } + } + } } ]; if (navigator.ml) { notEqualTests.forEach((test) => { webnn_conformance_test( - buildAndExecuteGraph, getNotEqualPrecisionTolerance, test); + buildAndExecuteGraph, getNotEqualPrecisionTolerance, test, + /*cast_to_supported_type=*/true); }); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); diff --git a/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js b/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js deleted file mode 100644 index 8f81ff565d2..00000000000 --- a/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js +++ /dev/null @@ -1,2312 +0,0 @@ -// META: title=test WebNN API pooling operations -// META: global=window -// META: variant=?cpu -// META: variant=?gpu -// META: variant=?npu -// META: script=../resources/utils.js -// META: timeout=long - -'use strict'; - -// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d -// Compute a pooling operation across all the elements within the moving window -// over the input tensor. -// -// enum MLRoundingType { -// "floor", -// "ceil" -// }; -// -// dictionary MLPool2dOptions { -// sequence<[EnforceRange] unsigned long> windowDimensions; -// sequence<[EnforceRange] unsigned long> padding; -// sequence<[EnforceRange] unsigned long> strides; -// sequence<[EnforceRange] unsigned long> dilations; -// MLInputOperandLayout layout = "nchw"; -// MLRoundingType roundingType = "floor"; -// sequence<[EnforceRange] unsigned long> outputSizes; -// }; -// -// MLOperand averagePool2d( -// MLOperand input, optional MLPool2dOptions options = {}); -// MLOperand l2Pool2d( -// MLOperand input, optional MLPool2dOptions options = {}); -// MLOperand maxPool2d( -// MLOperand input, optional MLPool2dOptions options = {}); - -const poolingOperatorsTests = [ - // averagePool2d tests - { - 'name': - 'averagePool2d float32 4D constant tensor all positive default options', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, - 'constant': true - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [{'input': 'averagePool2dInput'}], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor all positive default options', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [{'input': 'averagePool2dInput'}], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor all negative default options', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - -83.87757873535156, -2.0740277767181396, -7.561108589172363, - -45.274261474609375, -16.36655616760254, -44.908512115478516, - -42.04186248779297, -44.77231979370117, -1.5066279172897339, - -52.65203857421875, -92.01856231689453, -48.004093170166016, - -61.522972106933594, -93.44403839111328, -25.780330657958984, - -95.51873779296875, -10.963757514953613, -59.132747650146484, - -32.60173797607422, -21.4510440826416, -87.115966796875, - -61.326114654541016, -41.989723205566406, -87.8764877319336, - -71.69316101074219, -80.24160766601562, -97.48886108398438, - -75.89422607421875, -45.08991622924805, -88.27134704589844, - -90.71282958984375, -93.32392120361328, -59.14753341674805, - -45.33106231689453, -51.32562255859375, -31.154796600341797, - -31.62424087524414, -62.80168151855469, -63.558509826660156, - -68.96183013916016, -43.09415054321289, -15.803443908691406, - -64.31092071533203, -66.45872497558594, -42.027252197265625, - -26.032955169677734, -22.73752784729004, -70.32036590576172, - -85.28227996826172, -92.10668182373047 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [{'input': 'averagePool2dInput'}], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [-49.258975982666016, -60.52408981323242], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.windowDimensions', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'windowDimensions': [3, 3]}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 43.46498107910156, 49.37273406982422, 42.7481689453125, - 50.038944244384766, 52.452327728271484, 58.46046447753906, - 32.15948486328125, 34.75465393066406, 54.00202560424805, - 49.65404510498047, 41.824440002441406, 35.84912109375, - 43.23125457763672, 37.842769622802734, 32.67961120605469, - 41.17021942138672, 42.79708480834961, 38.987247467041016 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'global averagePool2d float32 4D tensor all positive options.windowDimensions', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'windowDimensions': [5, 5]}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.padding', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'padding': [1, 0, 0, 1]}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 52.43666076660156, 49.84208297729492, 47.26926803588867, - 46.15715408325195, 46.63268280029297, 43.616947174072266, - 44.72445297241211, 44.05451583862305 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.strides', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 43.46498107910156, 42.7481689453125, 32.15948486328125, - 54.00202560424805, 49.65404510498047, 35.84912109375, - 41.17021942138672, 38.987247467041016 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.dilations', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [32.2001838684082, 42.971012115478516], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.layout=nchw', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': - [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.layout=nhwc', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 91.59549713134766, 78.15438079833984, - 65.64701080322266, 9.686111450195312, 55.14215087890625, - 51.298038482666016, 18.432437896728516, 32.193084716796875, - 49.34624099731445, 87.65037536621094, 15.648024559020996, - 87.25082397460938, 68.02723693847656, 39.49794006347656, - 20.342548370361328, 80.0996322631836, 26.727949142456055, - 10.220142364501953, 64.87446594238281, 52.602699279785156, - 46.5671501159668, 1.4128639698028564, 79.57833099365234, - 11.95406436920166, 4.33846378326416, 85.00074768066406, - 38.183837890625, 64.78374481201172, 45.25398254394531, - 88.03128814697266, 80.9718017578125, 11.333850860595703, - 67.58124542236328, 70.61659240722656, 6.0264997482299805, - 84.90442657470703, 29.7788143157959, 79.06687927246094, - 58.58993148803711, 7.3287248611450195, 2.2384984493255615, - 35.97796630859375, 14.50549030303955, 10.177306175231934, - 68.72449493408203, 1.4140757322311401, 76.45657348632812, - 78.10037994384766, 23.53263282775879 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': - [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'global averagePool2d float32 4D tensor options.layout=nhwc and options.windowDimensions', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 91.59549713134766, 78.15438079833984, - 65.64701080322266, 9.686111450195312, 55.14215087890625, - 51.298038482666016, 18.432437896728516, 32.193084716796875, - 49.34624099731445, 87.65037536621094, 15.648024559020996, - 87.25082397460938, 68.02723693847656, 39.49794006347656, - 20.342548370361328, 80.0996322631836, 26.727949142456055, - 10.220142364501953, 64.87446594238281, 52.602699279785156, - 46.5671501159668, 1.4128639698028564, 79.57833099365234, - 11.95406436920166, 4.33846378326416, 85.00074768066406, - 38.183837890625, 64.78374481201172, 45.25398254394531, - 88.03128814697266, 80.9718017578125, 11.333850860595703, - 67.58124542236328, 70.61659240722656, 6.0264997482299805, - 84.90442657470703, 29.7788143157959, 79.06687927246094, - 58.58993148803711, 7.3287248611450195, 2.2384984493255615, - 35.97796630859375, 14.50549030303955, 10.177306175231934, - 68.72449493408203, 1.4140757322311401, 76.45657348632812, - 78.10037994384766, 23.53263282775879 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, - {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}} - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [47.26926803588867, 44.72445297241211], - 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.roundingType=floor', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 37.16582489013672, 50.038944244384766, - 58.46046447753906, 52.73374557495117, 39.1442985534668, - 43.23125457763672, 32.67961120605469 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'averagePool2d float32 4D tensor options.roundingType=ceil', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 37.16582489013672, 21.206613540649414, - 50.038944244384766, 58.46046447753906, 51.3569221496582, - 37.24428939819336, 54.04661178588867, 78.58363342285156, - 52.73374557495117, 39.1442985534668, 57.1103515625, - 43.23125457763672, 32.67961120605469, 56.23945999145508, - 40.00800323486328, 43.85149002075195, 41.061283111572266 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.roundingType=ceil and no padding', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656 - ], - 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'strides': [2, 2], - 'roundingType': 'ceil' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 51.20364761352539, 40.29140853881836, 50.77684020996094, - 51.70764923095703, 50.63130187988281, 49.3919792175293, - 53.128265380859375, 51.11610412597656 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=floor', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 91.59549713134766, 78.15438079833984, - 65.64701080322266, 9.686111450195312, 55.14215087890625, - 51.298038482666016, 18.432437896728516, 32.193084716796875, - 49.34624099731445, 87.65037536621094, 15.648024559020996, - 87.25082397460938, 68.02723693847656, 39.49794006347656, - 20.342548370361328, 80.0996322631836, 26.727949142456055, - 10.220142364501953, 64.87446594238281, 52.602699279785156, - 46.5671501159668, 1.4128639698028564, 79.57833099365234, - 11.95406436920166, 4.33846378326416, 85.00074768066406, - 38.183837890625, 64.78374481201172, 45.25398254394531, - 88.03128814697266, 80.9718017578125, 11.333850860595703, - 67.58124542236328, 70.61659240722656, 6.0264997482299805, - 84.90442657470703, 29.7788143157959, 79.06687927246094, - 58.58993148803711, 7.3287248611450195, 2.2384984493255615, - 35.97796630859375, 14.50549030303955, 10.177306175231934, - 68.72449493408203, 1.4140757322311401, 76.45657348632812, - 78.10037994384766, 23.53263282775879 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'layout': 'nhwc', - 'roundingType': 'floor' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 52.73374557495117, 37.16582489013672, - 39.1442985534668, 50.038944244384766, 43.23125457763672, - 58.46046447753906, 32.67961120605469 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=ceil', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 91.59549713134766, 78.15438079833984, - 65.64701080322266, 9.686111450195312, 55.14215087890625, - 51.298038482666016, 18.432437896728516, 32.193084716796875, - 49.34624099731445, 87.65037536621094, 15.648024559020996, - 87.25082397460938, 68.02723693847656, 39.49794006347656, - 20.342548370361328, 80.0996322631836, 26.727949142456055, - 10.220142364501953, 64.87446594238281, 52.602699279785156, - 46.5671501159668, 1.4128639698028564, 79.57833099365234, - 11.95406436920166, 4.33846378326416, 85.00074768066406, - 38.183837890625, 64.78374481201172, 45.25398254394531, - 88.03128814697266, 80.9718017578125, 11.333850860595703, - 67.58124542236328, 70.61659240722656, 6.0264997482299805, - 84.90442657470703, 29.7788143157959, 79.06687927246094, - 58.58993148803711, 7.3287248611450195, 2.2384984493255615, - 35.97796630859375, 14.50549030303955, 10.177306175231934, - 68.72449493408203, 1.4140757322311401, 76.45657348632812, - 78.10037994384766, 23.53263282775879 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'layout': 'nhwc', - 'roundingType': 'ceil' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 52.73374557495117, 37.16582489013672, - 39.1442985534668, 21.206613540649414, 57.1103515625, - 50.038944244384766, 43.23125457763672, 58.46046447753906, - 32.67961120605469, 51.3569221496582, 56.23945999145508, - 37.24428939819336, 40.00800323486328, 54.04661178588867, - 43.85149002075195, 78.58363342285156, 41.061283111572266 - ], - 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor', - 'outputSizes': [3, 3] - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 37.16582489013672, 21.206613540649414, - 50.038944244384766, 58.46046447753906, 51.3569221496582, - 37.24428939819336, 54.04661178588867, 78.58363342285156, - 52.73374557495117, 39.1442985534668, 57.1103515625, - 43.23125457763672, 32.67961120605469, 56.23945999145508, - 40.00800323486328, 43.85149002075195, 41.061283111572266 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 22.975555419921875, 78.15438079833984, 9.686111450195312, - 51.298038482666016, 32.193084716796875, 87.65037536621094, - 87.25082397460938, 39.49794006347656, 80.0996322631836, - 10.220142364501953, 52.602699279785156, 1.4128639698028564, - 11.95406436920166, 85.00074768066406, 64.78374481201172, - 88.03128814697266, 11.333850860595703, 70.61659240722656, - 84.90442657470703, 79.06687927246094, 7.3287248611450195, - 35.97796630859375, 10.177306175231934, 1.4140757322311401, - 78.10037994384766, 91.59549713134766, 65.64701080322266, - 55.14215087890625, 18.432437896728516, 49.34624099731445, - 15.648024559020996, 68.02723693847656, 20.342548370361328, - 26.727949142456055, 64.87446594238281, 46.5671501159668, - 79.57833099365234, 4.33846378326416, 38.183837890625, - 45.25398254394531, 80.9718017578125, 67.58124542236328, - 6.0264997482299805, 29.7788143157959, 58.58993148803711, - 2.2384984493255615, 14.50549030303955, 68.72449493408203, - 76.45657348632812, 23.53263282775879 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil', - 'outputSizes': [2, 2] - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 54.20252990722656, 37.16582489013672, 50.038944244384766, - 58.46046447753906, 52.73374557495117, 39.1442985534668, - 43.23125457763672, 32.67961120605469 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'averagePool2d float32 4D tensor options.dilations with options.strides', - 'graph': { - 'inputs': { - 'averagePool2dInput': { - 'data': [ - 70.71148681640625, 99.33489990234375, 76.41767883300781, - 39.40980911254883, 38.16328811645508, 45.971256256103516, - 65.3527603149414, 64.51607513427734, 7.725966930389404, - 41.7672004699707, 94.92633819580078, 53.475772857666016, - 95.46460723876953, 58.461795806884766, 15.831390380859375, - 78.41020202636719, 24.454092025756836, 20.630916595458984, - 32.06352233886719, 47.85192108154297, 91.60813903808594, - 72.3534927368164, 74.69429779052734, 28.860214233398438, - 71.82395935058594, 7.989691734313965, 88.16659545898438, - 58.69850540161133, 63.6061897277832, 55.88187789916992, - 52.809974670410156, 72.91474151611328, 46.957664489746094, - 22.10279655456543, 87.14309692382812, 89.6496810913086, - 63.19610595703125, 11.760882377624512, 70.68730926513672, - 57.70444107055664, 1.183821439743042, 25.26912498474121, - 95.29122924804688, 1.9658530950546265, 53.368465423583984, - 21.400854110717773, 55.86185836791992, 27.824508666992188, - 7.642839431762695, 82.34233093261719, 91.75215911865234, - 62.79155731201172, 28.11526107788086, 28.72478675842285, - 29.887035369873047, 66.4310302734375, 7.0103044509887695, - 34.33702087402344, 73.20159912109375, 7.8835601806640625, - 17.82563591003418, 33.799156188964844, 65.01251220703125, - 30.264028549194336, 75.76551818847656, 21.150800704956055, - 60.84249496459961, 98.56522369384766, 62.60990905761719, - 42.42991256713867, 53.142147064208984, 36.29545974731445, - 79.95863342285156, 79.60734558105469, 16.059114456176758, - 19.27552032470703, 53.93022918701172, 48.41620635986328, - 93.00965118408203, 62.086524963378906, 83.50532531738281, - 61.07964324951172, 75.51439666748047, 54.193782806396484, - 2.572873830795288, 59.47652053833008, 34.22541427612305, - 13.07015323638916, 12.419061660766602, 55.82337188720703, - 4.553813934326172, 63.47830581665039, 62.3555908203125, - 56.961090087890625, 34.77016067504883, 0.9611223936080933, - 35.30686950683594, 98.00790405273438 - ], - 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'averagePool2d', - 'arguments': [ - {'input': 'averagePool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'layout': 'nhwc' - } - } - ], - 'outputs': 'averagePool2dOutput' - }], - 'expectedOutputs': { - 'averagePool2dOutput': { - 'data': [ - 42.940242767333984, 55.268165588378906, 51.6013298034668, - 50.220027923583984, 72.13362884521484, 41.542198181152344, - 48.91604232788086, 38.775962829589844, 61.21329879760742, - 49.504154205322266, 57.72294998168945, 38.6922492980957, - 50.19099807739258, 29.15436363220215, 52.98439025878906, - 43.10562515258789, 66.77796936035156, 55.2725830078125 - ], - 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} - } - } - } - }, - - // l2Pool2d tests - { - 'name': 'l2Pool2d float32 4D constant tensor all positive default options', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, - 'constant': true - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [{'input': 'l2Pool2dInput'}], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [289.01953125, 292.6146545410156], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor default all positive options', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [{'input': 'l2Pool2dInput'}], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [289.01953125, 292.6146545410156], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor default all negative options', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - -1.1957088708877563, -9.706199645996094, -39.54935836791992, - -82.34971618652344, -32.87415313720703, -50.22603225708008, - -31.17849349975586, -55.817893981933594, -46.70829391479492, - -38.68181228637695, -63.299320220947266, -35.09224319458008, - -80.93848419189453, -82.8619613647461, -40.41627502441406, - -34.86458206176758, -84.33639526367188, -84.11852264404297, - -5.525088787078857, -99.03114318847656, -75.505126953125, - -91.43389129638672, -96.71258544921875, -16.722585678100586, - -17.98292350769043, -58.06570816040039, -11.846800804138184, - -97.90313720703125, -38.69822692871094, -80.19510650634766, - -48.72047805786133, -90.86722564697266, -99.10758209228516, - -79.70288848876953, -59.3824462890625, -9.967330932617188, - -39.27534866333008, -10.469644546508789, -27.565326690673828, - -2.0468990802764893, -81.88761901855469, -66.88040161132812, - -85.98504638671875, -29.674592971801758, -19.649417877197266, - -89.39192199707031, -61.13504409790039, -84.16869354248047, - -77.36112213134766, -91.17266082763672 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [{'input': 'l2Pool2dInput'}], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [298.928955078125, 326.83587646484375], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.windowDimensions', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}} - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 194.45481872558594, 189.54539489746094, 189.85488891601562, - 160.0518341064453, 167.1435546875, 149.63897705078125, - 161.15570068359375, 190.5449981689453, 168.4636688232422, - 170.331787109375, 155.60073852539062, 174.72145080566406, - 165.07762145996094, 165.45819091796875, 161.11062622070312, - 176.6307373046875, 174.245361328125, 180.60714721679688 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.padding', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 254.81358337402344, 233.14259338378906, 289.01953125, - 269.777587890625, 241.52200317382812, 212.99337768554688, - 292.6146545410156, 253.77178955078125 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.strides', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 194.45481872558594, 189.85488891601562, 161.15570068359375, - 168.4636688232422, 170.331787109375, 174.72145080566406, - 176.6307373046875, 180.60714721679688 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.dilations', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [189.47933959960938, 207.25343322753906], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.layout=nchw', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': - [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [289.01953125, 292.6146545410156], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.layout=nhwc', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 52.027313232421875, 76.55464172363281, - 6.397815227508545, 62.71847152709961, 84.54785919189453, - 83.8726577758789, 18.622516632080078, 73.10235595703125, - 34.10626220703125, 41.52470779418945, 73.96932220458984, - 39.3339729309082, 36.1437873840332, 86.59486389160156, - 60.73781967163086, 23.09039306640625, 55.09187316894531, - 53.650146484375, 63.8924446105957, 0.00902052316814661, - 59.36124038696289, 42.78899383544922, 50.91202926635742, - 81.03960418701172, 50.339813232421875, 33.48585510253906, - 59.31963348388672, 33.67196273803711, 70.78031921386719, - 0.42822372913360596, 35.56179428100586, 80.07991790771484, - 82.53382873535156, 5.929991722106934, 7.572360038757324, - 48.89164733886719, 61.90089416503906, 15.282920837402344, - 14.084012985229492, 13.335721969604492, 90.86540985107422, - 39.06557846069336, 39.56248474121094, 97.06050109863281, - 67.77167510986328, 83.68133544921875, 69.69512176513672, - 21.79571533203125, 89.54518127441406 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': - [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [289.01953125, 292.6146545410156], - 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.roundingType=floor', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor' - } - } - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 171.5061492919922, 164.9919891357422, 160.0518341064453, - 149.63897705078125, 142.6990966796875, 139.51637268066406, - 165.07762145996094, 161.11062622070312 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.roundingType=ceil', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil' - } - } - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 171.5061492919922, 164.9919891357422, 90.6768569946289, - 160.0518341064453, 149.63897705078125, 65.15908813476562, - 132.56260681152344, 139.84808349609375, 26.61993408203125, - 142.6990966796875, 139.51637268066406, 72.42569732666016, - 165.07762145996094, 161.11062622070312, 96.38701629638672, - 150.1616668701172, 146.8201904296875, 90.64601135253906 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor', - 'outputSizes': [3, 3] - } - } - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 171.5061492919922, 164.9919891357422, 90.6768569946289, - 160.0518341064453, 149.63897705078125, 65.15908813476562, - 132.56260681152344, 139.84808349609375, 26.61993408203125, - 142.6990966796875, 139.51637268066406, 72.42569732666016, - 165.07762145996094, 161.11062622070312, 96.38701629638672, - 150.1616668701172, 146.8201904296875, 90.64601135253906 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 94.07447814941406, 76.55464172363281, 62.71847152709961, - 83.8726577758789, 73.10235595703125, 41.52470779418945, - 39.3339729309082, 86.59486389160156, 23.09039306640625, - 53.650146484375, 0.00902052316814661, 42.78899383544922, - 81.03960418701172, 33.48585510253906, 33.67196273803711, - 0.42822372913360596, 80.07991790771484, 5.929991722106934, - 48.89164733886719, 15.282920837402344, 13.335721969604492, - 39.06557846069336, 97.06050109863281, 83.68133544921875, - 21.79571533203125, 52.027313232421875, 6.397815227508545, - 84.54785919189453, 18.622516632080078, 34.10626220703125, - 73.96932220458984, 36.1437873840332, 60.73781967163086, - 55.09187316894531, 63.8924446105957, 59.36124038696289, - 50.91202926635742, 50.339813232421875, 59.31963348388672, - 70.78031921386719, 35.56179428100586, 82.53382873535156, - 7.572360038757324, 61.90089416503906, 14.084012985229492, - 90.86540985107422, 39.56248474121094, 67.77167510986328, - 69.69512176513672, 89.54518127441406 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil', - 'outputSizes': [2, 2] - } - } - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 171.5061492919922, 164.9919891357422, 160.0518341064453, - 149.63897705078125, 142.6990966796875, 139.51637268066406, - 165.07762145996094, 161.11062622070312 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'l2Pool2d float32 4D tensor options.dilations with options.strides', - 'graph': { - 'inputs': { - 'l2Pool2dInput': { - 'data': [ - 6.5550384521484375, 26.254413604736328, 28.47271156311035, - 64.81202697753906, 39.65838623046875, 10.465584754943848, - 47.94060134887695, 42.208946228027344, 36.834041595458984, - 68.50249481201172, 2.0496721267700195, 49.73927688598633, - 59.97947311401367, 71.08380889892578, 0.20033331215381622, - 19.39293670654297, 70.1269302368164, 86.8837661743164, - 84.28858184814453, 9.695697784423828, 62.69126510620117, - 51.924110412597656, 5.412675857543945, 70.82118225097656, - 81.61302947998047, 29.148712158203125, 85.83409881591797, - 71.36548614501953, 44.09445571899414, 58.343570709228516, - 43.37118148803711, 54.025882720947266, 85.50556945800781, - 93.19215393066406, 10.992993354797363, 34.864158630371094, - 96.2605209350586, 44.29584503173828, 61.12482833862305, - 79.62699127197266, 4.066447734832764, 64.89644622802734, - 97.5897445678711, 11.257055282592773, 61.151283264160156, - 20.312341690063477, 39.862640380859375, 68.747314453125, - 89.61034393310547, 22.28224754333496, 41.36311721801758, - 62.9378662109375, 79.54936218261719, 55.64254379272461, - 54.47548294067383, 77.04864501953125, 56.83576965332031, - 80.57747650146484, 70.43293762207031, 85.67094421386719, - 19.527807235717773, 33.87490463256836, 14.498117446899414, - 92.85955810546875, 96.8167724609375, 28.399721145629883, - 99.917236328125, 48.76692199707031, 86.08634948730469, - 47.32324981689453, 7.223662376403809, 82.97200775146484, - 38.374778747558594, 22.10988426208496, 14.797550201416016, - 2.3872148990631104, 83.26342010498047, 46.41500473022461, - 28.659175872802734, 13.919462203979492, 55.413089752197266, - 62.68498992919922, 78.54127502441406, 31.142845153808594, - 4.806727886199951, 33.233642578125, 24.749773025512695, - 1.529007077217102, 42.976322174072266, 93.08572387695312, - 77.908935546875, 45.74395751953125, 62.868892669677734, - 60.689762115478516, 20.046878814697266, 13.203198432922363, - 33.33952713012695, 0.5279953479766846 - ], - 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'l2Pool2d', - 'arguments': [ - {'input': 'l2Pool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'dilations': [1, 1], - 'layout': 'nhwc' - } - } - ], - 'outputs': 'l2Pool2dOutput' - }], - 'expectedOutputs': { - 'l2Pool2dOutput': { - 'data': [ - 120.20333862304688, 114.0977783203125, 127.63969421386719, - 119.95613861083984, 137.89837646484375, 152.24261474609375, - 194.9647216796875, 168.20205688476562, 197.7173309326172, - 169.85887145996094, 195.1484832763672, 190.96127319335938, - 158.64576721191406, 166.2051544189453, 171.07916259765625, - 148.70985412597656, 218.7123260498047, 153.33311462402344 - ], - 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} - } - } - } - }, - - // maxPool2d tests - { - 'name': 'maxPool2d float32 4D constant tensor default options', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}, - 'constant': true - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [{'input': 'maxPool2dInput'}], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [99.28312683105469, 81.73119354248047], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor default options', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [{'input': 'maxPool2dInput'}], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [99.28312683105469, 81.73119354248047], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.windowDimensions', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}} - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - '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 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.padding', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}} - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [ - 99.28312683105469, 99.28312683105469, 99.28312683105469, - 99.28312683105469, 81.73119354248047, 72.8883056640625, - 81.73119354248047, 72.8883056640625 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.strides', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}} - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [ - 99.28312683105469, 66.09259033203125, 97.90348052978516, - 72.1085205078125, 81.73119354248047, 72.44898986816406, - 80.30484008789062, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.dilations', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, - {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}} - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [89.00830078125, 72.33577728271484], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.layout=nchw', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': - [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [99.28312683105469, 81.73119354248047], - 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.layout=nhwc', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -76.72171020507812, -45.72039031982422, - 50.217063903808594, -61.306129455566406, -52.895477294921875, - -4.014514446258545, -44.642333984375, -94.54893493652344, - -97.86752319335938, 46.28090286254883, 81.73119354248047, - 99.28312683105469, 5.428491115570068, -10.057873725891113, - -29.22772789001465, 9.742474555969238, 72.44898986816406, - -39.03501892089844, -59.34124755859375, 75.08192443847656, - 39.19960021972656, 12.819415092468262, -65.99439239501953, - -33.01505661010742, -4.204323768615723, 38.691341400146484, - -60.54586410522461, 66.09259033203125, 55.890525817871094, - 97.90348052978516, 80.30484008789062, -8.737770080566406, - 72.8883056640625, -53.42162322998047, -46.59611129760742, - 72.1085205078125, 20.50387954711914, -40.423091888427734, - -31.126462936401367, -35.68864440917969, -57.294559478759766, - -87.64779663085938, -26.623577117919922, 38.874244689941406, - 15.935754776000977, 39.383602142333984, -78.77953338623047, - 7.429088115692139, 72.33577728271484 - ], - 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': - [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [99.28312683105469, 81.73119354248047], - 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.roundingType=floor', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor' - } - } - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [ - 99.28312683105469, 9.742474555969238, 99.28312683105469, - 72.1085205078125, 81.73119354248047, 72.44898986816406, - 81.73119354248047, 72.44898986816406 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': 'maxPool2d float32 4D tensor options.roundingType=ceil', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil' - } - } - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - '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 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'floor', - 'outputSizes': [3, 3] - } - } - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - '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 - ], - 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 89.00830078125, -45.72039031982422, -61.306129455566406, - -4.014514446258545, -94.54893493652344, 46.28090286254883, - 99.28312683105469, -10.057873725891113, 9.742474555969238, - -39.03501892089844, 75.08192443847656, 12.819415092468262, - -33.01505661010742, 38.691341400146484, 66.09259033203125, - 97.90348052978516, -8.737770080566406, -53.42162322998047, - 72.1085205078125, -40.423091888427734, -35.68864440917969, - -87.64779663085938, 38.874244689941406, 39.383602142333984, - 7.429088115692139, -76.72171020507812, 50.217063903808594, - -52.895477294921875, -44.642333984375, -97.86752319335938, - 81.73119354248047, 5.428491115570068, -29.22772789001465, - 72.44898986816406, -59.34124755859375, 39.19960021972656, - -65.99439239501953, -4.204323768615723, -60.54586410522461, - 55.890525817871094, 80.30484008789062, 72.8883056640625, - -46.59611129760742, 20.50387954711914, -31.126462936401367, - -57.294559478759766, -26.623577117919922, 15.935754776000977, - -78.77953338623047, 72.33577728271484 - ], - 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'roundingType': 'ceil', - 'outputSizes': [2, 2] - } - } - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - 'data': [ - 99.28312683105469, 9.742474555969238, 99.28312683105469, - 72.1085205078125, 81.73119354248047, 72.44898986816406, - 81.73119354248047, 72.44898986816406 - ], - 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'} - } - } - } - }, - { - 'name': - 'maxPool2d float32 4D tensor options.dilations with options.strides', - 'graph': { - 'inputs': { - 'maxPool2dInput': { - 'data': [ - 34.69258117675781, -24.706249237060547, -60.428070068359375, - 35.93883514404297, 60.896095275878906, 79.42220306396484, - -77.85906219482422, 54.188209533691406, -21.576934814453125, - -49.10390853881836, 78.55176544189453, 74.28213500976562, - -87.92769622802734, 79.82047271728516, 11.680922508239746, - -12.154505729675293, -22.33293914794922, 33.084861755371094, - 8.640676498413086, 47.040645599365234, 95.7823486328125, - -88.01998138427734, -98.53630065917969, 16.158977508544922, - 21.396089553833008, 95.1323471069336, -40.80724334716797, - -88.70922088623047, -40.772769927978516, 67.89842987060547, - -50.337467193603516, -96.56610870361328, 12.508098602294922, - -6.6358113288879395, -44.80198287963867, 80.27474212646484, - -65.68411254882812, -14.884790420532227, -66.54857635498047, - 20.072338104248047, -27.954269409179688, -56.62217330932617, - 82.7479476928711, 93.30175018310547, -34.073394775390625, - -22.87164306640625, 73.25525665283203, 41.14021682739258, - -19.75514793395996, 80.07701110839844, -69.89276885986328, - 14.013250350952148, -61.36640167236328, 51.53046417236328, - 43.53886413574219, -89.5888671875, 51.45121765136719, - 73.9239730834961, -80.25264739990234, 94.72747802734375, - 95.25411224365234, 58.12575149536133, 19.885723114013672, - -70.0301284790039, 63.419517517089844, -54.11785125732422, - -97.22807312011719, -60.65826416015625, -31.04998016357422, - -14.646553039550781, -63.73688888549805, 47.34630584716797, - 85.56405639648438, -53.389251708984375, -70.84739685058594, - 47.355045318603516, 83.38397979736328, 7.361695289611816, - 46.85823440551758, 98.13465881347656, -43.9396858215332, - 50.33780288696289, 37.45563507080078, -54.52760696411133, - -6.212307929992676, 34.41734313964844, 11.8167724609375, - 72.44517517089844, 86.3460922241211, 4.14656925201416, - 88.33040618896484, 98.29994201660156, -66.72379302978516, - 58.0643424987793, -51.168277740478516, -17.768583297729492, - 9.961172103881836, -52.73843002319336 - ], - 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'} - } - }, - 'operators': [{ - 'name': 'maxPool2d', - 'arguments': [ - {'input': 'maxPool2dInput'}, { - 'options': { - 'windowDimensions': [3, 3], - 'padding': [1, 0, 0, 1], - 'strides': [2, 2], - 'dilations': [1, 1], - 'layout': 'nhwc' - } - } - ], - 'outputs': 'maxPool2dOutput' - }], - 'expectedOutputs': { - 'maxPool2dOutput': { - '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 - ], - 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'} - } - } - } - } -]; - -if (navigator.ml) { - poolingOperatorsTests.forEach((test) => { - webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test); - }); -} else { - test(() => assert_implements(navigator.ml, 'missing navigator.ml')); -} diff --git a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js index 996a6b472c5..a6155fb25ce 100644 --- a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js @@ -2041,6 +2041,72 @@ const subgraphTests = [ } }, { + 'name': 'quantized argMax', + 'graph': { + 'inputs': { + 'input': { + 'data': [ + 2.549168109893799, 4.794857501983643, 7.413617134094238, + 8.413617134094238, 6.108623504638672, 3.549168109893799, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'}, + 'constant': false + }, + 'inputScale': { + 'data': [0.343092918395996], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'inputZeroPoint': { + 'data': [-128], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + 'outputScale': { + 'data': [0.343092918395996], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'outputZeroPoint': { + 'data': [-128], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + }, + 'operators': [ + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'input'}, + {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'} + ], + 'outputs': 'quantizedInput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedInput'}, + {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'} + ], + 'outputs': 'dequantizedInput' + }, + { + 'name': 'argMax', + 'arguments': [{'input': 'dequantizedInput'}, {'axis': 0}], + 'outputs': 'output' + }, + ], + 'expectedOutputs': { + 'output': { + 'data': [ + 1, 1, 0, + ], + 'descriptor': {shape: [3], dataType: 'int32'} + } + } + } + }, + { 'name': 'quantized softmax', 'graph': { 'inputs': { @@ -2540,6 +2606,176 @@ const subgraphTests = [ } } }, + { + 'name': 'quantized pad with reflection mode', + 'graph': { + 'inputs': { + 'input': { + 'data': [ + 1.6811466217041016, 0.0479511022567749, 0.33355462551116943, + -0.1988269537687301, -0.0041167140007019, -0.0634240251779556, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'}, + 'constant': false + }, + 'inputScale': { + 'data': [0.003921568859368563], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'inputZeroPoint': { + 'data': [0], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + 'outputScale': { + 'data': [0.003921568859368563], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'outputZeroPoint': { + 'data': [0], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + }, + 'operators': [ + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'input'}, + {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'} + ], + 'outputs': 'quantizedInput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedInput'}, + {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'} + ], + 'outputs': 'dequantizedInput' + }, + { + 'name': 'pad', + 'arguments': [ + {'input': 'dequantizedInput'}, {'beginningPadding': [1, 2]}, + {'endingPadding': [1, 2]}, {'options': {'mode': 'reflection'}} + ], + 'outputs': 'padOutput' + }, + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'padOutput'}, + {'scale': 'outputScale', 'zeroPoint': 'outputZeroPoint'} + ], + 'outputs': 'quantizedPadOutput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedPadOutput'}, + {'scale': 'outputScale', 'zeroPoint': 'outputZeroPoint'} + ], + 'outputs': 'output' + } + ], + 'expectedOutputs': { + 'output': { + 'data': [ + -0.062745101749897, -0.003921568859368563, -0.20000001788139343, + -0.003921568859368563, -0.062745101749897, -0.003921568859368563, + -0.20000001788139343, 0.3333333432674408, 0.0470588281750679, + 0.49803924560546875, 0.0470588281750679, 0.3333333432674408, + 0.0470588281750679, 0.49803924560546875, -0.062745101749897, + -0.003921568859368563, -0.20000001788139343, -0.003921568859368563, + -0.062745101749897, -0.003921568859368563, -0.20000001788139343, + 0.3333333432674408, 0.0470588281750679, 0.49803924560546875, + 0.0470588281750679, 0.3333333432674408, 0.0470588281750679, + 0.49803924560546875, + ], + 'descriptor': {shape: [4, 7], dataType: 'float32'} + } + } + } + }, + { + 'name': 'quantized clamp', + 'graph': { + 'inputs': { + 'input': { + 'data': [ + 8.413617134094238, 6.108623504638672, 3.549168109893799, + 1.6811466217041016, -0.1988269537687301, -8.413617134094238, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'}, + 'constant': false + }, + 'scale': { + 'data': [0.343092918395996], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'zeroPoint': { + 'data': [0], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + }, + 'operators': [ + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'input'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedInput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedInput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'dequantizedInput' + }, + { + 'name': 'clamp', + 'arguments': [ + {'input': 'dequantizedInput'}, + {'options': {'minValue': 0, 'maxValue': 6}} + ], + 'outputs': 'clampOutput' + }, + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'clampOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedClampOutput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedClampOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'output' + } + ], + 'expectedOutputs': { + 'output': { + 'data': [ + 5.832579612731934, 5.832579612731934, 3.430929183959961, + 1.7154645919799805, 0, 0, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'} + } + } + } + }, ]; if (navigator.ml) { diff --git a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html new file mode 100644 index 00000000000..14b76efb575 --- /dev/null +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html @@ -0,0 +1,79 @@ +<!doctype html> +<meta charset=utf-8> +<title>Audio Level in RTCEncodedAudioFrameMetadata</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/webrtc/RTCPeerConnection-helper.js"></script> +<script src="RTCEncodedFrame-timestamps-helper.js"></script> +<script> +'use strict'; + +function doWorkExpectingAudioLevel() { + onrtctransform = async e => { + const reader = e.transformer.readable.getReader(); + const writer = e.transformer.writable.getWriter(); + for (let i = 0; i<10; i++) { + const frameOrDone = await reader.read(); + if (frameOrDone.done) { + self.postMessage("Unexpected end of stream"); + return; + } + const metadata = frameOrDone.value.getMetadata(); + if (metadata === undefined) { + self.postMessage("No audioLevel "); + return; + } + if (metadata.audioLevel < 0 || metadata.audioLevel > 1) { + self.postMessage("Invalid audioLevel value"); + return; + } + if (metadata.senderCaptureTimeOffset != 0) { + await writer.write(frameOrDone.value); + } + } + self.postMessage("OK"); + }; +} + +promise_test(async t => { + const worker = new Worker(`data:text/javascript,(${doWorkExpectingAudioLevel.toString()})()`); + const workerPromise = new Promise((resolve, reject) => { + worker.onmessage = t.step_func(message => { + if (message.data == "OK") { + resolve(); + } else { + reject(message.data); + } + }); + }); + + await initiateCall( + t, /*streamOptions=*/{audio: true, video: false}, + /*enableAbsCaptureTime=*/false, worker, /*enableSenderTransform=*/false, + /*enableReceiverTransform=*/true); + + return workerPromise; +}, 'audioLevel present in audio receiver'); + +promise_test(async t => { + const worker = new Worker(`data:text/javascript,(${doWorkExpectingAudioLevel.toString()})()`); + const workerPromise = new Promise((resolve, reject) => { + worker.onmessage = t.step_func(message => { + if (message.data == "OK") { + resolve(); + } else { + reject(message.data); + } + }); + }); + + await initiateCall( + t, /*streamOptions=*/{audio: true, video: false}, + /*enableAbsCaptureTime=*/false, worker, /*enableSenderTransform=*/true, + /*enableReceiverTransform=*/false); + + return workerPromise; +}, 'audioLevel present in audio sender'); + + +</script> diff --git a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html index 1e148fe1b29..b9461940c63 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html @@ -42,6 +42,8 @@ promise_test(async t => { assert_equals(original.getMetadata().rtpTimestamp, newFrame.getMetadata().rtpTimestamp); assert_equals(original.getMetadata().captureTime, newFrame.getMetadata().captureTime); assert_equals(original.getMetadata().receiveTime, newFrame.getMetadata().receiveTime); + assert_true(original.getMetadata().hasOwnProperty('audioLevel')); + assert_equals(original.getMetadata().audioLevel, newFrame.getMetadata().audioLevel); assert_array_equals(Array.from(original.data), Array.from(newFrame.data)); await writer2.write(newFrame); resolve(); @@ -85,6 +87,7 @@ promise_test(async t => { assert_equals(newMetadata.rtpTimestamp, newFrame.getMetadata().rtpTimestamp); assert_equals(original.getMetadata().receiveTime, newFrame.getMetadata().receiveTime); assert_equals(original.getMetadata().captureTime, newFrame.getMetadata().captureTime); + assert_equals(original.getMetadata().audioLevel, newFrame.getMetadata().audioLevel); assert_array_equals(Array.from(original.data), Array.from(newFrame.data)); await writer2.write(newFrame); resolve(); @@ -133,6 +136,7 @@ promise_test(async t => { }, "Constructing audio frame with bad metadata argument before sending does not work"); promise_test(async t => { + const kAudioLevel = 0.5; const kCaptureTime = 12345; const pc1 = new RTCPeerConnection({encodedInsertableStreams:true}); t.add_cleanup(() => pc1.close()); @@ -147,6 +151,11 @@ promise_test(async t => { const receiverTransformer = new TransformStream({ async transform(encodedFrame, controller) { const metadata = encodedFrame.getMetadata(); + if (metadata.audioLevel === undefined) { + reject("No audioLevel"); + } else if (metadata.audioLevel < kAudioLevel - 0.1 || metadata.audioLevel > kAudioLevel + 0.1) { + reject("Unexpected audioLevel"); + } if (metadata.captureTime < kCaptureTime - 1 || metadata.captureTime > kCaptureTime + 1) { reject("Unexpected captureTime"); } @@ -169,6 +178,7 @@ promise_test(async t => { const senderTransformer = new TransformStream({ async transform(encodedFrame, controller) { let metadata = encodedFrame.getMetadata(); + metadata.audioLevel = kAudioLevel; metadata.captureTime = kCaptureTime; controller.enqueue(new RTCEncodedAudioFrame(encodedFrame, {metadata})); } diff --git a/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html b/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html index 708d59e5242..d5429fa80fa 100644 --- a/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html +++ b/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html @@ -3,7 +3,6 @@ <title>RTX codec integrity checks</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="../RTCPeerConnection-helper.js"></script> <script> 'use strict'; @@ -52,61 +51,35 @@ function getCodecsWithDirection(mimeType, direction) { return codecs; } -// Returns an array of { mimeType, payloadType, sdpFmtpLine } entries in the -// order that they appeared in the SDP. +// Returns an array of { mimeType, payloadType, sdpFmtpLine } entries in codec +// preference order from the first m-section of the SDP. function parseCodecsFromSdp(sdp) { const codecs = []; - // For each a=rtpmap:... - const kRtpMapLineRegex = /\r\na=rtpmap:/g; - for (const match of sdp.matchAll(kRtpMapLineRegex)) { - const rtpmapIndex = match.index + 11; - const rtpmapSpaceIndex = sdp.indexOf(' ', rtpmapIndex) - const payloadType = Number(sdp.slice(rtpmapIndex, rtpmapSpaceIndex)); - const codecName = sdp.slice(rtpmapSpaceIndex + 1, - sdp.indexOf('/', rtpmapSpaceIndex)); - let sdpFmtpLine = undefined; // Can be undefined e.g. VP8. - const fmtpLineWithPT = `\r\na=fmtp:${payloadType} `; - let fmtpIndex = sdp.indexOf(fmtpLineWithPT, rtpmapIndex); - if (fmtpIndex != -1) { - fmtpIndex += fmtpLineWithPT.length; - const fmtpLineEnd = sdp.indexOf('\r\n', fmtpIndex); - if (fmtpLineEnd == -1) { - throw 'Parse error: Missing expected end of FMTP line'; - } - sdpFmtpLine = sdp.slice(fmtpIndex, fmtpLineEnd); - } - const codec = { mimeType: `video/${codecName}`, payloadType, sdpFmtpLine }; + const kMLineRegex = /\r\nm=video \d+ [A-Z\/]+ (?<pts>[\d\s]+)\r\n/; + const {groups: {pts}} = kMLineRegex.exec(sdp); + for (const pt of pts.split(" ")) { + const rtpmapRegex = new RegExp(`\r\na=rtpmap:${pt} (?<name>[^ \/]+)\/`); + const {groups: {name}} = rtpmapRegex.exec(sdp); + const fmtpRegex = new RegExp(`\r\na=fmtp:${pt} (?<sdpFmtpLine>.*)\r\n`); + // Guard against there not being an fmtp line. + const {groups: {sdpFmtpLine} = {}} = fmtpRegex.exec(sdp) ?? {}; + const codec = { mimeType: `video/${name}`, payloadType: pt, sdpFmtpLine }; codecs.push(codec); } return codecs; } -function replaceAllInSubstr( - str, startIndex, endIndex, pattern, replacement) { - return str.slice(0, startIndex) + - str.slice(startIndex, endIndex).replaceAll(pattern, replacement) + - str.slice(endIndex); -} - function replaceCodecInSdp(sdp, oldCodec, newCodec) { // Replace the payload type in the m=video line. - const mVideoStartIndex = sdp.indexOf('m=video'); - const mVideoEndIndex = sdp.indexOf('\r\n', mVideoStartIndex); - if (mVideoStartIndex == -1 || mVideoEndIndex == -1) { - throw 'Failed to parse m=video line in the codec replace algorithm'; - } - sdp = replaceAllInSubstr( - sdp, mVideoStartIndex, mVideoEndIndex, String(oldCodec.payloadType), - String(newCodec.payloadType)); - // Replace the payload type in all the RTP map and FMTP lines. - const rtpStartIndex = sdp.indexOf('a=rtpmap:' + oldCodec.payloadType); - const rtpEndIndex = sdp.indexOf(oldCodec.sdpFmtpLine); - if (rtpStartIndex == -1 || rtpEndIndex == -1) { - throw 'Failed to parse RTP/FMTP lines in the codec replace algorithm'; - } - sdp = replaceAllInSubstr( - sdp, rtpStartIndex, rtpEndIndex, ':' + oldCodec.payloadType, - ':' + newCodec.payloadType); + sdp = sdp.replace( + new RegExp(`(m=video [ \\dA-Z\/]+)${oldCodec.payloadType}`), + `$1${newCodec.payloadType}` + ); + // Replace the payload type in all rtpmap, fmtp and rtcp-fb lines. + sdp = sdp.replaceAll( + new RegExp(`(a=(rtpmap|fmtp|rtcp-fb):)${oldCodec.payloadType}`, "g"), + `$1${newCodec.payloadType}` + ); // Lastly, replace the actual "sdpFmtpLine" string. sdp = sdp.replace(oldCodec.sdpFmtpLine, newCodec.sdpFmtpLine); return sdp; @@ -173,6 +146,7 @@ promise_test(async t => { t.add_cleanup(() => pc.close()); const h264RecvOnlyCodecs = getCodecsWithDirection('video/H264', 'recvonly'); + const h264SendOnlyCodecs = getCodecsWithDirection('video/H264', 'sendonly'); const vp8SendRecvCodecs = getCodecsWithDirection('video/VP8', 'sendrecv'); // If any of the following optional asserts fail the test ends with // [PRECONDITION_FAILED] as opposed to [FAIL]. @@ -182,15 +156,40 @@ promise_test(async t => { assert_implements_optional( vp8SendRecvCodecs.length > 0, `There are no sendrecv VP8 codecs available in getCapabilities.`); - // Pick a level (3.1) that we're required to support for both sending and - // receiving. If such a codec is listed in `h264RecvOnlyCodecs` that means our - // sender capability has an even greater level. - const h264RecvOnlyCodec = h264RecvOnlyCodecs.find( - codec => codec.sdpFmtpLine.includes('profile-level-id=64001f')); + // Find a recvonly codec with the required level (3.1) for both sending and + // receiving, that has a corresponding sendonly codec with the same profile + // but a higher level. If there is such a match, we should be able to use the + // lower level of the two for sendrecv. + const kProfileLevelIdRegex = + /profile-level-id=(?<profile_idc>..)(?<profile_iop>..)(?<level_idc>..)/; + const kProfileLevelIdReqLevelRegex = /profile-level-id=....1f/; + const h264RecvOnlyReqLevelCodecs = h264RecvOnlyCodecs.filter( + codec => codec.sdpFmtpLine.match(kProfileLevelIdReqLevelRegex)); + const h264RecvOnlyCodec = h264RecvOnlyReqLevelCodecs.find(recv => { + const {groups: { + profile_idc: recvProfile, + profile_iop: recvConstraints, + level_idc: recvLevelIdc, + } + } = kProfileLevelIdRegex.exec(recv.sdpFmtpLine); + const recvLevel = parseInt(recvLevelIdc, 16); + return h264SendOnlyCodecs.find(send => { + const {groups: { + profile_idc: sendProfile, + profile_iop: sendConstraints, + level_idc: sendLevelIdc, + } + } = kProfileLevelIdRegex.exec(send.sdpFmtpLine); + const sendLevel = parseInt(sendLevelIdc, 16); + return sendProfile == recvProfile && + sendConstraints == recvConstraints && + sendLevelIdc > recvLevelIdc; + }); + }); assert_implements_optional( h264RecvOnlyCodec != undefined, - `profile-level-id=64001f is not exclusive to ` + - `RTCRtpReceiver.getCapabilities.`); + `No recvonly profile-level-id=....1f that matches a higher level ` + + `sendonly codec`); const vp8SendRecvCodec = vp8SendRecvCodecs[0]; const transceiver = pc.addTransceiver('video', {direction: 'sendrecv'}); diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini index e9f1c0ae3f3..dcee42d08d7 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini @@ -14,30 +14,6 @@ [WebGL test #588] expected: FAIL - [WebGL test #53] - expected: FAIL - - [WebGL test #55] - expected: FAIL - - [WebGL test #57] - expected: FAIL - - [WebGL test #59] - expected: FAIL - - [WebGL test #69] - expected: FAIL - - [WebGL test #71] - expected: FAIL - - [WebGL test #73] - expected: FAIL - - [WebGL test #75] - expected: FAIL - [WebGL test #85] expected: FAIL |