OLD | NEW |
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 "chromeos/network/onc/onc_validator.h" | 5 #include "chromeos/network/onc/onc_validator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 &kNetworkWithStateSignature, | 215 &kNetworkWithStateSignature, |
216 false), | 216 false), |
217 OncParams("valid_openvpn_with_cert_pems.onc", | 217 OncParams("valid_openvpn_with_cert_pems.onc", |
218 &kNetworkConfigurationSignature, | 218 &kNetworkConfigurationSignature, |
219 false), | 219 false), |
220 OncParams("openvpn_with_password.onc", | 220 OncParams("openvpn_with_password.onc", |
221 &kNetworkConfigurationSignature, | 221 &kNetworkConfigurationSignature, |
222 false), | 222 false), |
223 OncParams("third_party_vpn.onc", | 223 OncParams("third_party_vpn.onc", |
224 &kNetworkConfigurationSignature, | 224 &kNetworkConfigurationSignature, |
225 false))); | 225 false), |
| 226 OncParams("tether.onc", &kNetworkWithStateSignature, false))); |
226 | 227 |
227 namespace { | 228 namespace { |
228 | 229 |
229 struct RepairParams { | 230 struct RepairParams { |
230 RepairParams(const std::string& strict_repaired, | 231 RepairParams(const std::string& strict_repaired, |
231 const std::string& liberal_repaired, | 232 const std::string& liberal_repaired, |
232 bool liberal_valid) | 233 bool liberal_valid) |
233 : location_of_strict_repaired(strict_repaired), | 234 : location_of_strict_repaired(strict_repaired), |
234 location_of_liberal_repaired(liberal_repaired), | 235 location_of_liberal_repaired(liberal_repaired), |
235 expect_liberal_valid(liberal_valid) {} | 236 expect_liberal_valid(liberal_valid) {} |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 true), | 545 true), |
545 ExpectBothNotValid("", "")), | 546 ExpectBothNotValid("", "")), |
546 std::make_pair(OncParams("network-with-client-cert-pattern", | 547 std::make_pair(OncParams("network-with-client-cert-pattern", |
547 &kNetworkConfigurationSignature, | 548 &kNetworkConfigurationSignature, |
548 true, | 549 true, |
549 ::onc::ONC_SOURCE_DEVICE_POLICY), | 550 ::onc::ONC_SOURCE_DEVICE_POLICY), |
550 ExpectBothNotValid("", "")), | 551 ExpectBothNotValid("", "")), |
551 std::make_pair(OncParams("openvpn-invalid-verify-x509-type", | 552 std::make_pair(OncParams("openvpn-invalid-verify-x509-type", |
552 &kNetworkConfigurationSignature, | 553 &kNetworkConfigurationSignature, |
553 false), | 554 false), |
| 555 ExpectBothNotValid("", "")), |
| 556 std::make_pair(OncParams("tether-missing-battery-percentage", |
| 557 &kNetworkWithStateSignature, |
| 558 true), |
| 559 ExpectBothNotValid("", "")), |
| 560 std::make_pair(OncParams("tether-negative-battery", |
| 561 &kNetworkWithStateSignature, |
| 562 true), |
| 563 ExpectBothNotValid("", "")), |
| 564 std::make_pair(OncParams("tether-battery-over-100", |
| 565 &kNetworkWithStateSignature, |
| 566 true), |
| 567 ExpectBothNotValid("", "")), |
| 568 std::make_pair(OncParams("tether-missing-carrier", |
| 569 &kNetworkWithStateSignature, |
| 570 true), |
| 571 ExpectBothNotValid("", "")), |
| 572 std::make_pair(OncParams("tether-missing-signal-strength", |
| 573 &kNetworkWithStateSignature, |
| 574 true), |
| 575 ExpectBothNotValid("", "")), |
| 576 std::make_pair(OncParams("tether-negative-signal-strength", |
| 577 &kNetworkWithStateSignature, |
| 578 true), |
| 579 ExpectBothNotValid("", "")), |
| 580 std::make_pair(OncParams("tether-signal-strength-over-100", |
| 581 &kNetworkWithStateSignature, |
| 582 true), |
554 ExpectBothNotValid("", "")))); | 583 ExpectBothNotValid("", "")))); |
555 | 584 |
556 } // namespace onc | 585 } // namespace onc |
557 } // namespace chromeos | 586 } // namespace chromeos |
OLD | NEW |