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

Unified Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 2140673002: Remove SPDY/3.1 tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_network_transaction_unittest.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket_unittest.cc
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 1222a78216df47a1633f30746161e9deaad2b1f0..5e905f99347fa77cc83b3c07fda9bb9edcf252fa 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -43,16 +43,11 @@ using net::test::IsOk;
namespace {
enum TestCase {
- // Test using the SPDY/3.1 protocol.
- kTestCaseSPDY31,
+ // Test without specifying a stream dependency based on the RequestPriority.
+ kTestCaseNoPriorityDependencies,
- // Test using the HTTP/2 protocol, without specifying a stream
- // dependency based on the RequestPriority.
- kTestCaseHTTP2NoPriorityDependencies,
-
- // Test using the HTTP/2 protocol, specifying a stream
- // dependency based on the RequestPriority.
- kTestCaseHTTP2PriorityDependencies
+ // Test specifying a stream dependency based on the RequestPriority.
+ kTestCasePriorityDependencies
};
static const char kRequestUrl[] = "https://www.google.com/";
@@ -92,7 +87,6 @@ class SpdyProxyClientSocketTest : public PlatformTest,
void TearDown() override;
protected:
- NextProto GetProtocol() const;
bool GetDependenciesFromPriority() const;
void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes,
@@ -167,16 +161,14 @@ class SpdyProxyClientSocketTest : public PlatformTest,
INSTANTIATE_TEST_CASE_P(ProtoPlusDepend,
SpdyProxyClientSocketTest,
- testing::Values(kTestCaseSPDY31,
- kTestCaseHTTP2NoPriorityDependencies,
- kTestCaseHTTP2PriorityDependencies));
+ testing::Values(kTestCaseNoPriorityDependencies,
+ kTestCasePriorityDependencies));
SpdyProxyClientSocketTest::SpdyProxyClientSocketTest()
- : spdy_util_(GetProtocol(), GetDependenciesFromPriority()),
+ : spdy_util_(GetDependenciesFromPriority()),
read_buf_(NULL),
- session_deps_(GetProtocol()),
connect_data_(SYNCHRONOUS, OK),
- framer_(spdy_util_.spdy_version()),
+ framer_(HTTP2),
user_agent_(kUserAgent),
url_(kRequestUrl),
proxy_host_port_(kProxyHost, kProxyPort),
@@ -203,12 +195,8 @@ void SpdyProxyClientSocketTest::TearDown() {
PlatformTest::TearDown();
}
-NextProto SpdyProxyClientSocketTest::GetProtocol() const {
- return GetParam() == kTestCaseSPDY31 ? kProtoSPDY31 : kProtoHTTP2;
-}
-
bool SpdyProxyClientSocketTest::GetDependenciesFromPriority() const {
- return GetParam() == kTestCaseHTTP2PriorityDependencies;
+ return GetParam() == kTestCasePriorityDependencies;
}
void SpdyProxyClientSocketTest::Initialize(MockRead* reads,
@@ -326,21 +314,14 @@ void SpdyProxyClientSocketTest::AssertWriteLength(int len) {
void SpdyProxyClientSocketTest::PopulateConnectRequestIR(
SpdyHeaderBlock* block) {
- spdy_util_.MaybeAddVersionHeader(block);
(*block)[spdy_util_.GetMethodKey()] = "CONNECT";
- if (spdy_util_.spdy_version() == HTTP2) {
- (*block)[spdy_util_.GetHostKey()] = kOriginHostPort;
- } else {
- (*block)[spdy_util_.GetHostKey()] = kOriginHost;
- (*block)[spdy_util_.GetPathKey()] = kOriginHostPort;
- }
+ (*block)[spdy_util_.GetHostKey()] = kOriginHostPort;
(*block)["user-agent"] = kUserAgent;
}
void SpdyProxyClientSocketTest::PopulateConnectReplyIR(SpdyHeaderBlock* block,
const char* status) {
(*block)[spdy_util_.GetStatusKey()] = status;
- spdy_util_.MaybeAddVersionHeader(block);
}
// Constructs a standard SPDY SYN_STREAM frame for a CONNECT request.
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698