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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/public/cpp/shelf_item_delegate.h" | 9 #include "ash/public/cpp/shelf_item_delegate.h" |
10 #include "ash/public/cpp/window_properties.h" | 10 #include "ash/public/cpp/window_properties.h" |
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 | 2495 |
2496 // Close all windows via the menu item. | 2496 // Close all windows via the menu item. |
2497 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); | 2497 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); |
2498 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); | 2498 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); |
2499 | 2499 |
2500 // Check if "Close" is removed from the context menu. | 2500 // Check if "Close" is removed from the context menu. |
2501 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); | 2501 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); |
2502 ASSERT_FALSE( | 2502 ASSERT_FALSE( |
2503 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); | 2503 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); |
2504 } | 2504 } |
| 2505 |
| 2506 // Chrome's ShelfModel should have AppList and browser items and delegates. |
| 2507 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, ShelfModelInitialization) { |
| 2508 ash::ShelfModel* model = controller_->shelf_model(); |
| 2509 EXPECT_EQ(2, model->item_count()); |
| 2510 EXPECT_EQ(ash::kAppListId, model->items()[0].id.app_id); |
| 2511 EXPECT_TRUE(model->GetShelfItemDelegate(model->items()[0].id)); |
| 2512 EXPECT_EQ(extension_misc::kChromeAppId, model->items()[1].id.app_id); |
| 2513 EXPECT_TRUE(model->GetShelfItemDelegate(model->items()[1].id)); |
| 2514 } |
OLD | NEW |