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

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

Issue 1692253004: QUIC - chromium server push support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback round 2. 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_push_promise_index.cc ('k') | net/quic/quic_client_session_base.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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 (*index_.promised_by_url())[url_] = &promised_; 83 (*index_.promised_by_url())[url_] = &promised_;
84 EXPECT_CALL(promised_, HandleClientRequest(_, _)) 84 EXPECT_CALL(promised_, HandleClientRequest(_, _))
85 .WillOnce(Return(QUIC_FAILURE)); 85 .WillOnce(Return(QUIC_FAILURE));
86 EXPECT_EQ(index_.Try(request_, nullptr, &handle_), QUIC_FAILURE); 86 EXPECT_EQ(index_.Try(request_, nullptr, &handle_), QUIC_FAILURE);
87 } 87 }
88 88
89 TEST_F(QuicClientPushPromiseIndexTest, TryNoPromise) { 89 TEST_F(QuicClientPushPromiseIndexTest, TryNoPromise) {
90 EXPECT_EQ(index_.Try(request_, nullptr, &handle_), QUIC_FAILURE); 90 EXPECT_EQ(index_.Try(request_, nullptr, &handle_), QUIC_FAILURE);
91 } 91 }
92 92
93 TEST_F(QuicClientPushPromiseIndexTest, GetNoPromise) {
94 EXPECT_EQ(index_.GetPromised(url_), nullptr);
95 }
96
97 TEST_F(QuicClientPushPromiseIndexTest, GetPromise) {
98 (*index_.promised_by_url())[url_] = &promised_;
99 EXPECT_EQ(index_.GetPromised(url_), &promised_);
100 }
101
93 } // namespace 102 } // namespace
94 } // namespace test 103 } // namespace test
95 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_push_promise_index.cc ('k') | net/quic/quic_client_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698