OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |
| 6 #define SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 |
| 10 // Use the same header file for DLL and importers. |
| 11 #ifdef _DLL_EXPORTING |
| 12 #define DECLSPEC extern "C" __declspec(dllexport) |
| 13 #else |
| 14 #define DECLSPEC extern "C" __declspec(dllimport) |
| 15 #endif |
| 16 |
| 17 //------------------------------------------------------------------------------ |
| 18 // Tests |
| 19 //------------------------------------------------------------------------------ |
| 20 const wchar_t* g_extension_point_test_mutex = L"ChromeExtensionTestMutex"; |
| 21 |
| 22 //------------------------------------------------------------------------------ |
| 23 // Hooking WinProc exe. |
| 24 //------------------------------------------------------------------------------ |
| 25 const wchar_t* g_winproc_file = L"sbox_integration_test_win_proc.exe "; |
| 26 const wchar_t* g_winproc_class_name = L"myWindowClass"; |
| 27 const wchar_t* g_winproc_window_name = L"ChromeMitigationTests"; |
| 28 const wchar_t* g_winproc_event = L"ChromeExtensionTestEvent"; |
| 29 |
| 30 //------------------------------------------------------------------------------ |
| 31 // Hooking dll. |
| 32 //------------------------------------------------------------------------------ |
| 33 const wchar_t* g_hook_dll_file = L"sbox_integration_test_hook_dll.dll"; |
| 34 const wchar_t* g_hook_event = L"ChromeExtensionTestHookEvent"; |
| 35 const char* g_hook_handler_func = "HookProc"; |
| 36 const char* g_was_hook_called_func = "WasHookCalled"; |
| 37 const char* g_set_hook_func = "SetHook"; |
| 38 |
| 39 DECLSPEC LRESULT HookProc(int code, WPARAM wParam, LPARAM lParam); |
| 40 DECLSPEC bool WasHookCalled(); |
| 41 DECLSPEC void SetHook(HHOOK hook_handle); |
| 42 |
| 43 #endif // SANDBOX_TESTS_INTEGRATION_TESTS_COMMON_H_ |
OLD | NEW |