OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_stream_sequencer.h" | 5 #include "net/quic/quic_stream_sequencer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "net/base/ip_endpoint.h" | 12 #include "net/base/ip_endpoint.h" |
13 #include "net/quic/quic_utils.h" | 13 #include "net/quic/quic_utils.h" |
14 #include "net/quic/reliable_quic_stream.h" | 14 #include "net/quic/reliable_quic_stream.h" |
15 #include "net/quic/test_tools/quic_stream_sequencer_peer.h" | 15 #include "net/quic/test_tools/quic_stream_sequencer_peer.h" |
16 #include "net/quic/test_tools/quic_test_utils.h" | 16 #include "net/quic/test_tools/quic_test_utils.h" |
17 #include "net/test/gtest_util.h" | 17 #include "net/test/gtest_util.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using base::StringPiece; | 21 using base::StringPiece; |
22 using std::map; | 22 using std::map; |
23 using std::min; | 23 using std::min; |
24 using std::pair; | 24 using std::pair; |
| 25 using std::string; |
25 using std::vector; | 26 using std::vector; |
26 using testing::_; | 27 using testing::_; |
27 using testing::AnyNumber; | 28 using testing::AnyNumber; |
28 using testing::InSequence; | 29 using testing::InSequence; |
29 using testing::Return; | 30 using testing::Return; |
30 using testing::StrEq; | 31 using testing::StrEq; |
31 | 32 |
32 namespace net { | 33 namespace net { |
33 namespace test { | 34 namespace test { |
34 | 35 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, MakeIOVector("hello")); | 437 QuicStreamFrame frame2(kClientDataStreamId1, false, 2, MakeIOVector("hello")); |
437 EXPECT_TRUE(sequencer_->FrameOverlapsBufferedData(frame2)); | 438 EXPECT_TRUE(sequencer_->FrameOverlapsBufferedData(frame2)); |
438 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _)) | 439 EXPECT_CALL(stream_, CloseConnectionWithDetails(QUIC_INVALID_STREAM_FRAME, _)) |
439 .Times(1); | 440 .Times(1); |
440 sequencer_->OnStreamFrame(frame2); | 441 sequencer_->OnStreamFrame(frame2); |
441 } | 442 } |
442 | 443 |
443 } // namespace | 444 } // namespace |
444 } // namespace test | 445 } // namespace test |
445 } // namespace net | 446 } // namespace net |
OLD | NEW |