Title: [271836] branches/safari-611-branch/LayoutTests/imported/w3c
Revision
271836
Author
alanc...@apple.com
Date
2021-01-25 14:12:05 -0800 (Mon, 25 Jan 2021)

Log Message

Cherry-pick r271434. rdar://problem/73478450

    Use promise_test in WPT beacon/beacon-common.sub.js instead of async_test
    https://bugs.webkit.org/show_bug.cgi?id=220541
    <rdar://problem/72940308>

    Reviewed by Geoffrey Garen.

    Use promise_test to limit the number of requests sent in parallel.
    This helps the server responds properly.

    * web-platform-tests/beacon/beacon-common.sub.js:
    (runTests):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/LayoutTests/imported/w3c/ChangeLog (271835 => 271836)


--- branches/safari-611-branch/LayoutTests/imported/w3c/ChangeLog	2021-01-25 22:12:02 UTC (rev 271835)
+++ branches/safari-611-branch/LayoutTests/imported/w3c/ChangeLog	2021-01-25 22:12:05 UTC (rev 271836)
@@ -1,3 +1,36 @@
+2021-01-25  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r271434. rdar://problem/73478450
+
+    Use promise_test in WPT beacon/beacon-common.sub.js instead of async_test
+    https://bugs.webkit.org/show_bug.cgi?id=220541
+    <rdar://problem/72940308>
+    
+    Reviewed by Geoffrey Garen.
+    
+    Use promise_test to limit the number of requests sent in parallel.
+    This helps the server responds properly.
+    
+    * web-platform-tests/beacon/beacon-common.sub.js:
+    (runTests):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-01-13  Youenn Fablet  <you...@apple.com>
+
+            Use promise_test in WPT beacon/beacon-common.sub.js instead of async_test
+            https://bugs.webkit.org/show_bug.cgi?id=220541
+            <rdar://problem/72940308>
+
+            Reviewed by Geoffrey Garen.
+
+            Use promise_test to limit the number of requests sent in parallel.
+            This helps the server responds properly.
+
+            * web-platform-tests/beacon/beacon-common.sub.js:
+            (runTests):
+
 2021-01-08  Alex Christensen  <achristen...@webkit.org>
 
         REGRESSION(r267402): [ macOS iOS Release ] imported/w3c/web-platform-tests/user-timing/measure-l3.any.worker.html is a flaky failure

Modified: branches/safari-611-branch/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-common.sub.js (271835 => 271836)


--- branches/safari-611-branch/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-common.sub.js	2021-01-25 22:12:02 UTC (rev 271835)
+++ branches/safari-611-branch/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-common.sub.js	2021-01-25 22:12:05 UTC (rev 271836)
@@ -98,8 +98,7 @@
     return formData;
 }
 
-// Schedules async_test's for each of the test cases, treating them as a single session,
-// and wires up the continueAfterSendingBeacon() and waitForResults() calls.
+// Schedules promise_test's for each of the test cases.
 // Parameters:
 //     testCases: An array of test cases.
 //     suffix [optional]: A string used for the suffix for each test case name.
@@ -108,10 +107,10 @@
 function runTests(testCases, suffix = '', buildUrl = self.buildUrl, sendData = self.sendData) {
     for (const testCase of testCases) {
         const id = token();
-        async_test((test) => {
+        promise_test((test) => {
             const url = ""
             assert_true(sendData(url, testCase.data), 'sendBeacon should succeed');
-            waitForResult(id).then(() => test.done(), test.step_func((e) => {throw e;}));
+            return waitForResult(id);
         }, `Verify 'navigator.sendbeacon()' successfully sends for variant: ${testCase.name}${suffix}`);
     };
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to