Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 1280733002: [3/3 blink] Support redirect option of Request and "opaqueredirect" response type. (Closed)

Created:
5 years, 4 months ago by horo
Modified:
5 years, 4 months ago
Reviewers:
falken, kinuko, jsbell, yhirano
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@Redirect1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[3/3 blink] Support redirect option of Request and "opaqueredirect" response type. https://crbug.com/510650#c4 describes the details of the data flow. 1/3 blink: https://codereview.chromium.org/1265133002/ 2/3 chromium: https://codereview.chromium.org/1271733002/ 3/3 blink: This BUG=510650, 517837 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200815

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase #

Patch Set 3 : s/follw/follow/ #

Patch Set 4 : Handle redirect mode in DocumentThreadableLoader. #

Patch Set 5 : Add LayoutTests #

Patch Set 6 : update fetch-request-redirect.html #

Total comments: 12

Patch Set 7 : incorporated with falken's comment #

Patch Set 8 : fix error #

Patch Set 9 : rebase #

Total comments: 12

Patch Set 10 : incorporated yhirano's comment #

Total comments: 5

Patch Set 11 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -17 lines) Patch
M LayoutTests/http/tests/fetch/script-tests/fetch.js View 1 2 3 4 5 6 7 8 9 2 chunks +66 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/fetch/script-tests/request.js View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/fetch-request-redirect.html View 1 2 3 4 5 6 7 8 9 1 chunk +173 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-request-resources.html View 1 2 3 4 7 chunks +10 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/resources/fetch-request-redirect-iframe.html View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -10 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-request-resources-worker.js View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-rewrite-worker.js View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/android/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +64 lines, -1 line 0 comments Download
M Source/modules/fetch/Request.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -2 lines 0 comments Download
M Source/modules/fetch/Request.idl View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 33 (9 generated)
falken
I was expecting to see tests in this patch. Will you add them? https://codereview.chromium.org/1280733002/diff/1/Source/modules/fetch/Request.cpp File ...
5 years, 4 months ago (2015-08-07 07:45:18 UTC) #2
horo
https://codereview.chromium.org/1280733002/diff/1/Source/modules/fetch/Request.cpp File Source/modules/fetch/Request.cpp (right): https://codereview.chromium.org/1280733002/diff/1/Source/modules/fetch/Request.cpp#newcode159 Source/modules/fetch/Request.cpp:159: if (init.redirect == "follw") { On 2015/08/07 07:45:18, falken ...
5 years, 4 months ago (2015-08-07 10:04:13 UTC) #3
horo
On 2015/08/07 07:45:18, falken wrote: > I was expecting to see tests in this patch. ...
5 years, 4 months ago (2015-08-07 10:05:24 UTC) #4
horo
falken@, yhirano@ Could you please review this patch? I added layout tests.
5 years, 4 months ago (2015-08-13 04:54:18 UTC) #6
falken
serviceworker lgtm https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js File LayoutTests/http/tests/fetch/script-tests/fetch.js (right): https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js#newcode150 LayoutTests/http/tests/fetch/script-tests/fetch.js:150: }, 'No redirect fetch completes normally even ...
5 years, 4 months ago (2015-08-13 06:42:30 UTC) #7
horo
https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js File LayoutTests/http/tests/fetch/script-tests/fetch.js (right): https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js#newcode150 LayoutTests/http/tests/fetch/script-tests/fetch.js:150: }, 'No redirect fetch completes normally even if redirect ...
5 years, 4 months ago (2015-08-13 10:46:36 UTC) #8
horo
https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js File LayoutTests/http/tests/fetch/script-tests/fetch.js (right): https://codereview.chromium.org/1280733002/diff/100001/LayoutTests/http/tests/fetch/script-tests/fetch.js#newcode150 LayoutTests/http/tests/fetch/script-tests/fetch.js:150: }, 'No redirect fetch completes normally even if redirect ...
5 years, 4 months ago (2015-08-13 10:46:36 UTC) #9
horo
yhirano@ Could you please review this patch?
5 years, 4 months ago (2015-08-18 00:52:11 UTC) #10
yhirano
https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html File LayoutTests/http/tests/serviceworker/fetch-request-redirect.html (right): https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html#newcode10 LayoutTests/http/tests/serviceworker/fetch-request-redirect.html:10: return new Promise(function(resolve, reject) { Is this different from ...
5 years, 4 months ago (2015-08-18 07:56:49 UTC) #11
yhirano
We talked about the same topic in the previous CL, but let me talk about ...
5 years, 4 months ago (2015-08-18 08:28:20 UTC) #12
horo
On 2015/08/18 08:28:20, yhirano wrote: > We talked about the same topic in the previous ...
5 years, 4 months ago (2015-08-18 09:47:21 UTC) #13
yhirano
Thanks, I see that I was wrong.
5 years, 4 months ago (2015-08-18 12:46:26 UTC) #14
yhirano
https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html File LayoutTests/http/tests/serviceworker/fetch-request-redirect.html (right): https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html#newcode97 LayoutTests/http/tests/serviceworker/fetch-request-redirect.html:97: 'Redirected XHR with Request.redirect=manual should fail.'), On 2015/08/18 07:56:48, ...
5 years, 4 months ago (2015-08-18 12:47:08 UTC) #15
horo
https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html File LayoutTests/http/tests/serviceworker/fetch-request-redirect.html (right): https://codereview.chromium.org/1280733002/diff/160001/LayoutTests/http/tests/serviceworker/fetch-request-redirect.html#newcode10 LayoutTests/http/tests/serviceworker/fetch-request-redirect.html:10: return new Promise(function(resolve, reject) { On 2015/08/18 07:56:48, yhirano ...
5 years, 4 months ago (2015-08-19 07:36:12 UTC) #19
yhirano
https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp#newcode317 Source/core/loader/DocumentThreadableLoader.cpp:317: if (m_redirectMode == WebURLRequest::FetchRedirectModeManual) { Can't we use request.fetchRedirectMode() ...
5 years, 4 months ago (2015-08-19 07:54:52 UTC) #20
horo
https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp#newcode317 Source/core/loader/DocumentThreadableLoader.cpp:317: if (m_redirectMode == WebURLRequest::FetchRedirectModeManual) { On 2015/08/19 07:54:52, yhirano ...
5 years, 4 months ago (2015-08-19 08:23:04 UTC) #21
yhirano
lgtm https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp#newcode317 Source/core/loader/DocumentThreadableLoader.cpp:317: if (m_redirectMode == WebURLRequest::FetchRedirectModeManual) { On 2015/08/19 08:23:04, ...
5 years, 4 months ago (2015-08-19 08:32:15 UTC) #22
horo
kinuko@ Could you please review Source/core/loader/DocumentThreadableLoader.*?
5 years, 4 months ago (2015-08-19 08:39:27 UTC) #24
kinuko
lgtm https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp#newcode317 Source/core/loader/DocumentThreadableLoader.cpp:317: if (m_redirectMode == WebURLRequest::FetchRedirectModeManual) { On 2015/08/19 08:32:15, ...
5 years, 4 months ago (2015-08-19 08:58:18 UTC) #25
horo
https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1280733002/diff/240001/Source/core/loader/DocumentThreadableLoader.cpp#newcode317 Source/core/loader/DocumentThreadableLoader.cpp:317: if (m_redirectMode == WebURLRequest::FetchRedirectModeManual) { On 2015/08/19 08:58:18, kinuko ...
5 years, 4 months ago (2015-08-19 09:47:02 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280733002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280733002/260001
5 years, 4 months ago (2015-08-19 09:52:39 UTC) #29
commit-bot: I haz the power
Committed patchset #11 (id:260001) as https://src.chromium.org/viewvc/blink?view=rev&revision=200815
5 years, 4 months ago (2015-08-19 11:12:30 UTC) #30
jsbell
http/tests/serviceworker/fetch-request-redirect.html appears to be failing: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=http%2Ftests%2Fserviceworker%2Ffetch-request-redirect.html FAIL Verify redirect mode of Fetch API and ServiceWorker ...
5 years, 4 months ago (2015-08-19 17:13:56 UTC) #32
jsbell
5 years, 4 months ago (2015-08-19 17:54:37 UTC) #33
Message was sent while issue was closed.
On 2015/08/19 17:13:56, jsbell wrote:
> http/tests/serviceworker/fetch-request-redirect.html appears to be failing:
> 
>
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=htt...
> 
> FAIL Verify redirect mode of Fetch API and ServiceWorker FetchEvent.
> assert_unreached: unexpected rejection: Redirected iframe loading with
> Request.redirect=follow should succeed. Reached unreachable code
> 
> (I'm also seeing this locally)

Looks like the timeout is firing unexpectedly. This makes sense - on a slow box
under debug or MSAN (etc), and with so much happening in parallel, one of the
iframes could take more than 500ms to load.

We should disable this test and figure out an alternate approach.

Powered by Google App Engine
This is Rietveld 408576698