aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-04-27 05:25:48 -0400
committerGitHub <noreply@github.com>2019-04-27 05:25:48 -0400
commit7607f3c9953f9982e0ec4ec24f7c5da173da719a (patch)
treebf868c7c4e26245586bdabc857464d3896c3c069 /tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
parent6cf3ba9db284b2dac925d3d2792b826d6ef0ffee (diff)
parentb30b1992ac360c1414ed04efd761131234a4bd67 (diff)
downloadservo-7607f3c9953f9982e0ec4ec24f7c5da173da719a.tar.gz
servo-7607f3c9953f9982e0ec4ec24f7c5da173da719a.zip
Auto merge of #23280 - servo-wpt-sync:wpt_update_27-04-2019, r=servo-wpt-sync
Sync WPT with upstream (27-04-2019) Automated downstream sync of changes from upstream as of 27-04-2019. [no-wpt-sync] <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23280) <!-- Reviewable:end -->
Diffstat (limited to 'tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js')
-rw-r--r--tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
index b72427fd5cf..2310646e5fd 100644
--- a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
+++ b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js
@@ -32,3 +32,14 @@ promise_test(async () => {
const array_buffer = await blob.arrayBuffer();
assert_equals_typed_array(new Uint8Array(array_buffer), typed_arr);
}, "Blob.arrayBuffer() non-unicode input")
+
+promise_test(async () => {
+ const input_arr = new TextEncoder().encode("PASS");
+ const blob = new Blob([input_arr]);
+ const array_buffer_results = await Promise.all([blob.arrayBuffer(),
+ blob.arrayBuffer(), blob.arrayBuffer()]);
+ for (let array_buffer of array_buffer_results) {
+ assert_true(array_buffer instanceof ArrayBuffer);
+ assert_equals_typed_array(new Uint8Array(array_buffer), input_arr);
+ }
+}, "Blob.arrayBuffer() concurrent reads")