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

Issue 2065733002: Add a method to override the network conditions of the ChromeDriver session. (Closed)

Created:
4 years, 6 months ago by roisinmcl
Modified:
4 years, 5 months ago
Reviewers:
samuong, prasadv
CC:
chromium-reviews, samuong+watch_chromium.org, prasadv1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[chromedriver] Add a method to override the network conditions of the ChromeDriver session. Allows users to set the overridden network conditions of the session to preset values including 2G, 3G, 4G, Wifi, and Offline. BUG=chromedriver:984 Committed: https://crrev.com/17a2e1eae574d917f9ccb1eeccf8f11426ac5588 Cr-Commit-Position: refs/heads/master@{#403209}

Patch Set 1 #

Total comments: 32

Patch Set 2 : Test XHR with setting network emulation and refactored netowrk setter method #

Total comments: 20

Patch Set 3 : Changed hard coded network values to constants. Fixed style issues. #

Total comments: 37

Patch Set 4 : Added network connection tests, fixed WebView loop errors #

Patch Set 5 : Added field in ChromeDesktopImpl to store value of the user's connection type. #

Total comments: 24

Patch Set 6 : Changed web_view loop in SetNetworkConnection. Fixed function names in ChromeDesktopImpl. #

Total comments: 18

Patch Set 7 : Fixed style issues. Changed names for consistency. #

Total comments: 20

Patch Set 8 : Fixed spacing, formatting and names. Deleted unused test code. #

Patch Set 9 : Moved fuction to top of setNetworkConnection #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -0 lines) Patch
M chrome/test/chromedriver/chrome/chrome_desktop_impl.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chrome/chrome_desktop_impl.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/client/chromedriver.py View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/client/command_executor.py View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/server/http_handler.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/session_commands.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/session_commands.cc View 1 2 3 4 5 6 2 chunks +82 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/test/run_py_tests.py View 1 2 3 4 5 6 7 8 1 chunk +157 lines, -0 lines 0 comments Download
A chrome/test/data/chromedriver/xmlrequest_test.html View 1 2 3 4 5 6 7 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (9 generated)
roisinmcl
4 years, 6 months ago (2016-06-13 21:33:05 UTC) #3
samuong
https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc File chrome/test/chromedriver/chrome/network_list.cc (right): https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc#newcode25 chrome/test/chromedriver/chrome/network_list.cc:25: "\"latency\": 0}]"; nitpick: since this isn't a real change, ...
4 years, 6 months ago (2016-06-14 17:46:00 UTC) #5
roisinmcl
https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/client/chromedriver.py File chrome/test/chromedriver/client/chromedriver.py (right): https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/client/chromedriver.py#newcode416 chrome/test/chromedriver/client/chromedriver.py:416: 'connection_type': connection_type On 2016/06/14 17:45:59, samuong wrote: > i ...
4 years, 6 months ago (2016-06-17 18:13:34 UTC) #6
prasadv
https://codereview.chromium.org/2065733002/diff/20001/chrome/test/chromedriver/client/chromedriver.py File chrome/test/chromedriver/client/chromedriver.py (right): https://codereview.chromium.org/2065733002/diff/20001/chrome/test/chromedriver/client/chromedriver.py#newcode422 chrome/test/chromedriver/client/chromedriver.py:422: def testNetworkConditionsDifferentWebViews(self): Is the function unittest for ExecuteCommand? Generally ...
4 years, 6 months ago (2016-06-17 18:43:35 UTC) #8
samuong
https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc File chrome/test/chromedriver/chrome/network_list.cc (right): https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc#newcode25 chrome/test/chromedriver/chrome/network_list.cc:25: "\"latency\": 0}]"; On 2016/06/14 17:45:59, samuong wrote: > nitpick: ...
4 years, 6 months ago (2016-06-17 22:01:31 UTC) #9
roisinmcl
https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc File chrome/test/chromedriver/chrome/network_list.cc (right): https://codereview.chromium.org/2065733002/diff/1/chrome/test/chromedriver/chrome/network_list.cc#newcode25 chrome/test/chromedriver/chrome/network_list.cc:25: "\"latency\": 0}]"; On 2016/06/17 22:01:30, samuong wrote: > On ...
4 years, 6 months ago (2016-06-20 18:14:17 UTC) #10
prasadv
https://codereview.chromium.org/2065733002/diff/40001/chrome/test/chromedriver/client/chromedriver.py File chrome/test/chromedriver/client/chromedriver.py (right): https://codereview.chromium.org/2065733002/diff/40001/chrome/test/chromedriver/client/chromedriver.py#newcode413 chrome/test/chromedriver/client/chromedriver.py:413: def SetNetworkConnection(self, connection_type): Question: What is the difference between ...
4 years, 6 months ago (2016-06-20 20:29:10 UTC) #11
samuong
thanks roisin, we're almost there, mostly style nitpicks now https://codereview.chromium.org/2065733002/diff/40001/chrome/test/chromedriver/client/chromedriver.py File chrome/test/chromedriver/client/chromedriver.py (right): https://codereview.chromium.org/2065733002/diff/40001/chrome/test/chromedriver/client/chromedriver.py#newcode413 chrome/test/chromedriver/client/chromedriver.py:413: ...
4 years, 6 months ago (2016-06-20 21:43:23 UTC) #13
roisinmcl
[chromedriver] Added network connection tests and fixed WebView loop errors. Added individual tests for checking ...
4 years, 6 months ago (2016-06-21 18:55:11 UTC) #14
roisinmcl
4 years, 5 months ago (2016-06-27 20:52:07 UTC) #15
samuong
https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc File chrome/test/chromedriver/chrome/chrome_desktop_impl.cc (right): https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc#newcode211 chrome/test/chromedriver/chrome/chrome_desktop_impl.cc:211: } nit: remove the space before the } https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/chrome/chrome_desktop_impl.h ...
4 years, 5 months ago (2016-06-27 21:31:53 UTC) #17
roisinmcl
https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc File chrome/test/chromedriver/chrome/chrome_desktop_impl.cc (right): https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc#newcode211 chrome/test/chromedriver/chrome/chrome_desktop_impl.cc:211: } On 2016/06/27 21:31:53, samuong wrote: > nit: remove ...
4 years, 5 months ago (2016-06-28 18:36:48 UTC) #18
samuong
https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/session_commands.cc File chrome/test/chromedriver/session_commands.cc (right): https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/session_commands.cc#newcode574 chrome/test/chromedriver/session_commands.cc:574: network_conditions->download_throughput = kAirplaneModeThroughput; On 2016/06/28 18:36:48, roisinmcl wrote: > ...
4 years, 5 months ago (2016-06-28 23:23:41 UTC) #19
roisinmcl
https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/session_commands.cc File chrome/test/chromedriver/session_commands.cc (right): https://codereview.chromium.org/2065733002/diff/80001/chrome/test/chromedriver/session_commands.cc#newcode536 chrome/test/chromedriver/session_commands.cc:536: params.GetDictionary("parameters", &parameters); On 2016/06/27 21:31:53, samuong wrote: > the ...
4 years, 5 months ago (2016-06-29 17:55:13 UTC) #20
samuong
almost there, just a few more comments https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/chrome/chrome_desktop_impl.h File chrome/test/chromedriver/chrome/chrome_desktop_impl.h (right): https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/chrome/chrome_desktop_impl.h#newcode61 chrome/test/chromedriver/chrome/chrome_desktop_impl.h:61: void SetNetworkConnection(const ...
4 years, 5 months ago (2016-06-29 18:37:55 UTC) #21
roisinmcl
https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/chrome/chrome_desktop_impl.h File chrome/test/chromedriver/chrome/chrome_desktop_impl.h (right): https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/chrome/chrome_desktop_impl.h#newcode61 chrome/test/chromedriver/chrome/chrome_desktop_impl.h:61: void SetNetworkConnection(const int& network_connection); On 2016/06/29 18:37:54, samuong wrote: ...
4 years, 5 months ago (2016-06-29 19:45:01 UTC) #22
samuong
https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/test/run_py_tests.py File chrome/test/chromedriver/test/run_py_tests.py (right): https://codereview.chromium.org/2065733002/diff/120001/chrome/test/chromedriver/test/run_py_tests.py#newcode985 chrome/test/chromedriver/test/run_py_tests.py:985: '/helloworld', respondWithString) On 2016/06/29 19:45:00, roisinmcl wrote: > On ...
4 years, 5 months ago (2016-06-29 20:32:08 UTC) #23
roisinmcl
4 years, 5 months ago (2016-06-29 21:16:09 UTC) #24
samuong
lgtm
4 years, 5 months ago (2016-06-29 22:50:21 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2065733002/160001
4 years, 5 months ago (2016-06-30 16:48:29 UTC) #27
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 5 months ago (2016-06-30 17:39:23 UTC) #29
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-30 17:39:28 UTC) #30
commit-bot: I haz the power
4 years, 5 months ago (2016-06-30 17:41:56 UTC) #32
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/17a2e1eae574d917f9ccb1eeccf8f11426ac5588
Cr-Commit-Position: refs/heads/master@{#403209}

Powered by Google App Engine
This is Rietveld 408576698