summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js')
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
index e13f36a7c..74080dba9 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
@@ -14,7 +14,6 @@ const CATEGORY_UPDATE_TIMER = "update-timer";
// Get the HTTP server.
Components.utils.import("resource://testing-common/httpd.js");
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
var testserver;
var gOSVersion;
var gBlocklist;
@@ -50,7 +49,16 @@ var timerService = {
}
};
-MockRegistrar.register("@mozilla.org/updates/timer-manager;1", timerService);
+var TimerServiceFactory = {
+ createInstance: function (outer, iid) {
+ if (outer != null)
+ throw Components.results.NS_ERROR_NO_AGGREGATION;
+ return timerService.QueryInterface(iid);
+ }
+};
+var registrar = Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
+registrar.registerFactory(Components.ID("{61189e7a-6b1b-44b8-ac81-f180a6105085}"), "TimerService",
+ "@mozilla.org/updates/timer-manager;1", TimerServiceFactory);
function failHandler(metadata, response) {
do_throw("Should not have attempted to retrieve the blocklist when it is disabled");
@@ -67,8 +75,7 @@ function pathHandler(metadata, response) {
ABI += "-u-" + macutils.architecturesInBinary;
}
do_check_eq(metadata.queryString,
- "xpcshell@tests.mozilla.org&1&XPCShell&1&" +
- gAppInfo.appBuildID + "&" +
+ "xpcshell@tests.mozilla.org&1&XPCShell&1&2007010101&" +
"XPCShell_" + ABI + "&locale&updatechannel&" +
gOSVersion + "&1.9&distribution&distribution-version");
gBlocklist.observe(null, "quit-application", "");