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

Unified Diff: ios/chrome/browser/ui/key_commands_provider_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/key_commands_provider_unittest.mm
diff --git a/ios/chrome/browser/ui/key_commands_provider_unittest.mm b/ios/chrome/browser/ui/key_commands_provider_unittest.mm
index b94d27bf44a11e87521f89e4bd53fe8dec93549c..b616ce426b458731518501137d7981abb93f01f8 100644
--- a/ios/chrome/browser/ui/key_commands_provider_unittest.mm
+++ b/ios/chrome/browser/ui/key_commands_provider_unittest.mm
@@ -4,20 +4,22 @@
#import "ios/chrome/browser/ui/key_commands_provider.h"
-#import "base/mac/scoped_nsobject.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "third_party/ocmock/OCMock/OCMock.h"
#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/ocmock_extensions.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
typedef PlatformTest KeyCommandsProviderTest;
TEST(KeyCommandsProviderTest, NoTabs_EditingText_ReturnsObjects) {
- base::scoped_nsobject<KeyCommandsProvider> provider(
- [[KeyCommandsProvider alloc] init]);
+ KeyCommandsProvider* provider = [[KeyCommandsProvider alloc] init];
id mockConsumer =
[OCMockObject mockForProtocol:@protocol(KeyCommandsPlumbing)];
[[[mockConsumer expect] andReturnUnsignedInteger:0] tabsCount];
@@ -27,8 +29,7 @@ TEST(KeyCommandsProviderTest, NoTabs_EditingText_ReturnsObjects) {
}
TEST(KeyCommandsProviderTest, ReturnsKeyCommandsObjects) {
- base::scoped_nsobject<KeyCommandsProvider> provider(
- [[KeyCommandsProvider alloc] init]);
+ KeyCommandsProvider* provider = [[KeyCommandsProvider alloc] init];
id mockConsumer =
[OCMockObject mockForProtocol:@protocol(KeyCommandsPlumbing)];
[[[mockConsumer expect] andReturnUnsignedInteger:0] tabsCount];
@@ -40,8 +41,7 @@ TEST(KeyCommandsProviderTest, ReturnsKeyCommandsObjects) {
}
TEST(KeyCommandsProviderTest, MoreKeyboardCommandsWhenTabs) {
- base::scoped_nsobject<KeyCommandsProvider> provider(
- [[KeyCommandsProvider alloc] init]);
+ KeyCommandsProvider* provider = [[KeyCommandsProvider alloc] init];
id mockConsumer =
[OCMockObject mockForProtocol:@protocol(KeyCommandsPlumbing)];
@@ -59,8 +59,7 @@ TEST(KeyCommandsProviderTest, MoreKeyboardCommandsWhenTabs) {
}
TEST(KeyCommandsProviderTest, LessKeyCommandsWhenTabsAndEditingText) {
- base::scoped_nsobject<KeyCommandsProvider> provider(
- [[KeyCommandsProvider alloc] init]);
+ KeyCommandsProvider* provider = [[KeyCommandsProvider alloc] init];
id mockConsumer =
[OCMockObject mockForProtocol:@protocol(KeyCommandsPlumbing)];
« no previous file with comments | « ios/chrome/browser/ui/fullscreen_controller_unittest.mm ('k') | ios/chrome/browser/ui/native_content_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698