diff --git a/mozilla/embedding/qa/testembed/nsIWebBrow.cpp b/mozilla/embedding/qa/testembed/nsIWebBrow.cpp index 5c9fe25dcfe..6a44ff5fa81 100644 --- a/mozilla/embedding/qa/testembed/nsIWebBrow.cpp +++ b/mozilla/embedding/qa/testembed/nsIWebBrow.cpp @@ -110,11 +110,7 @@ void CNsIWebBrowser::WBSetContainerWindow(PRInt16 displayMode) { // SetContainerWindow - rv = qaWebBrowser->SetContainerWindow(qaWebBrowserChrome); - if (!qaWebBrowserChrome) { - QAOutput("Didn't get web browser chrome object.", displayMode); - return; - } + rv = qaWebBrowser->SetContainerWindow(NS_STATIC_CAST(nsIWebBrowserChrome*, qaBrowserImpl)); RvTestResult(rv, "nsIWebBrowser::SetContainerWindow() test", displayMode); RvTestResultDlg(rv, "nsIWebBrowser::SetContainerWindow() test"); } @@ -140,11 +136,9 @@ void CNsIWebBrowser::WBSetURIContentListener(PRInt16 displayMode) { // SetParentURIContentListener - rv = qaWebBrowser->SetParentURIContentListener(qaURIContentListener); + rv = qaWebBrowser->SetParentURIContentListener(NS_STATIC_CAST(nsIURIContentListener*, qaBrowserImpl)); RvTestResult(rv, "nsIWebBrowser::SetParentURIContentListener() test", displayMode); RvTestResultDlg(rv, "nsIWebBrowser::SetParentURIContentListener() test"); - if (!qaURIContentListener) - QAOutput("Didn't get uri content listener object.", displayMode); } void CNsIWebBrowser::WBGetDOMWindow(PRInt16 displayMode) @@ -201,10 +195,10 @@ void CNsIWebBrowser::RunAllTests() { WBAddListener(1); WBRemoveListener(1); - WBGetContainerWindow(1); WBSetContainerWindow(1); - WBGetURIContentListener(1); + WBGetContainerWindow(1); WBSetURIContentListener(1); + WBGetURIContentListener(1); WBGetDOMWindow(1); WBSSetupProperty(1); } diff --git a/mozilla/embedding/qa/testembed/nsIWebNav.cpp b/mozilla/embedding/qa/testembed/nsIWebNav.cpp index 3f069da5e4b..477bc9f2ec0 100644 --- a/mozilla/embedding/qa/testembed/nsIWebNav.cpp +++ b/mozilla/embedding/qa/testembed/nsIWebNav.cpp @@ -459,9 +459,15 @@ void CNsIWebNav::GetSHTest(PRInt16 displayMode) void CNsIWebNav::SetSHTest(PRInt16 displayMode) { - nsCOMPtr theSessionHistory; - rv = qaWebNav->SetSessionHistory(theSessionHistory); + nsCOMPtr 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); } \ No newline at end of file diff --git a/mozilla/embedding/qa/testembed/nsiHistory.cpp b/mozilla/embedding/qa/testembed/nsiHistory.cpp index 54fa9bfc905..12a81547761 100644 --- a/mozilla/embedding/qa/testembed/nsiHistory.cpp +++ b/mozilla/embedding/qa/testembed/nsiHistory.cpp @@ -103,7 +103,7 @@ void CNsIHistory::OnStartTests(UINT nMenuID) // get Session History through web nav iface if (qaWebNav) { - rv = qaWebNav->GetSessionHistory( getter_AddRefs(theSessionHistory)); + rv = qaWebNav->GetSessionHistory(getter_AddRefs(theSessionHistory)); RvTestResult(rv, "GetSessionHistory() object", 1); RvTestResultDlg(rv, "GetSessionHistory() object", true); }