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

Unified Diff: net/spdy/spdy_websocket_stream_spdy2_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.h ('k') | net/spdy/spdy_websocket_stream_spdy3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_websocket_stream_spdy2_unittest.cc
diff --git a/net/spdy/spdy_websocket_stream_spdy2_unittest.cc b/net/spdy/spdy_websocket_stream_spdy2_unittest.cc
index 99264e13fe4a2d6bbe8c88b0b340a748d9e08389..f5d5b589befc6abe2ab979784b1620a5fe9ad1ae 100644
--- a/net/spdy/spdy_websocket_stream_spdy2_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_spdy2_unittest.cc
@@ -165,6 +165,8 @@ class SpdyWebSocketStreamSpdy2Test : 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 SpdyWebSocketStreamSpdy2Test : 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(SpdyWebSocketStreamSpdy2Test, 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(SpdyWebSocketStreamSpdy2Test, DestructionAfterExplicitClose) {
}
TEST_F(SpdyWebSocketStreamSpdy2Test, IOPending) {
- Prepare(3);
+ Prepare(1);
scoped_ptr<SpdyFrame> settings_frame(
ConstructSpdySettings(spdy_settings_to_send_));
MockWrite writes[] = {
« no previous file with comments | « net/spdy/spdy_websocket_stream.h ('k') | net/spdy/spdy_websocket_stream_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698