mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Modified test results for several interface tests to display to rv dialog.
a=asa for QA checkins that are not part of the default builds
This commit is contained in:
parent
05ef2e9b38
commit
e406a306ec
@ -508,9 +508,10 @@ NS_IMETHODIMP CBrowserImpl::OnStopRequest(nsIRequest *request,
|
|||||||
{
|
{
|
||||||
nsCString stringMsg;
|
nsCString stringMsg;
|
||||||
|
|
||||||
|
RvTestResult(rv, "nsIStreamListener::OnStopRequest rv input", 1);
|
||||||
RequestName(request, stringMsg, 1);
|
RequestName(request, stringMsg, 1);
|
||||||
QAOutput("##### END: nsIStreamListener::OnStopRequest() #####");
|
QAOutput("##### END: nsIStreamListener::OnStopRequest() #####");
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,36 +79,36 @@ void CNsIFile::OnStartTests(UINT nMenuID)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QAOutput("Begin nsIFile tests.", 2);
|
|
||||||
|
|
||||||
switch(nMenuID)
|
switch(nMenuID)
|
||||||
{
|
{
|
||||||
case ID_INTERFACES_NSIFILE_RUNALLTESTS :
|
case ID_INTERFACES_NSIFILE_RUNALLTESTS :
|
||||||
|
QAOutput("Begin nsIFile tests.", 2);
|
||||||
RunAllTests(theTestFile,theFileOpDir);
|
RunAllTests(theTestFile,theFileOpDir);
|
||||||
|
QAOutput("End nsIFile tests.", 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_INITWITHPATH :
|
case ID_INTERFACES_NSIFILE_INITWITHPATH :
|
||||||
InitWithPathTest(theTestFile);
|
InitWithPathTest(theTestFile, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_APPENDRELATICEPATH :
|
case ID_INTERFACES_NSIFILE_APPENDRELATICEPATH :
|
||||||
AppendRelativePathTest(theTestFile);
|
AppendRelativePathTest(theTestFile, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_EXISTS :
|
case ID_INTERFACES_NSIFILE_EXISTS :
|
||||||
FileCreateTest(theTestFile);
|
FileCreateTest(theTestFile, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_CREATE :
|
case ID_INTERFACES_NSIFILE_CREATE :
|
||||||
FileExistsTest(theTestFile);
|
FileExistsTest(theTestFile, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_COPYTO :
|
case ID_INTERFACES_NSIFILE_COPYTO :
|
||||||
FileCopyTest(theTestFile, theFileOpDir);
|
FileCopyTest(theTestFile, theFileOpDir, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIFILE_MOVETO :
|
case ID_INTERFACES_NSIFILE_MOVETO :
|
||||||
FileMoveTest(theTestFile, theFileOpDir);
|
FileMoveTest(theTestFile, theFileOpDir, 2);
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,37 +122,35 @@ void CNsIFile::OnStartTests(UINT nMenuID)
|
|||||||
|
|
||||||
void CNsIFile::RunAllTests(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir)
|
void CNsIFile::RunAllTests(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir)
|
||||||
{
|
{
|
||||||
InitWithPathTest(theTestFile);
|
InitWithPathTest(theTestFile, 1);
|
||||||
AppendRelativePathTest(theTestFile);
|
AppendRelativePathTest(theTestFile, 1);
|
||||||
FileCreateTest(theTestFile);
|
FileCreateTest(theTestFile, 1);
|
||||||
FileExistsTest(theTestFile);
|
FileExistsTest(theTestFile, 1);
|
||||||
FileCopyTest(theTestFile, theFileOpDir);
|
FileCopyTest(theTestFile, theFileOpDir, 1);
|
||||||
FileMoveTest(theTestFile, theFileOpDir);
|
FileMoveTest(theTestFile, theFileOpDir, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
// Individual nsIFile tests
|
// Individual nsIFile tests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CNsIFile::InitWithPathTest(nsILocalFile *theTestFile)
|
void CNsIFile::InitWithPathTest(nsILocalFile *theTestFile, PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\"));
|
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\"));
|
||||||
RvTestResult(rv, "InitWithNativePath() test (initializing file path)", 2);
|
RvTestResult(rv, "InitWithNativePath() test (initializing file path)", displayMode);
|
||||||
|
RvTestResultDlg(rv, "InitWithNativePath() test (initializing file path)", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIFile::AppendRelativePathTest(nsILocalFile *theTestFile)
|
void CNsIFile::AppendRelativePathTest(nsILocalFile *theTestFile, PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theTestFile->AppendRelativeNativePath(NS_LITERAL_CSTRING("myFile.txt"));
|
rv = theTestFile->AppendRelativeNativePath(NS_LITERAL_CSTRING("myFile.txt"));
|
||||||
RvTestResult(rv, "AppendRelativeNativePath() test (append file to the path)", 2);
|
RvTestResult(rv, "AppendRelativeNativePath() test (append file to the path)", displayMode);
|
||||||
|
RvTestResultDlg(rv, "AppendRelativeNativePath() test (append file to the path)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIFile::FileCreateTest(nsILocalFile *theTestFile)
|
void CNsIFile::FileCreateTest(nsILocalFile *theTestFile, PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool exists = PR_TRUE;
|
PRBool exists = PR_TRUE;
|
||||||
|
|
||||||
@ -162,15 +160,16 @@ void CNsIFile::FileCreateTest(nsILocalFile *theTestFile)
|
|||||||
rv = theTestFile->Exists(&exists);
|
rv = theTestFile->Exists(&exists);
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
QAOutput("File doesn't exist. We'll try creating it.", 2);
|
QAOutput("File doesn't exist. We'll try creating it.", displayMode);
|
||||||
rv = theTestFile->Create(nsIFile::NORMAL_FILE_TYPE, 0777);
|
rv = theTestFile->Create(nsIFile::NORMAL_FILE_TYPE, 0777);
|
||||||
RvTestResult(rv, "File Create() test ('myFile.txt')", 2);
|
RvTestResult(rv, "File Create() test ('myFile.txt')", displayMode);
|
||||||
|
RvTestResultDlg(rv, "File Create() test ('myFile.txt')");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
QAOutput("File already exists (myFile.txt). We won't create it.", 2);
|
QAOutput("File already exists (myFile.txt). We won't create it.", displayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIFile::FileExistsTest(nsILocalFile *theTestFile)
|
void CNsIFile::FileExistsTest(nsILocalFile *theTestFile, PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool exists = PR_TRUE;
|
PRBool exists = PR_TRUE;
|
||||||
|
|
||||||
@ -178,65 +177,71 @@ void CNsIFile::FileExistsTest(nsILocalFile *theTestFile)
|
|||||||
rv = theTestFile->AppendRelativeNativePath(NS_LITERAL_CSTRING("myFile.txt"));
|
rv = theTestFile->AppendRelativeNativePath(NS_LITERAL_CSTRING("myFile.txt"));
|
||||||
|
|
||||||
rv = theTestFile->Exists(&exists);
|
rv = theTestFile->Exists(&exists);
|
||||||
|
RvTestResult(rv, "File Exists() test ('myFile.txt')", displayMode);
|
||||||
|
RvTestResultDlg(rv, "File Exists() test ('myFile.txt')");
|
||||||
if (!exists)
|
if (!exists)
|
||||||
QAOutput("Exists() test Failed. File (myFile.txt) doesn't exist.", 2);
|
QAOutput("Exists() test Failed. File (myFile.txt) doesn't exist.", displayMode);
|
||||||
else
|
else
|
||||||
QAOutput("Exists() test Passed. File (myFile.txt) exists.", 2);
|
QAOutput("Exists() test Passed. File (myFile.txt) exists.", displayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIFile::FileCopyTest(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir)
|
void CNsIFile::FileCopyTest(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool exists = PR_TRUE;
|
PRBool exists = PR_TRUE;
|
||||||
|
|
||||||
QAOutput("Start File Copy test.", 2);
|
QAOutput("Start File Copy test.", displayMode);
|
||||||
rv = theFileOpDir->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\"));
|
rv = theFileOpDir->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\"));
|
||||||
|
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("The target dir wasn't found.", 2);
|
QAOutput("The target dir wasn't found.", displayMode);
|
||||||
else
|
else
|
||||||
QAOutput("The target dir was found.", 2);
|
QAOutput("The target dir was found.", displayMode);
|
||||||
|
|
||||||
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile.txt"));
|
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile.txt"));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("The path wasn't found.", 2);
|
QAOutput("The path wasn't found.", displayMode);
|
||||||
else
|
else
|
||||||
QAOutput("The path was found.", 2);
|
QAOutput("The path was found.", displayMode);
|
||||||
|
|
||||||
rv = theTestFile->CopyToNative(theFileOpDir, NS_LITERAL_CSTRING("myFile2.txt"));
|
rv = theTestFile->CopyToNative(theFileOpDir, NS_LITERAL_CSTRING("myFile2.txt"));
|
||||||
RvTestResult(rv, "rv CopyToNative() test", 2);
|
RvTestResult(rv, "rv CopyToNative() test", displayMode);
|
||||||
|
RvTestResultDlg(rv, "File CopyToNative() test ('myFile.txt')");
|
||||||
|
|
||||||
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile2.txt"));
|
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile2.txt"));
|
||||||
|
|
||||||
rv = theTestFile->Exists(&exists);
|
rv = theTestFile->Exists(&exists);
|
||||||
if (!exists)
|
if (!exists)
|
||||||
QAOutput("File didn't copy. CopyToNative() test Failed.", 2);
|
QAOutput("File didn't copy. CopyToNative() test Failed.", displayMode);
|
||||||
else
|
else
|
||||||
QAOutput("File copied. CopyToNative() test Passed.", 2);
|
QAOutput("File copied. CopyToNative() test Passed.", displayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIFile::FileMoveTest(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir)
|
void CNsIFile::FileMoveTest(nsILocalFile *theTestFile, nsILocalFile *theFileOpDir,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool exists = PR_TRUE;
|
PRBool exists = PR_TRUE;
|
||||||
|
|
||||||
QAOutput("Start File Move test.", 2);
|
QAOutput("Start File Move test.", displayMode);
|
||||||
|
|
||||||
rv = theFileOpDir->InitWithNativePath(NS_LITERAL_CSTRING("c:\\Program Files\\"));
|
rv = theFileOpDir->InitWithNativePath(NS_LITERAL_CSTRING("c:\\Program Files\\"));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("The target dir wasn't found.", 2);
|
QAOutput("The target dir wasn't found.", displayMode);
|
||||||
|
|
||||||
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile2.txt"));
|
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\temp\\myFile2.txt"));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("The path wasn't found.", 2);
|
QAOutput("The path wasn't found.", displayMode);
|
||||||
|
|
||||||
rv = theTestFile->MoveToNative(theFileOpDir, NS_LITERAL_CSTRING("myFile2.txt"));
|
rv = theTestFile->MoveToNative(theFileOpDir, NS_LITERAL_CSTRING("myFile2.txt"));
|
||||||
RvTestResult(rv, "MoveToNative() test", 2);
|
RvTestResult(rv, "MoveToNative() test", displayMode);
|
||||||
|
RvTestResultDlg(rv, "File MoveToNative() test ('myFile.txt')");
|
||||||
|
|
||||||
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\Program Files\\myFile2.txt"));
|
rv = theTestFile->InitWithNativePath(NS_LITERAL_CSTRING("c:\\Program Files\\myFile2.txt"));
|
||||||
|
|
||||||
rv = theTestFile->Exists(&exists);
|
rv = theTestFile->Exists(&exists);
|
||||||
if (!exists)
|
if (!exists)
|
||||||
QAOutput("File wasn't moved. MoveToNative() test Failed.", 2);
|
QAOutput("File wasn't moved. MoveToNative() test Failed.", displayMode);
|
||||||
else
|
else
|
||||||
QAOutput("File was moved. MoveToNative() test Passed.", 2);
|
QAOutput("File was moved. MoveToNative() test Passed.", displayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,12 +56,12 @@ public:
|
|||||||
public:
|
public:
|
||||||
void OnStartTests(UINT nMenuID);
|
void OnStartTests(UINT nMenuID);
|
||||||
void RunAllTests(nsILocalFile*, nsILocalFile *);
|
void RunAllTests(nsILocalFile*, nsILocalFile *);
|
||||||
void InitWithPathTest(nsILocalFile*);
|
void InitWithPathTest(nsILocalFile*, PRInt16);
|
||||||
void AppendRelativePathTest(nsILocalFile*);
|
void AppendRelativePathTest(nsILocalFile*, PRInt16);
|
||||||
void FileCreateTest(nsILocalFile*);
|
void FileCreateTest(nsILocalFile*, PRInt16);
|
||||||
void FileExistsTest(nsILocalFile*);
|
void FileExistsTest(nsILocalFile*, PRInt16);
|
||||||
void FileCopyTest(nsILocalFile*, nsILocalFile *);
|
void FileCopyTest(nsILocalFile*, nsILocalFile *, PRInt16);
|
||||||
void FileMoveTest(nsILocalFile*, nsILocalFile *);
|
void FileMoveTest(nsILocalFile*, nsILocalFile *, PRInt16);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -95,17 +95,17 @@ void CnsIObserServ::OnStartTests(UINT nMenuID)
|
|||||||
case ID_INTERFACES_NSIOBSERVERSERVICE_ENUMERATEOBSERVERS :
|
case ID_INTERFACES_NSIOBSERVERSERVICE_ENUMERATEOBSERVERS :
|
||||||
QAOutput("Adding observers first", 2);
|
QAOutput("Adding observers first", 2);
|
||||||
AddObserversTest(1);
|
AddObserversTest(1);
|
||||||
EnumerateObserversTest();
|
EnumerateObserversTest(1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIOBSERVERSERVICE_NOTIFYOBSERVERS :
|
case ID_INTERFACES_NSIOBSERVERSERVICE_NOTIFYOBSERVERS :
|
||||||
NotifyObserversTest();
|
NotifyObserversTest(1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_INTERFACES_NSIOBSERVERSERVICE_REMOVEOBSERVERS :
|
case ID_INTERFACES_NSIOBSERVERSERVICE_REMOVEOBSERVERS :
|
||||||
QAOutput("Adding observers first.", 2);
|
QAOutput("Adding observers first.", 2);
|
||||||
AddObserversTest(1);
|
AddObserversTest(1);
|
||||||
RemoveObserversTest();
|
RemoveObserversTest(1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
@ -116,10 +116,10 @@ void CnsIObserServ::OnStartTests(UINT nMenuID)
|
|||||||
|
|
||||||
void CnsIObserServ::RunAllTests()
|
void CnsIObserServ::RunAllTests()
|
||||||
{
|
{
|
||||||
AddObserversTest(2);
|
AddObserversTest(1);
|
||||||
EnumerateObserversTest();
|
EnumerateObserversTest(1);
|
||||||
NotifyObserversTest();
|
NotifyObserversTest(1);
|
||||||
RemoveObserversTest();
|
RemoveObserversTest(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CnsIObserServ::AddObserversTest(int displayType)
|
void CnsIObserServ::AddObserversTest(int displayType)
|
||||||
@ -127,6 +127,8 @@ void CnsIObserServ::AddObserversTest(int displayType)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
nsCOMPtr<nsIObserverService>observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
nsCOMPtr<nsIObserverService>observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
||||||
|
RvTestResult(rv, "nsIObserverService object test", displayType);
|
||||||
|
RvTestResultDlg(rv, "nsIObserverService object test", true);
|
||||||
|
|
||||||
QAOutput("\n nsIObserverService::AddObserversTest().");
|
QAOutput("\n nsIObserverService::AddObserversTest().");
|
||||||
if (!observerService)
|
if (!observerService)
|
||||||
@ -141,10 +143,11 @@ void CnsIObserServ::AddObserversTest(int displayType)
|
|||||||
ObserverTable[i].theOwnsWeak);
|
ObserverTable[i].theOwnsWeak);
|
||||||
FormatAndPrintOutput("The observer to be added = ", ObserverTable[i].theTopic, 1);
|
FormatAndPrintOutput("The observer to be added = ", ObserverTable[i].theTopic, 1);
|
||||||
RvTestResult(rv, "AddObservers() test", displayType);
|
RvTestResult(rv, "AddObservers() test", displayType);
|
||||||
|
RvTestResultDlg(rv, "AddObservers() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CnsIObserServ::RemoveObserversTest()
|
void CnsIObserServ::RemoveObserversTest(int displayType)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -161,12 +164,13 @@ void CnsIObserServ::RemoveObserversTest()
|
|||||||
{
|
{
|
||||||
rv = observerService->RemoveObserver(this, ObserverTable[i].theTopic);
|
rv = observerService->RemoveObserver(this, ObserverTable[i].theTopic);
|
||||||
FormatAndPrintOutput("The observer to be removed = ", ObserverTable[i].theTopic, 1);
|
FormatAndPrintOutput("The observer to be removed = ", ObserverTable[i].theTopic, 1);
|
||||||
RvTestResult(rv, "RemoveObservers() test", 2);
|
RvTestResult(rv, "RemoveObservers() test", displayType);
|
||||||
|
RvTestResultDlg(rv, "RemoveObservers() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CnsIObserServ::NotifyObserversTest()
|
void CnsIObserServ::NotifyObserversTest(int displayType)
|
||||||
{
|
{
|
||||||
PRInt32 i;
|
PRInt32 i;
|
||||||
nsCOMPtr<nsIObserverService>observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
nsCOMPtr<nsIObserverService>observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
||||||
@ -177,12 +181,13 @@ void CnsIObserServ::NotifyObserversTest()
|
|||||||
{
|
{
|
||||||
FormatAndPrintOutput("The notified observer = ", ObserverTable[i].theTopic, 1);
|
FormatAndPrintOutput("The notified observer = ", ObserverTable[i].theTopic, 1);
|
||||||
rv = observerService->NotifyObservers(nsnull, ObserverTable[i].theTopic, 0);
|
rv = observerService->NotifyObservers(nsnull, ObserverTable[i].theTopic, 0);
|
||||||
RvTestResult(rv, "NotifyObservers() test", 2);
|
RvTestResult(rv, "NotifyObservers() test", displayType);
|
||||||
|
RvTestResultDlg(rv, "NotifyObservers() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CnsIObserServ::EnumerateObserversTest()
|
void CnsIObserServ::EnumerateObserversTest(int displayType)
|
||||||
{
|
{
|
||||||
PRInt32 i=0;
|
PRInt32 i=0;
|
||||||
nsCOMPtr<nsIObserverService> observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
nsCOMPtr<nsIObserverService> observerService(do_GetService("@mozilla.org/observer-service;1",&rv));
|
||||||
@ -202,7 +207,8 @@ void CnsIObserServ::EnumerateObserversTest()
|
|||||||
rv = observerService->EnumerateObservers(ObserverTable[i].theTopic,
|
rv = observerService->EnumerateObservers(ObserverTable[i].theTopic,
|
||||||
getter_AddRefs(simpleEnum));
|
getter_AddRefs(simpleEnum));
|
||||||
|
|
||||||
RvTestResult(rv, "EnumerateObserversTest() test", 2);
|
RvTestResult(rv, "EnumerateObserversTest() test", displayType);
|
||||||
|
RvTestResultDlg(rv, "EnumerateObserversTest() test");
|
||||||
if (!simpleEnum)
|
if (!simpleEnum)
|
||||||
{
|
{
|
||||||
QAOutput("Didn't get SimpleEnumerator object. Tests fail.");
|
QAOutput("Didn't get SimpleEnumerator object. Tests fail.");
|
||||||
@ -219,6 +225,7 @@ void CnsIObserServ::EnumerateObserversTest()
|
|||||||
|
|
||||||
rv = observer->Observe(observer, ObserverTable[i].theTopic, 0);
|
rv = observer->Observe(observer, ObserverTable[i].theTopic, 0);
|
||||||
RvTestResult(rv, "nsIObserver() test", 1);
|
RvTestResult(rv, "nsIObserver() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIObserver() test");
|
||||||
|
|
||||||
// compare 'this' with observer object
|
// compare 'this' with observer object
|
||||||
if( this == NS_REINTERPRET_CAST(CnsIObserServ*,NS_REINTERPRET_CAST(void*, observer.get())))
|
if( this == NS_REINTERPRET_CAST(CnsIObserServ*,NS_REINTERPRET_CAST(void*, observer.get())))
|
||||||
|
@ -64,9 +64,9 @@ public:
|
|||||||
|
|
||||||
void RunAllTests();
|
void RunAllTests();
|
||||||
void AddObserversTest(int);
|
void AddObserversTest(int);
|
||||||
void RemoveObserversTest();
|
void RemoveObserversTest(int);
|
||||||
void NotifyObserversTest();
|
void NotifyObserversTest(int);
|
||||||
void EnumerateObserversTest();
|
void EnumerateObserversTest(int);
|
||||||
void OnStartTests(UINT nMenuID);
|
void OnStartTests(UINT nMenuID);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,7 +101,8 @@ void CNsIWebBrowser::WBGetContainerWindow()
|
|||||||
QAOutput("Didn't get web browser chrome object.", 2);
|
QAOutput("Didn't get web browser chrome object.", 2);
|
||||||
else {
|
else {
|
||||||
rv = qaWebBrowserChrome->ShowAsModal();
|
rv = qaWebBrowserChrome->ShowAsModal();
|
||||||
RvTestResult(rv, "nsIWebBrowserChrome::ShowAsModal() test", 2);
|
RvTestResult(rv, "nsIWebBrowserChrome::ShowAsModal() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIWebBrowserChrome::ShowAsModal() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +127,8 @@ void CNsIWebBrowser::WBGetURIContentListener()
|
|||||||
else {
|
else {
|
||||||
nsCOMPtr<nsISupports> qaSupports;
|
nsCOMPtr<nsISupports> qaSupports;
|
||||||
rv = qaURIContentListener->GetLoadCookie(getter_AddRefs(qaSupports));
|
rv = qaURIContentListener->GetLoadCookie(getter_AddRefs(qaSupports));
|
||||||
RvTestResult(rv, "nsIURIContentListener::GetLoadCookie() test", 2);
|
RvTestResult(rv, "nsIURIContentListener::GetLoadCookie() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIURIContentListener::GetLoadCookie() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +154,8 @@ void CNsIWebBrowser::WBGetDOMWindow()
|
|||||||
QAOutput("Didn't get dom window object.", 2);
|
QAOutput("Didn't get dom window object.", 2);
|
||||||
else {
|
else {
|
||||||
rv = qaDOMWindow->ScrollTo(50,50);
|
rv = qaDOMWindow->ScrollTo(50,50);
|
||||||
RvTestResult(rv, "nsIDOMWindow::ScrollTo() test", 2);
|
RvTestResult(rv, "nsIDOMWindow::ScrollTo() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIDOMWindow::ScrollTo() test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +210,7 @@ void CNsIWebBrowser::WBSSetupProperty()
|
|||||||
// nsIWebBrowserSetup methods
|
// nsIWebBrowserSetup methods
|
||||||
|
|
||||||
nsCOMPtr <nsIWebBrowserSetup> qaWBSetup(do_QueryInterface(qaWebBrowser, &rv));
|
nsCOMPtr <nsIWebBrowserSetup> qaWBSetup(do_QueryInterface(qaWebBrowser, &rv));
|
||||||
RvTestResult(rv, "nsIWebBrowserSetup object test", 2);
|
RvTestResult(rv, "nsIWebBrowserSetup object test", 1);
|
||||||
RvTestResultDlg(rv, "nsIWebBrowserSetup object test");
|
RvTestResultDlg(rv, "nsIWebBrowserSetup object test");
|
||||||
|
|
||||||
if (!qaWBSetup) {
|
if (!qaWBSetup) {
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "testembed.h"
|
#include "testembed.h"
|
||||||
#include "qautils.h"
|
#include "qautils.h"
|
||||||
#include "nsiwebnav.h"
|
#include "nsiwebnav.h"
|
||||||
|
#include "UrlDialog.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define new DEBUG_NEW
|
#define new DEBUG_NEW
|
||||||
@ -113,8 +114,7 @@ void CNsIWebNav::OnStartTests(UINT nMenuID)
|
|||||||
GoToIndexTest();
|
GoToIndexTest();
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSIWEBNAV_LOADURI :
|
case ID_INTERFACES_NSIWEBNAV_LOADURI :
|
||||||
LoadUriTest(UrlTable[0].theUri, UrlTable[1].theFlag);
|
LoadUriTest(nsnull, nsnull, 1);
|
||||||
FormatAndPrintOutput("the loadFlag = ", nsIWebNavigation::LOAD_FLAGS_MASK, 2);
|
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSIWEBNAV_RELOAD :
|
case ID_INTERFACES_NSIWEBNAV_RELOAD :
|
||||||
ReloadTest(nsIWebNavigation::LOAD_FLAGS_NONE);
|
ReloadTest(nsIWebNavigation::LOAD_FLAGS_NONE);
|
||||||
@ -269,11 +269,29 @@ void CNsIWebNav::GoToIndexTest()
|
|||||||
RvTestResult(rv, "GotoIndex() test", 2);
|
RvTestResult(rv, "GotoIndex() test", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIWebNav::LoadUriTest(char *theUrl, PRUint32 theFlag)
|
void CNsIWebNav::LoadUriTest(char *theUrl, PRUint32 theFlag,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
char theTotalString[500];
|
char theTotalString[500];
|
||||||
char theFlagName[200];
|
char theFlagName[200];
|
||||||
|
|
||||||
|
if (displayMode == 1) // load just one url from Url dialog
|
||||||
|
{
|
||||||
|
CUrlDialog myDialog;
|
||||||
|
if (myDialog.DoModal() == IDOK)
|
||||||
|
{
|
||||||
|
QAOutput("Begin Change URL test.", 1);
|
||||||
|
rv = qaWebNav->LoadURI(NS_ConvertASCIItoUCS2(myDialog.m_urlfield).get(),
|
||||||
|
myDialog.m_flagvalue, nsnull,nsnull, nsnull);
|
||||||
|
|
||||||
|
RvTestResult(rv, "rv LoadURI() test", 1);
|
||||||
|
FormatAndPrintOutput("The url = ", myDialog.m_urlfield, 2);
|
||||||
|
FormatAndPrintOutput("The flag = ", myDialog.m_flagvalue, 1);
|
||||||
|
QAOutput("End Change URL test.", 1);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(theFlag)
|
switch(theFlag)
|
||||||
{
|
{
|
||||||
case nsIWebNavigation::LOAD_FLAGS_NONE:
|
case nsIWebNavigation::LOAD_FLAGS_NONE:
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
void CanGoForwardTest();
|
void CanGoForwardTest();
|
||||||
void GoForwardTest();
|
void GoForwardTest();
|
||||||
void GoToIndexTest();
|
void GoToIndexTest();
|
||||||
void LoadUriTest(char *, PRUint32);
|
void LoadUriTest(char *, PRUint32, PRInt16 displayMode=2);
|
||||||
void ReloadTest(PRUint32);
|
void ReloadTest(PRUint32);
|
||||||
void StopUriTest(char *, PRUint32);
|
void StopUriTest(char *, PRUint32);
|
||||||
void GetDocumentTest(void);
|
void GetDocumentTest(void);
|
||||||
|
@ -293,9 +293,6 @@ void CProfile::RenameProfile()
|
|||||||
|
|
||||||
rv = oNsProfile->RenameProfile(currProfileName, T2W("New default"));
|
rv = oNsProfile->RenameProfile(currProfileName, T2W("New default"));
|
||||||
RvTestResultDlg(rv, "oNsProfile->RenameProfile");
|
RvTestResultDlg(rv, "oNsProfile->RenameProfile");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProfile::DeleteProfile()
|
void CProfile::DeleteProfile()
|
||||||
@ -317,8 +314,6 @@ void CProfile::DeleteProfile()
|
|||||||
|
|
||||||
rv = oNsProfile->DeleteProfile(currProfileName, PR_TRUE);
|
rv = oNsProfile->DeleteProfile(currProfileName, PR_TRUE);
|
||||||
RvTestResultDlg(rv, "oNsProfile->DeleteProfile");
|
RvTestResultDlg(rv, "oNsProfile->DeleteProfile");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProfile::CloneProfile()
|
void CProfile::CloneProfile()
|
||||||
@ -352,7 +347,5 @@ void CProfile::ShutDownCurrentProfile()
|
|||||||
RvTestResultDlg(rv, "Cannot get the nsIprofile object");
|
RvTestResultDlg(rv, "Cannot get the nsIprofile object");
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void CNsIDirectoryService::Init()
|
|||||||
|
|
||||||
rv = theDirService->Init();
|
rv = theDirService->Init();
|
||||||
RvTestResult(rv, "rv Init() test", 1);
|
RvTestResult(rv, "rv Init() test", 1);
|
||||||
|
RvTestResultDlg(rv, "rv Init() test", true);
|
||||||
}
|
}
|
||||||
void CNsIDirectoryService::RegisterProvider()
|
void CNsIDirectoryService::RegisterProvider()
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ void CNsIDirectoryService::RegisterProvider()
|
|||||||
}
|
}
|
||||||
rv= theDirService->RegisterProvider(provider);
|
rv= theDirService->RegisterProvider(provider);
|
||||||
RvTestResult(rv, "rv RegisterProvider() test", 1);
|
RvTestResult(rv, "rv RegisterProvider() test", 1);
|
||||||
|
RvTestResultDlg(rv, "rv RegisterProvider() test");
|
||||||
}
|
}
|
||||||
void CNsIDirectoryService::UnRegisterProvider()
|
void CNsIDirectoryService::UnRegisterProvider()
|
||||||
{
|
{
|
||||||
@ -170,6 +170,7 @@ void CNsIDirectoryService::UnRegisterProvider()
|
|||||||
rv= theDirService->RegisterProvider(provider);
|
rv= theDirService->RegisterProvider(provider);
|
||||||
rv= theDirService->UnregisterProvider(provider);
|
rv= theDirService->UnregisterProvider(provider);
|
||||||
RvTestResult(rv, "rv UnRegisterProvider() test", 1);
|
RvTestResult(rv, "rv UnRegisterProvider() test", 1);
|
||||||
|
RvTestResultDlg(rv, "rv UnRegisterProvider() test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,25 +129,27 @@ void CNsIHistory::OnStartTests(UINT nMenuID)
|
|||||||
switch(nMenuID)
|
switch(nMenuID)
|
||||||
{
|
{
|
||||||
case ID_INTERFACES_NSISHISTORY_RUNALLTESTS :
|
case ID_INTERFACES_NSISHISTORY_RUNALLTESTS :
|
||||||
|
QAOutput("Begin nsISHistory tests.", 2);
|
||||||
RunAllTests();
|
RunAllTests();
|
||||||
|
QAOutput("End nsISHistory tests.", 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_GETCOUNT :
|
case ID_INTERFACES_NSISHISTORY_GETCOUNT :
|
||||||
GetCountTest(theSessionHistory, &numEntries);
|
GetCountTest(theSessionHistory, &numEntries, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_GETINDEX :
|
case ID_INTERFACES_NSISHISTORY_GETINDEX :
|
||||||
GetIndexTest(theSessionHistory, &theIndex);
|
GetIndexTest(theSessionHistory, &theIndex, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_GETMAXLENGTH :
|
case ID_INTERFACES_NSISHISTORY_GETMAXLENGTH :
|
||||||
GetMaxLengthTest(theSessionHistory, &theMaxLength);
|
GetMaxLengthTest(theSessionHistory, &theMaxLength, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_SETMAXLENGTH :
|
case ID_INTERFACES_NSISHISTORY_SETMAXLENGTH :
|
||||||
SetMaxLengthTest(theSessionHistory, theMaxLength);
|
SetMaxLengthTest(theSessionHistory, theMaxLength, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_GETENTRYATINDEX :
|
case ID_INTERFACES_NSISHISTORY_GETENTRYATINDEX :
|
||||||
//GetEntryAtIndex(0, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
//GetEntryAtIndex(0, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
||||||
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
||||||
{
|
{
|
||||||
FormatAndPrintOutput("the index = ", theIndex, 2);
|
FormatAndPrintOutput("the index = ", theIndex, 1);
|
||||||
|
|
||||||
rv = theSessionHistory->GetEntryAtIndex(theIndex, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
rv = theSessionHistory->GetEntryAtIndex(theIndex, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
||||||
RvTestResult(rv, "GetEntryAtIndex() test", 1);
|
RvTestResult(rv, "GetEntryAtIndex() test", 1);
|
||||||
@ -157,14 +159,14 @@ void CNsIHistory::OnStartTests(UINT nMenuID)
|
|||||||
QAOutput("We didn't get the History Entry object. No more tests performed.", 1);
|
QAOutput("We didn't get the History Entry object. No more tests performed.", 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GetURIHistTest(theHistoryEntry);
|
GetURIHistTest(theHistoryEntry, 2);
|
||||||
GetTitleHistTest(theHistoryEntry);
|
GetTitleHistTest(theHistoryEntry, 2);
|
||||||
GetIsSubFrameTest(theHistoryEntry);
|
GetIsSubFrameTest(theHistoryEntry, 2);
|
||||||
} // end for loop
|
} // end for loop
|
||||||
|
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_PURGEHISTORY :
|
case ID_INTERFACES_NSISHISTORY_PURGEHISTORY :
|
||||||
PurgeHistoryTest(theSessionHistory, numEntries);
|
PurgeHistoryTest(theSessionHistory, numEntries, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_GETSHISTORYENUMERATOR :
|
case ID_INTERFACES_NSISHISTORY_GETSHISTORYENUMERATOR :
|
||||||
//GetSHistoryEnumerator(getter_AddRefs(theSimpleEnum));
|
//GetSHistoryEnumerator(getter_AddRefs(theSimpleEnum));
|
||||||
@ -177,20 +179,20 @@ void CNsIHistory::OnStartTests(UINT nMenuID)
|
|||||||
QAOutput("theSimpleEnum for GetSHistoryEnumerator() invalid. Test failed.", 1);
|
QAOutput("theSimpleEnum for GetSHistoryEnumerator() invalid. Test failed.", 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SimpleEnumTest(theSimpleEnum);
|
SimpleEnumTest(theSimpleEnum, 2);
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_RUNALLTESTS :
|
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_RUNALLTESTS :
|
||||||
RunAllHistoryEntryTests();
|
RunAllHistoryEntryTests(2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETURI :
|
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETURI :
|
||||||
GetURIHistTest(theHistoryEntry);
|
GetURIHistTest(theHistoryEntry, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETTITLE :
|
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETTITLE :
|
||||||
GetTitleHistTest(theHistoryEntry);
|
GetTitleHistTest(theHistoryEntry, 2);
|
||||||
break ;
|
break ;
|
||||||
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETISSUBFRAME :
|
case ID_INTERFACES_NSISHISTORY_NSIHISTORYENTRY_GETISSUBFRAME :
|
||||||
GetIsSubFrameTest(theHistoryEntry);
|
GetIsSubFrameTest(theHistoryEntry, 2);
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,21 +221,21 @@ void CNsIHistory::RunAllTests()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QAOutput("theSessionHistory object was created.", 2);
|
QAOutput("theSessionHistory object was created.", 1);
|
||||||
theSessionHistory->GetCount(&numEntries);
|
theSessionHistory->GetCount(&numEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
// test count attribute in nsISHistory.idl
|
// test count attribute in nsISHistory.idl
|
||||||
GetCountTest(theSessionHistory, &numEntries);
|
GetCountTest(theSessionHistory, &numEntries, 1);
|
||||||
|
|
||||||
// test index attribute in nsISHistory.idl
|
// test index attribute in nsISHistory.idl
|
||||||
GetIndexTest(theSessionHistory, &theIndex);
|
GetIndexTest(theSessionHistory, &theIndex, 1);
|
||||||
|
|
||||||
// test maxLength attribute in nsISHistory.idl
|
// test maxLength attribute in nsISHistory.idl
|
||||||
SetMaxLengthTest(theSessionHistory, theMaxLength);
|
SetMaxLengthTest(theSessionHistory, theMaxLength, 1);
|
||||||
GetMaxLengthTest(theSessionHistory, &theMaxLength);
|
GetMaxLengthTest(theSessionHistory, &theMaxLength, 1);
|
||||||
|
|
||||||
QAOutput("Start nsiHistoryEntry tests.", 2);
|
QAOutput("Start nsiHistoryEntry tests.", 1);
|
||||||
|
|
||||||
// get theHistoryEntry object
|
// get theHistoryEntry object
|
||||||
rv = theSessionHistory->GetEntryAtIndex(0, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
rv = theSessionHistory->GetEntryAtIndex(0, PR_FALSE, getter_AddRefs(theHistoryEntry));
|
||||||
@ -255,7 +257,7 @@ void CNsIHistory::RunAllTests()
|
|||||||
|
|
||||||
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
||||||
{
|
{
|
||||||
FormatAndPrintOutput("the index = ", theIndex, 2);
|
FormatAndPrintOutput("the index = ", theIndex, 1);
|
||||||
|
|
||||||
//GetEntryAtIndexTest(theSessionHistory,theHistoryEntry, theIndex);
|
//GetEntryAtIndexTest(theSessionHistory,theHistoryEntry, theIndex);
|
||||||
|
|
||||||
@ -268,13 +270,13 @@ void CNsIHistory::RunAllTests()
|
|||||||
// nsiHistoryEntry.idl tests
|
// nsiHistoryEntry.idl tests
|
||||||
|
|
||||||
// test URI attribute in nsIHistoryEntry.idl
|
// test URI attribute in nsIHistoryEntry.idl
|
||||||
GetURIHistTest(theHistoryEntry);
|
GetURIHistTest(theHistoryEntry, 1);
|
||||||
|
|
||||||
// test title attribute in nsIHistoryEntry.idl
|
// test title attribute in nsIHistoryEntry.idl
|
||||||
GetTitleHistTest(theHistoryEntry);
|
GetTitleHistTest(theHistoryEntry, 1);
|
||||||
|
|
||||||
// test isSubFrame attribute in nsIHistoryEntry.idl
|
// test isSubFrame attribute in nsIHistoryEntry.idl
|
||||||
GetIsSubFrameTest(theHistoryEntry);
|
GetIsSubFrameTest(theHistoryEntry, 1);
|
||||||
|
|
||||||
} // end for loop
|
} // end for loop
|
||||||
} // end outer else
|
} // end outer else
|
||||||
@ -292,58 +294,62 @@ void CNsIHistory::RunAllTests()
|
|||||||
if (!theSimpleEnum)
|
if (!theSimpleEnum)
|
||||||
QAOutput("theSimpleEnum for GetSHistoryEnumerator() invalid. Test failed.", 1);
|
QAOutput("theSimpleEnum for GetSHistoryEnumerator() invalid. Test failed.", 1);
|
||||||
else
|
else
|
||||||
SimpleEnumTest(theSimpleEnum);
|
SimpleEnumTest(theSimpleEnum, 1);
|
||||||
|
|
||||||
// PurgeHistory() test
|
// PurgeHistory() test
|
||||||
|
|
||||||
PurgeHistoryTest(theSessionHistory, numEntries);
|
PurgeHistoryTest(theSessionHistory, numEntries, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
// Individual nsISHistory tests
|
// Individual nsISHistory tests
|
||||||
|
|
||||||
void CNsIHistory::GetCountTest(nsISHistory *theSessionHistory, PRInt32 *numEntries)
|
void CNsIHistory::GetCountTest(nsISHistory *theSessionHistory, PRInt32 *numEntries,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theSessionHistory->GetCount(numEntries);
|
rv = theSessionHistory->GetCount(numEntries);
|
||||||
if (*numEntries < 0)
|
if (*numEntries < 0)
|
||||||
QAOutput("numEntries for GetCount() < 0. Test failed.", 1);
|
QAOutput("numEntries for GetCount() < 0. Test failed.", 1);
|
||||||
else {
|
else {
|
||||||
FormatAndPrintOutput("GetCount():number of entries = ", *numEntries, 2);
|
FormatAndPrintOutput("GetCount():number of entries = ", *numEntries, displayMode);
|
||||||
RvTestResult(rv, "GetCount() (count attribute) test", 1);
|
RvTestResult(rv, "GetCount() (count attribute) test", 1);
|
||||||
RvTestResultDlg(rv, "GetCount() (count attribute) test");
|
RvTestResultDlg(rv, "GetCount() (count attribute) test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::GetIndexTest(nsISHistory *theSessionHistory, PRInt32 *theIndex)
|
void CNsIHistory::GetIndexTest(nsISHistory *theSessionHistory, PRInt32 *theIndex,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theSessionHistory->GetIndex(theIndex);
|
rv = theSessionHistory->GetIndex(theIndex);
|
||||||
if (*theIndex <0)
|
if (*theIndex <0)
|
||||||
QAOutput("theIndex for GetIndex() < 0. Test failed.", 1);
|
QAOutput("theIndex for GetIndex() < 0. Test failed.", 1);
|
||||||
else {
|
else {
|
||||||
FormatAndPrintOutput("GetIndex():the index = ", *theIndex, 2);
|
FormatAndPrintOutput("GetIndex():the index = ", *theIndex, displayMode);
|
||||||
RvTestResult(rv, "GetIndex() (index attribute) test", 1);
|
RvTestResult(rv, "GetIndex() (index attribute) test", 1);
|
||||||
RvTestResultDlg(rv, "GetIndex() (index attribute) test");
|
RvTestResultDlg(rv, "GetIndex() (index attribute) test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::SetMaxLengthTest(nsISHistory *theSessionHistory, PRInt32 theMaxLength)
|
void CNsIHistory::SetMaxLengthTest(nsISHistory *theSessionHistory, PRInt32 theMaxLength,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theSessionHistory->SetMaxLength(theMaxLength);
|
rv = theSessionHistory->SetMaxLength(theMaxLength);
|
||||||
if (theMaxLength < 0)
|
if (theMaxLength < 0)
|
||||||
QAOutput("theMaxLength for SetMaxLength() < 0. Test failed.", 1);
|
QAOutput("theMaxLength for SetMaxLength() < 0. Test failed.", 1);
|
||||||
else {
|
else {
|
||||||
RvTestResult(rv, "SetMaxLength() (MaxLength attribute) test", 1);
|
RvTestResult(rv, "SetMaxLength() (MaxLength attribute) test", displayMode);
|
||||||
RvTestResultDlg(rv, "SetMaxLength() (MaxLength attribute) test");
|
RvTestResultDlg(rv, "SetMaxLength() (MaxLength attribute) test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::GetMaxLengthTest(nsISHistory *theSessionHistory, PRInt32 *theMaxLength)
|
void CNsIHistory::GetMaxLengthTest(nsISHistory *theSessionHistory, PRInt32 *theMaxLength,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theSessionHistory->GetMaxLength(theMaxLength);
|
rv = theSessionHistory->GetMaxLength(theMaxLength);
|
||||||
if (*theMaxLength<0)
|
if (*theMaxLength<0)
|
||||||
QAOutput("theMaxLength for GetMaxLength() < 0. Test failed.", 1);
|
QAOutput("theMaxLength for GetMaxLength() < 0. Test failed.", 1);
|
||||||
else {
|
else {
|
||||||
FormatAndPrintOutput("GetMaxLength():theMaxLength = ", *theMaxLength, 2);
|
FormatAndPrintOutput("GetMaxLength():theMaxLength = ", *theMaxLength, displayMode);
|
||||||
RvTestResult(rv, "GetMaxLength() (MaxLength attribute) test", 1);
|
RvTestResult(rv, "GetMaxLength() (MaxLength attribute) test", 1);
|
||||||
RvTestResultDlg(rv, "GetMaxLength() (MaxLength attribute) test");
|
RvTestResultDlg(rv, "GetMaxLength() (MaxLength attribute) test");
|
||||||
}
|
}
|
||||||
@ -368,7 +374,8 @@ void CNsIHistory::GetMaxLengthTest(nsISHistory *theSessionHistory, PRInt32 *theM
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
void CNsIHistory::GetURIHistTest(nsIHistoryEntry* theHistoryEntry)
|
void CNsIHistory::GetURIHistTest(nsIHistoryEntry* theHistoryEntry,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theHistoryEntry->GetURI(getter_AddRefs(theUri));
|
rv = theHistoryEntry->GetURI(getter_AddRefs(theUri));
|
||||||
RvTestResult(rv, "GetURI() (URI attribute) test", 1);
|
RvTestResult(rv, "GetURI() (URI attribute) test", 1);
|
||||||
@ -382,11 +389,12 @@ void CNsIHistory::GetURIHistTest(nsIHistoryEntry* theHistoryEntry)
|
|||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("We didn't get the uriString.", 1);
|
QAOutput("We didn't get the uriString.", 1);
|
||||||
else
|
else
|
||||||
FormatAndPrintOutput("The SH Url = ", uriString, 2);
|
FormatAndPrintOutput("The SH Url = ", uriString, displayMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::GetTitleHistTest(nsIHistoryEntry* theHistoryEntry)
|
void CNsIHistory::GetTitleHistTest(nsIHistoryEntry* theHistoryEntry,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
nsXPIDLString theTitle;
|
nsXPIDLString theTitle;
|
||||||
const char * titleCString;
|
const char * titleCString;
|
||||||
@ -400,11 +408,12 @@ void CNsIHistory::GetTitleHistTest(nsIHistoryEntry* theHistoryEntry)
|
|||||||
}
|
}
|
||||||
|
|
||||||
titleCString = NS_ConvertUCS2toUTF8(theTitle).get();
|
titleCString = NS_ConvertUCS2toUTF8(theTitle).get();
|
||||||
FormatAndPrintOutput("The title = ", (char *)titleCString, 2);
|
FormatAndPrintOutput("The title = ", (char *)titleCString, displayMode);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::GetIsSubFrameTest(nsIHistoryEntry* theHistoryEntry)
|
void CNsIHistory::GetIsSubFrameTest(nsIHistoryEntry* theHistoryEntry,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool isSubFrame;
|
PRBool isSubFrame;
|
||||||
|
|
||||||
@ -412,7 +421,7 @@ void CNsIHistory::GetIsSubFrameTest(nsIHistoryEntry* theHistoryEntry)
|
|||||||
|
|
||||||
RvTestResult(rv, "GetIsSubFrame() (isSubFrame attribute) test", 1);
|
RvTestResult(rv, "GetIsSubFrame() (isSubFrame attribute) test", 1);
|
||||||
RvTestResultDlg(rv, "GetIsSubFrame() (isSubFrame attribute) test");
|
RvTestResultDlg(rv, "GetIsSubFrame() (isSubFrame attribute) test");
|
||||||
FormatAndPrintOutput("The subFrame boolean value = ", isSubFrame, 2);
|
FormatAndPrintOutput("The subFrame boolean value = ", isSubFrame, displayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -427,7 +436,8 @@ void CNsIHistory::GetSHEnumTest(nsISHistory *theSessionHistory,
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CNsIHistory::SimpleEnumTest(nsISimpleEnumerator *theSimpleEnum)
|
void CNsIHistory::SimpleEnumTest(nsISimpleEnumerator *theSimpleEnum,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRBool bMore = PR_FALSE;
|
PRBool bMore = PR_FALSE;
|
||||||
nsCOMPtr<nsISupports> nextObj;
|
nsCOMPtr<nsISupports> nextObj;
|
||||||
@ -449,11 +459,12 @@ void CNsIHistory::SimpleEnumTest(nsISimpleEnumerator *theSimpleEnum)
|
|||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
QAOutput("uriString for GetSpec() invalid. Test failed.", 1);
|
QAOutput("uriString for GetSpec() invalid. Test failed.", 1);
|
||||||
else
|
else
|
||||||
FormatAndPrintOutput("The SimpleEnum URL = ", uriString, 2);
|
FormatAndPrintOutput("The SimpleEnum URL = ", uriString, displayMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::PurgeHistoryTest(nsISHistory* theSessionHistory, PRInt32 numEntries)
|
void CNsIHistory::PurgeHistoryTest(nsISHistory* theSessionHistory, PRInt32 numEntries,
|
||||||
|
PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
rv = theSessionHistory->PurgeHistory(numEntries);
|
rv = theSessionHistory->PurgeHistory(numEntries);
|
||||||
RvTestResult(rv, "PurgeHistory() test", 1);
|
RvTestResult(rv, "PurgeHistory() test", 1);
|
||||||
@ -461,7 +472,7 @@ void CNsIHistory::PurgeHistoryTest(nsISHistory* theSessionHistory, PRInt32 numEn
|
|||||||
FormatAndPrintOutput("PurgeHistory(): num requested entries for removal = ", numEntries, 1);
|
FormatAndPrintOutput("PurgeHistory(): num requested entries for removal = ", numEntries, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIHistory::RunAllHistoryEntryTests()
|
void CNsIHistory::RunAllHistoryEntryTests(PRInt16 displayMode)
|
||||||
{
|
{
|
||||||
PRInt32 numEntries = 5;
|
PRInt32 numEntries = 5;
|
||||||
PRInt32 theIndex;
|
PRInt32 theIndex;
|
||||||
@ -478,7 +489,7 @@ void CNsIHistory::RunAllHistoryEntryTests()
|
|||||||
|
|
||||||
if (!theSessionHistory)
|
if (!theSessionHistory)
|
||||||
{
|
{
|
||||||
QAOutput("theSessionHistory object wasn't created. No session history tests performed.", 2);
|
QAOutput("theSessionHistory object wasn't created. No session history tests performed.", displayMode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -500,7 +511,7 @@ void CNsIHistory::RunAllHistoryEntryTests()
|
|||||||
|
|
||||||
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
for (theIndex = 0; theIndex < numEntries; theIndex++)
|
||||||
{
|
{
|
||||||
FormatAndPrintOutput("the index = ", theIndex, 2);
|
FormatAndPrintOutput("the index = ", theIndex, displayMode);
|
||||||
|
|
||||||
//GetEntryAtIndexTest(theSessionHistory,theHistoryEntry, theIndex);
|
//GetEntryAtIndexTest(theSessionHistory,theHistoryEntry, theIndex);
|
||||||
|
|
||||||
@ -513,13 +524,13 @@ void CNsIHistory::RunAllHistoryEntryTests()
|
|||||||
// nsiHistoryEntry.idl tests
|
// nsiHistoryEntry.idl tests
|
||||||
|
|
||||||
// test URI attribute in nsIHistoryEntry.idl
|
// test URI attribute in nsIHistoryEntry.idl
|
||||||
GetURIHistTest(theHistoryEntry);
|
GetURIHistTest(theHistoryEntry, displayMode);
|
||||||
|
|
||||||
// test title attribute in nsIHistoryEntry.idl
|
// test title attribute in nsIHistoryEntry.idl
|
||||||
GetTitleHistTest(theHistoryEntry);
|
GetTitleHistTest(theHistoryEntry, displayMode);
|
||||||
|
|
||||||
// test isSubFrame attribute in nsIHistoryEntry.idl
|
// test isSubFrame attribute in nsIHistoryEntry.idl
|
||||||
GetIsSubFrameTest(theHistoryEntry);
|
GetIsSubFrameTest(theHistoryEntry, displayMode);
|
||||||
|
|
||||||
} // end for loop
|
} // end for loop
|
||||||
} // end outer else
|
} // end outer else
|
||||||
|
@ -70,20 +70,20 @@ public:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// individual nsISHistory tests
|
// individual nsISHistory tests
|
||||||
void GetCountTest(nsISHistory *, PRInt32 *);
|
void GetCountTest(nsISHistory *, PRInt32 *, PRInt16);
|
||||||
void GetIndexTest(nsISHistory *, PRInt32 *);
|
void GetIndexTest(nsISHistory *, PRInt32 *, PRInt16);
|
||||||
void GetMaxLengthTest(nsISHistory *, PRInt32 *);
|
void GetMaxLengthTest(nsISHistory *, PRInt32 *, PRInt16);
|
||||||
void SetMaxLengthTest(nsISHistory *, PRInt32);
|
void SetMaxLengthTest(nsISHistory *, PRInt32, PRInt16);
|
||||||
void GetEntryAtIndexTest(nsISHistory *, nsIHistoryEntry *, PRInt32 theIndex);
|
void GetEntryAtIndexTest(nsISHistory *, nsIHistoryEntry *, PRInt32 theIndex, PRInt16);
|
||||||
void GetURIHistTest(nsIHistoryEntry *);
|
void GetURIHistTest(nsIHistoryEntry *, PRInt16);
|
||||||
void GetTitleHistTest(nsIHistoryEntry *);
|
void GetTitleHistTest(nsIHistoryEntry *, PRInt16);
|
||||||
void GetIsSubFrameTest(nsIHistoryEntry *);
|
void GetIsSubFrameTest(nsIHistoryEntry *, PRInt16);
|
||||||
void GetSHEnumTest(nsISHistory*, nsISimpleEnumerator *);
|
void GetSHEnumTest(nsISHistory*, nsISimpleEnumerator *, PRInt16);
|
||||||
void SimpleEnumTest(nsISimpleEnumerator *);
|
void SimpleEnumTest(nsISimpleEnumerator *, PRInt16);
|
||||||
void PurgeHistoryTest(nsISHistory *, PRInt32);
|
void PurgeHistoryTest(nsISHistory *, PRInt32, PRInt16);
|
||||||
void RunAllTests();
|
void RunAllTests();
|
||||||
void OnStartTests(UINT nMenuID);
|
void OnStartTests(UINT nMenuID);
|
||||||
void RunAllHistoryEntryTests();
|
void RunAllHistoryEntryTests(PRInt16);
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ Element ReqTable[] = {
|
|||||||
{"http://www.intel.com/", 1, 1, 1, 0, 0, 0, 0},
|
{"http://www.intel.com/", 1, 1, 1, 0, 0, 0, 0},
|
||||||
{"http://www.aol.com/", 0, 1, 0, 0, 0, 1, 1},
|
{"http://www.aol.com/", 0, 1, 0, 0, 0, 1, 1},
|
||||||
{"https://www.yahoo.com/", 1, 1, 1, 1, 0, 1, 1},
|
{"https://www.yahoo.com/", 1, 1, 1, 1, 0, 1, 1},
|
||||||
{" data:text/plain;charset=iso-8859-7,%be%fg%be",
|
{"data:text/plain;charset=iso-8859-7,%be%fg%be",
|
||||||
1, 1, 1, 1, 0, 1, 1},
|
1, 1, 1, 1, 0, 1, 1},
|
||||||
{"file://C|/Program Files/", 1, 1, 1, 1, 0, 1, 1},
|
{"file://C|/Program Files/", 1, 1, 1, 1, 0, 1, 1},
|
||||||
{"ftp://ftp.netscape.com/", 1, 1, 1, 1, 0, 1, 1},
|
{"ftp://ftp.netscape.com/", 1, 1, 1, 1, 0, 1, 1},
|
||||||
@ -223,7 +223,7 @@ nsIChannel * CNsIRequest::GetTheChannel(int i, nsILoadGroup *theLoadGroup)
|
|||||||
nsCOMPtr<nsIChannel> theChannel;
|
nsCOMPtr<nsIChannel> theChannel;
|
||||||
|
|
||||||
theSpec = ReqTable[i].theUrl;
|
theSpec = ReqTable[i].theUrl;
|
||||||
FormatAndPrintOutput("the input uri = ", theSpec, 2);
|
FormatAndPrintOutput("the input uri = ", theSpec, 1);
|
||||||
|
|
||||||
rv = NS_NewURI(getter_AddRefs(theURI), theSpec);
|
rv = NS_NewURI(getter_AddRefs(theURI), theSpec);
|
||||||
|
|
||||||
@ -240,6 +240,7 @@ nsIChannel * CNsIRequest::GetTheChannel(int i, nsILoadGroup *theLoadGroup)
|
|||||||
else
|
else
|
||||||
QAOutput("The in/out URIs don't MATCH.", 1);
|
QAOutput("The in/out URIs don't MATCH.", 1);
|
||||||
RvTestResult(rv, "NS_NewURI", 1);
|
RvTestResult(rv, "NS_NewURI", 1);
|
||||||
|
RvTestResultDlg(rv, "NS_NewURI", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = NS_NewChannel(getter_AddRefs(theChannel), theURI, nsnull, theLoadGroup);
|
rv = NS_NewChannel(getter_AddRefs(theChannel), theURI, nsnull, theLoadGroup);
|
||||||
@ -248,8 +249,10 @@ nsIChannel * CNsIRequest::GetTheChannel(int i, nsILoadGroup *theLoadGroup)
|
|||||||
QAOutput("We didn't get the Channel. Test failed.", 1);
|
QAOutput("We didn't get the Channel. Test failed.", 1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
RvTestResult(rv, "NS_NewChannel", 1);
|
RvTestResult(rv, "NS_NewChannel", 1);
|
||||||
|
RvTestResultDlg(rv, "NS_NewURI");
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIStreamListener> listener(NS_STATIC_CAST(nsIStreamListener*, qaBrowserImpl));
|
nsCOMPtr<nsIStreamListener> listener(NS_STATIC_CAST(nsIStreamListener*, qaBrowserImpl));
|
||||||
nsCOMPtr<nsIWeakReference> thisListener(dont_AddRef(NS_GetWeakReference(listener)));
|
nsCOMPtr<nsIWeakReference> thisListener(dont_AddRef(NS_GetWeakReference(listener)));
|
||||||
@ -258,6 +261,7 @@ nsIChannel * CNsIRequest::GetTheChannel(int i, nsILoadGroup *theLoadGroup)
|
|||||||
// this calls nsIStreamListener::OnDataAvailable()
|
// this calls nsIStreamListener::OnDataAvailable()
|
||||||
rv = theChannel->AsyncOpen(listener, nsnull);
|
rv = theChannel->AsyncOpen(listener, nsnull);
|
||||||
RvTestResult(rv, "AsyncOpen()", 1);
|
RvTestResult(rv, "AsyncOpen()", 1);
|
||||||
|
RvTestResultDlg(rv, "AsyncOpen()");
|
||||||
|
|
||||||
return theChannel;
|
return theChannel;
|
||||||
}
|
}
|
||||||
@ -270,6 +274,7 @@ void CNsIRequest::IsPendingReqTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->IsPending(&reqPending);
|
rv = request->IsPending(&reqPending);
|
||||||
RvTestResult(rv, "nsIRequest::IsPending() rv test", 1);
|
RvTestResult(rv, "nsIRequest::IsPending() rv test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::IsPending() rv test()");
|
||||||
|
|
||||||
if (!reqPending)
|
if (!reqPending)
|
||||||
QAOutput("Pending request = false.", 1);
|
QAOutput("Pending request = false.", 1);
|
||||||
@ -284,8 +289,9 @@ void CNsIRequest::GetStatusReqTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->GetStatus(&theStatusError);
|
rv = request->GetStatus(&theStatusError);
|
||||||
RvTestResult(rv, "nsIRequest::GetStatus() test", 1);
|
RvTestResult(rv, "nsIRequest::GetStatus() test", 1);
|
||||||
RvTestResult(rv, "the returned status error test", 1);
|
RvTestResultDlg(rv, "nsIRequest::GetStatus() test");
|
||||||
|
RvTestResult(theStatusError, "the returned status error test", 1);
|
||||||
|
RvTestResultDlg(theStatusError, "the returned status error test");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIRequest::SuspendReqTest(nsIRequest *request)
|
void CNsIRequest::SuspendReqTest(nsIRequest *request)
|
||||||
@ -294,6 +300,7 @@ void CNsIRequest::SuspendReqTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->Suspend();
|
rv = request->Suspend();
|
||||||
RvTestResult(rv, "nsIRequest::Suspend() test", 1);
|
RvTestResult(rv, "nsIRequest::Suspend() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::Suspend() test");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIRequest::ResumeReqTest(nsIRequest *request)
|
void CNsIRequest::ResumeReqTest(nsIRequest *request)
|
||||||
@ -302,6 +309,7 @@ void CNsIRequest::ResumeReqTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->Resume();
|
rv = request->Resume();
|
||||||
RvTestResult(rv, "nsIRequest::Resume() test", 1);
|
RvTestResult(rv, "nsIRequest::Resume() test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::Resume() test");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIRequest::CancelReqTest(nsIRequest *request)
|
void CNsIRequest::CancelReqTest(nsIRequest *request)
|
||||||
@ -311,7 +319,9 @@ void CNsIRequest::CancelReqTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->Cancel(status);
|
rv = request->Cancel(status);
|
||||||
RvTestResult(rv, "nsIRequest::Cancel() rv test", 1);
|
RvTestResult(rv, "nsIRequest::Cancel() rv test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::Cancel() test");
|
||||||
RvTestResult(status, "nsIRequest::Cancel() status test", 1);
|
RvTestResult(status, "nsIRequest::Cancel() status test", 1);
|
||||||
|
RvTestResultDlg(status, "nsIRequest::Cancel() status test");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIRequest::SetLoadGroupTest(nsIRequest *request,
|
void CNsIRequest::SetLoadGroupTest(nsIRequest *request,
|
||||||
@ -322,6 +332,7 @@ void CNsIRequest::SetLoadGroupTest(nsIRequest *request,
|
|||||||
|
|
||||||
rv = request->SetLoadGroup(theLoadGroup);
|
rv = request->SetLoadGroup(theLoadGroup);
|
||||||
RvTestResult(rv, "nsIRequest::SetLoadGroup() rv test", 1);
|
RvTestResult(rv, "nsIRequest::SetLoadGroup() rv test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::SetLoadGroup() rv test");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNsIRequest::GetLoadGroupTest(nsIRequest *request)
|
void CNsIRequest::GetLoadGroupTest(nsIRequest *request)
|
||||||
@ -332,8 +343,10 @@ void CNsIRequest::GetLoadGroupTest(nsIRequest *request)
|
|||||||
|
|
||||||
rv = request->GetLoadGroup(getter_AddRefs(theLoadGroup));
|
rv = request->GetLoadGroup(getter_AddRefs(theLoadGroup));
|
||||||
RvTestResult(rv, "nsIRequest::GetLoadGroup() rv test", 1);
|
RvTestResult(rv, "nsIRequest::GetLoadGroup() rv test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest::GetLoadGroup() rv test");
|
||||||
|
|
||||||
rv = theLoadGroup->GetRequests(getter_AddRefs(theSimpEnum));
|
rv = theLoadGroup->GetRequests(getter_AddRefs(theSimpEnum));
|
||||||
RvTestResult(rv, "nsIRequest:: LoadGroups' GetRequests() rv test", 1);
|
RvTestResult(rv, "nsIRequest:: LoadGroups' GetRequests() rv test", 1);
|
||||||
|
RvTestResultDlg(rv, "nsIRequest:: LoadGroups' GetRequests() rv test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user