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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index c6efdfe05935b3618a8f21ce58c721d0d7fb3da8..8db707774d71b8ea524e82f31a7eaed222e96b73 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -1043,8 +1043,11 @@ SpdyFrame* SpdyTestUtil::ConstructSpdySyn(int stream_id,
// Get the stream id of the next highest priority request
// (most recent request of the same priority, or last request of
// an earlier priority).
+ // Note that this is a duplicate of the logic in Http2PriorityDependencies,
+ // and hence tests using this function do not effectively test that logic.
+ // That logic is tested by the Http2PriorityDependencies unit tests.
int parent_stream_id = 0;
- for (int q = priority; q >= IDLE; --q) {
+ for (int q = priority; q <= HIGHEST; ++q) {
if (!priority_to_stream_id_list_[q].empty()) {
parent_stream_id = priority_to_stream_id_list_[q].back();
break;

Powered by Google App Engine
This is Rietveld 408576698