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

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

Issue 15555003: [SPDY] Remove SpdyStream::Delegate::OnSendBody()'s return value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 7 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_proxy_client_socket.cc ('k') | net/spdy/spdy_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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 StreamClosingDelegate(const base::WeakPtr<SpdyStream>& stream, 3193 StreamClosingDelegate(const base::WeakPtr<SpdyStream>& stream,
3194 base::StringPiece data) 3194 base::StringPiece data)
3195 : StreamDelegateWithBody(stream, data) {} 3195 : StreamDelegateWithBody(stream, data) {}
3196 3196
3197 virtual ~StreamClosingDelegate() {} 3197 virtual ~StreamClosingDelegate() {}
3198 3198
3199 void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) { 3199 void set_stream_to_close(const base::WeakPtr<SpdyStream>& stream_to_close) {
3200 stream_to_close_ = stream_to_close; 3200 stream_to_close_ = stream_to_close;
3201 } 3201 }
3202 3202
3203 virtual int OnSendBody() OVERRIDE { 3203 virtual void OnSendBody() OVERRIDE {
3204 int rv = test::StreamDelegateWithBody::OnSendBody(); 3204 test::StreamDelegateWithBody::OnSendBody();
3205 if (stream_to_close_) { 3205 if (stream_to_close_) {
3206 stream_to_close_->Close(); 3206 stream_to_close_->Close();
3207 EXPECT_EQ(NULL, stream_to_close_.get()); 3207 EXPECT_EQ(NULL, stream_to_close_.get());
3208 } 3208 }
3209 return rv;
3210 } 3209 }
3211 3210
3212 private: 3211 private:
3213 base::WeakPtr<SpdyStream> stream_to_close_; 3212 base::WeakPtr<SpdyStream> stream_to_close_;
3214 }; 3213 };
3215 3214
3216 // Cause a stall by reducing the flow control send window to 3215 // Cause a stall by reducing the flow control send window to
3217 // 0. Unstalling the session should properly handle deleted streams. 3216 // 0. Unstalling the session should properly handle deleted streams.
3218 TEST_F(SpdySessionSpdy3Test, SendWindowSizeIncreaseWithDeletedStreams31) { 3217 TEST_F(SpdySessionSpdy3Test, SendWindowSizeIncreaseWithDeletedStreams31) {
3219 const char kStreamUrl[] = "http://www.google.com/"; 3218 const char kStreamUrl[] = "http://www.google.com/";
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
3718 spdy_session_pool_->Remove(session_privacy_enabled); 3717 spdy_session_pool_->Remove(session_privacy_enabled);
3719 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); 3718 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled));
3720 EXPECT_TRUE(spdy_session_pool_->HasSession(key_privacy_disabled)); 3719 EXPECT_TRUE(spdy_session_pool_->HasSession(key_privacy_disabled));
3721 3720
3722 spdy_session_pool_->Remove(session_privacy_disabled); 3721 spdy_session_pool_->Remove(session_privacy_disabled);
3723 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled)); 3722 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_enabled));
3724 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_disabled)); 3723 EXPECT_FALSE(spdy_session_pool_->HasSession(key_privacy_disabled));
3725 } 3724 }
3726 3725
3727 } // namespace net 3726 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698