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

Issue 2698393002: Allow asynchronous deferral in NavigationSimulator (Closed)

Created:
3 years, 10 months ago by Charlie Harrison
Modified:
3 years, 9 months ago
Reviewers:
clamy, engedy, jam
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow asynchronous deferral in NavigationSimulator This patch adds functionality to the testing class NavigationSimulator, to allow for NavigationThrottles to defer and cancel the navigation. The new functionality is tested by new NavigationSimulator unit tests, as well as new subresource filter unit tests exercising the untested SubframeNavigationFilteringThrottle. BUG=637415 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2698393002 Cr-Commit-Position: refs/heads/master@{#455752} Committed: https://chromium.googlesource.com/chromium/src/+/5da0c292e434236e9344a532471123912cdb1fe7

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : merge in subresource filter unit tests #

Patch Set 4 : Clean up #

Patch Set 5 : more cleanups #

Patch Set 6 : null check #

Patch Set 7 : simplify #

Patch Set 8 : Fix non linux build #

Patch Set 9 : Just return the throttle check on Start/Redirect/COmmit #

Total comments: 10

Patch Set 10 : clamy review #

Total comments: 7

Patch Set 11 : Remove the wait API #

Total comments: 13

Patch Set 12 : engedy/clamy review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -25 lines) Patch
M components/subresource_filter/content/browser/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +192 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/test/navigation_simulator.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +39 lines, -0 lines 0 comments Download
M content/public/test/navigation_simulator.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +68 lines, -24 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A content/test/navigation_simulator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +166 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 66 (40 generated)
Charlie Harrison
Hey clamy@ Here's a draft of a CL augmenting NavigationSimulator. This particular patch actually ended ...
3 years, 10 months ago (2017-02-17 05:09:40 UTC) #7
Charlie Harrison
Huh, I guess I missed an incantation to get the dependent PS up. In any ...
3 years, 10 months ago (2017-02-20 14:57:58 UTC) #8
clamy
Thanks! I'm generally happy with the approach, since the non-auto advance mode was something I ...
3 years, 10 months ago (2017-02-21 13:15:36 UTC) #13
Charlie Harrison
Sounds good to me, thanks!
3 years, 10 months ago (2017-02-21 13:36:33 UTC) #14
Charlie Harrison
clamy: Please hold off reviewing this until I ping again. I'll need to do a ...
3 years, 9 months ago (2017-03-02 14:54:36 UTC) #15
Charlie Harrison
OK clamy, this is now ready for review. PTAL?
3 years, 9 months ago (2017-03-02 18:37:59 UTC) #18
Charlie Harrison
BTW: Feel free to only look at //content bits. I will get subresource filter reviewed ...
3 years, 9 months ago (2017-03-02 18:38:31 UTC) #19
clamy
Thanks Charlie! I've started reviewing your patch, and have been thinking about the interface of ...
3 years, 9 months ago (2017-03-03 15:35:45 UTC) #26
Charlie Harrison
On 2017/03/03 15:35:45, clamy wrote: > Thanks Charlie! I've started reviewing your patch, and have ...
3 years, 9 months ago (2017-03-03 15:42:58 UTC) #27
Charlie Harrison
OK Camille: I like this CL better now that it uses your suggestion. There is ...
3 years, 9 months ago (2017-03-03 18:14:54 UTC) #30
Charlie Harrison
+engedy for subresource filter bits. Note the tests are basically the same since your last ...
3 years, 9 months ago (2017-03-03 19:40:26 UTC) #33
Charlie Harrison
+engedy for subresource filter bits. Note the tests are basically the same since your last ...
3 years, 9 months ago (2017-03-03 19:40:33 UTC) #35
clamy
Thanks! I still have a few more high-level questions below before digging in the details. ...
3 years, 9 months ago (2017-03-06 15:22:16 UTC) #36
Charlie Harrison
Adding a test callback on the nav handle turned out ok. PTAL and let me ...
3 years, 9 months ago (2017-03-06 20:18:44 UTC) #38
clamy
Thanks! I like the callback on the NavigationHandle better. I chatted with Nasko and we ...
3 years, 9 months ago (2017-03-07 15:18:15 UTC) #42
Charlie Harrison
https://codereview.chromium.org/2698393002/diff/180001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/180001/content/public/test/navigation_simulator.h#newcode74 content/public/test/navigation_simulator.h:74: // if (simulator->Start() == NavigationThrottle::DEFER) On 2017/03/07 15:18:14, clamy ...
3 years, 9 months ago (2017-03-07 15:23:33 UTC) #43
engedy
https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h#newcode74 content/public/test/navigation_simulator.h:74: // if (simulator->Start() == NavigationThrottle::DEFER) > As discussed offline, ...
3 years, 9 months ago (2017-03-07 15:25:02 UTC) #44
clamy
https://codereview.chromium.org/2698393002/diff/180001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/180001/content/public/test/navigation_simulator.h#newcode74 content/public/test/navigation_simulator.h:74: // if (simulator->Start() == NavigationThrottle::DEFER) On 2017/03/07 15:23:33, Charlie ...
3 years, 9 months ago (2017-03-07 15:25:12 UTC) #45
Charlie Harrison
https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h#newcode74 content/public/test/navigation_simulator.h:74: // if (simulator->Start() == NavigationThrottle::DEFER) On 2017/03/07 15:24:56, engedy ...
3 years, 9 months ago (2017-03-07 16:42:44 UTC) #46
Charlie Harrison
Ok, I have followed engedys advice and just used a single task runner for the ...
3 years, 9 months ago (2017-03-07 17:53:05 UTC) #49
engedy
LGTM % comments. Thanks and sorry for the extreme delay! https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h#newcode74 ...
3 years, 9 months ago (2017-03-09 11:41:34 UTC) #52
clamy
Thanks for sticking through the review! I like the end result much better. LGTM % ...
3 years, 9 months ago (2017-03-09 13:18:14 UTC) #53
Charlie Harrison
Thanks everyone :) https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2698393002/diff/160001/content/public/test/navigation_simulator.h#newcode74 content/public/test/navigation_simulator.h:74: // if (simulator->Start() == NavigationThrottle::DEFER) On ...
3 years, 9 months ago (2017-03-09 14:36:01 UTC) #57
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/2698393002/220001
3 years, 9 months ago (2017-03-09 14:36:19 UTC) #61
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/5da0c292e434236e9344a532471123912cdb1fe7
3 years, 9 months ago (2017-03-09 15:38:06 UTC) #64
jam
3 years, 9 months ago (2017-03-09 17:23:30 UTC) #66
Message was sent while issue was closed.
CancelMethod/NavigationSimulatorTest.Cancel/4  is failing on tsan/asan with
PlzNavigate enabled:
https://codereview.chromium.org/2385413004/#ps1110001

https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium...
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium...

Can you disable the test in the meantime?

Powered by Google App Engine
This is Rietveld 408576698