Back to index

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

#include <nsIWebProg.h>

Collaboration diagram for CnsiWebProg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CnsiWebProg (nsIWebBrowser *mWebBrowser, CBrowserImpl *mpBrowserImpl)
nsIWebProgressGetWebProgObject ()
void AddWebProgLstnr (PRUint32, PRInt16)
void RemoveWebProgLstnr (PRInt16)
void GetTheDOMWindow (PRInt16)
void GetIsLoadingDocTest (PRInt16)
void ConvertWPFlagToString (PRUint32, nsCAutoString &)
void StoreWebProgFlag (PRUint32)
void RetrieveWebProgFlag (void)
void OnStartTests (UINT nMenuID)
void RunAllTests (void)
virtual ~CnsiWebProg ()

Public Attributes

nsCOMPtr< nsIWebBrowserqaWebBrowser
CBrowserImplqaBrowserImpl
PRUint32 theStoredFlag

Private Attributes

nsCOMPtr< nsIWebProgressqaWebProgress

Detailed Description

Definition at line 62 of file nsIWebProg.h.


Constructor & Destructor Documentation

CnsiWebProg::CnsiWebProg ( nsIWebBrowser mWebBrowser,
CBrowserImpl mpBrowserImpl 
)

Definition at line 63 of file nsIWebProg.cpp.

{
       qaWebBrowser = mWebBrowser;
       qaBrowserImpl = mpBrowserImpl;
}

Definition at line 71 of file nsIWebProg.cpp.

{
}

Member Function Documentation

void CnsiWebProg::AddWebProgLstnr ( PRUint32  theFlag,
PRInt16  displayMode 
)

Definition at line 93 of file nsIWebProg.cpp.

{
       nsCAutoString flagName(NS_LITERAL_CSTRING("xxxx"));

       ConvertWPFlagToString(theFlag, flagName);

                     // addWebProgListener
       qaWebProgress = GetWebProgObject();
       nsCOMPtr<nsIWebProgressListener> listener(NS_STATIC_CAST(nsIWebProgressListener*, qaBrowserImpl));
       rv = qaWebProgress->AddProgressListener(listener, theFlag);
//     StoreWebProgFlag(theFlag);
       RvTestResult(rv, "nsIWebProgress::AddProgressListener() test", displayMode);
       RvTestResultDlg(rv, "nsIWebProgress::AddProgressListener() test", true);
       FormatAndPrintOutput("WebProgressListener flag = ", flagName, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 141 of file nsIWebProg.cpp.

{
       switch(theFlag)
       {
       case nsIWebProgress::NOTIFY_STATE_REQUEST:
              flagName.AssignLiteral("NOTIFY_STATE_REQUEST");
              break;
       case nsIWebProgress::NOTIFY_STATE_DOCUMENT:
              flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT");
              break;
       case nsIWebProgress::NOTIFY_STATE_NETWORK:
              flagName.AssignLiteral("NOTIFY_STATE_NETWORK");
              break;
       case nsIWebProgress::NOTIFY_STATE_WINDOW:
              flagName.AssignLiteral("NOTIFY_STATE_WINDOW");
              break;
       case nsIWebProgress::NOTIFY_STATE_ALL:
              flagName.AssignLiteral("NOTIFY_STATE_ALL");
              break;
       case nsIWebProgress::NOTIFY_PROGRESS:
              flagName.AssignLiteral("NOTIFY_PROGRESS");
              break;
       case nsIWebProgress::NOTIFY_STATUS:
              flagName.AssignLiteral("NOTIFY_STATUS");
              break;
       case nsIWebProgress::NOTIFY_SECURITY:
              flagName.AssignLiteral("NOTIFY_SECURITY");
              break;
       case nsIWebProgress::NOTIFY_LOCATION:
              flagName.AssignLiteral("NOTIFY_LOCATION");
              break;
       case nsIWebProgress::NOTIFY_ALL:
              flagName.AssignLiteral("NOTIFY_ALL");
              break;
       case nsIWebProgress::NOTIFY_STATE_DOCUMENT | nsIWebProgress::NOTIFY_STATE_REQUEST:
              flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT&REQUEST");
              break;
       case nsIWebProgress::NOTIFY_STATE_DOCUMENT | nsIWebProgress::NOTIFY_STATE_REQUEST
                                   | nsIWebProgress::NOTIFY_STATE_NETWORK    :
              flagName.AssignLiteral("NOTIFY_STATE_DOCUMENT&REQUEST&NETWORK");
              break;
       case nsIWebProgress::NOTIFY_STATE_NETWORK | nsIWebProgress::NOTIFY_STATE_WINDOW:
              flagName.AssignLiteral("NOTIFY_STATE_NETWORK&WINDOW");
              break;
       }
}

Here is the caller graph for this function:

Definition at line 131 of file nsIWebProg.cpp.

{
       PRBool docLoading;
       qaWebProgress = GetWebProgObject();
       rv = qaWebProgress->GetIsLoadingDocument(&docLoading);
       RvTestResult(rv, "nsIWebProgress::GetisLoadingDocument() test", displayMode);
       RvTestResultDlg(rv, "nsIWebProgress::GetisLoadingDocument() test");
       FormatAndPrintOutput("GetisLoadingDocument return value = ", docLoading, displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 119 of file nsIWebProg.cpp.

{
              // getTheDOMWindow
       qaWebProgress = GetWebProgObject();
       nsCOMPtr<nsIDOMWindow> qaDOMWindow;
       rv = qaWebProgress->GetDOMWindow(getter_AddRefs(qaDOMWindow));
       RvTestResult(rv, "nsIWebProgress::GetDOMWindow() test", displayMode);
       RvTestResultDlg(rv, "nsIWebProgress::GetDOMWindow() test");
       if (!qaDOMWindow)
              QAOutput("Didn't get DOM Window object.", displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 78 of file nsIWebProg.cpp.

{
       nsCOMPtr<nsIInterfaceRequestor> qaIReq(do_QueryInterface(qaWebBrowser));
       nsCOMPtr<nsIWebProgress> qaWebProgress(do_GetInterface(qaIReq));

       if (!qaWebProgress) {
              QAOutput("Didn't get web progress object.", 2);
              return NULL;
       }
       else {
              QAOutput("We got web progress object.", 1);
              return (qaWebProgress);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 204 of file nsIWebProg.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 109 of file nsIWebProg.cpp.

{
              // removeWebProgListener
       qaWebProgress = GetWebProgObject();
       nsCOMPtr<nsIWebProgressListener> listener(NS_STATIC_CAST(nsIWebProgressListener*, qaBrowserImpl));
       rv = qaWebProgress->RemoveProgressListener(listener);
       RvTestResult(rv, "nsIWebProgress::RemoveProgressListener() test", displayMode);
       RvTestResultDlg(rv, "nsIWebProgress::RemoveProgressListener() test");
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 194 of file nsIWebProg.cpp.

{
       PRUint32 theFlag;
       nsCAutoString flagName(NS_LITERAL_CSTRING("NOTIFY_ALL"));

       theFlag = theStoredFlag;
       ConvertWPFlagToString(theFlag, flagName);
       FormatAndPrintOutput("WebProgressListener flag = ", flagName, 2);
}

Here is the call graph for this function:

Definition at line 229 of file nsIWebProg.cpp.

{
       int i;
       PRUint32 theFlag = 0x000000ff;
       for (i = 0; i < 10; i++) {
              switch(i) {
              case 0:
                     theFlag = nsIWebProgress::NOTIFY_STATE_REQUEST;
                     break;
              case 1:
                     theFlag = nsIWebProgress::NOTIFY_STATE_DOCUMENT;
                     break;
              case 2:
                     theFlag = nsIWebProgress::NOTIFY_STATE_NETWORK;
                     break;
              case 3:
                     theFlag = nsIWebProgress::NOTIFY_STATE_WINDOW;
                     break;
              case 4:
                     theFlag = nsIWebProgress::NOTIFY_STATE_ALL;
                     break;
              case 5:
                     theFlag = nsIWebProgress::NOTIFY_PROGRESS;
                     break;
              case 6:
                     theFlag = nsIWebProgress::NOTIFY_STATUS;
                     break;
              case 7:
                     theFlag = nsIWebProgress::NOTIFY_SECURITY;
                     break;
              case 8:
                     theFlag = nsIWebProgress::NOTIFY_LOCATION;
                     break;
              case 9:
                     theFlag = nsIWebProgress::NOTIFY_ALL;
                     break;
              }
              AddWebProgLstnr(theFlag, 1);
              RemoveWebProgLstnr(1);
       }
       GetTheDOMWindow(1);
       GetIsLoadingDocTest(1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 189 of file nsIWebProg.cpp.

{
       theStoredFlag = theFlag;
}

Member Data Documentation

Definition at line 70 of file nsIWebProg.h.

Definition at line 69 of file nsIWebProg.h.

Definition at line 101 of file nsIWebProg.h.

Definition at line 84 of file nsIWebProg.h.


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