| Yuki Shiino | 28a66e1 | 2019-07-09 12:22:00 | [diff] [blame] | 1 | <!doctype html> |
| 2 | <meta charset="utf8"> |
| 3 | <meta name="timeout" content="long"> |
| 4 | <title>IndexedDB: small nested objects are cloned correctly</title> |
| 5 | <link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction"> |
| 6 | <link rel="author" href="pwnall@chromium.org" title="Victor Costan"> |
| 7 | <script src="/resources/testharness.js"></script> |
| 8 | <script src="/resources/testharnessreport.js"></script> |
| 9 | <script src="support-promises.js"></script> |
| 10 | <script src="nested-cloning-common.js"></script> |
| 11 | <script> |
| pwnall@chromium.org | 5f41cb8 | 2017-06-23 18:07:12 | [diff] [blame] | 12 | |
| 13 | cloningTest('small typed array', [ |
| 14 | { type: 'buffer', size: 64, seed: 1 }, |
| 15 | ]); |
| 16 | |
| 17 | cloningTest('blob', [ |
| 18 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-1', seed: 1 }, |
| 19 | ]); |
| 20 | |
| 21 | cloningTestWithKeyGenerator('blob with small typed array', [ |
| 22 | { |
| 23 | blob: { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-01', |
| 24 | seed: 1 }, |
| 25 | buffer: { type: 'buffer', size: 64, seed: 2 }, |
| 26 | }, |
| 27 | ]); |
| 28 | |
| 29 | cloningTestWithKeyGenerator('blob array', [ |
| 30 | [ |
| 31 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-1', seed: 1 }, |
| 32 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-2', seed: 2 }, |
| 33 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-3', seed: 3 }, |
| 34 | ], |
| 35 | ]); |
| 36 | |
| 37 | cloningTestWithKeyGenerator('array of blobs and small typed arrays', [ |
| 38 | [ |
| 39 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-01', seed: 1 }, |
| 40 | { type: 'buffer', size: 64, seed: 2 }, |
| 41 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-03', seed: 3 }, |
| 42 | { type: 'buffer', size: 64, seed: 4 }, |
| 43 | { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-05', seed: 5 }, |
| 44 | ], |
| Yuki Shiino | 28a66e1 | 2019-07-09 12:22:00 | [diff] [blame] | 45 | ]); |
| 46 | |
| 47 | </script> |