json_schema_compiler: Added wider support for OBJECTs and ENUMs. Used the new 'dependencies' property in the jsons. Refactored to avoid code duplication. Added tests for new features and where tests were lacking.

BUG=
TEST=unit_tests --gtest_filter=JsonSchemaCompiler*


Review URL: http://codereview.chromium.org/9456007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123909 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/json_schema_compile.gypi b/build/json_schema_compile.gypi
index 55d6d30..16dd88cb 100644
--- a/build/json_schema_compile.gypi
+++ b/build/json_schema_compile.gypi
@@ -27,6 +27,10 @@
         '<(api_gen_dir)/util.cc',
         '<(api_gen_dir)/util.h',
         '<(api_gen_dir)/util_cc_helper.py',
+        # TODO(calamity): uncomment this when gyp on windows behaves like other
+        # platforms. List expansions of filepaths in inputs expand to different
+        # things.
+        # '<@(json_schema_files)',
       ],
       'outputs': [
         '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
@@ -39,7 +43,6 @@
         '--root=<(DEPTH)',
         '--destdir=<(SHARED_INTERMEDIATE_DIR)',
         '--namespace=<(root_namespace)',
-        '<@(json_schema_files)',
       ],
       'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons',
       'process_outputs_as_sources': 1,