| OLD | NEW |
| 1 #! /usr/bin/python | 1 #! /usr/bin/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 """Loads a URL on an Android device, logging all the requests made to do it | 6 """Loads a URL on an Android device, logging all the requests made to do it |
| 7 to a JSON file using DevTools. | 7 to a JSON file using DevTools. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import contextlib | 10 import contextlib |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 request_logger = AndroidRequestsLogger(device) | 228 request_logger = AndroidRequestsLogger(device) |
| 229 response_data = request_logger.LogPageLoad( | 229 response_data = request_logger.LogPageLoad( |
| 230 options.url, options.clear_cache, options.package) | 230 options.url, options.clear_cache, options.package) |
| 231 json_data = _ResponseDataToJson(response_data) | 231 json_data = _ResponseDataToJson(response_data) |
| 232 with open(options.output, 'w') as f: | 232 with open(options.output, 'w') as f: |
| 233 f.write(json_data) | 233 f.write(json_data) |
| 234 | 234 |
| 235 | 235 |
| 236 if __name__ == '__main__': | 236 if __name__ == '__main__': |
| 237 main() | 237 main() |
| OLD | NEW |