Back to index

lightning-sunbird  0.9+nobinonly
QaUtils.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  *   Ashish Bhatt <ashishbhatt@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 // QAUtils.h : Global function declarations
00041 //
00043 
00044 #ifndef _QAUTILS_H
00045 #define _QAUTILS_H
00046 
00047 #if _MSC_VER > 1000
00048        #pragma once
00049 #endif
00050 
00051 #include "BrowserView.h"
00052 #include "resource.h"
00053 #include "stdafx.h"
00054 
00055 extern void RvTestResultDlg(nsresult rv, CString pLine,BOOL bClearList = false);
00056 extern void RvTestResult(nsresult, const char *, int displayMethod=1);
00057 extern void WriteToOutputFile(const char *);
00058 extern void QAOutput(const char *pLine, int displayMethod=1);
00059 extern void FormatAndPrintOutput(const char *, const char *, int);
00060 extern void FormatAndPrintOutput(const char *, nsCAutoString, int);
00061 extern void FormatAndPrintOutput(const char *, int, int);
00062 extern void FormatAndPrintOutput(const char *, double, int);
00063 extern void FormatAndPrintOutput(const char *, PRUint32, int);
00064 extern void RequestName(nsIRequest *, nsCString &, int displayMethod=1);
00065 extern void WebProgDOMWindowTest(nsIWebProgress *, const char *,int displayMethod=1);
00066 extern void WebProgIsDocLoadingTest(nsIWebProgress *, const char *, int displayMethod=1);
00067 extern void SaveObject(nsISupports *theSupports);
00068 extern nsIDOMWindow * GetTheDOMWindow(nsIWebBrowser *);
00069 extern nsCAutoString GetTheURI(nsIURI *theURI, int displayMethod=1);
00070 extern void onStateChangeString(char *, char *, nsCString, PRUint32, int displayMethod=1);
00071 extern nsresult rv;
00072 
00073 #endif //_QAUTILS_H/////////////////////////////////////////////////////////////////////////////
00074 
00075 
00076 // CShowTestResults dialog
00077 class CShowTestResults : public CDialog
00078 {
00079 // Construction
00080 public:
00081        CShowTestResults(CWnd* pParent = NULL);   // standard constructor
00082        void AddItemToList(LPCTSTR szTestCaseName, BOOL bResult);
00083 
00084 // Dialog Data
00085        //{{AFX_DATA(CShowTestResults)
00086        enum { IDD = IDD_RUNTESTSDLG };
00087        CListCtrl     m_ListResults;
00088        //}}AFX_DATA
00089 
00090 
00091 // Overrides
00092        // ClassWizard generated virtual function overrides
00093        //{{AFX_VIRTUAL(CShowTestResults)
00094        protected:
00095        virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00096        //}}AFX_VIRTUAL
00097 
00098 // Implementation
00099 private:
00100        LPCTSTR m_TitleString ;
00101 protected:
00102 
00103        // Generated message map functions
00104        //{{AFX_MSG(CShowTestResults)
00105        virtual BOOL OnInitDialog();
00106        //}}AFX_MSG
00107        DECLARE_MESSAGE_MAP()
00108 };
00109 
00110 
00111 typedef struct {
00112        nsCOMPtr<nsISupports> sup;
00113 }storage;
00114 
00115