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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/http/http_network_transaction.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index d08d16208c04880ab417fe9090c85b9891406c1e..878406e6c75748a4e0ec3a22082c12f0fad114af 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -268,12 +268,15 @@ class HttpNetworkTransactionTest
base::MessageLoop::current()->RunUntilIdle();
}
+ const char* GetAlternateProtocolFromParam() {
+ return
+ AlternateProtocolToString(AlternateProtocolFromNextProto(GetParam()));
+ }
+
// This is the expected return from a current server advertising SPDY.
std::string GetAlternateProtocolHttpHeader() {
- return
- std::string("Alternate-Protocol: 443:") +
- AlternateProtocolToString(AlternateProtocolFromNextProto(GetParam())) +
- "\r\n\r\n";
+ return std::string("Alternate-Protocol: 443:") +
+ GetAlternateProtocolFromParam() + "\r\n\r\n";
}
// Either |write_failure| specifies a write failure or |read_failure|
@@ -407,8 +410,7 @@ class HttpNetworkTransactionTest
INSTANTIATE_TEST_CASE_P(
NextProto,
HttpNetworkTransactionTest,
- testing::Values(kProtoDeprecatedSPDY2,
- kProtoSPDY3, kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
+ testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15));
namespace {
@@ -10107,10 +10109,12 @@ TEST_P(HttpNetworkTransactionTest, SpdyAlternateProtocolThroughProxy) {
};
MockRead data_reads_1[] = {
MockRead(SYNCHRONOUS, ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ),
- MockRead("HTTP/1.1 200 OK\r\n"
- "Alternate-Protocol: 443:npn-spdy/2\r\n"
- "Proxy-Connection: close\r\n"
- "\r\n"),
+ MockRead("HTTP/1.1 200 OK\r\n"),
+ MockRead("Alternate-Protocol: 443:"),
+ MockRead(GetAlternateProtocolFromParam()),
+ MockRead("\r\n"),
+ MockRead("Proxy-Connection: close\r\n"),
+ MockRead("\r\n"),
};
StaticSocketDataProvider data_1(data_reads_1, arraysize(data_reads_1),
data_writes_1, arraysize(data_writes_1));
@@ -11402,8 +11406,7 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttpOverTunnel) {
// SPDY GET for HTTP URL (through the proxy, but not the tunnel).
SpdyHeaderBlock req2_block;
req2_block[spdy_util_.GetMethodKey()] = "GET";
- req2_block[spdy_util_.GetPathKey()] =
- spdy_util_.is_spdy2() ? http_url.c_str() : "/";
+ req2_block[spdy_util_.GetPathKey()] = "/";
req2_block[spdy_util_.GetHostKey()] = "www.google.com:443";
req2_block[spdy_util_.GetSchemeKey()] = "http";
spdy_util_.MaybeAddVersionHeader(&req2_block);
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698