mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36052 --HG-- extra : source : b5be5b4f4b47c256e28a29f665dc754f6407ee7f
22 lines
811 B
JavaScript
22 lines
811 B
JavaScript
"use strict";
|
|
|
|
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
|
|
|
// Test that OS.Constants is defined correctly.
|
|
add_task(async function check_definition() {
|
|
Assert.ok(OS.Constants != null);
|
|
Assert.ok(!!OS.Constants.Win || !!OS.Constants.libc);
|
|
Assert.ok(OS.Constants.Path != null);
|
|
Assert.ok(OS.Constants.Sys != null);
|
|
// check system name
|
|
Assert.equal(Services.appinfo.OS, OS.Constants.Sys.Name);
|
|
|
|
// check if using DEBUG build
|
|
if (Cc["@mozilla.org/xpcom/debug;1"].getService(Ci.nsIDebug2).isDebugBuild) {
|
|
Assert.ok(OS.Constants.Sys.DEBUG);
|
|
} else {
|
|
Assert.ok(typeof OS.Constants.Sys.DEBUG == "undefined");
|
|
}
|
|
});
|