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/files/file_path.h" | 10 #include "base/files/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 namespace base { | |
15 class StatsTable; | |
16 } | |
17 | |
18 // Test suite for unit and browser tests. Creates services needed by both. | 14 // Test suite for unit and browser tests. Creates services needed by both. |
19 // See also ChromeUnitTestSuite for additional services created for unit tests. | 15 // See also ChromeUnitTestSuite for additional services created for unit tests. |
20 class ChromeTestSuite : public content::ContentTestSuiteBase { | 16 class ChromeTestSuite : public content::ContentTestSuiteBase { |
21 public: | 17 public: |
22 ChromeTestSuite(int argc, char** argv); | 18 ChromeTestSuite(int argc, char** argv); |
23 virtual ~ChromeTestSuite(); | 19 virtual ~ChromeTestSuite(); |
24 | 20 |
25 protected: | 21 protected: |
26 // base::TestSuite overrides: | 22 // base::TestSuite overrides: |
27 virtual void Initialize() OVERRIDE; | 23 virtual void Initialize() OVERRIDE; |
28 virtual void Shutdown() OVERRIDE; | 24 virtual void Shutdown() OVERRIDE; |
29 | 25 |
30 virtual content::ContentClient* CreateClientForInitialization() OVERRIDE; | |
31 | |
32 // Should return true if the test suite will be running the full chrome | |
33 // browser, false if the test suite is unit tests. | |
34 virtual bool IsBrowserTestSuite() = 0; | |
35 | |
36 void SetBrowserDirectory(const base::FilePath& browser_dir) { | 26 void SetBrowserDirectory(const base::FilePath& browser_dir) { |
37 browser_dir_ = browser_dir; | 27 browser_dir_ = browser_dir; |
38 } | 28 } |
39 | 29 |
40 // Alternative path to browser binaries. | 30 // Alternative path to browser binaries. |
41 base::FilePath browser_dir_; | 31 base::FilePath browser_dir_; |
42 | 32 |
43 std::string stats_filename_; | |
44 scoped_ptr<base::StatsTable> stats_table_; | |
45 | 33 |
46 DISALLOW_COPY_AND_ASSIGN(ChromeTestSuite); | 34 DISALLOW_COPY_AND_ASSIGN(ChromeTestSuite); |
47 }; | 35 }; |
48 | 36 |
49 #endif // CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ | 37 #endif // CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ |
OLD | NEW |