summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/common/extensions/docs/server2/app.yaml2
-rw-r--r--chrome/common/extensions/docs/server2/cron.yaml2
-rw-r--r--chrome/common/extensions/docs/server2/manifest_data_source.py2
-rwxr-xr-xchrome/common/extensions/docs/server2/manifest_data_source_test.py36
-rw-r--r--chrome/common/extensions/docs/templates/json/manifest.json2
5 files changed, 41 insertions, 3 deletions
diff --git a/chrome/common/extensions/docs/server2/app.yaml b/chrome/common/extensions/docs/server2/app.yaml
index 3811159..9b1ea15 100644
--- a/chrome/common/extensions/docs/server2/app.yaml
+++ b/chrome/common/extensions/docs/server2/app.yaml
@@ -1,5 +1,5 @@
application: chrome-apps-doc
-version: 2-38-3
+version: 2-38-4
runtime: python27
api_version: 1
threadsafe: false
diff --git a/chrome/common/extensions/docs/server2/cron.yaml b/chrome/common/extensions/docs/server2/cron.yaml
index f8bc9f7..376d170 100644
--- a/chrome/common/extensions/docs/server2/cron.yaml
+++ b/chrome/common/extensions/docs/server2/cron.yaml
@@ -2,4 +2,4 @@ cron:
- description: Repopulates all cached data.
url: /_cron
schedule: every 5 minutes
- target: 2-38-3
+ target: 2-38-4
diff --git a/chrome/common/extensions/docs/server2/manifest_data_source.py b/chrome/common/extensions/docs/server2/manifest_data_source.py
index 9daa5bb..255509bd 100644
--- a/chrome/common/extensions/docs/server2/manifest_data_source.py
+++ b/chrome/common/extensions/docs/server2/manifest_data_source.py
@@ -48,6 +48,8 @@ def _ListifyAndSortDocs(features, app_name):
value['example'] = '{...}'
elif example == '[]':
value['example'] = '[...]'
+ elif example == '[{}]':
+ value['example'] = '[{...}]'
else:
coerce_example_to_feature(value)
if 'children' in value:
diff --git a/chrome/common/extensions/docs/server2/manifest_data_source_test.py b/chrome/common/extensions/docs/server2/manifest_data_source_test.py
index 7742a49d..0902101 100755
--- a/chrome/common/extensions/docs/server2/manifest_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/manifest_data_source_test.py
@@ -202,6 +202,42 @@ class ManifestDataSourceTest(unittest.TestCase):
self.assertEqual(
expected_docs, manifest_data_source._ListifyAndSortDocs(docs, 'apps'))
+ def testNonExpandedExamples(self):
+ docs = {
+ 'doc1': {
+ 'name': 'doc1',
+ 'example': {}
+ },
+ 'doc2': {
+ 'name': 'doc2',
+ 'example': []
+ },
+ 'doc3': {
+ 'name': 'doc3',
+ 'example': [{}]
+ }
+ }
+
+ expected_docs = [
+ {
+ 'name': 'doc1',
+ 'has_example': True,
+ 'example': '{...}'
+ },
+ {
+ 'name': 'doc2',
+ 'has_example': True,
+ 'example': '[...]'
+ },
+ {
+ 'name': 'doc3',
+ 'has_example': True,
+ 'example': '[{...}]'
+ }
+ ]
+ self.assertEqual(
+ expected_docs, manifest_data_source._ListifyAndSortDocs(docs, 'apps'))
+
def testManifestDataSource(self):
manifest_features = {
'doc1': {
diff --git a/chrome/common/extensions/docs/templates/json/manifest.json b/chrome/common/extensions/docs/templates/json/manifest.json
index 2cb5331..92b6df4 100644
--- a/chrome/common/extensions/docs/templates/json/manifest.json
+++ b/chrome/common/extensions/docs/templates/json/manifest.json
@@ -27,7 +27,7 @@
},
"content_scripts": {
"documentation": "content_scripts.html",
- "example": {}
+ "example": [{}]
},
"content_security_policy": {
"documentation": "contentSecurityPolicy.html",