Log HTTP errors in unit tests

Merge from Widevine repo of http://go/wvgerrit/23028

This logs the full response when the status code causes a gtest to
fail.  I hope we can figure out why the buildbot has flakey tests.

Change-Id: I498e633ad65fde4473e01ea227ffe75755fb4fd9
This commit is contained in:
Fred Gylys-Colwell
2017-01-20 18:20:35 -08:00
parent 5748860679
commit d7b27e49a0

View File

@@ -147,7 +147,8 @@ class WvCdmEngineTest : public testing::Test {
EXPECT_TRUE(ok);
int status_code = url_request.GetStatusCode(response);
if (expect_success) EXPECT_EQ(kHttpOk, status_code);
if (expect_success) EXPECT_EQ(kHttpOk, status_code)
<< "Error response: " << response;
if (status_code != kHttpOk) {
return "";