OLD | NEW |
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 Loading... |
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() |
OLD | NEW |