mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 750178 - Companion test suite. r=khuey
This commit is contained in:
parent
ce7ce2f6f1
commit
1902558826
@ -16,8 +16,33 @@
|
||||
|
||||
let worker;
|
||||
|
||||
function test_xul() {
|
||||
let lib;
|
||||
isnot(null, OS.Constants.Path.libxul, "libxulpath is defined");
|
||||
try {
|
||||
lib = ctypes.open(OS.Constants.Path.libxul);
|
||||
lib.declare("DumpJSStack", ctypes.default_abi, ctypes.void_t);
|
||||
} catch (x) {
|
||||
success = false;
|
||||
ok(false, "Could not open libxul " + x);
|
||||
}
|
||||
if (lib) {
|
||||
lib.close();
|
||||
}
|
||||
ok(true, "test_xul: opened libxul successfully");
|
||||
}
|
||||
|
||||
function test() {
|
||||
ok(true, "test_constants.xul: Starting test");
|
||||
|
||||
// Test 1: Load libxul from main thread
|
||||
Components.classes["@mozilla.org/net/osfileconstantsservice;1"].
|
||||
getService(Components.interfaces.nsIOSFileConstantsService).
|
||||
init();
|
||||
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
||||
test_xul();
|
||||
|
||||
// Test 2: Load libxul from chrome thread
|
||||
worker = new ChromeWorker("worker_constants.js");
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
ok(true, "test_constants.xul: Chrome worker created");
|
||||
|
Loading…
Reference in New Issue
Block a user