зеркало из https://github.com/mozilla/gecko-dev.git
Bug 579178 followup - Fix TestRegistrationOrder to load manifests instead of directories.
This commit is contained in:
Родитель
ba5be64d1c
Коммит
0736255572
|
@ -158,7 +158,7 @@ bool TestContractFirst()
|
|||
}
|
||||
|
||||
static already_AddRefed<nsILocalFile>
|
||||
GetRegDirectory(const char* basename, const char* dirname)
|
||||
GetRegDirectory(const char* basename, const char* dirname, const char* leafname)
|
||||
{
|
||||
nsCOMPtr<nsILocalFile> f;
|
||||
nsresult rv = NS_NewNativeLocalFile(nsDependentCString(basename), PR_TRUE,
|
||||
|
@ -167,6 +167,7 @@ GetRegDirectory(const char* basename, const char* dirname)
|
|||
return NULL;
|
||||
|
||||
f->AppendNative(nsDependentCString(dirname));
|
||||
f->AppendNative(nsDependentCString(leafname));
|
||||
return f.forget();
|
||||
}
|
||||
|
||||
|
@ -184,9 +185,9 @@ int main(int argc, char** argv)
|
|||
|
||||
const char *regPath = argv[1];
|
||||
XRE_AddManifestLocation(NS_COMPONENT_LOCATION,
|
||||
nsCOMPtr<nsILocalFile>(GetRegDirectory(regPath, "core")));
|
||||
nsCOMPtr<nsILocalFile>(GetRegDirectory(regPath, "core", "component.manifest")));
|
||||
XRE_AddManifestLocation(NS_COMPONENT_LOCATION,
|
||||
nsCOMPtr<nsILocalFile>(GetRegDirectory(regPath, "extension")));
|
||||
nsCOMPtr<nsILocalFile>(GetRegDirectory(regPath, "extension", "extComponent.manifest")));
|
||||
ScopedXPCOM xpcom("RegistrationOrder");
|
||||
if (xpcom.failed())
|
||||
return 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче