Bug 541235 - mailnews xpcshell tests fail when running as packaged tests. r=Standard8
--HG-- extra : rebase_source : 55190b9b4a37caf605de9af519ba6e224ea4d1c9
This commit is contained in:
Родитель
7b1eac2ea4
Коммит
d6e7f5c780
|
@ -43,10 +43,9 @@ function run_test()
|
|||
|
||||
/*
|
||||
* Save the message to a local file. IMapMD corresponds to
|
||||
* mozilla/_test/mailtest/ImapMail in the build directory
|
||||
* (where fakeserver puts the IMAP mailbox files). If we pass
|
||||
* the test, we'll remove the file afterwards (cf. UrlListener),
|
||||
* otherwise it's kept in IMapMD.
|
||||
* <profile_dir>/mailtest/ImapMail (where fakeserver puts the IMAP mailbox
|
||||
* files). If we pass the test, we'll remove the file afterwards
|
||||
* (cf. UrlListener), otherwise it's kept in IMapMD.
|
||||
*/
|
||||
gSavedMsgFile = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties)
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
* directory under the process directory and use that as the profile
|
||||
* directory for the mailnews tests to locate files during unit tests.
|
||||
*
|
||||
* For xpcshell tests, the "profile" directory will be:
|
||||
* <objdir>/dist/bin/mailtest/ (on Windows and Linux)
|
||||
* <objdir>/dist/Thunderbird{Debug}.app/Contents/MacOS/mailtest/ (on Mac OS X)
|
||||
* For xpcshell tests, the "profile" directory will be <profile_dir>/mailtest/
|
||||
*/
|
||||
|
||||
// Make sure we execute this file exactly once
|
||||
|
@ -41,25 +39,12 @@ function initializeDirServer() {
|
|||
getFile : function(prop, persistent) {
|
||||
persistent.value = true;
|
||||
if (prop == NS_APP_USER_PROFILE_50_DIR) {
|
||||
var processDir = dirSvc.get("CurProcD", Ci.nsIFile);
|
||||
|
||||
// Process dir is normally <objdir>/dist/bin, _tests is
|
||||
// <objdir>/_tests, so go up 2 directories
|
||||
processDir = processDir.parent;
|
||||
processDir = processDir.parent;
|
||||
|
||||
// Then into the _tests directory
|
||||
processDir.append("_tests");
|
||||
|
||||
// We need to normalize on a directory we'll always know about it
|
||||
// because otherwise Linux doesn't work properly. Therefore do it
|
||||
// here before we add mailtest.
|
||||
processDir.normalize();
|
||||
var profileDir = do_get_profile();
|
||||
|
||||
// Then this is the directory we want
|
||||
processDir.append("mailtest");
|
||||
profileDir.append("mailtest");
|
||||
|
||||
return processDir;
|
||||
return profileDir;
|
||||
}
|
||||
if (prop == "resource:app") {
|
||||
// app should return the same as gre...
|
||||
|
|
Загрузка…
Ссылка в новой задаче