Bug 677247 - Fix-up test and re-enable it. rs=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 11 Aug 2011 11:42:02 +0200
changeset 74206 42f7ed136034ff21ace377575e79e8d504a5356f
parent 74205 86abf721b3fee31348afa11cf81aa5416151e4ec
child 74246 10915aa173656cfb998cb28e04df37938b81b498
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerskhuey
bugs677247
milestone8.0a1
Bug 677247 - Fix-up test and re-enable it. rs=khuey
toolkit/xre/test/win/Makefile.in
toolkit/xre/test/win/TestDllInterceptor.cpp
--- a/toolkit/xre/test/win/Makefile.in
+++ b/toolkit/xre/test/win/Makefile.in
@@ -40,33 +40,36 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = test_xulapp
 
 
 CPPSRCS = \
-	TestXREMakeCommandLineWin.cpp \
-	$(NULL)
+  TestXREMakeCommandLineWin.cpp \
+  TestDllInterceptor.cpp \
+  $(NULL)
 
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 ws2_32 shell32)
 
 SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX))
 
 LOCAL_INCLUDES += \
-	-I$(srcdir) \
-	-I$(topsrcdir)/toolkit/xre \
-	-I$(topsrcdir)/config \
-	$(NULL)
+  -I$(srcdir) \
+  -I$(topsrcdir)/toolkit/xre \
+  -I$(topsrcdir)/config \
+  $(NULL)
 
 MOZ_WINCONSOLE = 1
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DNS_NO_XPCOM
 
 libs:: TestXREMakeCommandLineWin.ini
 	$(INSTALL) $^ $(FINAL_TARGET)/
 
 check::
 	@echo "Running TestXREMakeCommandLineWin tests"
 	@$(RUN_TEST_PROGRAM) $(FINAL_TARGET)/TestXREMakeCommandLineWin.exe
+	@echo "Running TestDllInterceptor tests"
+	@$(RUN_TEST_PROGRAM) $(FINAL_TARGET)/TestDllInterceptor.exe
--- a/toolkit/xre/test/win/TestDllInterceptor.cpp
+++ b/toolkit/xre/test/win/TestDllInterceptor.cpp
@@ -35,19 +35,19 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <stdio.h>
 #include "nsWindowsDllInterceptor.h"
 
 static bool patched_func_called = false;
 
-static BOOL (*orig_GetVersionExA)(__inout LPOSVERSIONINFO);
+static BOOL (WINAPI *orig_GetVersionExA)(__inout LPOSVERSIONINFO);
 
-static BOOL
+static BOOL WINAPI
 patched_GetVersionExA(__inout LPOSVERSIONINFO lpVersionInfo)
 {
   patched_func_called = true;
   return orig_GetVersionExA(lpVersionInfo);
 }
 
 bool osvi_equal(OSVERSIONINFO &info0, OSVERSIONINFO &info1)
 {