Approved: leaf@mozilla.org
More improvements to test harness git-svn-id: svn://10.0.0.236/trunk@28768 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -29,6 +29,7 @@ void __cdecl fperr(int sig)
|
||||
|
||||
TCHAR *aURLs[] =
|
||||
{
|
||||
_T("http://whippy/calendar.html"),
|
||||
_T("http://www.mozilla.org"),
|
||||
_T("http://www.yahoo.com"),
|
||||
_T("http://www.netscape.com"),
|
||||
@@ -236,8 +237,10 @@ void CBrowseDlg::OnGo()
|
||||
IWebBrowser *pIWebBrowser = NULL;
|
||||
if (SUCCEEDED(GetWebBrowser(&pIWebBrowser)))
|
||||
{
|
||||
int nItem = m_cmbURLs.GetCurSel();
|
||||
CString szURL = (nItem == 0) ? m_szTestURL : aURLs[nItem - 1];
|
||||
CString szURL;
|
||||
m_cmbURLs.GetWindowText(szURL);
|
||||
// int nItem = m_cmbURLs.GetCurSel();
|
||||
// CString szURL = (nItem == 0) ? m_szTestURL : aURLs[nItem - 1];
|
||||
|
||||
BSTR bstrURL = szURL.AllocSysString();
|
||||
pIWebBrowser->Navigate(bstrURL, NULL, NULL, NULL, NULL);
|
||||
|
||||
19
mozilla/webshell/embed/ActiveX/tests/cbrowse/Cbrowse.idl
Normal file
19
mozilla/webshell/embed/ActiveX/tests/cbrowse/Cbrowse.idl
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
// Cbrowse.idl : IDL source for Cbrowse.exe
|
||||
//
|
||||
// This file will be processed by the MIDL tool to
|
||||
// produce the type library (Cbrowse.tlb) and marshalling code.
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
[
|
||||
uuid(5B209213-F756-11D2-A27F-000000000000),
|
||||
version(1.0),
|
||||
helpstring("Cbrowse 1.0 Type Library")
|
||||
]
|
||||
library CbrowseLib
|
||||
{
|
||||
importlib("stdole32.tlb");
|
||||
importlib("stdole2.tlb");
|
||||
};
|
||||
|
||||
|
||||
11
mozilla/webshell/embed/ActiveX/tests/cbrowse/Cbrowse.rgs
Normal file
11
mozilla/webshell/embed/ActiveX/tests/cbrowse/Cbrowse.rgs
Normal file
@@ -0,0 +1,11 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove AppID
|
||||
{
|
||||
{5B209214-F756-11D2-A27F-000000000000} = s 'Cbrowse'
|
||||
'Cbrowse.EXE'
|
||||
{
|
||||
val AppID = s {5B209214-F756-11D2-A27F-000000000000}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,3 +7,8 @@
|
||||
#include <atlimpl.cpp>
|
||||
#include <atlctl.cpp>
|
||||
#include <atlwin.cpp>
|
||||
#ifdef _ATL_STATIC_REGISTRY
|
||||
#include <statreg.h>
|
||||
#endif
|
||||
#include <atlimpl.cpp>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
// ATL headers
|
||||
#include <atlbase.h>
|
||||
//You may derive a class from CComModule and use it if you want to override
|
||||
@@ -29,19 +30,19 @@ extern CComModule _Module;
|
||||
|
||||
#include <exdisp.h>
|
||||
#include <mshtml.h>
|
||||
#include <activscp.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
// Define some string classes
|
||||
typedef std::basic_string<TCHAR> tstring;
|
||||
|
||||
#include "..\..\ActiveXTypes.h"
|
||||
#include "..\..\BrowserDiagnostics.h"
|
||||
#include "..\..\PropertyList.h"
|
||||
#include "..\..\PropertyBag.h"
|
||||
#include "..\..\ControlSiteIPFrame.h"
|
||||
#include "..\..\ControlSite.h"
|
||||
#include "..\..\ActiveScriptSite.h"
|
||||
|
||||
#include "Tests.h"
|
||||
|
||||
@@ -50,6 +51,7 @@ typedef std::basic_string<TCHAR> tstring;
|
||||
#define KEY_TESTURL_DEFAULTVALUE _T("http://www.mozilla.org")
|
||||
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
|
||||
@@ -319,6 +319,22 @@ TestResult __cdecl tstNavigate2(BrowserInfo &cInfo)
|
||||
return trFailed;
|
||||
}
|
||||
|
||||
TestResult __cdecl tstScriptTest(BrowserInfo &cInfo)
|
||||
{
|
||||
CActiveScriptSiteInstance *pSite = NULL;
|
||||
CActiveScriptSiteInstance::CreateInstance(&pSite);
|
||||
|
||||
if (pSite)
|
||||
{
|
||||
pSite->AddRef();
|
||||
pSite->AttachVBScript();
|
||||
pSite->ParseScriptText(_T("i=1"));
|
||||
pSite->PlayScript();
|
||||
pSite->Release();
|
||||
}
|
||||
return trPassed;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Test aBasic[] =
|
||||
@@ -347,12 +363,18 @@ Test aOther[] =
|
||||
{ _T("Print Page"), _T("Print the test URL page"), NULL }
|
||||
};
|
||||
|
||||
Test aScripts[] =
|
||||
{
|
||||
{ _T("Script test"), _T("Test that the scripting engine is sane"), tstScriptTest }
|
||||
};
|
||||
|
||||
TestSet aTestSets[] =
|
||||
{
|
||||
{ _T("Basic"), _T("Basic sanity tests"), 5, aBasic },
|
||||
{ _T("Browsing"), _T("Browsing and navigation tests"), 1, aBrowsing },
|
||||
{ _T("DHTML"), _T("Test the DOM"), 3, aDHTML },
|
||||
{ _T("Other"), _T("Other tests"), 1, aOther }
|
||||
{ _T("Other"), _T("Other tests"), 1, aOther },
|
||||
{ _T("Scripts"), _T("Script tests"), 1, aScripts }
|
||||
};
|
||||
|
||||
int nTestSets = sizeof(aTestSets) / sizeof(aTestSets[0]);
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "cbrowse.h"
|
||||
#include "CBrowseDlg.h"
|
||||
#include "PickerDlg.h"
|
||||
#include <initguid.h>
|
||||
#include "Cbrowse_i.c"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -12,8 +14,6 @@
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CBrowseApp
|
||||
|
||||
@@ -49,7 +49,13 @@ BOOL CBrowseApp::InitInstance()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
/* if (!InitATL())
|
||||
return FALSE; */
|
||||
|
||||
AfxEnableControlContainer();
|
||||
/* _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
|
||||
REGCLS_MULTIPLEUSE);
|
||||
*/
|
||||
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
@@ -92,3 +98,47 @@ BOOL CBrowseApp::InitInstance()
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
END_OBJECT_MAP()
|
||||
/*
|
||||
LONG CCbrowseModule::Unlock()
|
||||
{
|
||||
AfxOleUnlockApp();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LONG CCbrowseModule::Lock()
|
||||
{
|
||||
AfxOleLockApp();
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
int CBrowseApp::ExitInstance()
|
||||
{
|
||||
/* if (m_bATLInited)
|
||||
{
|
||||
_Module.RevokeClassObjects();
|
||||
_Module.Term();
|
||||
}
|
||||
*/
|
||||
return CWinApp::ExitInstance();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
BOOL CBrowseApp::InitATL()
|
||||
{
|
||||
m_bATLInited = TRUE;
|
||||
|
||||
_Module.Init(ObjectMap, AfxGetInstanceHandle());
|
||||
_Module.dwThreadID = GetCurrentThreadId();
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ RSC=rc.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
@@ -69,7 +69,7 @@ LINK32=link.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
@@ -90,10 +90,19 @@ LINK32=link.exe
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ActiveScriptSite.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cbrowse.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Cbrowse.idl
|
||||
# ADD MTL /h "Cbrowse_i.h" /iid "Cbrowse_i.c" /Oicf
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cbrowse.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -131,6 +140,10 @@ SOURCE=.\Tests.cpp
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ActiveScriptSite.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cbrowse.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -200,7 +213,14 @@ SOURCE=.\res\testpassed.ico
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Cbrowse.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
# Section cbrowse : {10404710-0021-001E-1B00-1B00EAA80000}
|
||||
# 1:11:IDR_CBROWSE:103
|
||||
# End Section
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
#include "Cbrowse_i.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CBrowseApp:
|
||||
@@ -29,6 +30,7 @@ public:
|
||||
//{{AFX_VIRTUAL(CBrowseApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
virtual int ExitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
@@ -38,6 +40,13 @@ public:
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
private:
|
||||
|
||||
/*
|
||||
BOOL m_bATLInited;
|
||||
private:
|
||||
BOOL InitATL();
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ BEGIN
|
||||
TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS |
|
||||
TVS_TRACKSELECT | WS_BORDER | WS_TABSTOP,271,16,100,211
|
||||
GROUPBOX "Tests",IDC_STATIC,265,7,112,303
|
||||
COMBOBOX IDC_URL,45,7,117,52,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
COMBOBOX IDC_URL,45,7,117,52,CBS_DROPDOWN | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "<",IDC_BACKWARD,203,7,25,13
|
||||
PUSHBUTTON ">",IDC_FORWARD,234,7,25,13
|
||||
@@ -189,6 +189,13 @@ BEGIN
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_CBROWSE REGISTRY DISCARDABLE "Cbrowse.rgs"
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
//
|
||||
#define IDS_CHOOSEBROWSER 1
|
||||
#define IDD_CBROWSE_DIALOG 102
|
||||
#define IDR_CBROWSE 103
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_PICKBROWSER 129
|
||||
#define IDI_CLOSEDFOLDER 130
|
||||
@@ -32,6 +33,6 @@
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1014
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user