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

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

Issue 2102253003: Make SpdyHeaderBlock non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS fix. Created 4 years, 5 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/spdy/spdy_stream_test_util.cc ('k') | net/tools/flip_server/spdy_interface.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 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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <limits> 10 #include <limits>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Delegate that receives trailers. 219 // Delegate that receives trailers.
220 class StreamDelegateWithTrailers : public test::StreamDelegateWithBody { 220 class StreamDelegateWithTrailers : public test::StreamDelegateWithBody {
221 public: 221 public:
222 StreamDelegateWithTrailers(const base::WeakPtr<SpdyStream>& stream, 222 StreamDelegateWithTrailers(const base::WeakPtr<SpdyStream>& stream,
223 base::StringPiece data) 223 base::StringPiece data)
224 : StreamDelegateWithBody(stream, data) {} 224 : StreamDelegateWithBody(stream, data) {}
225 225
226 ~StreamDelegateWithTrailers() override {} 226 ~StreamDelegateWithTrailers() override {}
227 227
228 void OnTrailers(const SpdyHeaderBlock& trailers) override { 228 void OnTrailers(const SpdyHeaderBlock& trailers) override {
229 trailers_ = trailers; 229 trailers_ = trailers.Clone();
230 } 230 }
231 231
232 const SpdyHeaderBlock& trailers() const { return trailers_; } 232 const SpdyHeaderBlock& trailers() const { return trailers_; }
233 233
234 private: 234 private:
235 SpdyHeaderBlock trailers_; 235 SpdyHeaderBlock trailers_;
236 }; 236 };
237 237
238 // Regression test for crbug.com/481033. 238 // Regression test for crbug.com/481033.
239 TEST_P(SpdyStreamTest, Trailers) { 239 TEST_P(SpdyStreamTest, Trailers) {
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 EXPECT_EQ(response_len, stream->raw_received_bytes()); 1150 EXPECT_EQ(response_len, stream->raw_received_bytes());
1151 1151
1152 // FIN 1152 // FIN
1153 data.Resume(); 1153 data.Resume();
1154 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose()); 1154 EXPECT_EQ(ERR_CONNECTION_CLOSED, delegate.WaitForClose());
1155 } 1155 }
1156 1156
1157 } // namespace test 1157 } // namespace test
1158 1158
1159 } // namespace net 1159 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_test_util.cc ('k') | net/tools/flip_server/spdy_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698