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

Unified Diff: chromeos/network/onc/onc_validator_unittest.cc

Issue 12390017: Separating ONC<->Shill translation from the ONC signature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browser tests. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/onc/onc_validator_unittest.cc
diff --git a/chromeos/network/onc/onc_validator_unittest.cc b/chromeos/network/onc/onc_validator_unittest.cc
index 8553453341b0c5773c9e8538911e0489243c254f..cf7bfdc346d791d5a70a31ad85bce9590f68a01d 100644
--- a/chromeos/network/onc/onc_validator_unittest.cc
+++ b/chromeos/network/onc/onc_validator_unittest.cc
@@ -156,7 +156,10 @@ INSTANTIATE_TEST_CASE_P(
true),
OncParams("managed_ethernet.onc",
&kNetworkConfigurationSignature,
- true)));
+ true),
+ OncParams("translation_of_shill_wifi_with_state.onc",
+ &kNetworkWithStateSignature,
+ false)));
namespace {
@@ -271,7 +274,18 @@ INSTANTIATE_TEST_CASE_P(
std::make_pair(OncParams("managed-network-missing-required",
&kNetworkConfigurationSignature,
true),
- RepairParams("", "managed-network-missing-required"))));
+ RepairParams("", "managed-network-missing-required")),
+ // Ensure that state values from Shill aren't accepted as
+ // configuration.
+ std::make_pair(OncParams("network-state-field",
+ &kNetworkConfigurationSignature,
+ false),
+ RepairParams("", "network-repaired")),
+ std::make_pair(OncParams("network-nested-state-field",
+ &kNetworkConfigurationSignature,
+ false),
+ RepairParams("",
+ "network-nested-state-field-repaired"))));
// Strict and liberal validator repair identically.
INSTANTIATE_TEST_CASE_P(
« no previous file with comments | « chromeos/network/onc/onc_validator.cc ('k') | chromeos/test/data/network/invalid_settings_with_repairs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698