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

Side by Side Diff: net/spdy/spdy_session_unittest.cc

Issue 2675723003: Improve NetLog HTTP/2 event names. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | no next file » | 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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 base::RunLoop().RunUntilIdle(); 1983 base::RunLoop().RunUntilIdle();
1984 1984
1985 EXPECT_FALSE(HasSpdySession(spdy_session_pool_, key_)); 1985 EXPECT_FALSE(HasSpdySession(spdy_session_pool_, key_));
1986 EXPECT_FALSE(session_); 1986 EXPECT_FALSE(session_);
1987 1987
1988 // Check that the NetLog was filled reasonably. 1988 // Check that the NetLog was filled reasonably.
1989 TestNetLogEntry::List entries; 1989 TestNetLogEntry::List entries;
1990 log_.GetEntries(&entries); 1990 log_.GetEntries(&entries);
1991 EXPECT_LT(0u, entries.size()); 1991 EXPECT_LT(0u, entries.size());
1992 1992
1993 int pos = ExpectLogContainsSomewhere(entries, 0, 1993 int pos = ExpectLogContainsSomewhere(
1994 NetLogEventType::HTTP2_SESSION_GOAWAY, 1994 entries, 0, NetLogEventType::HTTP2_SESSION_RECV_GOAWAY,
1995 NetLogEventPhase::NONE); 1995 NetLogEventPhase::NONE);
1996 TestNetLogEntry entry = entries[pos]; 1996 TestNetLogEntry entry = entries[pos];
1997 int last_accepted_stream_id; 1997 int last_accepted_stream_id;
1998 ASSERT_TRUE(entry.GetIntegerValue("last_accepted_stream_id", 1998 ASSERT_TRUE(entry.GetIntegerValue("last_accepted_stream_id",
1999 &last_accepted_stream_id)); 1999 &last_accepted_stream_id));
2000 EXPECT_EQ(42, last_accepted_stream_id); 2000 EXPECT_EQ(42, last_accepted_stream_id);
2001 int active_streams; 2001 int active_streams;
2002 ASSERT_TRUE(entry.GetIntegerValue("active_streams", &active_streams)); 2002 ASSERT_TRUE(entry.GetIntegerValue("active_streams", &active_streams));
2003 EXPECT_EQ(0, active_streams); 2003 EXPECT_EQ(0, active_streams);
2004 int unclaimed_streams; 2004 int unclaimed_streams;
2005 ASSERT_TRUE(entry.GetIntegerValue("unclaimed_streams", &unclaimed_streams)); 2005 ASSERT_TRUE(entry.GetIntegerValue("unclaimed_streams", &unclaimed_streams));
(...skipping 3992 matching lines...) Expand 10 before | Expand all | Expand 10 after
5998 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), 5998 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(),
5999 "spdy_pooling.pem"); 5999 "spdy_pooling.pem");
6000 ssl_info.is_issued_by_known_root = true; 6000 ssl_info.is_issued_by_known_root = true;
6001 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); 6001 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin));
6002 6002
6003 EXPECT_TRUE(SpdySession::CanPool( 6003 EXPECT_TRUE(SpdySession::CanPool(
6004 &tss, ssl_info, "www.example.org", "mail.example.org")); 6004 &tss, ssl_info, "www.example.org", "mail.example.org"));
6005 } 6005 }
6006 6006
6007 } // namespace net 6007 } // namespace net
OLDNEW
« 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