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

Unified Diff: net/spdy/write_blocked_list_test.cc

Issue 1472563002: Let QUIC streams write 16k before ceding. Behind FLAG_quic_batch_writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107581674
Patch Set: Created 5 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/spdy/write_blocked_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/write_blocked_list_test.cc
diff --git a/net/spdy/write_blocked_list_test.cc b/net/spdy/write_blocked_list_test.cc
index 20a1b7e43d009710852a12604b595f6869714e7c..933dc715b8fe7ac813147b24fbd4c18235cc414e 100644
--- a/net/spdy/write_blocked_list_test.cc
+++ b/net/spdy/write_blocked_list_test.cc
@@ -78,6 +78,34 @@ TEST_F(WriteBlockedListTest, PopFront) {
EXPECT_EQ(3, list.PopFront(4));
}
+TEST_F(WriteBlockedListTest, PushFront) {
+ list.PushFront(1, 4);
+ EXPECT_EQ(1u, list.NumBlockedStreams());
+ list.PushFront(2, 4);
+ list.PushFront(1, 4);
+ list.PushFront(3, 4);
+ EXPECT_EQ(3u, list.NumBlockedStreams());
+
+ EXPECT_EQ(3, list.PopFront(4));
+ EXPECT_EQ(2, list.PopFront(4));
+ EXPECT_EQ(1u, list.NumBlockedStreams());
+ EXPECT_EQ(1, list.PopFront(4));
+}
+
+TEST_F(WriteBlockedListTest, PushFrontAndBack) {
+ list.PushFront(1, 4);
+ list.PushBack(5, 4);
+ list.PushFront(2, 4);
+ list.PushBack(3, 4);
+ list.PushFront(4, 4);
+
+ EXPECT_EQ(4, list.PopFront(4));
+ EXPECT_EQ(2, list.PopFront(4));
+ EXPECT_EQ(1, list.PopFront(4));
+ EXPECT_EQ(5, list.PopFront(4));
+ EXPECT_EQ(3, list.PopFront(4));
+}
+
TEST_F(WriteBlockedListTest, UpdateStreamPriorityInWriteBlockedList) {
list.PushBack(1, 1);
list.PushBack(2, 2);
« no previous file with comments | « net/spdy/write_blocked_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698