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

Side by Side Diff: net/quic/crypto/crypto_server_test.cc

Issue 345453003: QUIC - Minor change to keep the code similar to internal source tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/congestion_control/send_algorithm_simulator.h ('k') | net/quic/quic_protocol.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <ostream> 5 #include <ostream>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "crypto/secure_hash.h" 10 #include "crypto/secure_hash.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 scfg->MarkDirty(); 627 scfg->MarkDirty();
628 const QuicData& serialized(scfg->GetSerialized()); 628 const QuicData& serialized(scfg->GetSerialized());
629 629
630 scoped_ptr<crypto::SecureHash> hash( 630 scoped_ptr<crypto::SecureHash> hash(
631 crypto::SecureHash::Create(crypto::SecureHash::SHA256)); 631 crypto::SecureHash::Create(crypto::SecureHash::SHA256));
632 hash->Update(serialized.data(), serialized.length()); 632 hash->Update(serialized.data(), serialized.length());
633 uint8 digest[16]; 633 uint8 digest[16];
634 hash->Finish(digest, sizeof(digest)); 634 hash->Finish(digest, sizeof(digest));
635 635
636 ASSERT_EQ(scid.size(), sizeof(digest)); 636 ASSERT_EQ(scid.size(), sizeof(digest));
637 EXPECT_TRUE(0 == memcmp(digest, scid_str.data(), sizeof(digest))); 637 EXPECT_EQ(0, memcmp(digest, scid_str.data(), sizeof(digest)));
638 } 638 }
639 639
640 class CryptoServerTestNoConfig : public CryptoServerTest { 640 class CryptoServerTestNoConfig : public CryptoServerTest {
641 public: 641 public:
642 virtual void SetUp() { 642 virtual void SetUp() {
643 // Deliberately don't add a config so that we can test this situation. 643 // Deliberately don't add a config so that we can test this situation.
644 } 644 }
645 }; 645 };
646 646
647 TEST_P(CryptoServerTestNoConfig, DontCrash) { 647 TEST_P(CryptoServerTestNoConfig, DontCrash) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 strike_register_client_->RunPendingVerifications(); 718 strike_register_client_->RunPendingVerifications();
719 ASSERT_TRUE(called); 719 ASSERT_TRUE(called);
720 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); 720 EXPECT_EQ(0, strike_register_client_->PendingVerifications());
721 // The message should be rejected now. 721 // The message should be rejected now.
722 EXPECT_EQ(kREJ, out_.tag()); 722 EXPECT_EQ(kREJ, out_.tag());
723 } 723 }
724 724
725 } // namespace test 725 } // namespace test
726 } // namespace net 726 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/send_algorithm_simulator.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698