Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 9460019: Reduce flakiness in chrome_frame_tests.exe by having each run in a clean environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile break Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome_frame/test/chrome_frame_automation_mock.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698