| Index: third_party/WebKit/Source/wtf/text/WTFStringTest.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/text/WTFStringTest.cpp b/third_party/WebKit/Source/wtf/text/WTFStringTest.cpp
|
| index 66cf6370575e91a79756585de2b5ad831776f677..0f142fcd6b955f65eb1a0cbeee107dfa457ec02a 100644
|
| --- a/third_party/WebKit/Source/wtf/text/WTFStringTest.cpp
|
| +++ b/third_party/WebKit/Source/wtf/text/WTFStringTest.cpp
|
| @@ -347,4 +347,14 @@ TEST(StringTest, Lower)
|
| EXPECT_STREQ("link", String::fromUTF8("LIN\xE2\x84\xAA").lower().utf8().data());
|
| }
|
|
|
| +TEST(StringTest, ToStdString)
|
| +{
|
| + char kAsciiChars[] = "1234";
|
| + EXPECT_EQ(std::string(kAsciiChars), String(kAsciiChars).toUTF8());
|
| +
|
| + UChar kUTF16Chars[] = {0x20AC, 0xD801, 0};
|
| + EXPECT_EQ(std::string("\xE2\x82\xAC\xED\xA0\x81"), String(kUTF16Chars).toUTF8());
|
| +
|
| +}
|
| +
|
| } // namespace WTF
|
|
|