From 93a913f78f8eb3fcfd2680f11e82a0b7c485fcd2 Mon Sep 17 00:00:00 2001 From: Ming-Ying Chung Date: Thu, 16 Nov 2023 22:41:25 -0800 Subject: [PATCH] [deprecate-unload] Fix fetch keepalive related WPTs 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 Reviewed-by: Fergal Daly Commit-Queue: Ming-Ying Chung Cr-Commit-Position: refs/heads/main@{#1225933} --- fetch/api/resources/keepalive-helper.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fetch/api/resources/keepalive-helper.js b/fetch/api/resources/keepalive-helper.js index aa1dac66595c87..f6f511631e5db5 100644 --- a/fetch/api/resources/keepalive-helper.js +++ b/fetch/api/resources/keepalive-helper.js @@ -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 => {