Index: net/quic/quic_data_stream_test.cc |
diff --git a/net/quic/quic_data_stream_test.cc b/net/quic/quic_data_stream_test.cc |
index 430509645891adacec122b2d0d92bd7ae82272af..8e79b66a663575ee5b54363ed727a62869546e2b 100644 |
--- a/net/quic/quic_data_stream_test.cc |
+++ b/net/quic/quic_data_stream_test.cc |
@@ -117,20 +117,19 @@ TEST_F(QuicDataStreamTest, ProcessHeaders) { |
Initialize(kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(compressed_headers)); |
stream_->OnStreamFrame(frame); |
EXPECT_EQ(SpdyUtils::SerializeUncompressedHeaders(headers_), stream_->data()); |
- EXPECT_EQ(static_cast<QuicPriority>(kHighestPriority), |
- stream_->EffectivePriority()); |
+ EXPECT_EQ(QuicUtils::HighestPriority(), stream_->EffectivePriority()); |
} |
TEST_F(QuicDataStreamTest, ProcessHeadersWithInvalidHeaderId) { |
Initialize(kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
compressed_headers[4] = '\xFF'; // Illegal header id. |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(compressed_headers)); |
@@ -142,7 +141,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersWithInvalidPriority) { |
Initialize(kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
compressed_headers[0] = '\xFF'; // Illegal priority. |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(compressed_headers)); |
@@ -154,7 +153,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersAndBody) { |
Initialize(kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
string body = "this is the body"; |
string data = compressed_headers + body; |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(data)); |
@@ -168,7 +167,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersAndBodyFragments) { |
Initialize(kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kLowestPriority, headers_); |
+ QuicUtils::LowestPriority(), headers_); |
string body = "this is the body"; |
string data = compressed_headers + body; |
@@ -201,15 +200,14 @@ TEST_F(QuicDataStreamTest, ProcessHeadersAndBodyFragments) { |
ASSERT_EQ(SpdyUtils::SerializeUncompressedHeaders(headers_) + body, |
stream_->data()) << "split_point: " << split_point; |
} |
- EXPECT_EQ(static_cast<QuicPriority>(kLowestPriority), |
- stream_->EffectivePriority()); |
+ EXPECT_EQ(QuicUtils::LowestPriority(), stream_->EffectivePriority()); |
} |
TEST_F(QuicDataStreamTest, ProcessHeadersAndBodyReadv) { |
Initialize(!kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
string body = "this is the body"; |
string data = compressed_headers + body; |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(data)); |
@@ -239,7 +237,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersAndBodyIncrementalReadv) { |
Initialize(!kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
string body = "this is the body"; |
string data = compressed_headers + body; |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(data)); |
@@ -265,7 +263,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersUsingReadvWithMultipleIovecs) { |
Initialize(!kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
string body = "this is the body"; |
string data = compressed_headers + body; |
QuicStreamFrame frame(kStreamId, false, 0, MakeIOVector(data)); |
@@ -295,7 +293,7 @@ TEST_F(QuicDataStreamTest, ProcessCorruptHeadersEarly) { |
Initialize(kShouldProcessData); |
string compressed_headers1 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame1( |
stream_->id(), false, 0, MakeIOVector(compressed_headers1)); |
string decompressed_headers1 = |
@@ -303,7 +301,7 @@ TEST_F(QuicDataStreamTest, ProcessCorruptHeadersEarly) { |
headers_["content-type"] = "text/plain"; |
string compressed_headers2 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
// Corrupt the compressed data. |
compressed_headers2[compressed_headers2.length() - 1] ^= 0xA1; |
QuicStreamFrame frame2( |
@@ -337,7 +335,7 @@ TEST_F(QuicDataStreamTest, ProcessPartialHeadersEarly) { |
Initialize(kShouldProcessData); |
string compressed_headers1 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame1( |
stream_->id(), false, 0, MakeIOVector(compressed_headers1)); |
string decompressed_headers1 = |
@@ -345,7 +343,7 @@ TEST_F(QuicDataStreamTest, ProcessPartialHeadersEarly) { |
headers_["content-type"] = "text/plain"; |
string compressed_headers2 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
string partial_compressed_headers = |
compressed_headers2.substr(0, compressed_headers2.length() / 2); |
QuicStreamFrame frame2( |
@@ -390,7 +388,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersEarly) { |
Initialize(kShouldProcessData); |
string compressed_headers1 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame1( |
stream_->id(), false, 0, MakeIOVector(compressed_headers1)); |
string decompressed_headers1 = |
@@ -398,7 +396,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersEarly) { |
headers_["content-type"] = "text/plain"; |
string compressed_headers2 = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame2( |
stream2_->id(), false, 0, MakeIOVector(compressed_headers2)); |
string decompressed_headers2 = |
@@ -428,7 +426,7 @@ TEST_F(QuicDataStreamTest, ProcessHeadersDelay) { |
Initialize(!kShouldProcessData); |
string compressed_headers = compressor_->CompressHeadersWithPriority( |
- kHighestPriority, headers_); |
+ QuicUtils::HighestPriority(), headers_); |
QuicStreamFrame frame1( |
stream_->id(), false, 0, MakeIOVector(compressed_headers)); |
string decompressed_headers = |