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

Unified Diff: tools/json_schema_compiler/model_test.py

Issue 9491002: json_schema_compiler: any, additionalProperties, functions on types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add any in arrays to util.h Created 8 years, 10 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/model.py ('k') | tools/json_schema_compiler/previewserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/model_test.py
diff --git a/tools/json_schema_compiler/model_test.py b/tools/json_schema_compiler/model_test.py
index 824e26a5170edf95ad5498083c708cd7394f792f..3217498c4b48f803d3e138c0deb52efa1fcfa282 100644
--- a/tools/json_schema_compiler/model_test.py
+++ b/tools/json_schema_compiler/model_test.py
@@ -37,11 +37,6 @@ class ModelTest(unittest.TestCase):
self.assertEquals(["contains", "getAll", "remove", "request"],
sorted(self.permissions.functions.keys()))
- def testFunctionNoCallback(self):
- del (self.permissions_json[0]['functions'][0]['parameters'][0])
- self.assertRaises(AssertionError, self.model.AddNamespace,
- self.permissions_json[0], 'path/to/something.json')
-
def testFunctionNoCompile(self):
# tabs.json has 2 functions marked as nocompile (connect, sendRequest)
self.assertEquals(["captureVisibleTab", "create", "detectLanguage",
@@ -57,9 +52,9 @@ class ModelTest(unittest.TestCase):
self.assertEquals(['Window'], self.windows.types.keys())
def testHasProperties(self):
- self.assertEquals(["active", "favIconUrl", "highlighted", "id",
+ self.assertEquals(["active", "fav_icon_url", "highlighted", "id",
"incognito", "index", "pinned", "selected", "status", "title", "url",
- "windowId"],
+ "window_id"],
sorted(self.tabs.types['Tab'].properties.keys()))
def testProperties(self):
@@ -75,7 +70,7 @@ class ModelTest(unittest.TestCase):
self.assertEquals(model.PropertyType.OBJECT, object_prop.type_)
self.assertEquals(
["active", "highlighted", "pinned", "status", "title", "url",
- "windowId", "windowType"],
+ "window_id", "window_type"],
sorted(object_prop.properties.keys()))
def testChoices(self):
@@ -85,7 +80,7 @@ class ModelTest(unittest.TestCase):
def testPropertyNotImplemented(self):
(self.permissions_json[0]['types'][0]
['properties']['permissions']['type']) = 'something'
- self.assertRaises(NotImplementedError, self.model.AddNamespace,
+ self.assertRaises(model.ParseException, self.model.AddNamespace,
self.permissions_json[0], 'path/to/something.json')
def testDescription(self):
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | tools/json_schema_compiler/previewserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698