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

Unified Diff: ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm

Issue 2650423002: [ObjC ARC] Converts ios/chrome/browser/ui/history:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 11 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/history/tab_history_popup_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm b/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
index 37820871831a87623cbd54b4d529e244b02fb1b3..4cfe25d466fb524808963d3528903f9bed37827d 100644
--- a/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
+++ b/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
@@ -7,7 +7,6 @@
#include <memory>
#include <utility>
-#include "base/mac/scoped_nsobject.h"
#include "components/sessions/core/session_types.h"
#import "ios/chrome/browser/ui/history/tab_history_view_controller.h"
#include "ios/chrome/browser/ui/ui_util.h"
@@ -19,6 +18,10 @@
#import "third_party/ocmock/OCMock/OCMock.h"
#include "ui/gfx/ios/uikit_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface TabHistoryPopupController (Testing)
- (CGFloat)calculatePopupWidth:(NSArray*)entries;
@property(nonatomic, retain)
@@ -32,15 +35,15 @@ static const CGFloat kTabHistoryMaxWidthLandscapePhone = 350.0;
class TabHistoryPopupControllerTest : public PlatformTest {
protected:
void SetUp() override {
- parent_.reset([[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]);
- popup_.reset([[TabHistoryPopupController alloc]
- initWithOrigin:CGPointZero
- parentView:parent_
- entries:testEntriesArray()]);
+ parent_ = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
+ popup_ =
+ [[TabHistoryPopupController alloc] initWithOrigin:CGPointZero
+ parentView:parent_
+ entries:testEntriesArray()];
}
void TearDown() override {
- parent_.reset();
- popup_.reset();
+ parent_ = nil;
+ popup_ = nil;
}
NSArray* testEntriesArray() {
web::Referrer referrer(GURL("http://www.example.com"),
@@ -62,8 +65,8 @@ class TabHistoryPopupControllerTest : public PlatformTest {
[[CRWSessionEntry alloc] initWithNavigationItem:std::move(item2)];
return [NSArray arrayWithObjects:entry0, entry1, entry2, nil];
}
- base::scoped_nsobject<UIView> parent_;
- base::scoped_nsobject<TabHistoryPopupController> popup_;
+ UIView* parent_;
+ TabHistoryPopupController* popup_;
};
TEST_F(TabHistoryPopupControllerTest, TestTableSize) {

Powered by Google App Engine
This is Rietveld 408576698