From b/878908 (referenced in net/base/filename_util_unittest.cc), darin@:
"""
WideToMultiByte and MultiByteToWide should use ICU
The concern is that Windows and ICU might not agree on how to convert charsets, and since we use ICU in some places, we should just use it everywhere. At least, these very common string_util functions should use it.
Note: TEST(NetUtilTest, FileURLConversion) [now FilenameUtilTest] in net_util_unittest.cc [now filename_util_unittest] has a portion commented out because of this bug.
"""
This is an extremely old comment (2007) which only applies on Windows. I'm sure we do use ICU now so the first part is no longer relevant.
What is still relevant is that the invalid UTF-8-input tests are disabled. I've managed to re-enable them on POSIX (where it's actually completely valid input because filenames are not UTF-8), but I'm not really sure what the correct behaviour on Windows should be. It doesn't really matter since you shouldn't be using invalid UTF-8 filenames on Windows, so as long as it does something reasonable (i.e. not a crash or security issue) I don't mind how it resolves to a filename.
Fixing as part of Issue 585422 (https://chromium-review.googlesource.com/c/chromium/src/+/1053672).
Comment 1 by bugdroid1@chromium.org
, May 16 2018