1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/addon-sdk/source/test/test-system-runtime.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,23 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 +"use strict"; 1.8 + 1.9 +const runtime = require("sdk/system/runtime"); 1.10 + 1.11 +exports["test system runtime"] = function(assert) { 1.12 + assert.equal(typeof(runtime.inSafeMode), "boolean", 1.13 + "inSafeMode is boolean"); 1.14 + assert.equal(typeof(runtime.OS), "string", 1.15 + "runtime.OS is string"); 1.16 + assert.equal(typeof(runtime.processType), "number", 1.17 + "runtime.processType is a number"); 1.18 + assert.equal(typeof(runtime.widgetToolkit), "string", 1.19 + "runtime.widgetToolkit is string"); 1.20 + const XPCOMABI = runtime.XPCOMABI; 1.21 + assert.ok(XPCOMABI === null || typeof(XPCOMABI) === "string", 1.22 + "runtime.XPCOMABI is string or null if not supported by platform"); 1.23 +}; 1.24 + 1.25 + 1.26 +require("test").run(exports);