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

Side by Side Diff: ui/app_list/presenter/app_list_presenter_impl_unittest.cc

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Fix test name. Created 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ui/app_list/presenter/app_list_presenter_impl.h" 5 #include "ui/app_list/presenter/app_list_presenter_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h" 10 #include "ui/app_list/presenter/app_list_presenter_delegate_factory.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 : public AppListPresenterDelegateFactory { 71 : public AppListPresenterDelegateFactory {
72 public: 72 public:
73 explicit AppListPresenterDelegateFactoryTest(aura::Window* container) 73 explicit AppListPresenterDelegateFactoryTest(aura::Window* container)
74 : container_(container) {} 74 : container_(container) {}
75 ~AppListPresenterDelegateFactoryTest() override {} 75 ~AppListPresenterDelegateFactoryTest() override {}
76 76
77 AppListPresenterDelegateTest* current_delegate() { return current_delegate_; } 77 AppListPresenterDelegateTest* current_delegate() { return current_delegate_; }
78 78
79 // AppListPresenterDelegateFactory: 79 // AppListPresenterDelegateFactory:
80 std::unique_ptr<AppListPresenterDelegate> GetDelegate( 80 std::unique_ptr<AppListPresenterDelegate> GetDelegate(
81 AppListPresenter* presenter) override { 81 AppListPresenterImpl* presenter) override {
82 current_delegate_ = 82 current_delegate_ =
83 new AppListPresenterDelegateTest(container_, &app_list_view_delegate_); 83 new AppListPresenterDelegateTest(container_, &app_list_view_delegate_);
84 return base::WrapUnique(current_delegate_); 84 return base::WrapUnique(current_delegate_);
85 } 85 }
86 86
87 private: 87 private:
88 aura::Window* container_; 88 aura::Window* container_;
89 AppListPresenterDelegateTest* current_delegate_ = nullptr; 89 AppListPresenterDelegateTest* current_delegate_ = nullptr;
90 test::AppListTestViewDelegate app_list_view_delegate_; 90 test::AppListTestViewDelegate app_list_view_delegate_;
91 91
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 TEST_F(AppListPresenterImplTest, WidgetDestroyed) { 202 TEST_F(AppListPresenterImplTest, WidgetDestroyed) {
203 presenter()->Show(GetDisplayId()); 203 presenter()->Show(GetDisplayId());
204 EXPECT_TRUE(presenter()->GetTargetVisibility()); 204 EXPECT_TRUE(presenter()->GetTargetVisibility());
205 presenter()->GetView()->GetWidget()->CloseNow(); 205 presenter()->GetView()->GetWidget()->CloseNow();
206 EXPECT_FALSE(presenter()->GetTargetVisibility()); 206 EXPECT_FALSE(presenter()->GetTargetVisibility());
207 test::AppListPresenterImplTestApi presenter_test_api(presenter()); 207 test::AppListPresenterImplTestApi presenter_test_api(presenter());
208 EXPECT_FALSE(presenter_test_api.presenter_delegate()); 208 EXPECT_FALSE(presenter_test_api.presenter_delegate());
209 } 209 }
210 210
211 } // namespace app_list 211 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698