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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_
6 #define CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
14 class MockRenderProcessHostFactory
;
15 class NotificationServiceImpl
;
16 class TestContentBrowserClient
;
17 class TestRenderViewHostFactory
;
19 // Initializes various objects needed to run unit tests that use content::
20 // objects. Currently this includes setting up the notification service,
21 // creating and setting the content client and the content browser client.
22 class TestContentClientInitializer
{
24 TestContentClientInitializer();
25 ~TestContentClientInitializer();
27 // Enables switching RenderViewHost creation to use the test version instead
28 // of the real implementation. This will last throughout the lifetime of this
30 void CreateTestRenderViewHosts();
33 scoped_ptr
<NotificationServiceImpl
> notification_service_
;
34 scoped_ptr
<ContentClient
> content_client_
;
35 scoped_ptr
<TestContentBrowserClient
> content_browser_client_
;
36 scoped_ptr
<MockRenderProcessHostFactory
> rph_factory_
;
37 scoped_ptr
<TestRenderViewHostFactory
> test_render_view_host_factory_
;
39 DISALLOW_COPY_AND_ASSIGN(TestContentClientInitializer
);
42 } // namespace content
44 #endif // CONTENT_PUBLIC_TEST_TEST_CONTENT_CLIENT_INITIALIZER_H_