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

Unified Diff: ios/chrome/browser/ui/first_run/first_run_util_unittest.mm

Issue 2888423002: [ObjC ARC] Converts ios/chrome/browser/ui/first_run:unit_tests to ARC. (Closed)
Patch Set: 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
Index: ios/chrome/browser/ui/first_run/first_run_util_unittest.mm
diff --git a/ios/chrome/browser/ui/first_run/first_run_util_unittest.mm b/ios/chrome/browser/ui/first_run/first_run_util_unittest.mm
index 3e4270b4ac48d1e7a042b2b5e2126ed983edaca9..5b95b3004b8d6d3842abd3fd28b03b6a506bd142 100644
--- a/ios/chrome/browser/ui/first_run/first_run_util_unittest.mm
+++ b/ios/chrome/browser/ui/first_run/first_run_util_unittest.mm
@@ -4,10 +4,13 @@
#import <UIKit/UIKit.h>
-#include "base/mac/scoped_nsobject.h"
#include "ios/chrome/browser/ui/first_run/first_run_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
TEST(UICommonTest, TestFixOrphanWord) {
@@ -31,8 +34,7 @@ TEST(UICommonTest, TestFixOrphanWord) {
"那只敏捷的棕色狐狸跃过那只懒狗。快速狐狸";
// clang-format on
- base::scoped_nsobject<UILabel> label(
- [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 500)]);
+ UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 500)];
[label setText:englishString];
ios_internal::FixOrphanWord(label);
NSRange range = [[label text] rangeOfString:@"\n"];

Powered by Google App Engine
This is Rietveld 408576698