diff options
167 files changed, 2121 insertions, 798 deletions
diff --git a/Cargo.lock b/Cargo.lock index 1241d0c95a5..1263e87e399 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "ascii" -version = "0.7.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "ash" @@ -517,7 +517,7 @@ dependencies = [ "half", "ipc-channel", "log", - "lyon_geom 0.14.0", + "lyon_geom 0.14.1", "num-traits", "pixels", "raqote", @@ -749,9 +749,9 @@ checksum = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" [[package]] name = "combine" -version = "3.5.2" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cedd8056314afe0d844a37a207007edf8a45f2cc452fd77629cd63c221740e" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ "ascii", "byteorder", @@ -1120,9 +1120,9 @@ dependencies = [ [[package]] name = "dbus" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d975a175aa2dced1a6cd410b89a1bf23918f301eab2b6f7c5e608291b757639" +checksum = "48b5f0f36f1eebe901b0e6bee369a77ed3396334bf3f09abd46454a576f71819" dependencies = [ "libc", "libdbus-sys", @@ -1735,9 +1735,9 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generic-array" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ "typenum", ] @@ -3036,9 +3036,9 @@ checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" [[package]] name = "libdbus-sys" -version = "0.1.5" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cb88963258d00f4962205dbb5933d82780d9962c8c8a064b651d2ad7189210" +checksum = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0" dependencies = [ "pkg-config", ] @@ -3201,9 +3201,9 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69589b8844c0b3745cc031a35b62bc33b0fb9e5ba7613756d802c52861dcdb4c" +checksum = "ca04310c9807612a311506106000b6eccb2e27bca9bfb594ce80fb8a31231f9d" dependencies = [ "arrayvec 0.4.12", "euclid", @@ -3433,9 +3433,9 @@ dependencies = [ [[package]] name = "miniz-sys" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" +checksum = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" dependencies = [ "cc", "libc", @@ -4165,9 +4165,9 @@ dependencies = [ [[package]] name = "podio" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" +checksum = "b18befed8bc2b61abc79a457295e7e838417326da1586050b919414073977f19" [[package]] name = "ppv-lite86" @@ -4813,9 +4813,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" +checksum = "c9124df5b40cbd380080b2cc6ab894c040a3070d995f5c9dc77e18c34a8ae37d" dependencies = [ "serde_derive", ] @@ -4831,9 +4831,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.110" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" +checksum = "3f2c3ac8e6ca1e9c80b8be1023940162bf81ae3cffbb1809474152f2ce1eb250" dependencies = [ "proc-macro2 1.0.17", "quote 1.0.2", diff --git a/Cargo.toml b/Cargo.toml index c431a8f1707..a06252fd1fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,9 @@ opt-level = 3 # [patch."https://github.com/servo/<repository>"] # <crate> = { path = "/path/to/local/checkout" } -# Those are here to dedupe winapi since mio is still using winapi 0.2. +# This is here to dedupe winapi since mio 0.6 is still using winapi 0.2. mio = { git = "https://github.com/servo/mio.git", branch = "servo" } +surfman = { git = "https://github.com/servo/surfman" } +surfman-chains = { git = "https://github.com/asajeffrey/surfman-chains" } # https://github.com/retep998/winapi-rs/pull/816 winapi = { git = "https://github.com/servo/winapi-rs", branch = "patch-1" } -surfman-chains = { git = "https://github.com/asajeffrey/surfman-chains" } -surfman = { git = "https://github.com/servo/surfman" } diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml index e9eae0b9f35..543d2b538c9 100644 --- a/components/net_traits/Cargo.toml +++ b/components/net_traits/Cargo.toml @@ -13,31 +13,31 @@ test = false doctest = false [dependencies] -content-security-policy = {version = "0.4.0", features = ["serde"]} +content-security-policy = { version = "0.4.0", features = ["serde"] } cookie = "0.11" embedder_traits = { path = "../embedder_traits" } headers = "0.2" http = "0.1" hyper = "0.12" hyper_serde = "0.11" -piston_image = {package = "image", version = "0.23"} ipc-channel = "0.14" lazy_static = "1" log = "0.4" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" mime = "0.3" -msg = {path = "../msg"} +msg = { path = "../msg" } num-traits = "0.2" percent-encoding = "2.0" -pixels = {path = "../pixels"} +piston_image = { package = "image", version = "0.23" } +pixels = { path = "../pixels" } serde = "1.0" -servo_arc = {path = "../servo_arc"} -servo_url = {path = "../url"} +servo_arc = { path = "../servo_arc" } +servo_url = { path = "../url" } time = "0.1" url = "2.0" -uuid = {version = "0.8", features = ["v4", "serde"]} -webrender_api = {git = "https://github.com/servo/webrender"} +uuid = { version = "0.8", features = ["v4", "serde"] } +webrender_api = { git = "https://github.com/servo/webrender" } [dev-dependencies] std_test_override = { path = "../std_test_override" } diff --git a/components/pixels/Cargo.toml b/components/pixels/Cargo.toml index 1b9f4d97002..cfd7d0e6051 100644 --- a/components/pixels/Cargo.toml +++ b/components/pixels/Cargo.toml @@ -12,6 +12,6 @@ path = "lib.rs" [dependencies] euclid = "0.20" -malloc_size_of = {path = "../malloc_size_of"} +malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" -serde = {version = "1", features = ["derive"]} +serde = { version = "1", features = ["derive"] } diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml index d0d31205631..b15ed2e3d01 100644 --- a/components/profile/Cargo.toml +++ b/components/profile/Cargo.toml @@ -11,21 +11,21 @@ name = "profile" path = "lib.rs" [dependencies] -profile_traits = {path = "../profile_traits"} -ipc-channel = "0.14" heartbeats-simple = "0.4" +ipc-channel = "0.14" log = "0.4" +profile_traits = { path = "../profile_traits" } serde = "1.0" serde_json = "1.0" -servo_config = {path = "../config"} -time_crate = {package = "time", version = "0.1.12"} +servo_config = { path = "../config" } +time_crate = { package = "time", version = "0.1.12" } [target.'cfg(target_os = "macos")'.dependencies] -task_info = {path = "../../support/rust-task_info"} +task_info = { path = "../../support/rust-task_info" } [target.'cfg(target_os = "linux")'.dependencies] regex = "1.1" [target.'cfg(not(target_os = "windows"))'.dependencies] libc = "0.2" -servo_allocator = {path = "../allocator"} +servo_allocator = { path = "../allocator" } diff --git a/components/profile_traits/Cargo.toml b/components/profile_traits/Cargo.toml index 8b20f18525f..118d60caa17 100644 --- a/components/profile_traits/Cargo.toml +++ b/components/profile_traits/Cargo.toml @@ -11,16 +11,16 @@ name = "profile_traits" path = "lib.rs" [features] -energy-profiling = ["energymon", "energy-monitor"] +energy-profiling = ["energy-monitor", "energymon"] [dependencies] crossbeam-channel = "0.4" -energy-monitor = {version = "0.2.0", optional = true} -energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true} +energy-monitor = { version = "0.2.0", optional = true } +energymon = { git = "https://github.com/energymon/energymon-rust.git", optional = true } ipc-channel = "0.14" log = "0.4" serde = "1.0" -servo_config = {path = "../config"} -signpost = {git = "https://github.com/pcwalton/signpost.git"} +servo_config = { path = "../config" } +signpost = { git = "https://github.com/pcwalton/signpost.git" } time = "0.1.12" diff --git a/components/range/Cargo.toml b/components/range/Cargo.toml index 38b28ec3a01..bf9db8164a1 100644 --- a/components/range/Cargo.toml +++ b/components/range/Cargo.toml @@ -1,5 +1,4 @@ [package] - name = "range" version = "0.0.1" authors = ["The Servo Project Developers"] diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index 022ea8cad10..cff99b143bb 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -13,27 +13,27 @@ path = "lib.rs" [dependencies] app_units = "0.7" atomic_refcell = "0.1" -canvas_traits = {path = "../canvas_traits"} +canvas_traits = { path = "../canvas_traits" } crossbeam-channel = "0.4" euclid = "0.20" fxhash = "0.2" -gfx_traits = {path = "../gfx_traits"} +gfx_traits = { path = "../gfx_traits" } html5ever = "0.25" ipc-channel = "0.14" libc = "0.2" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" -metrics = {path = "../metrics"} -msg = {path = "../msg"} -net_traits = {path = "../net_traits"} +metrics = { path = "../metrics" } +msg = { path = "../msg" } +net_traits = { path = "../net_traits" } parking_lot = "0.10" -profile_traits = {path = "../profile_traits"} -range = {path = "../range"} -script_traits = {path = "../script_traits"} +profile_traits = { path = "../profile_traits" } +range = { path = "../range" } +script_traits = { path = "../script_traits" } selectors = { path = "../selectors" } -servo_arc = {path = "../servo_arc"} -servo_atoms = {path = "../atoms"} -servo_url = {path = "../url"} -style = {path = "../style", features = ["servo"]} -style_traits = {path = "../style_traits", features = ["servo"]} -webrender_api = {git = "https://github.com/servo/webrender"} +servo_arc = { path = "../servo_arc" } +servo_atoms = { path = "../atoms" } +servo_url = { path = "../url" } +style = { path = "../style", features = ["servo"] } +style_traits = { path = "../style_traits", features = ["servo"] } +webrender_api = { git = "https://github.com/servo/webrender" } diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml index 3d4cf95fe53..96f51c82707 100644 --- a/components/script_traits/Cargo.toml +++ b/components/script_traits/Cargo.toml @@ -12,14 +12,14 @@ path = "lib.rs" [dependencies] bitflags = "1.0" -bluetooth_traits = {path = "../bluetooth_traits"} -canvas_traits = {path = "../canvas_traits"} +bluetooth_traits = { path = "../bluetooth_traits" } +canvas_traits = { path = "../canvas_traits" } cookie = "0.11" crossbeam-channel = "0.4" -devtools_traits = {path = "../devtools_traits"} -embedder_traits = {path = "../embedder_traits"} +devtools_traits = { path = "../devtools_traits" } +embedder_traits = { path = "../embedder_traits" } euclid = "0.20" -gfx_traits = {path = "../gfx_traits"} +gfx_traits = { path = "../gfx_traits" } http = "0.1" hyper = "0.12" hyper_serde = "0.11" @@ -29,19 +29,19 @@ libc = "0.2" log = "0.4" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" -media = {path = "../media"} -msg = {path = "../msg"} -net_traits = {path = "../net_traits"} -pixels = {path = "../pixels"} -profile_traits = {path = "../profile_traits"} +media = { path = "../media" } +msg = { path = "../msg" } +net_traits = { path = "../net_traits" } +pixels = { path = "../pixels" } +profile_traits = { path = "../profile_traits" } serde = "1.0" -servo_atoms = {path = "../atoms"} -servo_url = {path = "../url"} +servo_atoms = { path = "../atoms" } +servo_url = { path = "../url" } smallvec = "0.6" -style_traits = {path = "../style_traits", features = ["servo"]} +style_traits = { path = "../style_traits", features = ["servo"] } time = "0.1.12" -uuid = {version = "0.8", features = ["v4"]} +uuid = { version = "0.8", features = ["v4"] } webdriver = "0.40" -webgpu = {path = "../webgpu"} -webrender_api = {git = "https://github.com/servo/webrender"} -webxr-api = {git = "https://github.com/servo/webxr", features = ["ipc"]} +webgpu = { path = "../webgpu" } +webrender_api = { git = "https://github.com/servo/webrender" } +webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } diff --git a/components/selectors/Cargo.toml b/components/selectors/Cargo.toml index 6968395d984..1763de6c0b3 100644 --- a/components/selectors/Cargo.toml +++ b/components/selectors/Cargo.toml @@ -1,10 +1,8 @@ [package] - name = "selectors" version = "0.22.0" authors = ["The Servo Project Developers"] documentation = "https://docs.rs/selectors/" - description = "CSS Selectors matching for Rust" repository = "https://github.com/servo/servo" readme = "README.md" @@ -23,8 +21,8 @@ bench = [] bitflags = "1.0" cssparser = "0.27" derive_more = "0.99" -log = "0.4" fxhash = "0.2" +log = "0.4" phf = "0.8" precomputed-hash = "0.1" servo_arc = { version = "0.1", path = "../servo_arc" } diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index daa5015abc6..e7bcc1f352f 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -15,82 +15,82 @@ crate-type = ["rlib"] debugmozjs = ["script/debugmozjs"] egl = ["mozangle/egl"] energy-profiling = ["profile_traits/energy-profiling"] -profilemozjs = ["script/profilemozjs"] googlevr = ["webxr/googlevr"] jitspew = ["script/jitspew"] js_backtrace = ["script/js_backtrace"] layout-2013 = ["layout_thread_2013"] layout-2020 = ["layout_thread_2020"] max_log_level = ["log/release_max_level_info"] +media-dummy = ["servo-media-dummy"] +media-gstreamer = ["servo-media-gstreamer", "gstreamer"] native-bluetooth = ["bluetooth/native-bluetooth"] no-wgl = ["canvas/no-wgl"] -uwp = ["servo_config/uwp", "script/uwp"] -webrender_debugger = ["webrender/debugger"] no_static_freetype = ["webrender/no_static_freetype"] +profilemozjs = ["script/profilemozjs"] refcell_backtrace = ["script/refcell_backtrace"] +uwp = ["servo_config/uwp", "script/uwp"] webdriver = ["webdriver_server"] webgl_backtrace = [ "script/webgl_backtrace", "canvas/webgl_backtrace", "canvas_traits/webgl_backtrace", ] -media-dummy = ["servo-media-dummy"] -media-gstreamer = ["servo-media-gstreamer", "gstreamer"] +webrender_debugger = ["webrender/debugger"] xr-profile = ["canvas/xr-profile", "canvas_traits/xr-profile", "script/xr-profile", "webxr/profile"] [dependencies] -background_hang_monitor = {path = "../background_hang_monitor"} -bluetooth_traits = {path = "../bluetooth_traits"} -bluetooth = {path = "../bluetooth"} -canvas = {path = "../canvas", default-features = false} -canvas_traits = {path = "../canvas_traits"} -compositing = {path = "../compositing", features = ["gl"]} -constellation = {path = "../constellation"} +background_hang_monitor = { path = "../background_hang_monitor" } +bluetooth = { path = "../bluetooth" } +bluetooth_traits = { path = "../bluetooth_traits" } +canvas = { path = "../canvas", default-features = false } +canvas_traits = { path = "../canvas_traits" } +compositing = { path = "../compositing", features = ["gl"] } +constellation = { path = "../constellation" } crossbeam-channel = "0.4" -debugger = {path = "../debugger"} -devtools = {path = "../devtools"} -devtools_traits = {path = "../devtools_traits"} -embedder_traits = {path = "../embedder_traits"} +debugger = { path = "../debugger" } +devtools = { path = "../devtools" } +devtools_traits = { path = "../devtools_traits" } +embedder_traits = { path = "../embedder_traits" } env_logger = "0.7" euclid = "0.20" -gfx = {path = "../gfx"} +gfx = { path = "../gfx" } gleam = "0.11" +gstreamer = { version = "0.15", optional = true } ipc-channel = "0.14" keyboard-types = "0.4" -layout_thread_2013 = {path = "../layout_thread", optional = true} -layout_thread_2020 = {path = "../layout_thread_2020", optional = true} +layout_thread_2013 = { path = "../layout_thread", optional = true } +layout_thread_2020 = { path = "../layout_thread_2020", optional = true } log = "0.4" -media = {path = "../media"} -msg = {path = "../msg"} -net = {path = "../net"} -net_traits = {path = "../net_traits"} -profile = {path = "../profile"} -profile_traits = {path = "../profile_traits"} -script = {path = "../script"} -script_layout_interface = {path = "../script_layout_interface"} -script_traits = {path = "../script_traits"} -servo_config = {path = "../config"} -servo_geometry = {path = "../geometry"} -servo-media = {git = "https://github.com/servo/media"} -servo-media-dummy = {git = "https://github.com/servo/media", optional = true} -servo-media-gstreamer = {git = "https://github.com/servo/media", optional = true} -servo_url = {path = "../url"} +media = { path = "../media" } +msg = { path = "../msg" } +net = { path = "../net" } +net_traits = { path = "../net_traits" } +profile = { path = "../profile" } +profile_traits = { path = "../profile_traits" } +script = { path = "../script" } +script_layout_interface = { path = "../script_layout_interface" } +script_traits = { path = "../script_traits" } +servo-media = { git = "https://github.com/servo/media" } +servo-media-dummy = { git = "https://github.com/servo/media", optional = true } +servo-media-gstreamer = { git = "https://github.com/servo/media", optional = true } +servo_config = { path = "../config" } +servo_geometry = { path = "../geometry" } +servo_url = { path = "../url" } sparkle = "0.1" -style = {path = "../style", features = ["servo"]} -style_traits = {path = "../style_traits", features = ["servo"]} -webgpu = {path = "../webgpu"} -webrender = {git = "https://github.com/servo/webrender"} -webrender_api = {git = "https://github.com/servo/webrender"} -webrender_surfman = {path = "../webrender_surfman"} -webrender_traits = {path = "../webrender_traits"} -webdriver_server = {path = "../webdriver_server", optional = true} -webxr-api = {git = "https://github.com/servo/webxr"} -webxr = {git = "https://github.com/servo/webxr"} +style = { path = "../style", features = ["servo"] } +style_traits = { path = "../style_traits", features = ["servo"] } surfman = "0.2" -gstreamer = { version = "0.15", optional = true } +webdriver_server = { path = "../webdriver_server", optional = true } +webgpu = { path = "../webgpu" } +webrender = { git = "https://github.com/servo/webrender" } +webrender_api = { git = "https://github.com/servo/webrender" } +webrender_surfman = { path = "../webrender_surfman" } +webrender_traits = { path = "../webrender_traits" } +webxr = { git = "https://github.com/servo/webxr" } +webxr-api = { git = "https://github.com/servo/webxr" } -[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies] +[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os = "android"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] gaol = "0.2.1" [target.'cfg(target_os = "windows")'.dependencies] -mozangle = {version = "0.2"} +mozangle = { version = "0.2" } diff --git a/components/servo_arc/Cargo.toml b/components/servo_arc/Cargo.toml index 3581210c2f1..f72654230f9 100644 --- a/components/servo_arc/Cargo.toml +++ b/components/servo_arc/Cargo.toml @@ -11,10 +11,10 @@ name = "servo_arc" path = "lib.rs" [features] -servo = ["serde"] gecko_refcount_logging = [] +servo = ["serde"] [dependencies] -nodrop = {version = "0.1.8"} -serde = {version = "1.0", optional = true} +nodrop = { version = "0.1.8" } +serde = { version = "1.0", optional = true } stable_deref_trait = "1.0.0" diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index d7baef22a66..bf66228c8fb 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -36,13 +36,12 @@ bitflags = "1.0" byteorder = "1.0" cssparser = "0.27" derive_more = "0.99" -new_debug_unreachable = "1.0" -encoding_rs = {version = "0.8", optional = true} +encoding_rs = { version = "0.8", optional = true } euclid = "0.20" fallible = { path = "../fallible" } fxhash = "0.2" hashglobe = { path = "../hashglobe" } -html5ever = {version = "0.25", optional = true} +html5ever = { version = "0.25", optional = true } indexmap = "1.0" itertools = "0.8" itoa = "0.4" @@ -50,38 +49,39 @@ lazy_static = "1" log = { version = "0.4", features = ["std"] } malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" -num_cpus = {version = "1.1.0", optional = true} +new_debug_unreachable = "1.0" +num-derive = "0.3" num-integer = "0.1" num-traits = "0.2" -num-derive = "0.3" +num_cpus = { version = "1.1.0", optional = true } owning_ref = "0.4" parking_lot = "0.10" precomputed-hash = "0.1.1" rayon = "1" selectors = { path = "../selectors" } -serde = {version = "1.0", optional = true, features = ["derive"]} +serde = { version = "1.0", optional = true, features = ["derive"] } servo_arc = { path = "../servo_arc" } -servo_atoms = {path = "../atoms", optional = true} -servo_config = {path = "../config", optional = true} +servo_atoms = { path = "../atoms", optional = true } +servo_config = { path = "../config", optional = true } +servo_url = { path = "../url", optional = true } smallbitvec = "2.3.0" smallvec = "1.0" string_cache = { version = "0.8", optional = true } -style_derive = {path = "../style_derive"} -style_traits = {path = "../style_traits"} -servo_url = {path = "../url", optional = true} -thin-slice = {version = "0.1.0", optional = true} -to_shmem = {path = "../to_shmem"} -to_shmem_derive = {path = "../to_shmem_derive"} +style_derive = { path = "../style_derive" } +style_traits = { path = "../style_traits" } +thin-slice = { version = "0.1.0", optional = true } time = "0.1" +to_shmem = { path = "../to_shmem" } +to_shmem_derive = { path = "../to_shmem_derive" } uluru = "0.4" unicode-bidi = "0.3" unicode-segmentation = "1.0" void = "1.0.2" [build-dependencies] +bindgen = { version = "0.53", optional = true, default-features = false } lazy_static = "1" log = "0.4" -bindgen = {version = "0.53", optional = true, default-features = false} -regex = {version = "1.1", optional = true} +regex = { version = "1.1", optional = true } +toml = { version = "0.5", optional = true, default-features = false } walkdir = "2.1.4" -toml = {version = "0.5", optional = true, default-features = false} diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 1f3f3e9ddb1..50e93ab25e6 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -15,17 +15,17 @@ gecko = [] [dependencies] app_units = "0.7" -cssparser = "0.27" bitflags = "1.0" +cssparser = "0.27" euclid = "0.20" lazy_static = "1" malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = "0.1" selectors = { path = "../selectors" } serde = "1.0" -webrender_api = {git = "https://github.com/servo/webrender", optional = true} -servo_atoms = {path = "../atoms", optional = true} servo_arc = { path = "../servo_arc" } +servo_atoms = { path = "../atoms", optional = true } servo_url = { path = "../url", optional = true } to_shmem = { path = "../to_shmem" } to_shmem_derive = { path = "../to_shmem_derive" } +webrender_api = { git = "https://github.com/servo/webrender", optional = true } diff --git a/components/url/Cargo.toml b/components/url/Cargo.toml index 792fed54ac8..a8ab995ef6b 100644 --- a/components/url/Cargo.toml +++ b/components/url/Cargo.toml @@ -13,8 +13,8 @@ path = "lib.rs" [dependencies] malloc_size_of = { path = "../malloc_size_of", features = ["servo"] } malloc_size_of_derive = "0.1" +serde = { version = "1.0", features = ["derive"] } +servo_rand = { path = "../rand" } to_shmem = { path = "../to_shmem" } -serde = {version = "1.0", features = ["derive"]} -servo_rand = {path = "../rand"} -url = {version = "2.0", features = ["serde"]} -uuid = {version = "0.8", features = ["v4", "serde"]} +url = { version = "2.0", features = ["serde"] } +uuid = { version = "0.8", features = ["serde", "v4"] } diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index 2158954a29e..2e8ffbb4708 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] base64 = "0.10" -compositing = {path = "../compositing"} +compositing = { path = "../compositing" } cookie = "0.11" crossbeam-channel = "0.4" euclid = "0.20" @@ -21,13 +21,13 @@ image = "0.23" ipc-channel = "0.14" keyboard-types = "0.4.3" log = "0.4" -msg = {path = "../msg"} -pixels = {path = "../pixels"} +msg = { path = "../msg" } +pixels = { path = "../pixels" } +script_traits = { path = "../script_traits" } serde = "1" serde_json = "1" -script_traits = {path = "../script_traits"} -servo_config = {path = "../config"} -servo_url = {path = "../url"} -style_traits = {path = "../style_traits"} -uuid = {version = "0.8", features = ["v4"]} +servo_config = { path = "../config" } +servo_url = { path = "../url" } +style_traits = { path = "../style_traits" } +uuid = { version = "0.8", features = ["v4"] } webdriver = "0.40" diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml index 555dffbfabb..3c8639b3e1a 100644 --- a/components/webgpu/Cargo.toml +++ b/components/webgpu/Cargo.toml @@ -16,7 +16,7 @@ ipc-channel = "0.14" log = "0.4" malloc_size_of = { path = "../malloc_size_of" } serde = { version = "1.0", features = ["serde_derive"] } -servo_config = {path = "../config"} +servo_config = { path = "../config" } smallvec = { version = "0.6", features = ["serde"] } -wgpu-core = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["trace", "replay"] } -wgpu-types = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["trace", "replay"] } +wgpu-core = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace"] } +wgpu-types = { version = "0.5.0", git = "https://github.com/gfx-rs/wgpu", features = ["replay", "trace"] } diff --git a/components/webrender_traits/Cargo.toml b/components/webrender_traits/Cargo.toml index 29d2bf8aa9f..2e59d884516 100644 --- a/components/webrender_traits/Cargo.toml +++ b/components/webrender_traits/Cargo.toml @@ -12,5 +12,5 @@ path = "lib.rs" [dependencies] euclid = "0.20" -webrender_api = {git = "https://github.com/servo/webrender"} +webrender_api = { git = "https://github.com/servo/webrender" } diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index f8e7e539aae..4a1e8110f6f 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 628b1fab770..c884dc82eab 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,3 +2,6 @@ [listeners are called when <iframe> is resized] expected: FAIL + [listeners are called correct number of times] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index c131078eace..23c61ede1a1 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,3 +17,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-001.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-001.html.ini index df24204e0d3..34ab1c4fb08 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-001.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-001.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-001.tentative.html] +[HTMLLinkElement-disabled-001.html] [<link disabled> prevents the stylesheet from being in document.styleSheets (from parser)] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-002.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-002.html.ini index ac0d6d3a943..beaf2961e91 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-002.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-002.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-002.tentative.html] +[HTMLLinkElement-disabled-002.html] [HTMLLinkElement.disabled reflects the <link disabled> attribute, and behaves consistently, when the sheet is an alternate] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-003.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-003.html.ini index 137b92e99e8..a63c586fd67 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-003.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-003.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-003.tentative.html] +[HTMLLinkElement-disabled-003.html] [HTMLLinkElement.disabled's explicitly enabled state persists when disconnected and connected again] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-004.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-004.html.ini index 7f41d0adaa0..20462805942 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-004.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-004.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-004.tentative.html] +[HTMLLinkElement-disabled-004.html] [HTMLLinkElement.disabled's explicitly enabled state doesn't persist on clones] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-005.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-005.html.ini index d4be99bfa4f..4a6b09d9058 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-005.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-005.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-005.tentative.html] +[HTMLLinkElement-disabled-005.html] expected: TIMEOUT [HTMLLinkElement.disabled's explicitly enabled state persists regardless of rel] expected: TIMEOUT diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-007.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-007.html.ini index 77f89988df1..62ef580305f 100644 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-007.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-007.html.ini @@ -1,4 +1,4 @@ -[HTMLLinkElement-disabled-007.tentative.html] +[HTMLLinkElement-disabled-007.html] [HTMLLinkElement.disabled setter sets the explicitly enabled state if toggled back and forth.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-alternate.html.ini b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-alternate.html.ini new file mode 100644 index 00000000000..eb0657d3a0a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom/HTMLLinkElement-disabled-alternate.html.ini @@ -0,0 +1,2 @@ +[HTMLLinkElement-disabled-alternate.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-opacity-rounded-clip.html.ini b/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-opacity-rounded-clip.html.ini new file mode 100644 index 00000000000..cf23d0c0378 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/filter-effects/backdrop-filter-opacity-rounded-clip.html.ini @@ -0,0 +1,2 @@ +[backdrop-filter-opacity-rounded-clip.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index b49ecea6671..dae4682b753 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -312,21 +312,24 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [<iframe>: combined response Content-Type: text/html;" \\" text/plain] + [<iframe>: separate response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] - expected: FAIL - - [<iframe>: separate response Content-Type: text/html;" \\" text/plain] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL [<iframe>: separate response Content-Type: text/html */*] expected: FAIL + [<iframe>: separate response Content-Type: text/html;x=" text/plain] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html;" \\" text/plain] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini index 646a46c0cbb..5c001592859 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini @@ -59,6 +59,3 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL - [separate text/javascript error] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini index 30e1b851fd4..61682d248e2 100644 --- a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,3 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL + [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_1.html] - [Multiple history traversals from the same task] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini index dc2e45516de..75d75b4cda2 100644 --- a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini +++ b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini @@ -1,4 +1,4 @@ -[traverse_the_history_5.html] +[traverse_the_history_2.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini deleted file mode 100644 index 385376c7321..00000000000 --- a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_4.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini new file mode 100644 index 00000000000..735a9a75a2a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini @@ -0,0 +1,2 @@ +[cross-origin-objects-on-new-window.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/browsers/windows/embedded-opener-remove-frame.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/windows/embedded-opener-remove-frame.html.ini index f29162631b3..8e2a63e3b7f 100644 --- a/tests/wpt/metadata-layout-2020/html/browsers/windows/embedded-opener-remove-frame.html.ini +++ b/tests/wpt/metadata-layout-2020/html/browsers/windows/embedded-opener-remove-frame.html.ini @@ -4,5 +4,5 @@ expected: FAIL [opener of discarded auxiliary browsing context] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/dom/idlharness.https.html.ini b/tests/wpt/metadata-layout-2020/html/dom/idlharness.https.html.ini index 2d66929f9f8..3dabbc6d6a3 100644 --- a/tests/wpt/metadata-layout-2020/html/dom/idlharness.https.html.ini +++ b/tests/wpt/metadata-layout-2020/html/dom/idlharness.https.html.ini @@ -1294,9 +1294,6 @@ [Window interface: window must inherit property "onwebkitanimationiteration" with the proper type] expected: FAIL - [Document interface: new Document() must inherit property "queryCommandSupported(DOMString)" with the proper type] - expected: FAIL - [Window interface: attribute onsecuritypolicyviolation] expected: FAIL @@ -1315,9 +1312,6 @@ [Document interface: new Document() must inherit property "onwebkitanimationiteration" with the proper type] expected: FAIL - [Document interface: calling queryCommandSupported(DOMString) on documentWithHandlers with too few arguments must throw TypeError] - expected: FAIL - [Document interface: attribute designMode] expected: FAIL @@ -1363,9 +1357,6 @@ [Window interface: existence and properties of interface prototype object] expected: FAIL - [Document interface: calling queryCommandSupported(DOMString) on new Document() with too few arguments must throw TypeError] - expected: FAIL - [Window interface: operation focus()] expected: FAIL @@ -1408,9 +1399,6 @@ [Document interface: iframe.contentDocument must inherit property "onwebkitanimationiteration" with the proper type] expected: FAIL - [Document interface: operation queryCommandSupported(DOMString)] - expected: FAIL - [Document interface: attribute onwebkittransitionend] expected: FAIL @@ -1504,9 +1492,6 @@ [Window interface: window must inherit property "blur()" with the proper type] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "queryCommandSupported(DOMString)" with the proper type] - expected: FAIL - [Document interface: operation execCommand(DOMString, optional boolean, optional DOMString)] expected: FAIL @@ -1534,9 +1519,6 @@ [Document interface: iframe.contentDocument must inherit property "queryCommandEnabled(DOMString)" with the proper type] expected: FAIL - [Document interface: calling queryCommandSupported(DOMString) on iframe.contentDocument with too few arguments must throw TypeError] - expected: FAIL - [Window interface: operation blur()] expected: FAIL @@ -1615,9 +1597,6 @@ [Document interface: iframe.contentDocument must inherit property "onsecuritypolicyviolation" with the proper type] expected: FAIL - [Document interface: documentWithHandlers must inherit property "queryCommandSupported(DOMString)" with the proper type] - expected: FAIL - [Document interface: new Document() must inherit property "queryCommandValue(DOMString)" with the proper type] expected: FAIL @@ -2499,9 +2478,6 @@ [HTMLInputElement interface: createInput("radio") must inherit property "height" with the proper type] expected: FAIL - [HTMLImageElement interface: document.createElement("img") must inherit property "referrerPolicy" with the proper type] - expected: FAIL - [HTMLTableElement interface: document.createElement("table") must inherit property "align" with the proper type] expected: FAIL @@ -2850,9 +2826,6 @@ [HTMLLinkElement interface: document.createElement("link") must inherit property "imageSizes" with the proper type] expected: FAIL - [HTMLImageElement interface: attribute referrerPolicy] - expected: FAIL - [HTMLInputElement interface: createInput("time") must inherit property "align" with the proper type] expected: FAIL @@ -3063,9 +3036,6 @@ [HTMLObjectElement interface: attribute width] expected: FAIL - [HTMLImageElement interface: new Image() must inherit property "referrerPolicy" with the proper type] - expected: FAIL - [HTMLInputElement interface: createInput("reset") must inherit property "useMap" with the proper type] expected: FAIL @@ -3495,3 +3465,9 @@ [HTMLSlotElement interface: operation assignedNodes(optional AssignedNodesOptions)] expected: FAIL + [HTMLLinkElement interface: document.createElement("link") must inherit property "disabled" with the proper type] + expected: FAIL + + [HTMLLinkElement interface: attribute disabled] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini b/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini new file mode 100644 index 00000000000..0081ab92ae0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini @@ -0,0 +1,5 @@ +[window-domain-failure.https.sub.html] + expected: TIMEOUT + [SharedArrayBuffer and a same-origin-domain (but not same-origin) iframe] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini b/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini new file mode 100644 index 00000000000..80f3f9dd4bd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini @@ -0,0 +1,13 @@ +[window-iframe-messagechannel.https.html] + [postMessaging with a MessageChannel that's been cross-site should succeed] + expected: FAIL + + [postMessaging to a same-site iframe via MessageChannel should fail] + expected: FAIL + + [postMessaging to a cross-site iframe via MessageChannel should fail] + expected: FAIL + + [postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index b000fc2afe3..f45aaafe1c5 100644 --- a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -14,6 +14,3 @@ [Host element with delegatesFocus should support autofocus] expected: FAIL - [Non-HTMLElement should not support autofocus] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini index c6f45be1eb2..e63fe7c263e 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_escaping-2.html] - expected: TIMEOUT + expected: CRASH [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/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index 1b74d6e073d..3080be9afc0 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,4 +1,5 @@ [iframe_sandbox_popups_nonescaping-1.html] + expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini new file mode 100644 index 00000000000..9f416703229 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini @@ -0,0 +1,4 @@ +[form-double-submit-3.html] + [<button> should have the same double-submit protection as <input type=submit>] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini new file mode 100644 index 00000000000..fca4d908c89 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini @@ -0,0 +1,4 @@ +[module-static-import-delayed.html] + [document.write in an imported module] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 5ddb9bfeff6..a1effd5f801 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,10 +1,9 @@ [promise-job-entry.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Sanity check: this all works as expected with no promises involved] expected: FAIL @@ -16,5 +15,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/webxr/anchors/ar_anchor_states.https.html.ini b/tests/wpt/metadata-layout-2020/webxr/anchors/ar_anchor_states.https.html.ini new file mode 100644 index 00000000000..4385dfb3f1f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webxr/anchors/ar_anchor_states.https.html.ini @@ -0,0 +1,10 @@ +[ar_anchor_states.https.html] + [Anchor creation fails if the feature was not requested] + expected: FAIL + + [Anchor creation fails if the feature was requested but the session already ended] + expected: FAIL + + [Anchor creation succeeds if the feature was requested] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/webxr/idlharness.https.window.js.ini b/tests/wpt/metadata-layout-2020/webxr/idlharness.https.window.js.ini index e45cf7a375e..e51210976a3 100644 --- a/tests/wpt/metadata-layout-2020/webxr/idlharness.https.window.js.ini +++ b/tests/wpt/metadata-layout-2020/webxr/idlharness.https.window.js.ini @@ -299,3 +299,9 @@ [XRLayer interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL + [XRSession interface: xrSession must inherit property "cancelAnimationFrame(unsigned long)" with the proper type] + expected: FAIL + + [XRSession interface: calling cancelAnimationFrame(unsigned long) on xrSession with too few arguments must throw TypeError] + expected: FAIL + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 38bade9dd7e..70c944c6c93 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -122849,6 +122849,32 @@ {} ] ], + "inset-box-shadow-scroll.html": [ + "7eca4ea544ff76740e13490fb995dfda5705336d", + [ + null, + [ + [ + "/css/css-backgrounds/inset-box-shadow-scroll-ref.html", + "==" + ] + ], + {} + ] + ], + "inset-box-shadow-stacking-context-scroll.html": [ + "edd79b88be2a71fc6054e7e866c8cabe03948a89", + [ + null, + [ + [ + "/css/css-backgrounds/inset-box-shadow-scroll-ref.html", + "==" + ] + ], + {} + ] + ], "scroll-positioned-multiple-background-images.html": [ "a9ca550ce3dea2626de05bf31437a0a19aeedbce", [ @@ -165743,6 +165769,19 @@ {} ] ], + "absolute-tables-007.html": [ + "7922da49224c666156ff20765301b490ef91eafd", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "anonymous-table-cell-margin-collapsing.html": [ "23b467ebacc983122a632f4d5971c8daca569420", [ @@ -206304,8 +206343,8 @@ ] }, "cssom": { - "HTMLLinkElement-disabled-alternate.tentative.html": [ - "5b020a172b175ac21d76052cfd44139d376f6605", + "HTMLLinkElement-disabled-alternate.html": [ + "f1457c0dcf04d27a52a29fc860e94e81d432e5af", [ null, [ @@ -206646,6 +206685,19 @@ {} ] ], + "backdrop-filter-opacity-rounded-clip.html": [ + "88fed5742034734f539d965d99ffa20c16428282", + [ + null, + [ + [ + "/css/filter-effects/backdrop-filter-opacity-rounded-clip-ref.html", + "==" + ] + ], + {} + ] + ], "backdrop-filter-paint-order.html": [ "88531532fc33296e8c8eca5452da04d5d612662d", [ @@ -246607,7 +246659,7 @@ [] ], "user-activation.js": [ - "babd5b2cd32131a65d3eb81c4f5508fefff064cb", + "ed294bb9cb27b552f23061118fcd260dc6b86a8f", [] ] } @@ -268229,7 +268281,7 @@ }, "resources": { "cookie-helper.sub.js": [ - "fcc1addf2954292037cf77b211bf37920a921e23", + "1a163332e3c1821e690e1659842cd30202440f06", [] ], "drop.py": [ @@ -268315,6 +268367,10 @@ "1dceb4e43681c81b6c1b8877fd2d9f2b34391a02", [] ], + "iframe.document.html": [ + "7026beb7e816d7079c1d1625227cabf4d329b7ee", + [] + ], "navigate.html": [ "7d0f87d49439088dc78883e85cfc5c6bcc291d4e", [] @@ -287012,6 +287068,10 @@ "10324966edb042c1c7298ce22dad76766c2a777b", [] ], + "inset-box-shadow-scroll-ref.html": [ + "55be941bfc35e8d064e811335242fd06dc28da67", + [] + ], "justfortest.html": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] @@ -311812,6 +311872,10 @@ "0453d7f2feda3367e0f7536d91b0b159d627dd5d", [] ], + "backdrop-filter-opacity-rounded-clip-ref.html": [ + "79177d1238730466d6e5b1a2b5354ee1a1e00db1", + [] + ], "backdrop-filter-paint-order-ref.html": [ "bd82e520f0e70b75e45c687cb46f957a579e2358", [] @@ -317546,7 +317610,7 @@ }, "scrolling": { "scroll_support.js": [ - "6fd1b32294bb8933b5e9918ea8260b873b987f8a", + "0a73f34fefc8ab53962e1a15ce5fb6e8c0b45a98", [] ] } @@ -328793,6 +328857,14 @@ "6604450991a122e3e241e40b1b9e0516c525389d", [] ], + "iframe-domain-failure.sub.html": [ + "cf795c23805889f6e036873264444b631862d204", + [] + ], + "iframe-domain-failure.sub.html.headers": [ + "56d0ac342824434c621fb50f9351e2e74aa077cb", + [] + ], "iframe-failure.html": [ "2c33dba79a2fb9e6a81fc9ee5805b378e826f725", [] @@ -328817,11 +328889,11 @@ "4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28", [] ], - "incrementer-iframe-domain.sub.html": [ - "a6dd70177584c9115c24beb281e7681110c07624", + "iframe-messagechannel-site-failure.html": [ + "95a610f928584b89a5d9fb3a711337db21f839e9", [] ], - "incrementer-iframe-domain.sub.html.headers": [ + "iframe-messagechannel-site-failure.html.headers": [ "56d0ac342824434c621fb50f9351e2e74aa077cb", [] ], @@ -328934,7 +329006,7 @@ "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", [] ], - "window-domain-success.https.sub.html.headers": [ + "window-domain-failure.https.sub.html.headers": [ "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", [] ], @@ -328958,10 +329030,6 @@ "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", [] ], - "window-similar-but-cross-origin-success.https.sub.html.headers": [ - "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", - [] - ], "window-simple-success.https.html.headers": [ "63b60e490f47f4db77d33d7a4ca2f5b9a4181de8", [] @@ -333006,7 +333074,7 @@ [] ], "structured-clone-battery-of-tests.js": [ - "751a0e1a9ea8b549543f2e78551b0d00b4fc6127", + "0c96ded2088357e0d581587f4a1a66c74c9198b6", [] ] }, @@ -333908,7 +333976,7 @@ }, "interfaces": { "BackgroundSync.idl": [ - "f84faf7bcd3bf1e836136bfbe34b6ba68f2bd25c", + "c52dcdb89843e80e9bd89591df76ba26f7172dab", [] ], "CSP.idl": [ @@ -333999,6 +334067,10 @@ "fe77a2f942827c5fbb842db74556d5e8353a9cb3", [] ], + "compression.idl": [ + "47d2b9e48d06ae830ade5aef4b1c0914995a5e1f", + [] + ], "console.idl": [ "3cd3c06b54b022c61857a6a29e8e97bf4fa9b47b", [] @@ -334068,7 +334140,7 @@ [] ], "css-properties-values-api.idl": [ - "ee444ebb29d8b5b15c96d259bb8a1f2bdd280d5f", + "d8f54b1e15bc020ef101ab53626eee6985c63dcb", [] ], "css-pseudo.idl": [ @@ -334159,6 +334231,10 @@ "ada6c0c302cdff87a78a0e8ec5ac25a8f0e64922", [] ], + "get-installed-related-apps.idl": [ + "cbea101d300f0082d7d020809c9c2da3e581ad90", + [] + ], "gyroscope.idl": [ "3754fd81e6bf605a308794e5b759ecd8784a6a15", [] @@ -334176,7 +334252,7 @@ [] ], "html.idl": [ - "7b2a96ce6760a05b49e9c445b4050a991acd342b", + "09e1a29043b5bb56b3366d2cbb13b5e834424121", [] ], "image-capture.idl": [ @@ -334548,7 +334624,7 @@ [] ], "webxr.idl": [ - "f723acc0ce58b3aa56596ffd334a93eb596ef466", + "b0d94394b5bb619198da1500cee1eb83785f6c66", [] ], "worklets.idl": [ @@ -334745,7 +334821,7 @@ ] }, "lint.ignore": [ - "776c6332900bdd6bacade294131ce1ba028c7d1b", + "078a706f079c3cfc2a88dbd8ce9b3b290d1ffcfb", [] ], "loading": { @@ -339504,6 +339580,14 @@ "ce2b968391343339a9958100f564fa73d5c01509", [] ], + "mock-screenenumeration.js": [ + "0f71db8f5062a3ff0344d7999d65ddd5271a04fc", + [] + ], + "mock-screenenumeration.js.header": [ + "6805c323df5a975231648b830e33ce183c3cbbd3", + [] + ], "mock-sms-receiver.js": [ "c4aa9a86f2c8a15303f96cc9859b2ec146eb2f58", [] @@ -339589,7 +339673,7 @@ [] ], "webxr-test-math-helper.js": [ - "14e163712670f1dd5f081d0189bfe719bbd08bd6", + "22c6c12d08fe1a739857bec0da88e89c8abffc60", [] ], "webxr-test-math-helper.js.headers": [ @@ -339597,7 +339681,7 @@ [] ], "webxr-test.js": [ - "4809ac86bd3e487aceefbfb62ccd191e6395d70a", + "adbb42eed8b70bef4c2786344fc24d90faf47bb8", [] ], "webxr-test.js.headers": [ @@ -340124,6 +340208,18 @@ [] ] }, + "screen_enumeration": { + "README.md": [ + "04b2ecce7c274f03fd5b0dbebecf82882f009902", + [] + ], + "resources": { + "screenenumeration-helpers.js": [ + "d96fca74b5d4520103f459120881b2aa03994a54", + [] + ] + } + }, "scroll-animations": { "META.yml": [ "c53f1f432fe1ec2887e30af396a1f1574b76b95d", @@ -344821,11 +344917,11 @@ ] }, "commands.json": [ - "044322eed3baf467c6d809fc26ac958598942311", + "d4e3ce8128002b8f83f33dc4a21852afd908e724", [] ], "quic_transport_server.py": [ - "9a04ad17f195c6e5d233e84a9b23904cccfeccd6", + "deef46fb8a74c8ff41c0b5e8d229ab7a34d19c10", [] ], "requirements.txt": [ @@ -344833,7 +344929,7 @@ [] ], "serve.py": [ - "9893f25e27bdb3afd4bf39921e96abdcc4233f9d", + "517b4c34b93ed4293c43f30a2baec8b920197d27", [] ] }, @@ -344935,7 +345031,7 @@ [] ], "serve.py": [ - "43ff7bd0dfbac5eae74cbe43235f016c4fe14d35", + "d98c81eafbb86585ecac5b7047a40d874eb54fe7", [] ], "test_functional.py": [ @@ -350418,7 +350514,7 @@ [] ], "environment.py": [ - "f76836ea66b59bb16f2d3792451bcf28ecb2fb44", + "1236d1f9bc291f590f74236cf2ad01d84d4785df", [] ], "executors": { @@ -351073,6 +351169,10 @@ "869d3d4604409411984cb49fcd40eb7e971b3c52", [] ], + "test_response.py": [ + "f8048ac1ce5529a600df1da4db9dfb4154f202c9", + [] + ], "test_stash.py": [ "31af1558b0cc5c046843e0e96569db42c467cf22", [] @@ -351112,7 +351212,7 @@ [] ], "response.py": [ - "b6f274474519846d298a29da0b3db3961999b24f", + "b24f0cdf476850a10cdbe94bb857fc61ce32bcf8", [] ], "router.py": [ @@ -355959,7 +356059,7 @@ [] ], "webxr_test_constants.js": [ - "3ae294c015a73fc193ce68c0f80aec4111c3302c", + "139ab775684c427e39bc50719226c96fcbd3a5d5", [] ], "webxr_test_constants_fake_world.js": [ @@ -375181,6 +375281,39 @@ "timeout": "long" } ] + ], + "idlharness.https.any.js": [ + "c439d5b51910ba570c2b0273fc813e7e51c02c4d", + [ + "compression/idlharness.https.any.html", + { + "script_metadata": [ + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] + ] + } + ], + [ + "compression/idlharness.https.any.worker.html", + { + "script_metadata": [ + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] + ] + } + ] ] }, "console": { @@ -380021,7 +380154,7 @@ ] ], "fetch.https.html": [ - "4daf357004a71cea5b0e58a44bf8919d96ad7ce8", + "89050e03afd7f5aab3288be468f2dbf9712cc71d", [ null, { @@ -380036,7 +380169,7 @@ ] ], "form-get-blank-reload.https.html": [ - "026254549729cd4b5acc1f0c59833c55aa4e56e2", + "611255f7374dae54994a2c3b20687765969d708f", [ null, {} @@ -380047,7 +380180,7 @@ ] ], "form-get-blank.https.html": [ - "61af99967292abe8249f81d9fcd098c1f51273d7", + "6fe28c21cc0c3a5912ef3f69e751ba7e936a15c0", [ null, { @@ -380062,7 +380195,7 @@ ] ], "form-post-blank-reload.https.html": [ - "69f720efc5bb129b08beaafeb9bdae2c00239cd2", + "fedb0a03c5a9a69d64d0f372855f1f512d1a9a2f", [ null, {} @@ -380073,7 +380206,7 @@ ] ], "form-post-blank.https.html": [ - "4ffd522b322e158baf7d1877aa5485dc010159b1", + "d3cd369ca67a86bcd25c4f5a901e669beb77446c", [ null, { @@ -380088,7 +380221,7 @@ ] ], "iframe-reload.https.html": [ - "9bfbdfd64186848df1b7b7165b5799d54c7dc8f7", + "a33c4dd4eb2ac9aa22ee6c45157d6f1cfb48675a", [ null, { @@ -380102,8 +380235,17 @@ } ] ], + "iframe.document.html": [ + "2d276dbcaa9ce740ffdd8c8516defe18ab51de95", + [ + null, + { + "timeout": "long" + } + ] + ], "iframe.https.html": [ - "446b8c50c004a5c6599b73052ba870dac4aa70a9", + "04ebb95836d7b4700e93eedb7ef0a07b943ec3fa", [ null, { @@ -380173,7 +380315,7 @@ ] ], "window-open-reload.https.html": [ - "ee2091b1373a1da7068722c2557332e3a7f60b05", + "f21b6a77de5c5bac6cc19195f098995b21deb3b5", [ null, {} @@ -380184,7 +380326,7 @@ ] ], "window-open.https.html": [ - "d685eb47fd07872116caa22d2b8ca23774f26a81", + "7ee3ef43abea9bd86c4989b304846a7395d9d447", [ null, { @@ -394330,21 +394472,21 @@ "aspect-ratio": { "parsing": { "contain-intrinsic-size-computed.html": [ - "bf56adb9fe136d5e73c4dd5caec2cb4040b75115", + "76fb5842ae691de4025795bc80777a61ceebbb6e", [ null, {} ] ], "contain-intrinsic-size-invalid.html": [ - "20378ab8cfe4f346d841a9a59e579a90b8147515", + "e13c3ad07e1c25777cc9533407c0e57f6c6e5ddb", [ null, {} ] ], "contain-intrinsic-size-valid.html": [ - "96b3ca59acc8af8c292fdaf2cc255475e7929d1f", + "c7add59d1e408ad7f7aee459da49f9f072de845f", [ null, {} @@ -403010,50 +403152,50 @@ {} ] ], - "HTMLLinkElement-disabled-001.tentative.html": [ - "877356f924de995aca09579739c6120af2caab1e", + "HTMLLinkElement-disabled-001.html": [ + "f2c5d0a545939b78e5833c19e83de660dd845ea2", [ null, {} ] ], - "HTMLLinkElement-disabled-002.tentative.html": [ - "9c46f60a6214538168b48cd06b16fda0ce52ec63", + "HTMLLinkElement-disabled-002.html": [ + "34bd8182fef40b0b596661437f7840735f83c517", [ null, {} ] ], - "HTMLLinkElement-disabled-003.tentative.html": [ - "fc86e6ba1f052231c4de47cbcece07c85a6f68b9", + "HTMLLinkElement-disabled-003.html": [ + "3d391bbaff064e094c5a4c1d7c2748257b900a93", [ null, {} ] ], - "HTMLLinkElement-disabled-004.tentative.html": [ - "7e6c34ee40d97319e4b2ac39262bba9935fd7d3b", + "HTMLLinkElement-disabled-004.html": [ + "f163f1d68e066ad89241b43ffd6f29d161b1b3c1", [ null, {} ] ], - "HTMLLinkElement-disabled-005.tentative.html": [ - "0233f8c746ed83c1b912df3c0e8ba489d9bd4325", + "HTMLLinkElement-disabled-005.html": [ + "76de20632726b753e21c15d4a5a18472edd5753d", [ null, {} ] ], - "HTMLLinkElement-disabled-006.tentative.html": [ - "5828e1ce14217384fd9445297ddffbfcfc4e4c7e", + "HTMLLinkElement-disabled-006.html": [ + "02749a2e11d41ca7556b65ecd42ee3a004fa7fe2", [ null, {} ] ], - "HTMLLinkElement-disabled-007.tentative.html": [ - "451fc3d591f2c8e12964282eb1314d4962429923", + "HTMLLinkElement-disabled-007.html": [ + "9a695a964cb5916af69db3ba8a3ff44e00bb1a87", [ null, {} @@ -407557,6 +407699,15 @@ "testdriver": true } ] + ], + "scrollend-event-for-user-scroll.html": [ + "30f16571cd83201e039fd9e682e0cca6b8569d76", + [ + null, + { + "testdriver": true + } + ] ] }, "shadow-relatedTarget.html": [ @@ -409004,7 +409155,7 @@ ] ], "ParentNode-replaceChildren.html": [ - "6557db4412847be59f4ecedc89731d6fa89314b9", + "b1c1008284bbf999d5c61d971b6c8b10704e16e9", [ null, {} @@ -450382,8 +450533,8 @@ {} ] ], - "window-domain-success.https.sub.html": [ - "9205d01df26e3274692f48aa76d7ffceba9e51ac", + "window-domain-failure.https.sub.html": [ + "1175b56fb0463449a4a589ed86cb26d27533d0a5", [ null, {} @@ -450397,7 +450548,7 @@ ] ], "window-iframe-messagechannel.https.html": [ - "16a054a52e1ef9ecb42fa5d2e7ceff4a1496f3ab", + "acef65cbdff4bd28d6ca4f46c13141e3dbeed95d", [ null, {} @@ -450424,13 +450575,6 @@ {} ] ], - "window-similar-but-cross-origin-success.https.sub.html": [ - "e25fc9002d02d3c1177447012fcfc9f77381bda7", - [ - null, - {} - ] - ], "window-simple-success.https.html": [ "4b86f9befa6a04c03211a7f30e9cb2d1a63ad06d", [ @@ -450460,13 +450604,6 @@ } ] ], - "structured_clone_bigint.html": [ - "b00f88a016bf7f5fa041ba12ce8cb9524f542c0b", - [ - null, - {} - ] - ], "structuredclone_0.html": [ "c8a6d38393c0217447992d47c994942e873e70ad", [ @@ -467167,7 +467304,7 @@ }, "installedapp": { "idlharness.https.window.js": [ - "3988dba414aabb69ff72d28642d84d89544e63dc", + "7774da6803d40031ee9b45f4d0a6bb42f51d4e3d", [ "installedapp/idlharness.https.window.html", { @@ -467183,8 +467320,13 @@ [ "script", "/resources/idlharness.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ] ], @@ -467328,7 +467470,7 @@ ] ], "isIntersecting-threshold.html": [ - "106b65edd7525d089224ff3192f57614d6c58ed6", + "842c8e2c9f96deb5e6e167230fae2e32b9d5e779", [ null, {} @@ -490015,14 +490157,43 @@ }, "screen_enumeration": { "getScreens.tentative.https.window.js": [ - "76223b7907cd09f971acd0166318d7eb84c84c98", + "f496282b01620f8b1d2d10c11e961f6fbb9dc56a", [ "screen_enumeration/getScreens.tentative.https.window.html", { "script_metadata": [ [ "global", - "window,dedicatedworker,sharedworker,serviceworker" + "window" + ], + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ] + ] + } + ] + ], + "getScreens.values.https.html": [ + "5ce54839deefc78a9da98f7283d71c55705281f8", + [ + null, + {} + ] + ], + "screen_enumeration_permission.window.js": [ + "00adbfc52acfceedc949093444f24f04f9dc1a27", + [ + "screen_enumeration/screen_enumeration_permission.window.html", + { + "script_metadata": [ + [ + "global", + "window" ], [ "script", @@ -514611,7 +514782,7 @@ ] ], "RTCPeerConnection-mandatory-getStats.https.html": [ - "e48d133f464a9a1e9f2b17b3c6eb5f3c375cae34", + "5b0d59153dca428518ee510e01e1d4ffe87abf00", [ null, { @@ -519782,10 +519953,10 @@ }, "webtransport": { "quic": { - "client-indication.any.js": [ - "15baa5f8542cb2d1a1c73f03dca24dcd09cfc5f6", + "client-indication.sub.any.js": [ + "62f2f3fe4d22bd767db78650c1cc9dda2053e6ce", [ - "webtransport/quic/client-indication.any.html", + "webtransport/quic/client-indication.sub.any.html", { "quic": true, "script_metadata": [ @@ -519801,7 +519972,7 @@ } ], [ - "webtransport/quic/client-indication.any.worker.html", + "webtransport/quic/client-indication.sub.any.worker.html", { "quic": true, "script_metadata": [ @@ -520943,6 +521114,15 @@ } }, "webxr": { + "anchors": { + "ar_anchor_states.https.html": [ + "907da06880e9fe7908a32afbf2ddcb642e174b41", + [ + null, + {} + ] + ] + }, "ar-module": { "idlharness.https.window.js": [ "51cc3c42808a66ddde083b8982317e8cdd961c71", diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini index f8e7e539aae..4a1e8110f6f 100644 --- a/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 628b1fab770..c884dc82eab 100644 --- a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,3 +2,6 @@ [listeners are called when <iframe> is resized] expected: FAIL + [listeners are called correct number of times] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini index 85e94926cb3..5733d536fd3 100644 --- a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini @@ -21,3 +21,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-001.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-001.html.ini new file mode 100644 index 00000000000..34ab1c4fb08 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-001.html.ini @@ -0,0 +1,7 @@ +[HTMLLinkElement-disabled-001.html] + [<link disabled> prevents the stylesheet from being in document.styleSheets (from parser)] + expected: FAIL + + [HTMLLinkElement.disabled reflects the <link disabled> attribute, and behaves consistently] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-002.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-002.html.ini new file mode 100644 index 00000000000..beaf2961e91 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-002.html.ini @@ -0,0 +1,4 @@ +[HTMLLinkElement-disabled-002.html] + [HTMLLinkElement.disabled reflects the <link disabled> attribute, and behaves consistently, when the sheet is an alternate] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-003.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-003.html.ini new file mode 100644 index 00000000000..a63c586fd67 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-003.html.ini @@ -0,0 +1,4 @@ +[HTMLLinkElement-disabled-003.html] + [HTMLLinkElement.disabled's explicitly enabled state persists when disconnected and connected again] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-004.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-004.html.ini new file mode 100644 index 00000000000..20462805942 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-004.html.ini @@ -0,0 +1,4 @@ +[HTMLLinkElement-disabled-004.html] + [HTMLLinkElement.disabled's explicitly enabled state doesn't persist on clones] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-005.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-005.html.ini new file mode 100644 index 00000000000..4a6b09d9058 --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-005.html.ini @@ -0,0 +1,5 @@ +[HTMLLinkElement-disabled-005.html] + expected: TIMEOUT + [HTMLLinkElement.disabled's explicitly enabled state persists regardless of rel] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-007.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-007.html.ini new file mode 100644 index 00000000000..62ef580305f --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-007.html.ini @@ -0,0 +1,4 @@ +[HTMLLinkElement-disabled-007.html] + [HTMLLinkElement.disabled setter sets the explicitly enabled state if toggled back and forth.] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.html.ini new file mode 100644 index 00000000000..eb0657d3a0a --- /dev/null +++ b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.html.ini @@ -0,0 +1,2 @@ +[HTMLLinkElement-disabled-alternate.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.tentative.html.ini b/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.tentative.html.ini deleted file mode 100644 index bc28e5443c7..00000000000 --- a/tests/wpt/metadata/css/cssom/HTMLLinkElement-disabled-alternate.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[HTMLLinkElement-disabled-alternate.tentative.html] - expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index 9cd23a99ed3..7a3bb3e6f0d 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -312,21 +312,24 @@ [fetch(): separate response Content-Type: text/plain ] expected: NOTRUN - [<iframe>: combined response Content-Type: text/html;" \\" text/plain] + [<iframe>: separate response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] - expected: FAIL - - [<iframe>: separate response Content-Type: text/html;" \\" text/plain] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL [<iframe>: separate response Content-Type: text/html */*] expected: FAIL + [<iframe>: separate response Content-Type: text/html;x=" text/plain] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html;" \\" text/plain] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini index 646a46c0cbb..5c001592859 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -59,6 +59,3 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL - [separate text/javascript error] - expected: FAIL - diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index 30e1b851fd4..61682d248e2 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,3 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL + [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_1.html] - [Multiple history traversals from the same task] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini index 385376c7321..75d75b4cda2 100644 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini @@ -1,4 +1,4 @@ -[traverse_the_history_4.html] +[traverse_the_history_2.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini deleted file mode 100644 index dc2e45516de..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_5.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini b/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini new file mode 100644 index 00000000000..735a9a75a2a --- /dev/null +++ b/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini @@ -0,0 +1,2 @@ +[cross-origin-objects-on-new-window.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini index c757b400205..2532dceabac 100644 --- a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini @@ -7,5 +7,5 @@ expected: FAIL [opener of discarded auxiliary browsing context] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/idlharness.https.html.ini b/tests/wpt/metadata/html/dom/idlharness.https.html.ini index ead25462f30..b0b337f71d8 100644 --- a/tests/wpt/metadata/html/dom/idlharness.https.html.ini +++ b/tests/wpt/metadata/html/dom/idlharness.https.html.ini @@ -3780,3 +3780,9 @@ [HTMLSlotElement interface: operation assignedNodes(optional AssignedNodesOptions)] expected: FAIL + [HTMLLinkElement interface: document.createElement("link") must inherit property "disabled" with the proper type] + expected: FAIL + + [HTMLLinkElement interface: attribute disabled] + expected: FAIL + diff --git a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini new file mode 100644 index 00000000000..0081ab92ae0 --- /dev/null +++ b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.ini @@ -0,0 +1,5 @@ +[window-domain-failure.https.sub.html] + expected: TIMEOUT + [SharedArrayBuffer and a same-origin-domain (but not same-origin) iframe] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html.ini b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html.ini deleted file mode 100644 index dfe9a4f6bce..00000000000 --- a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[window-domain-success.https.sub.html] - [postMessaging to a same-origin-domain (but not same-origin) iframe allows them to see each others' modifications] - expected: FAIL - diff --git a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini index 1d4d31c40b5..358083c5133 100644 --- a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini +++ b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html.ini @@ -11,3 +11,6 @@ [postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications] expected: FAIL + [postMessaging to a same-site iframe via MessageChannel should fail] + expected: FAIL + diff --git a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html.ini b/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html.ini deleted file mode 100644 index 2ceabfb79eb..00000000000 --- a/tests/wpt/metadata/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[window-similar-but-cross-origin-success.https.sub.html] - [postMessaging to a not same-origin-domain, but similar origin, iframe allows them to see each others' modifications] - expected: FAIL - diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 3363dff158f..6b68e9094e4 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -14,6 +14,3 @@ [Host element with delegatesFocus should support autofocus] expected: FAIL - [Non-HTMLElement should not support autofocus] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini index c6f45be1eb2..e63fe7c263e 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_escaping-2.html] - expected: TIMEOUT + expected: CRASH [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/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index 3f7e3e9544f..963d4cd20ef 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,5 +1,6 @@ [iframe_sandbox_popups_nonescaping-1.html] type: testharness + expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini new file mode 100644 index 00000000000..9f416703229 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini @@ -0,0 +1,4 @@ +[form-double-submit-3.html] + [<button> should have the same double-submit protection as <input type=submit>] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini new file mode 100644 index 00000000000..fca4d908c89 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini @@ -0,0 +1,4 @@ +[module-static-import-delayed.html] + [document.write in an imported module] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 5ddb9bfeff6..a1effd5f801 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,10 +1,9 @@ [promise-job-entry.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Sanity check: this all works as expected with no promises involved] expected: FAIL @@ -16,5 +15,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata/webmessaging/with-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webxr/anchors/ar_anchor_states.https.html.ini b/tests/wpt/metadata/webxr/anchors/ar_anchor_states.https.html.ini new file mode 100644 index 00000000000..4385dfb3f1f --- /dev/null +++ b/tests/wpt/metadata/webxr/anchors/ar_anchor_states.https.html.ini @@ -0,0 +1,10 @@ +[ar_anchor_states.https.html] + [Anchor creation fails if the feature was not requested] + expected: FAIL + + [Anchor creation fails if the feature was requested but the session already ended] + expected: FAIL + + [Anchor creation succeeds if the feature was requested] + expected: FAIL + diff --git a/tests/wpt/metadata/webxr/idlharness.https.window.js.ini b/tests/wpt/metadata/webxr/idlharness.https.window.js.ini index c4b0c230fc1..e3306e70483 100644 --- a/tests/wpt/metadata/webxr/idlharness.https.window.js.ini +++ b/tests/wpt/metadata/webxr/idlharness.https.window.js.ini @@ -359,3 +359,9 @@ [XRLayer interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL + [XRSession interface: xrSession must inherit property "cancelAnimationFrame(unsigned long)" with the proper type] + expected: FAIL + + [XRSession interface: calling cancelAnimationFrame(unsigned long) on xrSession with too few arguments must throw TypeError] + expected: FAIL + diff --git a/tests/wpt/web-platform-tests/clipboard-apis/resources/user-activation.js b/tests/wpt/web-platform-tests/clipboard-apis/resources/user-activation.js index babd5b2cd32..ed294bb9cb2 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/resources/user-activation.js +++ b/tests/wpt/web-platform-tests/clipboard-apis/resources/user-activation.js @@ -3,6 +3,10 @@ // In order to use this function, please import testdriver.js and // testdriver-vendor.js, and include a <body> element. async function waitForUserActivation() { + if (window.opener) { + throw new Error( + "waitForUserActivation() only works in the top-level frame"); + } const loadedPromise = new Promise(resolve => { if(document.readyState == 'complete') { resolve(); diff --git a/tests/wpt/web-platform-tests/compression/idlharness.https.any.js b/tests/wpt/web-platform-tests/compression/idlharness.https.any.js new file mode 100644 index 00000000000..c439d5b5191 --- /dev/null +++ b/tests/wpt/web-platform-tests/compression/idlharness.https.any.js @@ -0,0 +1,17 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://wicg.github.io/compression/ + +idl_test( + ['compression'], + [], + idl_array => { + idl_array.add_objects({ + CompressionStream: ['new CompressionStream("deflate")'], + DecompressionStream: ['new DecompressionStream("deflate")'], + }); + } +); diff --git a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js index fcc1addf295..1a163332e3c 100644 --- a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js +++ b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js @@ -68,7 +68,7 @@ function create_cookie(origin, name, value, extras) { function set_prefixed_cookie_via_dom_test(options) { promise_test(t => { var name = options.prefix + "prefixtestcookie"; - erase_cookie_from_js(name, options.paras); + erase_cookie_from_js(name, options.params); t.add_cleanup(() => erase_cookie_from_js(name, options.params)); var value = "" + Math.random(); document.cookie = name + "=" + value + ";" + options.params; @@ -104,11 +104,17 @@ function set_prefixed_cookie_via_http_test(options) { // SameSite-specific test helpers: // +// status for "network" cookies. window.SameSiteStatus = { CROSS_SITE: "cross-site", LAX: "lax", STRICT: "strict" }; +// status for "document.cookie". +window.DomSameSiteStatus = { + CROSS_SITE: "cross-site", + SAME_SITE: "same-site", +}; const wait_for_message = (type, origin) => { return new Promise((resolve, reject) => { @@ -155,7 +161,7 @@ async function resetSameSiteCookies(origin, value) { // Given an |expectedStatus| and |expectedValue|, assert the |cookies| contains the // proper set of cookie names and values, according to the legacy behavior where // unspecified SameSite attribute defaults to SameSite=None behavior. -function verifySameSiteCookieStateLegacy(expectedStatus, expectedValue, cookies) { +function verifySameSiteCookieStateLegacy(expectedStatus, expectedValue, cookies, domCookieStatus) { assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always sent."); assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always sent."); if (expectedStatus == SameSiteStatus.CROSS_SITE) { @@ -170,14 +176,14 @@ function verifySameSiteCookieStateLegacy(expectedStatus, expectedValue, cookies) } if (cookies["domcookies"]) { - verifyDocumentCookie(expectedStatus, expectedValue, cookies["domcookies"]); + verifyDocumentCookieLegacy(domCookieStatus, expectedValue, cookies["domcookies"]); } } // Same as above except this expects samesite_unspecified to act the same as // samesite_lax (which is the behavior expected when SameSiteByDefault is // enabled). -function verifySameSiteCookieStateWithSameSiteByDefault(expectedStatus, expectedValue, cookies) { +function verifySameSiteCookieStateWithSameSiteByDefault(expectedStatus, expectedValue, cookies, domCookieStatus) { assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always sent."); if (expectedStatus == SameSiteStatus.CROSS_SITE) { assert_not_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are not sent with cross-site requests."); @@ -194,11 +200,11 @@ function verifySameSiteCookieStateWithSameSiteByDefault(expectedStatus, expected } if (cookies["domcookies"]) { - verifyDocumentCookie(expectedStatus, expectedValue, cookies["domcookies"]); + verifyDocumentCookieWithSameSiteByDefault(domCookieStatus, expectedValue, cookies["domcookies"]); } } -function verifyDocumentCookie(expectedStatus, expectedValue, domcookies) { +function verifyDocumentCookieLegacy(expectedStatus, expectedValue, domcookies) { const cookies = domcookies.split(";") .map(cookie => cookie.trim().split("=")) .reduce((obj, cookie) => { @@ -206,10 +212,38 @@ function verifyDocumentCookie(expectedStatus, expectedValue, domcookies) { return obj; }, {}); - assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always included in document.cookie."); - assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always included in document.cookie."); - assert_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are always included in document.cookie."); - assert_equals(cookies["samesite_lax"], expectedValue, "SameSite=Lax cookies are always included in document.cookie."); + if (expectedStatus == DomSameSiteStatus.SAME_SITE) { + assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always included in document.cookie."); + assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always included in document.cookie."); + assert_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are always included in document.cookie."); + assert_equals(cookies["samesite_lax"], expectedValue, "SameSite=Lax cookies are always included in document.cookie."); + } else if (expectedStatus == DomSameSiteStatus.CROSS_SITE) { + assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always included in document.cookie."); + assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always included in document.cookie."); + assert_not_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are not included in document.cookie when cross-site."); + assert_not_equals(cookies["samesite_lax"], expectedValue, "SameSite=Lax cookies are not included in document.cookie when cross-site."); + } +} + +function verifyDocumentCookieWithSameSiteByDefault(expectedStatus, expectedValue, domcookies) { + const cookies = domcookies.split(";") + .map(cookie => cookie.trim().split("=")) + .reduce((obj, cookie) => { + obj[cookie[0]] = cookie[1]; + return obj; + }, {}); + + if (expectedStatus == DomSameSiteStatus.SAME_SITE) { + assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always included in document.cookie."); + assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always included in document.cookie."); + assert_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are always included in document.cookie."); + assert_equals(cookies["samesite_lax"], expectedValue, "SameSite=Lax cookies are always included in document.cookie."); + } else if (expectedStatus == DomSameSiteStatus.CROSS_SITE) { + assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always included in document.cookie."); + assert_not_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are not included in document.cookie when cross-site."); + assert_not_equals(cookies["samesite_strict"], expectedValue, "SameSite=Strict cookies are not included in document.cookie when cross-site."); + assert_not_equals(cookies["samesite_lax"], expectedValue, "SameSite=Lax cookies are not included in document.cookie when cross-site."); + } } function isLegacySameSite() { diff --git a/tests/wpt/web-platform-tests/cookies/samesite/fetch.https.html b/tests/wpt/web-platform-tests/cookies/samesite/fetch.https.html index 4daf357004a..89050e03afd 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/fetch.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/fetch.https.html @@ -15,7 +15,7 @@ return credFetch(target + "/cookies/resources/list.py") .then(r => r.json()) - .then(cookies => getSameSiteVerifier()(expectedStatus, value, cookies)); + .then(cookies => getSameSiteVerifier()(expectedStatus, value, cookies, DomSameSiteStatus.SAME_SITE)); }); }, title); } diff --git a/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank-reload.https.html b/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank-reload.https.html index 02625454972..611255f7374 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank-reload.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank-reload.https.html @@ -30,7 +30,7 @@ var reloaded = false; var msgHandler = e => { try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); } catch (e) { reject(e); } diff --git a/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank.https.html b/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank.https.html index 61af9996729..6fe28c21cc0 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/form-get-blank.https.html @@ -33,7 +33,7 @@ window.removeEventListener("message", msgHandler); e.source.close(); try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); resolve("Popup received the cookie."); } catch (e) { reject(e); diff --git a/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank-reload.https.html b/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank-reload.https.html index 69f720efc5b..fedb0a03c5a 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank-reload.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank-reload.https.html @@ -20,7 +20,7 @@ var reloaded = false; var msgHandler = e => { try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); } catch (e) { reject(e); } diff --git a/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank.https.html b/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank.https.html index 4ffd522b322..d3cd369ca67 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/form-post-blank.https.html @@ -22,7 +22,7 @@ window.removeEventListener("message", msgHandler); e.source.close(); try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); resolve("Popup received the cookie."); } catch (e) { reject(e); diff --git a/tests/wpt/web-platform-tests/cookies/samesite/iframe-reload.https.html b/tests/wpt/web-platform-tests/cookies/samesite/iframe-reload.https.html index 9bfbdfd6418..a33c4dd4eb2 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/iframe-reload.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/iframe-reload.https.html @@ -9,7 +9,7 @@ <!-- We're appending an <iframe> to the document's body, so execute tests after we have a body --> <body> <script> - function create_test(origin, target, expectedStatus, title) { + function create_test(origin, target, expectedStatus, expectedDomStatus, title) { promise_test(t => { var value = "" + Math.random(); return resetSameSiteCookies(origin, value) @@ -21,7 +21,7 @@ var reloaded = false; var msgHandler = e => { try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus); } catch (e) { reject(e); } @@ -44,7 +44,7 @@ }, title); } - create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host fetches are strictly same-site"); - create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain fetches are strictly same-site"); - create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Reloaded cross-site fetches are cross-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Reloaded same-host fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Reloaded subdomain fetches are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, DomSameSiteStatus.CROSS_SITE, "Reloaded cross-site fetches are cross-site"); </script> diff --git a/tests/wpt/web-platform-tests/cookies/samesite/iframe.document.html b/tests/wpt/web-platform-tests/cookies/samesite/iframe.document.html new file mode 100644 index 00000000000..2d276dbcaa9 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/samesite/iframe.document.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<!-- We're appending an <iframe> to the document's body, so execute tests after we have a body --> +<body> +<script> + function create_test(target, expectedDomStatus, title) { + promise_test(async t => { + let cookieValue = await new Promise((resolve, reject) => { + var iframe = document.createElement("iframe"); + + window.onmessage = t.step_func(e => { + if (e.source == iframe.contentWindow) { + document.body.removeChild(iframe); + resolve(e.data.value); + } + }); + + iframe.src = target + "/cookies/samesite/resources/iframe.document.html"; + document.body.appendChild(iframe); + }); + + await new Promise((resolve, reject) => { + var iframe = document.createElement("iframe"); + + window.onmessage = t.step_func(e => { + if (e.source == iframe.contentWindow) { + // Cleanup, then verify cookie state: + document.body.removeChild(iframe); + + const cookies = e.data; + assert_equals(cookies["dc_samesite_none"], cookieValue, "SameSite=none cookies can be set via document.cookies even by cross-origin documents"); + + if (expectedDomStatus === DomSameSiteStatus.SAME_SITE) { + assert_equals(cookies["dc_samesite_lax"], cookieValue, "SameSite=lax cookies can be set via document.cookies by same-site documents"); + assert_equals(cookies["dc_samesite_strict"], cookieValue, "SameSite=strict cookies can be set via document.cookies by same-site documents"); + } else if (expectedDomStatus === DomSameSiteStatus.CROSS_SITE) { + assert_not_equals(cookies["dc_samesite_lax"], cookieValue, "SameSite=lax cookies can be set via document.cookies by same-site documents"); + assert_not_equals(cookies["dc_samesite_strict"], cookieValue, "SameSite=strict cookies can be set via document.cookies by same-site documents"); + } + + resolve(); + } + }); + + iframe.src = target + "/cookies/resources/postToParent.py"; + document.body.appendChild(iframe); + }); + }, title); + } + + create_test(SECURE_ORIGIN, DomSameSiteStatus.SAME_SITE, "Same-site iframes can set lax/strict cookies via document.cookie"); + create_test(SECURE_CROSS_SITE_ORIGIN, DomSameSiteStatus.CROSS_SITE, "Cross-site iframe cannot set lax/strict cookies via document.cookie"); +</script> diff --git a/tests/wpt/web-platform-tests/cookies/samesite/iframe.https.html b/tests/wpt/web-platform-tests/cookies/samesite/iframe.https.html index 446b8c50c00..04ebb95836d 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/iframe.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/iframe.https.html @@ -9,7 +9,7 @@ <!-- We're appending an <iframe> to the document's body, so execute tests after we have a body --> <body> <script> - function create_test(origin, target, expectedStatus, title) { + function create_test(origin, target, expectedStatus, expectedDomStatus, title) { promise_test(t => { var value = "" + Math.random(); return resetSameSiteCookies(origin, value) @@ -24,7 +24,7 @@ document.body.removeChild(iframe); window.removeEventListener("message", msgHandler); try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, expectedDomStatus); resolve(); } catch(e) { reject(e); @@ -41,22 +41,22 @@ } // No redirect: - create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host fetches are strictly same-site"); - create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain fetches are strictly same-site"); - create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Same-host fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Subdomain fetches are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, DomSameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host fetches are strictly same-site"); - create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host fetches are strictly same-site"); - create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Same-host redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Subdomain redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Cross-site redirecting to same-host fetches are strictly same-site"); // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain fetches are strictly same-site"); - create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain fetches are strictly same-site"); - create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Same-host redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Subdomain redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, DomSameSiteStatus.SAME_SITE, "Cross-site redirecting to subdomain fetches are strictly same-site"); // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); - create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); - create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, DomSameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, DomSameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, DomSameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); </script> diff --git a/tests/wpt/web-platform-tests/cookies/samesite/resources/iframe.document.html b/tests/wpt/web-platform-tests/cookies/samesite/resources/iframe.document.html new file mode 100644 index 00000000000..7026beb7e81 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/samesite/resources/iframe.document.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<script> + var value = "" + Math.random(); + document.cookie = `dc_samesite_strict=${value}; secure; sameSite=strict; path=/`; + document.cookie = `dc_samesite_lax=${value}; secure; sameSite=lax; path=/`; + document.cookie = `dc_samesite_none=${value}; secure; sameSite=none; path=/`; + parent.postMessage({value}, "*"); +</script> diff --git a/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.https.html b/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.https.html index ee2091b1373..f21b6a77de5 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/window-open-reload.https.html @@ -17,7 +17,7 @@ var reloaded = false; var msgHandler = e => { try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); } catch (e) { reject(e); } diff --git a/tests/wpt/web-platform-tests/cookies/samesite/window-open.https.html b/tests/wpt/web-platform-tests/cookies/samesite/window-open.https.html index d685eb47fd0..7ee3ef43abe 100644 --- a/tests/wpt/web-platform-tests/cookies/samesite/window-open.https.html +++ b/tests/wpt/web-platform-tests/cookies/samesite/window-open.https.html @@ -19,7 +19,7 @@ window.removeEventListener("message", msgHandler); w.close(); try { - getSameSiteVerifier()(expectedStatus, value, e.data); + getSameSiteVerifier()(expectedStatus, value, e.data, DomSameSiteStatus.SAME_SITE); resolve("Popup received the cookie."); } catch (e) { reject(e); diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll-ref.html new file mode 100644 index 00000000000..55be941bfc3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll-ref.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<style> +#target { + width: 220px; + height: 120px; + overflow: scroll; +} +#inner { + padding: 10px; + box-shadow: 10px 10px green inset; + height: 120px; +} +</style> +<div id="target"> + <div id="inner"> + Passes if green inset shadow is visible. + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll.html b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll.html new file mode 100644 index 00000000000..7eca4ea544f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-scroll.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> +<link rel="match" href="inset-box-shadow-scroll-ref.html"/> +<style> +#target { + width: 200px; + height: 100px; + overflow: scroll; + background-color: white; + box-shadow: 10px 10px green inset; + padding: 10px; +} +#inner { + height: 120px; +} +</style> +<div id="target"> + <div id="inner"> + Passes if green inset shadow is visible. + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-stacking-context-scroll.html b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-stacking-context-scroll.html new file mode 100644 index 00000000000..edd79b88be2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/inset-box-shadow-stacking-context-scroll.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> +<link rel="match" href="inset-box-shadow-scroll-ref.html"/> +<style> +#target { + position: absolute; + z-index: 1; + width: 200px; + height: 100px; + overflow: scroll; + background-color: white; + box-shadow: 10px 10px green inset; + padding: 10px; +} +#inner { + height: 120px; +} +</style> +<div id="target"> + <div id="inner"> + Passes if green inset shadow is visible. + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html index bf56adb9fe1..76fb5842ae6 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-computed.html @@ -20,6 +20,9 @@ test_computed_value("aspect-ratio", "16.3 / 9.5"); test_computed_value("aspect-ratio", "16/9", "16 / 9"); test_computed_value("aspect-ratio", "0 / 9"); test_computed_value("aspect-ratio", "16 / 0"); +test_computed_value("aspect-ratio", "auto 1"); +test_computed_value("aspect-ratio", "auto 1 / 1", "auto 1"); +test_computed_value("aspect-ratio", "0 auto", "auto 0"); // The computed value of a <ratio> is the pair of numbers provided, unless // both numbers are zero, in which case the computed value is the pair (1, 0) // (same as 1 / 0). diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html index 20378ab8cfe..e13c3ad07e1 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-invalid.html @@ -13,6 +13,6 @@ test_invalid_value("aspect-ratio", "auto / 16"); test_invalid_value("aspect-ratio", "16 9"); test_invalid_value("aspect-ratio", "16px / 9px"); test_invalid_value("aspect-ratio", "16 / -9"); -test_invalid_value("aspect-ratio", "1 auto"); -test_invalid_value("aspect-ratio", "1.5 auto"); +test_invalid_value("aspect-ratio", "1 invalid"); +test_invalid_value("aspect-ratio", "invalid 1.5"); </script> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html index 96b3ca59acc..c7add59d1e4 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/parsing/contain-intrinsic-size-valid.html @@ -19,6 +19,8 @@ test_valid_value("aspect-ratio", "16 /9", "16 / 9"); test_valid_value("aspect-ratio", "16/ 9", "16 / 9"); test_valid_value("aspect-ratio", "0 / 9"); test_valid_value("aspect-ratio", "16 / 0"); +test_valid_value("aspect-ratio", "auto 16"); +test_valid_value("aspect-ratio", "16 auto", "auto 16"); // https://github.com/w3c/csswg-drafts/issues/5084 test_valid_value("aspect-ratio", "0 / 0", "1 / 0"); </script> diff --git a/tests/wpt/web-platform-tests/css/css-tables/absolute-tables-007.html b/tests/wpt/web-platform-tests/css/css-tables/absolute-tables-007.html new file mode 100644 index 00000000000..7922da49224 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-tables/absolute-tables-007.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/903224"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="A positioned absolute table should resolve its %-height against its containing block."> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="position:relative; width:100px;"> + <div style="position:absolute; display:table; width:100%; height:100%; background:green;"></div> + <div style="height:100px; background:red;"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-001.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-001.html index 877356f924d..f2c5d0a5459 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-001.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-001.html @@ -2,8 +2,7 @@ <title><link disabled>, HTMLLinkElement.disabled and CSSStyleSheet.disabled interactions</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <link title="alt" rel="stylesheet" disabled href="data:text/css,html { background: green }"> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-002.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-002.html index 9c46f60a621..34bd8182fef 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-002.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-002.html @@ -2,8 +2,7 @@ <title><link disabled>, HTMLLinkElement.disabled and CSSStyleSheet.disabled interactions (alternate)</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <link title="alt" rel="alternate stylesheet" disabled href="data:text/css,html { background: green }"> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-003.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-003.html index fc86e6ba1f0..3d391bbaff0 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-003.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-003.html @@ -2,8 +2,7 @@ <title><link disabled>'s "explicitly enabled" state persists after getting disconnected from the tree</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <link title="alt" rel="alternate stylesheet" disabled href="data:text/css,html { background: green }"> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-004.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-004.html index 7e6c34ee40d..f163f1d68e0 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-004.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-004.html @@ -2,8 +2,7 @@ <title><link disabled>'s "explicitly enabled" state doesn't persist for clones</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <link title="alt" rel="alternate stylesheet" disabled href="data:text/css,html { background: green }"> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-005.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-005.html index 0233f8c746e..76de2063272 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-005.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-005.html @@ -2,8 +2,7 @@ <title><link disabled>'s "explicitly enabled" persists across rel changes</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <link title="alt" rel="yadayada" disabled href="data:text/css,html { background: green }"> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-006.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-006.html index 5828e1ce142..02749a2e11d 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-006.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-006.html @@ -2,8 +2,7 @@ <title><link disabled>'s "explicitly enabled" state isn't magically set from the setter</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-007.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-007.html index 451fc3d591f..9a695a964cb 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-007.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-007.html @@ -2,8 +2,7 @@ <title><link disabled>'s "explicitly enabled" state works when set explicitly back and forth</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> diff --git a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-alternate.tentative.html b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-alternate.html index 5b020a172b1..f1457c0dcf0 100644 --- a/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-alternate.tentative.html +++ b/tests/wpt/web-platform-tests/css/cssom/HTMLLinkElement-disabled-alternate.html @@ -3,8 +3,7 @@ <title>CSS Test: alternate stylesheets can be disabled by HTMLLinkElement.disabled if they have the disabled attribute already</title> <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> <link rel="author" title="Mozilla" href="https://mozilla.org"> -<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281135"> -<link rel="help" href="https://github.com/whatwg/html/issues/3840"> +<link rel="help" href="https://html.spec.whatwg.org/#attr-link-disabled"> <link rel="match" href="HTMLLinkElement-disabled-alternate-ref.html"> <link title="alt" rel="alternate stylesheet" href="data:text/css,html { background: green }" disabled onload="document.documentElement.className = ''"> <script> diff --git a/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip-ref.html b/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip-ref.html new file mode 100644 index 00000000000..79177d12387 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip-ref.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<div style="position: relative; left: 100px; background: green; width: 100px; height: 100px"></div> diff --git a/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip.html b/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip.html new file mode 100644 index 00000000000..88fed574203 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/filter-effects/backdrop-filter-opacity-rounded-clip.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>backdrop-filter with opacity:0 under border radius overflow clip should have no effect</title> +<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty"> +<link rel="match" href="backdrop-filter-opacity-rounded-clip-ref.html"> +<div style="width: 300px; height: 200px; border-radius: 80px; overflow: hidden; position: relative"> + <!-- This should be fully clipped by the outer rounded clip. --> + <div style="width: 10px; height: 10px; background: cyan"></div> + <!-- This should be fully visible and not affected by the backdrop filter. --> + <div style="position: absolute; top: 0; left: 100px; width: 100px; height: 100px; background: green"></div> + <div style="position: absolute; top: 0; left: 100px; width: 100px; height: 1000px; opacity: 0; backdrop-filter: blur(3px)"></div> +</div> + diff --git a/tests/wpt/web-platform-tests/dom/events/scrolling/scroll_support.js b/tests/wpt/web-platform-tests/dom/events/scrolling/scroll_support.js index 6fd1b32294b..0a73f34fefc 100644 --- a/tests/wpt/web-platform-tests/dom/events/scrolling/scroll_support.js +++ b/tests/wpt/web-platform-tests/dom/events/scrolling/scroll_support.js @@ -83,3 +83,15 @@ function touchScrollInTarget(pixels_to_scroll, target, direction, pause_time_in_ function touchFlingInTarget(pixels_to_scroll, target, direction) { touchScrollInTarget(pixels_to_scroll, target, direction, 0 /* pause_time */); } + +function mouseActionsInTarget(target, origin, delta, pause_time_in_ms = 100) { + return new test_driver.Actions() + .addPointer("pointer1", "mouse") + .pointerMove(origin.x, origin.y, { origin: target }) + .pointerDown() + .pointerMove(origin.x + delta.x, origin.y + delta.y, { origin: target }) + .pointerMove(origin.x + delta.x * 2, origin.y + delta.y * 2, { origin: target }) + .pause(pause_time_in_ms) + .pointerUp() + .send(); +} diff --git a/tests/wpt/web-platform-tests/dom/events/scrolling/scrollend-event-for-user-scroll.html b/tests/wpt/web-platform-tests/dom/events/scrolling/scrollend-event-for-user-scroll.html new file mode 100644 index 00000000000..30f16571cd8 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/events/scrolling/scrollend-event-for-user-scroll.html @@ -0,0 +1,138 @@ +<!DOCTYPE html> +<html> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="scroll_support.js"></script> +<style> + #targetDiv { + width: 200px; + height: 200px; + overflow: scroll; + } + + #innerDiv { + width: 400px; + height: 400px; + } +</style> +</head> +<body style="margin:0" onload=runTest()> + <div id="targetDiv"> + <div id="innerDiv"> + </div> + </div> +</body> + +<script> +var target_div = document.getElementById('targetDiv'); +var scrollend_arrived = false; + +function onScrollEnd(event) { + assert_false(event.cancelable); + assert_false(event.bubbles); + scrollend_arrived = true; +} + +function resetTargetScrollState() { + target_div.scrollTop = 0; + target_div.scrollLeft = 0; +} + +function checkFinalPosition(target, position, pause_time_in_ms) { + return new Promise((resolve, reject) => { + step_timeout(() => { + resolve(); + assert_equals(position.x, target.scrollLeft); + assert_equals(position.y, target.scrollTop); + }, pause_time_in_ms); + }); +} + +target_div.addEventListener("scrollend", onScrollEnd); + +function runTest() { + promise_test(async (t) => { + // Make sure that no scrollend event is sent to window. + window.addEventListener("scrollend", + t.unreached_func("window got unexpected scrollend event.")); + await waitForCompositorCommit(); + scrollend_arrived = false; + + // Perform drag action on target div and wait for target_div to get scrollend event. + var origin = { x: target_div.offsetWidth / 2, y: target_div.offsetHeight - 50 }; + var delta = { x: 0, y: 40 }; + await mouseActionsInTarget(target_div, origin, delta, 300); + await waitFor(() => { return scrollend_arrived; }, + 'target_div did not receive scrollend event after dragging scroll on target.'); + assert_true(target_div.scrollTop > 0); + await checkFinalPosition(target_div, {x: target_div.scrollLeft, y: target_div.scrollTop}, 300); + }, 'Tests that the target_div gets scrollend event when dragging scroll on target.'); + + promise_test(async (t) => { + resetTargetScrollState(); + // Make sure that no scrollend event is sent to window. + window.addEventListener("scrollend", + t.unreached_func("window got unexpected scrollend event.")); + await waitForCompositorCommit(); + scrollend_arrived = false; + + // Hit the scrollbar of target div and wait for target_div to get scrollend event. + var scrollbar_width = target_div.offsetWidth - target_div.clientWidth; + assert_true(scrollbar_width > 0, "This test requires scrollbar."); + var origin = {x: target_div.offsetWidth - scrollbar_width / 2, y: target_div.offsetHeight - 50}; + var delta = {x: 0, y: 0}; + await mouseActionsInTarget(target_div, origin, delta, 100); + await waitFor(() => { return scrollend_arrived; }, + 'target_div did not receive scrollend event after clicking scrollbar on target.'); + assert_true(target_div.scrollTop > 0); + await checkFinalPosition(target_div, { x: target_div.scrollLeft, y: target_div.scrollTop }, 300); + }, 'Tests that the target_div gets scrollend event when click scrollbar on target.'); + + promise_test(async (t) => { + resetTargetScrollState(); + // Make sure that no scrollend event is sent to window. + window.addEventListener("scrollend", + t.unreached_func("window got unexpected scrollend event.")); + await waitForCompositorCommit(); + scrollend_arrived = false; + + + // Drag the thumb of target div. + var scrollbar_width = target_div.offsetWidth - target_div.clientWidth; + assert_true(scrollbar_width > 0, "This test requires scrollbar."); + var origin = { x: target_div.offsetWidth - scrollbar_width / 2, y: 50 }; + var delta = { x: 0, y: 20 }; + await mouseActionsInTarget(target_div, origin, delta, 100); + await waitFor(() => { return scrollend_arrived; }, + 'target_div did not receive scrollend event after dragging the thumb of target.'); + assert_true(target_div.scrollTop > 0); + await checkFinalPosition(target_div, { x: target_div.scrollLeft, y: target_div.scrollTop }, 300); + }, 'Tests that the target_div gets scrollend event when drag the thumb of target.'); + + promise_test(async (t) => { + resetTargetScrollState(); + // Make sure that no scrollend event is sent to window. + window.addEventListener("scrollend", + t.unreached_func("window got unexpected scrollend event.")); + await waitForCompositorCommit(); + scrollend_arrived = false; + + // Hit and active the target div. + var origin = { x: target_div.offsetWidth / 2, y: target_div.offsetHeight / 2}; + var delta = { x: 0, y: 0 }; + await mouseActionsInTarget(target_div, origin, delta, 100); + // Send DOWN key to the target div. + window.test_driver.send_keys(target_div, '\ue015'); + + await waitFor(() => { return scrollend_arrived; }, + 'target_div did not receive scrollend event after sending DOWN key to target.'); + assert_true(target_div.scrollTop > 0); + await checkFinalPosition(target_div, { x: target_div.scrollLeft, y: target_div.scrollTop }, 300); + }, 'Tests that the target_div gets scrollend event when send DOWN key to target.'); +} +</script> +</html> diff --git a/tests/wpt/web-platform-tests/dom/nodes/ParentNode-replaceChildren.html b/tests/wpt/web-platform-tests/dom/nodes/ParentNode-replaceChildren.html index 6557db44128..b1c1008284b 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/ParentNode-replaceChildren.html +++ b/tests/wpt/web-platform-tests/dom/nodes/ParentNode-replaceChildren.html @@ -94,14 +94,14 @@ const observer = new MutationObserver(mutations => { t.step(() => { - assert_equals(phase, 1); - assert_equals(mutations.length, 1); + assert_equals(phase, 1, "phase"); + assert_equals(mutations.length, 1, "mutations.length"); const mutation = mutations[0]; - assert_equals(mutation.type, "childList"); - assert_equals(mutation.addedNodes.length, 2); - assert_array_equals([...mutation.addedNodes], insertions); - assert_equals(mutation.removedNodes.length, 2); - assert_array_equals([...mutation.removedNodes], children); + assert_equals(mutation.type, "childList", "mutation.type"); + assert_equals(mutation.addedNodes.length, 2, "added nodes length"); + assert_array_equals([...mutation.addedNodes], insertions, "added nodes"); + assert_equals(mutation.removedNodes.length, 2, "removed nodes length"); + assert_array_equals([...mutation.removedNodes], children, "removed nodes"); }); t.done(); }); diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html new file mode 100644 index 00000000000..cf795c23805 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>A test page that postMessage a SharedArrayBuffer to the parent and also sets document.domain</title> + +<script> +"use strict"; + +document.domain = "{{host}}"; +parent.postMessage(new SharedArrayBuffer(10), "*"); +</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html.headers b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html.headers index 56d0ac34282..56d0ac34282 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html.headers +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html.headers diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-messagechannel-site-failure.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-messagechannel-site-failure.html new file mode 100644 index 00000000000..95a610f9285 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-messagechannel-site-failure.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<script> + const channel = new MessageChannel(); + window.parent.postMessage(channel.port2, '*', [channel.port2]); + channel.port1.onmessage = e => { channel.port1.postMessage("message event received") }; + channel.port1.onmessageerror = () => channel.port1.postMessage("messageerror event received"); +</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html.headers b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-messagechannel-site-failure.html.headers index 63b60e490f4..56d0ac34282 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html.headers +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-messagechannel-site-failure.html.headers @@ -1,2 +1,2 @@ -Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: same-site diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html deleted file mode 100644 index a6dd7017758..00000000000 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>A test page that messes with a given SharedArrayBuffer and also sets document.domain</title> -<script src="test-incrementer.js"></script> - -<script> -"use strict"; - -document.domain = "{{host}}"; -setupDestinationIncrementer(self, parent, "*"); -</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html new file mode 100644 index 00000000000..1175b56fb04 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Structured cloning of SharedArrayBuffers into same-origin-domain windows</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize"> +<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<div id="log"></div> + +<script> +"use strict"; +document.domain = "{{host}}"; + +async_test(t => { + const iframe = document.createElement("iframe"); + t.add_cleanup(() => iframe.remove()); + iframe.src = "//{{domains[www1]}}:{{location[port]}}/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-domain-failure.sub.html"; + window.onmessage = t.unreached_func("Got a message event, expected a messageerror event"); + window.onmessageerror = t.step_func_done(); + document.body.append(iframe); +}, "SharedArrayBuffer and a same-origin-domain (but not same-origin) iframe"); +</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html.headers b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.headers index 63b60e490f4..63b60e490f4 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html.headers +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-failure.https.sub.html.headers diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html deleted file mode 100644 index 9205d01df26..00000000000 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Structured cloning of SharedArrayBuffers into same-origin-domain windows</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize"> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/test-incrementer.js"></script> - -<div id="log"></div> - -<script> -"use strict"; -document.domain = "{{host}}"; - -promise_test(t => { - return new Promise(resolve => { - const iframe = document.createElement("iframe"); - iframe.onload = t.step_func(() => { - resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*")); - }); - iframe.src = "//{{domains[www1]}}:{{location[port]}}/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html"; - document.body.appendChild(iframe); - }); -}, "postMessaging to a same-origin-domain (but not same-origin) iframe allows them to see each others' modifications"); -</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html index 16a054a52e1..acef65cbdff 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html +++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html @@ -10,23 +10,33 @@ <div id="log"></div> <script> -["same-origin", "same-site"].forEach(originOrSite => { - promise_test(t => { - return new Promise(resolve => { - const iframe = document.createElement("iframe"); - window.onmessage = t.step_func((message) => { - // data will be a MessagePort - resolve(testSharingViaIncrementerScript(t, message.data, "window", message.data, "iframe")); +promise_test(t => { + return new Promise(resolve => { + const iframe = document.createElement("iframe"); + window.onmessage = t.step_func((message) => { + // data will be a MessagePort + resolve(testSharingViaIncrementerScript(t, message.data, "window", message.data, "iframe")); + }); + iframe.src = "resources/incrementer-iframe-messagechannel.html"; + document.body.appendChild(iframe); + }); +}, `postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications`); + +promise_test(t => { + return new Promise(resolve => { + const iframe = document.createElement("iframe"); + window.onmessage = t.step_func((message) => { + // data will be a MessagePort + message.data.postMessage(new SharedArrayBuffer(10)); + message.data.onmessage = t.step_func(message => { + assert_equals(message.data, "messageerror event received"); + resolve(); }); - let url = "resources/incrementer-iframe-messagechannel.html"; - if (originOrSite === "same-site") { - url = get_host_info().HTTPS_REMOTE_ORIGIN + new URL(url, window.location).pathname; - } - iframe.src = url; - document.body.appendChild(iframe); }); - }, `postMessaging to a ${originOrSite} iframe via MessageChannel allows them to see each others' modifications`); -}); + iframe.src = get_host_info().HTTPS_REMOTE_ORIGIN + new URL("resources/iframe-messagechannel-site-failure.html", window.location).pathname; + document.body.appendChild(iframe); + }); +}, "postMessaging to a same-site iframe via MessageChannel should fail"); promise_test(t => { return new Promise(resolve => { diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html deleted file mode 100644 index e25fc9002d0..00000000000 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Structured cloning of SharedArrayBuffers to similar-origin, but not same-origin, windows</title> -<link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize"> -<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="resources/test-incrementer.js"></script> - -<div id="log"></div> - -<script> -"use strict"; -document.domain = "{{host}}"; - -promise_test(t => { - return new Promise(resolve => { - const iframe = document.createElement("iframe"); - iframe.onload = t.step_func(() => { - resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*")); - }); - iframe.src = "//{{domains[www1]}}:{{location[port]}}/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe.html"; - document.body.appendChild(iframe); - }); -}, "postMessaging to a not same-origin-domain, but similar origin, iframe allows them to see each others' modifications"); -</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured_clone_bigint.html b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured_clone_bigint.html deleted file mode 100644 index b00f88a016b..00000000000 --- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured_clone_bigint.html +++ /dev/null @@ -1,77 +0,0 @@ -<!doctype html> -<!-- Merge this into structured-clone-battery-of-tests.js once - https://bugs.webkit.org/show_bug.cgi?id=179001 is fixed to get better test coverage. --> -<html> - <head> - <meta content="text/html; charset=utf-8" http-equiv="content-type" /> - <title>2.7 Safe passing of structured data</title> - <link rel="help" href="https://html.spec.whatwg.org/multipage/#safe-passing-of-structured-data" /> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> -<body> - <div id="log"></div> - -<script type="text/javascript"> - // Note, this test is designed to be in a similar style to - // html/infrastructure/safe-passing-of-structured-data/structuredclone_0.html - // It is in a separate file to avoid causing a syntax error on UAs which - // do not yet support BigInt, so the rest of the test can continue running. - - var worker; - var testCollection; - setup(function() - { - //the worker is used for each test in sequence - //worker's callback will be set for each test - //worker's internal onmessage echoes the data back to this thread through postMessage - worker = new Worker("./resources/echo-worker.js"); - testCollection = [ - function() { - var t = async_test("Primitive BigInt is cloned"); - t.id = 0; - worker.onmessage = t.step_func(function(e) {assert_equals(1n, e.data, "1n === event.data"); t.done(); }); - t.step(function() { worker.postMessage(1n);}); - }, - function() { - var t = async_test("Instance of BigInt is cloned"); - t.id = 1; - var obj; - t.step(function() {obj = Object(1n);}); - worker.onmessage = t.step_func(function(e) { - assert_equals(obj.constructor, e.data.constructor, "BigInt === event.data.constructor"); - assert_equals(obj.valueOf(), e.data.valueOf(), "(BigInt(1n)).valueOf() === event.data.valueOf()"); - t.done(); - }); - t.step(function() { worker.postMessage(obj);}); - }, - ]; - }, {explicit_done:true}); - - //Callback for result_callback - //queues the next test in the array testCollection - //serves to make test execution sequential from the async worker callbacks - //alternatively, we would have to create a worker for each test - function testFinished(test) { - if(test.id < testCollection.length - 1) { - //queue the function so that stack remains shallow - queue(testCollection[test.id+1]); - } else { - //when the last test has run, explicitly end test suite - done(); - } - } - function queue(func) { - step_timeout(func, 10); - } - - add_result_callback(testFinished); - //start the first test manually - queue(testCollection[0]); - - - - - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/html/webappapis/structured-clone/structured-clone-battery-of-tests.js b/tests/wpt/web-platform-tests/html/webappapis/structured-clone/structured-clone-battery-of-tests.js index 751a0e1a9ea..0c96ded2088 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/structured-clone/structured-clone-battery-of-tests.js +++ b/tests/wpt/web-platform-tests/html/webappapis/structured-clone/structured-clone-battery-of-tests.js @@ -55,7 +55,7 @@ function compare_Object(callback, callback_is_async) { function enumerate_props(compare_func, test_obj) { return function(actual, input) { - for (var x in input) { + for (const x in input) { compare_func(actual[x], input[x], test_obj); } }; @@ -80,6 +80,10 @@ check('primitive number, 9007199254740992', 9007199254740992, compare_primitive) check('primitive number, -9007199254740992', -9007199254740992, compare_primitive); check('primitive number, 9007199254740994', 9007199254740994, compare_primitive); check('primitive number, -9007199254740994', -9007199254740994, compare_primitive); +check('primitive BigInt, 0n', 0n, compare_primitive); +check('primitive BigInt, -0n', -0n, compare_primitive); +check('primitive BigInt, -9007199254740994000n', -9007199254740994000n, compare_primitive); +check('primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n', -9007199254740994000900719925474099400090071992547409940009007199254740994000n, compare_primitive); check('Array primitives', [undefined, null, @@ -99,7 +103,10 @@ check('Array primitives', [undefined, 9007199254740992, -9007199254740992, 9007199254740994, - -9007199254740994], compare_Array(enumerate_props(compare_primitive))); + -9007199254740994, + -12n, + -0n, + 0n], compare_Array(enumerate_props(compare_primitive))); check('Object primitives', {'undefined':undefined, 'null':null, 'true':true, @@ -135,7 +142,7 @@ check('Array Boolean objects', [new Boolean(true), new Boolean(false)], compare_ check('Object Boolean objects', {'true':new Boolean(true), 'false':new Boolean(false)}, compare_Object(enumerate_props(compare_Boolean))); function compare_obj(what) { - var Type = self[what]; + const Type = self[what]; return function(actual, input, test_obj) { if (typeof actual === 'string') assert_unreached(actual); @@ -172,6 +179,9 @@ check('Number 9007199254740992', new Number(9007199254740992), compare_obj('Numb check('Number -9007199254740992', new Number(-9007199254740992), compare_obj('Number')); check('Number 9007199254740994', new Number(9007199254740994), compare_obj('Number')); check('Number -9007199254740994', new Number(-9007199254740994), compare_obj('Number')); +// BigInt does not have a non-throwing constructor +check('BigInt -9007199254740994n', Object(-9007199254740994n), compare_obj('BigInt')); + check('Array Number objects', [new Number(0.2), new Number(0), new Number(-0), @@ -234,7 +244,7 @@ function compare_RegExp(expected_source) { } } function func_RegExp_flags_lastIndex() { - var r = /foo/gim; + const r = /foo/gim; r.lastIndex = 2; return r; } @@ -292,7 +302,7 @@ function b(str) { function encode_cesu8(codeunits) { // http://www.unicode.org/reports/tr26/ section 2.2 // only the 3-byte form is supported - var rv = []; + const rv = []; codeunits.forEach(function(codeunit) { rv.push(b('11100000') + ((codeunit & b('1111000000000000')) >> 12)); rv.push(b('10000000') + ((codeunit & b('0000111111000000')) >> 6)); @@ -302,9 +312,9 @@ function encode_cesu8(codeunits) { } function func_Blob_bytes(arr) { return function() { - var buffer = new ArrayBuffer(arr.length); - var view = new DataView(buffer); - for (var i = 0; i < arr.length; ++i) { + const buffer = new ArrayBuffer(arr.length); + const view = new DataView(buffer); + for (let i = 0; i < arr.length; ++i) { view.setUint8(i, arr[i]); } return new Blob([view]); @@ -361,7 +371,7 @@ function compare_FileList(actual, input, test_obj) { test_obj.done(); } function func_FileList_empty() { - var input = document.createElement('input'); + const input = document.createElement('input'); input.type = 'file'; return input.files; } @@ -370,14 +380,14 @@ check('Array FileList object, FileList empty', () => ([func_FileList_empty()]), check('Object FileList object, FileList empty', () => ({'x':func_FileList_empty()}), compare_Object(enumerate_props(compare_FileList)), true); function compare_ArrayBufferView(view) { - var Type = self[view]; + const Type = self[view]; return function(actual, input, test_obj) { if (typeof actual === 'string') assert_unreached(actual); assert_true(actual instanceof Type, 'instanceof '+view); assert_equals(actual.length, input.length, 'length'); assert_not_equals(actual.buffer, input.buffer, 'buffer'); - for (var i = 0; i < actual.length; ++i) { + for (let i = 0; i < actual.length; ++i) { assert_equals(actual[i], input[i], 'actual['+i+']'); } if (test_obj) @@ -395,15 +405,15 @@ function compare_ImageData(actual, input, test_obj) { test_obj.done(); } function func_ImageData_1x1_transparent_black() { - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); return ctx.createImageData(1, 1); } check('ImageData 1x1 transparent black', func_ImageData_1x1_transparent_black, compare_ImageData, true); function func_ImageData_1x1_non_transparent_non_black() { - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); - var imagedata = ctx.createImageData(1, 1); + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + const imagedata = ctx.createImageData(1, 1); imagedata.data[0] = 100; imagedata.data[1] = 101; imagedata.data[2] = 102; @@ -419,7 +429,7 @@ check('Object ImageData object, ImageData 1x1 non-transparent non-black', () => check('Array sparse', new Array(10), compare_Array(enumerate_props(compare_primitive))); check('Array with non-index property', function() { - var rv = []; + const rv = []; rv.foo = 'bar'; return rv; }, compare_Array(enumerate_props(compare_primitive))); @@ -430,12 +440,12 @@ function check_circular_property(prop) { }; } check('Array with circular reference', function() { - var rv = []; + const rv = []; rv[0] = rv; return rv; }, compare_Array(check_circular_property('0'))); check('Object with circular reference', function() { - var rv = {}; + const rv = {}; rv['x'] = rv; return rv; }, compare_Object(check_circular_property('x'))); @@ -445,11 +455,11 @@ function check_identical_property_values(prop1, prop2) { }; } check('Array with identical property values', function() { - var obj = {} + const obj = {} return [obj, obj]; }, compare_Array(check_identical_property_values('0', '1'))); check('Object with identical property values', function() { - var obj = {} + const obj = {} return {'x':obj, 'y':obj}; }, compare_Object(check_identical_property_values('x', 'y'))); @@ -459,13 +469,13 @@ function check_absent_property(prop) { }; } check('Object with property on prototype', function() { - var Foo = function() {}; + const Foo = function() {}; Foo.prototype = {'foo':'bar'}; return new Foo(); }, compare_Object(check_absent_property('foo'))); check('Object with non-enumerable property', function() { - var rv = {}; + const rv = {}; Object.defineProperty(rv, 'foo', {value:'bar', enumerable:false, writable:true, configurable:true}); return rv; }, compare_Object(check_absent_property('foo'))); @@ -478,7 +488,7 @@ function check_writable_property(prop) { }; } check('Object with non-writable property', function() { - var rv = {}; + const rv = {}; Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:false, configurable:true}); return rv; }, compare_Object(check_writable_property('foo'))); @@ -491,7 +501,7 @@ function check_configurable_property(prop) { }; } check('Object with non-configurable property', function() { - var rv = {}; + const rv = {}; Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:true, configurable:false}); return rv; }, compare_Object(check_configurable_property('foo'))); @@ -500,18 +510,18 @@ check('Object with non-configurable property', function() { more substantial changed due to their previous async setup */ function get_canvas_1x1_transparent_black() { - var canvas = document.createElement('canvas'); + const canvas = document.createElement('canvas'); canvas.width = 1; canvas.height = 1; return canvas; } function get_canvas_1x1_non_transparent_non_black() { - var canvas = document.createElement('canvas'); + const canvas = document.createElement('canvas'); canvas.width = 1; canvas.height = 1; - var ctx = canvas.getContext('2d'); - var imagedata = ctx.getImageData(0, 0, 1, 1); + const ctx = canvas.getContext('2d'); + const imagedata = ctx.getImageData(0, 0, 1, 1); imagedata.data[0] = 100; imagedata.data[1] = 101; imagedata.data[2] = 102; @@ -530,7 +540,7 @@ function compare_ImageBitmap(actual, input) { structuredCloneBatteryOfTests.push({ description: 'ImageBitmap 1x1 transparent black', async f(runner) { - var canvas = get_canvas_1x1_transparent_black(); + const canvas = get_canvas_1x1_transparent_black(); const bm = await createImageBitmap(canvas); const copy = await runner.structuredClone(bm); compare_ImageBitmap(bm, copy); @@ -541,7 +551,7 @@ structuredCloneBatteryOfTests.push({ structuredCloneBatteryOfTests.push({ description: 'ImageBitmap 1x1 non-transparent non-black', async f(runner) { - var canvas = get_canvas_1x1_non_transparent_non_black(); + const canvas = get_canvas_1x1_non_transparent_non_black(); const bm = await createImageBitmap(canvas); const copy = await runner.structuredClone(bm); compare_ImageBitmap(bm, copy); @@ -552,7 +562,7 @@ structuredCloneBatteryOfTests.push({ structuredCloneBatteryOfTests.push({ description: 'Array ImageBitmap object, ImageBitmap 1x1 transparent black', async f(runner) { - var canvas = get_canvas_1x1_transparent_black(); + const canvas = get_canvas_1x1_transparent_black(); const bm = [await createImageBitmap(canvas)]; const copy = await runner.structuredClone(bm); compare_Array(enumerate_props(compare_ImageBitmap))(bm, copy); @@ -563,7 +573,7 @@ structuredCloneBatteryOfTests.push({ structuredCloneBatteryOfTests.push({ description: 'Array ImageBitmap object, ImageBitmap 1x1 transparent non-black', async f(runner) { - var canvas = get_canvas_1x1_non_transparent_non_black(); + const canvas = get_canvas_1x1_non_transparent_non_black(); const bm = [await createImageBitmap(canvas)]; const copy = await runner.structuredClone(bm); compare_Array(enumerate_props(compare_ImageBitmap))(bm, copy); @@ -574,7 +584,7 @@ structuredCloneBatteryOfTests.push({ structuredCloneBatteryOfTests.push({ description: 'Object ImageBitmap object, ImageBitmap 1x1 transparent black', async f(runner) { - var canvas = get_canvas_1x1_transparent_black(); + const canvas = get_canvas_1x1_transparent_black(); const bm = {x: await createImageBitmap(canvas)}; const copy = await runner.structuredClone(bm); compare_Object(enumerate_props(compare_ImageBitmap))(bm, copy); @@ -585,7 +595,7 @@ structuredCloneBatteryOfTests.push({ structuredCloneBatteryOfTests.push({ description: 'Object ImageBitmap object, ImageBitmap 1x1 transparent non-black', async f(runner) { - var canvas = get_canvas_1x1_non_transparent_non_black(); + const canvas = get_canvas_1x1_non_transparent_non_black(); const bm = {x: await createImageBitmap(canvas)}; const copy = await runner.structuredClone(bm); compare_Object(enumerate_props(compare_ImageBitmap))(bm, copy); diff --git a/tests/wpt/web-platform-tests/installedapp/idlharness.https.window.js b/tests/wpt/web-platform-tests/installedapp/idlharness.https.window.js index 3988dba414a..7774da6803d 100644 --- a/tests/wpt/web-platform-tests/installedapp/idlharness.https.window.js +++ b/tests/wpt/web-platform-tests/installedapp/idlharness.https.window.js @@ -1,30 +1,18 @@ // META: global=window // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js +// META: timeout=long 'use strict'; // https://wicg.github.io/get-installed-related-apps/spec/ -const idl = ` -dictionary RelatedApplication { - required USVString platform; - USVString url; - DOMString id; - USVString version; -}; - -[Exposed=Window] -partial interface Navigator { - [SecureContext] Promise<sequence<RelatedApplication>> getInstalledRelatedApps(); -};`; - -test(t => { - const idl_array = new IdlArray(); - idl_array.add_untested_idls("interface Navigator {};"); - idl_array.add_idls(idl); - idl_array.add_objects({ - Navigator: ['navigator'], - }); - idl_array.test(); -}, 'IDL test for getInstalledRelatedApps'); +idl_test( + ['get-installed-related-apps'], + ['html'], + idl_array => { + idl_array.add_objects({ + Navigator: ['navigator'], + }); + } +) diff --git a/tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl b/tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl index f84faf7bcd3..c52dcdb8984 100644 --- a/tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl +++ b/tests/wpt/web-platform-tests/interfaces/BackgroundSync.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: Web Background Synchronization (https://wicg.github.io/BackgroundSync/spec/) +// Source: Web Background Synchronization (https://wicg.github.io/background-sync/spec/) partial interface ServiceWorkerRegistration { readonly attribute SyncManager sync; @@ -17,8 +17,9 @@ partial interface ServiceWorkerGlobalScope { attribute EventHandler onsync; }; -[Constructor(DOMString type, SyncEventInit init), Exposed=ServiceWorker] +[Exposed=ServiceWorker] interface SyncEvent : ExtendableEvent { + constructor(DOMString type, SyncEventInit init); readonly attribute DOMString tag; readonly attribute boolean lastChance; }; diff --git a/tests/wpt/web-platform-tests/interfaces/compression.idl b/tests/wpt/web-platform-tests/interfaces/compression.idl new file mode 100644 index 00000000000..47d2b9e48d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/compression.idl @@ -0,0 +1,21 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Compression Streams (https://wicg.github.io/compression/) + +interface mixin GenericTransformStream { + readonly attribute ReadableStream readable; + readonly attribute WritableStream writable; +}; + +[Exposed=(Window,Worker)] +interface CompressionStream { + constructor(DOMString format); +}; +CompressionStream includes GenericTransformStream; + +[Exposed=(Window,Worker)] +interface DecompressionStream { + constructor(DOMString format); +}; +DecompressionStream includes GenericTransformStream; diff --git a/tests/wpt/web-platform-tests/interfaces/css-properties-values-api.idl b/tests/wpt/web-platform-tests/interfaces/css-properties-values-api.idl index ee444ebb29d..d8f54b1e15b 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-properties-values-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-properties-values-api.idl @@ -14,10 +14,6 @@ partial namespace CSS { void registerProperty(PropertyDefinition definition); }; -partial interface CSSRule { - const unsigned short PROPERTY_RULE = 18; -}; - [Exposed=Window] interface CSSPropertyRule : CSSRule { readonly attribute CSSOMString name; diff --git a/tests/wpt/web-platform-tests/interfaces/get-installed-related-apps.idl b/tests/wpt/web-platform-tests/interfaces/get-installed-related-apps.idl new file mode 100644 index 00000000000..cbea101d300 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/get-installed-related-apps.idl @@ -0,0 +1,16 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Get Installed Related Apps API (https://wicg.github.io/get-installed-related-apps/spec/) + +dictionary RelatedApplication { + required USVString platform; + USVString url; + DOMString id; + USVString version; +}; + +[Exposed=Window] +partial interface Navigator { + [SecureContext] Promise<sequence<RelatedApplication>> getInstalledRelatedApps(); +}; diff --git a/tests/wpt/web-platform-tests/interfaces/html.idl b/tests/wpt/web-platform-tests/interfaces/html.idl index 7b2a96ce676..09e1a29043b 100644 --- a/tests/wpt/web-platform-tests/interfaces/html.idl +++ b/tests/wpt/web-platform-tests/interfaces/html.idl @@ -194,6 +194,7 @@ interface HTMLLinkElement : HTMLElement { [CEReactions] attribute USVString imageSrcset; [CEReactions] attribute DOMString imageSizes; [CEReactions] attribute DOMString referrerPolicy; + [CEReactions] attribute boolean disabled; }; HTMLLinkElement includes LinkStyle; diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl index f723acc0ce5..b0d94394b5b 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl @@ -44,7 +44,7 @@ enum XRVisibilityState { [NewObject] Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type); unsigned long requestAnimationFrame(XRFrameRequestCallback callback); - void cancelAnimationFrame(long handle); + void cancelAnimationFrame(unsigned long handle); Promise<void> end(); diff --git a/tests/wpt/web-platform-tests/intersection-observer/isIntersecting-threshold.html b/tests/wpt/web-platform-tests/intersection-observer/isIntersecting-threshold.html index 106b65edd75..842c8e2c9f9 100644 --- a/tests/wpt/web-platform-tests/intersection-observer/isIntersecting-threshold.html +++ b/tests/wpt/web-platform-tests/intersection-observer/isIntersecting-threshold.html @@ -43,7 +43,8 @@ function step3() { assert_equals(entries.length, 2); assert_true(entries[1].intersectionRatio >= 0.5 && entries[1].intersectionRatio < 1); - assert_equals(entries[1].isIntersecting, true); + // See https://github.com/w3c/IntersectionObserver/issues/432 + assert_equals(entries[1].isIntersecting, false); scroller.scrollTop = 100; } diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 776c6332900..078a706f079 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -710,6 +710,7 @@ MISSING DEPENDENCY: webxr/resources/webxr_util.js MISSING DEPENDENCY: contacts/resources/helpers.js MISSING DEPENDENCY: generic-sensor/resources/generic-sensor-helpers.js MISSING DEPENDENCY: orientation-event/resources/orientation-event-helpers.js +MISSING DEPENDENCY: screen_enumeration/resources/screenenumeration-helpers.js # Tests that are false positives for using Ahem as a system font AHEM SYSTEM FONT: acid/acid3/test.html diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js new file mode 100644 index 00000000000..0f71db8f506 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js @@ -0,0 +1,82 @@ +'use strict' + +var ScreenEnumerationTest = (() => { + + class MockScreenEnumeration { + constructor() { + this.bindingSet_ = new mojo.BindingSet(blink.mojom.ScreenEnumeration); + this.interceptor_ = new MojoInterfaceInterceptor(blink.mojom.ScreenEnumeration.name); + this.interceptor_.oninterfacerequest = e => { + this.bindingSet_.addBinding(this, e.handle); + } + this.reset(); + this.interceptor_.start(); + } + + reset() { + this.displays_ = []; + this.internalId_ = 0; + this.primaryId_ = 0; + this.success_ = false; + } + + setIds(internalId, primaryId) { + this.internalId_ = internalId; + this.primaryId_ = primaryId; + } + + setSuccess(success) { + this.success_ = success; + } + + addDisplay(display) { + this.displays_.push(display); + } + + async getDisplays() { + return Promise.resolve({ + displays: this.displays_, + internalId: this.internalId_, + primaryId: this.primaryId_, + success: this.success_, + }); + } + } + + let testInternal = { + initialized: false, + mockScreenEnumeration: null + } + + class ScreenEnumerationTestChromium { + constructor() { + Object.freeze(this); // Makes it immutable. + } + + async initialize() { + if (testInternal.initialized) + throw new Error('Call reset() before initialize().'); + + if (testInternal.mockScreenEnumeration == null) + testInternal.mockScreenEnumeration = new MockScreenEnumeration(); + testInternal.initialized = true; + } + + async reset() { + if (!testInternal.initialized) + throw new Error('Call initialize() before reset().'); + testInternal.mockScreenEnumeration.reset(); + testInternal.initialized = false; + + // Wait for an event loop iteration to let any pending mojo commands + // to finish. + await new Promise(resolve => setTimeout(resolve, 0)); + } + + getMockScreenEnumeration() { + return testInternal.mockScreenEnumeration; + } + } + + return ScreenEnumerationTestChromium; +})(); diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js.header b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js.header new file mode 100644 index 00000000000..6805c323df5 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/chromium/mock-screenenumeration.js.header @@ -0,0 +1 @@ +Content-Type: text/javascript; charset=utf-8 diff --git a/tests/wpt/web-platform-tests/resources/chromium/webxr-test-math-helper.js b/tests/wpt/web-platform-tests/resources/chromium/webxr-test-math-helper.js index 14e16371267..22c6c12d08f 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webxr-test-math-helper.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webxr-test-math-helper.js @@ -239,6 +239,52 @@ class XRMathHelper { return result; } + // Decomposes a matrix, with the assumption that the passed in matrix is + // a rigid transformation (i.e. position and rotation *only*!). + // The result is an object with `position` and `orientation` keys, which should + // be compatible with FakeXRRigidTransformInit. + // The implementation should match the behavior of gfx::Transform, but assumes + // that scale, skew & perspective are not present in the matrix so it could be + // simplified. + static decomposeRigidTransform(m) { + const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3]; + const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7]; + const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11]; + const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15]; + + const position = [m30, m31, m32]; + const orientation = [0, 0, 0, 0]; + + const trace = m00 + m11 + m22; + if (trace > 0) { + const S = Math.sqrt(trace + 1) * 2; + orientation[3] = 0.25 * S; + orientation[0] = (m12 - m21) / S; + orientation[1] = (m20 - m02) / S; + orientation[2] = (m01 - m10) / S; + } else if (m00 > m11 && m00 > m22) { + const S = Math.sqrt(1.0 + m00 - m11 - m22) * 2; + orientation[3] = (m12 - m21) / S; + orientation[0] = 0.25 * S; + orientation[1] = (m01 + m10) / S; + orientation[2] = (m20 + m02) / S; + } else if (m11 > m22) { + const S = Math.sqrt(1.0 + m11 - m00 - m22) * 2; + orientation[3] = (m20 - m02) / S; + orientation[0] = (m01 + m10) / S; + orientation[1] = 0.25 * S; + orientation[2] = (m12 + m21) / S; + } else { + const S = Math.sqrt(1.0 + m22 - m00 - m11) * 2; + orientation[3] = (m01 - m10) / S; + orientation[0] = (m20 + m02) / S; + orientation[1] = (m12 + m21) / S; + orientation[2] = 0.25 * S; + } + + return { position, orientation }; + } + static identity() { return [ 1, 0, 0, 0, diff --git a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js index 4809ac86bd3..adbb42eed8b 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js @@ -201,9 +201,115 @@ class MockVRService { } } +class FakeXRAnchorController { + constructor() { + // Private properties. + this.device_ = null; + this.id_ = null; + this.dirty_ = true; + + // Properties backing up public attributes / methods. + this.deleted_ = false; + this.paused_ = false; + this.anchorOrigin_ = XRMathHelper.identity(); + } + + get deleted() { + return this.deleted_; + } + + pauseTracking() { + if(!this.paused_) { + this.paused_ = true; + this.dirty_ = true; + } + } + + resumeTracking() { + if(this.paused_) { + this.paused_ = false; + this.dirty_ = true; + } + } + + stopTracking() { + if(!this.deleted_) { + this.device_.deleteAnchorController(this.id_); + + this.deleted_ = true; + this.dirty_ = true; + } + } + + setAnchorOrigin(anchorOrigin) { + this.anchorOrigin_ = getMatrixFromTransform(anchorOrigin); + this.dirty_ = true; + } + + // Internal implementation: + set id(value) { + this.id_ = value; + } + + set device(value) { + this.device_ = value; + } + + get dirty() { + return this.dirty_; + } + + markProcessed() { + this.dirty_ = false; + } + + getAnchorOrigin() { + return this.anchorOrigin_; + } +} + +class FakeXRAnchorCreationEvent extends Event { + constructor(type, eventInitDict) { + super(type, eventInitDict); + + this.success_ = false; + this.requestedAnchorOrigin_ = {}; + this.isAttachedToEntity_ = false; + this.anchorController_ = new FakeXRAnchorController(); + + if(eventInitDict.requestedAnchorOrigin != null) { + this.requestedAnchorOrigin_ = eventInitDict.requestedAnchorOrigin; + } + + if(eventInitDict.isAttachedToEntity != null) { + this.isAttachedToEntity_ = eventInitDict.isAttachedToEntity; + } + } + + get requestedAnchorOrigin() { + return this.requestedAnchorOrigin_; + } + + get isAttachedToEntity() { + return this.isAttachedToEntity_; + } + + get success() { + return this.success_; + } + + set success(value) { + this.success_ = value; + } + + get anchorController() { + return this.anchorController_; + } +} + // Implements XRFrameDataProvider and XRPresentationProvider. Maintains a mock -// for XRPresentationProvider. -class MockRuntime { +// for XRPresentationProvider. Implements FakeXRDevice test API. +class MockRuntime extends EventTarget { // Mapping from string feature names to the corresponding mojo types. // This is exposed as a member for extensibility. static featureToMojoMap = { @@ -215,6 +321,7 @@ class MockRuntime { 'hit-test': device.mojom.XRSessionFeature.HIT_TEST, 'dom-overlay': device.mojom.XRSessionFeature.DOM_OVERLAY, 'light-estimation': device.mojom.XRSessionFeature.LIGHT_ESTIMATION, + 'anchors': device.mojom.XRSessionFeature.ANCHORS, }; static sessionModeToMojoMap = { @@ -224,6 +331,8 @@ class MockRuntime { }; constructor(fakeDeviceInit, service) { + super(); + this.sessionClient_ = new device.mojom.XRSessionClientPtr(); this.presentation_provider_ = new MockXRPresentationProvider(); @@ -248,6 +357,10 @@ class MockRuntime { // ID of the next subscription to be assigned. this.next_hit_test_id_ = 1; + this.anchor_controllers_ = new Map(); + // ID of the next anchor to be assigned. + this.next_anchor_id_ = 1; + let supportedModes = []; if (fakeDeviceInit.supportedModes) { supportedModes = fakeDeviceInit.supportedModes.slice(); @@ -571,6 +684,11 @@ class MockRuntime { this.input_sources_.delete(source.source_id_); } + // These methods are intended to be used by FakeXRAnchorController only. + deleteAnchorController(controllerId) { + this.anchor_controllers_.delete(controllerId); + } + // Extension point for non-standard modules. _injectAdditionalFrameData(options, frameData) { @@ -623,6 +741,8 @@ class MockRuntime { this._calculateHitTestResults(frameData); + this._calculateAnchorInformation(frameData); + this._injectAdditionalFrameData(options, frameData); return Promise.resolve({ @@ -662,25 +782,7 @@ class MockRuntime { }); } - if (nativeOriginInformation.$tag == device.mojom.XRNativeOriginInformation.Tags.inputSourceId) { - if (!this.input_sources_.has(nativeOriginInformation.inputSourceId)) { - // Reject - unknown input source ID. - return Promise.resolve({ - result : device.mojom.SubscribeToHitTestResult.FAILURE_GENERIC, - subscriptionId : 0 - }); - } - } else if (nativeOriginInformation.$tag == device.mojom.XRNativeOriginInformation.Tags.referenceSpaceCategory) { - // Bounded_floor & unbounded ref spaces are not yet supported for AR: - if (nativeOriginInformation.referenceSpaceCategory == device.mojom.XRReferenceSpaceCategory.UNBOUNDED - || nativeOriginInformation.referenceSpaceCategory == device.mojom.XRReferenceSpaceCategory.BOUNDED_FLOOR) { - return Promise.resolve({ - result : device.mojom.SubscribeToHitTestResult.FAILURE_GENERIC, - subscriptionId : 0 - }); - } - } else { - // Planes and anchors are not yet supported by the mock interface. + if (!this._nativeOriginKnown(nativeOriginInformation)) { return Promise.resolve({ result : device.mojom.SubscribeToHitTestResult.FAILURE_GENERIC, subscriptionId : 0 @@ -716,6 +818,65 @@ class MockRuntime { }); } + createAnchor(nativeOriginInformation, nativeOriginFromAnchor) { + return new Promise((resolve) => { + const mojoFromNativeOrigin = this._getMojoFromNativeOrigin(nativeOriginInformation); + if(mojoFromNativeOrigin == null) { + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + + return; + } + + const mojoFromAnchor = XRMathHelper.mul4x4(mojoFromNativeOrigin, nativeOriginFromAnchor); + + const createAnchorEvent = new FakeXRAnchorCreationEvent("anchorcreate", { + requestedAnchorOrigin: mojoFromAnchor, + isAttachedToEntity: false, + }); + + this.dispatchEvent(createAnchorEvent); + + if(createAnchorEvent.success) { + let anchor_controller = createAnchorEvent.anchorController; + const anchor_id = this.next_anchor_id_; + this.next_anchor_id_++; + + // If the test allowed the anchor creation, + // store the anchor controller & return success. + this.anchor_controllers_.set(anchor_id, anchor_controller); + anchor_controller.device = this; + anchor_controller.id = anchor_id; + + resolve({ + result : device.mojom.CreateAnchorResult.SUCCESS, + anchorId : anchor_id + }); + + return; + } + + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + }); + } + + createPlaneAnchor(planeFromAnchor, planeId) { + return new Promise((resolve) => { + + // Not supported yet. + + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + }); + } + // Utility function requestRuntimeSession(sessionOptions) { return this.runtimeSupportsSession(sessionOptions).then((result) => { @@ -777,6 +938,61 @@ class MockRuntime { }); } + // Private functions - utilities: + _nativeOriginKnown(nativeOriginInformation){ + + if (nativeOriginInformation.$tag == device.mojom.XRNativeOriginInformation.Tags.inputSourceId) { + if (!this.input_sources_.has(nativeOriginInformation.inputSourceId)) { + // Unknown input source. + return false; + } + + return true; + } else if (nativeOriginInformation.$tag == device.mojom.XRNativeOriginInformation.Tags.referenceSpaceCategory) { + // Bounded_floor & unbounded ref spaces are not yet supported for AR: + if (nativeOriginInformation.referenceSpaceCategory == device.mojom.XRReferenceSpaceCategory.UNBOUNDED + || nativeOriginInformation.referenceSpaceCategory == device.mojom.XRReferenceSpaceCategory.BOUNDED_FLOOR) { + return false; + } + + return true; + } else { + // Planes and anchors are not yet supported by the mock interface. + return false; + } + } + + // Private functions - anchors implementation: + + // Modifies passed in frameData to add anchor information. + _calculateAnchorInformation(frameData) { + if (!this.supportedModes_.includes(device.mojom.XRSessionMode.kImmersiveAr)) { + return; + } + + frameData.anchorsData = new device.mojom.XRAnchorsData(); + frameData.anchorsData.allAnchorsIds = []; + frameData.anchorsData.updatedAnchorsData = []; + + for(const [id, controller] of this.anchor_controllers_) { + frameData.anchorsData.allAnchorsIds.push(id); + + // Send the entire anchor data over if there was a change since last GetFrameData(). + if(controller.dirty) { + const anchorData = new device.mojom.XRAnchorData(); + anchorData.id = id; + if(!controller.paused) { + anchorData.pose = XRMathHelper.decomposeRigidTransform( + controller.getAnchorOrigin()); + } + + controller.markProcessed(); + + frameData.anchorsData.updatedAnchorsData.push(anchorData); + } + } + } + // Private functions - hit test implementation: // Modifies passed in frameData to add hit test results. diff --git a/tests/wpt/web-platform-tests/screen_enumeration/README.md b/tests/wpt/web-platform-tests/screen_enumeration/README.md new file mode 100644 index 00000000000..04b2ecce7c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/screen_enumeration/README.md @@ -0,0 +1,32 @@ +The `screenenumeration-helpers.js` requires an implementation of the +`ScreenEnumerationTest` interfaces, which should emulate screen enumeration +backends. + +The `ScreenEnumerationTest` interface is defined as: + +``` + class ScreenEnumerationTestChromium { + initialize(); // Sets up the testing environment. + async reset(); // Frees the resources. + getMockScreenEnumeration(); // Returns `MockScreenEnumeration` interface. + }; + + class MockScreenEnumeration { + reset(); Empties data of created mock displays. + setId(internalId, primaryId); // Set primary screen and internal screen IDs. + setSuccess(success); // Set boolean to validate getDisplays() returned values. + addDisplay(display); // Push display to the display vector. + async getDisplays(); // Interceptor of getDisplays (screen_enumeration.mojom). + }; +``` + +Other helper-functions are located in screenenumeration-helpers.js +``` +makeDisplay(id, bounds, work_area, scale_factor); // Create display object. +``` + +The Chromium implementation of the `ScreenEnumerationTest` interface is located +in [mock-screenenumeration.js](../resources/chromium/mock-screenenumeration.js). + +Other browser vendors should provide their own implementations of +the `ScreenEnumerationTest` interfaces. diff --git a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js index 76223b7907c..f496282b016 100644 --- a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js @@ -1,36 +1,36 @@ -// META: global=window,dedicatedworker,sharedworker,serviceworker +// META: global=window // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -'use strict'; +"use strict"; promise_test(async testCase => { - assert_equals(typeof self.getScreens, 'function'); -}, 'self.getScreens is present'); + assert_equals(typeof self.getScreens, "function"); +}, "self.getScreens is present"); promise_test(async testCase => { - await test_driver.set_permission({name: 'window-placement'}, 'granted'); + await test_driver.set_permission({name: "window-placement"}, "granted"); const screens = await self.getScreens(); assert_greater_than(screens.length, 0); - assert_equals(typeof screens[0].availWidth, 'number'); - assert_equals(typeof screens[0].availHeight, 'number'); - assert_equals(typeof screens[0].width, 'number'); - assert_equals(typeof screens[0].height, 'number'); - assert_equals(typeof screens[0].colorDepth, 'number'); - assert_equals(typeof screens[0].pixelDepth, 'number'); + assert_equals(typeof screens[0].availWidth, "number"); + assert_equals(typeof screens[0].availHeight, "number"); + assert_equals(typeof screens[0].width, "number"); + assert_equals(typeof screens[0].height, "number"); + assert_equals(typeof screens[0].colorDepth, "number"); + assert_equals(typeof screens[0].pixelDepth, "number"); - assert_equals(typeof screens[0].availLeft, 'number'); - assert_equals(typeof screens[0].availTop, 'number'); - assert_equals(typeof screens[0].left, 'number'); - assert_equals(typeof screens[0].top, 'number'); - assert_equals(typeof screens[0].orientation, 'object'); + assert_equals(typeof screens[0].availLeft, "number"); + assert_equals(typeof screens[0].availTop, "number"); + assert_equals(typeof screens[0].left, "number"); + assert_equals(typeof screens[0].top, "number"); + assert_equals(typeof screens[0].orientation, "object"); - assert_equals(typeof screens[0].primary, 'boolean'); - assert_equals(typeof screens[0].internal, 'boolean'); - assert_equals(typeof screens[0].scaleFactor, 'number'); - assert_equals(typeof screens[0].id, 'string'); - assert_equals(typeof screens[0].touchSupport, 'boolean'); -}, 'self.getScreens returns at least 1 Screen with permission granted'); + assert_equals(typeof screens[0].primary, "boolean"); + assert_equals(typeof screens[0].internal, "boolean"); + assert_equals(typeof screens[0].scaleFactor, "number"); + assert_equals(typeof screens[0].id, "string"); + assert_equals(typeof screens[0].touchSupport, "boolean"); +}, "self.getScreens returns at least 1 Screen with permission granted"); promise_test(async testCase => { await test_driver.set_permission({name: 'window-placement'}, 'denied'); diff --git a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html new file mode 100644 index 00000000000..5ce54839dee --- /dev/null +++ b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.values.https.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Screen Enumeration: getScreens() tentative</title> +<!-- TODO: update link to W3C whenever specifications are ready --> +<link rel="help" href="https://github.com/webscreens/screen-enumeration"/> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/screenenumeration-helpers.js"></script> +<script> + +"use strict"; + +screen_enumeration_test(async (t, mockScreenEnum) => { + let display1 = makeDisplay(10, + {x: 0, y: 10, width: 1200, height: 800}, + {x: 20, y: 30, width: 1000, height: 600}, + 1.0); + + mockScreenEnum.addDisplay(display1); + mockScreenEnum.setIds(mockScreenEnum.displays_[0].id, mockScreenEnum.displays_[0].id); + mockScreenEnum.setSuccess(true); + + // Grant window-placement permissions for testdriver. + await test_driver.set_permission({name: "window-placement"}, "granted"); + + // This call is calling GetDisplays, which should fall in interceptor. + const screens = await self.getScreens(); + + assert_equals(screens.length, 1); + + assert_equals(screens[0].left, 0); + assert_equals(screens[0].top, 10); + assert_equals(screens[0].width, 1200); + assert_equals(screens[0].height, 800); + assert_equals(screens[0].availLeft, 20); + assert_equals(screens[0].availTop, 30); + assert_equals(screens[0].availWidth, 1000); + assert_equals(screens[0].availHeight, 600); + assert_equals(screens[0].primary, true); + assert_equals(screens[0].internal, true); + assert_equals(screens[0].scaleFactor, 1.0); + assert_equals(screens[0].id, "0"); +}, "getScreens() returns a single mocked screen"); +</script> diff --git a/tests/wpt/web-platform-tests/screen_enumeration/resources/screenenumeration-helpers.js b/tests/wpt/web-platform-tests/screen_enumeration/resources/screenenumeration-helpers.js new file mode 100644 index 00000000000..d96fca74b5d --- /dev/null +++ b/tests/wpt/web-platform-tests/screen_enumeration/resources/screenenumeration-helpers.js @@ -0,0 +1,131 @@ +"use strict"; + +// In Chromium-based browsers this implementation is provided by a polyfill +// in order to reduce the amount of test-only code shipped to users. To enable +// these tests the browser must be run with these options: +// +// --enable-blink-features=MojoJS,MojoJSTest + +const loadChromiumResources = async () => { + if (!("MojoInterfaceInterceptor" in self)) { + // Do nothing on non-Chromium-based browsers or when the Mojo bindings are + // not present in the global namespace. + return; + } + + const resources = [ + "/gen/layout_test_data/mojo/public/js/mojo_bindings.js", + "/gen/ui/gfx/mojom/color_space.mojom.js", + "/gen/ui/gfx/mojom/buffer_types.mojom.js", + "/gen/ui/gfx/mojom/display_color_spaces.mojom.js", + "/gen/ui/gfx/geometry/mojom/geometry.mojom.js", + "/gen/ui/display/mojom/display.mojom.js", + "/gen/third_party/blink/public/mojom/screen_enumeration/screen_enumeration.mojom.js", + "/resources/testdriver.js", + "/resources/testdriver-vendor.js", + "/resources/chromium/mock-screenenumeration.js", + ]; + await Promise.all(resources.map(path => { + const script = document.createElement("script"); + script.src = path; + script.async = false; + const promise = new Promise((resolve, reject) => { + script.onload = resolve; + script.onerror = reject; + }); + document.head.appendChild(script); + return promise; + })); + +}; + +async function initialize_screen_enumeration_tests() { + if (typeof ScreenEnumerationTest === "undefined") + await loadChromiumResources(); + + assert_true(typeof ScreenEnumerationTest !== "undefined", + "Screen Enumeration testing interface is not available."); + let enumTest = new ScreenEnumerationTest(); + await enumTest.initialize(); + return enumTest; +} + +function screen_enumeration_test(func, name, properties) { + promise_test(async t => { + let enumTest = await initialize_screen_enumeration_tests(); + t.add_cleanup(enumTest.reset); + await func(t, enumTest.getMockScreenEnumeration()); + }, name, properties); +} + +// Construct a mock display with provided properties +function makeDisplay(id, bounds, work_area, scale_factor) { + let myColorSpace = fillColorSpaceVector(); + let myBufferFormat = fillBufferFormatVector(); + let newDisplay = new display.mojom.Display({id: id, + bounds: new gfx.mojom.Rect({x: bounds.x, y: bounds.y, + width: bounds.width, + height: bounds.height}), + sizeInPixels: new gfx.mojom.Size({width: bounds.width, + height: bounds.height}), + maximumCursorSize: new gfx.mojom.Size({width: 20, height: 20}), + workArea: new gfx.mojom.Rect({x: work_area.x, y: work_area.y, + width: work_area.width, + height: work_area.height}), + deviceScaleFactor: scale_factor, + rotation: display.mojom.Rotation.VALUE_0, + touchSupport: display.mojom.TouchSupport.UNAVAILABLE, + accelerometerSupport: display.mojom.AccelerometerSupport.UNAVAILABLE, + colorSpaces: new gfx.mojom.DisplayColorSpaces({colorSpaces: myColorSpace, + bufferFormats: myBufferFormat, + sdrWhiteLevel: 1.0}), + colorDepth: 10, + depthPerComponent: 10, + isMonochrome: true, + displayFrequency: 120}); + return newDisplay; +} + +// Function to construct color space vector. +// Values are purely random but mandatory. +function fillColorSpaceVector() { + let colorSpaceVector = []; + for (let i = 0; i < 6; i++) { + let colorSpace = new gfx.mojom.ColorSpace({ + primaries: gfx.mojom.ColorSpacePrimaryID.BT709, + transfer: gfx.mojom.ColorSpaceTransferID.BT709, + matrix: gfx.mojom.ColorSpaceMatrixID.BT709, + range: gfx.mojom.ColorSpaceRangeID.LIMITED, + customPrimaryMatrix: fillCustomPrimaryMatrix(), + transferParams: fillTransferParams()}); + colorSpaceVector.push(colorSpace); + } + return colorSpaceVector; +} + +function fillCustomPrimaryMatrix () { + let matrix = [1.1, 1.2, 1.3, + 2.1, 2.2, 2.3, + 3.1, 3.2, 3.3]; + return matrix; +} + +function fillTransferParams () { + let params = [1.1, 1.2, 1.3, + 2.1, 2.2, 2.3, + 3.1]; + return params; +} + +// Function to construct buffer format vector. +// Values are purely random but mandatory. +function fillBufferFormatVector() { + + let bufferFormat = [gfx.mojom.BufferFormat.RGBA_8888, + gfx.mojom.BufferFormat.RGBA_8888, + gfx.mojom.BufferFormat.RGBA_8888, + gfx.mojom.BufferFormat.RGBA_8888, + gfx.mojom.BufferFormat.RGBA_8888, + gfx.mojom.BufferFormat.RGBA_8888]; + return bufferFormat; +} diff --git a/tests/wpt/web-platform-tests/screen_enumeration/screen_enumeration_permission.window.js b/tests/wpt/web-platform-tests/screen_enumeration/screen_enumeration_permission.window.js new file mode 100644 index 00000000000..00adbfc52ac --- /dev/null +++ b/tests/wpt/web-platform-tests/screen_enumeration/screen_enumeration_permission.window.js @@ -0,0 +1,20 @@ +// META: global=window +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +"use strict"; + +promise_test(async t => { + await test_driver.set_permission({ name: "window-placement" }, "denied", false); + + const status = await navigator.permissions.query({ name:"window-placement" }); + assert_class_string(status, "PermissionStatus"); + assert_equals(status.state, "denied"); +}, "Deny window placement permission should work."); + +promise_test(async t => { + await test_driver.set_permission({ name: "window-placement" }, "granted", false); + + const status = await navigator.permissions.query({ name: "window-placement" }); + assert_class_string(status, "PermissionStatus"); + assert_equals(status.state, "granted"); +}, "Grant window placement permission should work."); diff --git a/tests/wpt/web-platform-tests/tools/quic/commands.json b/tests/wpt/web-platform-tests/tools/quic/commands.json index 044322eed3b..d4e3ce81280 100644 --- a/tests/wpt/web-platform-tests/tools/quic/commands.json +++ b/tests/wpt/web-platform-tests/tools/quic/commands.json @@ -1,10 +1,10 @@ { - "servequic": { + "serve-quic-transport": { "path": "serve.py", "script": "run", "parser": "get_parser", "py3only": true, - "help": "Start the QUIC server", + "help": "Start the QUIC server for WebTransport", "virtualenv": true, "requirements": [ "requirements.txt" diff --git a/tests/wpt/web-platform-tests/tools/quic/quic_transport_server.py b/tests/wpt/web-platform-tests/tools/quic/quic_transport_server.py index 9a04ad17f19..deef46fb8a7 100644 --- a/tests/wpt/web-platform-tests/tools/quic/quic_transport_server.py +++ b/tests/wpt/web-platform-tests/tools/quic/quic_transport_server.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -import argparse import asyncio import io import logging @@ -7,6 +5,7 @@ import os import re import struct import urllib.parse +import traceback from typing import Dict, Optional from aioquic.asyncio import QuicConnectionProtocol, serve @@ -16,8 +15,9 @@ from aioquic.quic.events import StreamDataReceived, QuicEvent from aioquic.tls import SessionTicket SERVER_NAME = 'aioquic-transport' +logger = logging.getLogger(__name__) -handlers_path = None +handlers_path = '' class EventHandler: @@ -50,7 +50,7 @@ class QuicTransportProtocol(QuicConnectionProtocol): def quic_event_received(self, event: QuicEvent) -> None: prefix = '!!' - logging.log(logging.INFO, 'QUIC event: %s' % type(event)) + logger.info('QUIC event: %s', type(event)) try: if (not self.client_indication_finished and isinstance(event, StreamDataReceived) and @@ -75,7 +75,8 @@ class QuicTransportProtocol(QuicConnectionProtocol): self.handler.handle_event(event) except Exception as e: self.handler = None - logging.log(logging.WARN, prefix + str(e)) + logger.warn(prefix + str(e)) + traceback.print_exc() self.close() def parse_client_indication(self, bs): @@ -113,8 +114,7 @@ class QuicTransportProtocol(QuicConnectionProtocol): else: # We must ignore unrecognized fields. pass - logging.log(logging.INFO, - 'origin = %s, path = %s' % (origin_string, path_string)) + logger.info('origin = %s, path = %s', origin_string, path_string) if origin is None: raise Exception('No origin is given') if path is None: @@ -125,7 +125,7 @@ class QuicTransportProtocol(QuicConnectionProtocol): raise Exception('Invalid origin: %s' % origin_string) # To make the situation simple we accept only simple path strings. - m = re.compile('^/([a-zA-Z0-9\._\-]+)$').match(path.path) + m = re.compile(r'^/([a-zA-Z0-9\._\-]+)$').match(path.path) if m is None: raise Exception('Invalid path: %s' % path_string) @@ -136,7 +136,7 @@ class QuicTransportProtocol(QuicConnectionProtocol): if self.is_closing_or_closed(): return self.client_indication_finished = True - logging.log(logging.INFO, 'Client indication finished') + logger.info('Client indication finished') def create_event_handler(self, handler_name: str) -> None: global_dict = {} @@ -167,73 +167,29 @@ class SessionTicketStore: return self.tickets.pop(label, None) -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='QUIC server') - parser.add_argument( - '-c', - '--certificate', - type=str, - required=True, - help='load the TLS certificate from the specified file', - ) - parser.add_argument( - '--host', - type=str, - default='::', - help='listen on the specified address (defaults to ::)', - ) - parser.add_argument( - '--port', - type=int, - default=4433, - help='listen on the specified port (defaults to 4433)', - ) - parser.add_argument( - '-k', - '--private-key', - type=str, - required=True, - help='load the TLS private key from the specified file', - ) - parser.add_argument( - '--handlers-path', - type=str, - required=True, - help='the directory path of QuicTransport event handlers', - ) - parser.add_argument( - '-v', - '--verbose', - action='store_true', - help='increase logging verbosity' - ) - args = parser.parse_args() - - logging.basicConfig( - format='%(asctime)s %(levelname)s %(name)s %(message)s', - level=logging.DEBUG if args.verbose else logging.INFO, - ) - +def start(kwargs): configuration = QuicConfiguration( alpn_protocols=['wq-vvv-01'] + ['siduck'], is_client=False, max_datagram_frame_size=65536, ) - handlers_path = os.path.abspath(os.path.expanduser(args.handlers_path)) - logging.log(logging.INFO, 'port = %s' % args.port) - logging.log(logging.INFO, 'handlers path = %s' % handlers_path) + global handlers_path + handlers_path = os.path.abspath(os.path.expanduser( + kwargs['handlers_path'])) + logger.info('port = %s', kwargs['port']) + logger.info('handlers path = %s', handlers_path) # load SSL certificate and key - configuration.load_cert_chain(args.certificate, args.private_key) + configuration.load_cert_chain(kwargs['certificate'], kwargs['private_key']) ticket_store = SessionTicketStore() loop = asyncio.get_event_loop() loop.run_until_complete( serve( - args.host, - args.port, + kwargs['host'], + kwargs['port'], configuration=configuration, create_protocol=QuicTransportProtocol, session_ticket_fetcher=ticket_store.pop, diff --git a/tests/wpt/web-platform-tests/tools/quic/serve.py b/tests/wpt/web-platform-tests/tools/quic/serve.py index 9893f25e27b..517b4c34b93 100755 --- a/tests/wpt/web-platform-tests/tools/quic/serve.py +++ b/tests/wpt/web-platform-tests/tools/quic/serve.py @@ -1,25 +1,73 @@ #!/usr/bin/env python3 import argparse +import logging +import os import sys +_dir = os.path.dirname(__file__) + def get_parser(): - parser = argparse.ArgumentParser() - parser.add_argument("--verbose", action="store_true", default=False, - help="turn on verbose logging") + parser = argparse.ArgumentParser(description='QUIC server') + parser.add_argument( + '-c', + '--certificate', + type=str, + default=os.path.join(_dir, 'certs', 'cert.pem'), + help='load the TLS certificate from the specified file', + ) + parser.add_argument( + '--host', + type=str, + default='::', + help='listen on the specified address (defaults to ::)', + ) + parser.add_argument( + '--port', + type=int, + default=4433, + help='listen on the specified port (defaults to 4433)', + ) + parser.add_argument( + '-k', + '--private-key', + type=str, + default=os.path.join(_dir, 'certs', 'cert.key'), + help='load the TLS private key from the specified file', + ) + parser.add_argument( + '--handlers-path', + type=str, + default=os.path.join( + _dir, '..', '..', 'webtransport', 'quic', 'handlers'), + help='the directory path of QuicTransport event handlers', + ) + parser.add_argument( + '-v', + '--verbose', + action='store_true', + help='increase logging verbosity' + ) return parser def run(venv, **kwargs): - # TODO(Hexcles): Replace this with actual implementation. - print(sys.version) - assert sys.version_info.major == 3 - import aioquic - print('aioquic: ' + aioquic.__version__) + assert sys.version_info.major == 3, 'QUIC server only runs in Python 3' + logging.basicConfig( + format='%(asctime)s %(levelname)s %(name)s %(message)s', + level=logging.DEBUG if kwargs.get('verbose') else logging.INFO, + ) + + # Delay import after version check to make the error easier to understand. + from .quic_transport_server import start + start(kwargs) def main(): + # This is only used when executing the script directly. Users are + # responsible for managing venv themselves. `wpt serve-quic-transport` does + # NOT use this code path. kwargs = vars(get_parser().parse_args()) return run(None, **kwargs) diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py index 43ff7bd0dfb..d98c81eafbb 100644 --- a/tests/wpt/web-platform-tests/tools/serve/serve.py +++ b/tests/wpt/web-platform-tests/tools/serve/serve.py @@ -10,6 +10,7 @@ import os import platform import signal import socket +import subprocess import sys import threading import time @@ -528,7 +529,8 @@ def start_servers(host, ports, paths, routes, bind_address, config, **kwargs): "https": start_https_server, "h2": start_http2_server, "ws": start_ws_server, - "wss": start_wss_server}[scheme] + "wss": start_wss_server, + "quic-transport": start_quic_transport_server}[scheme] server_proc = ServerProc(scheme=scheme) server_proc.start(init_func, host, port, paths, routes, bind_address, @@ -702,6 +704,63 @@ def start_wss_server(host, port, paths, routes, bind_address, config, **kwargs): startup_failed(log=False) +class QuicTransportDaemon(object): + def __init__(self, host, port, handlers_path=None, private_key=None, certificate=None, log_level=None): + args = ["python3", "wpt", "serve-quic-transport"] + if host: + args += ["--host", host] + if port: + args += ["--port", str(port)] + if private_key: + args += ["--private-key", private_key] + if certificate: + args += ["--certificate", certificate] + if handlers_path: + args += ["--handlers-path", handlers_path] + if log_level == "debug": + args += ["--verbose"] + self.command = args + self.proc = None + + def start(self, block=False): + if block: + subprocess.call(self.command) + else: + def handle_signal(*_): + if self.proc: + try: + self.proc.terminate() + except OSError: + # It's fine if the child already exits. + pass + self.proc.wait() + sys.exit(0) + + signal.signal(signal.SIGTERM, handle_signal) + signal.signal(signal.SIGINT, handle_signal) + + self.proc = subprocess.Popen(self.command) + # Give the server a second to start and then check. + time.sleep(1) + if self.proc.poll(): + sys.exit(1) + + +def start_quic_transport_server(host, port, paths, routes, bind_address, config, **kwargs): + # Ensure that when we start this in a new process we have the global lock + # in the logging module unlocked + reload_module(logging) + release_mozlog_lock() + try: + return QuicTransportDaemon(host, + port, + private_key=config.ssl_config["key_path"], + certificate=config.ssl_config["cert_path"], + log_level=config.log_level) + except Exception: + startup_failed(log=False) + + def start(config, routes, **kwargs): host = config["server_host"] ports = config.ports @@ -729,6 +788,8 @@ def build_config(override_path=None, **kwargs): enable_http2 = True if enable_http2: rv._default["ports"]["h2"] = [9000] + if kwargs.get("quic_transport"): + rv._default["ports"]["quic-transport"] = [10000] if override_path and os.path.exists(override_path): with open(override_path) as f: @@ -880,6 +941,7 @@ def get_parser(): help=argparse.SUPPRESS) parser.add_argument("--no-h2", action="store_false", dest="h2", default=None, help="Disable the HTTP/2.0 server") + parser.add_argument("--quic-transport", action="store_true", help="Enable QUIC server for WebTransport") return parser diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py index f76836ea66b..1236d1f9bc2 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py @@ -126,7 +126,7 @@ class TestEnvironment(object): config = serve.ConfigBuilder() - config.ports = { + ports = { "http": [8000, 8001], "https": [8443], "ws": [8888], @@ -134,7 +134,8 @@ class TestEnvironment(object): "h2": [9000], } if self.enable_quic: - config.ports["quic"] = [10000] + ports["quic-transport"] = [10000] + config.ports = ports if os.path.exists(override_path): with open(override_path) as f: @@ -238,6 +239,9 @@ class TestEnvironment(object): if not failed and self.test_server_port: for scheme, servers in iteritems(self.servers): + # TODO(Hexcles): Find a way to test QUIC's UDP port. + if scheme == "quic-transport": + continue for port, server in servers: s = socket.socket() s.settimeout(0.1) diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/test_response.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/test_response.py new file mode 100644 index 00000000000..f8048ac1ce5 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/test_response.py @@ -0,0 +1,32 @@ +import mock +from six import BytesIO + +from wptserve.response import Response + + +def test_response_status(): + cases = [200, (200, b'OK'), (200, u'OK'), ('200', 'OK')] + + for case in cases: + handler = mock.Mock() + handler.wfile = BytesIO() + request = mock.Mock() + request.protocol_version = 'HTTP/1.1' + response = Response(handler, request) + + response.status = case + expected = case if isinstance(case, tuple) else (case, None) + if expected[0] == '200': + expected = (200, expected[1]) + assert response.status == expected + response.writer.write_status(*response.status) + assert handler.wfile.getvalue() == b'HTTP/1.1 200 OK\r\n' + + +def test_response_status_not_string(): + # This behaviour is not documented but kept for backward compatibility. + handler = mock.Mock() + request = mock.Mock() + response = Response(handler, request) + response.status = (200, 100) + assert response.status == (200, '100') diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py index b6f27447451..b24f0cdf476 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py @@ -52,8 +52,9 @@ class Response(object): .. attribute:: status - Status tuple (code, message). Can be set to an integer, in which case the - message part is filled in automatically, or a tuple. + Status tuple (code, message). Can be set to an integer in which case the + message part is filled in automatically, or a tuple (code, message) in + which case code is an int and message is a text or binary string. .. attribute:: headers @@ -92,7 +93,13 @@ class Response(object): if len(value) != 2: raise ValueError else: - self._status = (int(value[0]), str(value[1])) + code = int(value[0]) + message = value[1] + # Only call str() if message is not a string type, so that we + # don't get `str(b"foo") == "b'foo'"` in Python 3. + if not isinstance(message, (binary_type, text_type)): + message = str(message) + self._status = (code, message) else: self._status = (int(value), None) @@ -673,8 +680,8 @@ class ResponseWriter(object): message = response_codes[code][0] else: message = '' - self.write("%s %d %s\r\n" % - (self._response.request.protocol_version, code, message)) + self.write(b"%s %d %s\r\n" % + (isomorphic_encode(self._response.request.protocol_version), code, isomorphic_encode(message))) self._status_written = True def write_header(self, name, value): diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-mandatory-getStats.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-mandatory-getStats.https.html index e48d133f464..5b0d59153dc 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-mandatory-getStats.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-mandatory-getStats.https.html @@ -212,8 +212,9 @@ promise_test(async t => { const pc2 = new RTCPeerConnection(); t.add_cleanup(() => pc2.close()); - pc1.createDataChannel("dummy", {negotiated: true, id: 0}); - pc2.createDataChannel("dummy", {negotiated: true, id: 0}); + const dc1 = pc1.createDataChannel("dummy", {negotiated: true, id: 0}); + const dc2 = pc2.createDataChannel("dummy", {negotiated: true, id: 0}); + const stream = await getNoiseStream({video: true, audio:true}); for (const track of stream.getTracks()) { pc1.addTrack(track, stream); diff --git a/tests/wpt/web-platform-tests/webtransport/quic/client-indication.any.js b/tests/wpt/web-platform-tests/webtransport/quic/client-indication.sub.any.js index 15baa5f8542..62f2f3fe4d2 100644 --- a/tests/wpt/web-platform-tests/webtransport/quic/client-indication.any.js +++ b/tests/wpt/web-platform-tests/webtransport/quic/client-indication.sub.any.js @@ -1,7 +1,7 @@ // META: quic=true // META: script=/common/get-host-info.sub.js -const PORT = 8983; +const PORT = '{{ports[quic-transport][0]}}'; const {ORIGINAL_HOST: HOST, ORIGIN} = get_host_info(); const BASE = `quic-transport://${HOST}:${PORT}`; diff --git a/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html b/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html new file mode 100644 index 00000000000..907da06880e --- /dev/null +++ b/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html @@ -0,0 +1,115 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/webxr_util.js"></script> +<script src="../resources/webxr_test_asserts.js"></script> +<script src="../resources/webxr_test_constants.js"></script> +<script src="../resources/webxr_test_constants_fake_world.js"></script> +<canvas /> + +<script> + +// 1m above world origin. +const VIEWER_ORIGIN_TRANSFORM = { + position: [0, 1, 0], + orientation: [0, 0, 0, 1], +}; + +const fakeDeviceInitParams = { + supportedModes: ["immersive-ar"], + views: VALID_VIEWS, + supportedFeatures: ALL_FEATURES, + viewerOrigin: VIEWER_ORIGIN_TRANSFORM, +}; + +// Creates a test method that leverages anchors API. +// |expectSucceeded| - true if the anchors creation request is expected to succeed, false otherwise +// |endSession| - true if the test case should call session.end() prior to creating an anchor +// |expectedError| - expected error name that should be returned in case expectSucceeded is false +const testFunctionGenerator = function(expectSucceeded, endSession, expectedError) { + + const testFunction = function(session, fakeDeviceController, t) { + + let debug = xr_debug.bind(this, 'testAnchorStates'); + + fakeDeviceController.addEventListener("anchorcreate", (anchorCreateEvent) => { + // All anchor creation requests that reach this stage should be marked as successful. + // If this test is expected to fail, the failure will happen earlier in the anchor + // creation process. + anchorCreateEvent.success = true; + }); + + let watcherDone = new Event("watcherdone"); + let eventWatcher = new EventWatcher(t, session, ["watcherdone"]); + let eventPromise = eventWatcher.wait_for(["watcherdone"]); + + session.requestReferenceSpace('local').then((localRefSpace) => { + + const onFrame = function(time, frame) { + debug("rAF 1"); + + let setUpPromise = Promise.resolve(); + if(endSession) { + debug("ending session"); + setUpPromise = session.end(); + } + + setUpPromise.then(() => { + debug("creating anchor"); + frame.createAnchor(new XRRigidTransform(), localRefSpace) + .then((anchor) => { + debug("anchor created"); + + t.step(() => { + assert_true(expectSucceeded, + "`createAnchor` succeeded when it was expected to fail"); + }); + + session.dispatchEvent(watcherDone); + }).catch((error) => { + debug("anchor creation failed"); + + t.step(() => { + assert_false(expectSucceeded, + "`createAnchor` failed when it was expected to succeed, error: " + error); + assert_equals(error.name, expectedError, + "`createAnchor` failed with unexpected error name"); + }); + + session.dispatchEvent(watcherDone); + }); + + // Anchor result will only take effect with frame data - schedule + // a frame after we requested anchor creation, otherwise the test will time out. + session.requestAnimationFrame(() => { + debug("rAF 2"); + }); + }); // setUpPromise.then(() => { ... }) + }; // onFrame() { ... } + + debug("requesting animation frame"); + session.requestAnimationFrame(onFrame); + }); // session.requestReferenceSpace(...) + + return eventPromise; + }; // testFunction + + return testFunction; +}; + +xr_session_promise_test("Anchor creation succeeds if the feature was requested", + testFunctionGenerator(/*expectSucceeded=*/true, /*endSession=*/false), + fakeDeviceInitParams, + 'immersive-ar', { 'requiredFeatures': ['anchors'] }); + +xr_session_promise_test("Anchor creation fails if the feature was not requested", + testFunctionGenerator(/*expectSucceeded=*/false, /*endSession=*/false, "NotSupportedError"), + fakeDeviceInitParams, + 'immersive-ar', {}); + +xr_session_promise_test("Anchor creation fails if the feature was requested but the session already ended", + testFunctionGenerator(/*expectSucceeded=*/false, /*endSession=*/true, "InvalidStateError"), + fakeDeviceInitParams, + 'immersive-ar', { 'requiredFeatures': ['anchors'] }); + +</script> diff --git a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js index 3ae294c015a..139ab775684 100644 --- a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js +++ b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js @@ -124,6 +124,7 @@ const ALL_FEATURES = [ 'hit-test', 'dom-overlay', 'light-estimation', + 'anchors', ]; const TRACKED_IMMERSIVE_DEVICE = { diff --git a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini index d4b3a4f7564..e15b5c9bbfb 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini @@ -143,3 +143,6 @@ [WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0] expected: FAIL + [WebGL test #44: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,255,255,0] + expected: FAIL + |