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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/tools/dump_cache/simple_cache_dumper.cc ('k') | net/tools/quic/quic_client.h » ('j') | 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) 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 <stddef.h> 5 #include <stddef.h>
6 #include <string> 6 #include <string>
7 #include <sys/epoll.h> 7 #include <sys/epoll.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 QuicTime::Delta::FromMicroseconds(500)); 847 QuicTime::Delta::FromMicroseconds(500));
848 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake: 848 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake:
849 // that's enough to validate timeout in this case. 849 // that's enough to validate timeout in this case.
850 Initialize(); 850 Initialize();
851 while (client_->client()->connected()) { 851 while (client_->client()->connected()) {
852 client_->client()->WaitForEvents(); 852 client_->client()->WaitForEvents();
853 } 853 }
854 } 854 }
855 855
856 TEST_P(EndToEndTest, NegotiateMaxOpenStreams) { 856 TEST_P(EndToEndTest, NegotiateMaxOpenStreams) {
857 ValueRestore<bool> old_flag(&FLAGS_quic_allow_more_open_streams, true);
858
859 // Negotiate 1 max open stream. 857 // Negotiate 1 max open stream.
860 client_config_.SetMaxStreamsPerConnection(1, 1); 858 client_config_.SetMaxStreamsPerConnection(1, 1);
861 ASSERT_TRUE(Initialize()); 859 ASSERT_TRUE(Initialize());
862 client_->client()->WaitForCryptoHandshakeConfirmed(); 860 client_->client()->WaitForCryptoHandshakeConfirmed();
863 861
864 // Make the client misbehave after negotiation. 862 // Make the client misbehave after negotiation.
865 const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1; 863 const int kServerMaxStreams = kMaxStreamsMinimumIncrement + 1;
866 QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(), 864 QuicSessionPeer::SetMaxOpenStreams(client_->client()->session(),
867 kServerMaxStreams + 1); 865 kServerMaxStreams + 1);
868 866
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 QuicSession* session = dispatcher->session_map().begin()->second; 1344 QuicSession* session = dispatcher->session_map().begin()->second;
1347 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( 1345 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(
1348 session).size()); 1346 session).size());
1349 server_thread_->Resume(); 1347 server_thread_->Resume();
1350 } 1348 }
1351 1349
1352 } // namespace 1350 } // namespace
1353 } // namespace test 1351 } // namespace test
1354 } // namespace tools 1352 } // namespace tools
1355 } // namespace net 1353 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/dump_cache/simple_cache_dumper.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698