Update ui_base_unittests to consistently use long paths (as opposed to 8.3 paths).

If a username isn't a valid 8.3 short file name (even just a lengthy name
like "user with long name"), Windows will set the TMP and TEMP environment
variables to be 8.3 paths:

TMP=C:\Users\USERWI~1\AppData\Local\Temp
TEMP=C:\Users\USERWI~1\AppData\Local\Temp

base::GetTempDir internally calls ::GetTempPath,
which just uses the value specified by TMP or TEMP, and so can return
a short path. This behavior can make checks on whether temp files that back
virtual files are actually created in the temp directory fail, because of
potential mismatches between normal/long and 8.3/short filenames.

The bug is fixed by adding a new Windows FileUtil method to normalize a path
(internally ::GetLongPathName is used). The method is currently only used in
test code so there will be no product code regressions.

Bug: 957925
Change-Id: Id6310aa99a8feb86b08c84a358b571454241f46b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1592044
Commit-Queue: Bruce Long <brlong@microsoft.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Darwin Huang <huangdarwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658866}
5 files changed