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

Issue 1669453002: [chromedriver] Apply page load timeout to slow cross-process navigations (Closed)

Created:
4 years, 10 months ago by Alexander Semashko
Modified:
4 years, 8 months ago
Reviewers:
samuong
CC:
chromium-reviews, samuong+watch_chromium.org, cbentzel+watch_chromium.org, pfeldman, devtools-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[chromedriver] Apply page load timeout to slow cross-process navigations This is a second attempt to fight chromedriver hangs on slow-to-commit cross-process navigations. In the discussion of the first, incorrect solution (see https://codereview.chromium.org/1520883002/), it became clear that it'd be better to handle this in chromedriver. Here I introduce a timeout tracking mechanism which is easy to use in the chromedriver's architecture. In general, it allows to abort waiting for a devtools command response, do some cleanup and return an error to the client. Currently this timeout tracking is used only when executing the 'get' command, history navigations and reloads are left as is. I wanted to get feedback about the approach as a whole first. Please take a look. BUG=chromedriver:1292 Committed: https://crrev.com/091637f2223b51356cfeb3f89bb03394ed1f2b6a Cr-Commit-Position: refs/heads/master@{#387658}

Patch Set 1 #

Total comments: 23

Patch Set 2 : Address comments. #

Patch Set 3 : Remove DEPS modifications. #

Total comments: 14

Patch Set 4 : Rebase #

Patch Set 5 : nits #

Patch Set 6 : pure virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+660 lines, -235 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/alert_commands.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome/chrome_desktop_impl.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/test/chromedriver/chrome/devtools_client.h View 1 2 3 4 5 4 chunks +13 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/devtools_client_impl.h View 1 2 3 3 chunks +17 lines, -6 lines 0 comments Download
M chrome/test/chromedriver/chrome/devtools_client_impl.cc View 1 2 3 8 chunks +28 lines, -13 lines 0 comments Download
M chrome/test/chromedriver/chrome/devtools_client_impl_unittest.cc View 1 2 3 14 chunks +15 lines, -14 lines 0 comments Download
M chrome/test/chromedriver/chrome/navigation_tracker.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome/navigation_tracker.cc View 1 2 3 4 6 chunks +15 lines, -9 lines 0 comments Download
M chrome/test/chromedriver/chrome/navigation_tracker_unittest.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/stub_devtools_client.h View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome/stub_devtools_client.cc View 1 2 3 4 5 2 chunks +16 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome/stub_web_view.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/stub_web_view.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/web_view.h View 1 2 3 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/test/chromedriver/chrome/web_view_impl.h View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/chrome/web_view_impl.cc View 1 2 3 5 chunks +17 lines, -15 lines 0 comments Download
M chrome/test/chromedriver/chrome/web_view_impl_unittest.cc View 1 2 3 4 5 2 chunks +16 lines, -3 lines 0 comments Download
M chrome/test/chromedriver/commands_unittest.cc View 1 2 3 6 chunks +16 lines, -11 lines 0 comments Download
M chrome/test/chromedriver/element_commands.h View 1 2 3 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/test/chromedriver/element_commands.cc View 1 2 3 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/test/chromedriver/net/sync_websocket.h View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/test/chromedriver/net/sync_websocket_impl.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/net/sync_websocket_impl.cc View 1 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc View 1 2 3 9 chunks +14 lines, -12 lines 0 comments Download
A chrome/test/chromedriver/net/timeout.h View 1 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/net/timeout.cc View 1 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/net/timeout_unittest.cc View 1 1 chunk +63 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/performance_logger.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/chromedriver/performance_logger_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/chromedriver/session_commands.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/chromedriver/test/run_py_tests.py View 1 2 3 4 3 chunks +61 lines, -8 lines 0 comments Download
M chrome/test/chromedriver/test/webserver.py View 5 chunks +19 lines, -6 lines 0 comments Download
M chrome/test/chromedriver/window_commands.h View 1 2 3 2 chunks +87 lines, -44 lines 0 comments Download
M chrome/test/chromedriver/window_commands.cc View 1 2 3 42 chunks +97 lines, -48 lines 0 comments Download

Messages

Total messages: 32 (8 generated)
Alexander Semashko
4 years, 10 months ago (2016-02-03 15:49:22 UTC) #2
Alexander Semashko
On 2016/02/03 15:49:22, Alexander Semashko wrote: PTAL
4 years, 10 months ago (2016-02-10 17:05:23 UTC) #3
samuong
Thanks for the patch! I'm still looking at this, will get back to you about ...
4 years, 10 months ago (2016-02-12 06:04:22 UTC) #5
samuong
On 2016/02/12 06:04:22, samuong wrote: > Thanks for the patch! I'm still looking at this, ...
4 years, 10 months ago (2016-02-15 06:37:38 UTC) #6
samuong
Overall I think this looks quite good. Just a few comments and questions below. https://codereview.chromium.org/1669453002/diff/1/chrome/test/chromedriver/chrome/DEPS ...
4 years, 10 months ago (2016-02-19 20:18:58 UTC) #7
Alexander Semashko
Thanks, Sam! As I mentioned, this patch does not cover back/forward navigations and reloads, but ...
4 years, 10 months ago (2016-02-19 23:38:59 UTC) #8
samuong
I have a slight preference to break this up over two CLs, but I'm happy ...
4 years, 10 months ago (2016-02-20 00:11:45 UTC) #9
Alexander Semashko
I'm fine with not adding more behavior changes to this CL, lets address other commands ...
4 years, 10 months ago (2016-02-20 00:38:40 UTC) #10
samuong
https://codereview.chromium.org/1669453002/diff/1/chrome/test/chromedriver/window_commands.cc File chrome/test/chromedriver/window_commands.cc (right): https://codereview.chromium.org/1669453002/diff/1/chrome/test/chromedriver/window_commands.cc#newcode238 chrome/test/chromedriver/window_commands.cc:238: Timeout(session->page_load_timeout, &timeout), On 2016/02/20 00:38:40, Alexander Semashko wrote: > ...
4 years, 10 months ago (2016-02-22 23:55:35 UTC) #11
Alexander Semashko
https://codereview.chromium.org/1669453002/diff/1/chrome/test/chromedriver/chrome/DEPS File chrome/test/chromedriver/chrome/DEPS (right): https://codereview.chromium.org/1669453002/diff/1/chrome/test/chromedriver/chrome/DEPS#newcode10 chrome/test/chromedriver/chrome/DEPS:10: "+chrome/test/chromedriver/util.h", On 2016/02/20 00:38:40, Alexander Semashko wrote: > On ...
4 years, 10 months ago (2016-02-24 12:51:20 UTC) #12
Alexander Semashko
PTAL
4 years, 9 months ago (2016-03-01 19:37:57 UTC) #13
Alexander Semashko
On 2016/03/01 19:37:57, Alexander Semashko wrote: > PTAL Sam?
4 years, 9 months ago (2016-03-14 15:12:01 UTC) #14
Alexander Semashko
please take a look
4 years, 8 months ago (2016-04-08 13:25:20 UTC) #15
Alexander Semashko
stgao can you take a look at this or reroute? Looks like this review stalled ...
4 years, 8 months ago (2016-04-12 13:45:31 UTC) #18
samuong
Sorry Alex, I'll finish looking at this today.
4 years, 8 months ago (2016-04-12 16:36:58 UTC) #19
samuong
Hi Alex, Thanks for being patient with this. To be honest I find some of ...
4 years, 8 months ago (2016-04-13 03:59:31 UTC) #20
Alexander Semashko
https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h File chrome/test/chromedriver/chrome/devtools_client.h (right): https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h#newcode43 chrome/test/chromedriver/chrome/devtools_client.h:43: On 2016/04/13 03:59:30, samuong wrote: > Once we're done ...
4 years, 8 months ago (2016-04-13 15:51:35 UTC) #21
samuong
Just one more change, and I think we'll be ready to land this. https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h File ...
4 years, 8 months ago (2016-04-15 04:23:55 UTC) #23
Alexander Semashko
https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h File chrome/test/chromedriver/chrome/devtools_client.h (right): https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h#newcode43 chrome/test/chromedriver/chrome/devtools_client.h:43: On 2016/04/15 04:23:55, samuong wrote: > On 2016/04/13 15:51:35, ...
4 years, 8 months ago (2016-04-15 15:11:48 UTC) #24
samuong
On 2016/04/15 15:11:48, Alexander Semashko wrote: > https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h > File chrome/test/chromedriver/chrome/devtools_client.h (right): > > https://codereview.chromium.org/1669453002/diff/40001/chrome/test/chromedriver/chrome/devtools_client.h#newcode43 ...
4 years, 8 months ago (2016-04-15 16:59:59 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1669453002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1669453002/100001
4 years, 8 months ago (2016-04-15 17:07:34 UTC) #27
Alexander Semashko
On 2016/04/15 16:59:59, samuong wrote: > On 2016/04/15 15:11:48, Alexander Semashko wrote: > > > ...
4 years, 8 months ago (2016-04-15 17:12:12 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-15 18:41:23 UTC) #30
commit-bot: I haz the power
4 years, 8 months ago (2016-04-15 18:43:09 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/091637f2223b51356cfeb3f89bb03394ed1f2b6a
Cr-Commit-Position: refs/heads/master@{#387658}

Powered by Google App Engine
This is Rietveld 408576698