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

Unified Diff: chrome/common/extensions/docs/server2/api_data_source_test.py

Issue 255473003: docserver: Adds "API scheduled for Chrome version..." text to dev and beta APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds test to api_data_source_test.py Created 6 years, 8 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
Index: chrome/common/extensions/docs/server2/api_data_source_test.py
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 478226df0c3b985e88ace95e1f9380cfba93df10..0f36502d66060ccc5a1a596b8edbcce488eeb7d3 100755
--- a/chrome/common/extensions/docs/server2/api_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/api_data_source_test.py
@@ -42,6 +42,12 @@ class _FakeAvailabilityFinder(object):
return ChannelInfo('stable', '396', 5)
+class _FakeScheduledAvailabilityFinder(object):
+
+ def GetApiAvailability(self, version):
+ return ChannelInfo('dev', '1500', 28, 28)
+
+
class _FakeTemplateCache(object):
def GetFromFile(self, key):
@@ -142,7 +148,54 @@ class APIDataSourceTest(unittest.TestCase):
'content': [
{ 'partial': 'handlebar chrome/common/extensions/docs/' +
'templates/private/intro_tables/stable_message.html',
- 'version': 5
+ 'version': 5,
+ 'scheduled': None
+ }
+ ]
+ },
+ { 'title': 'Permissions',
+ 'content': [
+ { 'class': 'override',
+ 'text': '"tester"'
+ },
+ { 'text': 'is an API for testing things.' }
+ ]
+ },
+ { 'title': 'Manifest',
+ 'content': [
+ { 'class': 'code',
+ 'text': '"tester": {...}'
+ }
+ ]
+ },
+ { 'title': 'Learn More',
+ 'content': [
+ { 'link': 'https://tester.test.com/welcome.html',
+ 'text': 'Welcome!'
+ }
+ ]
+ }
+ ]
+ self.assertEquals(model._GetIntroTableList(), expected_list)
+
+ model = _JSCModel(self._api_models.GetModel('tester').Get(),
+ _FakeScheduledAvailabilityFinder(),
+ self._json_cache,
+ _FakeTemplateCache(),
+ self._features_bundle,
+ None)
+ expected_list = [
jshumway 2014/04/25 21:34:43 Since only the second item in the list has changed
danielj41 2014/04/25 22:24:49 Done.
+ { 'title': 'Description',
+ 'content': [
+ { 'text': 'a test api' }
+ ]
+ },
+ { 'title': 'Availability',
+ 'content': [
+ { 'partial': 'handlebar chrome/common/extensions/docs/' +
+ 'templates/private/intro_tables/dev_message.html',
+ 'version': 28,
+ 'scheduled': 28
}
]
},

Powered by Google App Engine
This is Rietveld 408576698