| 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..75491c45f1a7cbb780f90148e2bca359b939d61f
|
| --- /dev/null
|
| +++ b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
|
| @@ -0,0 +1,35 @@
|
| +// 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) {
|
| + 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;
|
| + 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.
|
|
|