script: Remove some proprietary Servo-only testing methods from Window (#42728)

These three methods date back from the very early history of Servo and
are no longer necessary:

1. `Window.debug`: `console.log` is a better replacement for this method
   now. A manual test that tests the very basics of JavaScript used
   this. This test is removed as well.
2. `Window.gc`: This can be replaced with `TestUtils.gc`, which is part
    of a W3C specification.
3. `Window.js_backtrace`: This method is moved to `ServoTestUtils`.

Testing: Tests are updated to reflect these changes.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson
2026-02-20 18:32:34 +01:00
committed by GitHub
parent f69ee078d2
commit e7ee1171d8
15 changed files with 41 additions and 82 deletions

View File

@@ -17,7 +17,6 @@ use js::realm::CurrentRealm;
use js::rust::{CustomAutoRooterGuard, HandleObject, HandleValue, MutableHandleValue};
use js::typedarray::{self, HeapUint8ClampedArray};
use script_bindings::cformat;
use script_bindings::codegen::GenericBindings::WindowBinding::WindowMethods;
use script_bindings::interfaces::TestBindingHelpers;
use script_bindings::record::Record;
use servo_config::prefs;
@@ -569,7 +568,7 @@ impl TestBindingMethods<crate::DomTypeHolder> for TestBinding {
&self,
_dictionary: RootedTraceableBox<TestDictionaryWithTypedArray>,
) {
self.global().as_window().Gc();
self.global().as_window().gc();
}
fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary> {
RootedTraceableBox::new(TestDictionary {