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 <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-05-17 10:14:19 +02:00 committed by GitHub
parent 2eab9c6df1
commit a028291466
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 72 additions and 149 deletions

View file

@ -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<String> {
let (sender, receiver) = unbounded();
let msg = WorkletData::Task(id, WorkletTask::Test(TestWorkletTask::Lookup(key, sender)));