| 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/app_window.h" | 7 #include "apps/app_window.h" |
| 8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 ash_browser_list->begin_last_active(); | 1583 ash_browser_list->begin_last_active(); |
| 1584 EXPECT_EQ(*it, browser()); | 1584 EXPECT_EQ(*it, browser()); |
| 1585 ++it; | 1585 ++it; |
| 1586 EXPECT_EQ(it, ash_browser_list->end_last_active()); | 1586 EXPECT_EQ(it, ash_browser_list->end_last_active()); |
| 1587 | 1587 |
| 1588 // Now request to either activate an existing app or create a new one. | 1588 // Now request to either activate an existing app or create a new one. |
| 1589 LauncherItemController* item_controller = | 1589 LauncherItemController* item_controller = |
| 1590 controller_->GetLauncherItemController(shortcut_id); | 1590 controller_->GetLauncherItemController(shortcut_id); |
| 1591 item_controller->ItemSelected(ui::KeyEvent(ui::ET_KEY_RELEASED, | 1591 item_controller->ItemSelected(ui::KeyEvent(ui::ET_KEY_RELEASED, |
| 1592 ui::VKEY_RETURN, | 1592 ui::VKEY_RETURN, |
| 1593 0, | 1593 ui::EF_NONE)); |
| 1594 false)); | |
| 1595 | 1594 |
| 1596 // Check that we have set focus on the existing application and nothing new | 1595 // Check that we have set focus on the existing application and nothing new |
| 1597 // was created. | 1596 // was created. |
| 1598 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); | 1597 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); |
| 1599 EXPECT_EQ(tab_count1, tab_strip->count()); | 1598 EXPECT_EQ(tab_count1, tab_strip->count()); |
| 1600 EXPECT_EQ(tab_count2, tab_strip2->count()); | 1599 EXPECT_EQ(tab_count2, tab_strip2->count()); |
| 1601 EXPECT_EQ(chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()), | 1600 EXPECT_EQ(chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()), |
| 1602 browser2); | 1601 browser2); |
| 1603 } | 1602 } |
| 1604 | 1603 |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 chrome::GetSettingsUrl(std::string())); | 2125 chrome::GetSettingsUrl(std::string())); |
| 2127 Browser* settings_browser = | 2126 Browser* settings_browser = |
| 2128 settings_manager->FindBrowserForProfile(browser()->profile()); | 2127 settings_manager->FindBrowserForProfile(browser()->profile()); |
| 2129 ASSERT_TRUE(settings_browser); | 2128 ASSERT_TRUE(settings_browser); |
| 2130 EXPECT_EQ(browser_count, NumberOfDetectedLauncherBrowsers(false)); | 2129 EXPECT_EQ(browser_count, NumberOfDetectedLauncherBrowsers(false)); |
| 2131 EXPECT_EQ(item_count + 1, shelf_model->item_count()); | 2130 EXPECT_EQ(item_count + 1, shelf_model->item_count()); |
| 2132 | 2131 |
| 2133 // TODO(stevenjb): Test multiprofile on Chrome OS when test support is addded. | 2132 // TODO(stevenjb): Test multiprofile on Chrome OS when test support is addded. |
| 2134 // crbug.com/230464. | 2133 // crbug.com/230464. |
| 2135 } | 2134 } |
| OLD | NEW |