summaryrefslogtreecommitdiffstats
path: root/chromeos/network
diff options
context:
space:
mode:
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 15:02:20 +0000
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-17 15:02:20 +0000
commit0f2927b0b9bd0e5e01632564108a8c718e69da29 (patch)
tree1a62947d110df0c69257c0cf181dcd63cd44e682 /chromeos/network
parent7e740a05dfb9cf0ebe579c2d4b8cf1b054040cf1 (diff)
downloadchromium_src-0f2927b0b9bd0e5e01632564108a8c718e69da29.zip
chromium_src-0f2927b0b9bd0e5e01632564108a8c718e69da29.tar.gz
chromium_src-0f2927b0b9bd0e5e01632564108a8c718e69da29.tar.bz2
Adding more ONC validation tests.
- A typical configuration from real world. - A configuration generated from CPanel. BUG=162804 TBR=stevenjb@chromium.org Review URL: https://chromiumcodereview.appspot.com/11488008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network')
-rw-r--r--chromeos/network/onc/onc_validator_unittest.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chromeos/network/onc/onc_validator_unittest.cc b/chromeos/network/onc/onc_validator_unittest.cc
index 06f35dc..105e9a0 100644
--- a/chromeos/network/onc/onc_validator_unittest.cc
+++ b/chromeos/network/onc/onc_validator_unittest.cc
@@ -127,7 +127,14 @@ TEST_P(ONCValidatorValidTest, LiberalValidationValid) {
INSTANTIATE_TEST_CASE_P(
ONCValidatorValidTest,
ONCValidatorValidTest,
- ::testing::Values(OncParams("managed_toplevel.onc",
+ ::testing::Values(OncParams("managed_toplevel1.onc",
+ &kToplevelConfigurationSignature,
+ true),
+ OncParams("managed_toplevel2.onc",
+ &kToplevelConfigurationSignature,
+ true),
+ // Test a configuration generated by CPanel.
+ OncParams("managed_toplevel_cpanel.onc",
&kToplevelConfigurationSignature,
true),
OncParams("encrypted.onc",
@@ -276,6 +283,16 @@ INSTANTIATE_TEST_CASE_P(
false),
RepairParams("network-repaired", "network-repaired"))));
+// Strict and liberal validator both repair, but with different results.
+INSTANTIATE_TEST_CASE_P(
+ StrictAndLiberalRepairDifferently,
+ ONCValidatorTestRepairable,
+ ::testing::Values(
+ std::make_pair(OncParams("toplevel-with-nested-warning",
+ &kToplevelConfigurationSignature,
+ false),
+ RepairParams("toplevel-empty", "toplevel-repaired"))));
+
// Strict and liberal validator return both INVALID.
INSTANTIATE_TEST_CASE_P(
StrictAndLiberalInvalid,