From 468106b714af397862a6a2ee407d0356df07f93e Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sun, 16 Aug 2020 00:37:35 +0000 Subject: [PATCH] Bug 1655193 [wpt PR 24746] - Updating the putAll implementation to return one request., a=testonly Automatic update from web-platform-tests Updating the putAll implementation to return one request. This change updates the existing putAll implementation to match the explainer more. It does not yet support the put-all-or-none behavior, but it does only return one request now. Design Doc: https://docs.google.com/document/d/1wawQ8Pl-Vi6GQN5-y2UVkcghipcOGg0WRAC0ZyBkezg/edit# Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1087927 Change-Id: I2c5e9d2d71801eaab3c1c9e94a3968afb8d109b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310110 Commit-Queue: Numfor Mbiziwo-tiapo Commit-Queue: Daniel Murphy Reviewed-by: Daniel Murphy Reviewed-by: Olivier Yiptong Cr-Commit-Position: refs/heads/master{#793656} -- wpt-commits: 18b9e70e4a3c3cc30cd05f34bff9093b0313b93e wpt-pr: 24746 UltraBlame original commit: 04f08e6991664d3bc9604396fa82117e04ecf223 --- .../idbobjectstore_putall.tentative.any.js | 72 ++++++++++++------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/testing/web-platform/tests/IndexedDB/idbobjectstore_putall.tentative.any.js b/testing/web-platform/tests/IndexedDB/idbobjectstore_putall.tentative.any.js index 1c2413557308d..91f7e4f62af76 100644 --- a/testing/web-platform/tests/IndexedDB/idbobjectstore_putall.tentative.any.js +++ b/testing/web-platform/tests/IndexedDB/idbobjectstore_putall.tentative.any.js @@ -25,6 +25,38 @@ testCase db ) ; +} +) +; +const +txn += +db +. +transaction +( +[ +' +books +' +] +' +readwrite +' +) +; +const +objectStore += +txn +. +objectStore +( +' +books +' +) +; let values = @@ -67,40 +99,32 @@ title3 } ] ; -const -putAllRequests +let +putAllRequest = -store +objectStore . putAll ( values ) ; -putAllRequests -. -forEach -( -async -request -= -> -{ await promiseForRequest ( testCase -request -) -; -} +putAllRequest ) ; -} +await +promiseForTransaction +( +testCase +txn ) ; const -txn +txn2 = db . @@ -117,9 +141,9 @@ readonly ) ; const -objectStore +objectStore2 = -txn +txn2 . objectStore ( @@ -131,7 +155,7 @@ books const getRequest1 = -objectStore +objectStore2 . get ( @@ -143,7 +167,7 @@ one const getRequest2 = -objectStore +objectStore2 . get ( @@ -155,7 +179,7 @@ two const getRequest3 = -objectStore +objectStore2 . get ( @@ -168,7 +192,7 @@ await promiseForTransaction ( testCase -txn +txn2 ) ; assert_array_equals