Chromium Code Reviews| 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) { | |
|
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
| |
| 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 ConfirmInfoBarDelegate::BUTTON_NONE; | |
| 24 EXPECT_EQ(kExpectedButtons, delegate.GetButtons()); | |
| 25 } | |
| 26 | |
| 27 // TODO(jhawkins): GetButtonLabel once WebIntentData is passed into the | |
| 28 // constructor. | |
| 29 | |
| 30 TEST(RegisterIntentHandlerInfoBarDelegateTest, GetLinkText) { | |
| 31 RegisterIntentHandlerInfoBarDelegate delegate(NULL); | |
| 32 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_LEARN_MORE), delegate.GetLinkText()); | |
| 33 } | |
| 34 | |
| 35 // TODO(jhawkins): LinkClicked once WebIntentRegistry is hooked up and saving | |
| 36 // data. | |
| OLD | NEW |