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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 2724703002: Add AltSvcFrameTest for non-empty origin on non-zero frame. (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index e98358fb59e9d79c6f4491d823ba3cd45c0cfe29..16dfca86905fe22030bc47b4c86c091302698d1b 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -5644,6 +5644,27 @@ TEST_F(AltSvcFrameTest, DoNotProcessAltSvcFrameWithEmptyOriginOnZeroStream) {
ASSERT_TRUE(altsvc_vector.empty());
}
+TEST_F(AltSvcFrameTest,
+ DoNotProcessAltSvcFrameWithNonEmptyOriginOnNonZeroStream) {
Ryan Hamilton 2017/03/01 03:38:47 What does "OnNonZeroStream" mean here?
Bence 2017/03/01 12:48:31 A stream that has a stream id different from zero.
Ryan Hamilton 2017/03/01 20:41:52 I suspect I'm missing something, but is there a st
+ SpdyAltSvcIR altsvc_ir(1);
+ altsvc_ir.add_altsvc(alternative_service_);
+ altsvc_ir.set_origin("https://mail.example.org");
+ AddSocketData(altsvc_ir);
+ AddSSLSocketData();
+
+ CreateNetworkSession();
+ CreateSecureSpdySession();
+
+ base::RunLoop().RunUntilIdle();
+
+ const url::SchemeHostPort session_origin("https", test_url_.host(),
+ test_url_.EffectiveIntPort());
+ AlternativeServiceVector altsvc_vector =
+ spdy_session_pool_->http_server_properties()->GetAlternativeServices(
+ session_origin);
+ ASSERT_TRUE(altsvc_vector.empty());
+}
+
TEST_F(AltSvcFrameTest, ProcessAltSvcFrameOnActiveStream) {
SpdyAltSvcIR altsvc_ir(1);
altsvc_ir.add_altsvc(alternative_service_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698