Anyone calling new File(bits, name) (see: https://developer.mozilla.org/en-US/docs/Web/API/File/File) in javascript code will seen unexpected behavior.
The first issue is that most calls on the object will fail with an NullPointerException (getName(), getLastModified(), getSize() all require the underlying file_ to be not null).
Therefore the following test will fail:
@Test
@Alerts({"myfilename", "application/octet-stream", "1000", "0"})
@NotYetImplemented(IE)
public void fileConstructor() throws Exception {
final String html = "<html><head><script>\n" + " function test() {\n"
+ " var newFile = new File([], 'myfilename', {type: 'application/octet-stream', lastModified: '1000'});"
+ " alert(newFile.name);"
+ " alert(newFile.type);"
+ " alert(newFile.lastModified);"
+ " alert(newFile.size);"
+ " } "
+ "</script></head><body onload='test()'>\n"
+ "</body>\n" + "</html>";
loadPageWithAlerts2(html);
}
Anyone calling
new File(bits, name)(see: https://developer.mozilla.org/en-US/docs/Web/API/File/File) in javascript code will seen unexpected behavior.The first issue is that most calls on the object will fail with an NullPointerException (
getName(),getLastModified(),getSize()all require the underlyingfile_to be not null).Therefore the following test will fail: