if the condition deserves a warning message (as this one does)
::: mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js
@@ +50,5 @@
> + do_check_eq(trash.numSubFolders, 3);
> + // The folder should be automatically renamed as the same name already is in Trash
> + // but the subfolder should be untouched.
> + let folderDeleted3 = trash.getChildNamed("folder(3)");
> + let subfolderDeleted = folderDeleted3.getChildNamed("subfolder");
Comment on attachment 8371072
WIP patch 3
Review of attachment 8371072: ------- ------- ------- ------- ------- ------- ------- ------- --
-------
Nice test.
::: mailnews/ local/src/ nsLocalMailFold er.cpp ERROR_COPY_ FOLDER_ ABORTED; EmptyString( ));
@@ +1723,5 @@
> return NS_MSG_
> }
> }
> +
> + nsAutoString newFolderName(
Shouldn't need the EmptyString() initializer; the constructor makes an empty string by default.
@@ +1726,5 @@ EmptyString( )); >GetName( folderName) ; SUCCESS( rv, rv);
> +
> + nsAutoString newFolderName(
> + nsAutoString folderName;
> + rv = srcFolder-
> + NS_ENSURE_
Mozilla core code is deprecating NS_ENSURE_SUCCESS, because the macro hides control flow - see https:/ /groups. google. com/d/topic/ mozilla. dev.platform/ 1clMLuuhtWQ/ discussion . Use
if (NS_WARN_ IF(NS_FAILED( rv))) {
return rv;
}
if the condition deserves a warning message (as this one does)
::: mailnews/ local/test/ unit/test_ nsIMsgLocalMail Folder. js eq(trash. numSubFolders, 3); amed("folder( 3)"); getChildNamed( "subfolder" );
@@ +50,5 @@
> + do_check_
> + // The folder should be automatically renamed as the same name already is in Trash
> + // but the subfolder should be untouched.
> + let folderDeleted3 = trash.getChildN
> + let subfolderDeleted = folderDeleted3.
do_check_ true(trash. containsChildNa med("folder( 3)"); true(trash. getChildNamed( "folder( 3)").containsCh ildNamed( "subfolder" ));
do_check_