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

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

Issue 2342773002: Removed experimental app list flags. Experimental is now the only way. (Closed)
Patch Set: Respond to nit. Created 4 years, 3 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
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/search_result_page_view.h" 5 #include "ui/app_list/views/search_result_page_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/app_list/app_list_model.h" 12 #include "ui/app_list/app_list_model.h"
13 #include "ui/app_list/app_list_switches.h" 13 #include "ui/app_list/app_list_switches.h"
14 #include "ui/app_list/test/app_list_test_view_delegate.h" 14 #include "ui/app_list/test/app_list_test_view_delegate.h"
15 #include "ui/app_list/test/test_search_result.h" 15 #include "ui/app_list/test/test_search_result.h"
16 #include "ui/app_list/views/search_result_list_view.h" 16 #include "ui/app_list/views/search_result_list_view.h"
17 #include "ui/app_list/views/search_result_list_view_delegate.h" 17 #include "ui/app_list/views/search_result_list_view_delegate.h"
18 #include "ui/app_list/views/search_result_tile_item_list_view.h" 18 #include "ui/app_list/views/search_result_tile_item_list_view.h"
19 #include "ui/app_list/views/search_result_view.h" 19 #include "ui/app_list/views/search_result_view.h"
20 #include "ui/views/controls/textfield/textfield.h" 20 #include "ui/views/controls/textfield/textfield.h"
21 #include "ui/views/test/views_test_base.h" 21 #include "ui/views/test/views_test_base.h"
22 22
23 namespace app_list { 23 namespace app_list {
24 namespace test { 24 namespace test {
25 25
26 class SearchResultPageViewTest : public views::ViewsTestBase, 26 class SearchResultPageViewTest : public views::ViewsTestBase,
27 public SearchResultListViewDelegate { 27 public SearchResultListViewDelegate {
28 public: 28 public:
29 SearchResultPageViewTest() { 29 SearchResultPageViewTest() {}
30 base::CommandLine::ForCurrentProcess()->AppendSwitch(
31 switches::kEnableExperimentalAppList);
32 }
33 ~SearchResultPageViewTest() override {} 30 ~SearchResultPageViewTest() override {}
34 31
35 // Overridden from testing::Test: 32 // Overridden from testing::Test:
36 void SetUp() override { 33 void SetUp() override {
37 views::ViewsTestBase::SetUp(); 34 views::ViewsTestBase::SetUp();
38 view_.reset(new SearchResultPageView()); 35 view_.reset(new SearchResultPageView());
39 list_view_ = new SearchResultListView(this, &view_delegate_); 36 list_view_ = new SearchResultListView(this, &view_delegate_);
40 view_->AddSearchResultContainerView(GetResults(), list_view_); 37 view_->AddSearchResultContainerView(GetResults(), list_view_);
41 textfield_.reset(new views::Textfield()); 38 textfield_.reset(new views::Textfield());
42 tile_list_view_ = 39 tile_list_view_ =
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 324 }
328 325
329 // The selected container has vanished so we reset the selection to 0. 326 // The selected container has vanished so we reset the selection to 0.
330 EXPECT_EQ(0, GetSelectedIndex()); 327 EXPECT_EQ(0, GetSelectedIndex());
331 EXPECT_EQ(-1, tile_list_view()->selected_index()); 328 EXPECT_EQ(-1, tile_list_view()->selected_index());
332 EXPECT_EQ(0, list_view()->selected_index()); 329 EXPECT_EQ(0, list_view()->selected_index());
333 } 330 }
334 331
335 } // namespace test 332 } // namespace test
336 } // namespace app_list 333 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698