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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 973584801998d7d547b85e206fd1520d03bdc6f5..61b20204aa2f6f2d6270b54e510e3e12825afcd6 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -974,6 +974,20 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
}
}
+// Makes sure the browser doesn't crash when
+// set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked.
+IN_PROC_BROWSER_TEST_F(BrowserTest, StartMinimized) {
+ // Can't test TYPE_PANEL as they are currently created differently (and can't
+ // end up minimized).
+ Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) {
+ Browser* min_browser = new Browser(types[i], browser()->profile());
+ min_browser->set_show_state(ui::SHOW_STATE_MINIMIZED);
+ min_browser->InitBrowserWindow();
+ AddBlankTabAndShow(min_browser);
+ }
+}
+
// TODO(ben): this test was never enabled. It has bit-rotted since being added.
// It originally lived in browser_unittest.cc, but has been moved here to make
// room for real browser unit tests.
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698