nsString acctName = NS_LITERAL_STRING("forums.foo.com");
nsString acctName; acctName.AssignLiteral("forums.foo.com");
PRBool test_replace_substr_2()  {    const char *oldName = nsnull;    const char *newName = "user";    nsString acctName = NS_LITERAL_STRING("forums.foo.com");    nsAutoString newAcctName, oldVal, newVal;    oldVal.AssignWithConversion(oldName);    newVal.AssignWithConversion(newName);    newAcctName.Assign(acctName);    // here, oldVal is empty.  we are testing that this function    // does not hang.  see bug 235355.    newAcctName.ReplaceSubstring(oldVal, newVal);    // we expect that newAcctName will be unchanged.    if (!newAcctName.Equals(acctName))      return PR_FALSE;    return PR_TRUE;  }