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

Unified Diff: net/spdy/spdy_session_spdy2_unittest.cc

Issue 9582034: Fork SPDY/2 and SPDY/3 versions of our SPDY tests, in preparation for landing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge bug Created 8 years, 10 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_session_pool.h ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_spdy2_unittest.cc
===================================================================
--- net/spdy/spdy_session_spdy2_unittest.cc (revision 124690)
+++ net/spdy/spdy_session_spdy2_unittest.cc (working copy)
@@ -9,14 +9,16 @@
#include "net/spdy/spdy_io_buffer.h"
#include "net/spdy/spdy_session_pool.h"
#include "net/spdy/spdy_stream.h"
-#include "net/spdy/spdy_test_util.h"
+#include "net/spdy/spdy_test_util_spdy2.h"
#include "testing/platform_test.h"
+using namespace net::test_spdy2;
+
namespace net {
// TODO(cbentzel): Expose compression setter/getter in public SpdySession
// interface rather than going through all these contortions.
-class SpdySessionTest : public PlatformTest {
+class SpdySessionSpdy2Test : public PlatformTest {
public:
static void TurnOffCompression() {
spdy::SpdyFramer::set_enable_compression_default(false);
@@ -69,7 +71,7 @@
};
// Test the SpdyIOBuffer class.
-TEST_F(SpdySessionTest, SpdyIOBuffer) {
+TEST_F(SpdySessionSpdy2Test, SpdyIOBuffer) {
std::priority_queue<SpdyIOBuffer> queue_;
const size_t kQueueSize = 100;
@@ -105,7 +107,7 @@
}
}
-TEST_F(SpdySessionTest, GoAway) {
+TEST_F(SpdySessionSpdy2Test, GoAway) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -164,7 +166,7 @@
session2 = NULL;
}
-TEST_F(SpdySessionTest, Ping) {
+TEST_F(SpdySessionSpdy2Test, Ping) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -255,7 +257,7 @@
session = NULL;
}
-TEST_F(SpdySessionTest, FailedPing) {
+TEST_F(SpdySessionSpdy2Test, FailedPing) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -385,7 +387,7 @@
// TODO(kristianm): Could also test with more sessions where some are idle,
// and more than one session to a HostPortPair.
-TEST_F(SpdySessionTest, CloseIdleSessions) {
+TEST_F(SpdySessionSpdy2Test, CloseIdleSessions) {
SpdySessionDependencies session_deps;
scoped_refptr<HttpNetworkSession> http_session(
SpdySessionDependencies::SpdyCreateSession(&session_deps));
@@ -490,7 +492,7 @@
// release the stream, which releases its reference (the last) to the session.
// Make sure nothing blows up.
// http://crbug.com/57331
-TEST_F(SpdySessionTest, OnSettings) {
+TEST_F(SpdySessionSpdy2Test, OnSettings) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -582,7 +584,7 @@
// first completes, have the callback close itself, which should trigger the
// second stream creation. Then cancel that one immediately. Don't crash.
// http://crbug.com/63532
-TEST_F(SpdySessionTest, CancelPendingCreateStream) {
+TEST_F(SpdySessionSpdy2Test, CancelPendingCreateStream) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -668,7 +670,7 @@
MessageLoop::current()->RunAllPending();
}
-TEST_F(SpdySessionTest, SendSettingsOnNewSession) {
+TEST_F(SpdySessionSpdy2Test, SendSettingsOnNewSession) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
@@ -736,6 +738,7 @@
EXPECT_TRUE(data.at_write_eof());
}
+namespace {
// This test has two variants, one for each style of closing the connection.
// If |clean_via_close_current_sessions| is false, the sessions are closed
// manually, calling SpdySessionPool::Remove() directly. If it is true,
@@ -854,15 +857,17 @@
EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].pair));
}
-TEST_F(SpdySessionTest, IPPooling) {
+} // namespace
+
+TEST_F(SpdySessionSpdy2Test, IPPooling) {
IPPoolingTest(false);
}
-TEST_F(SpdySessionTest, IPPoolingCloseCurrentSessions) {
+TEST_F(SpdySessionSpdy2Test, IPPoolingCloseCurrentSessions) {
IPPoolingTest(true);
}
-TEST_F(SpdySessionTest, ClearSettingsStorage) {
+TEST_F(SpdySessionSpdy2Test, ClearSettingsStorage) {
SpdySettingsStorage settings_storage;
const std::string kTestHost("www.foo.com");
const int kTestPort = 80;
@@ -880,7 +885,7 @@
EXPECT_EQ(0u, settings_storage.Get(test_host_port_pair).size());
}
-TEST_F(SpdySessionTest, ClearSettingsStorageOnIPAddressChanged) {
+TEST_F(SpdySessionSpdy2Test, ClearSettingsStorageOnIPAddressChanged) {
const std::string kTestHost("www.foo.com");
const int kTestPort = 80;
HostPortPair test_host_port_pair(kTestHost, kTestPort);
@@ -908,7 +913,7 @@
test_host_port_pair).size());
}
-TEST_F(SpdySessionTest, NeedsCredentials) {
+TEST_F(SpdySessionSpdy2Test, NeedsCredentials) {
SpdySessionDependencies session_deps;
MockConnect connect_data(SYNCHRONOUS, OK);
@@ -976,7 +981,7 @@
EXPECT_FALSE(spdy_session_pool->HasSession(pair));
}
-TEST_F(SpdySessionTest, SendCredentials) {
+TEST_F(SpdySessionSpdy2Test, SendCredentials) {
SpdySessionDependencies session_deps;
MockConnect connect_data(SYNCHRONOUS, OK);
@@ -1051,7 +1056,7 @@
EXPECT_FALSE(spdy_session_pool->HasSession(pair));
}
-TEST_F(SpdySessionTest, CloseSessionOnError) {
+TEST_F(SpdySessionSpdy2Test, CloseSessionOnError) {
SpdySessionDependencies session_deps;
session_deps.host_resolver->set_synchronous_mode(true);
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698