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

Unified Diff: net/spdy/spdy_websocket_stream_spdy3_unittest.cc

Issue 10815074: Instead of enqueueing SPDY frames, enqueue SPDY streams that are ready to produce data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove logging and cleanup Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_websocket_stream_spdy2_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_websocket_stream_spdy3_unittest.cc
diff --git a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
index c6e17177712e06e951d4381e7cfd19daf673d27d..167d6af76a60a2b94ea808b275c09b367a422411 100644
--- a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
@@ -165,6 +165,8 @@ class SpdyWebSocketStreamSpdy3Test : public testing::Test {
OrderedSocketData* data() { return data_.get(); }
void DoSendHelloFrame(SpdyWebSocketStreamEvent* event) {
+ // Record the actual stream_id.
+ created_stream_id_ = websocket_stream_->stream_->stream_id();
websocket_stream_->SendData(kMessageFrame, kMessageFrameLength);
}
@@ -299,6 +301,7 @@ class SpdyWebSocketStreamSpdy3Test : public testing::Test {
scoped_refptr<TransportSocketParams> transport_params_;
scoped_ptr<SpdyWebSocketStream> websocket_stream_;
SpdyStreamId stream_id_;
+ SpdyStreamId created_stream_id_;
scoped_ptr<SpdyFrame> request_frame_;
scoped_ptr<SpdyFrame> response_frame_;
scoped_ptr<SpdyFrame> message_frame_;
@@ -358,12 +361,13 @@ TEST_F(SpdyWebSocketStreamSpdy3Test, Basic) {
ASSERT_EQ(OK, websocket_stream_->InitializeStream(url, HIGHEST, net_log));
ASSERT_TRUE(websocket_stream_->stream_);
- EXPECT_EQ(stream_id_, websocket_stream_->stream_->stream_id());
SendRequest();
completion_callback_.WaitForResult();
+ EXPECT_EQ(stream_id_, created_stream_id_);
+
websocket_stream_.reset();
const std::vector<SpdyWebSocketStreamEvent>& events =
@@ -523,7 +527,7 @@ TEST_F(SpdyWebSocketStreamSpdy3Test, DestructionAfterExplicitClose) {
}
TEST_F(SpdyWebSocketStreamSpdy3Test, IOPending) {
- Prepare(3);
+ Prepare(1);
scoped_ptr<SpdyFrame> settings_frame(
ConstructSpdySettings(spdy_settings_to_send_));
MockWrite writes[] = {
@@ -576,7 +580,7 @@ TEST_F(SpdyWebSocketStreamSpdy3Test, IOPending) {
ASSERT_EQ(ERR_IO_PENDING, websocket_stream_->InitializeStream(
url, HIGHEST, net_log));
- // Delete the fist stream to allow create the second stream.
+ // Delete the first stream to allow create the second stream.
block_stream.reset();
ASSERT_EQ(OK, sync_callback_.WaitForResult());
« no previous file with comments | « net/spdy/spdy_websocket_stream_spdy2_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698