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

Unified Diff: tools/json_schema_compiler/idl_schema_test.py

Issue 56543003: Add "implemented_in" key in IDL schema compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 7 years, 1 month 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
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 0840058ac241a4d9264db8eecfc9c24423530f85..ca9b6e0b8a980e015441a8c617408c79ec8cf4eb 100755
--- a/tools/json_schema_compiler/idl_schema_test.py
+++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -129,6 +129,24 @@ class IdlSchemaTest(unittest.TestCase):
expected = None
self.assertEquals(expected, schema['platforms'])
+ def testSpecificImplementNamespace(self):
+ schema = idl_schema.Load('test/idl_namespace_specific_implement.idl')[0]
+ self.assertEquals('idl_namespace_specific_implement',
+ schema['namespace'])
+ expected = 'idl_namespace_specific_implement.idl'
+ self.assertEquals(expected, schema['compiler_options']['implemented_in'])
+
+ def testSpecificImplementOnChromeOSNamespace(self):
+ schema = idl_schema.Load(
+ 'test/idl_namespace_specific_implement_chromeos.idl')[0]
+ self.assertEquals('idl_namespace_specific_implement_chromeos',
+ schema['namespace'])
+ expected_implemented_path = 'idl_namespace_specific_implement_chromeos.idl'
+ expected_platform = ['chromeos']
+ self.assertEquals(expected_implemented_path,
+ schema['compiler_options']['implemented_in'])
+ self.assertEquals(expected_platform, schema['platforms'])
+
def testCallbackComment(self):
schema = self.idl_basics
self.assertEquals('A comment on a callback.',
« no previous file with comments | « tools/json_schema_compiler/idl_schema.py ('k') | tools/json_schema_compiler/test/idl_namespace_specific_implement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698