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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again Created 4 years, 5 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/shelf_view.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index ec1be9fbf937b181597d27728ce228ff6b0a3003..c50ee42d5399853a7fd1a66cfde2bcb8698ffbdf 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -37,6 +37,7 @@
#include "ash/test/test_system_tray_delegate.h"
#include "base/compiler_specific.h"
#include "base/i18n/rtl.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -685,20 +686,17 @@ class ShelfViewTest : public AshTestBase {
}
void ReplaceShelfDelegate() {
- // Replace ShelfDelegate.
- ShellTestApi shell_test_api(Shell::GetInstance());
- shell_test_api.SetShelfDelegate(NULL);
shelf_delegate_ = new TestShelfDelegateForShelfView();
- shell_test_api.SetShelfDelegate(shelf_delegate_);
- ShelfTestAPI(Shelf::ForPrimaryDisplay()).set_delegate(shelf_delegate_);
test_api_->SetShelfDelegate(shelf_delegate_);
+ WmShell::Get()->SetShelfDelegateForTesting(
+ base::WrapUnique(shelf_delegate_));
}
ShelfModel* model_;
ShelfView* shelf_view_;
int browser_index_;
- // Owned by ash::Shell.
+ // Owned by ash::WmShell.
TestShelfDelegateForShelfView* shelf_delegate_;
std::unique_ptr<ShelfViewTestAPI> test_api_;
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698