1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_WorkerTestUtils__
8 #define mozilla_dom_WorkerTestUtils__
17 * dom/webidl/WorkerTestUtils.webidl defines APIs to expose worker's internal
18 * status for glass-box testing. The APIs are only exposed to Workers with prefs
19 * dom.workers.testing.enabled.
21 * WorkerTestUtils is the implementation of dom/webidl/WorkerTestUtils.webidl
23 class WorkerTestUtils final
{
26 * Expose the worker's current timer nesting level.
28 * The worker's current timer nesting level means the executing timer
29 * handler's timer nesting level. When there is no executing timer handler, 0
30 * should be returned by this API. The maximum timer nesting level is 5.
32 * https://html.spec.whatwg.org/#timer-initialisation-steps
34 static uint32_t CurrentTimerNestingLevel(const GlobalObject
&,
39 } // namespace mozilla