OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 Google Inc. All rights reserved. | 2 # Copyright (c) 2011 Google Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 domains = [] | 447 domains = [] |
448 baseline_domains = [] | 448 baseline_domains = [] |
449 version = load_domains_and_baselines(arg_values[0], domains, baseline_domain
s) | 449 version = load_domains_and_baselines(arg_values[0], domains, baseline_domain
s) |
450 if len(arg_values) > 1: | 450 if len(arg_values) > 1: |
451 load_domains_and_baselines(arg_values[1], domains, baseline_domains) | 451 load_domains_and_baselines(arg_values[1], domains, baseline_domains) |
452 | 452 |
453 expected_errors = [ | 453 expected_errors = [ |
454 "Debugger.globalObjectCleared: event has been removed", | 454 "Debugger.globalObjectCleared: event has been removed", |
455 "Runtime.executionContextCreated.context parameter->Runtime.ExecutionCon
textDescription.frameId: required property has been removed", | 455 "Runtime.executionContextCreated.context parameter->Runtime.ExecutionCon
textDescription.frameId: required property has been removed", |
456 "Debugger.canSetScriptSource: command has been removed", | 456 "Debugger.canSetScriptSource: command has been removed" |
457 "Console.messageRepeatCountUpdated: event has been removed", | |
458 "Console.messagesCleared: event has been removed" | |
459 ] | 457 ] |
460 | 458 |
461 errors = compare_schemas(baseline_domains, domains, False) | 459 errors = compare_schemas(baseline_domains, domains, False) |
462 unexpected_errors = [] | 460 unexpected_errors = [] |
463 for i in range(len(errors)): | 461 for i in range(len(errors)): |
464 if errors[i] not in expected_errors: | 462 if errors[i] not in expected_errors: |
465 unexpected_errors.append(errors[i]) | 463 unexpected_errors.append(errors[i]) |
466 if len(unexpected_errors) > 0: | 464 if len(unexpected_errors) > 0: |
467 sys.stderr.write(" Compatibility checks FAILED\n") | 465 sys.stderr.write(" Compatibility checks FAILED\n") |
468 for error in unexpected_errors: | 466 for error in unexpected_errors: |
469 sys.stderr.write( " %s\n" % error) | 467 sys.stderr.write( " %s\n" % error) |
470 return 1 | 468 return 1 |
471 | 469 |
472 if arg_options.show_changes: | 470 if arg_options.show_changes: |
473 changes = compare_schemas(domains, baseline_domains, True) | 471 changes = compare_schemas(domains, baseline_domains, True) |
474 if len(changes) > 0: | 472 if len(changes) > 0: |
475 print " Public changes since %s:" % version | 473 print " Public changes since %s:" % version |
476 for change in changes: | 474 for change in changes: |
477 print " %s" % change | 475 print " %s" % change |
478 | 476 |
479 json.dump({"version": version, "domains": domains}, output_file, indent=4, s
ort_keys=False, separators=(',', ': ')) | 477 json.dump({"version": version, "domains": domains}, output_file, indent=4, s
ort_keys=False, separators=(',', ': ')) |
480 output_file.close() | 478 output_file.close() |
481 | 479 |
482 if __name__ == '__main__': | 480 if __name__ == '__main__': |
483 sys.exit(main()) | 481 sys.exit(main()) |
OLD | NEW |