-
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
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);
}
Metadata
Metadata
Assignees
Labels
No labels