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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_controller_unittest.mm (revision 148382)
+++ chrome/browser/ui/cocoa/browser_window_controller_unittest.mm (working copy)
@@ -121,7 +121,7 @@
// And make sure a controller for a pop-up window is not normal.
// popup_browser will be owned by its window.
- Browser* popup_browser(Browser::CreateWithParams(
+ Browser* popup_browser(new Browser(
Browser::CreateParams(Browser::TYPE_POPUP, profile())));
NSWindow *cocoaWindow = popup_browser->window()->GetNativeWindow();
BrowserWindowController* controller =
@@ -138,7 +138,7 @@
// Create a normal browser with bounds smaller than the minimum.
Browser::CreateParams params(Browser::TYPE_TABBED, profile());
params.initial_bounds = gfx::Rect(0, 0, 50, 50);
- Browser* browser = Browser::CreateWithParams(params);
+ Browser* browser = new Browser(params);
NSWindow *cocoaWindow = browser->window()->GetNativeWindow();
BrowserWindowController* controller =
static_cast<BrowserWindowController*>([cocoaWindow windowController]);
@@ -163,7 +163,7 @@
// Create a popup with bounds smaller than the minimum.
Browser::CreateParams params(Browser::TYPE_POPUP, profile());
params.initial_bounds = gfx::Rect(0, 0, 50, 50);
- Browser* browser = Browser::CreateWithParams(params);
+ Browser* browser = new Browser(params);
NSWindow *cocoaWindow = browser->window()->GetNativeWindow();
BrowserWindowController* controller =
static_cast<BrowserWindowController*>([cocoaWindow windowController]);
@@ -206,8 +206,8 @@
TEST_F(BrowserWindowControllerTest, TestIncognitoWidthSpace) {
scoped_ptr<TestingProfile> incognito_profile(new TestingProfile());
incognito_profile->set_off_the_record(true);
- scoped_ptr<Browser> browser(new Browser(Browser::TYPE_TABBED,
- incognito_profile.get()));
+ scoped_ptr<Browser> browser(
+ new Browser(Browser::CreateParams(incognito_profile.get()));
controller_.reset([[BrowserWindowController alloc]
initWithBrowser:browser.get()
takeOwnership:NO]);
@@ -675,7 +675,6 @@
}
TEST_F(BrowserWindowFullScreenControllerTest, TestFullscreen) {
- CreateBrowserWindow();
[controller_ showWindow:nil];
EXPECT_FALSE([controller_ isFullscreen]);
@@ -694,7 +693,6 @@
// please do not mark it as flaky without first verifying that there are no bot
// problems.
TEST_F(BrowserWindowFullScreenControllerTest, TestActivate) {
- CreateBrowserWindow();
[controller_ showWindow:nil];
EXPECT_FALSE([controller_ isFullscreen]);
« no previous file with comments | « chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm ('k') | chrome/browser/ui/cocoa/cocoa_profile_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698