From a0282914662944172883232d6e07162c4cb10239 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Sat, 17 May 2025 10:14:19 +0200 Subject: [PATCH] Don't build testbinding-related code by default (#37034) Disabling the TestBinding-related bindings and implementations saves 2mb in a release build. Also, we lost the related test preferences when we turned the layout-2020 tests on, so the tests have all been failing for a long time. Testing: Existing tests in CI. --------- Signed-off-by: Josh Matthews --- components/script/Cargo.toml | 1 + components/script/dom/mod.rs | 12 ++++ components/script/dom/worklet.rs | 2 + components/script/dom/workletglobalscope.rs | 5 ++ components/script/timers.rs | 3 + components/script_bindings/Cargo.toml | 1 + .../webidls/TestBinding.webidl | 2 + .../webidls/TestBindingIterable.webidl | 2 + .../TestBindingMaplikeWithInterface.webidl | 2 + .../TestBindingMaplikeWithPrimitive.webidl | 2 + .../webidls/TestBindingPairIterable.webidl | 2 + .../webidls/TestBindingProxy.webidl | 3 + .../TestBindingSetlikeWithInterface.webidl | 2 + .../TestBindingSetlikeWithPrimitive.webidl | 2 + .../script_bindings/webidls/TestUtils.webidl | 2 + .../webidls/TestWorklet.webidl | 2 + .../webidls/TestWorkletGlobalScope.webidl | 2 + components/servo/Cargo.toml | 1 + ports/servoshell/Cargo.toml | 2 +- tests/wpt/mozilla/meta/MANIFEST.json | 2 +- tests/wpt/mozilla/meta/__dir__.ini | 10 +++ .../meta/mozilla/binding_keyword.html.ini | 4 -- .../meta/mozilla/codegen_unions.html.ini | 4 -- .../meta/mozilla/custom_auto_rooter.html.ini | 4 -- .../meta/mozilla/globals/entry.html.ini | 7 --- .../meta/mozilla/globals/entry.worker.js.ini | 4 -- .../mozilla/interface_member_exposed.html.ini | 62 ------------------- .../meta/mozilla/interfaces.https.html.ini | 2 +- .../meta/mozilla/interfaces.worker.js.ini | 2 +- .../mozilla/meta/mozilla/iterable.html.ini | 19 ------ .../mozilla/meta/mozilla/navigator.html.ini | 1 - .../mozilla/meta/mozilla/preferences.html.ini | 4 -- .../wpt/mozilla/meta/mozilla/promise.html.ini | 19 ------ .../meta/mozilla/variadic-interface.html.ini | 7 --- .../mozilla/tests/mozilla/preferences.html | 20 +++--- 35 files changed, 72 insertions(+), 149 deletions(-) delete mode 100644 tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/custom_auto_rooter.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/globals/entry.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/globals/entry.worker.js.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/interface_member_exposed.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/iterable.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/preferences.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/promise.html.ini delete mode 100644 tests/wpt/mozilla/meta/mozilla/variadic-interface.html.ini diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index ea1ec52f911..f41ef733c5f 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -18,6 +18,7 @@ crown = ['js/crown'] debugmozjs = ['js/debugmozjs'] jitspew = ['js/jitspew'] profilemozjs = ['js/profilemozjs'] +testbinding = ["script_bindings/testbinding"] tracing = ["dep:tracing", "script_bindings/tracing"] webgl_backtrace = ["canvas_traits/webgl_backtrace"] js_backtrace = [] diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 91a4e1b1359..388d8cfde2a 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -549,17 +549,29 @@ pub(crate) mod svgelement; pub(crate) mod svggraphicselement; pub(crate) mod svgimageelement; pub(crate) mod svgsvgelement; +#[cfg(feature = "testbinding")] pub(crate) mod testbinding; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingiterable; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingmaplikewithinterface; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingmaplikewithprimitive; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingpairiterable; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingproxy; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingsetlikewithinterface; +#[cfg(feature = "testbinding")] pub(crate) mod testbindingsetlikewithprimitive; +#[cfg(feature = "testbinding")] pub(crate) mod testns; +#[cfg(feature = "testbinding")] pub(crate) mod testutils; +#[cfg(feature = "testbinding")] pub(crate) mod testworklet; +#[cfg(feature = "testbinding")] pub(crate) mod testworkletglobalscope; pub(crate) mod text; pub(crate) mod textcontrol; diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs index 7e276859b67..be0a588b279 100644 --- a/components/script/dom/worklet.rs +++ b/components/script/dom/worklet.rs @@ -43,6 +43,7 @@ use crate::dom::bindings::str::USVString; use crate::dom::bindings::trace::{CustomTraceable, JSTraceable, RootedTraceableBox}; use crate::dom::globalscope::GlobalScope; use crate::dom::promise::Promise; +#[cfg(feature = "testbinding")] use crate::dom::testworkletglobalscope::TestWorkletTask; use crate::dom::window::Window; use crate::dom::workletglobalscope::{ @@ -354,6 +355,7 @@ impl WorkletThreadPool { } /// For testing. + #[cfg(feature = "testbinding")] pub(crate) fn test_worklet_lookup(&self, id: WorkletId, key: String) -> Option { let (sender, receiver) = unbounded(); let msg = WorkletData::Task(id, WorkletTask::Test(TestWorkletTask::Lookup(key, sender))); diff --git a/components/script/dom/workletglobalscope.rs b/components/script/dom/workletglobalscope.rs index 6e81220731c..c478830ac0c 100644 --- a/components/script/dom/workletglobalscope.rs +++ b/components/script/dom/workletglobalscope.rs @@ -26,6 +26,7 @@ use crate::dom::bindings::trace::CustomTraceable; use crate::dom::bindings::utils::define_all_exposed_interfaces; use crate::dom::globalscope::GlobalScope; use crate::dom::paintworkletglobalscope::{PaintWorkletGlobalScope, PaintWorkletTask}; +#[cfg(feature = "testbinding")] use crate::dom::testworkletglobalscope::{TestWorkletGlobalScope, TestWorkletTask}; #[cfg(feature = "webgpu")] use crate::dom::webgpu::identityhub::IdentityHub; @@ -60,6 +61,7 @@ impl WorkletGlobalScope { init: &WorkletGlobalScopeInit, ) -> DomRoot { let scope: DomRoot = match scope_type { + #[cfg(feature = "testbinding")] WorkletGlobalScopeType::Test => DomRoot::upcast(TestWorkletGlobalScope::new( runtime, pipeline_id, @@ -163,6 +165,7 @@ impl WorkletGlobalScope { /// Perform a worklet task pub(crate) fn perform_a_worklet_task(&self, task: WorkletTask) { match task { + #[cfg(feature = "testbinding")] WorkletTask::Test(task) => match self.downcast::() { Some(global) => global.perform_a_worklet_task(task), None => warn!("This is not a test worklet."), @@ -203,6 +206,7 @@ pub(crate) struct WorkletGlobalScopeInit { #[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf)] pub(crate) enum WorkletGlobalScopeType { /// A servo-specific testing worklet + #[cfg(feature = "testbinding")] Test, /// A paint worklet Paint, @@ -210,6 +214,7 @@ pub(crate) enum WorkletGlobalScopeType { /// A task which can be performed in the context of a worklet global. pub(crate) enum WorkletTask { + #[cfg(feature = "testbinding")] Test(TestWorkletTask), Paint(PaintWorkletTask), } diff --git a/components/script/timers.rs b/components/script/timers.rs index 0afc3da164a..45574c5d717 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -27,6 +27,7 @@ use crate::dom::bindings::str::DOMString; use crate::dom::document::{FakeRequestAnimationFrameCallback, RefreshRedirectDue}; use crate::dom::eventsource::EventSourceTimeoutCallback; use crate::dom::globalscope::GlobalScope; +#[cfg(feature = "testbinding")] use crate::dom::testbinding::TestBindingCallback; use crate::dom::types::{Window, WorkerGlobalScope}; use crate::dom::xmlhttprequest::XHRTimeoutCallback; @@ -78,6 +79,7 @@ pub(crate) enum OneshotTimerCallback { XhrTimeout(XHRTimeoutCallback), EventSourceTimeout(EventSourceTimeoutCallback), JsTimer(JsTimerTask), + #[cfg(feature = "testbinding")] TestBindingCallback(TestBindingCallback), FakeRequestAnimationFrame(FakeRequestAnimationFrameCallback), RefreshRedirectDue(RefreshRedirectDue), @@ -89,6 +91,7 @@ impl OneshotTimerCallback { OneshotTimerCallback::XhrTimeout(callback) => callback.invoke(can_gc), OneshotTimerCallback::EventSourceTimeout(callback) => callback.invoke(), OneshotTimerCallback::JsTimer(task) => task.invoke(this, js_timers, can_gc), + #[cfg(feature = "testbinding")] OneshotTimerCallback::TestBindingCallback(callback) => callback.invoke(), OneshotTimerCallback::FakeRequestAnimationFrame(callback) => callback.invoke(can_gc), OneshotTimerCallback::RefreshRedirectDue(callback) => callback.invoke(can_gc), diff --git a/components/script_bindings/Cargo.toml b/components/script_bindings/Cargo.toml index 7e4e751a2a8..06d6b59e6c3 100644 --- a/components/script_bindings/Cargo.toml +++ b/components/script_bindings/Cargo.toml @@ -52,6 +52,7 @@ serde_json = { workspace = true } [features] bluetooth = [] +testbinding = [] tracing = ["dep:tracing"] webgpu = [] webxr = ["webxr-api"] diff --git a/components/script_bindings/webidls/TestBinding.webidl b/components/script_bindings/webidls/TestBinding.webidl index 92d95e4fe73..f70e73568cc 100644 --- a/components/script_bindings/webidls/TestBinding.webidl +++ b/components/script_bindings/webidls/TestBinding.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingIterable.webidl b/components/script_bindings/webidls/TestBindingIterable.webidl index cc7628af707..8ebd9ea17b1 100644 --- a/components/script_bindings/webidls/TestBindingIterable.webidl +++ b/components/script_bindings/webidls/TestBindingIterable.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingMaplikeWithInterface.webidl b/components/script_bindings/webidls/TestBindingMaplikeWithInterface.webidl index 1bdd45d7698..e63be1ee42a 100644 --- a/components/script_bindings/webidls/TestBindingMaplikeWithInterface.webidl +++ b/components/script_bindings/webidls/TestBindingMaplikeWithInterface.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingMaplikeWithPrimitive.webidl b/components/script_bindings/webidls/TestBindingMaplikeWithPrimitive.webidl index f0e77fbcae4..4c6538ae9c5 100644 --- a/components/script_bindings/webidls/TestBindingMaplikeWithPrimitive.webidl +++ b/components/script_bindings/webidls/TestBindingMaplikeWithPrimitive.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingPairIterable.webidl b/components/script_bindings/webidls/TestBindingPairIterable.webidl index e3106949e3e..081f94d4b5a 100644 --- a/components/script_bindings/webidls/TestBindingPairIterable.webidl +++ b/components/script_bindings/webidls/TestBindingPairIterable.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingProxy.webidl b/components/script_bindings/webidls/TestBindingProxy.webidl index 957db0f0302..9630dcb61e4 100644 --- a/components/script_bindings/webidls/TestBindingProxy.webidl +++ b/components/script_bindings/webidls/TestBindingProxy.webidl @@ -1,6 +1,9 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// skip-unless CARGO_FEATURE_TESTBINDING + /* * This IDL file was created to test the special operations (see * https://heycam.github.io/webidl/#idl-special-operations) without converting diff --git a/components/script_bindings/webidls/TestBindingSetlikeWithInterface.webidl b/components/script_bindings/webidls/TestBindingSetlikeWithInterface.webidl index 12254b62077..6e5a286a406 100644 --- a/components/script_bindings/webidls/TestBindingSetlikeWithInterface.webidl +++ b/components/script_bindings/webidls/TestBindingSetlikeWithInterface.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestBindingSetlikeWithPrimitive.webidl b/components/script_bindings/webidls/TestBindingSetlikeWithPrimitive.webidl index 7f675a62187..225ae8ea6ab 100644 --- a/components/script_bindings/webidls/TestBindingSetlikeWithPrimitive.webidl +++ b/components/script_bindings/webidls/TestBindingSetlikeWithPrimitive.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestUtils.webidl b/components/script_bindings/webidls/TestUtils.webidl index 290b2a22138..0a0658683aa 100644 --- a/components/script_bindings/webidls/TestUtils.webidl +++ b/components/script_bindings/webidls/TestUtils.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // https://testutils.spec.whatwg.org/ [Exposed=(Window,Worker), Pref="dom_testutils_enabled"] diff --git a/components/script_bindings/webidls/TestWorklet.webidl b/components/script_bindings/webidls/TestWorklet.webidl index 8e5898736b0..3f8fb4f6b1c 100644 --- a/components/script_bindings/webidls/TestWorklet.webidl +++ b/components/script_bindings/webidls/TestWorklet.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/script_bindings/webidls/TestWorkletGlobalScope.webidl b/components/script_bindings/webidls/TestWorkletGlobalScope.webidl index 86599a2c257..52342962c54 100644 --- a/components/script_bindings/webidls/TestWorkletGlobalScope.webidl +++ b/components/script_bindings/webidls/TestWorkletGlobalScope.webidl @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +// skip-unless CARGO_FEATURE_TESTBINDING + // This interface is entirely internal to Servo, and should not be accessible to // web pages. diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index fa64638fa4c..687cdd6a5a2 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -34,6 +34,7 @@ no-wgl = ["mozangle/egl", "mozangle/build_dlls", "surfman/sm-angle-default", "co dynamic_freetype = ["webrender/dynamic_freetype"] profilemozjs = ["script/profilemozjs"] refcell_backtrace = ["script/refcell_backtrace"] +testbinding = ["script/testbinding"] tracing = [ "dep:tracing", "compositing/tracing", diff --git a/ports/servoshell/Cargo.toml b/ports/servoshell/Cargo.toml index a77bd885549..967d72f171b 100644 --- a/ports/servoshell/Cargo.toml +++ b/ports/servoshell/Cargo.toml @@ -63,7 +63,7 @@ icu_locid = "1.5.0" image = { workspace = true } keyboard-types = { workspace = true } libc = { workspace = true } -libservo = { path = "../../components/servo", features = ["background_hang_monitor", "bluetooth"] } +libservo = { path = "../../components/servo", features = ["background_hang_monitor", "bluetooth", "testbinding"] } log = { workspace = true } mime_guess = { workspace = true } raw-window-handle = { workspace = true } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 2797b63f2ae..bf19c365d17 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -13940,7 +13940,7 @@ ] ], "preferences.html": [ - "a1da58a825e2832c7eb55a87322b7ba840ee2661", + "8a65161198c3a692aa007b98643ae3e95b0ae310", [ null, {} diff --git a/tests/wpt/mozilla/meta/__dir__.ini b/tests/wpt/mozilla/meta/__dir__.ini index e7a12669952..6f2a65cc7ec 100644 --- a/tests/wpt/mozilla/meta/__dir__.ini +++ b/tests/wpt/mozilla/meta/__dir__.ini @@ -1,5 +1,15 @@ prefs: [ "dom_serviceworker_enabled:true", + "dom_servo_helpers_enabled:true", + "dom_testbinding_enabled:true", + "dom_testbinding_prefcontrolled_enabled:false", + "dom_testbinding_prefcontrolled2_enabled:true", + "dom_testbinding_preference_value_falsy:false", + "dom_testbinding_preference_value_quote_string_test:\"test\"", + "dom_testbinding_preference_value_space_string_test:test1 test2", + "dom_testbinding_preference_value_string_empty:", + "dom_testbinding_preference_value_string_test:test", + "dom_testbinding_preference_value_truthy:true", "dom_urlpattern_enabled:true", "media_testing_enabled:true", ] diff --git a/tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini b/tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini deleted file mode 100644 index 561c9fd54fe..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/binding_keyword.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[binding_keyword.html] - [Conversion of dictionary elements with rust keywords, and null non-required nullable properties works] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini b/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini deleted file mode 100644 index d848216a0fe..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/codegen_unions.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[codegen_unions.html] - [(DOMString or object) conversion is performed correctly] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/custom_auto_rooter.html.ini b/tests/wpt/mozilla/meta/mozilla/custom_auto_rooter.html.ini deleted file mode 100644 index 624f909974c..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/custom_auto_rooter.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[custom_auto_rooter.html] - [sequence conversion did not lose any values] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/globals/entry.html.ini b/tests/wpt/mozilla/meta/mozilla/globals/entry.html.ini deleted file mode 100644 index e367082db64..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/globals/entry.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[entry.html] - [Incumbent global] - expected: FAIL - - [Entry global] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/globals/entry.worker.js.ini b/tests/wpt/mozilla/meta/mozilla/globals/entry.worker.js.ini deleted file mode 100644 index f4ad971fbde..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/globals/entry.worker.js.ini +++ /dev/null @@ -1,4 +0,0 @@ -[entry.worker.html] - [entry] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/interface_member_exposed.html.ini b/tests/wpt/mozilla/meta/mozilla/interface_member_exposed.html.ini deleted file mode 100644 index 306079ef815..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/interface_member_exposed.html.ini +++ /dev/null @@ -1,62 +0,0 @@ -[interface_member_exposed.html] - expected: ERROR - [Disabled preference hides member controlled by that preference: funcControlledStaticMethodDisabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: prefControlledAttributeDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: prefControlledMethodEnabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: prefControlledConstEnabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: funcControlledAttributeEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: prefControlledStaticAttributeDisabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: funcControlledMethodDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: prefControlledStaticMethodEnabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: prefControlledStaticAttributeEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: prefControlledStaticMethodDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: prefControlledAttributeEnabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: funcControlledStaticMethodEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: funcControlledConstDisabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: prefControlledConstDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: funcControlledMethodEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: funcControlledAttributeDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: funcControlledStaticAttributeEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: funcControlledStaticAttributeDisabled] - expected: FAIL - - [Enabled preference shows member controlled by that preference: funcControlledConstEnabled] - expected: FAIL - - [Disabled preference hides member controlled by that preference: prefControlledMethodDisabled] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/interfaces.https.html.ini b/tests/wpt/mozilla/meta/mozilla/interfaces.https.html.ini index e3cb7c66a14..86a44515fe5 100644 --- a/tests/wpt/mozilla/meta/mozilla/interfaces.https.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/interfaces.https.html.ini @@ -1 +1 @@ -prefs: [dom_webxr_test: false, dom_testutils_enabled: false] +prefs: [dom_webxr_test: false, dom_testutils_enabled: false, dom_testbinding_enabled: false] diff --git a/tests/wpt/mozilla/meta/mozilla/interfaces.worker.js.ini b/tests/wpt/mozilla/meta/mozilla/interfaces.worker.js.ini index 4a68e67490f..c6378002413 100644 --- a/tests/wpt/mozilla/meta/mozilla/interfaces.worker.js.ini +++ b/tests/wpt/mozilla/meta/mozilla/interfaces.worker.js.ini @@ -1 +1 @@ -prefs: [dom_testutils_enabled: false] +prefs: [dom_testutils_enabled: false, dom_testbinding_enabled: false] diff --git a/tests/wpt/mozilla/meta/mozilla/iterable.html.ini b/tests/wpt/mozilla/meta/mozilla/iterable.html.ini deleted file mode 100644 index 9f574153df0..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/iterable.html.ini +++ /dev/null @@ -1,19 +0,0 @@ -[iterable.html] - [Iterable iterators are iterators] - expected: FAIL - - [Pair iterable iterators are iterators] - expected: FAIL - - [Empty value iterator] - expected: FAIL - - [Empty pair iterator] - expected: FAIL - - [Iterators iterate over values] - expected: FAIL - - [Pair iterators iterate over key/value pairs] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/navigator.html.ini b/tests/wpt/mozilla/meta/mozilla/navigator.html.ini index 8645291bc8b..2a37c91ee27 100644 --- a/tests/wpt/mozilla/meta/mozilla/navigator.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/navigator.html.ini @@ -1,4 +1,3 @@ [navigator.html] [navigator.platform mac] expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/preferences.html.ini b/tests/wpt/mozilla/meta/mozilla/preferences.html.ini deleted file mode 100644 index 8d8c8b947e1..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/preferences.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[preferences.html] - [prefs] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/promise.html.ini b/tests/wpt/mozilla/meta/mozilla/promise.html.ini deleted file mode 100644 index 4d00217e343..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/promise.html.ini +++ /dev/null @@ -1,19 +0,0 @@ -[promise.html] - [Resolve callback gets argument] - expected: FAIL - - [Native promise from async callback can be resolved] - expected: FAIL - - [Native reject callback gets argument] - expected: FAIL - - [Native code rejects with exception] - expected: FAIL - - [Reject callback gets argument] - expected: FAIL - - [Native resolve callback gets argument] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/mozilla/variadic-interface.html.ini b/tests/wpt/mozilla/meta/mozilla/variadic-interface.html.ini deleted file mode 100644 index 3b0a6b985ad..00000000000 --- a/tests/wpt/mozilla/meta/mozilla/variadic-interface.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[variadic-interface.html] - [Default values and variadic arguments work together.] - expected: FAIL - - [Variadic interface arguments work.] - expected: FAIL - diff --git a/tests/wpt/mozilla/tests/mozilla/preferences.html b/tests/wpt/mozilla/tests/mozilla/preferences.html index a1da58a825e..8a65161198c 100644 --- a/tests/wpt/mozilla/tests/mozilla/preferences.html +++ b/tests/wpt/mozilla/tests/mozilla/preferences.html @@ -7,16 +7,16 @@ test(function() { var testBinding = new TestBinding(); assert_equals(typeof testBinding.BooleanMozPreference, "function"); - assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.falsy"), false); - assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.truthy"), true); - assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_test"), false); - assert_equals(testBinding.BooleanMozPreference("dom.testbinding.preference_value.string_empty"), false); + assert_equals(testBinding.BooleanMozPreference("dom_testbinding_preference_value_falsy"), false); + assert_equals(testBinding.BooleanMozPreference("dom_testbinding_preference_value_truthy"), true); + assert_equals(testBinding.BooleanMozPreference("dom_testbinding_preference_value_string_test"), false); + assert_equals(testBinding.BooleanMozPreference("dom_testbinding_preference_value_string_empty"), false); assert_equals(typeof testBinding.StringMozPreference, "function"); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_test"), "test"); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.string_empty"), ""); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.falsy"), ""); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.truthy"), ""); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2"); - assert_equals(testBinding.StringMozPreference("dom.testbinding.preference_value.space_string_test"), "test1 test2"); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_string_test"), "test"); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_string_empty"), ""); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_falsy"), ""); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_truthy"), ""); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_space_string_test"), "test1 test2"); + assert_equals(testBinding.StringMozPreference("dom_testbinding_preference_value_quote_string_test"), "\"test\""); }, "prefs");