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

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: Address kalman's comment 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..0b68af6dfa32493b9cc16b195d4315e02fa9d12a 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"
sergeygs 2013/11/02 06:20:44 Single quotes?
Haojian Wu 2013/11/03 01:56:16 Done.
+ 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"
sergeygs 2013/11/02 06:20:44 Single quotes?
Haojian Wu 2013/11/03 01:56:16 Done.
+ 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.',

Powered by Google App Engine
This is Rietveld 408576698