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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 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 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/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"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return view_->OnKeyPressed(event); 87 return view_->OnKeyPressed(event);
88 } 88 }
89 89
90 private: 90 private:
91 void OnResultInstalled(SearchResult* result) override {} 91 void OnResultInstalled(SearchResult* result) override {}
92 92
93 SearchResultListView* list_view_; 93 SearchResultListView* list_view_;
94 SearchResultTileItemListView* tile_list_view_; 94 SearchResultTileItemListView* tile_list_view_;
95 95
96 AppListTestViewDelegate view_delegate_; 96 AppListTestViewDelegate view_delegate_;
97 scoped_ptr<SearchResultPageView> view_; 97 std::unique_ptr<SearchResultPageView> view_;
98 scoped_ptr<views::Textfield> textfield_; 98 std::unique_ptr<views::Textfield> textfield_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(SearchResultPageViewTest); 100 DISALLOW_COPY_AND_ASSIGN(SearchResultPageViewTest);
101 }; 101 };
102 102
103 TEST_F(SearchResultPageViewTest, DirectionalMovement) { 103 TEST_F(SearchResultPageViewTest, DirectionalMovement) {
104 std::vector<std::pair<SearchResult::DisplayType, int>> result_types; 104 std::vector<std::pair<SearchResult::DisplayType, int>> result_types;
105 // 3 tile results, followed by 2 list results. 105 // 3 tile results, followed by 2 list results.
106 const int kTileResults = 3; 106 const int kTileResults = 3;
107 const int kListResults = 2; 107 const int kListResults = 2;
108 const int kNoneResults = 3; 108 const int kNoneResults = 3;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 // The selected container has vanished so we reset the selection to 0. 329 // The selected container has vanished so we reset the selection to 0.
330 EXPECT_EQ(0, GetSelectedIndex()); 330 EXPECT_EQ(0, GetSelectedIndex());
331 EXPECT_EQ(-1, tile_list_view()->selected_index()); 331 EXPECT_EQ(-1, tile_list_view()->selected_index());
332 EXPECT_EQ(0, list_view()->selected_index()); 332 EXPECT_EQ(0, list_view()->selected_index());
333 } 333 }
334 334
335 } // namespace test 335 } // namespace test
336 } // namespace app_list 336 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_page_view.cc ('k') | ui/app_list/views/search_result_tile_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698