| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <iostream> | 6 #include <iostream> |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "net/spdy/spdy_framer.h" | 9 #include "net/spdy/spdy_framer.h" |
| 10 #include "net/spdy/spdy_protocol.h" | 10 #include "net/spdy/spdy_protocol.h" |
| (...skipping 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 framer.set_visitor(&visitor); | 2603 framer.set_visitor(&visitor); |
| 2604 framer.ProcessInput("HTTP/1.0", 8); | 2604 framer.ProcessInput("HTTP/1.0", 8); |
| 2605 EXPECT_TRUE(framer.probable_http_response()); | 2605 EXPECT_TRUE(framer.probable_http_response()); |
| 2606 } | 2606 } |
| 2607 } | 2607 } |
| 2608 | 2608 |
| 2609 TEST_P(SpdyFramerTest, SettingsFlagsAndId) { | 2609 TEST_P(SpdyFramerTest, SettingsFlagsAndId) { |
| 2610 const uint32 kId = 0x020304; | 2610 const uint32 kId = 0x020304; |
| 2611 const uint32 kFlags = 0x01; | 2611 const uint32 kFlags = 0x01; |
| 2612 const uint32 kWireFormat = | 2612 const uint32 kWireFormat = |
| 2613 htonl(IsSpdy2() ? 0x04030201 : 0x01020304); | 2613 base::HostToNet32(IsSpdy2() ? 0x04030201 : 0x01020304); |
| 2614 | 2614 |
| 2615 SettingsFlagsAndId id_and_flags = | 2615 SettingsFlagsAndId id_and_flags = |
| 2616 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat); | 2616 SettingsFlagsAndId::FromWireFormat(spdy_version_, kWireFormat); |
| 2617 EXPECT_EQ(kId, id_and_flags.id()); | 2617 EXPECT_EQ(kId, id_and_flags.id()); |
| 2618 EXPECT_EQ(kFlags, id_and_flags.flags()); | 2618 EXPECT_EQ(kFlags, id_and_flags.flags()); |
| 2619 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_)); | 2619 EXPECT_EQ(kWireFormat, id_and_flags.GetWireFormat(spdy_version_)); |
| 2620 } | 2620 } |
| 2621 | 2621 |
| 2622 } // namespace | 2622 } // namespace |
| OLD | NEW |