summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 07:10:16 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 07:10:16 +0000
commit6d7acde585fd479efe53522fd703ce2c75bf384d (patch)
tree898863d55dbecfdaf610a3b0ac5c712d57cb1c91 /chrome/common
parent35238d34bbdee4dcf9b350b7b1d9a53b159c3a2a (diff)
downloadchromium_src-6d7acde585fd479efe53522fd703ce2c75bf384d.zip
chromium_src-6d7acde585fd479efe53522fd703ce2c75bf384d.tar.gz
chromium_src-6d7acde585fd479efe53522fd703ce2c75bf384d.tar.bz2
Fix and reenable extensions docs server testToDict
BUG=174464 Review URL: https://chromiumcodereview.appspot.com/12226030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/extensions/docs/server2/api_data_source_test.py2
-rw-r--r--chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json238
2 files changed, 120 insertions, 120 deletions
diff --git a/chrome/common/extensions/docs/server2/api_data_source_test.py b/chrome/common/extensions/docs/server2/api_data_source_test.py
index bc67801..b970079 100755
--- a/chrome/common/extensions/docs/server2/api_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/api_data_source_test.py
@@ -99,7 +99,7 @@ class APIDataSourceTest(unittest.TestCase):
self.assertEquals('method-get', dict_['functions'][0]['id'])
self.assertEquals('event-EventA', dict_['events'][0]['id'])
- def DISABLED_testToDict(self):
+ def testToDict(self):
filename = 'test_file.json'
expected_json = self._LoadJSON('expected_' + filename)
data_source = FakeAPIAndListDataSource(
diff --git a/chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json b/chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json
index 9d643d6..b9dfa6b 100644
--- a/chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json
+++ b/chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json
@@ -1,175 +1,175 @@
{
"functions": [
{
- "name": "get",
+ "name": "get",
"parameters": [
{
- "parent_name": "get",
- "functions": [],
+ "parent_name": "get",
+ "functions": [],
"choices": [
{
- "properties": [],
- "name": "string",
- "simple_type": "string",
- "functions": [],
- "events": [],
- "id": "type-a-string",
+ "properties": [],
+ "name": "string",
+ "simple_type": "string",
+ "functions": [],
+ "events": [],
+ "id": "type-a-string",
"description": null
- },
+ },
{
- "properties": [],
- "last": true,
- "name": "array",
- "functions": [],
- "events": [],
+ "properties": [],
+ "last": true,
+ "name": "array",
+ "functions": [],
+ "events": [],
"array": {
- "properties": [],
- "name": "arrayType",
- "simple_type": "string",
- "functions": [],
- "events": [],
- "id": "type-array-arrayType",
+ "properties": [],
+ "name": "arrayType",
+ "simple_type": "string",
+ "functions": [],
+ "events": [],
+ "id": "type-array-arrayType",
"description": null
- },
- "id": "type-a-array",
+ },
+ "id": "type-a-array",
"description": null
}
- ],
- "name": "a",
- "parameters": [],
- "id": "property-get-a",
- "returns": null,
- "optional": false,
- "properties": [],
+ ],
+ "name": "a",
+ "parameters": [],
+ "id": "property-get-a",
+ "returns": null,
+ "optional": null,
+ "properties": [],
"description": "a param"
- },
+ },
{
- "parent_name": "get",
- "last": true,
- "name": "callback",
- "simple_type": "function",
- "optional": false,
- "id": "property-get-callback",
+ "parent_name": "get",
+ "last": true,
+ "name": "callback",
+ "simple_type": "function",
+ "optional": false,
+ "id": "property-get-callback",
"description": null
}
- ],
+ ],
"callback": {
"parameters": [
{
- "description": null,
+ "description": null,
"array": {
- "properties": [],
- "name": "resultsType",
- "functions": [],
- "events": [],
+ "properties": [],
+ "name": "resultsType",
+ "functions": [],
+ "events": [],
"link": {
- "text": "TypeA",
- "href": "tester.html#type-TypeA",
+ "text": "TypeA",
+ "href": "tester.html#type-TypeA",
"name": "TypeA"
- },
- "id": "type-results-resultsType",
+ },
+ "id": "type-results-resultsType",
"description": null
- },
- "optional": false,
- "id": "property-callback-results",
- "parent_name": "callback",
- "functions": [],
- "last": true,
- "name": "results",
- "parameters": [],
- "properties": [],
+ },
+ "optional": null,
+ "id": "property-callback-results",
+ "parent_name": "callback",
+ "functions": [],
+ "last": true,
+ "name": "results",
+ "parameters": [],
+ "properties": [],
"returns": null
}
- ],
- "optional": false,
- "name": "callback",
+ ],
+ "optional": false,
+ "name": "callback",
"simple_type": {
"simple_type": "function"
}
- },
- "returns": null,
- "id": "method-get",
+ },
+ "returns": null,
+ "id": "method-get",
"description": "Gets stuff."
}
- ],
- "properties": [],
- "name": "tester",
+ ],
+ "properties": [],
+ "name": "tester",
"types": [
{
"properties": [
{
- "parent_name": "TypeA",
- "functions": [],
- "name": "b",
- "parameters": [],
- "id": "property-TypeA-b",
+ "parent_name": "TypeA",
+ "functions": [],
+ "name": "b",
+ "parameters": [],
+ "id": "property-TypeA-b",
"array": {
- "properties": [],
- "name": "bType",
- "functions": [],
- "events": [],
+ "properties": [],
+ "name": "bType",
+ "functions": [],
+ "events": [],
"link": {
- "text": "TypeA",
- "href": "tester.html#type-TypeA",
+ "text": "TypeA",
+ "href": "tester.html#type-TypeA",
"name": "TypeA"
- },
- "id": "type-b-bType",
+ },
+ "id": "type-b-bType",
"description": null
- },
- "returns": null,
- "optional": true,
- "properties": [],
+ },
+ "returns": null,
+ "optional": true,
+ "properties": [],
"description": "List of TypeA."
}
- ],
- "name": "TypeA",
- "simple_type": "object",
- "functions": [],
- "events": [],
- "id": "type-TypeA",
+ ],
+ "name": "TypeA",
+ "simple_type": "object",
+ "functions": [],
+ "events": [],
+ "id": "type-TypeA",
"description": "A cool thing."
}
- ],
+ ],
"events": [
{
- "callback": null,
- "name": "EventA",
+ "callback": null,
+ "name": "EventA",
"parameters": [
{
- "parent_name": "EventA",
- "functions": [],
- "simple_type": "string",
- "name": "id",
- "parameters": [],
- "id": "property-EventA-id",
- "returns": null,
- "optional": false,
- "properties": [],
+ "parent_name": "EventA",
+ "functions": [],
+ "simple_type": "string",
+ "name": "id",
+ "parameters": [],
+ "id": "property-EventA-id",
+ "returns": null,
+ "optional": null,
+ "properties": [],
"description": null
- },
+ },
{
- "description": null,
+ "description": null,
"link": {
- "text": "TypeA",
- "href": "tester.html#type-TypeA",
+ "text": "TypeA",
+ "href": "tester.html#type-TypeA",
"name": "TypeA"
- },
- "optional": false,
- "id": "property-EventA-bookmark",
- "parent_name": "EventA",
- "functions": [],
- "last": true,
- "name": "bookmark",
- "parameters": [],
- "properties": [],
+ },
+ "optional": null,
+ "id": "property-EventA-bookmark",
+ "parent_name": "EventA",
+ "functions": [],
+ "last": true,
+ "name": "bookmark",
+ "parameters": [],
+ "properties": [],
"returns": null
}
- ],
- "supportsRules": false,
- "filters": [],
- "conditions": [],
- "id": "event-EventA",
- "actions": [],
+ ],
+ "supportsRules": false,
+ "filters": [],
+ "conditions": [],
+ "id": "event-EventA",
+ "actions": [],
"description": "A cool event."
}
]