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

Side by Side Diff: ui/app_list/cocoa/app_list_window_controller_unittest.mm

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 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 #import "base/mac/scoped_nsobject.h" 5 #import "base/mac/scoped_nsobject.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #import "testing/gtest_mac.h" 8 #import "testing/gtest_mac.h"
9 #include "ui/app_list/app_list_view_delegate.h" 9 #include "ui/app_list/app_list_view_delegate.h"
10 #import "ui/app_list/cocoa/app_list_view_controller.h" 10 #import "ui/app_list/cocoa/app_list_view_controller.h"
(...skipping 11 matching lines...) Expand all
22 protected: 22 protected:
23 void TearDown() override; 23 void TearDown() override;
24 24
25 base::scoped_nsobject<AppListWindowController> controller_; 25 base::scoped_nsobject<AppListWindowController> controller_;
26 26
27 app_list::test::AppListTestViewDelegate* delegate() { 27 app_list::test::AppListTestViewDelegate* delegate() {
28 return delegate_.get(); 28 return delegate_.get();
29 } 29 }
30 30
31 private: 31 private:
32 scoped_ptr<app_list::test::AppListTestViewDelegate> delegate_; 32 std::unique_ptr<app_list::test::AppListTestViewDelegate> delegate_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(AppListWindowControllerTest); 34 DISALLOW_COPY_AND_ASSIGN(AppListWindowControllerTest);
35 }; 35 };
36 36
37 AppListWindowControllerTest::AppListWindowControllerTest() 37 AppListWindowControllerTest::AppListWindowControllerTest()
38 : delegate_(new app_list::test::AppListTestViewDelegate) { 38 : delegate_(new app_list::test::AppListTestViewDelegate) {
39 Init(); 39 Init();
40 controller_.reset([[AppListWindowController alloc] init]); 40 controller_.reset([[AppListWindowController alloc] init]);
41 [[controller_ appListViewController] setDelegate:delegate()]; 41 [[controller_ appListViewController] setDelegate:delegate()];
42 } 42 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 EXPECT_TRUE([view_controller showingSearchResults]); 86 EXPECT_TRUE([view_controller showingSearchResults]);
87 87
88 EXPECT_EQ(0, delegate()->open_search_result_count()); 88 EXPECT_EQ(0, delegate()->open_search_result_count());
89 [view_controller openResult:nil]; 89 [view_controller openResult:nil];
90 EXPECT_EQ(1, delegate()->open_search_result_count()); 90 EXPECT_EQ(1, delegate()->open_search_result_count());
91 91
92 EXPECT_TRUE([view_controller showingSearchResults]); 92 EXPECT_TRUE([view_controller showingSearchResults]);
93 [[controller_ window] close]; // Hide. 93 [[controller_ window] close]; // Hide.
94 EXPECT_FALSE([view_controller showingSearchResults]); 94 EXPECT_FALSE([view_controller showingSearchResults]);
95 } 95 }
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller_unittest.mm ('k') | ui/app_list/cocoa/apps_grid_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698