| Index: ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm
|
| diff --git a/ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm b/ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a8a5273b6d3a9be8d191e997ca11323fdd323d9a
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.h"
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/memory/ptr_util.h"
|
| +#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_types.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#include "testing/platform_test.h"
|
| +
|
| +namespace {
|
| +
|
| +class NativeAppInfoBarDelegateTest : public PlatformTest {};
|
| +
|
| +TEST_F(NativeAppInfoBarDelegateTest, TestIdentifiers) {
|
| + std::unique_ptr<NativeAppInfoBarDelegate> delegate;
|
| +
|
| + delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
|
| + nil, GURL(), NATIVE_APP_INSTALLER_CONTROLLER);
|
| + EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
|
| + NATIVE_APP_INSTALLER_INFOBAR_DELEGATE,
|
| + delegate->GetIdentifier());
|
| +
|
| + delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
|
| + nil, GURL(), NATIVE_APP_LAUNCHER_CONTROLLER);
|
| + EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
|
| + NATIVE_APP_LAUNCHER_INFOBAR_DELEGATE,
|
| + delegate->GetIdentifier());
|
| +
|
| + delegate = base::MakeUnique<NativeAppInfoBarDelegate>(
|
| + nil, GURL(), NATIVE_APP_OPEN_POLICY_CONTROLLER);
|
| + EXPECT_EQ(infobars::InfoBarDelegate::InfoBarIdentifier::
|
| + NATIVE_APP_OPEN_POLICY_INFOBAR_DELEGATE,
|
| + delegate->GetIdentifier());
|
| +}
|
| +
|
| +} // namespace
|
|
|