| Index: base/test/gtest_xml_unittest_result_printer.cc
|
| diff --git a/base/test/gtest_xml_unittest_result_printer.cc b/base/test/gtest_xml_unittest_result_printer.cc
|
| index 6ce4fdecf3fcddd2487f5e529e56f86d00f1a2e3..18a2cb95309c64521fe3bf290a87dd0b8338eb5a 100644
|
| --- a/base/test/gtest_xml_unittest_result_printer.cc
|
| +++ b/base/test/gtest_xml_unittest_result_printer.cc
|
| @@ -35,6 +35,26 @@ bool XmlUnitTestResultPrinter::Initialize(const FilePath& output_file_path) {
|
| return true;
|
| }
|
|
|
| +void XmlUnitTestResultPrinter::OnAssert(const char* file,
|
| + int line,
|
| + const std::string& summary,
|
| + const std::string& message) {
|
| + if (output_file_) {
|
| + std::string encoded_summary;
|
| + Base64Encode(summary, &encoded_summary);
|
| + std::string encoded_message;
|
| + Base64Encode(message, &encoded_message);
|
| + fprintf(output_file_,
|
| + " <x-test-result-part type=\"fatal_failure\" "
|
| + "file=\"%s\" line=\"%d\">\n"
|
| + " <summary>%s</summary>\n"
|
| + " <message>%s</message>\n"
|
| + " </x-test-result-part>",
|
| + file, line, encoded_summary.c_str(), encoded_message.c_str());
|
| + fflush(output_file_);
|
| + }
|
| +}
|
| +
|
| void XmlUnitTestResultPrinter::OnTestCaseStart(
|
| const testing::TestCase& test_case) {
|
| fprintf(output_file_, " <testsuite>\n");
|
|
|