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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 EXPECT_TRUE(new_browser->is_app()); 765 EXPECT_TRUE(new_browser->is_app());
766 766
767 // The browser's app name should include the extension's id. 767 // The browser's app name should include the extension's id.
768 std::string app_name = new_browser->app_name_; 768 std::string app_name = new_browser->app_name_;
769 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) 769 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos)
770 << "Name " << app_name << " should contain id "<< extension_app->id(); 770 << "Name " << app_name << " should contain id "<< extension_app->id();
771 } 771 }
772 #endif // !defined(OS_MACOSX) 772 #endif // !defined(OS_MACOSX)
773 773
774 // Makes sure the browser doesn't crash when 774 // Makes sure the browser doesn't crash when
775 // set_maximized_state(MAXIMIZED_STATE_MAXIMIZED) has been invoked. 775 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked.
776 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { 776 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) {
777 // Can't test TYPE_PANEL as they are currently created differently (and can't 777 // Can't test TYPE_PANEL as they are currently created differently (and can't
778 // end up maximized). 778 // end up maximized).
779 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; 779 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP };
780 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { 780 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) {
781 Browser* max_browser = new Browser(types[i], browser()->profile()); 781 Browser* max_browser = new Browser(types[i], browser()->profile());
782 max_browser->set_maximized_state(Browser::MAXIMIZED_STATE_MAXIMIZED); 782 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED);
783 max_browser->InitBrowserWindow(); 783 max_browser->InitBrowserWindow();
784 AddBlankTabAndShow(max_browser); 784 AddBlankTabAndShow(max_browser);
785 } 785 }
786 } 786 }
787 787
788 // TODO(ben): this test was never enabled. It has bit-rotted since being added. 788 // TODO(ben): this test was never enabled. It has bit-rotted since being added.
789 // It originally lived in browser_unittest.cc, but has been moved here to make 789 // It originally lived in browser_unittest.cc, but has been moved here to make
790 // room for real browser unit tests. 790 // room for real browser unit tests.
791 #if 0 791 #if 0
792 class BrowserTest2 : public InProcessBrowserTest { 792 class BrowserTest2 : public InProcessBrowserTest {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 // The normal browser should now have four. 863 // The normal browser should now have four.
864 EXPECT_EQ(4, browser()->tab_count()); 864 EXPECT_EQ(4, browser()->tab_count());
865 865
866 // Close the additional browsers. 866 // Close the additional browsers.
867 popup_browser->CloseAllTabs(); 867 popup_browser->CloseAllTabs();
868 app_browser->CloseAllTabs(); 868 app_browser->CloseAllTabs();
869 app_popup_browser->CloseAllTabs(); 869 app_popup_browser->CloseAllTabs();
870 } 870 }
871 #endif 871 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698