OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 sys | 5 import sys |
6 import platform | 6 import platform |
7 | 7 |
8 import command_executor | 8 import command_executor |
9 from command_executor import Command | 9 from command_executor import Command |
10 from webelement import WebElement | 10 from webelement import WebElement |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
402 conditions = self.ExecuteCommand(Command.GET_NETWORK_CONDITIONS) | 402 conditions = self.ExecuteCommand(Command.GET_NETWORK_CONDITIONS) |
403 return { | 403 return { |
404 'latency': conditions['latency'], | 404 'latency': conditions['latency'], |
405 'download_throughput': conditions['download_throughput'], | 405 'download_throughput': conditions['download_throughput'], |
406 'upload_throughput': conditions['upload_throughput'], | 406 'upload_throughput': conditions['upload_throughput'], |
407 'offline': conditions['offline'] | 407 'offline': conditions['offline'] |
408 } | 408 } |
409 | 409 |
410 def DeleteNetworkConditions(self): | 410 def DeleteNetworkConditions(self): |
411 self.ExecuteCommand(Command.DELETE_NETWORK_CONDITIONS) | 411 self.ExecuteCommand(Command.DELETE_NETWORK_CONDITIONS) |
412 | |
413 def SetNetworkConnection(self, connection_type): | |
prasadv
2016/06/20 20:29:09
Question: What is the difference between SetNetwor
samuong
2016/06/20 21:43:23
These are different APIs to the same functionality
| |
414 params = {'parameters': {'type': connection_type}} | |
415 self.ExecuteCommand(Command.SET_NETWORK_CONNECTION, params) | |
OLD | NEW |