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

Unified Diff: net/quic/quic_session_test.cc

Issue 2115033002: Adds QUIC_VERSION_36 which adds support to force HOL blocking between streams for measurement purpo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126085461
Patch Set: typo 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/quic/quic_protocol.cc ('k') | net/quic/quic_spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session_test.cc
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index fbc4c8f17ba33532a07f7ae9ef2a320c1a2bbb20..7b5925a858110ec4fbf5c287eae059cd71e9a7ad 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -32,10 +32,13 @@
#include "testing/gmock_mutant.h"
#include "testing/gtest/include/gtest/gtest.h"
+using net::SpdyHeaderBlock;
+using net::SpdyPriority;
using std::set;
using std::string;
using std::vector;
using testing::CreateFunctor;
+using testing::AtLeast;
using testing::InSequence;
using testing::Invoke;
using testing::Return;
@@ -721,7 +724,7 @@ TEST_P(QuicSessionTestServer, HandshakeUnblocksFlowControlBlockedStream) {
EXPECT_FALSE(stream2->flow_controller()->IsBlocked());
EXPECT_FALSE(session_.IsConnectionFlowControlBlocked());
EXPECT_FALSE(session_.IsStreamFlowControlBlocked());
- EXPECT_CALL(*connection_, SendBlocked(stream2->id()));
+ EXPECT_CALL(*connection_, SendBlocked(_)).Times(AtLeast(1));
EXPECT_CALL(*connection_, SendBlocked(0));
stream2->WriteOrBufferBody(body, false, nullptr);
EXPECT_TRUE(stream2->flow_controller()->IsBlocked());
@@ -1118,6 +1121,16 @@ TEST_P(QuicSessionTestServer, TestMaxIncomingAndOutgoingStreamsAllowed) {
kDefaultMaxStreamsPerConnection);
}
+TEST_P(QuicSessionTestServer, EnableFHOLThroughConfigOption) {
+ QuicConfigPeer::SetReceivedForceHolBlocking(session_.config());
+ session_.OnConfigNegotiated();
+ if (version() <= QUIC_VERSION_35) {
+ EXPECT_FALSE(session_.force_hol_blocking());
+ } else {
+ EXPECT_TRUE(session_.force_hol_blocking());
+ }
+}
+
class QuicSessionTestClient : public QuicSessionTestBase {
protected:
QuicSessionTestClient() : QuicSessionTestBase(Perspective::IS_CLIENT) {}
@@ -1195,6 +1208,16 @@ TEST_P(QuicSessionTestClient, EnableDHDTThroughConnectionOption) {
0UL);
}
+TEST_P(QuicSessionTestClient, EnableFHOLThroughConfigOption) {
+ session_.config()->SetForceHolBlocking();
+ session_.OnConfigNegotiated();
+ if (version() <= QUIC_VERSION_35) {
+ EXPECT_FALSE(session_.force_hol_blocking());
+ } else {
+ EXPECT_TRUE(session_.force_hol_blocking());
+ }
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698