Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Address comments; fix test failures. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698