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

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

Issue 151135: Pop-up chrome.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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/cocoa/browser_window_controller_unittest.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller_unittest.mm (revision 19669)
+++ chrome/browser/cocoa/browser_window_controller_unittest.mm (working copy)
@@ -77,4 +77,22 @@
EXPECT_TRUE([controller_ fullscreenWindow]);
}
+TEST_F(BrowserWindowControllerTest, TestNormal) {
+ // Make sure a normal BrowserWindowController is, uh, normal.
+ EXPECT_TRUE([controller_ isNormalWindow]);
+
+ // And make sure a controller for a pop-up window is not normal.
+ scoped_ptr<Browser> popup_browser(Browser::CreateForPopup(
+ browser_helper_.profile()));
+ controller_.reset([[BrowserWindowController alloc]
+ initWithBrowser:popup_browser.get()
+ takeOwnership:NO]);
+ EXPECT_FALSE([controller_ isNormalWindow]);
+
+ // The created BrowserWindowController gets autoreleased, so make
+ // sure we don't also release it.
+ // (Confirmed with valgrind).
+ controller_.release();
pink (ping after 24hrs) 2009/07/01 12:53:00 why is this necessary? won't it do that when the t
John Grabowski 2009/07/02 20:28:25 Somehow the controller gets autoreleased. I can c
+}
+
/* TODO(???): test other methods of BrowserWindowController */

Powered by Google App Engine
This is Rietveld 408576698