Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Attributes
CNsIWebBrowFind Class Reference

#include <nsIWebBrowFind.h>

Collaboration diagram for CNsIWebBrowFind:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CNsIWebBrowFind (nsIWebBrowser *mWebBrowser, CBrowserImpl *mpBrowserImpl)
virtual ~CNsIWebBrowFind ()
nsIWebBrowserFindGetWebBrowFindObject ()
void SetSearchStringTest (PRInt16)
void GetSearchStringTest (PRInt16)
void FindNextTest (PRBool, PRInt16)
void SetFindBackwardsTest (PRBool, PRInt16)
void GetFindBackwardsTest (PRBool, PRInt16)
void SetWrapFindTest (PRBool, PRInt16)
void GetWrapFindTest (PRBool, PRInt16)
void SetEntireWordTest (PRBool, PRInt16)
void GetEntireWordTest (PRBool, PRInt16)
void SetMatchCase (PRBool, PRInt16)
void GetMatchCase (PRBool, PRInt16)
void SetSearchFrames (PRBool, PRInt16)
void GetSearchFrames (PRBool, PRInt16)
void OnStartTests (UINT nMenuID)
void RunAllTests ()

Public Attributes

nsCOMPtr< nsIWebBrowserqaWebBrowser
CBrowserImplqaBrowserImpl

Private Attributes

CQaFindDlg myDialog

Detailed Description

Definition at line 63 of file nsIWebBrowFind.h.


Constructor & Destructor Documentation

CNsIWebBrowFind::CNsIWebBrowFind ( nsIWebBrowser mWebBrowser,
CBrowserImpl mpBrowserImpl 
)

Definition at line 62 of file nsIWebBrowFind.cpp.

{
       qaWebBrowser = mWebBrowser;
       qaBrowserImpl = mpBrowserImpl;
}

Definition at line 69 of file nsIWebBrowFind.cpp.

{

}

Member Function Documentation

void CNsIWebBrowFind::FindNextTest ( PRBool  didFind,
PRInt16  displayMode 
)

Definition at line 120 of file nsIWebBrowFind.cpp.

{
       // FindNext()

       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();

       rv = qaWBFind->FindNext(&didFind);
       RvTestResult(rv, "nsIWebBrowserFind::FindNext() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::FindNext() test");
       FormatAndPrintOutput("returned didFind = ", didFind, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::GetEntireWordTest ( PRBool  didEntireWord,
PRInt16  displayMode 
)

Definition at line 190 of file nsIWebBrowFind.cpp.

{
       // GetEntireWord()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->GetEntireWord(&didEntireWord);
       RvTestResult(rv, "nsIWebBrowserFind::GetEntireWord() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetEntireWord() test");
       FormatAndPrintOutput("returned didEntireWord = ", didEntireWord, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::GetFindBackwardsTest ( PRBool  didFindBackwards,
PRInt16  displayMode 
)

Definition at line 144 of file nsIWebBrowFind.cpp.

{
       // GetFindBackwards()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->GetFindBackwards(&didFindBackwards);
       RvTestResult(rv, "nsIWebBrowserFind::GetFindBackwards() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetFindBackwards() test");
       FormatAndPrintOutput("returned didFindBackwards = ", didFindBackwards, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::GetMatchCase ( PRBool  didMatchCase,
PRInt16  displayMode 
)

Definition at line 213 of file nsIWebBrowFind.cpp.

{
       // GetMatchCase()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->GetMatchCase(&didMatchCase);
       RvTestResult(rv, "nsIWebBrowserFind::GetMatchCase() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetMatchCase() test");
       FormatAndPrintOutput("returned didMatchCase = ", didMatchCase, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::GetSearchFrames ( PRBool  didSearchFrames,
PRInt16  displayMode 
)

Definition at line 236 of file nsIWebBrowFind.cpp.

{
       // GetSearchFrames()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->GetSearchFrames(&didSearchFrames);
       RvTestResult(rv, "nsIWebBrowserFind::GetSearchFrames() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetSearchFrames() test");
       FormatAndPrintOutput("returned didSearchFrames = ", didSearchFrames, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 105 of file nsIWebBrowFind.cpp.

{
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();

       // GetSearchString()
       nsXPIDLString stringBuf;
       CString csSearchStr;
       rv = qaWBFind->GetSearchString(getter_Copies(stringBuf));
       RvTestResult(rv, "nsIWebBrowserFind::GetSearchString() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetSearchString() test");
       csSearchStr = stringBuf.get();
       FormatAndPrintOutput("The searched string = ", csSearchStr, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 75 of file nsIWebBrowFind.cpp.

{
       nsCOMPtr<nsIWebBrowserFind> qaWBFind(do_GetInterface(qaWebBrowser, &rv));
       if (!qaWBFind) {
              QAOutput("Didn't get WebBrowserFind object.", 2);
              return NULL;
       }
       else {
              RvTestResult(rv, "nsIWebBrowserFind object test", 1);
              RvTestResultDlg(rv, "nsIWebBrowserFind object test");
              return(qaWBFind);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::GetWrapFindTest ( PRBool  didWrapFind,
PRInt16  displayMode 
)

Definition at line 167 of file nsIWebBrowFind.cpp.

{
       // GetWrapFind()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->GetWrapFind(&didWrapFind);
       RvTestResult(rv, "nsIWebBrowserFind::GetWrapFind() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::GetWrapFind() test");
       FormatAndPrintOutput("returned didWrapFind = ", didWrapFind, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 297 of file nsIWebBrowFind.cpp.

{
       QAOutput("Begin WebBrowserFind tests.", 1);
       GetWebBrowFindObject();
       SetSearchStringTest(1);
       GetSearchStringTest(1);
       FindNextTest(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);  // run a 2nd time to advance it
       SetFindBackwardsTest(PR_TRUE, 1);
       GetFindBackwardsTest(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);   // to find backwards
       SetWrapFindTest(PR_TRUE, 1);
       GetWrapFindTest(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);  // to wrap around
       SetEntireWordTest(PR_TRUE, 1);
       GetEntireWordTest(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);  // entire word
       SetMatchCase(PR_TRUE, 1);
       GetMatchCase(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);  // match case
       SetSearchFrames(PR_TRUE, 1);
       GetSearchFrames(PR_TRUE, 1);
       FindNextTest(PR_TRUE, 1);  // frames

       QAOutput("PR_FALSE tests", 1);
       SetFindBackwardsTest(PR_FALSE, 1);
       GetFindBackwardsTest(PR_FALSE, 1);
       FindNextTest(PR_FALSE, 1);         // shouldn't find backwards
       SetWrapFindTest(PR_FALSE, 1);
       GetWrapFindTest(PR_FALSE, 1);
       FindNextTest(PR_FALSE, 1);         // shouldn't find wrap around
       SetEntireWordTest(PR_FALSE, 1);
       GetEntireWordTest(PR_FALSE, 1);
       FindNextTest(PR_FALSE, 1);         // shouldn't find entire word
       SetMatchCase(PR_FALSE, 1);
       GetMatchCase(PR_FALSE, 1);
       FindNextTest(PR_FALSE, 1);         // shouldn't find case
       SetSearchFrames(PR_FALSE, 1);
       GetSearchFrames(PR_FALSE, 1);
       FindNextTest(PR_FALSE, 1);         // shouldn't find frame
       QAOutput("End WebBrowserFind tests.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::SetEntireWordTest ( PRBool  didEntireWord,
PRInt16  displayMode 
)

Definition at line 179 of file nsIWebBrowFind.cpp.

{
       // SetEntireWord()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->SetEntireWord(didEntireWord);
       RvTestResult(rv, "nsIWebBrowserFind::SetEntireWord() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetEntireWord() test");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::SetFindBackwardsTest ( PRBool  didFindBackwards,
PRInt16  displayMode 
)

Definition at line 133 of file nsIWebBrowFind.cpp.

{
       // SetFindBackwards()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->SetFindBackwards(didFindBackwards);
       RvTestResult(rv, "nsIWebBrowserFind::SetFindBackwards() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetFindBackwards() test", displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::SetMatchCase ( PRBool  didMatchCase,
PRInt16  displayMode 
)

Definition at line 202 of file nsIWebBrowFind.cpp.

{
       // SetMatchCase()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->SetMatchCase(didMatchCase);
       RvTestResult(rv, "nsIWebBrowserFind::SetMatchCase() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetMatchCase() test");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::SetSearchFrames ( PRBool  didSearchFrames,
PRInt16  displayMode 
)

Definition at line 225 of file nsIWebBrowFind.cpp.

{
       // SetSearchFrames()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->SetSearchFrames(didSearchFrames);
       RvTestResult(rv, "nsIWebBrowserFind::SetSearchFrames() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetSearchFrames() test");
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 89 of file nsIWebBrowFind.cpp.

{
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();

       nsString searchString;
       if (myDialog.DoModal() == IDOK) {

              // SetSearchString()
              searchString.AssignWithConversion(myDialog.m_textfield);
              rv = qaWBFind->SetSearchString(searchString.get());
       }
       RvTestResult(rv, "nsIWebBrowserFind::SetSearchString() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetSearchString test");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CNsIWebBrowFind::SetWrapFindTest ( PRBool  didWrapFind,
PRInt16  displayMode 
)

Definition at line 156 of file nsIWebBrowFind.cpp.

{
       // SetWrapFind()
       nsCOMPtr<nsIWebBrowserFind> qaWBFind;
       qaWBFind = GetWebBrowFindObject();
       
       rv = qaWBFind->SetWrapFind(didWrapFind);
       RvTestResult(rv, "nsIWebBrowserFind::SetWrapFind() test", displayMode);
       RvTestResultDlg(rv, "nsIWebBrowserFind::SetWrapFind() test");
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 105 of file nsIWebBrowFind.h.

Definition at line 73 of file nsIWebBrowFind.h.

Definition at line 72 of file nsIWebBrowFind.h.


The documentation for this class was generated from the following files: