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

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

Issue 7621061: Restoring a session should restore window minimization state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Mark's comments. Created 9 years, 4 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
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
index 0bd06205bc88039ef892158d1121246173e4ba08..533b9a4cf467ce06efc08d70dc8bd505381f96d1 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -7,6 +7,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/sync/sync_ui_util.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/cocoa/browser_test_helper.h"
#include "chrome/browser/ui/cocoa/browser_window_controller.h"
@@ -19,7 +20,7 @@
@interface BrowserWindowController (JustForTesting)
// Already defined in BWC.
-- (void)saveWindowPositionToPrefs:(PrefService*)prefs;
+- (void)saveWindowPositionIfNeeded;
- (void)layoutSubviews;
@end
@@ -92,7 +93,8 @@ TEST_F(BrowserWindowControllerTest, TestSaveWindowPosition) {
// Ask the window to save its position, then check that a preference
// exists.
- [controller_ saveWindowPositionToPrefs:prefs];
+ BrowserList::SetLastActive(browser_helper_.browser());
+ [controller_ saveWindowPositionIfNeeded];
browser_window_placement =
prefs->GetDictionary(prefs::kBrowserWindowPlacement);
ASSERT_TRUE(browser_window_placement);
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698