Skip to content

Commit

Permalink
Move startTime of FileTransfer upload test to be after File creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrieve committed Oct 2, 2012
1 parent 7c800f6 commit 79dc8f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autotest/tests/filetransfer.tests.js
Expand Up @@ -317,7 +317,7 @@ describe('FileTransfer', function() {

var fileFail = createDoNotCallSpy('fileFail');
var uploadWin = createDoNotCallSpy('uploadWin', 'Should have been aborted');
var startTime = +new Date();
var startTime;

var uploadFail = jasmine.createSpy().andCallFake(function(e) {
expect(e.code).toBe(FileTransferError.ABORT_ERR);
Expand All @@ -332,6 +332,7 @@ describe('FileTransfer', function() {
options.fileName = localFileName;
options.mimeType = "text/plain";

startTime = +new Date();
// removing options cause Android to timeout
ft.abort(); // should be a no-op.
ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
Expand Down

0 comments on commit 79dc8f3

Please sign in to comment.