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

Unified Diff: ash/test/ash_test_base.cc

Issue 2825533003: mash: Prerequisites for removing ShelfDelegate. (Closed)
Patch Set: Refine TestShelfDelegate::IsAppPinned; cleanup. 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698