Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / workers / WorkerTestUtils.h
blob6668fdf1f773d7c699276e1b2bee0dd0f147787d
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__
10 namespace mozilla {
12 class ErrorResult;
14 namespace dom {
16 /**
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 {
24 public:
25 /**
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&,
35 ErrorResult& aErr);
38 } // namespace dom
39 } // namespace mozilla
40 #endif