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

Issue 754470 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Attempting to refresh a data: URI page results in blockage

Project Member Reported by elawrence@chromium.org, Aug 10 2017

Issue description

Chrome Version: 62.0.3181.0
OS: Windows 10

What steps will reproduce the problem?
(1) Open Chrome
(2) Open DevTools via F12 console.
(3) Paste 

   data:text/html,;hi<script>document.write(Math.random());</script> 

in omnibox and hit enter.

Observe: Page loads.

(4) Hit F5 or click refresh

Expect: Refresh, with a new random number shown

Actual: Console notification "Not allowed to navigate top frame to data URL: data:text/html,;hi<script>document.write(Math.random());</script>"

Interestingly, I can't reproduce on ToT or with 61.0.3163.39, which leads me to think that maybe this is some combination of Site Isolation and/or PlzNavigate?

What happens instead?

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
I can now repro in 61.0.3163.39 as well. 

Interestingly, this appears to be a problem with having the developer tools open. Without opening the tools, I can refresh at will. When I hit F12 to open the tools, Refresh immediately begins to fail and I get the console notification.
I disabled both SiteIsolation and TopDocumentIsolation.

The repro seems to depend on chrome://flags/#browser-side-navigation; it repros when Enabled and does not repro when Disabled.

Comment 3 by mea...@chromium.org, Aug 17 2017

Status: Assigned (was: Untriaged)
The problem is that NavigationHandle.IsRendererInitiated() returns true for reloads.

Interestingly, right-click and "Reload" doesn't have this problem. I wouldn't expect rightclick+Reload to be different than F5.


Comment 4 by mea...@chromium.org, Aug 17 2017

Labels: -Pri-3 OS-All Pri-2
Re #3: I was only repro'ing with the DevTools open; do they somehow capture the F5 and re-dispatch it?

Comment 6 by mea...@chromium.org, Aug 17 2017

Cc: mea...@chromium.org
Components: Platform>DevTools
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
Great point. They are not capturing F5, but chrome's ReloadInternal() delegates the reload to DevToolsWindow: 
https://cs.chromium.org/chromium/src/chrome/browser/ui/browser_commands.cc?rcl=78ab7a20a5d3a321ee8262b82970c08bf8bc894d&l=255

DevTools then calls InspectorPageAgent::reload() which calls LocalFrame::Reload() which will initiate a renderer-initiated navigation.

In that case, this is a devtools bug where it causes all browser-inititated reloads to be renderer-initiated. I'm downgrading this back to P3 given that it only happens when the console is open.

DevTools team, can you please take a look?
Cool! So it sounds like there may be two issues then:

1. The issue raised in this bug, whereby all browser-initiated reloads are converted to renderer-initiated, and 

2. Whatever scenario DevTools has for intercepting refresh isn't achieved when Right-Click>Reload is used to reload the page.

Comment 8 by mea...@chromium.org, Aug 17 2017

Yes, the context menu is directly calling webcontent's NavigationController.Reload(): https://cs.chromium.org/chromium/src/chrome/browser/renderer_context_menu/render_view_context_menu.cc?rcl=8ea62164a55064489614aa0a038743b8419c2312&l=1794

So there is at least 4 different ways to reload a page, each doing something different :p

1. F5, Shift+F5
2. Reload button in the navigation bar (hopefully same as (1))
3. Right click -> Reload
4. window.location.reload()
Owner: lushnikov@chromium.org
Status: Assigned (was: Available)
Status: Fixed (was: Assigned)

Sign in to add a comment