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

Side by Side Diff: ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm

Issue 2553973003: [ObjC ARC] Converts ios/chrome/browser/native_app_launcher:unit_tests to ARC.Automatically genera… (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/native_app_launcher/native_app_infobar_controller_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.h" 5 #import "ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types .h" 10 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types .h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace { 18 namespace {
15 19
16 class NativeAppInfoBarDelegateTest : public PlatformTest {}; 20 class NativeAppInfoBarDelegateTest : public PlatformTest {};
17 21
18 TEST_F(NativeAppInfoBarDelegateTest, TestIdentifiers) { 22 TEST_F(NativeAppInfoBarDelegateTest, TestIdentifiers) {
19 std::unique_ptr<NativeAppInfoBarDelegate> delegate; 23 std::unique_ptr<NativeAppInfoBarDelegate> delegate;
20 24
21 delegate = base::MakeUnique<NativeAppInfoBarDelegate>( 25 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
22 nil, GURL(), NATIVE_APP_INSTALLER_CONTROLLER); 26 nil, GURL(), NATIVE_APP_INSTALLER_CONTROLLER);
23 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier:: 27 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
24 NATIVE_APP_INSTALLER_INFOBAR_DELEGATE, 28 NATIVE_APP_INSTALLER_INFOBAR_DELEGATE,
25 delegate->GetIdentifier()); 29 delegate->GetIdentifier());
26 30
27 delegate = base::MakeUnique<NativeAppInfoBarDelegate>( 31 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
28 nil, GURL(), NATIVE_APP_LAUNCHER_CONTROLLER); 32 nil, GURL(), NATIVE_APP_LAUNCHER_CONTROLLER);
29 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier:: 33 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
30 NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE, 34 NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE,
31 delegate->GetIdentifier()); 35 delegate->GetIdentifier());
32 36
33 delegate = base::MakeUnique<NativeAppInfoBarDelegate>( 37 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
34 nil, GURL(), NATIVE_APP_OPEN_POLICY_CONTROLLER); 38 nil, GURL(), NATIVE_APP_OPEN_POLICY_CONTROLLER);
35 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier:: 39 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
36 NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE, 40 NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE,
37 delegate->GetIdentifier()); 41 delegate->GetIdentifier());
38 } 42 }
39 43
40 } // namespace 44 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/native_app_launcher/native_app_infobar_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698