Make base::ReadFileToString() return false on I/O error.
It seems inconsistent that ReadFileToString() currently returns false when encountering a file open error but true upon file read error. This CL forces the return value to false upon encountering any kind of error and documents this behaviour.
At that occasion, a test for path traversal prevention is added.
BUG=none
Review URL: https://codereview.chromium.org/254333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267507 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 731daa1a55f46d844aeb6d5d0ffbb8242c39d7b9
3 files changed