OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
8 #include "apps/shell_window.h" | 8 #include "apps/shell_window.h" |
9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 TabStripModel::ADD_ACTIVE); | 1062 TabStripModel::ADD_ACTIVE); |
1063 EXPECT_EQ(1, tab_strip_model1->count()); | 1063 EXPECT_EQ(1, tab_strip_model1->count()); |
1064 EXPECT_EQ(2, tab_strip_model2->count()); | 1064 EXPECT_EQ(2, tab_strip_model2->count()); |
1065 EXPECT_EQ(ash::STATUS_RUNNING, model_->items()[browser_index].status); | 1065 EXPECT_EQ(ash::STATUS_RUNNING, model_->items()[browser_index].status); |
1066 EXPECT_EQ(ash::STATUS_ACTIVE, (*model_->ItemByID(shortcut_id)).status); | 1066 EXPECT_EQ(ash::STATUS_ACTIVE, (*model_->ItemByID(shortcut_id)).status); |
1067 | 1067 |
1068 tab_strip_model1->CloseAllTabs(); | 1068 tab_strip_model1->CloseAllTabs(); |
1069 tab_strip_model2->CloseAllTabs(); | 1069 tab_strip_model2->CloseAllTabs(); |
1070 } | 1070 } |
1071 | 1071 |
1072 IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, MultipleOwnedTabs) { | 1072 // Flaky test. crbug.com/303231 |
| 1073 IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, DISABLED_MultipleOwnedTabs) { |
1073 TabStripModel* tab_strip = browser()->tab_strip_model(); | 1074 TabStripModel* tab_strip = browser()->tab_strip_model(); |
1074 int tab_count = tab_strip->count(); | 1075 int tab_count = tab_strip->count(); |
1075 ash::LauncherID shortcut_id = CreateShortcut("app1"); | 1076 ash::LauncherID shortcut_id = CreateShortcut("app1"); |
1076 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); | 1077 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); |
1077 EXPECT_EQ(++tab_count, tab_strip->count()); | 1078 EXPECT_EQ(++tab_count, tab_strip->count()); |
1078 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); | 1079 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); |
1079 WebContents* first_tab = tab_strip->GetActiveWebContents(); | 1080 WebContents* first_tab = tab_strip->GetActiveWebContents(); |
1080 | 1081 |
1081 // Create new tab owned by app. | 1082 // Create new tab owned by app. |
1082 ui_test_utils::NavigateToURLWithDisposition( | 1083 ui_test_utils::NavigateToURLWithDisposition( |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 // Now show overflow bubble. | 1847 // Now show overflow bubble. |
1847 test.ShowOverflowBubble(); | 1848 test.ShowOverflowBubble(); |
1848 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); | 1849 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); |
1849 | 1850 |
1850 // Unpin first pinned app and there should be no crash. | 1851 // Unpin first pinned app and there should be no crash. |
1851 controller_->UnpinAppWithID(std::string("fake_app_0")); | 1852 controller_->UnpinAppWithID(std::string("fake_app_0")); |
1852 | 1853 |
1853 test.RunMessageLoopUntilAnimationsDone(); | 1854 test.RunMessageLoopUntilAnimationsDone(); |
1854 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); | 1855 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); |
1855 } | 1856 } |
OLD | NEW |