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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #if defined(OS_MACOSX) | 10 #if defined(OS_MACOSX) |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) | 1085 EXPECT_NE(app_name.find(extension_app->id()), std::string::npos) |
1086 << "Name " << app_name << " should contain id "<< extension_app->id(); | 1086 << "Name " << app_name << " should contain id "<< extension_app->id(); |
1087 } | 1087 } |
1088 #endif // !defined(OS_MACOSX) | 1088 #endif // !defined(OS_MACOSX) |
1089 | 1089 |
1090 // Makes sure the browser doesn't crash when | 1090 // Makes sure the browser doesn't crash when |
1091 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked. | 1091 // set_show_state(ui::SHOW_STATE_MAXIMIZED) has been invoked. |
1092 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { | 1092 IN_PROC_BROWSER_TEST_F(BrowserTest, StartMaximized) { |
1093 // Can't test TYPE_PANEL as they are currently created differently (and can't | 1093 // Can't test TYPE_PANEL as they are currently created differently (and can't |
1094 // end up maximized). | 1094 // end up maximized). |
1095 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; | 1095 Browser::Type types[] = |
| 1096 { Browser::TYPE_TABBED, Browser::TYPE_POPUP, Browser::TYPE_SHELL }; |
1096 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { | 1097 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { |
1097 Browser* max_browser = new Browser(types[i], browser()->profile()); | 1098 Browser* max_browser = new Browser(types[i], browser()->profile()); |
1098 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED); | 1099 max_browser->set_show_state(ui::SHOW_STATE_MAXIMIZED); |
1099 max_browser->InitBrowserWindow(); | 1100 max_browser->InitBrowserWindow(); |
1100 AddBlankTabAndShow(max_browser); | 1101 AddBlankTabAndShow(max_browser); |
1101 } | 1102 } |
1102 } | 1103 } |
1103 | 1104 |
1104 // Aura doesn't support minimized window. crbug.com/104571. | 1105 // Aura doesn't support minimized window. crbug.com/104571. |
1105 #if defined(USE_AURA) | 1106 #if defined(USE_AURA) |
1106 #define MAYBE_StartMinimized DISABLED_StartMinimized | 1107 #define MAYBE_StartMinimized DISABLED_StartMinimized |
1107 #else | 1108 #else |
1108 #define MAYBE_StartMinimized StartMinimized | 1109 #define MAYBE_StartMinimized StartMinimized |
1109 #endif | 1110 #endif |
1110 // Makes sure the browser doesn't crash when | 1111 // Makes sure the browser doesn't crash when |
1111 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked. | 1112 // set_show_state(ui::SHOW_STATE_MINIMIZED) has been invoked. |
1112 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) { | 1113 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_StartMinimized) { |
1113 // Can't test TYPE_PANEL as they are currently created differently (and can't | 1114 // Can't test TYPE_PANEL as they are currently created differently (and can't |
1114 // end up minimized). | 1115 // end up minimized). |
1115 Browser::Type types[] = { Browser::TYPE_TABBED, Browser::TYPE_POPUP }; | 1116 Browser::Type types[] = |
| 1117 { Browser::TYPE_TABBED, Browser::TYPE_POPUP, Browser::TYPE_SHELL }; |
1116 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { | 1118 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(types); ++i) { |
1117 Browser* min_browser = new Browser(types[i], browser()->profile()); | 1119 Browser* min_browser = new Browser(types[i], browser()->profile()); |
1118 min_browser->set_show_state(ui::SHOW_STATE_MINIMIZED); | 1120 min_browser->set_show_state(ui::SHOW_STATE_MINIMIZED); |
1119 min_browser->InitBrowserWindow(); | 1121 min_browser->InitBrowserWindow(); |
1120 AddBlankTabAndShow(min_browser); | 1122 AddBlankTabAndShow(min_browser); |
1121 } | 1123 } |
1122 } | 1124 } |
1123 | 1125 |
1124 // Makes sure the forward button is disabled immediately when navigating | 1126 // Makes sure the forward button is disabled immediately when navigating |
1125 // forward to a slow-to-commit page. | 1127 // forward to a slow-to-commit page. |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 | 1392 |
1391 // The normal browser should now have four. | 1393 // The normal browser should now have four. |
1392 EXPECT_EQ(4, browser()->tab_count()); | 1394 EXPECT_EQ(4, browser()->tab_count()); |
1393 | 1395 |
1394 // Close the additional browsers. | 1396 // Close the additional browsers. |
1395 popup_browser->CloseAllTabs(); | 1397 popup_browser->CloseAllTabs(); |
1396 app_browser->CloseAllTabs(); | 1398 app_browser->CloseAllTabs(); |
1397 app_popup_browser->CloseAllTabs(); | 1399 app_popup_browser->CloseAllTabs(); |
1398 } | 1400 } |
1399 #endif | 1401 #endif |
OLD | NEW |