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

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

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_frame_builder_test.cc ('k') | net/spdy/spdy_headers_block_parser_test.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 <algorithm> 5 #include <algorithm>
6 #include <iostream> 6 #include <iostream>
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 using net::test::SetFrameFlags; 603 using net::test::SetFrameFlags;
604 using net::test::CompareCharArraysWithHexError; 604 using net::test::CompareCharArraysWithHexError;
605 using net::test::SpdyFramerTestUtil; 605 using net::test::SpdyFramerTestUtil;
606 using net::test::TestSpdyVisitor; 606 using net::test::TestSpdyVisitor;
607 using net::test::GetSerializedHeaders; 607 using net::test::GetSerializedHeaders;
608 608
609 namespace net { 609 namespace net {
610 610
611 class SpdyFramerTest : public ::testing::TestWithParam<SpdyMajorVersion> { 611 class SpdyFramerTest : public ::testing::TestWithParam<SpdyMajorVersion> {
612 protected: 612 protected:
613 virtual void SetUp() { 613 void SetUp() override {
614 spdy_version_ = GetParam(); 614 spdy_version_ = GetParam();
615 spdy_version_ch_ = static_cast<unsigned char>( 615 spdy_version_ch_ = static_cast<unsigned char>(
616 SpdyConstants::SerializeMajorVersion(spdy_version_)); 616 SpdyConstants::SerializeMajorVersion(spdy_version_));
617 } 617 }
618 618
619 void CompareFrame(const string& description, 619 void CompareFrame(const string& description,
620 const SpdyFrame& actual_frame, 620 const SpdyFrame& actual_frame,
621 const unsigned char* expected, 621 const unsigned char* expected,
622 const int expected_len) { 622 const int expected_len) {
623 const unsigned char* actual = 623 const unsigned char* actual =
(...skipping 5132 matching lines...) Expand 10 before | Expand all | Expand 10 after
5756 TestSpdyVisitor visitor(spdy_version_); 5756 TestSpdyVisitor visitor(spdy_version_);
5757 visitor.SimulateInFramer(kFrameData, sizeof(kFrameData)); 5757 visitor.SimulateInFramer(kFrameData, sizeof(kFrameData));
5758 5758
5759 EXPECT_EQ(SpdyFramer::SPDY_ERROR, visitor.framer_.state()); 5759 EXPECT_EQ(SpdyFramer::SPDY_ERROR, visitor.framer_.state());
5760 EXPECT_EQ(SpdyFramer::SPDY_INVALID_CONTROL_FRAME, 5760 EXPECT_EQ(SpdyFramer::SPDY_INVALID_CONTROL_FRAME,
5761 visitor.framer_.error_code()) 5761 visitor.framer_.error_code())
5762 << SpdyFramer::ErrorCodeToString(visitor.framer_.error_code()); 5762 << SpdyFramer::ErrorCodeToString(visitor.framer_.error_code());
5763 } 5763 }
5764 5764
5765 } // namespace net 5765 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_frame_builder_test.cc ('k') | net/spdy/spdy_headers_block_parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698