| Index: components/policy/core/common/schema_unittest.cc
|
| diff --git a/components/policy/core/common/schema_unittest.cc b/components/policy/core/common/schema_unittest.cc
|
| index c0c3193eadde8380cd411e13346fa6a6ee1b1e85..8effd896aabab93aaf9ec32abf1f6e6491f4fff1 100644
|
| --- a/components/policy/core/common/schema_unittest.cc
|
| +++ b/components/policy/core/common/schema_unittest.cc
|
| @@ -128,16 +128,21 @@ void TestSchemaValidation(Schema schema,
|
| // Schema::Validate().
|
| error = kNoErrorReturned;
|
| scoped_ptr<base::Value> cloned_value(value.DeepCopy());
|
| - returned = schema.Normalize(cloned_value.get(), strategy, NULL, &error);
|
| + bool touched = false;
|
| + returned =
|
| + schema.Normalize(cloned_value.get(), strategy, NULL, &error, &touched);
|
| EXPECT_EQ(returned, expected_return_value) << error;
|
|
|
| + bool strictly_valid = schema.Validate(value, SCHEMA_STRICT, NULL, &error);
|
| + EXPECT_EQ(!strictly_valid && returned, touched);
|
| +
|
| // Test that Schema::Normalize() have actually dropped invalid and unknown
|
| // properties.
|
| if (expected_return_value) {
|
| EXPECT_TRUE(
|
| schema.Validate(*cloned_value.get(), SCHEMA_STRICT, NULL, &error));
|
| - EXPECT_TRUE(
|
| - schema.Normalize(cloned_value.get(), SCHEMA_STRICT, NULL, &error));
|
| + EXPECT_TRUE(schema.Normalize(
|
| + cloned_value.get(), SCHEMA_STRICT, NULL, &error, NULL));
|
| }
|
| }
|
|
|
|
|