зеркало из https://github.com/mozilla/pjs.git
added GetTheUri() in QaUtils.cpp. Updated history listener methods.
This commit is contained in:
Родитель
840a7e70c4
Коммит
4e55e7c5f6
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче