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

Side by Side Diff: tools/dom/scripts/dartmetadata.py

Issue 990383002: Add MediaSource.supported, annotations for supported browsers, and a minimal test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality to provide Dart metadata for 6 """This module provides shared functionality to provide Dart metadata for
7 DOM APIs. 7 DOM APIs.
8 """ 8 """
9 9
10 import copy 10 import copy
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 "@SupportedBrowser(SupportedBrowser.CHROME)", 512 "@SupportedBrowser(SupportedBrowser.CHROME)",
513 "@SupportedBrowser(SupportedBrowser.IE, '10')", 513 "@SupportedBrowser(SupportedBrowser.IE, '10')",
514 "@SupportedBrowser(SupportedBrowser.SAFARI)", 514 "@SupportedBrowser(SupportedBrowser.SAFARI)",
515 ], 515 ],
516 'IDBFactory': _indexed_db_annotations, 516 'IDBFactory': _indexed_db_annotations,
517 'IDBDatabase': _indexed_db_annotations, 517 'IDBDatabase': _indexed_db_annotations,
518 'MediaStream': _rtc_annotations, 518 'MediaStream': _rtc_annotations,
519 'MediaStreamEvent': _rtc_annotations, 519 'MediaStreamEvent': _rtc_annotations,
520 'MediaStreamTrack': _rtc_annotations, 520 'MediaStreamTrack': _rtc_annotations,
521 'MediaStreamTrackEvent': _rtc_annotations, 521 'MediaStreamTrackEvent': _rtc_annotations,
522 'MediaSource': [
523 # TODO(alanknight): This works on Firefox 33 behind a flag and in Safari
524 # desktop, but not mobile. On theory that static false positives are worse
525 # than negatives, leave those out for now. Update once they're available.
526 "@SupportedBrowser(SupportedBrowser.CHROME)",
527 "@SupportedBrowser(SupportedBrowser.IE, '11')",
528 ],
522 'MutationObserver': [ 529 'MutationObserver': [
523 "@SupportedBrowser(SupportedBrowser.CHROME)", 530 "@SupportedBrowser(SupportedBrowser.CHROME)",
524 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 531 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
525 "@SupportedBrowser(SupportedBrowser.SAFARI)", 532 "@SupportedBrowser(SupportedBrowser.SAFARI)",
526 "@Experimental()", 533 "@Experimental()",
527 ], 534 ],
528 'NotificationCenter': _webkit_experimental_annotations, 535 'NotificationCenter': _webkit_experimental_annotations,
529 'Performance': _performance_annotations, 536 'Performance': _performance_annotations,
530 'PopStateEvent': _history_annotations, 537 'PopStateEvent': _history_annotations,
531 'RTCIceCandidate': _rtc_annotations, 538 'RTCIceCandidate': _rtc_annotations,
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 pass 841 pass
835 else: 842 else:
836 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 843 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
837 844
838 return annotations 845 return annotations
839 846
840 def Flush(self): 847 def Flush(self):
841 json_file = open(self._api_status_path, 'w+') 848 json_file = open(self._api_status_path, 'w+')
842 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 849 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
843 json_file.close() 850 json_file.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698