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

Unified Diff: ash/test/ash_test_base.cc

Issue 2825533003: mash: Prerequisites for removing ShelfDelegate. (Closed)
Patch Set: Expand CheckWindowAndItemPlacement comment. Created 3 years, 8 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 | « ash/shelf/wm_shelf.cc ('k') | ash/test/test_shelf_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index ec5972b352b5a1427653f1357fe8f2feeaf072b4..bcea2a3477b27094e2a997e9e373a223519996b1 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -13,6 +13,7 @@
#include "ash/display/window_tree_host_manager.h"
#include "ash/ime/input_method_event_handler.h"
#include "ash/public/cpp/config.h"
+#include "ash/public/cpp/window_properties.h"
#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
@@ -284,6 +285,9 @@ aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType(
ui::mojom::kResizeBehaviorCanMaximize |
ui::mojom::kResizeBehaviorCanMinimize |
ui::mojom::kResizeBehaviorCanResize);
+ // Setting the item type triggers ShelfWindowWatcher to create a shelf item.
+ if (type == ui::wm::WINDOW_TYPE_PANEL)
+ window->SetProperty<int>(kShelfItemTypeKey, TYPE_APP_PANEL);
return window;
}
« no previous file with comments | « ash/shelf/wm_shelf.cc ('k') | ash/test/test_shelf_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698