Skip to content

Commit

Permalink
[deprecate-unload] Fix fetch keepalive related WPTs
Browse files Browse the repository at this point in the history
The following targets explicitly test some behaviors within unload:

- external/wpt/fetch/api/basic/keepalive.any.js
- external/wpt/fetch/api/cors/cors-keepalive.any.js
- external/wpt/fetch/api/redirect/redirect-keepalive.any.js
- external/wpt/fetch/metadata/unload.https.sub.html

This CL added these WPTs to the virtual test suite `deprecate-unload`:
they are expected to either timeout or fail, as the unload handler is
not available in the virtual test suite.

Also explicitly set `--disable-features=DeprecateUnload` for the other
existing virtual test suites that cover these WPT targets.

Bug: 1488371
Change-Id: I40c8b1829e8bca7398a85d634a1ee04e585600b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5028677
Reviewed-by: Xianzhu Wang <[email protected]>
Reviewed-by: Fergal Daly <[email protected]>
Commit-Queue: Ming-Ying Chung <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1225933}
  • Loading branch information
mingyc authored and chromium-wpt-export-bot committed Nov 17, 2023
1 parent 06f9094 commit 93a913f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fetch/api/resources/keepalive-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ function assertStashedTokenAsync(
}))
.then(test.step_func(result => {
if (expectTokenExist) {
assert_equals(
result, 'on', `token [${token}] should be on (stashed).`);
assert_equals(result, 'on', `token should be on (stashed).`);
test.done();
} else {
assert_not_equals(
result, 'on', `token [${token}] should not be on (stashed).`);
return Promise.reject(
`Failed to retrieve token [${token}] from server`);
result, 'on', `token should not be on (stashed).`);
return Promise.reject(`Failed to retrieve token from server`);
}
}))
.catch(test.step_func(e => {
Expand Down

0 comments on commit 93a913f

Please sign in to comment.