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

Unified Diff: net/spdy/core/lifo_write_scheduler_test.cc

Issue 2844963005: Enable HTTP/2 to use a LIFO scheduler to schedule write. (Closed)
Patch Set: Created 3 years, 8 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/spdy/core/lifo_write_scheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/lifo_write_scheduler_test.cc
diff --git a/net/spdy/core/lifo_write_scheduler_test.cc b/net/spdy/core/lifo_write_scheduler_test.cc
index f4b58d057d862675961cf0286a95d4f2d86361e9..37270b3a4d37be90fd052063c1d222240f007e9e 100644
--- a/net/spdy/core/lifo_write_scheduler_test.cc
+++ b/net/spdy/core/lifo_write_scheduler_test.cc
@@ -61,12 +61,11 @@ TEST(LifoWriteSchedulerTest, ReadyListTest) {
EXPECT_TRUE(lifo.HasReadyStreams());
EXPECT_EQ((uint32_t)7, lifo.NumReadyStreams());
- EXPECT_SPDY_BUG(lifo.MarkStreamReady(11, true),
- "Stream already exists in the list");
- EXPECT_SPDY_BUG(lifo.MarkStreamNotReady(5),
- "Try to remove a stream that is not on list");
- EXPECT_SPDY_BUG(lifo.MarkStreamNotReady(21),
- "Try to remove a stream that is not on list");
+ // Verify MarkStream(Not)Ready() can be called multiple times for the same
+ // stream.
+ lifo.MarkStreamReady(11, true);
+ lifo.MarkStreamNotReady(5);
+ lifo.MarkStreamNotReady(21);
EXPECT_EQ((uint32_t)17, lifo.PopNextReadyStream());
EXPECT_EQ((uint32_t)15, std::get<0>(lifo.PopNextReadyStreamAndPrecedence()));
@@ -81,6 +80,10 @@ TEST(LifoWriteSchedulerTest, ReadyListTest) {
lifo.MarkStreamNotReady(7);
EXPECT_TRUE(peer.GetReadyList()->find(7) == peer.GetReadyList()->end());
EXPECT_EQ((uint32_t)2, lifo.NumReadyStreams());
+
+ lifo.MarkStreamNotReady(9);
+ lifo.MarkStreamNotReady(11);
+ EXPECT_FALSE(lifo.ShouldYield(1));
}
// Test add and remove from registered list.
« no previous file with comments | « net/spdy/core/lifo_write_scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698