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

Issue 738336 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Oct 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 678905



Sign in to add a comment

fetch-event-referrer-policy.https.html is failing

Project Member Reported by leon....@intel.com, Jun 30 2017

Issue description

In this service worker wpt test,
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html?rcl=0ea56e355592ed53d33d1283e1c46eaaa282f81a&l=111,
frame.contentWindow.fetch(http_url) throws exception because of Mixed-Content violation.

Are we using HTTP url here intentionally? And why? Thanks.
 
Cc: tkent@chromium.org qyears...@chromium.org
Status: Available (was: Untriaged)
I remember talking about this on GitHub:
https://github.com/w3c/ServiceWorker/issues/1094

I think the HTTP request is on purpose in order to test 'no-referrer-when-downgrade'.

I think what we need to do here is move the referrer policy tests out of fetch-event.httpl.html, and into their own file like fetch-event-referrer-policy.https.html. Then we need to add configuration to run that file in a mode that allows mixed content. I heard testharnessreporter.js lets you set configuration. cc platform predictability folks.

Comment 2 by falken@chromium.org, Jul 13 2017

Cc: bke...@mozilla.com
Ben Kelly: https://chromium-review.googlesource.com/c/567963/ is going to move the referrer policy tests to a new file, so Mozilla will need to update their config file that's allowing mixed content for the tests.

Comment 3 by falken@chromium.org, Jul 13 2017

Owner: leon....@intel.com
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 13 2017

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

commit b51134cd53afaf2a3a970bacd35e095642681dab
Author: Han Leon <leon.han@intel.com>
Date: Thu Jul 13 06:45:41 2017

[ServiceWorker] Separate referrer policy tests into fetch-event-referrer-policy.https.html

In order to test "no-referrer-when-downgrade" policy, referrer policy
tests in fetch-event.https.html need to perform fetching HTTP urls from
an HTTPS iframe, but the fetch will be rejected because of Mixed Content
violation.
This CL moves referrer policy tests from fetch-event.https.html into a
new test file fetch-event-referrer-policy.https.html, and then changes
testharnessreport.js to let test runner allow Mixed Content when running
this specific file.

BUG= 738336 
TEST=blink_tests
external/wpt/service-workers/service-worker/fetch-event.https.html
external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https.html

Change-Id: I0bbc11a74343413da6ad9002959e96c0e0777c59
Reviewed-on: https://chromium-review.googlesource.com/567963
Commit-Queue: Han Leon <leon.han@intel.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486296}
[add] https://crrev.com/b51134cd53afaf2a3a970bacd35e095642681dab/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt
[add] https://crrev.com/b51134cd53afaf2a3a970bacd35e095642681dab/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https.html
[modify] https://crrev.com/b51134cd53afaf2a3a970bacd35e095642681dab/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https-expected.txt
[modify] https://crrev.com/b51134cd53afaf2a3a970bacd35e095642681dab/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event.https.html
[modify] https://crrev.com/b51134cd53afaf2a3a970bacd35e095642681dab/third_party/WebKit/LayoutTests/resources/testharnessreport.js

Summary: fetch-event-referrer-policy.https.html is failing (was: referrerPolicy failure in wpt test fetch-event.https.html)
Just a status update for this bug. external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https.html is now failing (and we have the appropriate -expected.txt for it):

FAIL Service Worker responds to fetch event with the referrer policy assert_unreached: unexpected rejection: assert_equals: Service Worker should respond to fetch with the referrer URL when a member of RequestInit is present expected "Referrer: https://web-platform.test:8444/service-workers/service-worker/fake-referrer\nReferrerPolicy: no-referrer-when-downgrade" but got "Referrer: https://web-platform.test:8444/service-workers/service-worker/resources/fake-referrer\nReferrerPolicy: no-referrer-when-downgrade" Reached unreachable code

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt
Hi falken@ and leon@, I reran the src/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-referrer-policy.https.html locally based on the latest code
 and found it passed, meanwhile, the *expected.txt file has not existed anymore. Shall we close this issue? thanks!
Status: WontFix (was: Started)
Great! The expectation was removed by:
* WPT import: https://chromium-review.googlesource.com/c/chromium/src/+/1214067.

Fixed by:
* WPT commit: https://github.com/web-platform-tests/wpt/commit/44e61df7d7132412b70ce8331cada50145387cc3
* WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=181239

So yes we can close. Thanks!




Sign in to add a comment