| Index: third_party/WebKit/Source/platform/text/TextEncodingDetectorTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/text/TextEncodingDetectorTest.cpp b/third_party/WebKit/Source/platform/text/TextEncodingDetectorTest.cpp
|
| index 598dbf3cfcbf924ef9f3d9e6eb97c1ae8cd05b60..e677c990d0fd8770f55201b6a4db796af0811aee 100644
|
| --- a/third_party/WebKit/Source/platform/text/TextEncodingDetectorTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/text/TextEncodingDetectorTest.cpp
|
| @@ -96,4 +96,14 @@ TEST(TextEncodingDetectorTest, UTF8DetectionShouldFail) {
|
| EXPECT_FALSE(result);
|
| }
|
|
|
| +TEST(TextEncodingDetectorTest, RespectUTF8DetectionForFileResource) {
|
| + std::string utf8Bytes =
|
| + "tnegirjji gosa gii beare s\xC3\xA1htt\xC3\xA1 \xC4\x8D\xC3"
|
| + "\xA1llit artihkkaliid. Maid don s\xC3\xA1ht\xC3\xA1t dievasmah";
|
| + WTF::TextEncoding encoding;
|
| + bool result = detectTextEncoding(utf8Bytes.c_str(), utf8Bytes.length(),
|
| + nullptr, "file:///text", nullptr, &encoding);
|
| + EXPECT_TRUE(result);
|
| +}
|
| +
|
| } // namespace blink
|
|
|