diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 21:15:46 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 21:15:46 +0000 |
commit | 7b35be2ef7cdf7f52805f70464a269d8ac995385 (patch) | |
tree | 5c41c66579f72c6ec79dd78e3ab2ce1a31f8239f /chrome/browser/chrome_browser_main_unittest.cc | |
parent | 3727e08519cb1d6329378d94307eec23ae506471 (diff) | |
download | chromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.zip chromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.tar.gz chromium_src-7b35be2ef7cdf7f52805f70464a269d8ac995385.tar.bz2 |
Revert 110327 - Add ChromeBrowserParts for non main parts.
This reverts the code back to a single instance of BrowserMainParts, with auxillary parts (Gtk, Views, Aura, Touch) implemented from a new base class, ChromeBrowserParts, which has a Chrome specific interface, allowing initialization to be better subdivided.
This should fix the notifications auto tests.
BUG=103821
TEST=Make sure all tests and autotests run
Review URL: http://codereview.chromium.org/8539038
TBR=stevenjb@google.com
Review URL: http://codereview.chromium.org/8488015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main_unittest.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main_unittest.cc | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/chrome/browser/chrome_browser_main_unittest.cc b/chrome/browser/chrome_browser_main_unittest.cc index f5c549b..4a2f265 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) |