4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/read-common.js"></script>
8 <div id=
"description"></div>
9 <div id=
"console"></div>
11 description("Throw various bad bytes at file reader.");
13 array
= evalAndLog("array = new Uint8Array([65, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 66]);");
14 blob
= evalAndLog("blob = new Blob([array]);");
15 reader
= evalAndLog("reader = new FileReader();");
16 reader
.onload = function(event
) {
17 fileString
= event
.target
.result
;
18 shouldBe("fileString", "'A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDB'");
21 evalAndLog("reader.readAsText(blob);");
23 var jsTestIsAsync
= true;