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

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: comments Created 3 years, 7 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/history/history_util_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/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 e0471ddd6e73bacc657e34f82c523092aede232b..990a397e2fa4de727a3e70f5b7c5862cc9b52bf4 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,9 +18,13 @@
#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)popupWidthForItems:(const web::NavigationItemList)items;
-@property(nonatomic, retain)
+@property(nonatomic, strong)
TabHistoryViewController* tabHistoryTableViewController;
@end
@@ -32,7 +35,7 @@ static const CGFloat kTabHistoryMaxWidthLandscapePhone = 350.0;
class TabHistoryPopupControllerTest : public PlatformTest {
protected:
TabHistoryPopupControllerTest() : PlatformTest() {
- parent_.reset([[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]);
+ parent_ = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
// Create test items and populate |items_|.
web::Referrer referrer(GURL("http://www.example.com"),
web::ReferrerPolicyDefault);
@@ -47,15 +50,15 @@ class TabHistoryPopupControllerTest : public PlatformTest {
items_.back()->SetReferrer(referrer);
// Create the popup controller using CRWSessionEntries created from the
// NavigationItems in |items_|.
- popup_.reset([[TabHistoryPopupController alloc]
+ popup_ = [[TabHistoryPopupController alloc]
initWithOrigin:CGPointZero
parentView:parent_
- items:web::CreateRawNavigationItemList(items_)]);
+ items:web::CreateRawNavigationItemList(items_)];
}
web::ScopedNavigationItemList items_;
- base::scoped_nsobject<UIView> parent_;
- base::scoped_nsobject<TabHistoryPopupController> popup_;
+ __strong UIView* parent_;
+ __strong TabHistoryPopupController* popup_;
};
TEST_F(TabHistoryPopupControllerTest, TestTableSize) {
« no previous file with comments | « ios/chrome/browser/ui/history/history_util_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698