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

Side by Side Diff: net/tools/quic/quic_spdy_client_stream_test.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tools/quic/quic_spdy_client_stream.h" 5 #include "net/tools/quic/quic_spdy_client_stream.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "net/quic/core/quic_utils.h" 10 #include "net/quic/core/quic_utils.h"
11 #include "net/quic/core/spdy_utils.h" 11 #include "net/quic/core/spdy_utils.h"
12 #include "net/quic/platform/api/quic_logging.h" 12 #include "net/quic/platform/api/quic_logging.h"
13 #include "net/quic/platform/api/quic_socket_address.h" 13 #include "net/quic/platform/api/quic_socket_address.h"
14 #include "net/quic/platform/api/quic_test.h"
14 #include "net/quic/platform/api/quic_text_utils.h" 15 #include "net/quic/platform/api/quic_text_utils.h"
15 #include "net/quic/test_tools/crypto_test_utils.h" 16 #include "net/quic/test_tools/crypto_test_utils.h"
16 #include "net/quic/test_tools/quic_test_utils.h" 17 #include "net/quic/test_tools/quic_test_utils.h"
17 #include "net/tools/quic/quic_client_session.h" 18 #include "net/tools/quic/quic_client_session.h"
18 #include "testing/gmock/include/gmock/gmock.h"
19 #include "testing/gtest/include/gtest/gtest.h"
20 19
21 using base::IntToString; 20 using base::IntToString;
22 using std::string; 21 using std::string;
23 using testing::StrictMock; 22 using testing::StrictMock;
24 using testing::TestWithParam; 23 using testing::TestWithParam;
25 24
26 namespace net { 25 namespace net {
27 namespace test { 26 namespace test {
28 27
29 namespace { 28 namespace {
(...skipping 12 matching lines...) Expand all
42 ~MockQuicClientSession() override {} 41 ~MockQuicClientSession() override {}
43 42
44 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); 43 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id));
45 44
46 private: 45 private:
47 QuicCryptoClientConfig crypto_config_; 46 QuicCryptoClientConfig crypto_config_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(MockQuicClientSession); 48 DISALLOW_COPY_AND_ASSIGN(MockQuicClientSession);
50 }; 49 };
51 50
52 class QuicSpdyClientStreamTest : public ::testing::Test { 51 class QuicSpdyClientStreamTest : public QuicTest {
53 public: 52 public:
54 class StreamVisitor; 53 class StreamVisitor;
55 54
56 QuicSpdyClientStreamTest() 55 QuicSpdyClientStreamTest()
57 : connection_(new StrictMock<MockQuicConnection>(&helper_, 56 : connection_(new StrictMock<MockQuicConnection>(&helper_,
58 &alarm_factory_, 57 &alarm_factory_,
59 Perspective::IS_CLIENT)), 58 Perspective::IS_CLIENT)),
60 session_(connection_, &push_promise_index_), 59 session_(connection_, &push_promise_index_),
61 body_("hello world") { 60 body_("hello world") {
62 session_.Initialize(); 61 session_.Initialize();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 stream_->OnStreamFrame( 189 stream_->OnStreamFrame(
191 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); 190 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_));
192 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) { 191 if (FLAGS_quic_reloadable_flag_quic_always_enable_bidi_streaming) {
193 EXPECT_TRUE(stream_->reading_stopped()); 192 EXPECT_TRUE(stream_->reading_stopped());
194 } 193 }
195 } 194 }
196 195
197 } // namespace 196 } // namespace
198 } // namespace test 197 } // namespace test
199 } // namespace net 198 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_test.cc ('k') | net/tools/quic/quic_spdy_server_stream_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698