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

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

Issue 1922403002: Move bool enable_brotli from HttpNetworkSession::Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittest fix Created 4 years, 7 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
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <memory> 10 #include <memory>
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 // Cleanup manager. 699 // Cleanup manager.
700 sdch_manager.RemoveObserver(&sdch_observer); 700 sdch_manager.RemoveObserver(&sdch_observer);
701 } 701 }
702 702
703 class URLRequestHttpJobWithBrotliSupportTest : public ::testing::Test { 703 class URLRequestHttpJobWithBrotliSupportTest : public ::testing::Test {
704 protected: 704 protected:
705 URLRequestHttpJobWithBrotliSupportTest() 705 URLRequestHttpJobWithBrotliSupportTest()
706 : context_(new TestURLRequestContext(true)) { 706 : context_(new TestURLRequestContext(true)) {
707 std::unique_ptr<HttpNetworkSession::Params> params( 707 std::unique_ptr<HttpNetworkSession::Params> params(
708 new HttpNetworkSession::Params); 708 new HttpNetworkSession::Params);
709 params->enable_brotli = true; 709 context_->set_enable_brotli(true);
710 context_->set_http_network_session_params(std::move(params)); 710 context_->set_http_network_session_params(std::move(params));
711 context_->set_client_socket_factory(&socket_factory_); 711 context_->set_client_socket_factory(&socket_factory_);
712 context_->Init(); 712 context_->Init();
713 } 713 }
714 714
715 MockClientSocketFactory socket_factory_; 715 MockClientSocketFactory socket_factory_;
716 std::unique_ptr<TestURLRequestContext> context_; 716 std::unique_ptr<TestURLRequestContext> context_;
717 }; 717 };
718 718
719 TEST_F(URLRequestHttpJobWithBrotliSupportTest, NoBrotliAdvertisementOverHttp) { 719 TEST_F(URLRequestHttpJobWithBrotliSupportTest, NoBrotliAdvertisementOverHttp) {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 base::RunLoop().RunUntilIdle(); 940 base::RunLoop().RunUntilIdle();
941 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); 941 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status());
942 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); 942 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
943 } 943 }
944 944
945 #endif // !defined(OS_IOS) 945 #endif // !defined(OS_IOS)
946 946
947 } // namespace 947 } // namespace
948 948
949 } // namespace net 949 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698