1
0
Fork 0
firefox/xpcom/tests/unit/test_process_directives.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

20 lines
528 B
JavaScript

function categoryExists(category, entry) {
try {
Services.catMan.getCategoryEntry(category, entry);
return true;
} catch (e) {
return false;
}
}
function run_test() {
Components.manager.autoRegister(
do_get_file("data/process_directive.manifest")
);
let isChild =
Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
Assert.equal(categoryExists("directives-test", "main-process"), !isChild);
Assert.equal(categoryExists("directives-test", "content-process"), isChild);
}