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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #endif | 10 #endif |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 default_context_.set_net_log(&net_log_); | 611 default_context_.set_net_log(&net_log_); |
612 job_factory_impl_ = new URLRequestJobFactoryImpl(); | 612 job_factory_impl_ = new URLRequestJobFactoryImpl(); |
613 job_factory_.reset(job_factory_impl_); | 613 job_factory_.reset(job_factory_impl_); |
614 } | 614 } |
615 | 615 |
616 ~URLRequestTest() override { | 616 ~URLRequestTest() override { |
617 // URLRequestJobs may post clean-up tasks on destruction. | 617 // URLRequestJobs may post clean-up tasks on destruction. |
618 base::RunLoop().RunUntilIdle(); | 618 base::RunLoop().RunUntilIdle(); |
619 } | 619 } |
620 | 620 |
621 virtual void SetUp() { | 621 void SetUp() override { |
622 SetUpFactory(); | 622 SetUpFactory(); |
623 default_context_.set_job_factory(job_factory_.get()); | 623 default_context_.set_job_factory(job_factory_.get()); |
624 default_context_.Init(); | 624 default_context_.Init(); |
625 PlatformTest::SetUp(); | 625 PlatformTest::SetUp(); |
626 } | 626 } |
627 | 627 |
628 virtual void SetUpFactory() { | 628 virtual void SetUpFactory() { |
629 job_factory_impl_->SetProtocolHandler("data", new DataProtocolHandler); | 629 job_factory_impl_->SetProtocolHandler("data", new DataProtocolHandler); |
630 #if !defined(DISABLE_FILE_SUPPORT) | 630 #if !defined(DISABLE_FILE_SUPPORT) |
631 job_factory_impl_->SetProtocolHandler( | 631 job_factory_impl_->SetProtocolHandler( |
(...skipping 8185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8817 | 8817 |
8818 EXPECT_FALSE(r->is_pending()); | 8818 EXPECT_FALSE(r->is_pending()); |
8819 EXPECT_EQ(1, d->response_started_count()); | 8819 EXPECT_EQ(1, d->response_started_count()); |
8820 EXPECT_FALSE(d->received_data_before_response()); | 8820 EXPECT_FALSE(d->received_data_before_response()); |
8821 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 8821 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
8822 } | 8822 } |
8823 } | 8823 } |
8824 #endif // !defined(DISABLE_FTP_SUPPORT) | 8824 #endif // !defined(DISABLE_FTP_SUPPORT) |
8825 | 8825 |
8826 } // namespace net | 8826 } // namespace net |
OLD | NEW |