| Index: net/url_request/url_request_unittest.cc
|
| diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
|
| index 328d53b81091a6faab351c398c38a2129ca8acc9..1e88c34747a988b5a12230e1c977b190ed93b16f 100644
|
| --- a/net/url_request/url_request_unittest.cc
|
| +++ b/net/url_request/url_request_unittest.cc
|
| @@ -675,9 +675,12 @@ class MockCertificateReportSender
|
| MockCertificateReportSender() {}
|
| ~MockCertificateReportSender() override {}
|
|
|
| - void Send(const GURL& report_uri, const std::string& report) override {
|
| + void Send(const GURL& report_uri,
|
| + const std::string& content_type,
|
| + const std::string& report) override {
|
| latest_report_uri_ = report_uri;
|
| latest_report_ = report;
|
| + latest_content_type_ = content_type;
|
| }
|
|
|
| void SetErrorCallback(
|
| @@ -685,10 +688,12 @@ class MockCertificateReportSender
|
|
|
| const GURL& latest_report_uri() { return latest_report_uri_; }
|
| const std::string& latest_report() { return latest_report_; }
|
| + const std::string& latest_content_type() { return latest_content_type_; }
|
|
|
| private:
|
| GURL latest_report_uri_;
|
| std::string latest_report_;
|
| + std::string latest_content_type_;
|
| };
|
|
|
| class TestExperimentalFeaturesNetworkDelegate : public TestNetworkDelegate {
|
| @@ -6022,6 +6027,7 @@ TEST_F(URLRequestTestHTTP, ProcessPKPAndSendReport) {
|
| // Check that a report was sent.
|
| EXPECT_EQ(report_uri, mock_report_sender.latest_report_uri());
|
| ASSERT_FALSE(mock_report_sender.latest_report().empty());
|
| + EXPECT_EQ("application/json", mock_report_sender.latest_content_type());
|
| std::unique_ptr<base::Value> value(
|
| base::JSONReader::Read(mock_report_sender.latest_report()));
|
| ASSERT_TRUE(value);
|
| @@ -6085,6 +6091,7 @@ TEST_F(URLRequestTestHTTP, ProcessPKPReportOnly) {
|
| // Check that a report was sent.
|
| EXPECT_EQ(report_uri, mock_report_sender.latest_report_uri());
|
| ASSERT_FALSE(mock_report_sender.latest_report().empty());
|
| + EXPECT_EQ("application/json", mock_report_sender.latest_content_type());
|
| std::unique_ptr<base::Value> value(
|
| base::JSONReader::Read(mock_report_sender.latest_report()));
|
| ASSERT_TRUE(value);
|
|
|