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

Side by Side Diff: chrome/common/extensions/docs/server2/api_data_source_test.py

Issue 386443003: Docserver: Add 'deprecated since' message for API nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import json 6 import json
7 import os 7 import os
8 import sys 8 import sys
9 import unittest 9 import unittest
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 _FakeTemplateCache(), 335 _FakeTemplateCache(),
336 _FakeFeaturesBundle(), 336 _FakeFeaturesBundle(),
337 None).ToDict() 337 None).ToDict()
338 338
339 # Test nodes that have the same availability as their parent. 339 # Test nodes that have the same availability as their parent.
340 assertEquals('tabs.get', model_dict['functions'][1]['availability']) 340 assertEquals('tabs.get', model_dict['functions'][1]['availability'])
341 # Test nodes with varying availabilities. 341 # Test nodes with varying availabilities.
342 assertEquals('tabs.getCurrent', 342 assertEquals('tabs.getCurrent',
343 model_dict['functions'][0]['availability']['version']) 343 model_dict['functions'][0]['availability']['version'])
344 344
345 # Test a node that became deprecated.
346 self.assertEquals({
347 'scheduled': None,
348 'version': 26,
349 'partial': 'handlebar chrome/common/extensions/docs/templates/' +
350 'private/intro_tables/deprecated_message.html'
351 }, model_dict['types'][2]['availability'])
345 352
346 if __name__ == '__main__': 353 if __name__ == '__main__':
347 unittest.main() 354 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698