| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 idl_schema | 6 import idl_schema |
| 7 import json_parse | 7 import json_parse |
| 8 from js_externs_generator import JsExternsGenerator | 8 from js_externs_generator import JsExternsGenerator |
| 9 from datetime import datetime | 9 from datetime import datetime |
| 10 import model | 10 import model |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 chrome.fakeApi.bazGreek = function(callback) {}; | 202 chrome.fakeApi.bazGreek = function(callback) {}; |
| 203 | 203 |
| 204 /** | 204 /** |
| 205 * @return {string} | 205 * @return {string} |
| 206 * @deprecated Use a new method. | 206 * @deprecated Use a new method. |
| 207 * @see https://developer.chrome.com/extensions/fakeApi#method-returnString | 207 * @see https://developer.chrome.com/extensions/fakeApi#method-returnString |
| 208 */ | 208 */ |
| 209 chrome.fakeApi.returnString = function() {}; | 209 chrome.fakeApi.returnString = function() {}; |
| 210 | 210 |
| 211 /** | 211 /** |
| 212 * @param {function(!chrome.fakeApi.Qux|undefined):void=} callback | 212 * @param {function((!chrome.fakeApi.Qux|undefined)):void=} callback |
| 213 * @see https://developer.chrome.com/extensions/fakeApi#method-optionalParam | 213 * @see https://developer.chrome.com/extensions/fakeApi#method-optionalParam |
| 214 */ | 214 */ |
| 215 chrome.fakeApi.optionalParam = function(callback) {}; | 215 chrome.fakeApi.optionalParam = function(callback) {}; |
| 216 | 216 |
| 217 /** | 217 /** |
| 218 * Fired when we realize it's a trap! | 218 * Fired when we realize it's a trap! |
| 219 * @type {!ChromeEvent} | 219 * @type {!ChromeEvent} |
| 220 * @see https://developer.chrome.com/extensions/fakeApi#event-onTrapDetected | 220 * @see https://developer.chrome.com/extensions/fakeApi#event-onTrapDetected |
| 221 */ | 221 */ |
| 222 chrome.fakeApi.onTrapDetected;""" % (datetime.now().year, sys.argv[0])) | 222 chrome.fakeApi.onTrapDetected;""" % (datetime.now().year, sys.argv[0])) |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 JsExternsGenerator().Generate(namespace).Render()) | 365 JsExternsGenerator().Generate(namespace).Render()) |
| 366 | 366 |
| 367 def testJsonWithInlineObjects(self): | 367 def testJsonWithInlineObjects(self): |
| 368 namespace = self._GetNamespace(fake_json, 'fake_api.json', False) | 368 namespace = self._GetNamespace(fake_json, 'fake_api.json', False) |
| 369 self.assertMultiLineEqual(json_expected, | 369 self.assertMultiLineEqual(json_expected, |
| 370 JsExternsGenerator().Generate(namespace).Render()) | 370 JsExternsGenerator().Generate(namespace).Render()) |
| 371 | 371 |
| 372 | 372 |
| 373 if __name__ == '__main__': | 373 if __name__ == '__main__': |
| 374 unittest.main() | 374 unittest.main() |
| OLD | NEW |