| 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/quic_client_promised_info.h" | 5 #include "net/quic/quic_client_promised_info.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "net/gfe2/balsa_headers.h" | 9 #include "net/gfe2/balsa_headers.h" |
| 10 #include "net/quic/quic_client.h" | 10 #include "net/quic/quic_client.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 class MockQuicClientSession : public QuicClientSession { | 40 class MockQuicClientSession : public QuicClientSession { |
| 41 public: | 41 public: |
| 42 explicit MockQuicClientSession(QuicConnection* connection, | 42 explicit MockQuicClientSession(QuicConnection* connection, |
| 43 QuicClientPushPromiseIndex* push_promise_index) | 43 QuicClientPushPromiseIndex* push_promise_index) |
| 44 : QuicClientSession( | 44 : QuicClientSession( |
| 45 DefaultQuicConfig(), | 45 DefaultQuicConfig(), |
| 46 connection, | 46 connection, |
| 47 QuicServerId("example.com", 80, PRIVACY_MODE_DISABLED), | 47 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), |
| 48 &crypto_config_, | 48 &crypto_config_, |
| 49 push_promise_index), | 49 push_promise_index), |
| 50 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), | 50 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), |
| 51 authorized_(true) {} | 51 authorized_(true) {} |
| 52 ~MockQuicClientSession() override {} | 52 ~MockQuicClientSession() override {} |
| 53 | 53 |
| 54 bool IsAuthorized(const string& authority) override { return authorized_; } | 54 bool IsAuthorized(const string& authority) override { return authorized_; } |
| 55 | 55 |
| 56 void set_authorized(bool authorized) { authorized_ = authorized; } | 56 void set_authorized(bool authorized) { authorized_ = authorized; } |
| 57 | 57 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 EXPECT_FALSE(delegate.rendezvous_fired()); | 367 EXPECT_FALSE(delegate.rendezvous_fired()); |
| 368 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); | 368 EXPECT_EQ(delegate.rendezvous_stream(), nullptr); |
| 369 | 369 |
| 370 // Promise is gone | 370 // Promise is gone |
| 371 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); | 371 EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr); |
| 372 } | 372 } |
| 373 | 373 |
| 374 } // namespace | 374 } // namespace |
| 375 } // namespace test | 375 } // namespace test |
| 376 } // namespace net | 376 } // namespace net |
| OLD | NEW |