Index: tools/json_schema_compiler/js_externs_generator_test.py |
diff --git a/tools/json_schema_compiler/js_externs_generator_test.py b/tools/json_schema_compiler/js_externs_generator_test.py |
index b74260daf86e5fcc0932bdd79b6501d651356fe6..1c9f6478d136408710cbfff49678c16cd7b174ec 100755 |
--- a/tools/json_schema_compiler/js_externs_generator_test.py |
+++ b/tools/json_schema_compiler/js_externs_generator_test.py |
@@ -163,6 +163,12 @@ fake_json = """// Copyright 2014 The Chromium Authors. All rights reserved. |
{ |
"namespace": "fakeJson", |
"description": "Fake JSON API Stuff", |
+ "types": [ { |
+ "id": "CrazyEnum", |
+ "type": "string", |
+ "enum": ["camelCaseEnum", "Non-Characters", "5NumFirst", \ |
+"3Just-plainOld_MEAN"] |
+ } ], |
"functions": [ { |
"name": "funcWithInlineObj", |
"type": "function", |
@@ -231,6 +237,17 @@ json_expected = """// Copyright %s The Chromium Authors. All rights reserved. |
chrome.fakeJson = {}; |
/** |
+ * @enum {string} |
+ * @see https://developer.chrome.com/extensions/fakeJson#type-CrazyEnum |
+ */ |
+chrome.fakeJson.CrazyEnum = { |
+ CAMEL_CASE_ENUM: 'camelCaseEnum', |
+ NON_CHARACTERS: 'Non-Characters', |
+ _5NUM_FIRST: '5NumFirst', |
+ _3JUST_PLAIN_OLD_MEAN: '3Just-plainOld_MEAN', |
+}; |
+ |
+/** |
* @param {{ |
* foo: (boolean|undefined), |
* bar: number, |