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

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

Issue 1109473003: Get rid of TestNetLog::CapturedEntry[List] typedefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
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"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 #include "net/base/completion_callback.h" 13 #include "net/base/completion_callback.h"
14 #include "net/base/request_priority.h" 14 #include "net/base/request_priority.h"
15 #include "net/log/captured_net_log_entry.h"
15 #include "net/log/net_log_unittest.h" 16 #include "net/log/net_log_unittest.h"
17 #include "net/log/test_net_log.h"
16 #include "net/socket/next_proto.h" 18 #include "net/socket/next_proto.h"
17 #include "net/socket/socket_test_util.h" 19 #include "net/socket/socket_test_util.h"
18 #include "net/spdy/buffered_spdy_framer.h" 20 #include "net/spdy/buffered_spdy_framer.h"
19 #include "net/spdy/spdy_http_utils.h" 21 #include "net/spdy/spdy_http_utils.h"
20 #include "net/spdy/spdy_protocol.h" 22 #include "net/spdy/spdy_protocol.h"
21 #include "net/spdy/spdy_session.h" 23 #include "net/spdy/spdy_session.h"
22 #include "net/spdy/spdy_stream.h" 24 #include "net/spdy/spdy_stream.h"
23 #include "net/spdy/spdy_stream_test_util.h" 25 #include "net/spdy/spdy_stream_test_util.h"
24 #include "net/spdy/spdy_test_util_common.h" 26 #include "net/spdy/spdy_test_util_common.h"
25 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 288
287 const SpdyStreamId stream_id = delegate.stream_id(); 289 const SpdyStreamId stream_id = delegate.stream_id();
288 290
289 EXPECT_TRUE(delegate.send_headers_completed()); 291 EXPECT_TRUE(delegate.send_headers_completed());
290 EXPECT_EQ("200", delegate.GetResponseHeaderValue(spdy_util_.GetStatusKey())); 292 EXPECT_EQ("200", delegate.GetResponseHeaderValue(spdy_util_.GetStatusKey()));
291 EXPECT_EQ(std::string(kPostBody, kPostBodyLength), 293 EXPECT_EQ(std::string(kPostBody, kPostBodyLength),
292 delegate.TakeReceivedData()); 294 delegate.TakeReceivedData());
293 EXPECT_TRUE(data.at_write_eof()); 295 EXPECT_TRUE(data.at_write_eof());
294 296
295 // Check that the NetLog was filled reasonably. 297 // Check that the NetLog was filled reasonably.
296 TestNetLog::CapturedEntryList entries; 298 CapturedNetLogEntry::List entries;
297 log.GetEntries(&entries); 299 log.GetEntries(&entries);
298 EXPECT_LT(0u, entries.size()); 300 EXPECT_LT(0u, entries.size());
299 301
300 // Check that we logged SPDY_STREAM_ERROR correctly. 302 // Check that we logged SPDY_STREAM_ERROR correctly.
301 int pos = ExpectLogContainsSomewhere( 303 int pos = ExpectLogContainsSomewhere(
302 entries, 0, NetLog::TYPE_HTTP2_STREAM_ERROR, NetLog::PHASE_NONE); 304 entries, 0, NetLog::TYPE_HTTP2_STREAM_ERROR, NetLog::PHASE_NONE);
303 305
304 int stream_id2; 306 int stream_id2;
305 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2)); 307 ASSERT_TRUE(entries[pos].GetIntegerValue("stream_id", &stream_id2));
306 EXPECT_EQ(static_cast<int>(stream_id), stream_id2); 308 EXPECT_EQ(static_cast<int>(stream_id), stream_id2);
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 data.RunFor(1); // FIN 1040 data.RunFor(1); // FIN
1039 1041
1040 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); 1042 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose());
1041 } 1043 }
1042 1044
1043 } // namespace 1045 } // namespace
1044 1046
1045 } // namespace test 1047 } // namespace test
1046 1048
1047 } // namespace net 1049 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698