Included SimpleEnumerator.h, added maxLength check for sHistory index, updated Observe() in TestEmbed.cpp to handle profile switching changes.

git-svn-id: svn://10.0.0.236/trunk@106278 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
depstein%netscape.com
2001-10-25 18:32:34 +00:00
parent 361b0285b1
commit 3e91940e85
3 changed files with 12 additions and 5 deletions

View File

@@ -92,7 +92,7 @@ void CNsIHistory::OnInterfacesNsishistory()
PRInt32 numEntries = 5;
PRInt32 theIndex;
PRInt32 theMaxLength = 100;
PRInt32 theMaxLength = 1;
CString shString;
@@ -138,6 +138,12 @@ void CNsIHistory::OnInterfacesNsishistory()
QAOutput("We have the History Entry object!", 1);
// getEntryAtIndex() tests
if (theMaxLength < numEntries)
{
QAOutput("Setting number of entries to maximum length!", 1);
numEntries = theMaxLength;
}
for (theIndex = 0; theIndex < numEntries; theIndex++)
{
FormatAndPrintOutput("the index = ", theIndex, 2);