New issue
Advanced search Search tips

Issue 771816 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 3
Type: Bug

Blocked on:
issue 770292



Sign in to add a comment

Migrate more test throttles to TestNavigationThrottle

Project Member Reported by lgar...@chromium.org, Oct 4 2017

Issue description

TestNavigationThrottle has the functionality many tests need, and can be adapted more easily in a subclass for some others.

Here's a partial list from what I wrote up on Monday:

ResourceLoadingCancellingThrottle (in ads_page_load_metrics_observer_unittest.cc)
- Cancel asynchronously for WillProcessResponse.
- Call a method when the throttle will cancel.

SubresourceFilterSafeBrowsingActivationThrottleTestWithCancelling (in subresource_filter_safe_browsing_activation_throttle_unittest.cc)
- Allow canceling for each method, synchronously and asynchronously.

DeletingNavigationThrottle (in navigation_handle_impl_unittest.cc)
- Run a callback when each method is called.
- Same callback in each case (resets the navigation handle).

TestNavigationManagerThrottle (in browser_test_utils.cc)
- For WillStartRequest and WillProcessResponse:
  - Synchronously DEFER
  - Don’t cancel resume from the throttle.
  - Call a callback (which will do a little extra work before resuming the navigation by itself).

NavigationThrottleCallbackRunner (in navigation_simulator.cc)
- Currently: run a callback when each method is called (different callback in each case.)
- Actual use case: count calls to each method.

navigation_simulator_unittest.cc
- Allow canceling for each method, synchronously and asynchronously.
- For WillFailRequest(), it will be desirable if the ThrottleCheckResult can be specified.

"TestNavigationThrottle" (in navigation_handle_impl_browsertest.cc)
- Keep track of the RequestContextType
- Custom responses
- Allow waiting for asynchronous callbacks to finish.
  - Asynchronous callbacks
  - Expose Resume() and CancelDeferredNavigation().
    - This might not be needed if we add support for aynchronous Resume() in TestNavigationThrottle.

A bunch of these also use custom inserters, and it might be worth looking into upgrading TestNavigationThrottleInserter to handle them. [1]

[1] https://cs.chromium.org/chromium/src/content/public/test/test_navigation_throttle_inserter.cc?sq=package:chromium&dr=CSs
 
Description: Show this description
Project Member

Comment 2 by sheriffbot@chromium.org, Oct 5

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: lgar...@chromium.org
Status: Assigned (was: Untriaged)
Is anything actionable here? This has been opened for > 1 year.
Cc: carlosil@chromium.org creis@chromium.org alex...@chromium.org arthurso...@chromium.org
Owner: clamy@chromium.org
lgarron@ is no longer working on Chromium, so I'm reassigning it to clamy@, who drove most of the NavigationThrottle work and adding few other folks on cc.

Sign in to add a comment