mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
26 lines
861 B
JavaScript
26 lines
861 B
JavaScript
const Ci = Components.interfaces;
|
|
const Cc = Components.classes;
|
|
|
|
Components.utils.import("resource:///modules/Services.jsm");
|
|
|
|
function run_test()
|
|
{
|
|
Components.manager.autoRegister(do_get_file("data/process_directive.manifest"));
|
|
|
|
let isChild = Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
|
|
|
|
if (isChild) {
|
|
do_check_false("@mozilla.org/xpcom/tests/MainProcessDirectiveTest;1" in Cc);
|
|
} else {
|
|
let svc = Cc["@mozilla.org/xpcom/tests/MainProcessDirectiveTest;1"].createInstance(Ci.nsISupportsString);
|
|
do_check_eq(svc.data, "main process");
|
|
}
|
|
|
|
if (!isChild) {
|
|
do_check_false("@mozilla.org/xpcom/tests/ChildProcessDirectiveTest;1" in Cc);
|
|
} else {
|
|
let svc = Cc["@mozilla.org/xpcom/tests/ChildProcessDirectiveTest;1"].createInstance(Ci.nsISupportsString);
|
|
do_check_eq(svc.data, "child process");
|
|
}
|
|
}
|