blob: 00ed859dd8b15fff6e2b39f33e251810ce42eab0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("Make sure that the FileReader operations throw when passed in an invalid blob.");
let operations = ["readAsArrayBuffer", "readAsBinaryString", "readAsText", "readAsDataURL"];
let invalidParameters = ["undefined", "null", "window"];
let fileReader = new FileReader();
for (let operation of operations) {
for (let invalidParameter of invalidParameters)
shouldThrowErrorName("fileReader." + operation + "(" + invalidParameter + ")", "TypeError");
}
</script>
</body>
</html>