nested-cloning-large.any.js (1680B)
1 // META: title=IndexedDB: large nested objects are cloned correctly 2 // META: global=window,worker 3 // META: script=resources/support-promises.js 4 // META: script=resources/nested-cloning-common.js 5 // META: timeout=long 6 7 // Spec: https://w3c.github.io/IndexedDB/#abort-transaction 8 9 'use strict'; 10 11 cloningTest('large typed array', [ 12 {type: 'buffer', size: wrapThreshold, seed: 1}, 13 // This test uses non-random data to test that compression doesn't 14 // break functionality. 15 {type: 'buffer', size: wrapThreshold, seed: 0}, 16 ]) 17 18 cloningTestWithKeyGenerator('blob with large typed array', [ 19 { 20 blob: { 21 type: 'blob', 22 size: wrapThreshold, 23 mimeType: 'text/x-blink-01', 24 seed: 1 25 }, 26 buffer: {type: 'buffer', size: wrapThreshold, seed: 2}, 27 }, 28 ]); 29 30 cloningTestWithKeyGenerator('array of blobs and large typed arrays', [ 31 [ 32 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-01', seed: 1}, 33 {type: 'buffer', size: wrapThreshold, seed: 2}, 34 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-03', seed: 3}, 35 {type: 'buffer', size: wrapThreshold, seed: 4}, 36 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-05', seed: 5}, 37 ], 38 ]); 39 40 cloningTestWithKeyGenerator('object with blobs and large typed arrays', [ 41 { 42 blob: 43 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink1', seed: 1}, 44 more: [ 45 {type: 'buffer', size: wrapThreshold, seed: 2}, 46 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink3', seed: 3}, 47 {type: 'buffer', size: wrapThreshold, seed: 4}, 48 ], 49 blob2: 50 {type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink5', seed: 5}, 51 }, 52 ]);