New issue
Advanced search Search tips

Issue 846341 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 792546



Sign in to add a comment

CORB: Preserve test coverage for blocking response headers

Project Member Reported by lukasza@chromium.org, May 24 2018

Issue description

An explicit CrossSiteDocumentBlockingTest.BlockHeaders verifies that a response blocked by CORB has stripped down response headers *before* it reaches the renderer process.  The test is implemented on top of URLLoaderInterceptor and is apparently broken when trying to test CORB/NetworkService integration - the test hangs in a call to |interceptor.WaitForRequestCompletion()|.

Let's use this bug to track re-enabling this test after https://crrev.com/c/1033535 lands.
 
Cc: jam@chromium.org
jam@, you've helped me find URLLoaderInterceptor back in  https://crbug.com/808205#c14  - could you please comment on the fact that URLLoaderInterceptor doesn't seem to work in the NetworkService world.  Is this expected?  Are there alternatives that you'd suggest (alternatives for verifying in a content_browsertest that certain http response headers are not sent to the renderer)?

Comment 2 by jam@chromium.org, Jun 13 2018

URLLoaderInterceptor works with network service (it's why it was added). I'm not sure what's different with a CORB-blocked request that would change this; i would need to debug this.
Status: Started (was: Assigned)
I think this is a problem with the test, which is constructing URLLoaderInterceptor too late - after the RenderFrameHostImpl under test has been already created.  I have a WIP CL with a fix here: https://chromium-review.googlesource.com/1099971
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c68fceed6cc907898d7b071c10cbeb83cfa527f

commit 2c68fceed6cc907898d7b071c10cbeb83cfa527f
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Thu Jun 14 15:28:05 2018

Fix CrossSiteDocumentBlockingTest.BlockHeaders test for NetworkService.

Before this CL the test was constructing URLLoaderInterceptor too late -
after the RenderFrameHostImpl under test has already been created.  This
CL moves the creation of URLLoaderInterceptor (wrapped in
RequestInterceptor) slightly earlier.  After this CL the test passes
with and without NetworkService.

Bug:  846341 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I47fe27b55c341cdf87292a8aede8462921a9cbab
Reviewed-on: https://chromium-review.googlesource.com/1099971
Commit-Queue: Ɓukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567273}
[modify] https://crrev.com/2c68fceed6cc907898d7b071c10cbeb83cfa527f/content/browser/loader/cross_site_document_blocking_browsertest.cc
[modify] https://crrev.com/2c68fceed6cc907898d7b071c10cbeb83cfa527f/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter

Status: Fixed (was: Started)

Sign in to add a comment