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

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

Issue 786123002: Update from https://crrev.com/307330 (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/spdy/spdy_test_util_common.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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 // Now verify that the server is not waiting for a final FIN or RST. 1340 // Now verify that the server is not waiting for a final FIN or RST.
1341 server_thread_->Pause(); 1341 server_thread_->Pause();
1342 QuicDispatcher* dispatcher = 1342 QuicDispatcher* dispatcher =
1343 QuicServerPeer::GetDispatcher(server_thread_->server()); 1343 QuicServerPeer::GetDispatcher(server_thread_->server());
1344 QuicSession* session = dispatcher->session_map().begin()->second; 1344 QuicSession* session = dispatcher->session_map().begin()->second;
1345 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( 1345 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(
1346 session).size()); 1346 session).size());
1347 server_thread_->Resume(); 1347 server_thread_->Resume();
1348 } 1348 }
1349 1349
1350 TEST_P(EndToEndTest, EnablePacingViaFlag) {
1351 // When pacing is enabled via command-line flag, it will always be enabled,
1352 // regardless of the config. or the specific congestion-control algorithm.
1353 ValueRestore<bool> old_flag(&FLAGS_quic_enable_pacing, true);
1354 ASSERT_TRUE(Initialize());
1355
1356 client_->client()->WaitForCryptoHandshakeConfirmed();
1357 server_thread_->WaitForCryptoHandshakeConfirmed();
1358
1359 // Pause the server so we can access the server's internals without races.
1360 server_thread_->Pause();
1361 QuicDispatcher* dispatcher =
1362 QuicServerPeer::GetDispatcher(server_thread_->server());
1363 ASSERT_EQ(1u, dispatcher->session_map().size());
1364 const QuicSentPacketManager& client_sent_packet_manager =
1365 client_->client()->session()->connection()->sent_packet_manager();
1366 const QuicSentPacketManager& server_sent_packet_manager =
1367 *GetSentPacketManagerFromFirstServerSession();
1368 EXPECT_TRUE(server_sent_packet_manager.using_pacing());
1369 EXPECT_TRUE(client_sent_packet_manager.using_pacing());
1370 }
1371
1350 } // namespace 1372 } // namespace
1351 } // namespace test 1373 } // namespace test
1352 } // namespace tools 1374 } // namespace tools
1353 } // namespace net 1375 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/tools/quic/quic_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698