Changeset 293761 in webkit


Ignore:
Timestamp:
May 3, 2022 11:19:19 PM (2 years ago)
Author:
Chris Dumez
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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm

    r293703 r293761  
    234234    EXPECT_STREQ([[url2 absoluteString] UTF8String], "http://%E2%89%A7%E2%88%AE%EF%B9%A3%D9%A1%DB%B1");
    235235
    236     std::array<UChar, 3> utf16 { 0xC2, 0xB6, 0x00 };
     236    std::array<UChar, 3> utf16 { 0xC2, 0xB6 };
    237237    WTF::URL url3 { String(utf16.data(), utf16.size()) };
    238238    EXPECT_FALSE(url3.string().is8Bit());
Note: See TracChangeset for help on using the changeset viewer.