Bug 579178 followup - Fix TestRegistrationOrder to load manifests instead of directories.

This commit is contained in:
Benjamin Smedberg 2010-07-22 10:43:27 -04:00
Родитель ba5be64d1c
Коммит 0736255572
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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;