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> |