added some code to the listeners

git-svn-id: svn://10.0.0.236/trunk@112744 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
depstein%netscape.com
2002-01-24 22:18:53 +00:00
parent 753b76b639
commit 3ecfa8deb8
3 changed files with 30 additions and 13 deletions

View File

@@ -144,7 +144,7 @@ NS_IMETHODIMP CBrowserImpl::OnHistoryPurge(PRInt32 theNumEntries, PRBool *notify
*notify = PR_TRUE;
FormatAndPrintOutput("OnHistoryPurge() notification = ", *notify, 1);
FormatAndPrintOutput("OnHistoryGotoIndex() theNumEntries = ", theNumEntries, 2);
FormatAndPrintOutput("OnHistoryPurge() theNumEntries = ", theNumEntries, 2);
return NS_OK;
}

View File

@@ -84,10 +84,13 @@ NS_IMETHODIMP CBrowserImpl::OnProgressChange(nsIWebProgress *progress, nsIReques
if (nProgressMax == 0)
nProgressMax = LONG_MAX;
if (curSelfProgress > maxSelfProgress)
if (curSelfProgress == maxSelfProgress)
{
QAOutput("nsIWebProgLstnr::OnProgressChange(): Self progress complete!", 1);
FormatAndPrintOutput("OnProgressChange(): curSelfProgress value = ", curSelfProgress, 1);
FormatAndPrintOutput("OnProgressChange(): maxSelfProgress value = ", maxSelfProgress, 1);
// web progress DOMWindow test
WebProgDOMWindowTest(progress, "OnProgressChange()", 1);
}
@@ -95,7 +98,11 @@ NS_IMETHODIMP CBrowserImpl::OnProgressChange(nsIWebProgress *progress, nsIReques
if (nProgress > nProgressMax)
{
nProgress = nProgressMax; // Progress complete
QAOutput("nsIWebProgLstnr::OnProgressChange(): Progress Update complete!", 1);
FormatAndPrintOutput("OnProgressChange(): curTotalProgress value = ", nProgress, 1);
FormatAndPrintOutput("OnProgressChange(): maxTotalProgress value = ", nProgressMax, 1);
}
m_pBrowserFrameGlue->UpdateProgress(nProgress, nProgressMax);
@@ -252,9 +259,9 @@ NS_IMETHODIMP CBrowserImpl::OnLocationChange(nsIWebProgress* aWebProgress,
else
QAOutput("Good result for GetSpec().");
FormatAndPrintOutput("The location url = ", uriSpec, 1);
FormatAndPrintOutput("OnLocationChange(): The location url = ", uriSpec, 1);
// RequestName(aRequest, stringMsg);
// RequestName(aRequest, stringMsg); // because of crash bug bugzilla 86521
PRBool isSubFrameLoad = PR_FALSE; // Is this a subframe load
if (aWebProgress) {
@@ -290,10 +297,10 @@ CBrowserImpl::OnStatusChange(nsIWebProgress* aWebProgress,
RequestName(aRequest, stringMsg);
// status result test
FormatAndPrintOutput("OnStatusChange(): Status = ", aStatus, 1);
// status result test (id number)
FormatAndPrintOutput("OnStatusChange(): Status id = ", aStatus, 1);
// web progress DOMWindow test
// web progress DOMWindow test (typically the host name)
WebProgDOMWindowTest(aWebProgress, "OnStatusChange(): web prog DOM window test", 1);
m_pBrowserFrameGlue->UpdateStatusBarText(aMessage);
@@ -315,6 +322,13 @@ CBrowserImpl::OnSecurityChange(nsIWebProgress *aWebProgress,
RequestName(aRequest, stringMsg);
if (state & STATE_IS_SECURE)
QAOutput("OnSecurityChange():STATE_IS_SECURE. All docs & subdocs are https.");
else if (state & STATE_IS_BROKEN)
QAOutput("OnSecurityChange():STATE_IS_BROKEN. Mixed: some docs are https.");
else if (state & STATE_IS_INSECURE)
QAOutput("OnSecurityChange():STATE_IS_INSECURE. Nothing is https.");
// web progress DOMWindow test
WebProgDOMWindowTest(aWebProgress, "OnSecurityChange()", 1);

View File

@@ -87,7 +87,7 @@ void CNsIHistory::OnStartTests(UINT nMenuID)
// option selected from menu.
PRInt32 numEntries = 5;
PRInt32 theIndex;
PRInt32 theMaxLength = 1;
PRInt32 theMaxLength = 100;
CString shString;
@@ -110,8 +110,10 @@ void CNsIHistory::OnStartTests(UINT nMenuID)
QAOutput("theSessionHistory object wasn't created. No session history tests performed.", 2);
return;
}
else
else {
QAOutput("theSessionHistory object was created.", 2);
theSessionHistory->GetCount(&numEntries);
}
theSessionHistory->GetEntryAtIndex(0, PR_FALSE, getter_AddRefs(theHistoryEntry));
if (!theHistoryEntry)
@@ -169,7 +171,7 @@ void CNsIHistory::RunAllTests()
PRInt32 numEntries = 5;
PRInt32 theIndex;
PRInt32 theMaxLength = 1;
PRInt32 theMaxLength = 100;
CString shString;
@@ -190,9 +192,10 @@ void CNsIHistory::RunAllTests()
QAOutput("theSessionHistory object wasn't created. No session history tests performed.", 2);
return;
}
else
else {
QAOutput("theSessionHistory object was created.", 2);
theSessionHistory->GetCount(&numEntries);
}
// test count attribute in nsISHistory.idl
GetCountTest(theSessionHistory, &numEntries);
@@ -414,7 +417,7 @@ void CNsIHistory::RunAllHistoryEntryTests()
{
PRInt32 numEntries = 5;
PRInt32 theIndex;
PRInt32 theMaxLength = 1;
PRInt32 theMaxLength = 100;
CString shString;