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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 813993002: Fix crash in handling PushStreams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix crash in handling PushStreams Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index ce537111a0b38e7d37a914011af335f57eda742d..c5398fc65fc8c3d616ea7d946f0bdd0449728cf3 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -1194,8 +1194,10 @@ TEST_P(SpdySessionTest, DeleteExpiredPushStreams) {
NULL, 0, 2, 1, "http://www.google.com/a.dat"));
scoped_ptr<SpdyFrame> push_a_body(
spdy_util_.ConstructSpdyBodyFrame(2, false));
+ // In ascii "0" < "a". We use it to verify that we properly handle std::map
+ // iterators inside. See http://crbug.com/443490
scoped_ptr<SpdyFrame> push_b(spdy_util_.ConstructSpdyPush(
- NULL, 0, 4, 1, "http://www.google.com/b.dat"));
+ NULL, 0, 4, 1, "http://www.google.com/0.dat"));
MockWrite writes[] = {CreateMockWrite(*req, 0), CreateMockWrite(*rst, 4)};
MockRead reads[] = {
CreateMockRead(*push_a, 1), CreateMockRead(*push_a_body, 2),
@@ -1248,7 +1250,7 @@ TEST_P(SpdySessionTest, DeleteExpiredPushStreams) {
// Verify that the second pushed stream evicted the first pushed stream.
EXPECT_EQ(1u, session->num_unclaimed_pushed_streams());
iter = session->unclaimed_pushed_streams_.find(
- GURL("http://www.google.com/b.dat"));
+ GURL("http://www.google.com/0.dat"));
EXPECT_TRUE(session->unclaimed_pushed_streams_.end() != iter);
if (session->flow_control_state_ ==
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698