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

Unified Diff: chrome/browser/chrome_browser_main_unittest.cc

Issue 8596015: Revert 110710 - Add ChromeBrowserMainExtraParts for non main parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.cc ('k') | chrome/browser/chrome_browser_parts_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_unittest.cc
diff --git a/chrome/browser/chrome_browser_main_unittest.cc b/chrome/browser/chrome_browser_main_unittest.cc
index f5c549b3223d9792964b88d6a627487f1ffe8d00..4a2f265a95cfecdb20f5571878aff535ac2c83d6 100644
--- a/chrome/browser/chrome_browser_main_unittest.cc
+++ b/chrome/browser/chrome_browser_main_unittest.cc
@@ -30,9 +30,12 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) {
scoped_ptr<content::MainFunctionParams> params(
new content::MainFunctionParams(command_line_));
- scoped_ptr<content::BrowserMainParts> bw(
- content::GetContentClient()->browser()->CreateBrowserMainParts(*params));
- ChromeBrowserMainParts* cbw = static_cast<ChromeBrowserMainParts*>(bw.get());
+ ScopedVector<content::BrowserMainParts> bwv;
+ content::GetContentClient()->browser()->CreateBrowserMainParts(
+ *params, &(bwv.get()));
+ ChromeBrowserMainParts* cbw = NULL;
+ if (bwv.size() >= 1)
+ cbw = static_cast<ChromeBrowserMainParts*>(bwv[0]);
EXPECT_TRUE(cbw);
if (cbw) {
cbw->WarmConnectionFieldTrial();
@@ -43,9 +46,12 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) {
TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Random) {
scoped_ptr<content::MainFunctionParams> params(
new content::MainFunctionParams(command_line_));
- scoped_ptr<content::BrowserMainParts> bw(
- content::GetContentClient()->browser()->CreateBrowserMainParts(*params));
- ChromeBrowserMainParts* cbw = static_cast<ChromeBrowserMainParts*>(bw.get());
+ ScopedVector<content::BrowserMainParts> bwv;
+ content::GetContentClient()->browser()->CreateBrowserMainParts(
+ *params, &(bwv.get()));
+ ChromeBrowserMainParts* cbw = NULL;
+ if (bwv.size() >= 1)
+ cbw = static_cast<ChromeBrowserMainParts*>(bwv[0]);
EXPECT_TRUE(cbw);
if (cbw) {
const int kNumRuns = 1000;
@@ -65,15 +71,17 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Invalid) {
new content::MainFunctionParams(command_line_));
// This test ends up launching a new process, and that doesn't initialize the
// ContentClient interfaces.
- scoped_ptr<content::BrowserMainParts> bw;
+ ScopedVector<content::BrowserMainParts> bwv;
if (content::GetContentClient()) {
- bw.reset(content::GetContentClient()->browser()->CreateBrowserMainParts(
- *params));
+ content::GetContentClient()->browser()->CreateBrowserMainParts(
+ *params, &(bwv.get()));
} else {
chrome::ChromeContentBrowserClient ccbc;
- bw.reset(ccbc.CreateBrowserMainParts(*params));
+ ccbc.CreateBrowserMainParts(*params, &(bwv.get()));
}
- ChromeBrowserMainParts* cbw = static_cast<ChromeBrowserMainParts*>(bw.get());
+ ChromeBrowserMainParts* cbw = NULL;
+ if (bwv.size() >= 1)
+ cbw = static_cast<ChromeBrowserMainParts*>(bwv[0]);
EXPECT_TRUE(cbw);
if (cbw) {
#if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON)
« no previous file with comments | « chrome/browser/chrome_browser_main_linux.cc ('k') | chrome/browser/chrome_browser_parts_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698