OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/ui/views/generic_info_view.h" | 7 #include "chrome/browser/ui/views/generic_info_view.h" |
8 #include "grit/chromium_strings.h" | 8 #include "grit/chromium_strings.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 12 #include "ui/views/widget/widget.h" |
12 #include "views/controls/label.h" | 13 #include "views/controls/label.h" |
13 #include "views/controls/textfield/textfield.h" | 14 #include "views/controls/textfield/textfield.h" |
14 #include "views/widget/widget.h" | |
15 | 15 |
16 // This class is only used on windows for now. | 16 // This class is only used on windows for now. |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 | 18 |
19 class GenericInfoViewTest : public testing::Test { | 19 class GenericInfoViewTest : public testing::Test { |
20 private: | 20 private: |
21 MessageLoopForUI message_loop_; | 21 MessageLoopForUI message_loop_; |
22 }; | 22 }; |
23 | 23 |
24 TEST_F(GenericInfoViewTest, GenericInfoView) { | 24 TEST_F(GenericInfoViewTest, GenericInfoView) { |
(...skipping 23 matching lines...) Expand all Loading... |
48 GenericInfoView* view2 = new GenericInfoView(ARRAYSIZE(kNameIds), kNameIds); | 48 GenericInfoView* view2 = new GenericInfoView(ARRAYSIZE(kNameIds), kNameIds); |
49 root_view->AddChildView(view2); | 49 root_view->AddChildView(view2); |
50 | 50 |
51 string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 51 string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
52 string16 product_desc = l10n_util::GetStringUTF16(IDS_PRODUCT_DESCRIPTION); | 52 string16 product_desc = l10n_util::GetStringUTF16(IDS_PRODUCT_DESCRIPTION); |
53 EXPECT_EQ(product_name, view2->name_views_[0]->GetText()); | 53 EXPECT_EQ(product_name, view2->name_views_[0]->GetText()); |
54 EXPECT_EQ(product_desc, view2->name_views_[1]->GetText()); | 54 EXPECT_EQ(product_desc, view2->name_views_[1]->GetText()); |
55 widget->CloseNow(); | 55 widget->CloseNow(); |
56 } | 56 } |
57 #endif // OS_WIN | 57 #endif // OS_WIN |
OLD | NEW |