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

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

Issue 10836084: SPDY - Handle incomplete headers during server push. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | net/spdy/spdy_websocket_stream.h » ('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 "net/spdy/spdy_stream_test_util.h" 5 #include "net/spdy/spdy_stream_test_util.h"
6 6
7 #include "net/base/completion_callback.h" 7 #include "net/base/completion_callback.h"
8 #include "net/spdy/spdy_stream.h" 8 #include "net/spdy/spdy_stream.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EXPECT_TRUE(send_headers_completed_); 48 EXPECT_TRUE(send_headers_completed_);
49 *response_ = response; 49 *response_ = response;
50 if (buf_) { 50 if (buf_) {
51 EXPECT_EQ(ERR_IO_PENDING, 51 EXPECT_EQ(ERR_IO_PENDING,
52 stream_->WriteStreamData(buf_.get(), buf_->size(), 52 stream_->WriteStreamData(buf_.get(), buf_->size(),
53 DATA_FLAG_NONE)); 53 DATA_FLAG_NONE));
54 } 54 }
55 return status; 55 return status;
56 } 56 }
57 57
58 void TestSpdyStreamDelegate::OnDataReceived(const char* buffer, int bytes) { 58 int TestSpdyStreamDelegate::OnDataReceived(const char* buffer, int bytes) {
59 received_data_ += std::string(buffer, bytes); 59 received_data_ += std::string(buffer, bytes);
60 return OK;
60 } 61 }
61 62
62 void TestSpdyStreamDelegate::OnDataSent(int length) { 63 void TestSpdyStreamDelegate::OnDataSent(int length) {
63 data_sent_ += length; 64 data_sent_ += length;
64 } 65 }
65 66
66 void TestSpdyStreamDelegate::OnClose(int status) { 67 void TestSpdyStreamDelegate::OnClose(int status) {
67 closed_ = true; 68 closed_ = true;
68 CompletionCallback callback = callback_; 69 CompletionCallback callback = callback_;
69 callback_.Reset(); 70 callback_.Reset();
70 callback.Run(OK); 71 callback.Run(OK);
71 } 72 }
72 73
73 } // namespace test 74 } // namespace test
74 75
75 } // namespace net 76 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | net/spdy/spdy_websocket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698