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

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

Issue 1662763002: [ON HOLD] Implement pull-based design for content decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 8 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) 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 &delegate_)) { 806 &delegate_)) {
807 } 807 }
808 808
809 TestDelegate delegate_; 809 TestDelegate delegate_;
810 std::unique_ptr<URLRequest> req_; 810 std::unique_ptr<URLRequest> req_;
811 }; 811 };
812 812
813 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { 813 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper {
814 public: 814 public:
815 // GoogleMock does not appear to play nicely with move-only types like 815 // GoogleMock does not appear to play nicely with move-only types like
816 // scoped_ptr, so this forwarding method acts as a workaround. 816 // std::unique_ptr, so this forwarding method acts as a workaround.
817 WebSocketHandshakeStreamBase* CreateBasicStream( 817 WebSocketHandshakeStreamBase* CreateBasicStream(
818 std::unique_ptr<ClientSocketHandle> connection, 818 std::unique_ptr<ClientSocketHandle> connection,
819 bool using_proxy) override { 819 bool using_proxy) override {
820 // Discard the arguments since we don't need them anyway. 820 // Discard the arguments since we don't need them anyway.
821 return CreateBasicStreamMock(); 821 return CreateBasicStreamMock();
822 } 822 }
823 823
824 MOCK_METHOD0(CreateBasicStreamMock, 824 MOCK_METHOD0(CreateBasicStreamMock,
825 WebSocketHandshakeStreamBase*()); 825 WebSocketHandshakeStreamBase*());
826 826
(...skipping 113 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

Powered by Google App Engine
This is Rietveld 408576698