OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 class ContentBrowserClient; | |
15 class ContentClient; | 16 class ContentClient; |
16 class ContentBrowserClient; | 17 class ContentUtilityClient; |
17 } | 18 } |
18 | 19 |
19 namespace extensions { | 20 namespace extensions { |
20 class TestExtensionsBrowserClient; | 21 class TestExtensionsBrowserClient; |
21 | 22 |
22 // Base class for extensions module unit tests of browser process code. Sets up | 23 // Base class for extensions module unit tests of browser process code. Sets up |
23 // the content module and extensions module client interfaces. Initializes | 24 // the content module and extensions module client interfaces. Initializes |
24 // services for a browser context. | 25 // services for a browser context. |
25 // | 26 // |
26 // NOTE: Use this class only in extensions_unittests, not in Chrome unit_tests. | 27 // NOTE: Use this class only in extensions_unittests, not in Chrome unit_tests. |
(...skipping 15 matching lines...) Expand all Loading... | |
42 return extensions_browser_client_.get(); | 43 return extensions_browser_client_.get(); |
43 } | 44 } |
44 | 45 |
45 // testing::Test overrides: | 46 // testing::Test overrides: |
46 void SetUp() override; | 47 void SetUp() override; |
47 void TearDown() override; | 48 void TearDown() override; |
48 | 49 |
49 private: | 50 private: |
50 // TODO(yoz): Add a NotificationService here; it's used widely enough. | 51 // TODO(yoz): Add a NotificationService here; it's used widely enough. |
51 scoped_ptr<content::ContentClient> content_client_; | 52 scoped_ptr<content::ContentClient> content_client_; |
53 scoped_ptr<content::ContentUtilityClient> utility_content_client_; | |
Yoyo Zhou
2015/01/22 02:06:25
content_utility_client_
asargent_no_longer_on_chrome
2015/01/22 23:02:50
Done.
I also noticed I wasn't calling content::Se
| |
52 scoped_ptr<content::ContentBrowserClient> content_browser_client_; | 54 scoped_ptr<content::ContentBrowserClient> content_browser_client_; |
53 scoped_ptr<content::BrowserContext> browser_context_; | 55 scoped_ptr<content::BrowserContext> browser_context_; |
54 scoped_ptr<TestExtensionsBrowserClient> extensions_browser_client_; | 56 scoped_ptr<TestExtensionsBrowserClient> extensions_browser_client_; |
55 | 57 |
56 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); | 58 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); |
57 }; | 59 }; |
58 | 60 |
59 } // namespace extensions | 61 } // namespace extensions |
60 | 62 |
61 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ | 63 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ |
OLD | NEW |