| 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_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ash/common/shelf/app_list_button.h" | 9 #include "ash/common/shelf/app_list_button.h" |
| 10 #include "ash/common/shelf/shelf_button.h" | 10 #include "ash/common/shelf/shelf_button.h" |
| (...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 | 2233 |
| 2234 test.RunMessageLoopUntilAnimationsDone(); | 2234 test.RunMessageLoopUntilAnimationsDone(); |
| 2235 EXPECT_FALSE(shelf_->shelf_widget()->IsShowingOverflowBubble()); | 2235 EXPECT_FALSE(shelf_->shelf_widget()->IsShowingOverflowBubble()); |
| 2236 } | 2236 } |
| 2237 | 2237 |
| 2238 // Check that a windowed V1 application can navigate away from its domain, but | 2238 // Check that a windowed V1 application can navigate away from its domain, but |
| 2239 // still gets detected properly. | 2239 // still gets detected properly. |
| 2240 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) { | 2240 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, V1AppNavigation) { |
| 2241 // We assume that the web store is always there (which it apparently is). | 2241 // We assume that the web store is always there (which it apparently is). |
| 2242 controller_->PinAppWithID(extensions::kWebStoreAppId); | 2242 controller_->PinAppWithID(extensions::kWebStoreAppId); |
| 2243 ash::ShelfID id = controller_->GetShelfIDForAppID( | 2243 ash::ShelfID id = controller_->GetShelfIDForAppID(extensions::kWebStoreAppId); |
| 2244 extensions::kWebStoreAppId); | 2244 DCHECK_NE(id, ash::kInvalidShelfID); |
| 2245 ASSERT_NE(0, id); | |
| 2246 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status); | 2245 EXPECT_EQ(ash::STATUS_CLOSED, model_->ItemByID(id)->status); |
| 2247 | 2246 |
| 2248 // Create a windowed application. | 2247 // Create a windowed application. |
| 2249 AppLaunchParams params = CreateAppLaunchParamsUserContainer( | 2248 AppLaunchParams params = CreateAppLaunchParamsUserContainer( |
| 2250 profile(), GetExtensionForAppID(extensions::kWebStoreAppId, profile()), | 2249 profile(), GetExtensionForAppID(extensions::kWebStoreAppId, profile()), |
| 2251 WindowOpenDisposition::NEW_FOREGROUND_TAB, extensions::SOURCE_TEST); | 2250 WindowOpenDisposition::NEW_FOREGROUND_TAB, extensions::SOURCE_TEST); |
| 2252 params.container = extensions::LAUNCH_CONTAINER_WINDOW; | 2251 params.container = extensions::LAUNCH_CONTAINER_WINDOW; |
| 2253 OpenApplication(params); | 2252 OpenApplication(params); |
| 2254 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status); | 2253 EXPECT_EQ(ash::STATUS_ACTIVE, model_->ItemByID(id)->status); |
| 2255 | 2254 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2416 | 2415 |
| 2417 // Close all windows via the menu item. | 2416 // Close all windows via the menu item. |
| 2418 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); | 2417 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); |
| 2419 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); | 2418 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); |
| 2420 | 2419 |
| 2421 // Check if "Close" is removed from the context menu. | 2420 // Check if "Close" is removed from the context menu. |
| 2422 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); | 2421 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); |
| 2423 ASSERT_FALSE( | 2422 ASSERT_FALSE( |
| 2424 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); | 2423 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); |
| 2425 } | 2424 } |
| OLD | NEW |