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_TEST_BASE_CHROME_TEST_SUITE_H_ | 5 #ifndef CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ |
6 #define CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ | 6 #define CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/test/content_test_suite_base.h" | 12 #include "content/public/test/content_test_suite_base.h" |
13 | 13 |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 #include "ui/base/win/scoped_ole_initializer.h" | 15 #include "ui/base/win/scoped_ole_initializer.h" |
16 #endif | 16 #endif |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class StatsTable; | 19 class StatsTable; |
20 } | 20 } |
21 | 21 |
22 class ChromeTestSuite : public content::ContentTestSuiteBase { | 22 class ChromeTestSuite : public content::ContentTestSuiteBase { |
23 public: | 23 public: |
24 // Make the browser_test binary launch as a regular browser. | |
25 static const char kLaunchAsBrowser[]; | |
26 | |
27 ChromeTestSuite(int argc, char** argv); | 24 ChromeTestSuite(int argc, char** argv); |
28 virtual ~ChromeTestSuite(); | 25 virtual ~ChromeTestSuite(); |
29 | 26 |
30 protected: | 27 protected: |
31 virtual void Initialize() OVERRIDE; | 28 virtual void Initialize() OVERRIDE; |
32 virtual void Shutdown() OVERRIDE; | 29 virtual void Shutdown() OVERRIDE; |
33 | 30 |
34 virtual content::ContentClient* CreateClientForInitialization() OVERRIDE; | 31 virtual content::ContentClient* CreateClientForInitialization() OVERRIDE; |
35 | 32 |
36 void SetBrowserDirectory(const FilePath& browser_dir) { | 33 void SetBrowserDirectory(const FilePath& browser_dir) { |
37 browser_dir_ = browser_dir; | 34 browser_dir_ = browser_dir; |
38 } | 35 } |
39 | 36 |
40 // Alternative path to browser binaries. | 37 // Alternative path to browser binaries. |
41 FilePath browser_dir_; | 38 FilePath browser_dir_; |
42 | 39 |
43 std::string stats_filename_; | 40 std::string stats_filename_; |
44 scoped_ptr<base::StatsTable> stats_table_; | 41 scoped_ptr<base::StatsTable> stats_table_; |
45 | 42 |
46 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
47 ui::ScopedOleInitializer ole_initializer_; | 44 ui::ScopedOleInitializer ole_initializer_; |
48 #endif | 45 #endif |
49 }; | 46 }; |
50 | 47 |
51 #endif // CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ | 48 #endif // CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ |
OLD | NEW |