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

Unified Diff: ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm

Issue 2508663002: [ios] Move NativeAppLauncher upstream (Closed)
Patch Set: Unittests, 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..75b6a38f2d15fdea79db05ce5a0b37dd8f78c8a2
--- /dev/null
+++ b/ios/chrome/browser/native_app_launcher/native_app_infobar_delegate_unittest.mm
@@ -0,0 +1,32 @@
+// 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>
+
+#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 {
+ protected:
+ std::unique_ptr<NativeAppInfoBarDelegate> delegate_;
+};
+
+TEST_F(NativeAppInfoBarDelegateTest, TestConstructor) {
+ delegate_.reset(new NativeAppInfoBarDelegate(
sdefresne 2016/11/21 08:46:04 I think you don't need a class with a member varia
sczs1 2016/11/21 17:43:00 Thanks Sylvain, I modified the test as you suggest
+ nil, GURL(), NATIVE_APP_INSTALLER_CONTROLLER));
+ EXPECT_TRUE(delegate_.get());
+ delegate_.reset(new NativeAppInfoBarDelegate(nil, GURL(),
+ NATIVE_APP_LAUNCHER_CONTROLLER));
+ EXPECT_TRUE(delegate_.get());
+ delegate_.reset(new NativeAppInfoBarDelegate(
+ nil, GURL(), NATIVE_APP_OPEN_POLICY_CONTROLLER));
+ EXPECT_TRUE(delegate_.get());
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698