| Index: net/quic/core/quic_stream_sequencer_test.cc
|
| diff --git a/net/quic/core/quic_stream_sequencer_test.cc b/net/quic/core/quic_stream_sequencer_test.cc
|
| index 3903093e999fe4e7706f0b4eb36e5c1f7d2a6b72..c5e17093d342f57d24da55d630598f4ab980e5d7 100644
|
| --- a/net/quic/core/quic_stream_sequencer_test.cc
|
| +++ b/net/quic/core/quic_stream_sequencer_test.cc
|
| @@ -25,11 +25,8 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| using base::StringPiece;
|
| -using std::map;
|
| using std::min;
|
| -using std::pair;
|
| using std::string;
|
| -using std::vector;
|
| using testing::_;
|
| using testing::AnyNumber;
|
| using testing::CreateFunctor;
|
| @@ -87,17 +84,17 @@ class QuicStreamSequencerTest : public ::testing::Test {
|
| sequencer_(new QuicStreamSequencer(&stream_, &clock_)) {}
|
|
|
| // Verify that the data in first region match with the expected[0].
|
| - bool VerifyReadableRegion(const vector<string>& expected) {
|
| + bool VerifyReadableRegion(const std::vector<string>& expected) {
|
| iovec iovecs[1];
|
| if (sequencer_->GetReadableRegions(iovecs, 1)) {
|
| - return (VerifyIovecs(iovecs, 1, vector<string>{expected[0]}));
|
| + return (VerifyIovecs(iovecs, 1, std::vector<string>{expected[0]}));
|
| }
|
| return false;
|
| }
|
|
|
| // Verify that the data in each of currently readable regions match with each
|
| // item given in |expected|.
|
| - bool VerifyReadableRegions(const vector<string>& expected) {
|
| + bool VerifyReadableRegions(const std::vector<string>& expected) {
|
| iovec iovecs[5];
|
| size_t num_iovecs =
|
| sequencer_->GetReadableRegions(iovecs, arraysize(iovecs));
|
| @@ -107,7 +104,7 @@ class QuicStreamSequencerTest : public ::testing::Test {
|
|
|
| bool VerifyIovecs(iovec* iovecs,
|
| size_t num_iovecs,
|
| - const vector<string>& expected) {
|
| + const std::vector<string>& expected) {
|
| int start_position = 0;
|
| for (size_t i = 0; i < num_iovecs; ++i) {
|
| if (!VerifyIovec(iovecs[i],
|
| @@ -390,8 +387,8 @@ TEST_F(QuicStreamSequencerTest, MutipleOffsets) {
|
|
|
| class QuicSequencerRandomTest : public QuicStreamSequencerTest {
|
| public:
|
| - typedef pair<int, string> Frame;
|
| - typedef vector<Frame> FrameList;
|
| + typedef std::pair<int, string> Frame;
|
| + typedef std::vector<Frame> FrameList;
|
|
|
| void CreateFrames() {
|
| int payload_size = arraysize(kPayload) - 1;
|
| @@ -504,14 +501,14 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
|
| EXPECT_EQ(9u, sequencer_->NumBytesBuffered());
|
|
|
| // Peek into the data.
|
| - vector<string> expected = {"abcdefghi"};
|
| + std::vector<string> expected = {"abcdefghi"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected));
|
|
|
| // Consume 1 byte.
|
| sequencer_->MarkConsumed(1);
|
| EXPECT_EQ(1u, stream_.flow_controller()->bytes_consumed());
|
| // Verify data.
|
| - vector<string> expected2 = {"bcdefghi"};
|
| + std::vector<string> expected2 = {"bcdefghi"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected2));
|
| EXPECT_EQ(8u, sequencer_->NumBytesBuffered());
|
|
|
| @@ -519,7 +516,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
|
| sequencer_->MarkConsumed(2);
|
| EXPECT_EQ(3u, stream_.flow_controller()->bytes_consumed());
|
| // Verify data.
|
| - vector<string> expected3 = {"defghi"};
|
| + std::vector<string> expected3 = {"defghi"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected3));
|
| EXPECT_EQ(6u, sequencer_->NumBytesBuffered());
|
|
|
| @@ -527,7 +524,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumed) {
|
| sequencer_->MarkConsumed(5);
|
| EXPECT_EQ(8u, stream_.flow_controller()->bytes_consumed());
|
| // Verify data.
|
| - vector<string> expected4{"i"};
|
| + std::vector<string> expected4{"i"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected4));
|
| EXPECT_EQ(1u, sequencer_->NumBytesBuffered());
|
| }
|
| @@ -540,7 +537,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumedError) {
|
|
|
| // Peek into the data. Only the first chunk should be readable because of the
|
| // missing data.
|
| - vector<string> expected{"abc"};
|
| + std::vector<string> expected{"abc"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected));
|
|
|
| // Now, attempt to mark consumed more data than was readable and expect the
|
| @@ -560,7 +557,7 @@ TEST_F(QuicStreamSequencerTest, MarkConsumedWithMissingPacket) {
|
| // Missing packet: 6, ghi.
|
| OnFrame(9, "jkl");
|
|
|
| - vector<string> expected = {"abcdef"};
|
| + std::vector<string> expected = {"abcdef"};
|
| ASSERT_TRUE(VerifyReadableRegions(expected));
|
|
|
| sequencer_->MarkConsumed(6);
|
|
|