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

Issue 2907443002: Upstream service worker "XHR" test to WPT (Closed)

Created:
3 years, 7 months ago by mike3
Modified:
3 years, 6 months ago
Reviewers:
falken
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, blink-reviews-w3ctests_chromium.org, nhiroki, kinuko+serviceworker, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, tzik
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Upstream service worker "XHR" test to WPT The original version of this test would only pass if the service worker did *not* intercept the XHR request. That behavior conflicted with the Fetch and Service Worker specification and with the test's documentation itself. Update the test to pass only if the service worker intercepts the request. In addition: - Update URLs to suitable values for the Web Platform Tests project - Add "use strict" directives to script bodies - Increase precision of "cleanup" logic scheduling - Re-name files to adhere to precent set by existing WPT tests - Catch and report errors within Promise chain rather than relying on implicit reporting of uncaught errors. BUG=688116, 602051 R=falken@chromium.org Review-Url: https://codereview.chromium.org/2907443002 Cr-Commit-Position: refs/heads/master@{#476324} Committed: https://chromium.googlesource.com/chromium/src/+/7fdac9fc2a776ad2ed4c3df752896e0f33861b69

Patch Set 1 #

Total comments: 8

Patch Set 2 : Incorporate review feedback #

Total comments: 2

Patch Set 3 : Incorporate review feedback #

Total comments: 4

Patch Set 4 : Improve test design #

Total comments: 2

Patch Set 5 : Simplify request URL and remove outdated reference #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -51 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-network-service View 1 2 3 4 3 chunks +0 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html View 1 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https-expected.txt View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-worker.js View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/sync-xhr-doesnt-deadlock.data View 1 chunk +0 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/sync-xhr-doesnt-deadlock.js View 1 chunk +0 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/sync-xhr-doesnt-deadlock-iframe.html View 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock.html View 1 chunk +0 lines, -25 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/serviceworker/sync-xhr-doesnt-deadlock-expected.txt View 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
mike3
Hello again, Matt. I believe that this test was invalid. I'm recommending a correction here, ...
3 years, 7 months ago (2017-05-24 21:46:09 UTC) #1
falken
Yes the Chromium implementation made a design decision really early on that sync XHR should ...
3 years, 6 months ago (2017-05-29 04:22:15 UTC) #5
mike3
Thanks, Matt! Just one question... https://codereview.chromium.org/2907443002/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html (right): https://codereview.chromium.org/2907443002/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html#newcode2 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-xhr-sync.https.html:2: <title>Service Worker: Synchronous XHR ...
3 years, 6 months ago (2017-05-29 16:14:21 UTC) #6
falken
https://codereview.chromium.org/2907443002/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html File third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html (right): https://codereview.chromium.org/2907443002/diff/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html#newcode13 third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html:13: throw 'FAIL'; On 2017/05/29 16:14:21, mike3 wrote: > On ...
3 years, 6 months ago (2017-05-30 01:08:42 UTC) #7
mike3
> I kind of think (2) makes the test easiest to understand, but may be ...
3 years, 6 months ago (2017-05-30 14:48:15 UTC) #8
falken
Thanks for revising! After seeing my suggestion in action, now I'm paranoid someone could accidentally ...
3 years, 6 months ago (2017-05-31 01:39:33 UTC) #9
mike3
I've taken your advice and re-introduced the `responseText` assertion. This was making the Promise executor ...
3 years, 6 months ago (2017-05-31 16:12:11 UTC) #10
falken
LGTM! > This is shaping up to be the strongest test ever written for a ...
3 years, 6 months ago (2017-06-01 03:57:11 UTC) #11
mike3
I've rebased and removed a reference to the deleted test from a recently-introduced "expectations" file. ...
3 years, 6 months ago (2017-06-01 15:01:04 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2907443002/80001
3 years, 6 months ago (2017-06-01 15:01:50 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/7fdac9fc2a776ad2ed4c3df752896e0f33861b69
3 years, 6 months ago (2017-06-01 16:45:01 UTC) #18
mike3
3 years, 6 months ago (2017-06-01 23:41:08 UTC) #19
Message was sent while issue was closed.
On 2017/06/01 16:45:01, commit-bot: I haz the power wrote:
> Committed patchset #5 (id:80001) as
>
https://chromium.googlesource.com/chromium/src/+/7fdac9fc2a776ad2ed4c3df75289...

Thanks, Matt!

Powered by Google App Engine
This is Rietveld 408576698