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

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

Issue 2508663002: [ios] Move NativeAppLauncher upstream (Closed)
Patch Set: CL Feedback 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.h"
6
7 #include <memory>
8
9 #include "base/memory/ptr_util.h"
10 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types .h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h"
13
14 namespace {
15
16 class NativeAppInfoBarDelegateTest : public PlatformTest {};
17
18 TEST_F(NativeAppInfoBarDelegateTest, TestIdentifiers) {
19 std::unique_ptr<NativeAppInfoBarDelegate> delegate;
20
21 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
22 nil, GURL(), NATIVE_APP_INSTALLER_CONTROLLER);
23 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
24 NATIVE_APP_INSTALLER_INFOBAR_DELEGATE,
25 delegate->GetIdentifier());
26
27 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
28 nil, GURL(), NATIVE_APP_LAUNCHER_CONTROLLER);
29 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
30 NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE,
31 delegate->GetIdentifier());
32
33 delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
34 nil, GURL(), NATIVE_APP_OPEN_POLICY_CONTROLLER);
35 EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
36 NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE,
37 delegate->GetIdentifier());
38 }
39
40 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698