Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.0
-
None
-
None
-
File API docs.phonegap.com
Description
The result of File API calls are not clearly defined:
Some document examples expect the error handler to receive a full fledged object with a target of a FileError object.
ex.
function fail(evt) {
console.log(evt.target.error.code);
}
The mobile spec tests specifically test that the returned object is a FileError object :
ex.
expect(error).toBeFileError(FileError.NOT_FOUND_ERR); toBeFileError: function(code) { var error = this.actual; this.message = function(){ return "Expected FileError with code " + fileErrorMap[error.code] + " (" + error.code + ") to be " + fileErrorMap[code] + "(" + code + ")"; }; return (error.code == code); }