Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: chrome/test/chromedriver/client/chromedriver.py

Issue 2065733002: Add a method to override the network conditions of the ChromeDriver session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test XHR with setting network emulation and refactored netowrk setter method Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/client/chromedriver.py
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 4e16f0f9d9ea9c6fad9512d77cc8fe143a1547ab..fe5583fc4b354b6401d01e1ba49d41b3a35818e6 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -409,3 +409,15 @@ class ChromeDriver(object):
def DeleteNetworkConditions(self):
self.ExecuteCommand(Command.DELETE_NETWORK_CONDITIONS)
+
+ def SetNetworkConnection(self, connection_type):
+
samuong 2016/06/17 22:01:30 style nit: delete this blank line
roisinmcl 2016/06/20 18:14:16 Done.
+ params = {
+ 'parameters': {
+ 'type': connection_type
+ }
+ }
samuong 2016/06/17 22:01:30 style nit: you could fit these 5 lines on a single
roisinmcl 2016/06/20 18:14:16 Done.
+ self.ExecuteCommand(Command.SET_NETWORK_CONNECTION, params)
+
+ def testNetworkConditionsDifferentWebViews(self):
prasadv 2016/06/17 18:43:35 Is the function unittest for ExecuteCommand? Gener
samuong 2016/06/17 22:01:30 Yeah this shouldn't be here. Does anything even ca
roisinmcl 2016/06/20 18:14:16 It isn't called anywhere, I was unclear on the fun
+ self.ExecuteCommand(Command.GET_NETWORK_CONDITIONS)

Powered by Google App Engine
This is Rietveld 408576698