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

Side by Side Diff: net/quic/core/quic_crypto_server_stream_test.cc

Issue 2464683002: adds std:: to stl types (#049) (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_crypto_server_stream.h" 5 #include "net/quic/core/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 InitializeServer(); 365 InitializeServer();
366 366
367 client_stream()->CryptoConnect(); 367 client_stream()->CryptoConnect();
368 368
369 if (AsyncStrikeRegisterVerification()) { 369 if (AsyncStrikeRegisterVerification()) {
370 EXPECT_FALSE(client_stream()->handshake_confirmed()); 370 EXPECT_FALSE(client_stream()->handshake_confirmed());
371 EXPECT_FALSE(server_stream()->handshake_confirmed()); 371 EXPECT_FALSE(server_stream()->handshake_confirmed());
372 372
373 // Advance the handshake. Expect that the server will be stuck waiting for 373 // Advance the handshake. Expect that the server will be stuck waiting for
374 // client nonce verification to complete. 374 // client nonce verification to complete.
375 pair<size_t, size_t> messages_moved = CryptoTestUtils::AdvanceHandshake( 375 std::pair<size_t, size_t> messages_moved =
376 client_connection_, client_stream(), 0, server_connection_, 376 CryptoTestUtils::AdvanceHandshake(client_connection_, client_stream(),
377 server_stream(), 0); 377 0, server_connection_,
378 server_stream(), 0);
378 EXPECT_EQ(1u, messages_moved.first); 379 EXPECT_EQ(1u, messages_moved.first);
379 EXPECT_EQ(0u, messages_moved.second); 380 EXPECT_EQ(0u, messages_moved.second);
380 EXPECT_EQ(1, strike_register_client_->PendingVerifications()); 381 EXPECT_EQ(1, strike_register_client_->PendingVerifications());
381 EXPECT_FALSE(client_stream()->handshake_confirmed()); 382 EXPECT_FALSE(client_stream()->handshake_confirmed());
382 EXPECT_FALSE(server_stream()->handshake_confirmed()); 383 EXPECT_FALSE(server_stream()->handshake_confirmed());
383 384
384 // The server handshake completes once the nonce verification completes. 385 // The server handshake completes once the nonce verification completes.
385 strike_register_client_->RunPendingVerifications(); 386 strike_register_client_->RunPendingVerifications();
386 EXPECT_FALSE(client_stream()->handshake_confirmed()); 387 EXPECT_FALSE(client_stream()->handshake_confirmed());
387 EXPECT_TRUE(server_stream()->handshake_confirmed()); 388 EXPECT_TRUE(server_stream()->handshake_confirmed());
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 // Regression test for b/31521252, in which a crash would happen here. 619 // Regression test for b/31521252, in which a crash would happen here.
619 AdvanceHandshakeWithFakeClient(); 620 AdvanceHandshakeWithFakeClient();
620 EXPECT_FALSE(server_stream()->encryption_established()); 621 EXPECT_FALSE(server_stream()->encryption_established());
621 EXPECT_FALSE(server_stream()->handshake_confirmed()); 622 EXPECT_FALSE(server_stream()->handshake_confirmed());
622 } 623 }
623 624
624 } // namespace 625 } // namespace
625 626
626 } // namespace test 627 } // namespace test
627 } // namespace net 628 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698