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

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

Issue 10796114: Added ToJson to JSON schema compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed scope Created 8 years, 5 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/content_settings.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/objects_unittest.cc
diff --git a/tools/json_schema_compiler/test/objects_unittest.cc b/tools/json_schema_compiler/test/objects_unittest.cc
index 95c3f0d96ac31aa5828cbdeb0abf3cdf6015647e..3582f4f3dbaeb187cae0ccd91c787527d6cdfce8 100644
--- a/tools/json_schema_compiler/test/objects_unittest.cc
+++ b/tools/json_schema_compiler/test/objects_unittest.cc
@@ -4,6 +4,7 @@
#include "tools/json_schema_compiler/test/objects.h"
+#include "base/json/json_writer.h"
#include "testing/gtest/include/gtest/gtest.h"
using namespace test::api::objects;
@@ -67,4 +68,9 @@ TEST(JsonSchemaCompilerObjectsTest, OnObjectFiredCreate) {
DictionaryValue* result = NULL;
ASSERT_TRUE(results->GetDictionary(0, &result));
ASSERT_TRUE(result->Equals(&expected));
+
+ std::string json1 = OnObjectFired::ToJson(object);
+ std::string json2;
+ base::JSONWriter::Write(results.get(), &json2);
+ ASSERT_EQ(json1, json2);
}
« no previous file with comments | « tools/json_schema_compiler/test/content_settings.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698