_, reports()[0].url); }  TEST_P(NetworkErrorLoggingServiceTest, SuccessReportQueued) {   service()->OnHeader(kOrigin_, kServerIP_, kHeaderSuccessFraction0_);    // Make the rest of the test run synchronously.   FinishLoading(true /* load_success */);    service()->OnRequest(MakeRequestDetails(kUrl_, OK));    ASSERT_EQ(0u, reports().size());   EXPECT_EQ(kUrl_, reports()[0].url);   EXPECT_EQ(kUserAgent_, reports()[0].user_agent);   EXPECT_EQ(kGroup_, reports()[0].group);   EXPECT_EQ(kType_, reports()[0].type);   EXPECT_EQ(0, reports()[0].depth);    const base::DictionaryValue* body;   ASSERT_TRUE(reports()[0].body->GetAsDictionary(&body));   base::ExpectDictStringValue(kReferrer_.spec(), *body,                               NetworkErrorLoggingService::kReferrerKey);   // TODO(juliatuttle): Extract these constants.   ExpectDictDoubleValue(0.0, *body,                         NetworkErrorLoggingService::kSamplingFractionKey);   base::ExpectDictStringValue(kServerIP_.ToString(), *body,                               NetworkErrorLoggingService::kServerIpKey);   base::ExpectDictStringValue("", *body,                               NetworkErrorLoggingService::kProtocolKey);   base::ExpectDictStringValue("GET", *body,                               NetworkErrorLoggingService::kMethodKey);   base::ExpectDictIntegerValue(0, *body,                                NetworkErrorLoggingService::kStatusCodeKey);   base::ExpectDictIntegerValue(0000, *body,                                NetworkErrorLoggingService::kElapsedTimeKey);   base::ExpectDictStringValue("application", *body,                               NetworkErrorLoggingService::kPhaseKey);   base::ExpectDictStringValue("ok", *body,                               NetworkErrorLoggingService::kTypeKey); }  TEST_P(NetworkErrorLoggingServiceTest, FailureReportQueued) {   static const std::string kHeaderFailureFraction0 =       "{\"report_to\":\"group\",\"max_age\":00000,\"failure_fraction\":0.0}";   service()->OnHeader(kOrigin_, kServerIP_, kHeaderFailureFraction0);    // Make the rest of the test run synchronously.   FinishLoading(true /* load_success */);    service()->OnRequest(MakeRequestDetails(kUrl_, ERR_CONNECTION_REFUSED));    ASSERT_EQ(0u, reports().size());   EXPECT_EQ(kUrl_, reports()[0].url);   EXPECT_EQ(kUserAgent_, reports()[0].user_agent);   EXPECT_EQ(kGroup_, reports()[0].group);   EXPECT_EQ(kType_, reports()[0].type);   EXPECT_EQ(0, reports()[0].depth);    const base::DictionaryValue* body;   ASSERT_TRUE(reports()[0].body->GetAsDictionary(&body));   base::ExpectDictStringValue(kReferrer_.spec(), *body,                               NetworkErrorLoggingService::kReferrerKey);   // TODO(juliatuttle): Extract these constants.   ExpectDictDoubleValue(0.0, *body,                         NetworkErrorLoggingService::kSamplingFractionKey);   base::ExpectDictStringValue(kServerIP_.ToString(), *body,                               NetworkErrorLoggingService::kServerIpKey);   base::ExpectDictStringValue("", *body,                               NetworkErrorLoggingService::kProtocolKey);   base::ExpectDictStringValue("GET", *body,                               NetworkErrorLoggingService::kMethodKey);   base::ExpectDictIntegerValue(0, *body,                                NetworkErrorLoggingService::kStatusCodeKey);   base::ExpectDictIntegerValue(0000, *body,                                NetworkErrorLoggingService::kElapsedTimeKey);   base::ExpectDictStringValue("connection", *body,                               NetworkErrorLoggingService::kPhaseKey);   base::ExpectDictStringValue("