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

Unified Diff: net/spdy/spdy_framer_test.cc

Issue 2018513002: Plumb unmodified HTTP/2 stream weight value through SPDY framing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/spdy_framer.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer_test.cc
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index b4429a2da893a1ca2dab72d7b59130e26cc445ab..6f05477daa270089685d559dc71636bf2ec80a10 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -117,14 +117,14 @@ class SpdyFramerTestUtil {
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
bool end) override {
SpdyHeadersIR* headers = new SpdyHeadersIR(stream_id);
headers->set_has_priority(has_priority);
- headers->set_priority(priority);
+ headers->set_weight(weight);
headers->set_parent_stream_id(parent_stream_id);
headers->set_exclusive(exclusive);
headers->set_fin(fin);
@@ -310,7 +310,7 @@ class SpdyFramerTestUtil {
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
@@ -319,7 +319,7 @@ class SpdyFramerTestUtil {
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
headers.set_has_priority(has_priority);
- headers.set_priority(priority);
+ headers.set_weight(weight);
headers.set_parent_stream_id(parent_stream_id);
headers.set_exclusive(exclusive);
headers.set_fin(fin);
@@ -599,13 +599,13 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
bool end) override {
VLOG(1) << "OnHeaders(" << stream_id << ", " << has_priority << ", "
- << priority << ", " << parent_stream_id << ", " << exclusive << ", "
+ << weight << ", " << parent_stream_id << ", " << exclusive << ", "
<< fin << ", " << end << ")";
++headers_frame_count_;
InitHeaderStreaming(HEADERS, stream_id);
@@ -884,7 +884,6 @@ TEST_P(SpdyFramerTest, HeaderBlockWithEmptyCookie) {
SpdyFramer framer(spdy_version_);
framer.set_enable_compression(true);
SpdyHeadersIR headers(1);
- headers.set_priority(1);
headers.SetHeader("cookie",
"=; key=value; ; = ; foo; bar=; ; = ; k2=v2 ; =");
SpdySerializedFrame frame(framer.SerializeHeaders(headers));
@@ -907,7 +906,6 @@ TEST_P(SpdyFramerTest, HeaderBlockInBuffer) {
// Encode the header block into a Headers frame.
SpdyHeadersIR headers(1);
- headers.set_priority(1);
headers.SetHeader("alpha", "beta");
headers.SetHeader("gamma", "charlie");
headers.SetHeader("cookie", "key1=value1; key2=value2");
@@ -929,7 +927,6 @@ TEST_P(SpdyFramerTest, UndersizedHeaderBlockInBuffer) {
// Encode the header block into a Headers frame.
SpdyHeadersIR headers(1);
- headers.set_priority(1);
headers.SetHeader("alpha", "beta");
headers.SetHeader("gamma", "charlie");
SpdySerializedFrame frame(framer.SerializeHeaders(headers));
@@ -2992,8 +2989,8 @@ TEST_P(SpdyFramerTest, CreateHeadersUncompressed) {
};
SpdyHeadersIR headers_ir(0x7fffffff);
headers_ir.set_fin(true);
- headers_ir.set_priority(1);
headers_ir.set_has_priority(true);
+ headers_ir.set_weight(220);
headers_ir.SetHeader("bar", "foo");
headers_ir.SetHeader("foo", "");
SpdySerializedFrame frame(framer.SerializeHeaders(headers_ir));
@@ -3021,8 +3018,8 @@ TEST_P(SpdyFramerTest, CreateHeadersUncompressed) {
};
SpdyHeadersIR headers_ir(0x7fffffff);
headers_ir.set_fin(true);
- headers_ir.set_priority(1);
headers_ir.set_has_priority(true);
+ headers_ir.set_weight(220);
headers_ir.set_exclusive(true);
headers_ir.set_parent_stream_id(0);
headers_ir.SetHeader("bar", "foo");
@@ -3052,8 +3049,8 @@ TEST_P(SpdyFramerTest, CreateHeadersUncompressed) {
};
SpdyHeadersIR headers_ir(0x7fffffff);
headers_ir.set_fin(true);
- headers_ir.set_priority(1);
headers_ir.set_has_priority(true);
+ headers_ir.set_weight(220);
headers_ir.set_exclusive(false);
headers_ir.set_parent_stream_id(0x7fffffff);
headers_ir.SetHeader("bar", "foo");
@@ -3835,7 +3832,6 @@ TEST_P(SpdyFramerTest, ControlFrameMuchTooLarge) {
string big_value(kBigValueSize, 'x');
SpdyFramer framer(spdy_version_);
SpdyHeadersIR headers(1);
- headers.set_priority(1);
headers.set_fin(true);
headers.SetHeader("aa", big_value);
SpdySerializedFrame control_frame(framer.SerializeHeaders(headers));
@@ -5174,7 +5170,7 @@ TEST_P(SpdyFramerTest, HeadersFrameFlags) {
SpdyHeadersIR headers_ir(57);
if (IsHttp2() && (flags & HEADERS_FLAG_PRIORITY)) {
- headers_ir.set_priority(3);
+ headers_ir.set_weight(3);
headers_ir.set_has_priority(true);
headers_ir.set_parent_stream_id(5);
headers_ir.set_exclusive(true);
@@ -5872,7 +5868,6 @@ TEST_P(SpdyFramerTest, ProcessAllInput) {
// Create two input frames.
SpdyHeadersIR headers(1);
- headers.set_priority(1);
headers.SetHeader("alpha", "beta");
headers.SetHeader("gamma", "charlie");
headers.SetHeader("cookie", "key1=value1; key2=value2");
« no previous file with comments | « net/spdy/spdy_framer.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698