Chromium Code Reviews| Index: sandbox/win/tests/integration_tests/integration_tests_common.h |
| diff --git a/sandbox/win/tests/integration_tests/integration_tests_common.h b/sandbox/win/tests/integration_tests/integration_tests_common.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ab2c240d3c08b32b143ddfc5c604673cb7146e9 |
| --- /dev/null |
| +++ b/sandbox/win/tests/integration_tests/integration_tests_common.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |
| +#define SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |
| + |
| +#include <windows.h> |
| + |
| +// Use the same header file for DLL and importers. |
| +#ifdef _DLL_EXPORTING |
| +#define DECLSPEC __declspec(dllexport) |
| +#else |
| +#define DECLSPEC __declspec(dllimport) |
| +#endif |
| + |
| +//------------------------------------------------------------------------------ |
| +// Tests |
| +//------------------------------------------------------------------------------ |
| +const wchar_t* g_extension_point_test_mutex = L"ChromeExtensionTestMutex"; |
| +const DWORD g_test_mutex_max_wait_ms = 10 * 1000; |
| + |
| +//------------------------------------------------------------------------------ |
| +// Hooking WinProc exe. |
| +//------------------------------------------------------------------------------ |
| +const wchar_t* g_winproc_file = L"sbox_integration_test_win_proc.exe "; |
| +const wchar_t* g_winproc_class_name = L"myWindowClass"; |
| +const wchar_t* g_winproc_window_name = L"ChromeMitigationTests"; |
| +const wchar_t* g_winproc_event = L"ChromeExtensionTestEvent"; |
| +const DWORD g_winproc_event_max_wait_ms = 3 * 1000; |
| + |
| +//------------------------------------------------------------------------------ |
| +// Hooking dll. |
| +//------------------------------------------------------------------------------ |
| +const wchar_t* g_hook_dll_file = L"sbox_integration_test_hook_dll.dll"; |
| +const char* g_hook_handler_func = "HookProc"; |
| +const char* g_was_hook_called_func = "WasHookCalled"; |
| +const char* g_set_hook_func = "SetHook"; |
| + |
| +#ifdef __cplusplus |
|
Will Harris
2016/04/12 19:39:13
this is always true, can be removed
penny
2016/04/13 22:52:27
Done.
|
| +extern "C" { |
| +#endif |
| + |
| +DECLSPEC LRESULT HookProc(int code, WPARAM wParam, LPARAM lParam); |
| + |
| +DECLSPEC bool WasHookCalled(); |
| + |
| +DECLSPEC void SetHook(HHOOK handle); |
| + |
| +#ifdef __cplusplus |
| +} |
| +#endif |
| + |
| +#endif // SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |