| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import socket | 10 import socket |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 def __str__(self): | 583 def __str__(self): |
| 584 self_dict = { | 584 self_dict = { |
| 585 'response_headers': self._response_headers, | 585 'response_headers': self._response_headers, |
| 586 'request_headers': self._request_headers, | 586 'request_headers': self._request_headers, |
| 587 'url': self._url, | 587 'url': self._url, |
| 588 'protocol': self._protocol, | 588 'protocol': self._protocol, |
| 589 'port': self._port, | 589 'port': self._port, |
| 590 'status': self._status, | 590 'status': self._status, |
| 591 'request_type': self._request_type | 591 'request_type': self._request_type |
| 592 } | 592 } |
| 593 return json.dumps(self_dict) | 593 return json.dumps(self_dict, indent=2) |
| 594 | 594 |
| 595 @property | 595 @property |
| 596 def response_headers(self): | 596 def response_headers(self): |
| 597 return self._response_headers | 597 return self._response_headers |
| 598 | 598 |
| 599 @property | 599 @property |
| 600 def request_headers(self): | 600 def request_headers(self): |
| 601 return self._request_headers | 601 return self._request_headers |
| 602 | 602 |
| 603 @property | 603 @property |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 for test_suite in test_suite_iter: | 755 for test_suite in test_suite_iter: |
| 756 for test_case in test_suite: | 756 for test_case in test_suite: |
| 757 for test in test_case: | 757 for test in test_case: |
| 758 # Drop the file name in the form <filename>.<classname>.<methodname> | 758 # Drop the file name in the form <filename>.<classname>.<methodname> |
| 759 test_id = test.id()[test.id().find('.') + 1:] | 759 test_id = test.id()[test.id().find('.') + 1:] |
| 760 if re.match(test_filter_re, test_id): | 760 if re.match(test_filter_re, test_id): |
| 761 tests.addTest(test) | 761 tests.addTest(test) |
| 762 testRunner = unittest.runner.TextTestRunner(verbosity=2, | 762 testRunner = unittest.runner.TextTestRunner(verbosity=2, |
| 763 failfast=flags.failfast, buffer=(not flags.disable_buffer)) | 763 failfast=flags.failfast, buffer=(not flags.disable_buffer)) |
| 764 testRunner.run(tests) | 764 testRunner.run(tests) |
| OLD | NEW |