OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 #include "chrome/browser/intents/register_intent_handler_infobar_delegate.h" |
| 6 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 7 #include "grit/generated_resources.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/base/l10n/l10n_util.h" |
| 10 |
| 11 TEST(RegisterIntentHandlerInfoBarDelegateTest, GetInfoBarType) { |
| 12 RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
| 13 EXPECT_EQ(InfoBarDelegate::PAGE_ACTION_TYPE, delegate.GetInfoBarType()); |
| 14 } |
| 15 |
| 16 // TODO(jhawkins): GetMessageText once WebIntentData is passed into the |
| 17 // constructor. |
| 18 |
| 19 TEST(RegisterIntentHandlerInfoBarDelegateTest, GetButtons) { |
| 20 RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
| 21 const int kExpectedButtons = ConfirmInfoBarDelegate::BUTTON_OK | |
| 22 ConfirmInfoBarDelegate::BUTTON_CANCEL; |
| 23 EXPECT_EQ(kExpectedButtons, delegate.GetButtons()); |
| 24 } |
| 25 |
| 26 // TODO(jhawkins): GetButtonLabel once WebIntentData is passed into the |
| 27 // constructor. |
| 28 |
| 29 TEST(RegisterIntentHandlerInfoBarDelegateTest, GetLinkText) { |
| 30 RegisterIntentHandlerInfoBarDelegate delegate(NULL); |
| 31 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_LEARN_MORE), delegate.GetLinkText()); |
| 32 } |
| 33 |
| 34 // TODO(jhawkins): LinkClicked once WebIntentRegistry is hooked up and saving |
| 35 // data. |
OLD | NEW |