Add PrintTo for string16

This is required by googletest to print a readable output when failing to compare two string16's (ref: http://goo.gl/jALbO)

Without this the output of a failed comparison could be:

Value of: ElideEmail(UTF8ToUTF16(testcases[i].input), font, font.GetStringWidth(expected_output))
  Actual: { 97, 116, 34, 64, 64, 64, 64, 64, 64, 64, 64, 64, 46, 46, 46, 64, 64, 46, 8230, 64, 109, 97, 100, 110, 101, 115, 115, 46, 99, 111, 109 }
Expected: expected_output
Which is: { 97, 116, 34, 64, 64, 64, 64, 64, 64, 64, 64, 64, 46, 46, 46, 64, 64, 46, 64, 46, 8230, 64, 109, 97, 110, 101, 115, 115, 46, 99, 111, 109 }

With this patch the same error is now properly formatted:

Value of: ElideEmail(UTF8ToUTF16(testcases[i].input), font, font.GetStringWidth(expected_output))
  Actual: at"@@@@@@@@@...@@.…@madness.com
Expected: expected_output
Which is: at"@@@@@@@@@...@@.@.…@maness.com

BUG=
TEST=unit_tests


Review URL: http://codereview.chromium.org/9641017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125642 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 157854945014e688bcf787665a34134039a8cf7b
2 files changed
tree: eeb8125f44386d154c566937cc42dfff737a24b3
  1. base/
  2. build/
  3. dbus/
  4. ipc/
  5. testing/
  6. third_party/