Commit df4257ba authored by Carlos IL's avatar Carlos IL Committed by Commit Bot

Missing changes for upgrade-insecure-requests for redirects.

When iframe upgrades were moved out of crrev.com/c/1067846 and into
crrev.com/c/1086005, some non iframe specific code was also moved by
mistake, this is that code, along with the tests.

Change-Id: I41aece313c1dd6504e9a27bb85fb810c975e8167
Reviewed-on: https://chromium-review.googlesource.com/1091184Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Carlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565657}
parent fed7ae11
......@@ -947,6 +947,7 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
new_request->set_site_for_cookies(request_data.site_for_cookies);
new_request->set_attach_same_site_cookies(
request_data.attach_same_site_cookies);
new_request->set_upgrade_if_insecure(request_data.upgrade_if_insecure);
// The initiator should normally be present, unless this is a navigation.
// Browser-initiated navigations don't have an initiator document, the
......
......@@ -644,6 +644,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
resource_request->method = method;
resource_request->url = url_;
resource_request->site_for_cookies = request.SiteForCookies();
resource_request->upgrade_if_insecure = request.UpgradeIfInsecure();
resource_request->request_initiator =
request.RequestorOrigin().IsNull()
? base::Optional<url::Origin>()
......
......@@ -4769,6 +4769,9 @@ crbug.com/848006 [ Mac ] virtual/threaded/animations/responsive/zoom-responsive-
crbug.com/849040 [ Mac ] virtual/threaded/http/tests/devtools/tracing/timeline-paint/paint-profiler-update.js [ Crash Timeout Pass ]
crbug.com/841567 fast/scrolling/scrollbar-tickmarks-hittest.html [ Failure Pass ]
# Now that upgrade-insecure-requests enforcing is fixed for redirects, this test will fail while reporting is implemented.
crbug.com/615885 external/wpt/content-security-policy/securitypolicyviolation/img-src-redirect-upgrade-reporting.https.html [ Timeout ]
# Flakes 2018-06-04
crbug.com/847870 fast/webgl/texImage-imageBitmap-from-canvas-resize.html [ Timeout Pass ]
crbug.com/847697 virtual/video-surface-layer/media/controls/overflow-menu-always-visible.html [ Pass Failure ]
......
This is a testharness.js-based test.
FAIL insecure/same-origin => insecure/same-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/same-origin => insecure/same-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/same-origin => insecure/same-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS insecure/same-origin => secure/same-origin image
PASS insecure/same-origin => secure/same-origin image in <iframe srcdoc>
PASS insecure/same-origin => secure/same-origin image in <iframe>
FAIL insecure/same-origin => insecure/cross-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/same-origin => insecure/cross-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/same-origin => insecure/cross-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS insecure/same-origin => secure/cross-origin image
PASS insecure/same-origin => secure/cross-origin image in <iframe srcdoc>
PASS insecure/same-origin => secure/cross-origin image in <iframe>
FAIL secure/same-origin => insecure/same-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/same-origin => insecure/same-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/same-origin => insecure/same-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS secure/same-origin => secure/same-origin image
PASS secure/same-origin => secure/same-origin image in <iframe srcdoc>
PASS secure/same-origin => secure/same-origin image in <iframe>
FAIL secure/same-origin => insecure/cross-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/same-origin => insecure/cross-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/same-origin => insecure/cross-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS secure/same-origin => secure/cross-origin image
PASS secure/same-origin => secure/cross-origin image in <iframe srcdoc>
PASS secure/same-origin => secure/cross-origin image in <iframe>
FAIL insecure/cross-origin => insecure/same-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/cross-origin => insecure/same-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/cross-origin => insecure/same-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS insecure/cross-origin => secure/same-origin image
PASS insecure/cross-origin => secure/same-origin image in <iframe srcdoc>
PASS insecure/cross-origin => secure/same-origin image in <iframe>
FAIL insecure/cross-origin => insecure/cross-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/cross-origin => insecure/cross-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL insecure/cross-origin => insecure/cross-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS insecure/cross-origin => secure/cross-origin image
PASS insecure/cross-origin => secure/cross-origin image in <iframe srcdoc>
PASS insecure/cross-origin => secure/cross-origin image in <iframe>
FAIL secure/cross-origin => insecure/same-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/cross-origin => insecure/same-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/cross-origin => insecure/same-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fweb-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS secure/cross-origin => secure/same-origin image
PASS secure/cross-origin => secure/same-origin image in <iframe srcdoc>
PASS secure/cross-origin => secure/same-origin image in <iframe>
FAIL secure/cross-origin => insecure/cross-origin image assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/cross-origin => insecure/cross-origin image in <iframe srcdoc> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
FAIL secure/cross-origin => insecure/cross-origin image in <iframe> assert_unreached: http://web-platform.test:8444/common/redirect.py?location=http%3A%2F%2Fxn--n8j6ds53lwwkrqhv28a.web-platform.test%3A8444%2Fupgrade-insecure-requests%2Fsupport%2Fpass.png should load successfully. Reached unreachable code
PASS secure/cross-origin => secure/cross-origin image
PASS secure/cross-origin => secure/cross-origin image in <iframe srcdoc>
PASS secure/cross-origin => secure/cross-origin image in <iframe>
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment