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

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

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)
Patch Set: Fix struct traits typo. Created 3 years, 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/launcher_context_menu.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/public/cpp/shelf_item.h" 9 #include "ash/public/cpp/shelf_item.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 ash::RootWindowController* root_window_controller = 83 ash::RootWindowController* root_window_controller =
84 ash::Shell::GetRootWindowControllerWithDisplayId(display_id); 84 ash::Shell::GetRootWindowControllerWithDisplayId(display_id);
85 EXPECT_NE(nullptr, root_window_controller); 85 EXPECT_NE(nullptr, root_window_controller);
86 return root_window_controller->GetShelf(); 86 return root_window_controller->GetShelf();
87 } 87 }
88 88
89 LauncherContextMenu* CreateLauncherContextMenu( 89 LauncherContextMenu* CreateLauncherContextMenu(
90 ash::ShelfItemType shelf_item_type, 90 ash::ShelfItemType shelf_item_type,
91 ash::WmShelf* wm_shelf) { 91 ash::WmShelf* wm_shelf) {
92 ash::ShelfItem item; 92 ash::ShelfItem item;
93 item.id = 123; // dummy id 93 item.id = ash::ShelfID("dummy id");
94 item.type = shelf_item_type; 94 item.type = shelf_item_type;
95 return LauncherContextMenu::Create(controller(), &item, wm_shelf); 95 return LauncherContextMenu::Create(controller(), &item, wm_shelf);
96 } 96 }
97 97
98 LauncherContextMenu* CreateLauncherContextMenuForDesktopShell( 98 LauncherContextMenu* CreateLauncherContextMenuForDesktopShell(
99 ash::WmShelf* wm_shelf) { 99 ash::WmShelf* wm_shelf) {
100 return LauncherContextMenu::Create(controller(), nullptr, wm_shelf); 100 return LauncherContextMenu::Create(controller(), nullptr, wm_shelf);
101 } 101 }
102 102
103 // Creates app window and set optional ARC application id. 103 // Creates app window and set optional ARC application id.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ash::TYPE_BROWSER_SHORTCUT, GetWmShelf(primary_id))); 327 ash::TYPE_BROWSER_SHORTCUT, GetWmShelf(primary_id)));
328 std::unique_ptr<LauncherContextMenu> secondary_menu(CreateLauncherContextMenu( 328 std::unique_ptr<LauncherContextMenu> secondary_menu(CreateLauncherContextMenu(
329 ash::TYPE_BROWSER_SHORTCUT, GetWmShelf(secondary_id))); 329 ash::TYPE_BROWSER_SHORTCUT, GetWmShelf(secondary_id)));
330 EXPECT_FALSE(IsItemPresentInMenu(primary_menu.get(), 330 EXPECT_FALSE(IsItemPresentInMenu(primary_menu.get(),
331 LauncherContextMenu::MENU_AUTO_HIDE)); 331 LauncherContextMenu::MENU_AUTO_HIDE));
332 EXPECT_TRUE(IsItemPresentInMenu(secondary_menu.get(), 332 EXPECT_TRUE(IsItemPresentInMenu(secondary_menu.get(),
333 LauncherContextMenu::MENU_AUTO_HIDE)); 333 LauncherContextMenu::MENU_AUTO_HIDE));
334 } 334 }
335 335
336 } // namespace 336 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/ash/launcher/launcher_controller_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698