Bug 1885602 - Part 5: Implement navigating to the SUMO help topic from the menu heade...
[gecko.git] / dom / webidl / ExtensionMockAPI.webidl
blob667fa9a7721cbe9e59962098e05560a6d8ef583b
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/.
4  *
5  * You are granted a license to use, reproduce and create derivative works of
6  * this document.
7  *
8  * This IDL file is related to the WebExtensions API object only used in
9  * unit tests.
10  *
11  * More info about generating webidl API bindings for WebExtensions API at:
12  *
13  * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
14  *
15  * A short summary of the special setup used by these WebIDL files (meant to aid
16  * webidl peers reviews and sign-offs) is available in the following section:
17  *
18  * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
19  */
21 // WebIDL definition for the "mockExtensionAPI" WebExtensions API,
22 // only available in tests and locked behind an about:config preference
23 // ("extensions.webidl-api.expose_mock_interface").
24 [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
25 interface ExtensionMockAPI {
26   // Test API methods scenarios.
28   [Throws, WebExtensionStub]
29   any methodSyncWithReturn(any... args);
31   [Throws, WebExtensionStub="NoReturn"]
32   undefined methodNoReturn(any... args);
34   [Throws, WebExtensionStub="Async"]
35   any methodAsync(any arg0, optional Function cb);
37   [Throws, WebExtensionStub="AsyncAmbiguous"]
38   any methodAmbiguousArgsAsync(any... args);
40   [Throws, WebExtensionStub="ReturnsPort"]
41   ExtensionPort methodReturnsPort(DOMString testName);
43   // Test API properties.
45   [Replaceable]
46   readonly attribute any propertyAsErrorObject;
48   [Replaceable]
49   readonly attribute DOMString propertyAsString;
51   // Test API events.
53   [Replaceable, SameObject]
54   readonly attribute ExtensionEventManager onTestEvent;