зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1167412 - Always register testing JS modules. r=ted
This commit is contained in:
Родитель
02fa145844
Коммит
dc037f3026
|
@ -293,23 +293,7 @@ function readConfig(filename) {
|
|||
return JSON.parse(str);
|
||||
}
|
||||
|
||||
function registerTests() {
|
||||
var testsURI = Components.classes["@mozilla.org/file/directory_service;1"].
|
||||
getService(Components.interfaces.nsIProperties).
|
||||
get("ProfD", Components.interfaces.nsILocalFile);
|
||||
testsURI.append("tests.manifest");
|
||||
var ioSvc = Components.classes["@mozilla.org/network/io-service;1"].
|
||||
getService(Components.interfaces.nsIIOService);
|
||||
var manifestFile = ioSvc.newFileURI(testsURI).
|
||||
QueryInterface(Components.interfaces.nsIFileURL).file;
|
||||
|
||||
Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar).
|
||||
autoRegister(manifestFile);
|
||||
}
|
||||
|
||||
function getTestList(params, callback) {
|
||||
registerTests();
|
||||
|
||||
var baseurl = 'chrome://mochitests/content';
|
||||
if (window.parseQueryString) {
|
||||
params = parseQueryString(location.search.substring(1), true);
|
||||
|
|
|
@ -116,6 +116,20 @@ SpecialPowersObserver.prototype = new SpecialPowersObserverAPI();
|
|||
var obs = Services.obs;
|
||||
obs.addObserver(this, "xpcom-shutdown", false);
|
||||
obs.addObserver(this, "chrome-document-global-created", false);
|
||||
|
||||
// Register special testing modules.
|
||||
var testsURI = Cc["@mozilla.org/file/directory_service;1"].
|
||||
getService(Ci.nsIProperties).
|
||||
get("ProfD", Ci.nsILocalFile);
|
||||
testsURI.append("tests.manifest");
|
||||
var ioSvc = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var manifestFile = ioSvc.newFileURI(testsURI).
|
||||
QueryInterface(Ci.nsIFileURL).file;
|
||||
|
||||
Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
|
||||
autoRegister(manifestFile);
|
||||
|
||||
obs.addObserver(this, "http-on-modify-request", false);
|
||||
|
||||
if (messageManager) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче