Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/url_request/sdch_dictionary_fetcher_unittest.cc ('k') | sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698