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

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

Issue 2842263003: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: clean Created 3 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
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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 TEST_F(URLRequestHttpJobWebSocketTest, CreateHelperPassedThrough) { 1180 TEST_F(URLRequestHttpJobWebSocketTest, CreateHelperPassedThrough) {
1181 std::unique_ptr<MockCreateHelper> create_helper( 1181 std::unique_ptr<MockCreateHelper> create_helper(
1182 new ::testing::StrictMock<MockCreateHelper>()); 1182 new ::testing::StrictMock<MockCreateHelper>());
1183 FakeWebSocketHandshakeStream* fake_handshake_stream( 1183 FakeWebSocketHandshakeStream* fake_handshake_stream(
1184 new FakeWebSocketHandshakeStream); 1184 new FakeWebSocketHandshakeStream);
1185 // Ownership of fake_handshake_stream is transferred when CreateBasicStream() 1185 // Ownership of fake_handshake_stream is transferred when CreateBasicStream()
1186 // is called. 1186 // is called.
1187 EXPECT_CALL(*create_helper, CreateBasicStreamMock()) 1187 EXPECT_CALL(*create_helper, CreateBasicStreamMock())
1188 .WillOnce(Return(fake_handshake_stream)); 1188 .WillOnce(Return(fake_handshake_stream));
1189 req_->SetUserData(WebSocketHandshakeStreamBase::CreateHelper::DataKey(), 1189 req_->SetUserData(WebSocketHandshakeStreamBase::CreateHelper::DataKey(),
1190 create_helper.release()); 1190 std::move(create_helper));
1191 req_->SetLoadFlags(LOAD_DISABLE_CACHE); 1191 req_->SetLoadFlags(LOAD_DISABLE_CACHE);
1192 req_->Start(); 1192 req_->Start();
1193 base::RunLoop().RunUntilIdle(); 1193 base::RunLoop().RunUntilIdle();
1194 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING)); 1194 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING));
1195 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); 1195 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called());
1196 } 1196 }
1197 1197
1198 #endif // BUILDFLAG(ENABLE_WEBSOCKETS) 1198 #endif // BUILDFLAG(ENABLE_WEBSOCKETS)
1199 1199
1200 } // namespace 1200 } // namespace
1201 1201
1202 } // namespace net 1202 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/spawner_communicator.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698