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