Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/files/blob-paging.html

Issue 2055053003: [BlobAsync] Disk support for blob storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « storage/common/data_element.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 description("Test the Blob.close() method, basic functionality.");
5
6 function runTests() {
7 var blobs = new Array();
8 var totalMemory = 550 * 1024 * 1024;
9 var totalBlobs = 1001;
10 var size = totalMemory / totalBlobs;
11 var memory = new ArrayBuffer(size);
12 for (let i = 0; i < totalBlobs; i++) {
13 let blob = new Blob([memory], {type: 'application/octet-string'});
14 blobs.push(blob);
15 }
16 let b2 = new Blob([new ArrayBuffer(500 * 1024 * 1024)], {type: 'application/oc tet-string'});
17 blobs.push(b2);
18 blobs.push(b2.slice(1, 10));
19 b2 = null;
20 var blobsRead = 0;
21 blobs.forEach(function(blob) {
22 var reader = new FileReader();
23 reader.onloadend = function(event) {
24 var error = event.target.error;
25 if (error) {
26 testFailed("File read error " + error);
27 finishJSTest();
28 return;
29 }
30 blobsRead++;
31 if (blobsRead == blobs.length) {
32 finishJSTest();
33 }
34 };
35 reader.readAsText(blob);
36 });
37 }
38
39 window.jsTestIsAsync = true;
40 </script>
41 </head>
42 <body onload="runTests()">
43 <pre id='console'></pre>
44 </body>
45 </html>
OLDNEW
« no previous file with comments | « storage/common/data_element.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698