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

Side by Side Diff: ios/chrome/browser/ui/collection_view/collection_view_controller_test.mm

Issue 2806323003: [ObjC ARC] Converts ios/chrome/browser/ui/settings:unit_tests to ARC. (Closed)
Patch Set: rebase Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h " 5 #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h "
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/foundation_util.h" 8 #import "base/mac/foundation_util.h"
9 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item .h" 9 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_detail_item .h"
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item .h" 10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_footer_item .h"
(...skipping 16 matching lines...) Expand all
27 27
28 void CollectionViewControllerTest::TearDown() { 28 void CollectionViewControllerTest::TearDown() {
29 // Delete the controller before deleting other test variables, such as a 29 // Delete the controller before deleting other test variables, such as a
30 // profile, to ensure things are cleaned up in the same order as in Chrome. 30 // profile, to ensure things are cleaned up in the same order as in Chrome.
31 controller_.reset(); 31 controller_.reset();
32 BlockCleanupTest::TearDown(); 32 BlockCleanupTest::TearDown();
33 } 33 }
34 34
35 void CollectionViewControllerTest::CreateController() { 35 void CollectionViewControllerTest::CreateController() {
36 DCHECK(!controller_); 36 DCHECK(!controller_);
37 controller_.reset(NewController()); 37 controller_.reset(InstantiateController());
38 // Force the model to be loaded. 38 // Force the model to be loaded.
39 [controller_ loadModel]; 39 [controller_ loadModel];
40 // Force the collectionView to be built. 40 // Force the collectionView to be built.
41 EXPECT_TRUE([controller_ view]); 41 EXPECT_TRUE([controller_ view]);
42 } 42 }
43 43
44 CollectionViewController* CollectionViewControllerTest::controller() { 44 CollectionViewController* CollectionViewControllerTest::controller() {
45 if (!controller_) 45 if (!controller_)
46 CreateController(); 46 CreateController();
47 return controller_.get(); 47 return controller_.get();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 [strong_controller collectionView:[strong_controller collectionView] 207 [strong_controller collectionView:[strong_controller collectionView]
208 didDeleteItemsAtIndexPaths:@[ index_path ]]; 208 didDeleteItemsAtIndexPaths:@[ index_path ]];
209 if (completion_block) { 209 if (completion_block) {
210 completion_block(); 210 completion_block();
211 } 211 }
212 }; 212 };
213 213
214 [[controller_ collectionView] performBatchUpdates:batch_updates 214 [[controller_ collectionView] performBatchUpdates:batch_updates
215 completion:completion]; 215 completion:completion];
216 } 216 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/collection_view/collection_view_controller_test.h ('k') | ios/chrome/browser/ui/settings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698