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

Unified Diff: webkit/support/test_webkit_platform_support.cc

Issue 11112011: Fix hyphen-locale.html and hyphenate-limit-lines.html. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/test_webkit_platform_support.cc
===================================================================
--- webkit/support/test_webkit_platform_support.cc (revision 161449)
+++ webkit/support/test_webkit_platform_support.cc (working copy)
@@ -502,7 +502,8 @@
}
bool TestWebKitPlatformSupport::canHyphenate(const WebKit::WebString& locale) {
- return locale.isEmpty() || locale.equals("en_US");
+ return locale.isEmpty() || locale.equals("en") || locale.equals("en_US") ||
+ locale.equals("en_GB");
}
size_t TestWebKitPlatformSupport::computeLastHyphenLocation(
@@ -510,7 +511,8 @@
size_t length,
size_t before_index,
const WebKit::WebString& locale) {
- DCHECK(locale.isEmpty() || locale.equals("en_US"));
+ DCHECK(locale.isEmpty() || locale.equals("en") || locale.equals("en_US") ||
+ locale.equals("en_GB"));
if (!hyphen_dictionary_) {
// Initialize the hyphen library with a sample dictionary. To avoid test
// flakiness, this code synchronously loads the dictionary.
@@ -535,7 +537,7 @@
string16 word_utf16(characters, length);
if (!IsStringASCII(word_utf16))
return 0;
- std::string word = UTF16ToASCII(word_utf16);
+ std::string word = StringToLowerASCII(UTF16ToASCII(word_utf16));
scoped_array<char> hyphens(new char[word.length() + 5]);
char** rep = NULL;
int* pos = NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698