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

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

Issue 1471073010: Removed unused include of winsock.h/inet.h from sys_byteorder.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include inet.h for things other than byte-swap Created 5 years 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_framer.cc ('k') | net/spdy/spdy_headers_block_parser.cc » ('j') | 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_framer.h" 5 #include "net/spdy/spdy_framer.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 5516 matching lines...) Expand 10 before | Expand all | Expand 10 after
5527 5527
5528 framer.ProcessInput(frame->data(), framer.GetSynStreamMinimumSize()); 5528 framer.ProcessInput(frame->data(), framer.GetSynStreamMinimumSize());
5529 EXPECT_EQ(SpdyFramer::SPDY_READY_FOR_FRAME, framer.state()); 5529 EXPECT_EQ(SpdyFramer::SPDY_READY_FOR_FRAME, framer.state());
5530 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code()) 5530 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code())
5531 << SpdyFramer::ErrorCodeToString(framer.error_code()); 5531 << SpdyFramer::ErrorCodeToString(framer.error_code());
5532 } 5532 }
5533 5533
5534 TEST_P(SpdyFramerTest, SettingsFlagsAndId) { 5534 TEST_P(SpdyFramerTest, SettingsFlagsAndId) {
5535 const uint32 kId = 0x020304; 5535 const uint32 kId = 0x020304;
5536 const uint32 kFlags = 0x01; 5536 const uint32 kFlags = 0x01;
5537 const uint32 kWireFormat = htonl(IsSpdy2() ? 0x04030201 : 0x01020304); 5537 const uint32 kWireFormat =
5538 base::HostToNet32(IsSpdy2() ? 0x04030201 : 0x01020304);
5538 5539
5539 SettingsFlagsAndId id_and_flags = 5540 SettingsFlagsAndId id_and_flags =
5540 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat); 5541 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat);
5541 EXPECT_EQ(kId, id_and_flags.id()); 5542 EXPECT_EQ(kId, id_and_flags.id());
5542 EXPECT_EQ(kFlags, id_and_flags.flags()); 5543 EXPECT_EQ(kFlags, id_and_flags.flags());
5543 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_)); 5544 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_));
5544 } 5545 }
5545 5546
5546 // Test handling of a RST_STREAM with out-of-bounds status codes. 5547 // Test handling of a RST_STREAM with out-of-bounds status codes.
5547 TEST_P(SpdyFramerTest, RstStreamStatusBounds) { 5548 TEST_P(SpdyFramerTest, RstStreamStatusBounds) {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
6066 6067
6067 EXPECT_EQ(1, visitor->data_frame_count_); 6068 EXPECT_EQ(1, visitor->data_frame_count_);
6068 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_)); 6069 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_));
6069 EXPECT_EQ(0, visitor->headers_frame_count_); 6070 EXPECT_EQ(0, visitor->headers_frame_count_);
6070 } 6071 }
6071 } 6072 }
6072 6073
6073 } // namespace test 6074 } // namespace test
6074 6075
6075 } // namespace net 6076 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_headers_block_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698