New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600751 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Out until 24 Jan
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Provide a way to redirect in TestNavigationManager?

Project Member Reported by creis@chromium.org, Apr 5 2016

Issue description

It would be useful to have a way to force a server redirect on navigations in content_browsertests, using something like TestNavigationManager.

This comes up in cases where we can't just use a URL that always redirects.  For example, we may want to test what happens when a back/forward navigation redirects to a different URL than the user visited before, as can happen in practice when they sign out of a web site and get redirected to the login page.
 

Comment 1 by nasko@chromium.org, Apr 5 2016

Poking through the current implementation of NavigationHandle and NavigationThrottle, I don't think there is enough support in these objects for overwriting the URL and/or redirecting.

clamy@ do you think it will be complex to add such functionality?

Comment 2 by clamy@chromium.org, Apr 8 2016

This would depend a lot on whether this is doable at the network stack level. If yes, we can probably plumb something down there to execute, but if there is no support for it at the netstack level this is not going to be possible.

Comment 3 by nasko@chromium.org, Apr 8 2016

It has to be possible at the network level, as the webRequest extension API has the ability to redirect requests: https://developer.chrome.com/extensions/webRequest#type-BlockingResponse - redirectUrl.

Considering we have to support webRequest API with PlzNavigate, I think we will need to have NavigationThrottle gain this ability.

Comment 4 by clamy@chromium.org, Apr 8 2016

I'll have a look at how it's implemented for WebRequest then.

Comment 5 by creis@chromium.org, Apr 8 2016

Cc: cbentzel@chromium.org rdevlin....@chromium.org
Heh, adding cbentzel@ and rdevlin.cronin@ here as well, since I realized this request is basically the same thing I asked in another thread.  Devlin cautioned me about the WebRequest API, FWIW.

(For reference, I was hoping for this to test my fix for  issue 597322  (see comment 29), since it caused crashes in issue 600238.)
Status: Assigned (was: Untriaged)

Sign in to add a comment