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

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

Issue 1780783003: Clang formatting net/quic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115909446
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "net/quic/crypto/quic_crypto_server_config.h" 5 #include "net/quic/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool found = false; 138 bool found = false;
139 for (pair<ServerConfigID, bool>& j : expected) { 139 for (pair<ServerConfigID, bool>& j : expected) {
140 if (i.first == j.first && i.second->is_primary == j.second) { 140 if (i.first == j.first && i.second->is_primary == j.second) {
141 found = true; 141 found = true;
142 j.first.clear(); 142 j.first.clear();
143 break; 143 break;
144 } 144 }
145 } 145 }
146 146
147 ASSERT_TRUE(found) << "Failed to find match for " << i.first 147 ASSERT_TRUE(found) << "Failed to find match for " << i.first
148 << " in configs:\n" << ConfigsDebug(); 148 << " in configs:\n"
149 << ConfigsDebug();
149 } 150 }
150 } 151 }
151 152
152 // ConfigsDebug returns a string that contains debugging information about 153 // ConfigsDebug returns a string that contains debugging information about
153 // the set of Configs loaded in |server_config_| and their status. 154 // the set of Configs loaded in |server_config_| and their status.
154 // ConfigsDebug() should be called after acquiring 155 // ConfigsDebug() should be called after acquiring
155 // server_config_->configs_lock_. 156 // server_config_->configs_lock_.
156 string ConfigsDebug() { 157 string ConfigsDebug() {
157 if (server_config_->configs_.empty()) { 158 if (server_config_->configs_.empty()) {
158 return "No Configs in QuicCryptoServerConfig"; 159 return "No Configs in QuicCryptoServerConfig";
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 TEST_F(CryptoServerConfigsTest, InvalidConfigs) { 661 TEST_F(CryptoServerConfigsTest, InvalidConfigs) {
661 // Ensure that invalid configs don't change anything. 662 // Ensure that invalid configs don't change anything.
662 SetConfigs("a", 800, 1, "b", 900, 1, "c", 1100, 1, nullptr); 663 SetConfigs("a", 800, 1, "b", 900, 1, "c", 1100, 1, nullptr);
663 test_peer_.CheckConfigs("a", false, "b", true, "c", false, nullptr); 664 test_peer_.CheckConfigs("a", false, "b", true, "c", false, nullptr);
664 SetConfigs("a", 800, 1, "c", 1100, 1, "INVALID1", 1000, 1, nullptr); 665 SetConfigs("a", 800, 1, "c", 1100, 1, "INVALID1", 1000, 1, nullptr);
665 test_peer_.CheckConfigs("a", false, "b", true, "c", false, nullptr); 666 test_peer_.CheckConfigs("a", false, "b", true, "c", false, nullptr);
666 } 667 }
667 668
668 } // namespace test 669 } // namespace test
669 } // namespace net 670 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | net/quic/test_tools/mock_quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698