OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UNIT_TEST_SUITE_H_ | 5 #ifndef CHROME_TEST_BASE_CHROME_UNIT_TEST_SUITE_H_ |
6 #define CHROME_TEST_BASE_CHROME_UNIT_TEST_SUITE_H_ | 6 #define CHROME_TEST_BASE_CHROME_UNIT_TEST_SUITE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/test/test_discardable_memory_shmem_allocator.h" | 11 #include "base/test/test_discardable_memory_allocator.h" |
12 #include "chrome/test/base/chrome_test_suite.h" | 12 #include "chrome/test/base/chrome_test_suite.h" |
13 | 13 |
14 // Test suite for unit tests. Creates additional stub services that are not | 14 // Test suite for unit tests. Creates additional stub services that are not |
15 // needed for browser tests (e.g. a TestingBrowserProcess). | 15 // needed for browser tests (e.g. a TestingBrowserProcess). |
16 class ChromeUnitTestSuite : public ChromeTestSuite { | 16 class ChromeUnitTestSuite : public ChromeTestSuite { |
17 public: | 17 public: |
18 ChromeUnitTestSuite(int argc, char** argv); | 18 ChromeUnitTestSuite(int argc, char** argv); |
19 ~ChromeUnitTestSuite() override; | 19 ~ChromeUnitTestSuite() override; |
20 | 20 |
21 // base::TestSuite overrides: | 21 // base::TestSuite overrides: |
22 void Initialize() override; | 22 void Initialize() override; |
23 void Shutdown() override; | 23 void Shutdown() override; |
24 | 24 |
25 // These methods allow unit tests which run in the browser_test binary, and so | 25 // These methods allow unit tests which run in the browser_test binary, and so |
26 // which don't exercise the initialization in this test suite, to do basic | 26 // which don't exercise the initialization in this test suite, to do basic |
27 // setup which this class does. | 27 // setup which this class does. |
28 static void InitializeProviders(); | 28 static void InitializeProviders(); |
29 static void InitializeResourceBundle(); | 29 static void InitializeResourceBundle(); |
30 | 30 |
31 private: | 31 private: |
32 base::TestDiscardableMemoryShmemAllocator discardable_memory_allocator_; | 32 base::TestDiscardableMemoryAllocator discardable_memory_allocator_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(ChromeUnitTestSuite); | 34 DISALLOW_COPY_AND_ASSIGN(ChromeUnitTestSuite); |
35 }; | 35 }; |
36 | 36 |
37 #endif // CHROME_TEST_BASE_CHROME_UNIT_TEST_SUITE_H_ | 37 #endif // CHROME_TEST_BASE_CHROME_UNIT_TEST_SUITE_H_ |
OLD | NEW |