Index: chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc |
diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cd6fff44e4b95ae4d3798eff0a8bebaddbdcee13 |
--- /dev/null |
+++ b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2011 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. |
+ |
+#include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" |
+#include "chrome/browser/tab_contents/infobar_delegate.h" |
+#include "grit/generated_resources.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
+#include "ui/base/l10n/l10n_util.h" |
+ |
+TEST(RegisterIntentHandlerInfoBarDelegateTest, GetInfoBarType) { |
Peter Kasting
2011/07/26 22:08:32
None of these tests is useful. Just kill this fil
James Hawkins
2011/07/26 22:35:39
The tests under the TODOs are important (which the
Peter Kasting
2011/07/26 22:52:12
Tests that verify at such a low level -- e.g. "yes
|
+ RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
+ EXPECT_EQ(InfoBarDelegate::PAGE_ACTION_TYPE, delegate.GetInfoBarType()); |
+} |
+ |
+// TODO(jhawkins): GetMessageText once WebIntentData is passed into the |
+// constructor. |
+ |
+TEST(RegisterIntentHandlerInfoBarDelegateTest, GetButtons) { |
+ RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
+ const int kExpectedButtons = ConfirmInfoBarDelegate::BUTTON_OK | |
+ ConfirmInfoBarDelegate::BUTTON_CANCEL | |
+ ConfirmInfoBarDelegate::BUTTON_NONE; |
+ EXPECT_EQ(kExpectedButtons, delegate.GetButtons()); |
+} |
+ |
+// TODO(jhawkins): GetButtonLabel once WebIntentData is passed into the |
+// constructor. |
+ |
+TEST(RegisterIntentHandlerInfoBarDelegateTest, GetLinkText) { |
+ RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
+ EXPECT_EQ(l10n_util::GetStringUTF16(IDS_LEARN_MORE), delegate.GetLinkText()); |
+} |
+ |
+// TODO(jhawkins): LinkClicked once WebIntentRegistry is hooked up and saving |
+// data. |