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

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

Issue 2249813002: Create EXPECT_QUIC_BUG macro, and modify QUIC tests to use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('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 <sys/epoll.h> 6 #include <sys/epoll.h>
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 ReliableQuicStreamPeer::SetStreamBytesWritten(3, stream); 1187 ReliableQuicStreamPeer::SetStreamBytesWritten(3, stream);
1188 1188
1189 client_->SendData("bar", true); 1189 client_->SendData("bar", true);
1190 client_->WaitForWriteToFlush(); 1190 client_->WaitForWriteToFlush();
1191 1191
1192 // By default the stream protects itself from writes after terminte is set. 1192 // By default the stream protects itself from writes after terminte is set.
1193 // Override this to test the server handling buggy clients. 1193 // Override this to test the server handling buggy clients.
1194 ReliableQuicStreamPeer::SetWriteSideClosed(false, 1194 ReliableQuicStreamPeer::SetWriteSideClosed(false,
1195 client_->GetOrCreateStream()); 1195 client_->GetOrCreateStream());
1196 1196
1197 EXPECT_DFATAL(client_->SendData("eep", true), "Fin already buffered"); 1197 EXPECT_QUIC_BUG(client_->SendData("eep", true), "Fin already buffered");
1198 } 1198 }
1199 1199
1200 TEST_P(EndToEndTest, Timeout) { 1200 TEST_P(EndToEndTest, Timeout) {
1201 client_config_.SetIdleConnectionStateLifetime( 1201 client_config_.SetIdleConnectionStateLifetime(
1202 QuicTime::Delta::FromMicroseconds(500), 1202 QuicTime::Delta::FromMicroseconds(500),
1203 QuicTime::Delta::FromMicroseconds(500)); 1203 QuicTime::Delta::FromMicroseconds(500));
1204 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake: 1204 // Note: we do NOT ASSERT_TRUE: we may time out during initial handshake:
1205 // that's enough to validate timeout in this case. 1205 // that's enough to validate timeout in this case.
1206 Initialize(); 1206 Initialize();
1207 while (client_->client()->connected()) { 1207 while (client_->client()->connected()) {
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 EXPECT_EQ(kBarResponseBody, client_->response_body()); 2876 EXPECT_EQ(kBarResponseBody, client_->response_body());
2877 QuicConnectionStats client_stats = 2877 QuicConnectionStats client_stats =
2878 client_->client()->session()->connection()->GetStats(); 2878 client_->client()->session()->connection()->GetStats();
2879 EXPECT_EQ(0u, client_stats.packets_lost); 2879 EXPECT_EQ(0u, client_stats.packets_lost);
2880 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos()); 2880 EXPECT_EQ(1, client_->client()->GetNumSentClientHellos());
2881 } 2881 }
2882 2882
2883 } // namespace 2883 } // namespace
2884 } // namespace test 2884 } // namespace test
2885 } // namespace net 2885 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698