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 <memory> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "content/public/test/test_renderer_host.h" | 12 #include "content/public/test/test_renderer_host.h" |
12 #include "extensions/browser/mock_extension_system.h" | 13 #include "extensions/browser/mock_extension_system.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 class BrowserContext; | 17 class BrowserContext; |
17 class ContentBrowserClient; | 18 class ContentBrowserClient; |
18 class ContentClient; | 19 class ContentClient; |
19 class ContentUtilityClient; | 20 class ContentUtilityClient; |
20 class RenderViewHostTestEnabler; | 21 class RenderViewHostTestEnabler; |
(...skipping 24 matching lines...) Expand all Loading... |
45 TestExtensionsBrowserClient* extensions_browser_client() { | 46 TestExtensionsBrowserClient* extensions_browser_client() { |
46 return extensions_browser_client_.get(); | 47 return extensions_browser_client_.get(); |
47 } | 48 } |
48 | 49 |
49 // testing::Test overrides: | 50 // testing::Test overrides: |
50 void SetUp() override; | 51 void SetUp() override; |
51 void TearDown() override; | 52 void TearDown() override; |
52 | 53 |
53 private: | 54 private: |
54 // TODO(yoz): Add a NotificationService here; it's used widely enough. | 55 // TODO(yoz): Add a NotificationService here; it's used widely enough. |
55 scoped_ptr<content::ContentClient> content_client_; | 56 std::unique_ptr<content::ContentClient> content_client_; |
56 scoped_ptr<content::ContentUtilityClient> content_utility_client_; | 57 std::unique_ptr<content::ContentUtilityClient> content_utility_client_; |
57 scoped_ptr<content::ContentBrowserClient> content_browser_client_; | 58 std::unique_ptr<content::ContentBrowserClient> content_browser_client_; |
58 scoped_ptr<content::BrowserContext> browser_context_; | 59 std::unique_ptr<content::BrowserContext> browser_context_; |
59 scoped_ptr<TestExtensionsBrowserClient> extensions_browser_client_; | 60 std::unique_ptr<TestExtensionsBrowserClient> extensions_browser_client_; |
60 | 61 |
61 // The existence of this object enables tests via | 62 // The existence of this object enables tests via |
62 // RenderViewHostTester. | 63 // RenderViewHostTester. |
63 content::RenderViewHostTestEnabler rvh_test_enabler_; | 64 content::RenderViewHostTestEnabler rvh_test_enabler_; |
64 | 65 |
65 MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_; | 66 MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); | 68 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); |
68 }; | 69 }; |
69 | 70 |
70 } // namespace extensions | 71 } // namespace extensions |
71 | 72 |
72 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ | 73 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ |
OLD | NEW |