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

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: Fix components_unittests Created 4 years, 5 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 &delegate_)) { 838 &delegate_)) {
839 } 839 }
840 840
841 TestDelegate delegate_; 841 TestDelegate delegate_;
842 std::unique_ptr<URLRequest> req_; 842 std::unique_ptr<URLRequest> req_;
843 }; 843 };
844 844
845 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { 845 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper {
846 public: 846 public:
847 // GoogleMock does not appear to play nicely with move-only types like 847 // GoogleMock does not appear to play nicely with move-only types like
848 // scoped_ptr, so this forwarding method acts as a workaround. 848 // std::unique_ptr, so this forwarding method acts as a workaround.
849 WebSocketHandshakeStreamBase* CreateBasicStream( 849 WebSocketHandshakeStreamBase* CreateBasicStream(
850 std::unique_ptr<ClientSocketHandle> connection, 850 std::unique_ptr<ClientSocketHandle> connection,
851 bool using_proxy) override { 851 bool using_proxy) override {
852 // Discard the arguments since we don't need them anyway. 852 // Discard the arguments since we don't need them anyway.
853 return CreateBasicStreamMock(); 853 return CreateBasicStreamMock();
854 } 854 }
855 855
856 MOCK_METHOD0(CreateBasicStreamMock, 856 MOCK_METHOD0(CreateBasicStreamMock,
857 WebSocketHandshakeStreamBase*()); 857 WebSocketHandshakeStreamBase*());
858 858
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 base::RunLoop().RunUntilIdle(); 968 base::RunLoop().RunUntilIdle();
969 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); 969 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status());
970 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); 970 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
971 } 971 }
972 972
973 #endif // defined(ENABLE_WEBSOCKETS) 973 #endif // defined(ENABLE_WEBSOCKETS)
974 974
975 } // namespace 975 } // namespace
976 976
977 } // namespace net 977 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698