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

Side by Side Diff: net/tools/flip_server/spdy_interface_test.cc

Issue 1852423004: Implement SpdySerializedFrame move semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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/tools/flip_server/spdy_interface.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tools/flip_server/spdy_interface.h" 5 #include "net/tools/flip_server/spdy_interface.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 TEST_P(SpdySMProxyTest, OnStreamFrameData) { 231 TEST_P(SpdySMProxyTest, OnStreamFrameData) {
232 BufferedSpdyFramerVisitorInterface* visitor = interface_.get(); 232 BufferedSpdyFramerVisitorInterface* visitor = interface_.get();
233 scoped_ptr<MockSMInterface> mock_interface(new MockSMInterface); 233 scoped_ptr<MockSMInterface> mock_interface(new MockSMInterface);
234 uint32_t stream_id = 92; 234 uint32_t stream_id = 92;
235 uint32_t associated_id = 43; 235 uint32_t associated_id = 43;
236 SpdyHeaderBlock block; 236 SpdyHeaderBlock block;
237 testing::MockFunction<void(int)> checkpoint; // NOLINT 237 testing::MockFunction<void(int)> checkpoint; // NOLINT
238 238
239 scoped_ptr<SpdyFrame> frame(spdy_framer_->CreatePingFrame(12, false)); 239 scoped_ptr<SpdySerializedFrame> frame(
240 spdy_framer_->CreatePingFrame(12, false));
240 block[":method"] = "GET"; 241 block[":method"] = "GET";
241 block[":host"] = "www.example.com"; 242 block[":host"] = "www.example.com";
242 block[":path"] = "/path"; 243 block[":path"] = "/path";
243 block[":scheme"] = "http"; 244 block[":scheme"] = "http";
244 block["foo"] = "bar"; 245 block["foo"] = "bar";
245 { 246 {
246 InSequence s; 247 InSequence s;
247 EXPECT_CALL(*interface_, 248 EXPECT_CALL(*interface_,
248 FindOrMakeNewSMConnectionInterface(_, _)) 249 FindOrMakeNewSMConnectionInterface(_, _))
249 .WillOnce(Return(mock_interface.get())); 250 .WillOnce(Return(mock_interface.get()));
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 ASSERT_EQ(2, spdy_framer_->frames_received()); 613 ASSERT_EQ(2, spdy_framer_->frames_received());
613 ASSERT_EQ(2u, actual_header_block.size()); 614 ASSERT_EQ(2u, actual_header_block.size());
614 ASSERT_EQ("404 Not Found", actual_header_block["status"]); 615 ASSERT_EQ("404 Not Found", actual_header_block["status"]);
615 ASSERT_EQ("HTTP/1.1", actual_header_block["version"]); 616 ASSERT_EQ("HTTP/1.1", actual_header_block["version"]);
616 ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size)); 617 ASSERT_EQ("wtf?", StringPiece(actual_data, actual_size));
617 } 618 }
618 619
619 } // namespace 620 } // namespace
620 621
621 } // namespace net 622 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/flip_server/spdy_interface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698