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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 EXPECT_EQ(++tab_count, tab_strip->count()); | 1097 EXPECT_EQ(++tab_count, tab_strip->count()); |
1098 // No longer active. | 1098 // No longer active. |
1099 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(shortcut_id)->status); | 1099 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(shortcut_id)->status); |
1100 | 1100 |
1101 // Activating app makes first tab active again. | 1101 // Activating app makes first tab active again. |
1102 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); | 1102 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); |
1103 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); | 1103 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); |
1104 EXPECT_EQ(tab_strip->GetActiveWebContents(), first_tab); | 1104 EXPECT_EQ(tab_strip->GetActiveWebContents(), first_tab); |
1105 } | 1105 } |
1106 | 1106 |
1107 IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, RefocusFilter) { | 1107 // crbug.com/303231 |
| 1108 IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, DISABLED_RefocusFilter) { |
1108 TabStripModel* tab_strip = browser()->tab_strip_model(); | 1109 TabStripModel* tab_strip = browser()->tab_strip_model(); |
1109 int tab_count = tab_strip->count(); | 1110 int tab_count = tab_strip->count(); |
1110 ash::LauncherID shortcut_id = CreateShortcut("app1"); | 1111 ash::LauncherID shortcut_id = CreateShortcut("app1"); |
1111 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); | 1112 ActivateLauncherItem(model_->ItemIndexByID(shortcut_id)); |
1112 EXPECT_EQ(++tab_count, tab_strip->count()); | 1113 EXPECT_EQ(++tab_count, tab_strip->count()); |
1113 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); | 1114 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(shortcut_id)->status); |
1114 WebContents* first_tab = tab_strip->GetActiveWebContents(); | 1115 WebContents* first_tab = tab_strip->GetActiveWebContents(); |
1115 | 1116 |
1116 controller_->SetRefocusURLPatternForTest( | 1117 controller_->SetRefocusURLPatternForTest( |
1117 shortcut_id, GURL("http://www.example.com/path1/*")); | 1118 shortcut_id, GURL("http://www.example.com/path1/*")); |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 // Now show overflow bubble. | 1846 // Now show overflow bubble. |
1846 test.ShowOverflowBubble(); | 1847 test.ShowOverflowBubble(); |
1847 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); | 1848 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); |
1848 | 1849 |
1849 // Unpin first pinned app and there should be no crash. | 1850 // Unpin first pinned app and there should be no crash. |
1850 controller_->UnpinAppWithID(std::string("fake_app_0")); | 1851 controller_->UnpinAppWithID(std::string("fake_app_0")); |
1851 | 1852 |
1852 test.RunMessageLoopUntilAnimationsDone(); | 1853 test.RunMessageLoopUntilAnimationsDone(); |
1853 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); | 1854 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); |
1854 } | 1855 } |
OLD | NEW |