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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc

Issue 1812013003: Pass shelf instances, not root windows, for ash context menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call OnShelfAlignmentChanged after LayoutShelf. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
index 87e1dc115cbaaf4143790f5b1ba516ea19ca3741..f41ae2451cf1b39caea98dae5ff34614518d398e 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
@@ -18,33 +18,21 @@
#include "components/prefs/pref_service.h"
#include "ui/aura/window_event_dispatcher.h"
-class TestChromeLauncherController : public ChromeLauncherController {
- public:
- TestChromeLauncherController(Profile* profile, ash::ShelfModel* model)
- : ChromeLauncherController(profile, model) {}
- bool IsLoggedInAsGuest() override { return false; }
- private:
- DISALLOW_COPY_AND_ASSIGN(TestChromeLauncherController);
-};
-
class LauncherContextMenuTest : public ash::test::AshTestBase {
protected:
static bool IsItemPresentInMenu(LauncherContextMenu* menu, int command_id) {
- DCHECK(menu);
return menu->GetIndexOfCommandId(command_id) != -1;
}
- LauncherContextMenuTest()
- : profile_(new TestingProfile()) {}
+ LauncherContextMenuTest() : profile_(new TestingProfile()) {}
void SetUp() override {
ash::test::AshTestBase::SetUp();
- controller_.reset(
- new TestChromeLauncherController(profile(), &shelf_model_));
+ controller_.reset(new ChromeLauncherController(profile(), &shelf_model_));
}
void TearDown() override {
- controller_.reset(NULL);
+ controller_.reset(nullptr);
ash::test::AshTestBase::TearDown();
}
@@ -53,7 +41,8 @@ class LauncherContextMenuTest : public ash::test::AshTestBase {
ash::ShelfItem item;
item.id = 1; // dummy id
item.type = shelf_item_type;
- return new LauncherContextMenu(controller_.get(), &item, CurrentContext());
+ ash::Shelf* shelf = ash::Shelf::ForWindow(CurrentContext());
+ return new LauncherContextMenu(controller_.get(), &item, shelf);
}
Profile* profile() { return profile_.get(); }
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698