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

Unified Diff: ios/chrome/browser/ui/browser_container_view_unittest.mm

Issue 2936833002: [ObjC ARC] Converts ios/chrome/browser/ui:unit_tests to ARC. (Closed)
Patch Set: Fix bad ARC guard. Created 3 years, 6 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/BUILD.gn ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_container_view_unittest.mm
diff --git a/ios/chrome/browser/ui/browser_container_view_unittest.mm b/ios/chrome/browser/ui/browser_container_view_unittest.mm
index f0daef1caadd19e0c002aae9f59bc9603f2b598d..b0aa321a63f4d2204de4eb6683f5972ca3ad357a 100644
--- a/ios/chrome/browser/ui/browser_container_view_unittest.mm
+++ b/ios/chrome/browser/ui/browser_container_view_unittest.mm
@@ -4,22 +4,25 @@
#import "ios/chrome/browser/ui/browser_container_view.h"
-#import "base/mac/scoped_nsobject.h"
#include "testing/platform_test.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// Fixture for BrowserContainerView testing.
class BrowserContainerViewTest : public PlatformTest {
protected:
void SetUp() override {
PlatformTest::SetUp();
- browser_container_view_.reset([[BrowserContainerView alloc] init]);
+ browser_container_view_ = [[BrowserContainerView alloc] init];
ASSERT_TRUE(browser_container_view_);
- content_view_.reset([[UIView alloc] init]);
+ content_view_ = [[UIView alloc] init];
ASSERT_TRUE(content_view_);
}
- base::scoped_nsobject<BrowserContainerView> browser_container_view_;
- base::scoped_nsobject<UIView> content_view_;
+ BrowserContainerView* browser_container_view_;
+ UIView* content_view_;
};
// Tests adding a new content view when BrowserContainerView does not currently
@@ -49,7 +52,7 @@ TEST_F(BrowserContainerViewTest, ReplacingContentView) {
ASSERT_EQ(static_cast<UIView*>(browser_container_view_),
[content_view_ superview]);
- base::scoped_nsobject<UIView> content_view2([[UIView alloc] init]);
+ UIView* content_view2 = [[UIView alloc] init];
[browser_container_view_ displayContentView:content_view2];
EXPECT_FALSE([content_view_ superview]);
EXPECT_EQ(static_cast<UIView*>(browser_container_view_),
« no previous file with comments | « ios/chrome/browser/ui/BUILD.gn ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698