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; |