Title: [293761] trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm
- Revision
- 293761
- Author
- cdu...@apple.com
- Date
- 2022-05-03 23:19:19 -0700 (Tue, 03 May 2022)
Log Message
REGRESSION(r293703):[ BigSur+ iOS ] TestWTF.WTF_URLExtras.URLExtras_ParsingError (API-Test) is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=240049
Reviewed by Yusuke Suzuki.
We need to pass the length of the string, which is the number of characters without the null terminator.
However, we were passing utf16.size(), which was one too many since the utf16 array contains the null
terminator at the end.
* Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/250239@main
Modified Paths
Diff
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm (293760 => 293761)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm 2022-05-04 06:18:46 UTC (rev 293760)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm 2022-05-04 06:19:19 UTC (rev 293761)
@@ -233,7 +233,7 @@
WTF::URL url2 { utf16String(u"http://\u2267\u222E\uFE63\u0661\u06F1") };
EXPECT_STREQ([[url2 absoluteString] UTF8String], "http://%E2%89%A7%E2%88%AE%EF%B9%A3%D9%A1%DB%B1");
- std::array<UChar, 3> utf16 { 0xC2, 0xB6, 0x00 };
+ std::array<UChar, 3> utf16 { 0xC2, 0xB6 };
WTF::URL url3 { String(utf16.data(), utf16.size()) };
EXPECT_FALSE(url3.string().is8Bit());
EXPECT_FALSE(url3.isValid());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes