Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: content/test/test_content_client_initializer.cc

Issue 10826311: Move the corresponding cc files from content\test to be alongside their headers in content\public\t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/test/test_browser_thread.cc ('k') | content/test/test_file_error_injector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "content/public/test/test_content_client_initializer.h"
6
7 #include "content/browser/notification_service_impl.h"
8 #include "content/public/common/content_client.h"
9 #include "content/public/test/mock_render_process_host.h"
10 #include "content/test/test_content_browser_client.h"
11 #include "content/test/test_content_client.h"
12 #include "content/test/test_render_view_host_factory.h"
13
14 namespace content {
15
16 TestContentClientInitializer::TestContentClientInitializer() {
17 notification_service_.reset(new NotificationServiceImpl());
18
19 DCHECK(!GetContentClient());
20 content_client_.reset(new TestContentClient);
21 SetContentClient(content_client_.get());
22
23 content_browser_client_.reset(new TestContentBrowserClient());
24 content_client_->set_browser_for_testing(content_browser_client_.get());
25 }
26
27 TestContentClientInitializer::~TestContentClientInitializer() {
28 test_render_view_host_factory_.reset();
29 rph_factory_.reset();
30 notification_service_.reset();
31
32 DCHECK_EQ(content_client_.get(), GetContentClient());
33 SetContentClient(NULL);
34 content_client_.reset();
35
36 content_browser_client_.reset();
37 }
38
39 void TestContentClientInitializer::CreateTestRenderViewHosts() {
40 rph_factory_.reset(new content::MockRenderProcessHostFactory());
41 test_render_view_host_factory_.reset(
42 new content::TestRenderViewHostFactory(rph_factory_.get()));
43 }
44
45 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_browser_thread.cc ('k') | content/test/test_file_error_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698