blob: e28ffe1f81fee6791605ea341189e984fabd6fdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
if (this.importScripts) {
importScripts('fs-worker-common.js');
importScripts('../../../resources/js-test.js');
importScripts('file-writer-utils.js');
}
description("Test that FileWriter works without crash when trying to write an empty blob.");
var fileEntry;
function onTestSuccess() {
testPassed("Successfully wrote blob.");
cleanUp();
}
function startWrite(writer) {
var blob = new Blob([""]);
writer.onerror = onError;
writer.onwriteend = onTestSuccess;
writer.write(blob);
}
function runTest(unusedFileEntry, fileWriter) {
startWrite(fileWriter);
gc();
}
var jsTestIsAsync = true;
setupAndRunTest(2 * 1024 * 1024, 'file-writer-empty-blob', runTest);
|