Back to index

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

#include <DomWindow.h>

Collaboration diagram for CDomWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CDomWindow (nsIWebBrowser *mWebBrowser)
void OnStartTests (UINT nMenuID)
void RunAllTests ()
void GetContentDOMWindow ()
void GetTop ()
void GetParent ()
void GetScrollbars ()
void GetFrames ()
void GetDocument ()
void GetSelection ()
void GetTextZoom ()
void SetTextZoom ()
void GetScrollX ()
void GetScrollY ()
void ScrollTo ()
void ScrollBy ()
void ScrollByLines ()
void ScrollByPages ()
void SizeToContent ()
nsIDOMWindowGetDOMOWindowObject ()
virtual ~CDomWindow ()

Public Attributes

nsCOMPtr< nsIWebBrowserqaWebBrowser

Detailed Description

Definition at line 43 of file DomWindow.h.


Constructor & Destructor Documentation

Definition at line 51 of file DomWindow.cpp.

{
       qaWebBrowser = mWebBrowser ;
}
CDomWindow::~CDomWindow ( ) [virtual]

Definition at line 56 of file DomWindow.cpp.

{

}

Member Function Documentation

Definition at line 321 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsIDOMDocument> oDomDocument;

       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

       rv = oDomWindow->GetDocument(getter_AddRefs(oDomDocument));
    RvTestResult(rv, "nsIDOMWindow::GetDocument()' rv test",0);
       if (!oDomDocument)
       {
              AfxMessageBox("Cannot create Dom Document Object");
              return;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 501 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
       if (!oDomWindow)
              AfxMessageBox("Cannot create Dom Window Object");
       return oDomWindow;

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 300 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsIDOMWindowCollection> oDomWindowCol;

       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->GetFrames(getter_AddRefs(oDomWindowCol));
    RvTestResult(rv, "nsIDOMWindow::GetFrames()' rv test", 0);
       if (!oDomWindowCol)
       {
              AfxMessageBox("Cannot create Dom Window Collection Object");
              return;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 253 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsIDOMWindow> oDomWindowParent;

       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

       rv = oDomWindow->GetParent(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIDOMWindow::GetParent()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Parent Object");
              return;
       }

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 277 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsIDOMBarProp> oDomBarProp;

       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

       rv = oDomWindow->GetScrollbars(getter_AddRefs(oDomBarProp));
    RvTestResult(rv, "nsIDOMWindow::GetScrollbars()' rv test", 0);
       if (!oDomBarProp)
       {
              AfxMessageBox("Cannot create Dom Window Scroll Bar Object");
              return;
       }

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 391 of file DomWindow.cpp.

{
       PRInt32 scrollX = 0 ;
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->GetScrollX(&scrollX);
       RvTestResult(rv, "nsIDOMWindow::GetScrollX()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 407 of file DomWindow.cpp.

{      
       PRInt32 scrollY = 0 ;
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->GetScrollY(&scrollY);
       RvTestResult(rv, "nsIDOMWindow::GetScrollY()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 343 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsISelection> oSelection;

       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test",0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

       rv = oDomWindow->GetSelection(getter_AddRefs(oSelection));
    RvTestResult(rv, "nsIDOMWindow::GetSelection()' rv test", 0);
       if (!oSelection)
       {
              AfxMessageBox("Cannot get the  Selection Object");
              return;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 366 of file DomWindow.cpp.

{
       float fTextZoom = 0.0 ;
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->GetTextZoom(&fTextZoom);
       RvTestResult(rv, "nsIDOMWindow::GetTextZoom()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 232 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       nsCOMPtr<nsIDOMWindow> oDomWindowTop;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

    rv = oDomWindow->GetTop(getter_AddRefs(oDomWindowTop));
    RvTestResult(rv, "nsIDOMWindow::GetTop()' rv test", 1);
       if (!oDomWindowTop)
       {
              AfxMessageBox("Cannot create Dom Window Top Object");
              return;
       }
}

Here is the call graph for this function:

Definition at line 62 of file DomWindow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 122 of file DomWindow.cpp.

{
       PRInt32 scrollX = 0 ;
       PRInt32 scrollY = 0;
       PRInt32 bVisible =0;
       float fTextZoom = 0.0;

       nsCOMPtr<nsIDOMWindow> oDomWindow;
       //nsCOMPtr<nsIDOMWindow> oDomWindowTop;
       //nsCOMPtr<nsIDOMWindow> oDomWindowParent;

       nsCOMPtr<nsIDOMBarProp> oDomBarProp;
       nsCOMPtr<nsIDOMWindowCollection> oDomWindowCol;
       nsCOMPtr<nsIDOMDocument> oDomDocument;
       nsCOMPtr<nsISelection> oSelection;
       
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 1);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }

/*     rv = oDomWindow->GetTop(getter_AddRefs(oDomWindowTop));
    RvTestResult(rv, "nsIDOMWindow::GetTop()' rv test", 1);
       if (!oDomWindowTop)
       {
              AfxMessageBox("Cannot create Dom Window Top Object");
              return;
       }

       rv = oDomWindow->GetParent(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIDOMWindow::GetParent()' rv test", 1);
       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Parent Object");
              return;
       }

*/

       rv = oDomWindow->GetScrollbars(getter_AddRefs(oDomBarProp));
    RvTestResult(rv, "nsIDOMWindow::GetScrollbars()' rv test", 1);
       if (!oDomBarProp)
       {
              AfxMessageBox("Cannot create Dom Window Scroll Bar Object");
              return;
       }

       rv = oDomWindow->GetFrames(getter_AddRefs(oDomWindowCol));
    RvTestResult(rv, "nsIDOMWindow::GetFrames()' rv test", 1);
       if (!oDomWindowCol)
       {
              AfxMessageBox("Cannot create Dom Window Collection Object");
              return;
       }

       rv = oDomWindow->GetDocument(getter_AddRefs(oDomDocument));
    RvTestResult(rv, "nsIDOMWindow::GetDocument()' rv test", 1);
       if (!oDomDocument)
       {
              AfxMessageBox("Cannot create Dom Document Object");
              return;
       }

       rv = oDomWindow->GetSelection(getter_AddRefs(oSelection));
    RvTestResult(rv, "nsIDOMWindow::GetSelection()' rv test", 1);
       if (!oSelection)
       {
              AfxMessageBox("Cannot get the  Selection Object");
              return;
       }

       //  nsIDOMBarProp's only attribute
       //rv = oDomBarProp->GetVisible(&bVisible);


       rv = oDomWindow->GetTextZoom(&fTextZoom);
           RvTestResult(rv, "nsIDOMWindow::GetTextZoom()' rv test", 1);

       rv = oDomWindow->SetTextZoom(12.0);
       //fTextZoom = 4.0 ;
       rv = oDomWindow->SetTextZoom(fTextZoom);
           RvTestResult(rv, "nsIDOMWindow::SetTextZoom()' rv test", 1);

       rv = oDomWindow->GetScrollX(&scrollX);
          RvTestResult(rv, "nsIDOMWindow::GetScrollX()' rv test", 1);

       rv = oDomWindow->GetScrollY(&scrollY);
          RvTestResult(rv, "nsIDOMWindow::GetScrollY()' rv test", 1);

       rv = oDomWindow->ScrollTo(100,100);
          RvTestResult(rv, "nsIDOMWindow::ScrollTo()' rv test", 1);


       rv = oDomWindow->ScrollBy(5, 5);
          RvTestResult(rv, "nsIDOMWindow::ScrollBy()' rv test", 1);

       rv = oDomWindow->ScrollByLines(5);
          RvTestResult(rv, "nsIDOMWindow::ScrollByLines()' rv test", 1);

       rv = oDomWindow->ScrollByPages(1);
          RvTestResult(rv, "nsIDOMWindow::ScrollByPages()' rv test", 1);

       //rv = oDomWindow->SizeToContent();
       //   RvTestResult(rv, "nsIDOMWindow::SizeToContent()' rv test", 1);

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 439 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->ScrollBy(5, 5);
       RvTestResult(rv, "nsIDOMWindow::ScrollBy()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 454 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->ScrollByLines(5);
    RvTestResult(rv, "nsIDOMWindow::ScrollByLines()' rv test",0);

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 470 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->ScrollByPages(1);
       RvTestResult(rv, "nsIDOMWindow::ScrollByPages()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 423 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->ScrollTo(100,100);
    RvTestResult(rv, "nsIDOMWindow::ScrollTo()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 382 of file DomWindow.cpp.

{
       float fTextZoom = 0.0 ;

       fTextZoom = 12.0;
       rv = GetDOMOWindowObject()->SetTextZoom(fTextZoom);
       RvTestResult(rv, "nsIDOMWindow::SetTextZoom()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 485 of file DomWindow.cpp.

{
       nsCOMPtr<nsIDOMWindow> oDomWindow;
       rv = qaWebBrowser->GetContentDOMWindow(getter_AddRefs(oDomWindow));
    RvTestResult(rv, "nsIWebBrowser::GetContentDOMWindow()' rv test", 0);

       if (!oDomWindow)
       {
              AfxMessageBox("Cannot create Dom Window Object");
              return;
       }
       rv = oDomWindow->SizeToContent();
       RvTestResult(rv, "nsIDOMWindow::SizeToContent()' rv test", 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 50 of file DomWindow.h.


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