OLD | NEW |
1 # Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 """Library handling DevTools websocket interaction. | 5 """Library handling DevTools websocket interaction. |
6 """ | 6 """ |
7 | 7 |
8 import httplib | 8 import httplib |
9 import json | 9 import json |
10 import logging | 10 import logging |
11 import os | 11 import os |
12 import sys | 12 import sys |
13 | 13 |
14 file_dir = os.path.dirname(__file__) | 14 file_dir = os.path.dirname(__file__) |
15 sys.path.append(os.path.join(file_dir, '..', '..', 'telemetry')) | 15 sys.path.append(os.path.join(file_dir, '..', '..', 'perf')) |
| 16 from chrome_telemetry_build import chromium_config |
| 17 sys.path.append(chromium_config.GetTelemetryDir()) |
16 | 18 |
17 from telemetry.internal.backends.chrome_inspector import inspector_websocket | 19 from telemetry.internal.backends.chrome_inspector import inspector_websocket |
18 from telemetry.internal.backends.chrome_inspector import websocket | 20 from telemetry.internal.backends.chrome_inspector import websocket |
19 | 21 |
20 | 22 |
21 class DevToolsConnectionException(Exception): | 23 class DevToolsConnectionException(Exception): |
22 def __init__(self, message): | 24 def __init__(self, message): |
23 super(DevToolsConnectionException, self).__init__(message) | 25 super(DevToolsConnectionException, self).__init__(message) |
24 logging.warning("DevToolsConnectionException: " + message) | 26 logging.warning("DevToolsConnectionException: " + message) |
25 | 27 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 """Returns a Track instance constructed from data dumped by | 325 """Returns a Track instance constructed from data dumped by |
324 Track.ToJsonDict(). | 326 Track.ToJsonDict(). |
325 | 327 |
326 Args: | 328 Args: |
327 json_data: (dict) Parsed from a JSON file using the json module. | 329 json_data: (dict) Parsed from a JSON file using the json module. |
328 | 330 |
329 Returns: | 331 Returns: |
330 a Track instance. | 332 a Track instance. |
331 """ | 333 """ |
332 pass | 334 pass |
OLD | NEW |