mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-17 12:47:30 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
25
xpcom/tests/unit/test_process_directives.js
Normal file
25
xpcom/tests/unit/test_process_directives.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
var Ci = Components.interfaces;
|
||||
var 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");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue