| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <cstddef> | 5 #include <cstddef> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 delegate.TakeReceivedData()); | 287 delegate.TakeReceivedData()); |
| 288 EXPECT_TRUE(data.at_write_eof()); | 288 EXPECT_TRUE(data.at_write_eof()); |
| 289 | 289 |
| 290 // Check that the NetLog was filled reasonably. | 290 // Check that the NetLog was filled reasonably. |
| 291 net::CapturingNetLog::CapturedEntryList entries; | 291 net::CapturingNetLog::CapturedEntryList entries; |
| 292 log.GetEntries(&entries); | 292 log.GetEntries(&entries); |
| 293 EXPECT_LT(0u, entries.size()); | 293 EXPECT_LT(0u, entries.size()); |
| 294 | 294 |
| 295 // Check that we logged SPDY_STREAM_ERROR correctly. | 295 // Check that we logged SPDY_STREAM_ERROR correctly. |
| 296 int pos = net::ExpectLogContainsSomewhere( | 296 int pos = net::ExpectLogContainsSomewhere( |
| 297 entries, 0, | 297 entries, 0, net::NetLog::TYPE_HTTP2_STREAM_ERROR, |
| 298 net::NetLog::TYPE_SPDY_STREAM_ERROR, | |
| 299 net::NetLog::PHASE_NONE); | 298 net::NetLog::PHASE_NONE); |
| 300 | 299 |
| 301 int stream_id2; | 300 int stream_id2; |
| 302 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); | 301 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); |
| 303 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); | 302 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); |
| 304 } | 303 } |
| 305 | 304 |
| 306 // Make sure that large blocks of data are properly split up into | 305 // Make sure that large blocks of data are properly split up into |
| 307 // frame-sized chunks for a request/response (i.e., an HTTP-like) | 306 // frame-sized chunks for a request/response (i.e., an HTTP-like) |
| 308 // stream. | 307 // stream. |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 data.RunFor(1); // FIN | 1030 data.RunFor(1); // FIN |
| 1032 | 1031 |
| 1033 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); | 1032 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); |
| 1034 } | 1033 } |
| 1035 | 1034 |
| 1036 } // namespace | 1035 } // namespace |
| 1037 | 1036 |
| 1038 } // namespace test | 1037 } // namespace test |
| 1039 | 1038 |
| 1040 } // namespace net | 1039 } // namespace net |
| OLD | NEW |