CB-8931 Replace all slashes in windows path
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 40a4ccf..fe2dd8f 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -157,3 +157,39 @@
 * Error callback should always be called with the FileTransferError object, and not just the code
 * windows: alias appData to Windows.Storage.ApplicationData.current
 * CB-8093 Fixes incorrect FileTransferError returned in case of download failure
+
+### 1.0.0 (Apr 15, 2015)
+* CB-8746 bumped version of file dependency
+* CB-8746 gave plugin major version bump
+* CB-8641 Fixed tests to pass on windows and wp8
+* CB-8583 Forces download to overwrite existing target file
+* CB-8589 Fixes upload failure when server's response doesn't contain any data
+* CB-8747 updated dependency, added peer dependency
+* CB-8683 changed plugin-id to pacakge-name
+* CB-8653 properly updated translated docs to use new id
+* CB-8653 updated translated docs to use new id
+* Use TRAVIS_BUILD_DIR, install paramedic by npm
+* CB-8653 Updated Readme
+* CB-8654 Note WP8 download requests caching in docs
+* CB-8590 (Windows) Fixed download.onprogress.lengthComputable
+* CB-8566 Integrate TravisCI
+* CB-8438 cordova-plugin-file-transfer documentation translation: cordova-plugin-file-transfer
+* CB-8538 Added package.json file
+* CB-8495 Fixed wp8 and wp81 test failures
+* CB-7957 Adds support for `browser` platform
+* CB-8429 Updated version and RELEASENOTES.md for release 0.5.0 (take 2)
+* Fixes typo, introduced in https://github.com/apache/cordova-plugin-file-transfer/commit/bc43b46
+* CB-8407 Use File proxy to construct valid FileEntry for download success callback
+* CB-8407 Removes excess path to native path conversion in download method
+* CB-8429 Updated version and RELEASENOTES.md for release 0.5.0
+* CB-7957 Adds support for `browser` platform
+* CB-8095 Fixes JSHint and formatting issues
+* CB-8095 Updates tests and documentation
+* CB-8095 Rewrite upload method to support progress events properly
+* android: Fix error reporting for unknown uri type on sourceUri instead of targetUri
+
+### 1.1.0 (May 06, 2015)
+* CB-8951 Fixed crash related to headers parsing on **wp8**
+* CB-8933 Increased download and upload test timeout
+* CB-6313 **wp8**: Extra boundary in upload
+* CB-8761 **wp8**: Copy cookies from WebBrowser
diff --git a/package.json b/package.json
index 36421bd..589eab3 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
 {
   "name": "cordova-plugin-file-transfer",
-  "version": "0.5.1-dev",
+  "version": "1.1.1-dev",
   "description": "Cordova File Transfer Plugin",
   "cordova": {
-    "id": "org.apache.cordova.file-transfer",
+    "id": "cordova-plugin-file-transfer",
     "platforms": [
       "android",
       "amazon-fireos",
@@ -39,6 +39,9 @@
     "cordova-firefoxos",
     "cordova-browser"
   ],
+  "peerDependencies": {
+    "cordova-plugin-file": ">=2.0.0"
+  },
   "author": "Apache Software Foundation",
   "license": "Apache 2.0"
 }
diff --git a/plugin.xml b/plugin.xml
index 46868cf..0d2e168 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,8 +20,8 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    id="org.apache.cordova.file-transfer"
-    version="0.5.1-dev">
+    id="cordova-plugin-file-transfer"
+    version="1.1.1-dev">
     <name>File Transfer</name>
     <description>Cordova File Transfer Plugin</description>
     <license>Apache 2.0</license>
@@ -30,7 +30,7 @@
     <issue>https://issues.apache.org/jira/browse/CB/component/12320650</issue>
 
     <!-- dependency id="org.apache.cordova.file@1" /-->
-    <dependency id="org.apache.cordova.file" version=">=1.0.1" />
+    <dependency id="cordova-plugin-file" version=">=2.0.0" />
 
     <js-module src="www/FileTransferError.js" name="FileTransferError">
         <clobbers target="window.FileTransferError" />
diff --git a/src/ubuntu/file-transfer.cpp b/src/ubuntu/file-transfer.cpp
index 9c553eb..5b1adea 100644
--- a/src/ubuntu/file-transfer.cpp
+++ b/src/ubuntu/file-transfer.cpp
@@ -18,7 +18,7 @@
 */
 
 #include "file-transfer.h"
-#include <plugins/org.apache.cordova.file/file.h>
+#include <plugins/cordova-plugin-file/file.h>
 #include <cassert>
 
 static void SetHeaders(QNetworkRequest &request, const QVariantMap &headers) {
diff --git a/src/windows/FileTransferProxy.js b/src/windows/FileTransferProxy.js
index d11a026..c056839 100644
--- a/src/windows/FileTransferProxy.js
+++ b/src/windows/FileTransferProxy.js
@@ -24,10 +24,10 @@
 /*global module, require*/
 
 var FTErr = require('./FileTransferError'),
-    ProgressEvent = require('org.apache.cordova.file.ProgressEvent'),
-    FileUploadResult = require('org.apache.cordova.file.FileUploadResult'),
-    FileProxy = require('org.apache.cordova.file.FileProxy'),
-    FileEntry = require('org.apache.cordova.file.FileEntry');
+    ProgressEvent = require('cordova-plugin-file.ProgressEvent'),
+    FileUploadResult = require('cordova-plugin-file.FileUploadResult'),
+    FileProxy = require('cordova-plugin-file.FileProxy'),
+    FileEntry = require('cordova-plugin-file.FileEntry');
 
 var appData = Windows.Storage.ApplicationData.current;
 
@@ -161,11 +161,18 @@
                                 }
 
                                 var response = result.getResponseInformation();
-                                // creating a data reader, attached to response stream to get server's response
+                                var ftResult = new FileUploadResult(result.progress.bytesSent, response.statusCode, '');
+
+                                // if server's response doesn't contain any data, then resolve operation now
+                                if (result.progress.bytesReceived === 0) {
+                                    successCallback(ftResult);
+                                    return;
+                                }
+
+                                // otherwise create a data reader, attached to response stream to get server's response
                                 var reader = new Windows.Storage.Streams.DataReader(result.getResultStreamAt(0));
-                                reader.loadAsync(result.progress.bytesReceived).then(function(size) {
-                                    var responseText = reader.readString(size);
-                                    var ftResult = new FileUploadResult(size, response.statusCode, responseText);
+                                reader.loadAsync(result.progress.bytesReceived).then(function (size) {
+                                    ftResult.response = reader.readString(size);
                                     successCallback(ftResult);
                                     reader.close();
                                 });
@@ -268,7 +275,7 @@
         fileTransferOps[downloadId] = new FileTransferOperation(FileTransferOperation.PENDING, null);
 
         var downloadCallback = function(storageFolder) {
-            storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.generateUniqueName).then(function(storageFile) {
+            storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.replaceExisting).then(function(storageFile) {
 
                 // check if download isn't already cancelled
                 var downloadOp = fileTransferOps[downloadId];
diff --git a/src/wp/FileTransfer.cs b/src/wp/FileTransfer.cs
index 11db284..72f52fc 100644
--- a/src/wp/FileTransfer.cs
+++ b/src/wp/FileTransfer.cs
@@ -12,6 +12,7 @@
 	limitations under the License.
 */
 
+using Microsoft.Phone.Controls;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -21,6 +22,7 @@
 using System.Windows;
 using System.Security;
 using System.Diagnostics;
+using System.Threading.Tasks;
 
 namespace WPCordovaClassLib.Cordova.Commands
 {
@@ -86,6 +88,10 @@
 
         private static Dictionary<string, DownloadRequestState> InProcDownloads = new Dictionary<string,DownloadRequestState>();
 
+        // Private instance of the main WebBrowser instance
+        // NOTE: Any access to this object needs to occur on the UI thread via the Dispatcher
+        private WebBrowser browser;
+
         /// <summary>
         /// Uploading response info
         /// </summary>
@@ -210,6 +216,80 @@
         }
 
         /// <summary>
+        /// Helper method to copy all relevant cookies from the WebBrowser control into a header on
+        /// the HttpWebRequest
+        /// </summary>
+        /// <param name="browser">The source browser to copy the cookies from</param>
+        /// <param name="webRequest">The destination HttpWebRequest to add the cookie header to</param>
+        /// <returns>Nothing</returns>
+        private async Task CopyCookiesFromWebBrowser(HttpWebRequest webRequest)
+        {
+            var tcs = new TaskCompletionSource<object>();
+
+            // Accessing WebBrowser needs to happen on the UI thread
+            Deployment.Current.Dispatcher.BeginInvoke(() =>
+            {
+                // Get the WebBrowser control
+                if (this.browser == null)
+                {
+                    PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+                    if (frame != null)
+                    {
+                        PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
+                        if (page != null)
+                        {
+                            CordovaView cView = page.FindName("CordovaView") as CordovaView;
+                            if (cView != null)
+                            {
+                                this.browser = cView.Browser;
+                            }
+                        }
+                    }
+                }
+
+                try
+                {
+                    // Only copy the cookies if the scheme and host match (to avoid any issues with secure/insecure cookies)
+                    // NOTE: since the returned CookieCollection appears to munge the original cookie's domain value in favor of the actual Source domain,
+                    // we can't know for sure whether the cookies would be applicable to any other hosts, so best to play it safe and skip for now.
+                    if (this.browser != null && this.browser.Source.IsAbsoluteUri == true &&
+                        this.browser.Source.Scheme == webRequest.RequestUri.Scheme && this.browser.Source.Host == webRequest.RequestUri.Host)
+                    {
+                        string cookieHeader = "";
+                        string requestPath = webRequest.RequestUri.PathAndQuery;
+                        CookieCollection cookies = this.browser.GetCookies();
+
+                        // Iterate over the cookies and add to the header
+                        foreach (Cookie cookie in cookies)
+                        {
+                            // Check that the path is allowed, first
+                            // NOTE: Path always seems to be empty for now, even if the cookie has a path set by the server.
+                            if (cookie.Path.Length == 0 || requestPath.IndexOf(cookie.Path, StringComparison.InvariantCultureIgnoreCase) == 0)
+                            {
+                                cookieHeader += cookie.Name + "=" + cookie.Value + "; ";
+                            }
+                        }
+
+                        // Finally, set the header if we found any cookies
+                        if (cookieHeader.Length > 0)
+                        {
+                            webRequest.Headers["Cookie"] = cookieHeader;
+                        }
+                    }
+                }
+                catch (Exception)
+                {
+                    // Swallow the exception
+                }
+
+                // Complete the task
+                tcs.SetResult(Type.Missing);
+            });
+
+            await tcs.Task;
+        }
+
+        /// <summary>
         /// Upload options
         /// </summary>
         //private TransferOptions uploadOptions;
@@ -224,7 +304,7 @@
         /// </summary>
         /// <param name="options">Upload options</param>
         /// exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]);
-        public void upload(string options)
+        public async void upload(string options)
         {
             options = options.Replace("{}", ""); // empty objects screw up the Deserializer
             string callbackId = "";
@@ -283,12 +363,19 @@
                 webRequest.ContentType = "multipart/form-data; boundary=" + Boundary;
                 webRequest.Method = uploadOptions.Method;
 
+                // Associate cookies with the request
+                // This is an async call, so we need to await it in order to preserve proper control flow
+                await CopyCookiesFromWebBrowser(webRequest);
+
                 if (!string.IsNullOrEmpty(uploadOptions.Headers))
                 {
                     Dictionary<string, string> headers = parseHeaders(uploadOptions.Headers);
-                    foreach (string key in headers.Keys)
+                    if (headers != null)
                     {
-                        webRequest.Headers[key] = headers[key];
+                        foreach (string key in headers.Keys)
+                        {
+                            webRequest.Headers[key] = headers[key];
+                        }
                     }
                 }
 
@@ -341,7 +428,7 @@
             return null;
         }
 
-        public void download(string options)
+        public async void download(string options)
         {
             TransferOptions downloadOptions = null;
             HttpWebRequest webRequest = null;
@@ -475,12 +562,19 @@
                 state.request = webRequest;
                 InProcDownloads[downloadOptions.Id] = state;
 
+                // Associate cookies with the request
+                // This is an async call, so we need to await it in order to preserve proper control flow
+                await CopyCookiesFromWebBrowser(webRequest);
+
                 if (!string.IsNullOrEmpty(downloadOptions.Headers))
                 {
                     Dictionary<string, string> headers = parseHeaders(downloadOptions.Headers);
-                    foreach (string key in headers.Keys)
+                    if (headers != null)
                     {
-                        webRequest.Headers[key] = headers[key];
+                        foreach (string key in headers.Keys)
+                        {
+                            webRequest.Headers[key] = headers[key];
+                        }
                     }
                 }
 
@@ -513,7 +607,7 @@
             string id = optionStrings[0];
             string callbackId = optionStrings[1];
 
-            if (InProcDownloads.ContainsKey(id))
+            if (id != null && InProcDownloads.ContainsKey(id))
             {
                 DownloadRequestState state = InProcDownloads[id];
                 if (!state.isCancelled)
@@ -730,7 +824,6 @@
                             byte[] formItemBytes = System.Text.Encoding.UTF8.GetBytes(formItem);
                             requestStream.Write(formItemBytes, 0, formItemBytes.Length);
                         }
-                        requestStream.Write(boundaryBytes, 0, boundaryBytes.Length);
                     }
                     using (IsolatedStorageFile isoFile = IsolatedStorageFile.GetUserStoreForApplication())
                     {
diff --git a/tests/plugin.xml b/tests/plugin.xml
index d3c1f8f..4fffc0f 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -20,8 +20,8 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    id="org.apache.cordova.file-transfer.tests"
-    version="0.5.1-dev">
+    id="cordova-plugin-file-transfer-tests"
+    version="1.1.1-dev">
     <name>Cordova File Transfer Plugin Tests</name>
     <license>Apache 2.0</license>
 
diff --git a/tests/tests.js b/tests/tests.js
index 682ccc9..596f040 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -28,10 +28,13 @@
 exports.defineAutoTests = function () {
 
     // constants
-    var GRACE_TIME_DELTA = 300; // in milliseconds
+    var GRACE_TIME_DELTA = 600; // in milliseconds
     var DEFAULT_FILESYSTEM_SIZE = 1024*50; //filesystem size in bytes
     var UNKNOWN_HOST = "http://foobar.apache.org";
     var HEADERS_ECHO = "http://whatheaders.com"; // NOTE: this site is very useful!
+    var DOWNLOAD_TIMEOUT = 2 * 60 * 1000; // download tests sometimes need a higher timeout to complete successfully
+    var UPLOAD_TIMEOUT = 2 * 60 * 1000; // upload tests sometimes need a higher timeout to complete successfully
+    var ABORT_DELAY = 100; // for abort() tests
 
     // config for upload test server
     // NOTE:
@@ -305,7 +308,7 @@
             //         - 'httpssss://example.com'
             //         - 'apache.org', with subdomains="true"
             //         - 'cordova-filetransfer.jitsu.com'
-            describe('download', function() {
+            describe('download', function () {
 
                 // helpers
                 var verifyDownload = function (fileEntry) {
@@ -317,6 +320,10 @@
                     deleteFile(root, fileName, done);
                 });
 
+                it('ensures that test file does not exist', function (done) {
+                    deleteFile(root, fileName, done);
+                });
+
                 it('filetransfer.spec.4 should download a file', function (done) {
 
                     var fileURL = SERVER + '/robots.txt';
@@ -342,7 +349,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it('filetransfer.spec.5 should download a file using http basic auth', function (done) {
 
@@ -354,7 +361,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it('filetransfer.spec.6 should get 401 status on http basic auth failure', function (done) {
 
@@ -368,8 +375,13 @@
                         done();
                     };
 
-                    transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                });
+                    transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail, null,
+                        {
+                            headers: {
+                                'If-Modified-Since': 'Thu, 19 Mar 2015 00:00:00 GMT'
+                            }
+                        });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.7 should download a file using file:// (when hosted from file://)", function (done) {
 
@@ -394,7 +406,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.8 should download a file using https://", function (done) {
 
@@ -419,15 +431,17 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.11 should call the error callback on abort()", function (done) {
 
                     var fileURL = 'http://cordova.apache.org/downloads/BlueZedEx.mp3';
 
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, done);
-                    transfer.abort();
-                });
+                    setTimeout(function() {
+                        transfer.abort();
+                    }, ABORT_DELAY);
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.9 should not leave partial file due to abort", function (done) {
 
@@ -452,7 +466,7 @@
                     spyOn(transfer, 'onprogress').and.callThrough();
 
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.10 should be stopped by abort() right away", function (done) {
 
@@ -472,13 +486,15 @@
                     };
 
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                    transfer.abort();
+                    setTimeout(function() {
+                        transfer.abort();
+                    }, ABORT_DELAY);
 
                     // call abort() again, after a time greater than the grace period
                     setTimeout(function () {
                         expect(transfer.abort).not.toThrow();
                     }, GRACE_TIME_DELTA);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.12 should get http status on failure", function (done) {
 
@@ -493,7 +509,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.13 should get http body on failure", function (done) {
 
@@ -511,7 +527,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.14 should handle malformed urls", function (done) {
 
@@ -531,33 +547,19 @@
                     transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
                 });
 
-                describe('unknown host:', function () {
-                    var originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+                it("filetransfer.spec.15 should handle unknown host", function (done) {
+                    var fileURL = UNKNOWN_HOST;
 
-                    beforeEach(function() {
-                        jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
-                    });
+                    var downloadFail = function (error) {
+                        expect(error.code).toBe(FileTransferError.CONNECTION_ERR);
+                        done();
+                    };
 
-                    afterEach(function() {
-                        jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
-                    });
+                    // turn off the onprogress handler
+                    transfer.onprogress = function () {};
 
-                    it("filetransfer.spec.15 should handle unknown host", function (done) {
-
-                        var fileURL = UNKNOWN_HOST;
-
-                        var downloadFail = function (error) {
-                            expect(error.code).toBe(FileTransferError.CONNECTION_ERR);
-                            done();
-                        };
-
-                        // turn off the onprogress handler
-                        transfer.onprogress = function () {};
-
-                        transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
-                    });                    
-                });
-                
+                    transfer.download(fileURL, localFilePath, unexpectedCallbacks.httpWin, downloadFail);
+                }, 30000);
 
                 it("filetransfer.spec.16 should handle bad file path", function (done) {
                     var fileURL = SERVER;
@@ -580,7 +582,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.30 downloaded file entries should have a toNativeURL method", function (done) {
 
@@ -613,7 +615,7 @@
                     };
 
                     transfer.download(fileURL, localFilePath, downloadWin, unexpectedCallbacks.httpFail);
-                });
+                }, DOWNLOAD_TIMEOUT);
 
                 it("filetransfer.spec.28 (compatibility) should be able to download a file using local paths", function (done) {
 
@@ -721,7 +723,7 @@
 
                     // NOTE: removing uploadOptions cause Android to timeout
                     transfer.upload(localFilePath, fileURL, uploadWin, unexpectedCallbacks.httpFail, uploadOptions);
-                });
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.19 should be able to upload a file with http basic auth", function (done) {
 
@@ -734,7 +736,7 @@
 
                     // NOTE: removing uploadOptions cause Android to timeout
                     transfer.upload(localFilePath, fileURL, uploadWin, unexpectedCallbacks.httpFail, uploadOptions);
-                });
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.21 should be stopped by abort() right away", function (done) {
 
@@ -757,15 +759,17 @@
 
                         // NOTE: removing uploadOptions cause Android to timeout
                         transfer.upload(localFilePath, fileURL, unexpectedCallbacks.httpWin, uploadFail, uploadOptions);
-                        transfer.abort();
+                        setTimeout(function() {
+                            transfer.abort();
+                        }, ABORT_DELAY);
 
                         setTimeout(function () {
                             expect(transfer.abort).not.toThrow();
                         }, GRACE_TIME_DELTA);
                     };
 
-                    writeFile(root, fileName, new Array(10000).join('aborttest!'), fileWin);
-                });
+                    writeFile(root, fileName, new Array(100000).join('aborttest!'), fileWin);
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.22 should get http status and body on failure", function (done) {
 
@@ -778,7 +782,7 @@
                     };
 
                     transfer.upload(localFilePath, fileURL, unexpectedCallbacks.httpWin, uploadFail, uploadOptions);
-                });
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.24 should handle malformed urls", function (done) {
 
@@ -804,7 +808,7 @@
                     };
 
                     transfer.upload(localFilePath, fileURL, unexpectedCallbacks.httpWin, uploadFail, {});
-                });
+                }, 30000); // unknown host may need quite some time on some devices
 
                 it("filetransfer.spec.25 should handle missing file", function (done) {
 
@@ -817,7 +821,7 @@
                     };
 
                     transfer.upload('does_not_exist.txt', fileURL, unexpectedCallbacks.httpWin, uploadFail);
-                });
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.26 should handle bad file path", function (done) {
 
@@ -860,7 +864,7 @@
 
                     // NOTE: removing uploadOptions cause Android to timeout
                     transfer.upload(localFilePath, fileURL, uploadWin, unexpectedCallbacks.httpFail, uploadOptions);
-                });
+                }, UPLOAD_TIMEOUT);
 
                 it("filetransfer.spec.29 (compatibility) should be able to upload a file using local paths", function (done) {
 
@@ -890,7 +894,7 @@
                     cordova.exec(function (localPath) {
                         transfer.upload(localPath, fileURL, uploadWin, unexpectedCallbacks.httpFail, uploadOptions);
                     }, unsupported, 'File', '_getLocalFilesystemPath', [internalFilePath]);
-                });
+                }, UPLOAD_TIMEOUT);
             });
         });
     });
diff --git a/www/FileTransfer.js b/www/FileTransfer.js
index 17fb782..0a4c773 100644
--- a/www/FileTransfer.js
+++ b/www/FileTransfer.js
@@ -22,7 +22,7 @@
 var argscheck = require('cordova/argscheck'),
     exec = require('cordova/exec'),
     FileTransferError = require('./FileTransferError'),
-    ProgressEvent = require('org.apache.cordova.file.ProgressEvent');
+    ProgressEvent = require('cordova-plugin-file.ProgressEvent');
 
 function newProgressEvent(result) {
     var pe = new ProgressEvent();
@@ -178,10 +178,10 @@
         } else if (successCallback) {
             var entry = null;
             if (result.isDirectory) {
-                entry = new (require('org.apache.cordova.file.DirectoryEntry'))();
+                entry = new (require('cordova-plugin-file.DirectoryEntry'))();
             }
             else if (result.isFile) {
-                entry = new (require('org.apache.cordova.file.FileEntry'))();
+                entry = new (require('cordova-plugin-file.FileEntry'))();
             }
             entry.isDirectory = result.isDirectory;
             entry.isFile = result.isFile;
diff --git a/www/blackberry10/FileTransferProxy.js b/www/blackberry10/FileTransferProxy.js
index 438999a..a363f07 100644
--- a/www/blackberry10/FileTransferProxy.js
+++ b/www/blackberry10/FileTransferProxy.js
@@ -25,7 +25,7 @@
  * Register all FileTransfer exec calls to be handled by proxy
  */
 
-var xhrFileTransfer = require('org.apache.cordova.file-transfer.xhrFileTransfer');
+var xhrFileTransfer = require('cordova-plugin-file-transfer.xhrFileTransfer');
 
 module.exports = {
     abort: xhrFileTransfer.abort,
diff --git a/www/blackberry10/xhrFileTransfer.js b/www/blackberry10/xhrFileTransfer.js
index 87c8ec0..7eba7af 100644
--- a/www/blackberry10/xhrFileTransfer.js
+++ b/www/blackberry10/xhrFileTransfer.js
@@ -21,8 +21,8 @@
 
 /*global Blob:false */
 var cordova = require('cordova'),
-    resolve = cordova.require('org.apache.cordova.file.resolveLocalFileSystemURIProxy'),
-    requestAnimationFrame = cordova.require('org.apache.cordova.file.bb10RequestAnimationFrame'),
+    resolve = cordova.require('cordova-plugin-file.resolveLocalFileSystemURIProxy'),
+    requestAnimationFrame = cordova.require('cordova-plugin-file.bb10RequestAnimationFrame'),
     xhr = {};
 
 function getParentPath(filePath) {