bug 903456: Enforce failure if search service is initialized from a child process, r=gavin

This commit is contained in:
chrishood@eagles.ewu.edu 2014-12-28 21:13:47 +01:00
parent 09ecef2bd2
commit 09c7e83c53
4 changed files with 23 additions and 3 deletions

View File

@ -1,6 +1,6 @@
component {7319788a-fe93-4db3-9f39-818cf08f4256} nsSearchService.js
contract @mozilla.org/browser/search-service;1 {7319788a-fe93-4db3-9f39-818cf08f4256}
component {7319788a-fe93-4db3-9f39-818cf08f4256} nsSearchService.js process=main
contract @mozilla.org/browser/search-service;1 {7319788a-fe93-4db3-9f39-818cf08f4256} process=main
# 21600 == 6 hours
category update-timer nsSearchService @mozilla.org/browser/search-service;1,getService,search-engine-update-timer,browser.search.update.interval,21600
component {aa892eb4-ffbf-477d-9f9a-06c995ae9f27} nsSearchSuggestions.js
contract @mozilla.org/autocomplete/search;1?name=search-autocomplete {aa892eb4-ffbf-477d-9f9a-06c995ae9f27}
contract @mozilla.org/autocomplete/search;1?name=search-autocomplete {aa892eb4-ffbf-477d-9f9a-06c995ae9f27}

View File

@ -0,0 +1,15 @@
const Ci = Components.interfaces;
const Cc = Components.classes;
Components.utils.import("resource:///modules/Services.jsm");
function run_test()
{
let isChild = Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
if (isChild) {
do_check_false("@mozilla.org/browser/search-service;1" in Cc);
} else {
do_check_true("@mozilla.org/browser/search-service;1" in Cc);
}
}

View File

@ -0,0 +1,3 @@
function run_test() {
run_test_in_child("test_bug930456.js");
}

View File

@ -27,6 +27,8 @@ fail-if = os == "android"
# Bug 676998: test fails consistently on Android
fail-if = os == "android"
[test_bug725015.js]
[test_bug930456.js]
[test_bug930456_child.js]
[test_compmgr_warnings.js]
# Bug 676998: test fails consistently on Android
fail-if = os == "android"