summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/files/resources/file-reader-real.html
blob: 9f850ed6423463bb62de5270fbdc84a593fc45fc (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
<html>
<head>
<script>
function runTest()
{
    var blob = new Blob(["0123456789"]);
    var reader = new FileReader();
    reader.onload = function(event) {
        console.log("Received data: " + event.target.result);
    }
    reader.onloadend = function() {
        if (window.testRunner)
            testRunner.notifyDone();
    }
    reader.onerror = function(event) {
        console.log("Received error event: " + event.target.error.code);
    };
    reader.readAsText(blob);
}

</script>
</head>
<body onload="runTest()">
</body>
</html>