Chromium Code Reviews| 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 SetEmulatedNetworkConditions(self, connection_type): | |
| 414 | |
| 415 params = { | |
| 416 'connection_type': connection_type | |
|
samuong
2016/06/14 17:45:59
i think the spec says this should look like:
para
roisinmcl
2016/06/17 18:13:33
Done.
| |
| 417 } | |
| 418 | |
| 419 self.ExecuteCommand(Command.SET_EMULATED_NETWORK_CONDITIONS, params) | |
| 420 | |
| 421 def testNetworkConditionsDifferentWebViews(self): | |
| 422 self.ExecuteCommand(Command.NETWORK_CONDITIONS_DIFFERENT_WEBVIEWS) | |
| OLD | NEW |