| Index: net/url_request/report_sender_unittest.cc
|
| diff --git a/net/url_request/report_sender_unittest.cc b/net/url_request/report_sender_unittest.cc
|
| index 3865730ea088ae8b0a3b6665b5fbf5f82234b9fe..31a1b7e4209e2f5939c9ba756b31926a69718b30 100644
|
| --- a/net/url_request/report_sender_unittest.cc
|
| +++ b/net/url_request/report_sender_unittest.cc
|
| @@ -49,12 +49,15 @@ void CheckUploadData(const URLRequest& request,
|
|
|
| // Provides an error callback for report sending that sets |called| to
|
| // true.
|
| -void ErrorCallback(bool* called, const GURL& report_uri, int net_error) {
|
| +void ErrorCallback(bool* called,
|
| + const GURL& report_uri,
|
| + int net_error,
|
| + int response_code) {
|
| EXPECT_NE(OK, net_error);
|
| *called = true;
|
| }
|
|
|
| -void SuccessCallback(bool* called) {
|
| +void SuccessCallback(bool* called, int response_code) {
|
| *called = true;
|
| }
|
|
|
| @@ -164,8 +167,8 @@ class ReportSenderTest : public ::testing::Test {
|
| const std::string& report,
|
| const GURL& url,
|
| size_t request_sequence_number,
|
| - const base::Callback<void()>& success_callback,
|
| - const base::Callback<void(const GURL&, int)>& error_callback) {
|
| + const base::Callback<void(int)>& success_callback,
|
| + const base::Callback<void(const GURL&, int, int)>& error_callback) {
|
| base::RunLoop run_loop;
|
| network_delegate_.set_url_request_destroyed_callback(
|
| run_loop.QuitClosure());
|
| @@ -191,8 +194,9 @@ class ReportSenderTest : public ::testing::Test {
|
| const std::string& report,
|
| const GURL& url,
|
| size_t request_sequence_number) {
|
| - SendReport(reporter, report, url, request_sequence_number, base::Closure(),
|
| - base::Callback<void(const GURL&, int)>());
|
| + SendReport(reporter, report, url, request_sequence_number,
|
| + base::Callback<void(int)>(),
|
| + base::Callback<void(const GURL&, int, int)>());
|
| }
|
|
|
| TestReportSenderNetworkDelegate network_delegate_;
|
| @@ -231,10 +235,12 @@ TEST_F(ReportSenderTest, SendMultipleReportsSimultaneously) {
|
|
|
| EXPECT_EQ(0u, network_delegate_.num_requests());
|
|
|
| - reporter.Send(url, "application/foobar", kDummyReport, base::Closure(),
|
| - base::Callback<void(const GURL&, int)>());
|
| - reporter.Send(url, "application/foobar", kSecondDummyReport, base::Closure(),
|
| - base::Callback<void(const GURL&, int)>());
|
| + reporter.Send(url, "application/foobar", kDummyReport,
|
| + base::Callback<void(int)>(),
|
| + base::Callback<void(const GURL&, int, int)>());
|
| + reporter.Send(url, "application/foobar", kSecondDummyReport,
|
| + base::Callback<void(int)>(),
|
| + base::Callback<void(const GURL&, int, int)>());
|
|
|
| run_loop.Run();
|
|
|
| @@ -258,8 +264,9 @@ TEST_F(ReportSenderTest, PendingRequestGetsDeleted) {
|
|
|
| std::unique_ptr<ReportSender> reporter(
|
| new ReportSender(context(), ReportSender::DO_NOT_SEND_COOKIES));
|
| - reporter->Send(url, "application/foobar", kDummyReport, base::Closure(),
|
| - base::Callback<void(const GURL&, int)>());
|
| + reporter->Send(url, "application/foobar", kDummyReport,
|
| + base::Callback<void(int)>(),
|
| + base::Callback<void(const GURL&, int, int)>());
|
| reporter.reset();
|
|
|
| EXPECT_EQ(1u, network_delegate_.num_requests());
|
|
|