Bug 1888590 - Mark some subtests on trusted-types-event-handlers.html as failing...
[gecko.git] / toolkit / modules / ProcessType.sys.mjs
blob4e1ef25552c7e025c4cd0a03bf9d65c3e6848f99
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/. */
5 export const ProcessType = Object.freeze({
6   /**
7    * Converts a key string to a fluent ID defined in processTypes.ftl.
8    */
9   kProcessTypeMap: {
10     // Keys defined in xpcom/build/GeckoProcessTypes.h
11     default: "process-type-default",
12     gpu: "process-type-gpu",
13     tab: "process-type-tab",
14     rdd: "process-type-rdd",
15     socket: "process-type-socket",
16     utility: "process-type-utility",
17     forkServer: "process-type-forkserver",
19     // Utility with actor names
20     utility_audioDecoder_Generic:
21       "process-type-utility-actor-audio-decoder-generic",
22     utility_audioDecoder_AppleMedia:
23       "process-type-utility-actor-audio-decoder-applemedia",
24     utility_audioDecoder_WMF: "process-type-utility-actor-audio-decoder-wmf",
25     utility_mfMediaEngineCDM: "process-type-utility-actor-mf-media-engine",
26     utility_jSOracle: "process-type-utility-actor-js-oracle",
27     utility_windowsUtils: "process-type-utility-actor-windows-utils",
28     utility_windowsFileDialog: "process-type-utility-actor-windows-file-dialog",
30     // Keys defined in dom/ipc/RemoteType.h
31     extension: "process-type-extension",
32     file: "process-type-file",
33     prealloc: "process-type-prealloc",
34     privilegedabout: "process-type-privilegedabout",
35     privilegedmozilla: "process-type-privilegedmozilla",
36     web: "process-type-web",
37     webIsolated: "process-type-webisolated",
38     webServiceWorker: "process-type-webserviceworker",
39   },
41   kFallback: "process-type-unknown",
43   fluentNameFromProcessTypeString(type) {
44     return this.kProcessTypeMap[type] || this.kFallback;
45   },
46 });