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

Side by Side Diff: chrome/test/base/in_process_browser_test.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 | « chrome/test/base/chrome_test_suite.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "chrome/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 << "Could not create user data directory."; 111 << "Could not create user data directory.";
112 112
113 // Allow subclasses the opportunity to make changes to the default user data 113 // Allow subclasses the opportunity to make changes to the default user data
114 // dir before running any tests. 114 // dir before running any tests.
115 ASSERT_TRUE(SetUpUserDataDirectory()) 115 ASSERT_TRUE(SetUpUserDataDirectory())
116 << "Could not set up user data directory."; 116 << "Could not set up user data directory.";
117 117
118 // Single-process mode is not set in BrowserMain, so process it explicitly, 118 // Single-process mode is not set in BrowserMain, so process it explicitly,
119 // and set up renderer. 119 // and set up renderer.
120 if (command_line->HasSwitch(switches::kSingleProcess)) { 120 if (command_line->HasSwitch(switches::kSingleProcess)) {
121 content::GetContentClient()->set_renderer_for_testing( 121 content::SetRendererClientForTesting(
122 &g_chrome_content_renderer_client.Get()); 122 &g_chrome_content_renderer_client.Get());
123 } 123 }
124 124
125 #if defined(OS_CHROMEOS) 125 #if defined(OS_CHROMEOS)
126 // Make sure that the log directory exists. 126 // Make sure that the log directory exists.
127 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); 127 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName();
128 file_util::CreateDirectory(log_dir); 128 file_util::CreateDirectory(log_dir);
129 #endif // defined(OS_CHROMEOS) 129 #endif // defined(OS_CHROMEOS)
130 130
131 host_resolver_ = new net::RuleBasedHostResolverProc(NULL); 131 host_resolver_ = new net::RuleBasedHostResolverProc(NULL);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // On the Mac, this eventually reaches 393 // On the Mac, this eventually reaches
394 // -[BrowserWindowController windowWillClose:], which will post a deferred 394 // -[BrowserWindowController windowWillClose:], which will post a deferred
395 // -autorelease on itself to ultimately destroy the Browser object. The line 395 // -autorelease on itself to ultimately destroy the Browser object. The line
396 // below is necessary to pump these pending messages to ensure all Browsers 396 // below is necessary to pump these pending messages to ensure all Browsers
397 // get deleted. 397 // get deleted.
398 content::RunAllPendingInMessageLoop(); 398 content::RunAllPendingInMessageLoop();
399 delete autorelease_pool_; 399 delete autorelease_pool_;
400 autorelease_pool_ = NULL; 400 autorelease_pool_ = NULL;
401 #endif 401 #endif
402 } 402 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_test_suite.cc ('k') | chrome_frame/test/net/fake_external_tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698