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

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: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) Created 5 years, 11 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 "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 #include <pk11pub.h> 8 #include <pk11pub.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 std::string name = wifi ? kWifiStub : kEthernetEapStub; 115 std::string name = wifi ? kWifiStub : kEthernetEapStub;
116 AddService(name, type, shill::kStateOnline); 116 AddService(name, type, shill::kStateOnline);
117 service_test_->SetServiceProperty( 117 service_test_->SetServiceProperty(
118 name, shill::kEapCertIdProperty, base::StringValue(cert_id)); 118 name, shill::kEapCertIdProperty, base::StringValue(cert_id));
119 service_test_->SetServiceProperty( 119 service_test_->SetServiceProperty(
120 name, shill::kEapKeyIdProperty, base::StringValue(cert_id)); 120 name, shill::kEapKeyIdProperty, base::StringValue(cert_id));
121 121
122 if (wifi) { 122 if (wifi) {
123 service_test_->SetServiceProperty( 123 service_test_->SetServiceProperty(
124 name, 124 name,
125 shill::kSecurityProperty, 125 shill::kSecurityClassProperty,
126 base::StringValue(shill::kSecurity8021x)); 126 base::StringValue(shill::kSecurity8021x));
127 } 127 }
128 } 128 }
129 129
130 void GetEapCertId(bool wifi, std::string* cert_id) { 130 void GetEapCertId(bool wifi, std::string* cert_id) {
131 cert_id->clear(); 131 cert_id->clear();
132 132
133 std::string name = wifi ? kWifiStub : kEthernetEapStub; 133 std::string name = wifi ? kWifiStub : kEthernetEapStub;
134 const base::DictionaryValue* properties = 134 const base::DictionaryValue* properties =
135 service_test_->GetServiceProperties(name); 135 service_test_->GetServiceProperties(name);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 base::RunLoop().RunUntilIdle(); 331 base::RunLoop().RunUntilIdle();
332 332
333 std::string pkcs11_id; 333 std::string pkcs11_id;
334 std::string slot_id; 334 std::string slot_id;
335 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); 335 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id);
336 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); 336 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id);
337 EXPECT_EQ(test_client_cert_slot_id_, slot_id); 337 EXPECT_EQ(test_client_cert_slot_id_, slot_id);
338 } 338 }
339 339
340 } // namespace chromeos 340 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_cert_migrator.cc ('k') | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698