michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // Test that we can link with libxul using js-ctypes michael@0: michael@0: const {Cu} = require("chrome"); michael@0: const {ctypes} = Cu.import("resource://gre/modules/ctypes.jsm", {}); michael@0: const {OS} = Cu.import("resource://gre/modules/osfile.jsm", {}); michael@0: michael@0: exports.test = function(assert) { michael@0: let path = OS.Constants.Path.libxul; michael@0: assert.pass("libxul is at " + path); michael@0: let lib = ctypes.open(path); michael@0: assert.ok(lib != null, "linked to libxul successfully"); michael@0: }; michael@0: michael@0: require('test').run(exports);