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

Unified Diff: ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm

Issue 2686623007: [ObjC ARC] Converts ios/chrome/browser/ui/ntp:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm b/ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm
index cd02478f8b8217a7518f07c29185a7a8b292c99a..99b3cf8eddaab9184c1fb436d7c06e31c415ac32 100644
--- a/ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm
+++ b/ios/chrome/browser/ui/ntp/google_landing_controller_unittest.mm
@@ -4,7 +4,6 @@
#include <memory>
-#include "base/mac/scoped_nsobject.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "components/search_engines/template_url_service.h"
@@ -19,6 +18,10 @@
#include "testing/gtest_mac.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
class GoogleLandingControllerTest : public BlockCleanupTest {
@@ -49,14 +52,13 @@ class GoogleLandingControllerTest : public BlockCleanupTest {
template_url_service->Load();
// Set up stub UrlLoader.
- mockUrlLoader_.reset(
- [[OCMockObject mockForProtocol:@protocol(UrlLoader)] retain]);
- controller_.reset([[GoogleLandingController alloc]
- initWithLoader:(id<UrlLoader>)mockUrlLoader_.get()
+ mockUrlLoader_ = [OCMockObject mockForProtocol:@protocol(UrlLoader)];
+ controller_ = [[GoogleLandingController alloc]
+ initWithLoader:(id<UrlLoader>)mockUrlLoader_
browserState:chrome_browser_state_.get()
focuser:nil
webToolbarDelegate:nil
- tabModel:nil]);
+ tabModel:nil];
};
base::MessageLoopForUI message_loop_;
@@ -64,12 +66,12 @@ class GoogleLandingControllerTest : public BlockCleanupTest {
web::TestWebThread io_thread_;
IOSChromeScopedTestingLocalState local_state_;
std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
- base::scoped_nsobject<OCMockObject> mockUrlLoader_;
- base::scoped_nsobject<GoogleLandingController> controller_;
+ OCMockObject* mockUrlLoader_;
+ GoogleLandingController* controller_;
};
TEST_F(GoogleLandingControllerTest, TestConstructorDestructor) {
- EXPECT_TRUE(controller_.get());
+ EXPECT_TRUE(controller_);
}
} // anonymous namespace
« no previous file with comments | « ios/chrome/browser/ui/ntp/centering_scrollview_unittest.mm ('k') | ios/chrome/browser/ui/ntp/most_visited_cell_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698