4 Bug 895360 - [app manager] Device meta data actor
8 <title>Mozilla Bug
</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css">
17 window
.onload = function() {
18 const {require
} = ChromeUtils
.importESModule("resource://devtools/shared/loader/Loader.sys.mjs");
19 const {DevToolsClient
} = require("devtools/client/devtools-client");
20 const {DevToolsServer
} = require("devtools/server/devtools-server");
22 SimpleTest
.waitForExplicitFinish();
24 DevToolsServer
.init();
25 DevToolsServer
.registerAllActors();
27 const client
= new DevToolsClient(DevToolsServer
.connectPipe());
28 client
.connect().then(function onConnect() {
29 return client
.mainRoot
.getFront("device");
32 const appInfo
= Services
.appinfo
;
33 const utils
= window
.windowUtils
;
37 vendor
: appInfo
.vendor
,
39 version
: appInfo
.version
,
40 appbuildid
: appInfo
.appBuildID
,
41 platformbuildid
: appInfo
.platformBuildID
,
42 platformversion
: appInfo
.platformVersion
,
43 geckobuildid
: appInfo
.platformBuildID
,
44 geckoversion
: appInfo
.platformVersion
,
45 useragent
: window
.navigator
.userAgent
,
46 locale
: Services
.locale
.appLocaleAsBCP47
,
48 processor
: appInfo
.XPCOMABI
.split("-")[0],
49 compiler
: appInfo
.XPCOMABI
.split("-")[1],
50 dpi
: utils
.displayDPI
,
51 width
: window
.screen
.width
,
52 height
: window
.screen
.height
,
55 function checkValues() {
56 for (const key
in localDesc
) {
57 is(desc
[key
], localDesc
[key
], "valid field (" + key
+ ")");
60 const currProfD
= Services
.dirsvc
.get("ProfD", Ci
.nsIFile
);
61 const profileDir
= currProfD
.path
;
62 ok(profileDir
.includes(!!desc
.profile
.length
&& desc
.profile
),
63 "valid profile name");
65 client
.close().then(() => {
66 DevToolsServer
.destroy();
71 d
.getDescription().then(function(v
) {