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

Side by Side Diff: net/quic/quic_client_push_promise_index_test.cc

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. Created 4 years, 9 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
« no previous file with comments | « net/quic/quic_client_promised_info_test.cc ('k') | net/quic/quic_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_push_promise_index.h" 5 #include "net/quic/quic_client_push_promise_index.h"
6 6
7 #include "net/quic/spdy_utils.h" 7 #include "net/quic/spdy_utils.h"
8 #include "net/quic/test_tools/crypto_test_utils.h" 8 #include "net/quic/test_tools/crypto_test_utils.h"
9 #include "net/quic/test_tools/mock_quic_client_promised_info.h" 9 #include "net/quic/test_tools/mock_quic_client_promised_info.h"
10 #include "net/quic/test_tools/quic_test_utils.h" 10 #include "net/quic/test_tools/quic_test_utils.h"
11 #include "net/tools/quic/quic_client_session.h" 11 #include "net/tools/quic/quic_client_session.h"
12 12
13 using testing::_; 13 using testing::_;
14 using testing::Return; 14 using testing::Return;
15 using testing::StrictMock; 15 using testing::StrictMock;
16 16
17 namespace net { 17 namespace net {
18 namespace test { 18 namespace test {
19 namespace { 19 namespace {
20 20
21 class MockQuicClientSession : public QuicClientSession { 21 class MockQuicClientSession : public QuicClientSession {
22 public: 22 public:
23 explicit MockQuicClientSession(QuicConnection* connection, 23 explicit MockQuicClientSession(QuicConnection* connection,
24 QuicClientPushPromiseIndex* push_promise_index) 24 QuicClientPushPromiseIndex* push_promise_index)
25 : QuicClientSession( 25 : QuicClientSession(
26 DefaultQuicConfig(), 26 DefaultQuicConfig(),
27 connection, 27 connection,
28 QuicServerId("example.com", 80, PRIVACY_MODE_DISABLED), 28 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
29 &crypto_config_, 29 &crypto_config_,
30 push_promise_index), 30 push_promise_index),
31 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {} 31 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {}
32 ~MockQuicClientSession() override {} 32 ~MockQuicClientSession() override {}
33 33
34 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); 34 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id));
35 35
36 private: 36 private:
37 QuicCryptoClientConfig crypto_config_; 37 QuicCryptoClientConfig crypto_config_;
38 38
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 TEST_F(QuicClientPushPromiseIndexTest, GetPromise) { 97 TEST_F(QuicClientPushPromiseIndexTest, GetPromise) {
98 (*index_.promised_by_url())[url_] = &promised_; 98 (*index_.promised_by_url())[url_] = &promised_;
99 EXPECT_EQ(index_.GetPromised(url_), &promised_); 99 EXPECT_EQ(index_.GetPromised(url_), &promised_);
100 } 100 }
101 101
102 } // namespace 102 } // namespace
103 } // namespace test 103 } // namespace test
104 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_promised_info_test.cc ('k') | net/quic/quic_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698