SpdyHttpStream always negotiated next protocol

This is a follow-up of https://crrev.com/c/5086373. Updated unit tests
to set the next protocol to kProtoHTTP2.

Bug: 1286835
Change-Id: I61c2fd33a0127ffaf5cf4e7ac0ce84dae5158c49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5095838
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1234297}
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index df2b307..130c151 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -309,8 +309,8 @@
   response_info_->response_time = stream_->response_time();
   // Don't store the SSLInfo in the response here, HttpNetworkTransaction
   // will take care of that part.
-  response_info_->was_alpn_negotiated =
-      stream_->GetNegotiatedProtocol() != kProtoUnknown;
+  CHECK_EQ(stream_->GetNegotiatedProtocol(), kProtoHTTP2);
+  response_info_->was_alpn_negotiated = true;
   response_info_->request_time = stream_->GetRequestTime();
   response_info_->connection_info = HttpConnectionInfo::kHTTP2;
   response_info_->alpn_negotiated_protocol =
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index b45dc2f..f17398f2 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -167,6 +167,7 @@
 
     ssl_.ssl_info.cert =
         ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
+    ssl_.next_proto = NextProto::kProtoHTTP2;
     ASSERT_TRUE(ssl_.ssl_info.cert);
     session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_);