| 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) {
|
|
|