| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |