Changeset 271434 in webkit
- Timestamp:
- Jan 13, 2021, 1:50:12 AM (6 years ago)
- Location:
- trunk/LayoutTests/imported/w3c
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
web-platform-tests/beacon/beacon-common.sub.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r271433 r271434 1 2021-01-13 Youenn Fablet <youenn@apple.com> 2 3 Use promise_test in WPT beacon/beacon-common.sub.js instead of async_test 4 https://bugs.webkit.org/show_bug.cgi?id=220541 5 <rdar://problem/72940308> 6 7 Reviewed by Geoffrey Garen. 8 9 Use promise_test to limit the number of requests sent in parallel. 10 This helps the server responds properly. 11 12 * web-platform-tests/beacon/beacon-common.sub.js: 13 (runTests): 14 1 15 2021-01-12 Cathie Chen <cathiechen@igalia.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-common.sub.js
r263595 r271434 99 99 } 100 100 101 // Schedules async_test's for each of the test cases, treating them as a single session, 102 // and wires up the continueAfterSendingBeacon() and waitForResults() calls. 101 // Schedules promise_test's for each of the test cases. 103 102 // Parameters: 104 103 // testCases: An array of test cases. … … 109 108 for (const testCase of testCases) { 110 109 const id = token(); 111 async_test((test) => {110 promise_test((test) => { 112 111 const url = buildUrl(id); 113 112 assert_true(sendData(url, testCase.data), 'sendBeacon should succeed'); 114 waitForResult(id).then(() => test.done(), test.step_func((e) => {throw e;}));113 return waitForResult(id); 115 114 }, `Verify 'navigator.sendbeacon()' successfully sends for variant: ${testCase.name}${suffix}`); 116 115 };
Note:
See TracChangeset
for help on using the changeset viewer.