| OLD | NEW |
| 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 <stddef.h> |
| 6 |
| 5 #include "base/values.h" | 7 #include "base/values.h" |
| 6 #include "components/json_schema/json_schema_validator.h" | 8 #include "components/json_schema/json_schema_validator.h" |
| 7 #include "components/json_schema/json_schema_validator_unittest_base.h" | 9 #include "components/json_schema/json_schema_validator_unittest_base.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 11 |
| 10 class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase { | 12 class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase { |
| 11 public: | 13 public: |
| 12 JSONSchemaValidatorCPPTest() : JSONSchemaValidatorTestBase() {} | 14 JSONSchemaValidatorCPPTest() : JSONSchemaValidatorTestBase() {} |
| 13 | 15 |
| 14 protected: | 16 protected: |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 " \"unknown attribute\": \"that should just be ignored\"" | 150 " \"unknown attribute\": \"that should just be ignored\"" |
| 149 "}", | 151 "}", |
| 150 JSONSchemaValidator::OPTIONS_IGNORE_UNKNOWN_ATTRIBUTES, | 152 JSONSchemaValidator::OPTIONS_IGNORE_UNKNOWN_ATTRIBUTES, |
| 151 &error)) << error; | 153 &error)) << error; |
| 152 EXPECT_FALSE(JSONSchemaValidator::IsValidSchema( | 154 EXPECT_FALSE(JSONSchemaValidator::IsValidSchema( |
| 153 "{" | 155 "{" |
| 154 " \"type\": \"object\"," | 156 " \"type\": \"object\"," |
| 155 " \"unknown attribute\": \"that will cause a failure\"" | 157 " \"unknown attribute\": \"that will cause a failure\"" |
| 156 "}", 0, &error)) << error; | 158 "}", 0, &error)) << error; |
| 157 } | 159 } |
| OLD | NEW |