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

Unified Diff: ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm

Issue 2835413003: [ObjC ARC] Converts ios/chrome/browser/ui/toolbar:unit_tests to ARC. (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm
index cd917a7f5647f082565afec61ecbeb3bbbce83a1..bb2c4bbda01db6b5f3c314c1f21d624279cc8931 100644
--- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm
+++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm
@@ -9,7 +9,6 @@
#include <memory>
#include "base/ios/ios_util.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
@@ -22,6 +21,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
+
@interface UIView (SubViewTesting)
- (NSMutableArray*)allSubviews;
@end
@@ -69,15 +72,15 @@ class WebToolbarControllerTest : public BlockCleanupTest {
id urlLoader = [OCMockObject niceMockForProtocol:@protocol(UrlLoader)];
// Create the WebToolbarController using the test objects.
- web_toolbar_controller_.reset([[WebToolbarController alloc]
+ web_toolbar_controller_ = [[WebToolbarController alloc]
initWithDelegate:delegate
urlLoader:urlLoader
browserState:chrome_browser_state_.get()
- preloadProvider:nil]);
+ preloadProvider:nil];
[web_toolbar_controller_ setUnitTesting:YES];
}
void TearDown() override {
- web_toolbar_controller_.reset();
+ web_toolbar_controller_ = nil;
BlockCleanupTest::TearDown();
}
@@ -85,7 +88,7 @@ class WebToolbarControllerTest : public BlockCleanupTest {
std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
TestToolbarModel* toolbar_model_; // weak. Owned by toolbar_model_ios_.
std::unique_ptr<TestToolbarModelIOS> toolbar_model_ios_;
- base::scoped_nsobject<WebToolbarController> web_toolbar_controller_;
+ WebToolbarController* web_toolbar_controller_;
};
TEST_F(WebToolbarControllerTest, TestUpdateToolbar_NavigationButtonsEnabled) {
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698