blob: 09856079650a5d04b78aef71e6640c2a5fc9e4de (
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
30
31
|
<!DOCTYPE html>
<html>
<head>
<title>FileReader.abort() in the last progress event shouldn't crash</title>
<link rel="help" href="http://www.w3.org/TR/FileAPI/#events">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
var reader = new FileReader();
setup({explicit_done: true});
on_event(reader, "progress", function() {
test(function() {
assert_equals(reader.readyState, reader.LOADING, "The readyState");
reader.abort();
}, "Check if readyState is done, and calling abort() doesn't crash");
});
on_event(reader, "loadend", function() {
done();
});
reader.readAsText(new Blob(["foo"]));
</script>
</body>
</html>
|