JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / files / file-reader-fffd.html
1 <!DOCTYPE HTML>
2 <html>
3  <head>
4     <script src="../js/resources/js-test-pre.js"></script>
5     <script src="resources/read-common.js"></script>
6  </head>
7  <body>
8     <div id="description"></div>
9     <div id="console"></div>
10 <script>
11 description("Throw various bad bytes at file reader.");
12
13 bb = evalAndLog("bb = new WebKitBlobBuilder();");
14 array = evalAndLog("array = new Uint8Array([65, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 66]);");
15 blob = evalAndLog("blob = buildBlob([array.buffer]);");
16 reader = evalAndLog("reader = new FileReader();");
17 reader.onload = function(event) {
18   fileString = event.target.result;
19   shouldBe("fileString", "'A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDB'");
20   finishJSTest();
21 }
22 evalAndLog("reader.readAsText(blob);");
23
24 var jsTestIsAsync = true;
25 var successfullyParsed = true;
26
27 </script>
28     <script src="../js/resources/js-test-post.js"></script>
29  </body>
30 </html>