Bug 1227775 - Call mozilla::ipc::windows::InitUIThread() in RunGtestFunc(). r=benwa

This commit is contained in:
Chris Pearce 2015-11-26 13:50:52 +13:00
parent 1badb94490
commit c9a6b8d6a4
2 changed files with 11 additions and 0 deletions

View File

@ -75,4 +75,9 @@ if CONFIG['ENABLE_TESTS']:
'gtest/include',
]
if CONFIG['OS_ARCH'] == 'WINNT':
LOCAL_INCLUDES += [
'/security/sandbox/chromium',
]
FINAL_LIBRARY = 'xul-gtest'

View File

@ -11,6 +11,9 @@
#endif
#include "testing/TestHarness.h"
#include "prenv.h"
#ifdef XP_WIN
#include "mozilla/ipc/WindowsMessageLoop.h"
#endif
using ::testing::EmptyTestEventListener;
using ::testing::InitGoogleTest;
@ -86,6 +89,9 @@ int RunGTestFunc()
ScopedXPCOM xpcom("GTest");
#ifdef XP_WIN
mozilla::ipc::windows::InitUIThread();
#endif
#ifdef MOZ_CRASHREPORTER
nsCOMPtr<nsICrashReporter> crashreporter;
char *crashreporterStr = PR_GetEnv("MOZ_CRASHREPORTER");