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

Unified Diff: chrome/common/json_schema_validator_unittest.cc

Issue 12886024: Move JSON schema validator code into its own directory in chrome/common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/common/json_schema_validator.cc ('k') | chrome/common/json_schema_validator_unittest_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_schema_validator_unittest.cc
diff --git a/chrome/common/json_schema_validator_unittest.cc b/chrome/common/json_schema_validator_unittest.cc
deleted file mode 100644
index 5ea8d1c7b6894b87b9876e2d85a0be1b0c41e308..0000000000000000000000000000000000000000
--- a/chrome/common/json_schema_validator_unittest.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/values.h"
-#include "chrome/common/json_schema_validator.h"
-#include "chrome/common/json_schema_validator_unittest_base.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class JSONSchemaValidatorCPPTest : public JSONSchemaValidatorTestBase {
- public:
- JSONSchemaValidatorCPPTest()
- : JSONSchemaValidatorTestBase(JSONSchemaValidatorTestBase::CPP) {
- }
-
- protected:
- virtual void ExpectValid(const std::string& test_source,
- Value* instance, DictionaryValue* schema,
- ListValue* types) OVERRIDE {
- JSONSchemaValidator validator(schema, types);
- if (validator.Validate(instance))
- return;
-
- for (size_t i = 0; i < validator.errors().size(); ++i) {
- ADD_FAILURE() << test_source << ": "
- << validator.errors()[i].path << ": "
- << validator.errors()[i].message;
- }
- }
-
- virtual void ExpectNotValid(
- const std::string& test_source,
- Value* instance, DictionaryValue* schema,
- ListValue* types,
- const std::string& expected_error_path,
- const std::string& expected_error_message) OVERRIDE {
- JSONSchemaValidator validator(schema, types);
- if (validator.Validate(instance)) {
- ADD_FAILURE() << test_source;
- return;
- }
-
- ASSERT_EQ(1u, validator.errors().size()) << test_source;
- EXPECT_EQ(expected_error_path, validator.errors()[0].path) << test_source;
- EXPECT_EQ(expected_error_message, validator.errors()[0].message)
- << test_source;
- }
-};
-
-TEST_F(JSONSchemaValidatorCPPTest, Test) {
- RunTests();
-}
« no previous file with comments | « chrome/common/json_schema_validator.cc ('k') | chrome/common/json_schema_validator_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698