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

Unified Diff: tools/json_schema_compiler/idl_schema_test.py

Issue 38573008: Add "platforms" key in IDL schema compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments 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 1f5d7d67ec24ce114fc96654c0077378895865db..e0c987e1b0e7c0ad5658cbf3864a0ade976ea3fc 100755
--- a/tools/json_schema_compiler/idl_schema_test.py
+++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -108,6 +108,25 @@ class IdlSchemaTest(unittest.TestCase):
self.assertTrue(idl_basics['internal'])
self.assertFalse(idl_basics['nodoc'])
+ def testChromeOSPlatformsNamespace(self):
+ schema = idl_schema.Load('test/idl_namespace_chromeos.idl')[0]
+ self.assertEquals('idl_namespace_chromeos', schema['namespace'])
+ expected = ['chromeos']
+ self.assertEquals(expected, schema['platforms'])
+
+ def testAllPlatformsNamespace(self):
+ schema = idl_schema.Load('test/idl_namespace_all_platforms.idl')[0]
+ self.assertEquals('idl_namespace_all_platforms', schema['namespace'])
+ expected = ['chromeos', 'chromeos_touch', 'linux', 'mac', 'win']
+ self.assertEquals(expected, schema['platforms'])
+
+ def testNonSpecificPlatformsNamespace(self):
+ schema = idl_schema.Load('test/idl_namespace_non_specific_platforms.idl')[0]
+ self.assertEquals('idl_namespace_non_specific_platforms',
+ schema['namespace'])
+ expected = None
+ self.assertEquals(expected, 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/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698