| Index: third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp b/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
|
| index 2f9bd56ba26b69729db87b8379737497843ce979..b3c0a2a4b50b0bba49197911801c4624ffd6189e 100644
|
| --- a/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "platform/weborigin/KURL.h"
|
|
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "wtf/StdLibExtras.h"
|
| #include "wtf/text/CString.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| @@ -295,6 +296,11 @@ TEST(KURLTest, Decode)
|
| String zero = decodeURLEscapeSequences("%00");
|
| EXPECT_STRNE("%00", zero.utf8().data());
|
|
|
| + // Decode UTF-8.
|
| + String decoded = decodeURLEscapeSequences("%e6%bc%a2%e5%ad%97");
|
| + const UChar decodedExpected[] = {0x6F22, 0x5b57};
|
| + EXPECT_EQ(String(decodedExpected, WTF_ARRAY_LENGTH(decodedExpected)), decoded);
|
| +
|
| // Test the error behavior for invalid UTF-8 (we differ from WebKit here).
|
| String invalid = decodeURLEscapeSequences("%e4%a0%e5%a5%bd");
|
| UChar invalidExpectedHelper[4] = { 0x00e4, 0x00a0, 0x597d, 0 };
|
|
|