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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/common/data_element.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/files/blob-paging.html
diff --git a/third_party/WebKit/LayoutTests/fast/files/blob-paging.html b/third_party/WebKit/LayoutTests/fast/files/blob-paging.html
new file mode 100644
index 0000000000000000000000000000000000000000..97eab89791c0acf8bedcd35dd46d6934c8d42cb2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/files/blob-paging.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<script src="../../resources/js-test.js"></script>
+<script>
+description("Test the Blob.close() method, basic functionality.");
+
+function runTests() {
+ var blobs = new Array();
+ var totalMemory = 550 * 1024 * 1024;
+ var totalBlobs = 1001;
+ var size = totalMemory / totalBlobs;
+ var memory = new ArrayBuffer(size);
+ for (let i = 0; i < totalBlobs; i++) {
+ let blob = new Blob([memory], {type: 'application/octet-string'});
+ blobs.push(blob);
+ }
+ let b2 = new Blob([new ArrayBuffer(500 * 1024 * 1024)], {type: 'application/octet-string'});
+ blobs.push(b2);
+ blobs.push(b2.slice(1, 10));
+ b2 = null;
+ var blobsRead = 0;
+ blobs.forEach(function(blob) {
+ var reader = new FileReader();
+ reader.onloadend = function(event) {
+ var error = event.target.error;
+ if (error) {
+ testFailed("File read error " + error);
+ finishJSTest();
+ return;
+ }
+ blobsRead++;
+ if (blobsRead == blobs.length) {
+ finishJSTest();
+ }
+ };
+ reader.readAsText(blob);
+ });
+}
+
+window.jsTestIsAsync = true;
+</script>
+</head>
+<body onload="runTests()">
+<pre id='console'></pre>
+</body>
+</html>
« 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