<!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>