added GetTheUri() in QaUtils.cpp. Updated history listener methods.

This commit is contained in:
depstein%netscape.com 2001-07-26 01:21:53 +00:00
Родитель 840a7e70c4
Коммит 4e55e7c5f6
3 изменённых файлов: 27 добавлений и 6 удалений

Просмотреть файл

@ -18,7 +18,7 @@
* Rights Reserved.
*
* Contributor(s):
* David Epstein <chak@netscape.com>
* David Epstein <depstein@netscape.com>
*
*/
@ -53,39 +53,49 @@ class CBrowserView;
// CBrowserImpl::nsISHistoryListener methods
//*****************************************************************************
NS_IMETHODIMP CBrowserImpl::OnHistoryNewEntry(nsIURI *theURI)
NS_IMETHODIMP CBrowserImpl::OnHistoryNewEntry(nsIURI *theUri)
{
CQaUtils::QAOutput("nsIHistoryListener::OnHistoryNewEntry()", 2);
CQaUtils::GetTheUri(theUri, 2);
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnHistoryGoBack(nsIURI *theURI, PRBool *notify)
NS_IMETHODIMP CBrowserImpl::OnHistoryGoBack(nsIURI *theUri, PRBool *notify)
{
CQaUtils::QAOutput("nsIHistoryListener::OnHistoryGoBack()", 2);
CQaUtils::GetTheUri(theUri, 2);
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnHistoryGoForward(nsIURI *theURI, PRBool *notify)
NS_IMETHODIMP CBrowserImpl::OnHistoryGoForward(nsIURI *theUri, PRBool *notify)
{
CQaUtils::QAOutput("nsIHistoryListener::OnHistoryGoForward()", 2);
CQaUtils::GetTheUri(theUri, 2);
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnHistoryReload(nsIURI *theURI, PRUint32 reloadFlags, PRBool *notify)
NS_IMETHODIMP CBrowserImpl::OnHistoryReload(nsIURI *theUri, PRUint32 reloadFlags, PRBool *notify)
{
CQaUtils::QAOutput("nsIHistoryListener::OnHistoryReload()", 2);
CQaUtils::GetTheUri(theUri, 2);
return NS_OK;
}
NS_IMETHODIMP CBrowserImpl::OnHistoryGotoIndex(PRInt32 theIndex, nsIURI *theURI, PRBool *notify)
NS_IMETHODIMP CBrowserImpl::OnHistoryGotoIndex(PRInt32 theIndex, nsIURI *theUri, PRBool *notify)
{
CQaUtils::QAOutput("nsIHistoryListener::OnHistoryGotoIndex()", 2);
CQaUtils::GetTheUri(theUri, 2);
return NS_OK;
}

Просмотреть файл

@ -206,3 +206,13 @@ void CQaUtils::WebProgDOMWindowTest(nsIWebProgress *progress, const char *inStri
else
RvTestResult(rv, totalStr2, displayMethod);
}
void CQaUtils::GetTheUri(nsIURI *theUri, int displayMethod)
{
nsresult rv;
char *uriSpec;
rv = theUri->GetSpec(&uriSpec);
RvTestResult(rv, "nsIURI::GetSpec() test", displayMethod);
FormatAndPrintOutput("the uri = ", uriSpec, displayMethod);
}

Просмотреть файл

@ -52,6 +52,7 @@ public:
void static RequestName(nsIRequest *, nsCString &, int displayMethod=1);
void static WebProgDOMWindowTest(nsIWebProgress *, const char *,
int displayMethod=1);
void static GetTheUri(nsIURI *, int);
nsresult rv;