| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 21 matching lines...) Expand all Loading... |
| 32 // Needed for CreateFunctor. | 32 // Needed for CreateFunctor. |
| 33 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING | 33 #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING |
| 34 #include "testing/gmock_mutant.h" | 34 #include "testing/gmock_mutant.h" |
| 35 | 35 |
| 36 interface IWebBrowser2; | 36 interface IWebBrowser2; |
| 37 | 37 |
| 38 namespace chrome_frame_test { | 38 namespace chrome_frame_test { |
| 39 | 39 |
| 40 int CloseVisibleWindowsOnAllThreads(HANDLE process); | 40 int CloseVisibleWindowsOnAllThreads(HANDLE process); |
| 41 | 41 |
| 42 base::ProcessHandle LaunchFirefox(const std::wstring& url); | |
| 43 base::ProcessHandle LaunchOpera(const std::wstring& url); | |
| 44 base::ProcessHandle LaunchIE(const std::wstring& url); | 42 base::ProcessHandle LaunchIE(const std::wstring& url); |
| 45 base::ProcessHandle LaunchSafari(const std::wstring& url); | |
| 46 base::ProcessHandle LaunchChrome(const std::wstring& url); | 43 base::ProcessHandle LaunchChrome(const std::wstring& url); |
| 47 | 44 |
| 48 // Attempts to close all open IE windows. | 45 // Attempts to close all open IE windows. |
| 49 // The return value is the number of windows closed. | 46 // The return value is the number of windows closed. |
| 50 // @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. |
| 51 // 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 |
| 52 // not perform this initialization itself. | 49 // not perform this initialization itself. |
| 53 int CloseAllIEWindows(); | 50 int CloseAllIEWindows(); |
| 54 | 51 |
| 55 extern const wchar_t kIEImageName[]; | 52 extern const wchar_t kIEImageName[]; |
| 56 extern const wchar_t kIEBrokerImageName[]; | 53 extern const wchar_t kIEBrokerImageName[]; |
| 57 extern const wchar_t kFirefoxImageName[]; | |
| 58 extern const wchar_t kOperaImageName[]; | |
| 59 extern const wchar_t kSafariImageName[]; | |
| 60 extern const char kChromeImageName[]; | 54 extern const char kChromeImageName[]; |
| 61 extern const wchar_t kChromeLauncher[]; | 55 extern const wchar_t kChromeLauncher[]; |
| 62 extern const int kChromeFrameLongNavigationTimeoutInSeconds; | 56 extern const int kChromeFrameLongNavigationTimeoutInSeconds; |
| 63 extern const int kChromeFrameVeryLongNavigationTimeoutInSeconds; | 57 extern const int kChromeFrameVeryLongNavigationTimeoutInSeconds; |
| 64 | 58 |
| 65 // Temporarily impersonate the current thread to low integrity for the lifetime | 59 // Temporarily impersonate the current thread to low integrity for the lifetime |
| 66 // of the object. Destructor will automatically revert integrity level. | 60 // of the object. Destructor will automatically revert integrity level. |
| 67 class LowIntegrityToken { | 61 class LowIntegrityToken { |
| 68 public: | 62 public: |
| 69 LowIntegrityToken(); | 63 LowIntegrityToken(); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } // namespace chrome_frame_test | 332 } // namespace chrome_frame_test |
| 339 | 333 |
| 340 // TODO(tommi): This is a temporary workaround while we're getting our | 334 // TODO(tommi): This is a temporary workaround while we're getting our |
| 341 // Singleton story straight. Ideally each test should clear up any singletons | 335 // Singleton story straight. Ideally each test should clear up any singletons |
| 342 // it might have created, but test cases do not implicitly have their own | 336 // it might have created, but test cases do not implicitly have their own |
| 343 // AtExitManager, so we have this workaround method for tests that depend on | 337 // AtExitManager, so we have this workaround method for tests that depend on |
| 344 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. | 338 // "fresh" singletons. The implementation is in chrome_frame_unittest_main.cc. |
| 345 void DeleteAllSingletons(); | 339 void DeleteAllSingletons(); |
| 346 | 340 |
| 347 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 341 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
| OLD | NEW |