Bug 1891710: part 2) Enable <Element-outerHTML.html> WPT for Trusted Types. r=smaug
[gecko.git] / devtools / shared / specs / target-configuration.js
blob8db15ff77dfa09206747039b093e2a56da69e8c7
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
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 "use strict";
7 const {
8   generateActorSpec,
9   Arg,
10   RetVal,
11   types,
12 } = require("resource://devtools/shared/protocol.js");
14 types.addDictType("target-configuration.configuration", {
15   cacheDisabled: "nullable:boolean",
16   colorSchemeSimulation: "nullable:string",
17   customFormatters: "nullable:boolean",
18   customUserAgent: "nullable:string",
19   javascriptEnabled: "nullable:boolean",
20   overrideDPPX: "nullable:number",
21   printSimulationEnabled: "nullable:boolean",
22   rdmPaneOrientation: "nullable:json",
23   reloadOnTouchSimulationToggle: "nullable:boolean",
24   restoreFocus: "nullable:boolean",
25   serviceWorkersTestingEnabled: "nullable:boolean",
26   setTabOffline: "nullable:boolean",
27   touchEventsOverride: "nullable:string",
28 });
30 const targetConfigurationSpec = generateActorSpec({
31   typeName: "target-configuration",
33   methods: {
34     updateConfiguration: {
35       request: {
36         configuration: Arg(0, "target-configuration.configuration"),
37       },
38       response: {
39         configuration: RetVal("target-configuration.configuration"),
40       },
41     },
42     isJavascriptEnabled: {
43       request: {},
44       response: {
45         javascriptEnabled: RetVal("boolean"),
46       },
47     },
48   },
49 });
51 exports.targetConfigurationSpec = targetConfigurationSpec;