Back to index

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

#include <nsIEditSession.h>

Collaboration diagram for CnsIEditSession:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CnsIEditSession (nsIWebBrowser *mWebBrowser)
virtual ~CnsIEditSession ()
nsIEditingSessionGetEditSessionObject ()
void InitTest (PRInt16)
void MakeWinEditTest (PRBool, PRInt16)
void WinIsEditTest (PRBool, PRInt16)
void SetEditorWinTest (PRInt16)
void GetEditorWinTest (PRInt16)
void TearEditorWinTest (PRInt16)
void OnStartTests (UINT nMenuID)
void RunAllTests (void)

Public Attributes

nsCOMPtr< nsIWebBrowserqaWebBrowser
nsCOMPtr< nsIEditingSessioneditingSession
nsCOMPtr< nsIDOMWindowdomWindow

Detailed Description

Definition at line 61 of file nsIEditSession.h.


Constructor & Destructor Documentation

Definition at line 63 of file nsIEditSession.cpp.

{
       qaWebBrowser = mWebBrowser;
}

Definition at line 68 of file nsIEditSession.cpp.

{
}

Member Function Documentation

Definition at line 132 of file nsIEditSession.cpp.

{
       nsCOMPtr<nsIEditor> theEditor;
//     nsIEditor *theEditor = nsnull;
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv = editingSession->GetEditorForWindow(domWindow, getter_AddRefs(theEditor));
              RvTestResult(rv, "GetEditorForWindow() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "GetEditorForWindow() test");
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for GetEditorForWindow() test. Test failed.", displayMode);

              if (!theEditor) 
                     QAOutput("Didn't get the Editor object.");
       }
       else
              QAOutput("Didn't get object(s) for WinIsEditTest() test. Test failed.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 72 of file nsIEditSession.cpp.

{
    editingSession = do_GetInterface(qaWebBrowser);
    if (!editingSession) {
        QAOutput("Didn't get nsIEditingSession object.");
              return nsnull;
       }

    return (editingSession);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 83 of file nsIEditSession.cpp.

{
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv = editingSession->Init(domWindow);
              RvTestResult(rv, "Init() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "Init() test", true);
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for InitTest() test. Test failed.", displayMode);
       }
       else
              QAOutput("Didn't get editingSession object for InitTest() test. Test failed.", displayMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CnsIEditSession::MakeWinEditTest ( PRBool  afterUriLoad,
PRInt16  displayMode 
)

Definition at line 99 of file nsIEditSession.cpp.

{
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv= editingSession->MakeWindowEditable(domWindow, "text", afterUriLoad);
              RvTestResult(rv, "MakeWindowEditable() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "MakeWindowEditable() test");
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for MakeWindowEditable() test. Test failed.", displayMode);
       }
       else
              QAOutput("Didn't get editingSession object for MakeWindowEditable() test. Test failed.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 213 of file nsIEditSession.cpp.

{
       InitTest(1);
       MakeWinEditTest(PR_FALSE, 1);
       WinIsEditTest(PR_TRUE, 1);
       GetEditorWinTest(1);
//     SetEditorWinTest(1);         
       TearEditorWinTest(1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 153 of file nsIEditSession.cpp.

{
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv = editingSession->SetupEditorOnWindow(domWindow);
              RvTestResult(rv, "SetupEditorOnWindow() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "SetupEditorOnWindow() test");
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for SetupEditorOnWindow() test. Test failed.", displayMode);
       }
       else
              QAOutput("Didn't get object(s) for SetEditorWinTest() test. Test failed.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 169 of file nsIEditSession.cpp.

{
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv = editingSession->TearDownEditorOnWindow(domWindow);
              RvTestResult(rv, "TearDownEditorOnWindow() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "TearDownEditorOnWindow() test");
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for TearDownEditorOnWindow() test. Test failed.", displayMode);
       }
       else
              QAOutput("Didn't get object(s) for TearEditorWinTest() test. Test failed.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CnsIEditSession::WinIsEditTest ( PRBool  outIsEditable,
PRInt16  displayMode 
)

Definition at line 115 of file nsIEditSession.cpp.

{
       editingSession = GetEditSessionObject();
       domWindow = GetTheDOMWindow(qaWebBrowser);
       if (editingSession) {
              rv = editingSession->WindowIsEditable(domWindow, &outIsEditable);
              RvTestResult(rv, "WindowIsEditable() test", displayMode);
              if (displayMode == 1)
                     RvTestResultDlg(rv, "WindowIsEditable() test");
              if (!domWindow)
                     QAOutput("Didn't get domWindow object for WindowIsEditable() test. Test failed.", displayMode);
              FormatAndPrintOutput("the outIsEditable boolean = ", outIsEditable, displayMode);
       }
       else
              QAOutput("Didn't get object(s) for WinIsEditTest() test. Test failed.", 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 95 of file nsIEditSession.h.

Definition at line 94 of file nsIEditSession.h.

Definition at line 67 of file nsIEditSession.h.


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