Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/ui/views/generic_info_view_unittest.cc

Issue 6156001: Remove wstring from l10n_util. Part 8, the last part.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/views/generic_info_view.h" 7 #include "chrome/browser/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"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 EXPECT_TRUE(view1->value_views_[0]->text().empty()); 49 EXPECT_TRUE(view1->value_views_[0]->text().empty());
50 50
51 // Test setting values by localized string id. 51 // Test setting values by localized string id.
52 static int kNameIds[] = { 52 static int kNameIds[] = {
53 IDS_PRODUCT_NAME, 53 IDS_PRODUCT_NAME,
54 IDS_PRODUCT_DESCRIPTION 54 IDS_PRODUCT_DESCRIPTION
55 }; 55 };
56 GenericInfoView* view2 = new GenericInfoView(ARRAYSIZE(kNameIds), kNameIds); 56 GenericInfoView* view2 = new GenericInfoView(ARRAYSIZE(kNameIds), kNameIds);
57 root_view->AddChildView(view2); 57 root_view->AddChildView(view2);
58 58
59 string16 product_name = l10n_util::GetString(IDS_PRODUCT_NAME); 59 string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
60 string16 product_desc = l10n_util::GetString(IDS_PRODUCT_DESCRIPTION); 60 string16 product_desc = l10n_util::GetStringUTF16(IDS_PRODUCT_DESCRIPTION);
61 EXPECT_EQ(product_name, view2->name_views_[0]->GetText()); 61 EXPECT_EQ(product_name, view2->name_views_[0]->GetText());
62 EXPECT_EQ(product_desc, view2->name_views_[1]->GetText()); 62 EXPECT_EQ(product_desc, view2->name_views_[1]->GetText());
63 window->CloseNow(); 63 window->CloseNow();
64 } 64 }
65 #endif // OS_WIN 65 #endif // OS_WIN
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome/browser/ui/views/keyboard_overlay_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698