Fixed Get/SetURIContentListener and SetContainerWindow test cases in nsIWebBrow.cpp. Added SetSessionHistory test case in nsiHistory.cpp (while saving existing sHistory). Not part of the build.

git-svn-id: svn://10.0.0.236/trunk@131859 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
depstein%netscape.com
2002-10-12 01:51:18 +00:00
parent 0858d54598
commit bddb4eb769
3 changed files with 15 additions and 15 deletions

View File

@@ -459,9 +459,15 @@ void CNsIWebNav::GetSHTest(PRInt16 displayMode)
void CNsIWebNav::SetSHTest(PRInt16 displayMode)
{
nsCOMPtr<nsISHistory> theSessionHistory;
rv = qaWebNav->SetSessionHistory(theSessionHistory);
nsCOMPtr<nsISHistory> theSessionHistory, tempSHObject;
// we want to save the existing session history
rv = qaWebNav->GetSessionHistory(getter_AddRefs(theSessionHistory));
// this will create the test session history object
tempSHObject = do_CreateInstance(NS_SHISTORY_CONTRACTID);
rv = qaWebNav->SetSessionHistory(tempSHObject);
RvTestResult(rv, "SetSessionHistory() test", displayMode);
if (!theSessionHistory)
QAOutput("We didn't get the session history. Test failed.", 2);
if (!tempSHObject)
QAOutput("We didn't get the session history test object. Test failed.", 2);
// we now reset the previous session history
rv = qaWebNav->SetSessionHistory(theSessionHistory);
}