| 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" |
| 457 ] | 459 ] |
| 458 | 460 |
| 459 errors = compare_schemas(baseline_domains, domains, False) | 461 errors = compare_schemas(baseline_domains, domains, False) |
| 460 unexpected_errors = [] | 462 unexpected_errors = [] |
| 461 for i in range(len(errors)): | 463 for i in range(len(errors)): |
| 462 if errors[i] not in expected_errors: | 464 if errors[i] not in expected_errors: |
| 463 unexpected_errors.append(errors[i]) | 465 unexpected_errors.append(errors[i]) |
| 464 if len(unexpected_errors) > 0: | 466 if len(unexpected_errors) > 0: |
| 465 sys.stderr.write(" Compatibility checks FAILED\n") | 467 sys.stderr.write(" Compatibility checks FAILED\n") |
| 466 for error in unexpected_errors: | 468 for error in unexpected_errors: |
| 467 sys.stderr.write( " %s\n" % error) | 469 sys.stderr.write( " %s\n" % error) |
| 468 return 1 | 470 return 1 |
| 469 | 471 |
| 470 if arg_options.show_changes: | 472 if arg_options.show_changes: |
| 471 changes = compare_schemas(domains, baseline_domains, True) | 473 changes = compare_schemas(domains, baseline_domains, True) |
| 472 if len(changes) > 0: | 474 if len(changes) > 0: |
| 473 print " Public changes since %s:" % version | 475 print " Public changes since %s:" % version |
| 474 for change in changes: | 476 for change in changes: |
| 475 print " %s" % change | 477 print " %s" % change |
| 476 | 478 |
| 477 json.dump({"version": version, "domains": domains}, output_file, indent=4, s
ort_keys=False, separators=(',', ': ')) | 479 json.dump({"version": version, "domains": domains}, output_file, indent=4, s
ort_keys=False, separators=(',', ': ')) |
| 478 output_file.close() | 480 output_file.close() |
| 479 | 481 |
| 480 if __name__ == '__main__': | 482 if __name__ == '__main__': |
| 481 sys.exit(main()) | 483 sys.exit(main()) |
| OLD | NEW |