[MSHTML_WINETEST] Add a PCH.
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 18 Dec 2017 12:43:24 +0000 (13:43 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 18 Dec 2017 12:43:24 +0000 (13:43 +0100)
14 files changed:
modules/rostests/winetests/mshtml/CMakeLists.txt
modules/rostests/winetests/mshtml/activex.c
modules/rostests/winetests/mshtml/dom.c
modules/rostests/winetests/mshtml/events.c
modules/rostests/winetests/mshtml/guid.c [new file with mode: 0644]
modules/rostests/winetests/mshtml/htmldoc.c
modules/rostests/winetests/mshtml/htmllocation.c
modules/rostests/winetests/mshtml/misc.c
modules/rostests/winetests/mshtml/mshtml_test.h
modules/rostests/winetests/mshtml/precomp.h [new file with mode: 0644]
modules/rostests/winetests/mshtml/protocol.c
modules/rostests/winetests/mshtml/script.c
modules/rostests/winetests/mshtml/style.c
modules/rostests/winetests/mshtml/xmlhttprequest.c

index 5384512..f744975 100644 (file)
@@ -13,10 +13,14 @@ list(APPEND SOURCE
     protocol.c
     script.c
     style.c
-    testlist.c
-    xmlhttprequest.c)
+    xmlhttprequest.c
+    precomp.h)
 
-add_executable(mshtml_winetest ${SOURCE} rsrc.rc)
+add_executable(mshtml_winetest
+    ${SOURCE}
+    guid.c
+    testlist.c
+    rsrc.rc)
 
 list(APPEND mshtml_winetest_rc_deps
     ${CMAKE_CURRENT_BINARY_DIR}/test_tlb.tlb
@@ -33,4 +37,5 @@ target_link_libraries(mshtml_winetest uuid strmiids)
 set_module_type(mshtml_winetest win32cui)
 add_importlibs(mshtml_winetest wininet ole32 oleaut32 user32 gdi32 urlmon advapi32 msvcrt kernel32)
 add_dependencies(mshtml_winetest test_tlb_header stdole2)
+add_pch(mshtml_winetest precomp.h SOURCE)
 add_rostests_file(TARGET mshtml_winetest)
index c145b4a..117becd 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <wine/test.h>
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <mshtml.h>
-//#include "docobj.h"
-#include <hlink.h>
-//#include "dispex.h"
-#include <mshtmhst.h>
-//#include "activscp.h"
-//#include "objsafe.h"
-#include <mshtmdid.h>
-#include "mshtml_test.h"
-
-#include <initguid.h>
+#include "precomp.h"
+
 #include <test_tlb.h>
 
 #define DEFINE_EXPECT(func) \
index 1874ead..09d0c7f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
+#include "precomp.h"
 
-#include <wine/test.h>
-//#include <stdarg.h>
 #include <stdio.h>
 
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <mshtml.h>
-#include <mshtmcid.h>
-#include <mshtmhst.h>
-//#include "docobj.h"
-#include <hlink.h>
-//#include "dispex.h"
-#include "mshtml_test.h"
-#include <objsafe.h>
-#include <htiface.h>
-#include <tlogstg.h>
-
 static INT (WINAPI *pLCIDToLocaleName)(LCID,LPWSTR,INT,DWORD);
 static LANGID (WINAPI *pGetUserDefaultUILanguage)(void);
 
index b5f14b8..e321850 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <wine/test.h>
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <mshtml.h>
-#include <mshtmdid.h>
+#include "precomp.h"
+
 #include <docobj.h>
-#include <hlink.h>
-//#include "dispex.h"
 
 #define DEFINE_EXPECT(func) \
     static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
diff --git a/modules/rostests/winetests/mshtml/guid.c b/modules/rostests/winetests/mshtml/guid.c
new file mode 100644 (file)
index 0000000..49ddc82
--- /dev/null
@@ -0,0 +1,15 @@
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+
+#include <windef.h>
+#include <winbase.h>
+#include <objbase.h>
+#include <initguid.h>
+#include <dispex.h>
+#include <test_tlb.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */
index 1ca1878..7858389 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
+#include "precomp.h"
 
-#include <wine/test.h>
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-#include <initguid.h>
-//#include "ole2.h"
-#include <mshtml.h>
-//#include "docobj.h"
-#include <docobjectservice.h>
-#include <wininet.h>
-#include <mshtmhst.h>
-#include <mshtmdid.h>
-#include <mshtmcid.h>
-//#include "hlink.h"
-//#include "dispex.h"
 #include <idispids.h>
 #include <shlguid.h>
 #include <shdeprecated.h>
 #include <perhist.h>
-//#include "shobjidl.h"
-#include <htiface.h>
-#include <tlogstg.h>
 #include <exdispid.h>
-#include "mshtml_test.h"
+
+#include <initguid.h>
+#include <docobjectservice.h>
 
 DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
 DEFINE_GUID(IID_IProxyManager,0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
index 8bf5517..e28e126 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <wine/test.h>
-
-#include "mshtml.h"
-#include "wininet.h"
+#include "precomp.h"
 
 struct location_test {
     const char *name;
index d57aabc..b33b88d 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
+#include "precomp.h"
 
-#include <wine/test.h>
-//#include <stdarg.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-//#include "initguid.h"
 #include <optary.h>
 
 static void test_HTMLLoadOptions(void)
index c084495..b6d896a 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#pragma once
+
 /* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
 /* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */
-static BOOL is_ie_hardened(void)
+static inline BOOL is_ie_hardened(void)
 {
     HKEY zone_map;
     DWORD ie_harden, type, size;
diff --git a/modules/rostests/winetests/mshtml/precomp.h b/modules/rostests/winetests/mshtml/precomp.h
new file mode 100644 (file)
index 0000000..acb5807
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _MSHTML_WINETEST_PRECOMP_H_
+#define _MSHTML_WINETEST_PRECOMP_H_
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <wingdi.h>
+#include <winnls.h>
+#include <ole2.h>
+#include <mshtml.h>
+#include <hlink.h>
+#include <mshtmhst.h>
+#include <mshtmdid.h>
+#include <mshtmcid.h>
+#include <objsafe.h>
+#include <htiface.h>
+#include <tlogstg.h>
+#include <winreg.h>
+#include <wininet.h>
+
+#include "mshtml_test.h"
+
+#endif /* !_MSHTML_WINETEST_PRECOMP_H_ */
index b90451e..bda617c 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
+#include "precomp.h"
 
-#include <wine/test.h>
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <urlmon.h>
 #include <shlwapi.h>
-#include <wininet.h>
 
 #include <initguid.h>
 
index 1c5171b..102f994 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <wine/test.h>
-//#include <stdarg.h>
-#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <wininet.h>
-//#include "docobj.h"
-//#include "dispex.h"
-#include <hlink.h>
-#include <mshtml.h>
-#include <mshtmhst.h>
-//#include "initguid.h"
-//#include "activscp.h"
+#include "precomp.h"
+
 #include <activdbg.h>
-#include <objsafe.h>
-#include <mshtmdid.h>
-#include "mshtml_test.h"
 
 DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
 
index 974ec2b..71c432d 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <wine/test.h>
-//#include <stdarg.h>
-//#include <stdio.h>
-
-//#include "windef.h"
-//#include "winbase.h"
-//#include "ole2.h"
-#include <mshtml.h>
-//#include "mshtmhst.h"
-//#include "docobj.h"
+#include "precomp.h"
 
 static int strcmp_wa(LPCWSTR strw, const char *stra)
 {
index 0997206..8a4bd17 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-
-#include <wine/test.h>
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "ole2.h"
-#include "mshtml.h"
+#include "precomp.h"
 
 static BSTR a2bstr(const char *str)
 {