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

Unified 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, 1 month 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/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

Powered by Google App Engine
This is Rietveld 408576698