diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/support/test_webkit_platform_support.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index 6fd34f3..fc82fab 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -502,7 +502,8 @@ TestWebKitPlatformSupport::createRTCPeerConnectionHandler( } 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 TestWebKitPlatformSupport::computeLastHyphenLocation( 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 @@ size_t TestWebKitPlatformSupport::computeLastHyphenLocation( 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; |