| 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 "content/public/test/test_renderer_host.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class BrowserContext; | 15 class BrowserContext; |
| 15 class ContentBrowserClient; | 16 class ContentBrowserClient; |
| 16 class ContentClient; | 17 class ContentClient; |
| 17 class ContentUtilityClient; | 18 class ContentUtilityClient; |
| 19 class RenderViewHostTestEnabler; |
| 18 } | 20 } |
| 19 | 21 |
| 20 namespace extensions { | 22 namespace extensions { |
| 21 class TestExtensionsBrowserClient; | 23 class TestExtensionsBrowserClient; |
| 22 | 24 |
| 23 // Base class for extensions module unit tests of browser process code. Sets up | 25 // Base class for extensions module unit tests of browser process code. Sets up |
| 24 // the content module and extensions module client interfaces. Initializes | 26 // the content module and extensions module client interfaces. Initializes |
| 25 // services for a browser context. | 27 // services for a browser context. |
| 26 // | 28 // |
| 27 // NOTE: Use this class only in extensions_unittests, not in Chrome unit_tests. | 29 // NOTE: Use this class only in extensions_unittests, not in Chrome unit_tests. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 48 void TearDown() override; | 50 void TearDown() override; |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 // TODO(yoz): Add a NotificationService here; it's used widely enough. | 53 // TODO(yoz): Add a NotificationService here; it's used widely enough. |
| 52 scoped_ptr<content::ContentClient> content_client_; | 54 scoped_ptr<content::ContentClient> content_client_; |
| 53 scoped_ptr<content::ContentUtilityClient> content_utility_client_; | 55 scoped_ptr<content::ContentUtilityClient> content_utility_client_; |
| 54 scoped_ptr<content::ContentBrowserClient> content_browser_client_; | 56 scoped_ptr<content::ContentBrowserClient> content_browser_client_; |
| 55 scoped_ptr<content::BrowserContext> browser_context_; | 57 scoped_ptr<content::BrowserContext> browser_context_; |
| 56 scoped_ptr<TestExtensionsBrowserClient> extensions_browser_client_; | 58 scoped_ptr<TestExtensionsBrowserClient> extensions_browser_client_; |
| 57 | 59 |
| 60 // The existence of this object enables tests via |
| 61 // RenderViewHostTester. |
| 62 content::RenderViewHostTestEnabler rvh_test_enabler_; |
| 63 |
| 58 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); | 64 DISALLOW_COPY_AND_ASSIGN(ExtensionsTest); |
| 59 }; | 65 }; |
| 60 | 66 |
| 61 } // namespace extensions | 67 } // namespace extensions |
| 62 | 68 |
| 63 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ | 69 #endif // EXTENSIONS_BROWSER_EXTENSIONS_TEST_H_ |
| OLD | NEW |