| OLD | NEW |
| (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 |
| OLD | NEW |