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

Side by Side Diff: ui/app_list/views/app_list_view_unittest.cc

Issue 2339523004: Remove old (dead) app list code. (Closed)
Patch Set: Address nonbistytftatl review. Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/app_list_view.h" 5 #include "ui/app_list/views/app_list_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // top level views. Then closes the window. 91 // top level views. Then closes the window.
92 void RunDisplayTest(); 92 void RunDisplayTest();
93 93
94 // Hides and reshows the app list with a folder open, expecting the main grid 94 // Hides and reshows the app list with a folder open, expecting the main grid
95 // view to be shown. 95 // view to be shown.
96 void RunReshowWithOpenFolderTest(); 96 void RunReshowWithOpenFolderTest();
97 97
98 // Tests that pressing the search box's back button navigates correctly. 98 // Tests that pressing the search box's back button navigates correctly.
99 void RunBackTest(); 99 void RunBackTest();
100 100
101 // Tests displaying of the experimental app list and shows the start page. 101 // Tests displaying of the app list and shows the start page.
102 void RunStartPageTest(); 102 void RunStartPageTest();
103 103
104 // Tests switching rapidly between multiple pages of the launcher. 104 // Tests switching rapidly between multiple pages of the launcher.
105 void RunPageSwitchingAnimationTest(); 105 void RunPageSwitchingAnimationTest();
106 106
107 // Tests changing the App List profile. 107 // Tests changing the App List profile.
108 void RunProfileChangeTest(); 108 void RunProfileChangeTest();
109 109
110 // Tests displaying of the search results. 110 // Tests displaying of the search results.
111 void RunSearchResultsTest(); 111 void RunSearchResultsTest();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }; 154 };
155 155
156 // Extend the regular AppListTestViewDelegate to communicate back to the test 156 // Extend the regular AppListTestViewDelegate to communicate back to the test
157 // context. Note the test context doesn't simply inherit this, because the 157 // context. Note the test context doesn't simply inherit this, because the
158 // delegate is owned by the view. 158 // delegate is owned by the view.
159 class UnitTestViewDelegate : public app_list::test::AppListTestViewDelegate { 159 class UnitTestViewDelegate : public app_list::test::AppListTestViewDelegate {
160 public: 160 public:
161 explicit UnitTestViewDelegate(AppListViewTestContext* parent) 161 explicit UnitTestViewDelegate(AppListViewTestContext* parent)
162 : parent_(parent) {} 162 : parent_(parent) {}
163 163
164 // Overridden from app_list::AppListViewDelegate:
165 bool ShouldCenterWindow() const override {
166 return app_list::switches::IsCenteredAppListEnabled();
167 }
168
169 // Overridden from app_list::test::AppListTestViewDelegate: 164 // Overridden from app_list::test::AppListTestViewDelegate:
170 void ViewClosing() override { parent_->NativeWidgetClosing(); } 165 void ViewClosing() override { parent_->NativeWidgetClosing(); }
171 166
172 private: 167 private:
173 AppListViewTestContext* parent_; 168 AppListViewTestContext* parent_;
174 169
175 DISALLOW_COPY_AND_ASSIGN(UnitTestViewDelegate); 170 DISALLOW_COPY_AND_ASSIGN(UnitTestViewDelegate);
176 }; 171 };
177 172
178 AppListViewTestContext::AppListViewTestContext(gfx::NativeView parent) { 173 AppListViewTestContext::AppListViewTestContext(gfx::NativeView parent) {
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 TEST_F(AppListViewTestAura, AppListOverlayTest) { 748 TEST_F(AppListViewTestAura, AppListOverlayTest) {
754 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); 749 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest());
755 } 750 }
756 751
757 TEST_F(AppListViewTestDesktop, AppListOverlayTest) { 752 TEST_F(AppListViewTestDesktop, AppListOverlayTest) {
758 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest()); 753 EXPECT_NO_FATAL_FAILURE(test_context_->RunAppListOverlayTest());
759 } 754 }
760 755
761 } // namespace test 756 } // namespace test
762 } // namespace app_list 757 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698