summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/data/valgrind/net_unittests.gtest-tsan_win32.txt3
-rw-r--r--net/spdy/spdy_http_stream_unittest.cc20
2 files changed, 14 insertions, 9 deletions
diff --git a/net/data/valgrind/net_unittests.gtest-tsan_win32.txt b/net/data/valgrind/net_unittests.gtest-tsan_win32.txt
index 9126e68..0fc6d3c 100644
--- a/net/data/valgrind/net_unittests.gtest-tsan_win32.txt
+++ b/net/data/valgrind/net_unittests.gtest-tsan_win32.txt
@@ -14,9 +14,6 @@ DiskCacheBackendTest.*
# See http://crbug.com/47836
ClientSocketPoolBaseTest.CancelPendingSocketAtSocketLimit
-# See http://crbug.com/50929
-SpdyHttpStreamTest.SpdyURLTest
-
#########################################
# These tests fail if you don't have our SSL certificate installed.
# Please see http://dev.chromium.org/developers/testing#TOC-SSL-tests
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index 7f78142..1287820 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -47,7 +47,6 @@ TEST_F(SpdyHttpStreamTest, SendRequest) {
EnableCompression(false);
SpdySession::SetSSLMode(false);
- SpdySessionDependencies session_deps;
scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST));
MockWrite writes[] = {
CreateMockWrite(*req.get(), 1),
@@ -102,8 +101,10 @@ TEST_F(SpdyHttpStreamTest, SpdyURLTest) {
MockWrite writes[] = {
CreateMockWrite(*req.get(), 1),
};
+ scoped_ptr<spdy::SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1));
MockRead reads[] = {
- MockRead(false, 0, 2), // EOF
+ CreateMockRead(*resp, 2),
+ MockRead(false, 0, 3) // EOF
};
HostPortPair host_port_pair("www.google.com", 80);
@@ -133,10 +134,17 @@ TEST_F(SpdyHttpStreamTest, SpdyURLTest) {
else
FAIL() << "No url is set in spdy_header!";
- MessageLoop::current()->RunAllPending();
- EXPECT_TRUE(http_session_->spdy_session_pool()->HasSession(pair));
- http_session_->spdy_session_pool()->CloseAllSessions();
- EXPECT_TRUE(!data()->at_read_eof());
+ // This triggers the MockWrite and read 2
+ callback.WaitForResult();
+
+ // This triggers read 3. The empty read causes the session to shut down.
+ data()->CompleteRead();
+
+ // Because we abandoned the stream, we don't expect to find a session in the
+ // pool anymore.
+ EXPECT_TRUE(!http_session_->spdy_session_pool()->HasSession(pair));
+ EXPECT_TRUE(data()->at_read_eof());
+ EXPECT_TRUE(data()->at_write_eof());
}
// TODO(willchan): Write a longer test for SpdyStream that exercises all