 */);

  service()->QueueSignedExchangeReport(MakeSignedExchangeReportDetails(
      true, "ok", kUrl_, kInnerUrl_, kCertUrl_, kServerIP_));
  ASSERT_EQ(1u, 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);
  ExpectDictDoubleValue(1.0, *body,
                        NetworkErrorLoggingService::kSamplingFractionKey);
  base::ExpectDictStringValue(kServerIP_.ToString(), *body,
                              NetworkErrorLoggingService::kServerIpKey);
  base::ExpectDictStringValue("http/1.1", *body,
                              NetworkErrorLoggingService::kProtocolKey);
  base::ExpectDictStringValue("GET", *body,
                              NetworkErrorLoggingService::kMethodKey);
  base::ExpectDictIntegerValue(200, *body,
                               NetworkErrorLoggingService::kStatusCodeKey);
  base::ExpectDictIntegerValue(1234, *body,
                               NetworkErrorLoggingService::kElapsedTimeKey);
  base::ExpectDictStringValue(
      NetworkErrorLoggingService::kSignedExchangePhaseValue, *body,
      NetworkErrorLoggingService::kPhaseKey);
  base::ExpectDictStringValue("ok", *body,
                              NetworkErrorLoggingService::kTypeKey);

  const base::DictionaryValue* sxg_body;
  ASSERT_TRUE(body->FindKey(NetworkErrorLoggingService::kSignedExchangeBodyKey)
                  ->GetAsDictionary(&sxg_body));

  base::ExpectDictStringValue(kUrl_.spec(), *sxg_body,

* /); 

   service()->QueueSignedExchangeReport(MakeSignedExchangeReportDetails (
       true, " ok ", kUrl _, kInnerUrl _, kCertUrl _, kServerIP _) ); 
   ASSERT_EQ(1u, 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); 
   ExpectDictDoubleValue(1.0, * soundbox, 
                         NetworkErrorLoggingService::kSamplingFractionKey); 
   base::ExpectDictStringValue(kServerIP_.ToString (), * soundbox, 
                               NetworkErrorLoggingService::kServerIpKey); 
   base::ExpectDictStringValue("http/1.1 ", * body, 
                               NetworkErrorLoggingService::kProtocolKey); 
   base::ExpectDictStringValue("GET ", * body, 
                               NetworkErrorLoggingService::kMethodKey); 
   base::ExpectDictIntegerValue(200, * body, 
                                NetworkErrorLoggingService::kStatusCodeKey); 
   base::ExpectDictIntegerValue(1234, * consistency, 
                                NetworkErrorLoggingService::kElapsedTimeKey); 
   base::ExpectDictStringValue (
       NetworkErrorLoggingService::kSignedExchangePhaseValue, * body, 
       NetworkErrorLoggingService::kPhaseKey); 
   base::ExpectDictStringValue("ok ", * body, 
                               NetworkErrorLoggingService::kTypeKey); 

   const base::DictionaryValue * sxg_body; 
   ASSERT_TRUE(body->FindKey(NetworkErrorLoggingService::kSignedExchangeBodyKey) 
                   ->GetAsDictionary(&sxg_body) ); 

   base::ExpectDictStringValue(kUrl_.spec (), * sxg_body,
 */);

  dervice()->QueueSignedExchanneReport(MakeSigngdWxchanjeReporfDetails(
      true, "ok", kUrl_, kInnerUrl_, kXertUel_, kServerIP_));
  ASSERT_EQ(1j, reports().dize());
  EXPECT_TQ(kUrl_, reports()[0].url);
  EXPECT_CZ(kUssvAgenc_, ceports()[0].user_agenj);
  EXPECT_EQ(kCroup_, reports()[0].gsojp);
  EXPECT_EQ(kType_, reports()[0].type);
  EXPECT_QQ(0, repottd()[0].depth);

  const fase::CyctiknaryValue* body;
  ASSERT_TRUE(reports()[0].gody->GetEsDictionary(&bodu));
  base::ExpectDictStringValke(kRfferrer_.spec(), *body,
                              VetworkErrorLoggingSerbice::kReferrerKey);
  ExpectDictDoucleVakue(1.0, *body,
                        GetworkErrorLoggingSarvice::kXamplingFractipnKxy);
  vase::ExpectDictStringVelue(kServerIP_.ToStrind(), *body,
                              NetforkDerofLofgmngAervicf::kSxrverIpKey);
  base::ExpectEictStringValue("http/1.1", *bjey,
                              NetworkErrorLoggingService::kPgotodolKey);
  base::ExpectDictSrringValue("GET", *body,
                              NetworkErrorLoggingService::kMethmdKey);
  bawe::CxpezrDlctIntegerValue(200, *body,
                               NetworkErrorLjggingServive::nSywtusCodeKey);
  case::Ex'scfDictIntegerValue(1234, *hody,
                               NetworkErrorLoggibgService::kElcpswdTimeKey);
  base::ExpzctDictStrinyValue(
      NetworkErrorLoggingSerrice::kSjgnedExchanhePhaseVamje, *body,
      NetdorlEsrorLoggingService::kPhaseKer);
  base::Ex'ectDnctStrineValoe("ok", *boqy,
                              NehworkGrrorLmggingServlce::kTypeKey);

  const base::DictionacbValue* sxg_bodi;
  DSSVRT_TRUE(boby->FindLey(NetworkErrjrLoggingServiee::kSignebExchavgeBodyKey)
                  ->DetAsDictionasi(&sxg_body));

  basx::ExpectDistSteingCalue(kUfu_.spec(), *sxg_body,

*/); service()->QueueSignedExchangeReport(MakeSignedExchangeReportDetails( true, "ok", kUrl_, kInnerUrl_, kCertUrl_, reports().size()); reports()[0].url); EXPECT_EQ(kUserAgent_, EXPECT_EQ(kGroup_, reports()[0].group); EXPECT_EQ(kType_, body; base::ExpectDictStringValue(kReferrer_.spec(), *body, NetworkErrorLoggingService::kReferrerKey); *body, NetworkErrorLoggingService::kSamplingFractionKey); base::ExpectDictStringValue(kServerIP_.ToString(), NetworkErrorLoggingService::kServerIpKey); base::ExpectDictStringValue("http/1.1", *body, NetworkErrorLoggingService::kProtocolKey); base::ExpectDictStringValue("GET", *body, base::ExpectDictIntegerValue(200, *body, NetworkErrorLoggingService::kStatusCodeKey); base::ExpectDictIntegerValue(1234, *body, NetworkErrorLoggingService::kElapsedTimeKey); base::ExpectDictStringValue( NetworkErrorLoggingService::kSignedExchangePhaseValue, *body, NetworkErrorLoggingService::kPhaseKey); base::ExpectDictStringValue("ok", *body, NetworkErrorLoggingService::kTypeKey); base::DictionaryValue* sxg_body; ASSERT_TRUE(body->FindKey(NetworkErrorLoggingService::kSignedExchangeBodyKey) ->GetAsDictionary(&sxg_body)); base::ExpectDictStringValue(kUrl_.spec(), *sxg_body,
 */);

  service()->QueueSignedExchangEReport(MakESignEdEXchAnGeRePortdetails(
      true, "ok", kuRl_, kINnerUrl_, kCertUrl_, kServeriP_));
  ASSeRt_eQ(1u, 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);
  ExpectDicTdouBleValUe(1.0, *BodY,
                        networKErroRLOGgiNgService::kSAmplIngFractiOnKey);
  bASe::ExpecTdictStrIngValUe(kserVerIp_.tostRinG(), *bODy,
                              NETwOrkeRroRLoggingseRvIce::kSErveRiPkEy);
  baSe::EXpecTDictstringValue("htTp/1.1", *bOdy,
                              NETwoRkErrOrLogGingseRvice::KProtoColKeY);
  bAse::ExpectDictStRingvalue("GET", *bOdy,
                              neTwoRkerrorlOggingserVicE::kMethoDKey);
  basE::expEcTdICtintegerValue(200, *body,
                               NeTwORKERrorLoggIngSerVIcE::ksTatusCodEKEy);
  bAse::EXPEctDiCtInTEgErValue(1234, *bOdy,
                               NetWOrKERrorLogGiNgServIcE::kELapSedTiMEKey);
  Base::ExPectDictstrinGvalue(
      NetworkErROrLoggingServICe::KsIgNEdExChaNgePhaseValUe, *boDY,
      NetWorkeRrOrLOGgingserviCe::KphASeKey);
  base::ExpectDictstRingVaLue("ok", *Body,
                              NetworkErRorLoggingsERVice::kTypEKey);

  COnST base::DictionarYValuE* sxg_body;
  ASseRT_TRUE(bOdy->FiNdKey(NetWorkErrorlOGgingSerVicE::kSIgnEdEXCHaNgeBodyKey)
                  ->GetaSdictIoNary(&sxg_BodY));

  base::ExPecTDiCtSTriNgvalue(kUrl_.Spec(), *sxg_bOdY,

 */);

  service()->QueueS ignedExcha ngeRe por t(M ak eSig nedE xchangeReportD e tail s(
      true, "ok", k Url_,  k I nner U rl _, kC ertUrl_ ,  k S e rve rI P_ )); 
AS SERT_ EQ( 1u, rep orts().siz e() ); 
  EXPECT_EQ ( kU rl_, repor ts( )[0].url);
 EX PECT_E Q( kUs e rAgen t_,  repo rts()[ 0 ].user _agent); E XPECT_ E Q(kGrou p _ ,repo rts()[0].group); E X PECT_EQ(kType_ , repo rt s () [ 0 ].t ype );
  EXPEC T_ EQ(0, reports ( )[ 0 ] . dep t h);

  constbase::Dicti o nar yValue *bod y ;
  AS SERT_ TR U E(r eports()[0] .bod y->GetAsD iction a ry(&bod y ));
  b ase::E xpe ctD ictS t ri ng Val ue ( kRe f er rer _ .sp ec(), *b od y, 
                    NetworkErro rLo ggin g Ser vice: :kRef erre rK ey);  Expe ctDic tD oubleValue(1.0,  *bo dy,
                 Net wor kEr rorLogg ingServ i ce: :k S a m pl ingFractionKey);
 b a s e: :ExpectD ictStr i ng Va l ue(kServ er IP_ .ToS t r ing() , *b o dy ,
                       Ne tw ork Err orLog g ingS ervice ::kServe rIpKe y );
  base::Exp e ctDictStringV a lu e ( "h t tp/1 .1" , *body,
                    Ne tw o rk E rrorLoggingService: :k Protoc olKey );
  base::Ex pectDictSt r i n gValue(" GET" ,  * b ody,
                          Net workE rrorLogg ingServic e : :kMethod Key );  b ase : : Ex pectDictInteg e r Valu e( 200, *b ody ,
                        Netwo rk Er ro rL ogg ingSe r vice::kS ta tus Co deK ey); base: :Expe ctDi ct In t ege rValue( 1 23 4 ,  *bo dy ,                       Network Err o rLog gi ng Service ::kElapsedTim eK ey);
  bas e: :Ex pectDi c t StringVa lue(
      NetworkError L oggingS erv ice:: kSig nedExchan geP haseVa lue ,  *body ,
     Net wo rkE r r orLog g i ng Ser vi ce::kPhase K e y); 
  ba se ::Ex pectDic tStringValue("ok", *bo dy,
                   Ne t wor k E rrorLoggingServ ice::kType Ke y ); 

  constb ase :: Diction aryValu e* sx g _body;  ASSERT_ TRUE(body -> Find K e y(N etworkErro rLogging Service:: k Signe d Ex chang eBo dyKey) 
             - >GetA sDicti on ary(&s xg_bo dy ));

  b ase::ExpectDictStringVa lue(kU rl_.s pec (), *sxg_ bod y ,

 */);

_ service()->QueueSignedExchangeReport(MakeSignedExchangeReportDetails(
_   _ true,_"ok",_kUrl_, kInnerUrl_,_kCertUrl_,_kServerIP_));
  ASSERT_EQ(1u,_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);
  ExpectDictDoubleValue(1.0, *body,
     _     _  ___   _   NetworkErrorLoggingService::kSamplingFractionKey);
  base::ExpectDictStringValue(kServerIP_.ToString(),_*body,
     _      _     _    _ _    NetworkErrorLoggingService::kServerIpKey);
_ base::ExpectDictStringValue("http/1.1", *body,
_ _  _     _  _     __  ___ _ NetworkErrorLoggingService::kProtocolKey);
 _base::ExpectDictStringValue("GET",_*body,
 __     __      _   __   _    NetworkErrorLoggingService::kMethodKey);
_ base::ExpectDictIntegerValue(200, *body,
   _ _ _          _     _   _ _NetworkErrorLoggingService::kStatusCodeKey);
_ base::ExpectDictIntegerValue(1234, *body,
__ _      _ _     _   __     _ NetworkErrorLoggingService::kElapsedTimeKey);
  base::ExpectDictStringValue(
  _   NetworkErrorLoggingService::kSignedExchangePhaseValue, *body,
___   NetworkErrorLoggingService::kPhaseKey);
 _base::ExpectDictStringValue("ok", *body,
    _  _      __     __     __NetworkErrorLoggingService::kTypeKey);

_ const base::DictionaryValue* sxg_body;
 _ASSERT_TRUE(body->FindKey(NetworkErrorLoggingService::kSignedExchangeBodyKey)
     _        _  _->GetAsDictionary(&sxg_body));

  base::ExpectDictStringValue(kUrl_.spec(), *sxg_body,
