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

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

Issue 2445113002: Add HTTP/2 error code NO_ERROR. (Closed)
Patch Set: Created 4 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
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 5854 matching lines...) Expand 10 before | Expand all | Expand 10 after
5865 5865
5866 testing::StrictMock<test::MockSpdyFramerVisitor> visitor; 5866 testing::StrictMock<test::MockSpdyFramerVisitor> visitor;
5867 SpdyFramer framer(spdy_version_); 5867 SpdyFramer framer(spdy_version_);
5868 framer.set_visitor(&visitor); 5868 framer.set_visitor(&visitor);
5869 5869
5870 if (IsSpdy3()) { 5870 if (IsSpdy3()) {
5871 EXPECT_CALL(visitor, OnRstStream(1, RST_STREAM_INVALID)); 5871 EXPECT_CALL(visitor, OnRstStream(1, RST_STREAM_INVALID));
5872 framer.ProcessInput(reinterpret_cast<const char*>(kV3RstStreamInvalid), 5872 framer.ProcessInput(reinterpret_cast<const char*>(kV3RstStreamInvalid),
5873 arraysize(kV3RstStreamInvalid)); 5873 arraysize(kV3RstStreamInvalid));
5874 } else { 5874 } else {
5875 EXPECT_CALL(visitor, OnRstStream(1, RST_STREAM_INTERNAL_ERROR)); 5875 EXPECT_CALL(visitor, OnRstStream(1, RST_STREAM_NO_ERROR));
5876 framer.ProcessInput(reinterpret_cast<const char*>(kH2RstStreamInvalid), 5876 framer.ProcessInput(reinterpret_cast<const char*>(kH2RstStreamInvalid),
5877 arraysize(kH2RstStreamInvalid)); 5877 arraysize(kH2RstStreamInvalid));
5878 } 5878 }
5879 EXPECT_EQ(SpdyFramer::SPDY_READY_FOR_FRAME, framer.state()); 5879 EXPECT_EQ(SpdyFramer::SPDY_READY_FOR_FRAME, framer.state());
5880 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code()) 5880 EXPECT_EQ(SpdyFramer::SPDY_NO_ERROR, framer.error_code())
5881 << SpdyFramer::ErrorCodeToString(framer.error_code()); 5881 << SpdyFramer::ErrorCodeToString(framer.error_code());
5882 5882
5883 framer.Reset(); 5883 framer.Reset();
5884 5884
5885 if (IsSpdy3()) { 5885 if (IsSpdy3()) {
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
6392 6392
6393 EXPECT_EQ(1, visitor->data_frame_count_); 6393 EXPECT_EQ(1, visitor->data_frame_count_);
6394 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_)); 6394 EXPECT_EQ(strlen(four_score), static_cast<unsigned>(visitor->data_bytes_));
6395 EXPECT_EQ(0, visitor->headers_frame_count_); 6395 EXPECT_EQ(0, visitor->headers_frame_count_);
6396 } 6396 }
6397 } 6397 }
6398 6398
6399 } // namespace test 6399 } // namespace test
6400 6400
6401 } // namespace net 6401 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698