OLD | NEW |
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 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 // end up maximized). | 1103 // end up maximized). |
1104 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; | 1104 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; |
1105 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { | 1105 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { |
1106 Browser* max_browser = new Browser(types[i], browser()->profile()); | 1106 Browser* max_browser = new Browser(types[i], browser()->profile()); |
1107 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED); | 1107 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED); |
1108 max_browser->InitBrowserWindow(); | 1108 max_browser->InitBrowserWindow(); |
1109 AddBlankTabAndShow(max_browser); | 1109 AddBlankTabAndShow(max_browser); |
1110 } | 1110 } |
1111 } | 1111 } |
1112 | 1112 |
| 1113 // Aura doesn't support minimized window. crbug.com/104571. |
| 1114 #if defined(USE_AURA) |
| 1115 #define MAYBE_StartMinimized DISABLED_StartMinimized |
| 1116 #else |
| 1117 #define MAYBE_StartMinimized StartMinimized |
| 1118 #endif |
1113 // Makes sure the browser doesn't crash when | 1119 // Makes sure the browser doesn't crash when |
1114 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked. | 1120 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked. |
1115 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMinimized) { | 1121 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) { |
1116 // Can't test TYPE_PANEL as they are currently created differently (and can't | 1122 // Can't test TYPE_PANEL as they are currently created differently (and can't |
1117 // end up minimized). | 1123 // end up minimized). |
1118 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; | 1124 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; |
1119 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { | 1125 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { |
1120 Browser* min_browser = new Browser(types[i], browser()->profile()); | 1126 Browser* min_browser = new Browser(types[i], browser()->profile()); |
1121 min_browser->set_show_state(ui::SHOW_STATE_MINIMIZED); | 1127 min_browser->set_show_state(ui::SHOW_STATE_MINIMIZED); |
1122 min_browser->InitBrowserWindow(); | 1128 min_browser->InitBrowserWindow(); |
1123 AddBlankTabAndShow(min_browser); | 1129 AddBlankTabAndShow(min_browser); |
1124 } | 1130 } |
1125 } | 1131 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1355 |
1350 // The normal browser should now have four. | 1356 // The normal browser should now have four. |
1351 EXPECT_EQ(4, browser()->tab_count()); | 1357 EXPECT_EQ(4, browser()->tab_count()); |
1352 | 1358 |
1353 // Close the additional browsers. | 1359 // Close the additional browsers. |
1354 popup_browser->CloseAllTabs(); | 1360 popup_browser->CloseAllTabs(); |
1355 app_browser->CloseAllTabs(); | 1361 app_browser->CloseAllTabs(); |
1356 app_popup_browser->CloseAllTabs(); | 1362 app_popup_browser->CloseAllTabs(); |
1357 } | 1363 } |
1358 #endif | 1364 #endif |
OLD | NEW |