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

Side by Side Diff: chromeos/network/network_cert_migrator_unittest.cc

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: update wifi_sync component to use security_class() Created 6 years 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 "chromeos/network/network_cert_migrator.h" 5 #include "chromeos/network/network_cert_migrator.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 std::string name = wifi ? kWifiStub : kEthernetEapStub; 169 std::string name = wifi ? kWifiStub : kEthernetEapStub;
170 AddService(name, type, shill::kStateOnline); 170 AddService(name, type, shill::kStateOnline);
171 service_test_->SetServiceProperty( 171 service_test_->SetServiceProperty(
172 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); 172 name, shill::kEapCertIdProperty, base::StringValue(cert_id));
173 service_test_->SetServiceProperty( 173 service_test_->SetServiceProperty(
174 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); 174 name, shill::kEapKeyIdProperty, base::StringValue(cert_id));
175 175
176 if (wifi) { 176 if (wifi) {
177 service_test_->SetServiceProperty( 177 service_test_->SetServiceProperty(
178 name, 178 name,
179 shill::kSecurityProperty, 179 shill::kSecurityClassProperty,
180 base::StringValue(shill::kSecurity8021x)); 180 base::StringValue(shill::kSecurity8021x));
181 } 181 }
182 } 182 }
183 183
184 void GetEapCertId(bool wifi, std::string* cert_id) { 184 void GetEapCertId(bool wifi, std::string* cert_id) {
185 cert_id->clear(); 185 cert_id->clear();
186 186
187 std::string name = wifi ? kWifiStub : kEthernetEapStub; 187 std::string name = wifi ? kWifiStub : kEthernetEapStub;
188 const base::DictionaryValue* properties = 188 const base::DictionaryValue* properties =
189 service_test_->GetServiceProperties(name); 189 service_test_->GetServiceProperties(name);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 std::string pkcs11_id; 503 std::string pkcs11_id;
504 std::string slot_id; 504 std::string slot_id;
505 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); 505 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id);
506 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); 506 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id);
507 EXPECT_EQ(test_client_cert_slot_id_, slot_id); 507 EXPECT_EQ(test_client_cert_slot_id_, slot_id);
508 } 508 }
509 509
510 } // namespace chromeos 510 } // namespace chromeos
511 511
512 #endif 512 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698