mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -14,13 +14,14 @@ indexeddb_test(
|
|||
const tx = db.transaction('store', 'readwrite');
|
||||
const store = tx.objectStore('store');
|
||||
|
||||
const buffer = new Uint8Array([1,2,3,4]).buffer;
|
||||
assert_equals(buffer.byteLength, 4);
|
||||
const array = new Uint8Array([1,2,3,4]);
|
||||
const buffer = array.buffer;
|
||||
assert_equals(array.byteLength, 4);
|
||||
|
||||
// Detach the ArrayBuffer by transferring it to a worker.
|
||||
const worker = new Worker(URL.createObjectURL(new Blob([])));
|
||||
worker.postMessage('', [buffer]);
|
||||
assert_equals(buffer.byteLength, 0);
|
||||
assert_equals(array.byteLength, 0);
|
||||
|
||||
assert_throws(new TypeError, () => { store.put('', buffer); });
|
||||
t.done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue