OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <atlbase.h> | 10 #include <atlbase.h> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome_frame/test/simulate_input.h" | 24 #include "chrome_frame/test/simulate_input.h" |
25 #include "chrome_frame/test_utils.h" | 25 #include "chrome_frame/test_utils.h" |
26 #include "chrome_frame/utils.h" | 26 #include "chrome_frame/utils.h" |
27 | 27 |
28 #include "gtest/gtest.h" | 28 #include "gtest/gtest.h" |
29 | 29 |
30 // Needed for CreateFunctor. | 30 // Needed for CreateFunctor. |
31 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 31 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
32 #include "testing/gmock_mutant.h" | 32 #include "testing/gmock_mutant.h" |
33 | 33 |
| 34 class FilePath; |
34 interface IWebBrowser2; | 35 interface IWebBrowser2; |
35 | 36 |
36 namespace chrome_frame_test { | 37 namespace chrome_frame_test { |
37 | 38 |
38 int CloseVisibleWindowsOnAllThreads(HANDLE process); | 39 int CloseVisibleWindowsOnAllThreads(HANDLE process); |
39 | 40 |
40 base::ProcessHandle LaunchIE(const std::wstring& url); | 41 base::ProcessHandle LaunchIE(const std::wstring& url); |
41 base::ProcessHandle LaunchChrome(const std::wstring& url); | 42 base::ProcessHandle LaunchChrome(const std::wstring& url, |
| 43 const FilePath& user_data_dir); |
42 | 44 |
43 // Attempts to close all open IE windows. | 45 // Attempts to close all open IE windows. |
44 // The return value is the number of windows closed. | 46 // The return value is the number of windows closed. |
45 // @note: this function requires COM to be initialized on the calling thread. | 47 // @note: this function requires COM to be initialized on the calling thread. |
46 // Since the caller might be running in either MTA or STA, the function does | 48 // Since the caller might be running in either MTA or STA, the function does |
47 // not perform this initialization itself. | 49 // not perform this initialization itself. |
48 int CloseAllIEWindows(); | 50 int CloseAllIEWindows(); |
49 | 51 |
50 extern const wchar_t kIEImageName[]; | 52 extern const wchar_t kIEImageName[]; |
51 extern const wchar_t kIEBrokerImageName[]; | 53 extern const wchar_t kIEBrokerImageName[]; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } // namespace chrome_frame_test | 331 } // namespace chrome_frame_test |
330 | 332 |
331 // TODO(tommi): This is a temporary workaround while we're getting our | 333 // TODO(tommi): This is a temporary workaround while we're getting our |
332 // Singleton story straight. Ideally each test should clear up any singletons | 334 // Singleton story straight. Ideally each test should clear up any singletons |
333 // it might have created, but test cases do not implicitly have their own | 335 // it might have created, but test cases do not implicitly have their own |
334 // AtExitManager, so we have this workaround method for tests that depend on | 336 // AtExitManager, so we have this workaround method for tests that depend on |
335 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. | 337 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. |
336 void DeleteAllSingletons(); | 338 void DeleteAllSingletons(); |
337 | 339 |
338 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 340 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
OLD | NEW |