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

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

Issue 663043004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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_framer_test.cc ('k') | net/spdy/spdy_http_stream_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_headers_block_parser.h" 5 #include "net/spdy/spdy_headers_block_parser.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 20 matching lines...) Expand all
31 StringPiece, 31 StringPiece,
32 StringPiece)); 32 StringPiece));
33 }; 33 };
34 34
35 class SpdyHeadersBlockParserTest : 35 class SpdyHeadersBlockParserTest :
36 public ::testing::TestWithParam<SpdyMajorVersion> { 36 public ::testing::TestWithParam<SpdyMajorVersion> {
37 public: 37 public:
38 virtual ~SpdyHeadersBlockParserTest() {} 38 virtual ~SpdyHeadersBlockParserTest() {}
39 39
40 protected: 40 protected:
41 virtual void SetUp() { 41 void SetUp() override {
42 // Create a parser using the mock handler. 42 // Create a parser using the mock handler.
43 spdy_version_ = GetParam(); 43 spdy_version_ = GetParam();
44 parser_.reset(new SpdyHeadersBlockParser(spdy_version_, &handler_)); 44 parser_.reset(new SpdyHeadersBlockParser(spdy_version_, &handler_));
45 length_field_size_ = 45 length_field_size_ =
46 SpdyHeadersBlockParser::LengthFieldSizeForVersion(spdy_version_); 46 SpdyHeadersBlockParser::LengthFieldSizeForVersion(spdy_version_);
47 } 47 }
48 48
49 // Create a header block with a specified number of headers. 49 // Create a header block with a specified number of headers.
50 string CreateHeaders(uint32_t num_headers, bool insert_nulls) { 50 string CreateHeaders(uint32_t num_headers, bool insert_nulls) {
51 string headers; 51 string headers;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 string expect_value = kBaseValue + IntToString(0); 250 string expect_value = kBaseValue + IntToString(0);
251 EXPECT_CALL(handler_, OnHeader(1, StringPiece(expect_key), 251 EXPECT_CALL(handler_, OnHeader(1, StringPiece(expect_key),
252 StringPiece(expect_value))).Times(1); 252 StringPiece(expect_value))).Times(1);
253 253
254 EXPECT_FALSE(parser_-> 254 EXPECT_FALSE(parser_->
255 HandleControlFrameHeadersData(1, headers.c_str(), headers.length())); 255 HandleControlFrameHeadersData(1, headers.c_str(), headers.length()));
256 EXPECT_EQ(SpdyHeadersBlockParser::TOO_MUCH_DATA, parser_->get_error()); 256 EXPECT_EQ(SpdyHeadersBlockParser::TOO_MUCH_DATA, parser_->get_error());
257 } 257 }
258 258
259 } // namespace net 259 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_http_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698