Files
servo/components/script_bindings/webidls/ServoTestUtils.webidl
Martin Robinson e7ee1171d8 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>
2026-02-20 17:32:34 +00:00

29 lines
803 B
Plaintext

/* 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 interface is entirely internal to Servo, and should not be accessible to
// web pages.
[Exposed=(Window,Worker), Pref="dom_servo_helpers_enabled"]
namespace ServoTestUtils {
[Exposed=Window, Pref="layout_animations_test_enabled"]
undefined advanceClock(long millis);
undefined crashHard();
[Exposed=Window]
LayoutResult forceLayout();
undefined js_backtrace();
undefined panic();
};
[Exposed=Window, Pref="dom_servo_helpers_enabled"]
interface LayoutResult {
readonly attribute /* FrozenArray<DOMString> */ any phases;
};