This checkin makes all the existing webclient unit tests run
successfully. We are now ready to continue with webclient 2.0 development. M build-tests.xml - formatting M build.xml - added target that skips the "main" dependency. M src_moz/ProfileManagerImpl.cpp - correct error messages M test/automated/src/classes/org/mozilla/webclient/ProfileManagerTest.java - reset the system to the original profile before deleting the new one. git-svn-id: svn://10.0.0.236/trunk@153268 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -293,10 +293,18 @@ ${myenv.MOZ_JDKHOME}/bin/java ${debug.options} org.mozilla.webclient.test.Embedd
|
||||
|
||||
</target>
|
||||
|
||||
<target name="test" depends="main" description="Run unit tests">
|
||||
<target name="test" depends="main"
|
||||
description="compile everything and Run unit tests">
|
||||
|
||||
<antcall target="run.test" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="run.test" description="Run unit tests">
|
||||
|
||||
<ant antfile="build-tests.xml" target="run.test"/>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
@@ -370,10 +370,10 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_ProfileMa
|
||||
(PRUnichar *) ::util_GetStringChars(env, oldNameJstr),
|
||||
*newName = (nsnull == newNameJstr) ? nsnull :
|
||||
(PRUnichar *) ::util_GetStringChars(env, newNameJstr);
|
||||
|
||||
|
||||
rv = profile->RenameProfile(oldName, newName);
|
||||
if (NS_FAILED(rv)) {
|
||||
::util_ThrowExceptionToJava(env, "Can't create new profile.");
|
||||
::util_ThrowExceptionToJava(env, "Can't rename new profile.");
|
||||
}
|
||||
|
||||
::util_ReleaseStringChars(env, oldNameJstr, oldName);
|
||||
@@ -402,7 +402,7 @@ JNIEXPORT void JNICALL Java_org_mozilla_webclient_impl_wrapper_1native_ProfileMa
|
||||
|
||||
rv = profile->DeleteProfile(profileName, canDeleteFiles);
|
||||
if (NS_FAILED(rv)) {
|
||||
::util_ThrowExceptionToJava(env, "Can't create new profile.");
|
||||
::util_ThrowExceptionToJava(env, "Can't delete profile.");
|
||||
}
|
||||
|
||||
::util_ReleaseStringChars(env, profileNameJstr, profileName);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: ProfileManagerTest.java,v 1.1 2003-09-28 06:29:18 edburns%acm.org Exp $
|
||||
* $Id: ProfileManagerTest.java,v 1.2 2004-02-26 04:21:24 edburns%acm.org Exp $
|
||||
*/
|
||||
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
@@ -117,6 +117,10 @@ public class ProfileManagerTest extends WebclientTestCase {
|
||||
}
|
||||
assertTrue(!hasExpectedProfile);
|
||||
|
||||
// switch back to the base profile
|
||||
profiles = profileManager.getProfileList();
|
||||
profileManager.setCurrentProfile(profiles[0]);
|
||||
|
||||
// test that we can delete the new profile
|
||||
profileManager.deleteProfile(newName, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user