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

Side by Side Diff: net/quic/quic_chromium_client_session_test.cc

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" 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
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 "net/quic/quic_chromium_client_session.h" 5 #include "net/quic/quic_chromium_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 kQuicYieldAfterDurationMilliseconds), 377 kQuicYieldAfterDurationMilliseconds),
378 bound_net_log_.bound())); 378 bound_net_log_.bound()));
379 std::unique_ptr<QuicPacketWriter> new_writer( 379 std::unique_ptr<QuicPacketWriter> new_writer(
380 CreateQuicPacketWriter(new_socket.get(), session_->connection())); 380 CreateQuicPacketWriter(new_socket.get(), session_->connection()));
381 381
382 // Migrate session. 382 // Migrate session.
383 EXPECT_TRUE(session_->MigrateToSocket( 383 EXPECT_TRUE(session_->MigrateToSocket(
384 std::move(new_socket), std::move(new_reader), std::move(new_writer))); 384 std::move(new_socket), std::move(new_reader), std::move(new_writer)));
385 385
386 // Write data to session. 386 // Write data to session.
387 QuicChromiumClientStream* stream =
388 session_->CreateOutgoingDynamicStream(kDefaultPriority);
387 struct iovec iov[1]; 389 struct iovec iov[1];
388 iov[0].iov_base = data; 390 iov[0].iov_base = data;
389 iov[0].iov_len = 4; 391 iov[0].iov_len = 4;
390 session_->WritevData(5, QuicIOVector(iov, arraysize(iov), 4), 0, false, 392 session_->WritevData(stream, stream->id(),
391 nullptr); 393 QuicIOVector(iov, arraysize(iov), 4), 0, false, nullptr);
392 394
393 EXPECT_TRUE(socket_data.AllReadDataConsumed()); 395 EXPECT_TRUE(socket_data.AllReadDataConsumed());
394 EXPECT_TRUE(socket_data.AllWriteDataConsumed()); 396 EXPECT_TRUE(socket_data.AllWriteDataConsumed());
395 } 397 }
396 398
397 TEST_P(QuicChromiumClientSessionTest, MigrateToSocketMaxReaders) { 399 TEST_P(QuicChromiumClientSessionTest, MigrateToSocketMaxReaders) {
398 Initialize(); 400 Initialize();
399 CompleteCryptoHandshake(); 401 CompleteCryptoHandshake();
400 402
401 for (size_t i = 0; i < kMaxReadersPerQuicSession; ++i) { 403 for (size_t i = 0; i < kMaxReadersPerQuicSession; ++i) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 session_->connection()->SendPing(); 549 session_->connection()->SendPing();
548 EXPECT_FALSE(session_->connection()->connected()); 550 EXPECT_FALSE(session_->connection()->connected());
549 551
550 EXPECT_TRUE(socket_data.AllReadDataConsumed()); 552 EXPECT_TRUE(socket_data.AllReadDataConsumed());
551 EXPECT_TRUE(socket_data.AllWriteDataConsumed()); 553 EXPECT_TRUE(socket_data.AllWriteDataConsumed());
552 } 554 }
553 555
554 } // namespace 556 } // namespace
555 } // namespace test 557 } // namespace test
556 } // namespace net 558 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/quic_chromium_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698