OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/core/quic_client_promised_info.h" | 5 #include "net/quic/core/quic_client_promised_info.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/spdy_utils.h" | 10 #include "net/quic/core/spdy_utils.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class MockQuicClientSession : public QuicClientSession { | 25 class MockQuicClientSession : public QuicClientSession { |
26 public: | 26 public: |
27 explicit MockQuicClientSession(QuicConnection* connection, | 27 explicit MockQuicClientSession(QuicConnection* connection, |
28 QuicClientPushPromiseIndex* push_promise_index) | 28 QuicClientPushPromiseIndex* push_promise_index) |
29 : QuicClientSession( | 29 : QuicClientSession( |
30 DefaultQuicConfig(), | 30 DefaultQuicConfig(), |
31 connection, | 31 connection, |
32 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), | 32 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), |
33 &crypto_config_, | 33 &crypto_config_, |
34 push_promise_index), | 34 push_promise_index), |
35 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), | 35 crypto_config_(crypto_test_utils::ProofVerifierForTesting()), |
36 authorized_(true) {} | 36 authorized_(true) {} |
37 ~MockQuicClientSession() override {} | 37 ~MockQuicClientSession() override {} |
38 | 38 |
39 bool IsAuthorized(const string& authority) override { return authorized_; } | 39 bool IsAuthorized(const string& authority) override { return authorized_; } |
40 | 40 |
41 void set_authorized(bool authorized) { authorized_ = authorized; } | 41 void set_authorized(bool authorized) { authorized_ = authorized; } |
42 | 42 |
43 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); | 43 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); |
44 | 44 |
45 private: | 45 private: |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 EXPECT_FALSE(delegate.rendezvous_fired()); | 304 EXPECT_FALSE(delegate.rendezvous_fired()); |
305 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); | 305 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); |
306 | 306 |
307 // Promise is gone | 307 // Promise is gone |
308 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); | 308 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); |
309 } | 309 } |
310 | 310 |
311 } // namespace | 311 } // namespace |
312 } // namespace test | 312 } // namespace test |
313 } // namespace net | 313 } // namespace net |
OLD | NEW |