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

Unified Diff: ios/chrome/browser/ui/open_in_toolbar_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
Index: ios/chrome/browser/ui/open_in_toolbar_unittest.mm
diff --git a/ios/chrome/browser/ui/open_in_toolbar_unittest.mm b/ios/chrome/browser/ui/open_in_toolbar_unittest.mm
index aac8fb7b628fe865f8befbb990e2265c08265e6a..9eed7f5f56c4dbff60ef6e110b5e175e861fe7b8 100644
--- a/ios/chrome/browser/ui/open_in_toolbar_unittest.mm
+++ b/ios/chrome/browser/ui/open_in_toolbar_unittest.mm
@@ -3,11 +3,14 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/open_in_toolbar.h"
#include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// A class that counts the number of times the |dummyMethod:| method is called.
@interface DummyObserver : NSObject
@@ -46,11 +49,10 @@ class OpenInToolbarTest : public PlatformTest {
};
TEST_F(OpenInToolbarTest, TestButtonActionAndSelector) {
- base::scoped_nsobject<DummyObserver> dummyObserver(
- [[DummyObserver alloc] init]);
- base::scoped_nsobject<OpenInToolbar> openInToolbar([[OpenInToolbar alloc]
- initWithTarget:dummyObserver
- action:@selector(dummyMethod:)]);
+ DummyObserver* dummyObserver = [[DummyObserver alloc] init];
+ OpenInToolbar* openInToolbar =
+ [[OpenInToolbar alloc] initWithTarget:dummyObserver
+ action:@selector(dummyMethod:)];
UIButton* button = GetOpenInButtonInToolBar(openInToolbar);
ASSERT_TRUE(button);
EXPECT_EQ([dummyObserver dummyMethodCallCount], 0);
« no previous file with comments | « ios/chrome/browser/ui/open_in_controller_unittest.mm ('k') | ios/chrome/browser/ui/page_not_available_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698