| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 : public TransportSecurityState::ReportSender { | 682 : public TransportSecurityState::ReportSender { |
| 683 public: | 683 public: |
| 684 MockCertificateReportSender() {} | 684 MockCertificateReportSender() {} |
| 685 ~MockCertificateReportSender() override {} | 685 ~MockCertificateReportSender() override {} |
| 686 | 686 |
| 687 void Send(const GURL& report_uri, const std::string& report) override { | 687 void Send(const GURL& report_uri, const std::string& report) override { |
| 688 latest_report_uri_ = report_uri; | 688 latest_report_uri_ = report_uri; |
| 689 latest_report_ = report; | 689 latest_report_ = report; |
| 690 } | 690 } |
| 691 | 691 |
| 692 void SetErrorCallback( |
| 693 const base::Callback<void(GURL, int)>& error_callback) override {} |
| 694 |
| 692 const GURL& latest_report_uri() { return latest_report_uri_; } | 695 const GURL& latest_report_uri() { return latest_report_uri_; } |
| 693 const std::string& latest_report() { return latest_report_; } | 696 const std::string& latest_report() { return latest_report_; } |
| 694 | 697 |
| 695 private: | 698 private: |
| 696 GURL latest_report_uri_; | 699 GURL latest_report_uri_; |
| 697 std::string latest_report_; | 700 std::string latest_report_; |
| 698 }; | 701 }; |
| 699 | 702 |
| 700 class TestExperimentalFeaturesNetworkDelegate : public TestNetworkDelegate { | 703 class TestExperimentalFeaturesNetworkDelegate : public TestNetworkDelegate { |
| 701 public: | 704 public: |
| (...skipping 9392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10094 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 10097 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
| 10095 | 10098 |
| 10096 req->Start(); | 10099 req->Start(); |
| 10097 req->Cancel(); | 10100 req->Cancel(); |
| 10098 base::RunLoop().RunUntilIdle(); | 10101 base::RunLoop().RunUntilIdle(); |
| 10099 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); | 10102 EXPECT_EQ(URLRequestStatus::CANCELED, req->status().status()); |
| 10100 EXPECT_EQ(0, d.received_redirect_count()); | 10103 EXPECT_EQ(0, d.received_redirect_count()); |
| 10101 } | 10104 } |
| 10102 | 10105 |
| 10103 } // namespace net | 10106 } // namespace net |
| OLD | NEW |