script: move testbinding DOM interfaces to script/dom/test (#39585)

Move testbinding interfaces to it's own module, to avoid cluttering dom
folder.

Testing: A successful build is enough
Part of #38901

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-09-30 12:17:09 +02:00 committed by GitHub
parent 6a2a9a6e33
commit 5442302f8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 23 additions and 29 deletions

View file

@ -455,29 +455,9 @@ pub(crate) mod svggraphicselement;
pub(crate) mod svgimageelement; pub(crate) mod svgimageelement;
pub(crate) mod svgsvgelement; pub(crate) mod svgsvgelement;
#[cfg(feature = "testbinding")] #[cfg(feature = "testbinding")]
pub(crate) mod testbinding; mod testing;
#[cfg(feature = "testbinding")] #[cfg(feature = "testbinding")]
pub(crate) mod testbindingiterable; pub(crate) use self::testing::*;
#[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 text;
pub(crate) mod textcontrol; pub(crate) mod textcontrol;
pub(crate) mod textdecoder; pub(crate) mod textdecoder;

View file

@ -0,0 +1,16 @@
/* 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/. */
pub(crate) mod testbinding;
pub(crate) mod testbindingiterable;
pub(crate) mod testbindingmaplikewithinterface;
pub(crate) mod testbindingmaplikewithprimitive;
pub(crate) mod testbindingpairiterable;
pub(crate) mod testbindingproxy;
pub(crate) mod testbindingsetlikewithinterface;
pub(crate) mod testbindingsetlikewithprimitive;
pub(crate) mod testns;
pub(crate) mod testutils;
pub(crate) mod testworklet;
pub(crate) mod testworkletglobalscope;

View file

@ -8,10 +8,9 @@ use dom_struct::dom_struct;
use indexmap::IndexMap; use indexmap::IndexMap;
use js::rust::HandleObject; use js::rust::HandleObject;
use super::bindings::error::Error;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::TestBindingMaplikeWithInterfaceBinding::TestBindingMaplikeWithInterfaceMethods; use crate::dom::bindings::codegen::Bindings::TestBindingMaplikeWithInterfaceBinding::TestBindingMaplikeWithInterfaceMethods;
use crate::dom::bindings::error::Fallible; use crate::dom::bindings::error::{Error, Fallible};
use crate::dom::bindings::like::Maplike; use crate::dom::bindings::like::Maplike;
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto}; use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;

View file

@ -8,10 +8,9 @@ use dom_struct::dom_struct;
use indexmap::IndexMap; use indexmap::IndexMap;
use js::rust::HandleObject; use js::rust::HandleObject;
use super::bindings::error::Error;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::TestBindingMaplikeWithPrimitiveBinding::TestBindingMaplikeWithPrimitiveMethods; use crate::dom::bindings::codegen::Bindings::TestBindingMaplikeWithPrimitiveBinding::TestBindingMaplikeWithPrimitiveMethods;
use crate::dom::bindings::error::Fallible; use crate::dom::bindings::error::{Error, Fallible};
use crate::dom::bindings::like::Maplike; use crate::dom::bindings::like::Maplike;
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto}; use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;

View file

@ -8,10 +8,10 @@ use dom_struct::dom_struct;
use indexmap::IndexSet; use indexmap::IndexSet;
use js::rust::HandleObject; use js::rust::HandleObject;
use super::bindings::like::Setlike;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::TestBindingSetlikeWithInterfaceBinding::TestBindingSetlikeWithInterfaceMethods; use crate::dom::bindings::codegen::Bindings::TestBindingSetlikeWithInterfaceBinding::TestBindingSetlikeWithInterfaceMethods;
use crate::dom::bindings::error::Fallible; use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::like::Setlike;
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto}; use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;

View file

@ -8,10 +8,10 @@ use dom_struct::dom_struct;
use indexmap::IndexSet; use indexmap::IndexSet;
use js::rust::HandleObject; use js::rust::HandleObject;
use super::bindings::like::Setlike;
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::TestBindingSetlikeWithPrimitiveBinding::TestBindingSetlikeWithPrimitiveMethods; use crate::dom::bindings::codegen::Bindings::TestBindingSetlikeWithPrimitiveBinding::TestBindingSetlikeWithPrimitiveMethods;
use crate::dom::bindings::error::Fallible; use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::like::Setlike;
use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto}; use crate::dom::bindings::reflector::{Reflector, reflect_dom_object_with_proto};
use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString; use crate::dom::bindings::str::DOMString;

View file

@ -9,8 +9,8 @@ use js::jsapi::{GCReason, JS_GC};
use script_bindings::reflector::Reflector; use script_bindings::reflector::Reflector;
use script_bindings::script_runtime::CanGc; use script_bindings::script_runtime::CanGc;
use super::globalscope::GlobalScope;
use crate::dom::bindings::codegen::Bindings::TestUtilsBinding::TestUtilsMethods; use crate::dom::bindings::codegen::Bindings::TestUtilsBinding::TestUtilsMethods;
use crate::dom::globalscope::GlobalScope;
use crate::dom::promise::Promise; use crate::dom::promise::Promise;
use crate::test::TrustedPromise; use crate::test::TrustedPromise;