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

Unified Diff: tools/json_schema_compiler/test/test_util.cc

Issue 682493002: Remove the dependency on json schema compiler. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « tools/json_schema_compiler/test/test_util.h ('k') | tools/json_schema_compiler/test/windows.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/test_util.cc
diff --git a/tools/json_schema_compiler/test/test_util.cc b/tools/json_schema_compiler/test/test_util.cc
deleted file mode 100644
index 79d5f7b9711b7094af4aac9031cf6f94bbde70ae..0000000000000000000000000000000000000000
--- a/tools/json_schema_compiler/test/test_util.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 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 "tools/json_schema_compiler/test/test_util.h"
-
-#include <string>
-
-#include "base/json/json_reader.h"
-#include "base/logging.h"
-
-namespace json_schema_compiler {
-namespace test_util {
-
-scoped_ptr<base::Value> ReadJson(const base::StringPiece& json) {
- int error_code;
- std::string error_msg;
- scoped_ptr<base::Value> result(base::JSONReader::ReadAndReturnError(
- json,
- base::JSON_ALLOW_TRAILING_COMMAS,
- &error_code,
- &error_msg));
- // CHECK not ASSERT since passing invalid |json| is a test error.
- CHECK(result) << error_msg;
- return result.Pass();
-}
-
-scoped_ptr<base::ListValue> List(base::Value* a) {
- scoped_ptr<base::ListValue> list(new base::ListValue());
- list->Append(a);
- return list.Pass();
-}
-scoped_ptr<base::ListValue> List(base::Value* a, base::Value* b) {
- scoped_ptr<base::ListValue> list = List(a);
- list->Append(b);
- return list.Pass();
-}
-scoped_ptr<base::ListValue> List(base::Value* a,
- base::Value* b,
- base::Value* c) {
- scoped_ptr<base::ListValue> list = List(a, b);
- list->Append(c);
- return list.Pass();
-}
-
-scoped_ptr<base::DictionaryValue> Dictionary(
- const std::string& ak, base::Value* av) {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- dict->SetWithoutPathExpansion(ak, av);
- return dict.Pass();
-}
-scoped_ptr<base::DictionaryValue> Dictionary(
- const std::string& ak, base::Value* av,
- const std::string& bk, base::Value* bv) {
- scoped_ptr<base::DictionaryValue> dict = Dictionary(ak, av);
- dict->SetWithoutPathExpansion(bk, bv);
- return dict.Pass();
-}
-scoped_ptr<base::DictionaryValue> Dictionary(
- const std::string& ak, base::Value* av,
- const std::string& bk, base::Value* bv,
- const std::string& ck, base::Value* cv) {
- scoped_ptr<base::DictionaryValue> dict = Dictionary(ak, av, bk, bv);
- dict->SetWithoutPathExpansion(ck, cv);
- return dict.Pass();
-}
-
-} // namespace test_util
-} // namespace json_schema_compiler
« no previous file with comments | « tools/json_schema_compiler/test/test_util.h ('k') | tools/json_schema_compiler/test/windows.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698