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

Unified Diff: tools/json_schema_compiler/idl_schema_test.py

Issue 39113003: Docserver: Display enum value descriptions in API docs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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/idl_schema.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/idl_schema_test.py
diff --git a/tools/json_schema_compiler/idl_schema_test.py b/tools/json_schema_compiler/idl_schema_test.py
index e0c987e1b0e7c0ad5658cbf3864a0ade976ea3fc..0840058ac241a4d9264db8eecfc9c24423530f85 100755
--- a/tools/json_schema_compiler/idl_schema_test.py
+++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -77,7 +77,9 @@ class IdlSchemaTest(unittest.TestCase):
def testEnum(self):
schema = self.idl_basics
- expected = {'enum': ['name1', 'name2'], 'description': 'Enum description',
+ expected = {'enum': [{'name': 'name1', 'description': 'comment1'},
+ {'name': 'name2'}],
+ 'description': 'Enum description',
'type': 'string', 'id': 'EnumType'}
self.assertEquals(expected, getType(schema, expected['id']))
@@ -162,10 +164,12 @@ class IdlSchemaTest(unittest.TestCase):
schema = idl_schema.Load('test/idl_reserved_words.idl')[0]
foo_type = getType(schema, 'Foo')
- self.assertEquals(['float', 'DOMString'], foo_type['enum'])
+ self.assertEquals([{'name': 'float'}, {'name': 'DOMString'}],
+ foo_type['enum'])
enum_type = getType(schema, 'enum')
- self.assertEquals(['callback', 'namespace'], enum_type['enum'])
+ self.assertEquals([{'name': 'callback'}, {'name': 'namespace'}],
+ enum_type['enum'])
dictionary = getType(schema, 'dictionary')
self.assertEquals('integer', dictionary['properties']['long']['type'])
« no previous file with comments | « tools/json_schema_compiler/idl_schema.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698