Back to index

lightning-sunbird  0.9+nobinonly
Tests.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   David Epstein <depstein@netscape.com>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either the GNU General Public License Version 2 or later (the "GPL"), or
00027  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 // Tests.h : header file for QA test cases
00040 //
00042 
00043 #ifndef _TESTS_H
00044 #define _TESTS_H
00045 
00046 #if _MSC_VER > 1000
00047        #pragma once
00048 #endif
00049 
00050 #include "BrowserView.h"
00051 #include "BrowserImpl.h"
00052 #include "StdAfx.h"
00053 #include "UrlDialog.h"
00054 
00056 // CTESTS class
00057 
00058 class CBrowserImpl;
00059 class CBrowserView;
00060 
00061 class CTests:public CWnd
00062 {
00063 public:
00064        CTests(nsIWebBrowser* mWebBrowser,
00065                         nsIBaseWindow* mBaseWindow,
00066                         nsIWebNavigation* mWebNav,
00067                         CBrowserImpl *mpBrowserImpl);
00068        virtual ~CTests();
00069 
00070        // Some helper methods
00071 
00072        // Mozilla interfaces
00073        //
00074        //static 
00075        nsCOMPtr<nsIWebBrowser> qaWebBrowser;
00076        nsCOMPtr<nsIBaseWindow> qaBaseWindow;
00077        nsCOMPtr<nsIWebNavigation> qaWebNav;
00078        CBrowserImpl  *qaBrowserImpl;
00079        CUrlDialog myDialog;
00080 
00081        // local test methods
00082 
00083        // Overrides
00084        // ClassWizard generated virtual function overrides
00085        //{{AFX_VIRTUAL(CTests)
00086        public:
00087        virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00088        //}}AFX_VIRTUAL
00089 
00090 private:
00091        // Individual interface Objects
00092 
00093        // local test variables
00094        PRBool exists;
00095        nsCOMPtr<nsIURI> theURI;
00096        nsCOMPtr<nsIChannel> theChannel;
00097        UINT nCommandID;
00098 protected:
00099        //{{AFX_MSG(CTests)
00100        afx_msg void OnUpdateNavBack(CCmdUI* pCmdUI);
00101        afx_msg void OnUpdateNavForward(CCmdUI* pCmdUI);
00102        afx_msg void OnUpdateNavStop(CCmdUI* pCmdUI);
00103        afx_msg void OnUpdateCut(CCmdUI* pCmdUI);
00104        afx_msg void OnUpdateCopy(CCmdUI* pCmdUI);
00105        afx_msg void OnUpdatePaste(CCmdUI* pCmdUI);
00106        afx_msg void OnTestsChangeUrl();
00107        afx_msg void OnTestsGlobalHistory();
00108        afx_msg void OnTestsCreateFile();
00109        afx_msg void OnTestsCreateprofile();
00110        afx_msg void OnTestsAddTooltipListener();
00111        afx_msg void OnTestsAddWebProgListener();
00112        afx_msg void OnTestsAddHistoryListener();
00113        afx_msg void OnTestsRemovehistorylistener();
00114        afx_msg void OnTestsAddUriContentListenerByWebBrowser();
00115        afx_msg void OnTestsAddUriContentListenerByUriLoader();
00116        afx_msg void OnTestsAddUriContentListenerByOpenUri();
00117        afx_msg void OnTestsNSNewChannelAndAsyncOpen();
00118        afx_msg void OnTestsIOServiceNewURI();
00119        afx_msg void OnTestsProtocolHandlerNewURI();
00120        afx_msg void OnInterfacesNsifile();
00121        afx_msg void OnToolsRemoveGHPage();
00122        afx_msg void OnToolsRemoveAllGH();
00123        afx_msg void OnToolsViewLogfile();
00124        afx_msg void OnToolsDeleteLogfile();
00125        afx_msg void OnToolsTestYourMethod();
00126        afx_msg void OnToolsTestYourMethod2();
00127        afx_msg void OnVerifybugs70228();
00128        afx_msg void OnVerifybugs90195();
00129        afx_msg void OnVerifybugs169617();
00130        afx_msg void OnVerifybugs170274();
00131     afx_msg void OnPasteTest();
00132     afx_msg void OnCopyTest();
00133     afx_msg void OnSelectAllTest();
00134     afx_msg void OnSelectNoneTest();
00135     afx_msg void OnCutSelectionTest();
00136     afx_msg void copyLinkLocationTest();
00137     afx_msg void canCopySelectionTest();
00138     afx_msg void canCutSelectionTest();
00139     afx_msg void canPasteTest();
00140        afx_msg void OnInterfacesNsirequest();
00141        afx_msg void OnInterfacesNsidomwindow();
00142        afx_msg void OnInterfacesNsidirectoryservice();
00143        afx_msg void OnInterfacesNsiselection();
00144        afx_msg void OnInterfacesNsiprofile();
00145        afx_msg void OnInterfacesNsishistory();
00146        afx_msg void OnInterfacesNsiwebnav();
00147        afx_msg void OnInterfacesNsiclipboardcommands();
00148        afx_msg void OnInterfacesNsiobserverservice();
00149        afx_msg void OnInterfacesNsiwebbrowser();
00150        afx_msg void OnInterfacesNsiwebprogress();
00151        afx_msg void OnInterfacesNsiwebbrowfind();
00152        afx_msg void OnInterfacesNsieditingsession();
00153        afx_msg void OnInterfacesNsicommandmgr();
00154        afx_msg void OnInterfacesNsicmdparams();
00155        afx_msg void OnInterfacesRunalltestcases();
00156        afx_msg void OnInterfacesNsichannel();
00157        afx_msg void OnInterfacesNsihttpchannel();
00158 
00159        //}}AFX_MSG
00160 
00161        DECLARE_MESSAGE_MAP()
00162 
00163        // individual nsIFile tests
00164        void InitWithPathTest(nsILocalFile *);
00165        void AppendRelativePathTest(nsILocalFile *);
00166        void FileCreateTest(nsILocalFile *);
00167        void FileExistsTest(nsILocalFile *);
00168        void FileCopyTest(nsILocalFile *, nsILocalFile *);
00169        void FileMoveTest(nsILocalFile *, nsILocalFile *);
00170 };
00171 
00172 #endif //_TESTS_H
00173