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

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

Issue 12334063: Land recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more EXPECT_FALSE Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_stream_factory_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 "net/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 #include "net/quic/quic_connection.h" 6 #include "net/quic/quic_connection.h"
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 session_.MarkWriteBlocked(6); 191 session_.MarkWriteBlocked(6);
192 session_.MarkWriteBlocked(4); 192 session_.MarkWriteBlocked(4);
193 CloseStream(6); 193 CloseStream(6);
194 194
195 InSequence s; 195 InSequence s;
196 EXPECT_CALL(*stream2, OnCanWrite()); 196 EXPECT_CALL(*stream2, OnCanWrite());
197 EXPECT_CALL(*stream4, OnCanWrite()); 197 EXPECT_CALL(*stream4, OnCanWrite());
198 EXPECT_TRUE(session_.OnCanWrite()); 198 EXPECT_TRUE(session_.OnCanWrite());
199 } 199 }
200 200
201 TEST_F(QuicSessionTest, SendGoAway) {
202 // After sending a GoAway, ensure new incoming streams cannot be created and
203 // result in a RST being sent.
204 EXPECT_CALL(*connection_,
205 SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away."));
206 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
207 EXPECT_TRUE(session_.goaway_sent());
208
209 EXPECT_CALL(*connection_, SendRstStream(3u, QUIC_PEER_GOING_AWAY));
210 EXPECT_FALSE(session_.GetIncomingReliableStream(3u));
211 }
201 } // namespace 212 } // namespace
202 } // namespace test 213 } // namespace test
203 } // namespace net 214 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698