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

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

Issue 2480713003: Window prerequisites for ShelfWindowWatcher panel support. (Closed)
Patch Set: Support and test pre-widget exo ShellSurface::SetApplicationId. Created 4 years, 1 month 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 "ash/common/shelf/shelf_item_types.h" 7 #include "ash/common/shelf/shelf_item_types.h"
8 #include "ash/common/wm_root_window_controller.h" 8 #include "ash/common/wm_root_window_controller.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 // Creates app window and set optional Arc application id. 70 // Creates app window and set optional Arc application id.
71 views::Widget* CreateArcWindow(std::string& window_app_id) { 71 views::Widget* CreateArcWindow(std::string& window_app_id) {
72 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); 72 views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
73 views::Widget* widget = new views::Widget(); 73 views::Widget* widget = new views::Widget();
74 widget->Init(params); 74 widget->Init(params);
75 widget->Show(); 75 widget->Show();
76 widget->Activate(); 76 widget->Activate();
77 exo::ShellSurface::SetApplicationId(widget->GetNativeWindow(), 77 exo::ShellSurface::SetApplicationId(widget->GetNativeWindow(),
78 &window_app_id); 78 window_app_id);
79 return widget; 79 return widget;
80 } 80 }
81 81
82 ArcAppTest& arc_test() { return arc_test_; } 82 ArcAppTest& arc_test() { return arc_test_; }
83 83
84 Profile* profile() { return profile_.get(); } 84 Profile* profile() { return profile_.get(); }
85 85
86 ChromeLauncherControllerImpl* controller() { return controller_.get(); } 86 ChromeLauncherControllerImpl* controller() { return controller_.get(); }
87 87
88 private: 88 private:
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 item.id = controller()->GetShelfIDForAppID(app_id2); 229 item.id = controller()->GetShelfIDForAppID(app_id2);
230 ASSERT_TRUE(item.id); 230 ASSERT_TRUE(item.id);
231 menu.reset(new ArcLauncherContextMenu(controller(), &item, wm_shelf)); 231 menu.reset(new ArcLauncherContextMenu(controller(), &item, wm_shelf));
232 232
233 EXPECT_FALSE( 233 EXPECT_FALSE(
234 IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_OPEN_NEW)); 234 IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_OPEN_NEW));
235 EXPECT_FALSE(IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_PIN)); 235 EXPECT_FALSE(IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_PIN));
236 EXPECT_TRUE(IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_CLOSE)); 236 EXPECT_TRUE(IsItemPresentInMenu(menu.get(), LauncherContextMenu::MENU_CLOSE));
237 EXPECT_TRUE(menu->IsCommandIdEnabled(LauncherContextMenu::MENU_CLOSE)); 237 EXPECT_TRUE(menu->IsCommandIdEnabled(LauncherContextMenu::MENU_CLOSE));
238 } 238 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc ('k') | components/exo/shell_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698