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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_initvalue_unittest.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/i18n/rtl.h" 5 #include "base/i18n/rtl.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/common/chrome_paths.h" 8 #include "chrome/common/chrome_paths.h"
9 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" 9 #include "chrome/common/extensions/api/extension_action/page_action_handler.h"
10 #include "chrome/common/extensions/api/i18n/default_locale_handler.h" 10 #include "chrome/common/extensions/api/i18n/default_locale_handler.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess( 157 scoped_refptr<extensions::Extension> extension(LoadAndExpectSuccess(
158 "init_valid_name_no_rtl.json")); 158 "init_valid_name_no_rtl.json"));
159 159
160 string16 localized_name(ASCIIToUTF16("Dictionary (by Google)")); 160 string16 localized_name(ASCIIToUTF16("Dictionary (by Google)"));
161 base::i18n::AdjustStringForLocaleDirection(&localized_name); 161 base::i18n::AdjustStringForLocaleDirection(&localized_name);
162 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name())); 162 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));
163 163
164 // Strong RTL characters in name. 164 // Strong RTL characters in name.
165 extension = LoadAndExpectSuccess("init_valid_name_strong_rtl.json"); 165 extension = LoadAndExpectSuccess("init_valid_name_strong_rtl.json");
166 166
167 localized_name = WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)"); 167 localized_name = base::WideToUTF16(L"Dictionary (\x05D1\x05D2"L" Google)");
168 base::i18n::AdjustStringForLocaleDirection(&localized_name); 168 base::i18n::AdjustStringForLocaleDirection(&localized_name);
169 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name())); 169 EXPECT_EQ(localized_name, UTF8ToUTF16(extension->name()));
170 170
171 // Reset locale. 171 // Reset locale.
172 #if defined(TOOLKIT_GTK) 172 #if defined(TOOLKIT_GTK)
173 gtk_widget_set_default_direction(gtk_dir); 173 gtk_widget_set_default_direction(gtk_dir);
174 #else 174 #else
175 base::i18n::SetICUDefaultLocale(locale); 175 base::i18n::SetICUDefaultLocale(locale);
176 #endif 176 #endif
177 } 177 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_file_util_unittest.cc ('k') | chrome/common/json_value_serializer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698