You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2013/06/28 21:03:58 UTC

[2/2] js commit: [CB-3193] [BlackBerry10] Remove all plugins from cordova-js

[CB-3193] [BlackBerry10] Remove all plugins from cordova-js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/6e48845d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/6e48845d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/6e48845d

Branch: refs/heads/3.0.0
Commit: 6e48845d8ccc4338b7d2ad4e166f4d9aeee3c86e
Parents: 8210bc1
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Fri Jun 28 15:06:57 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Fri Jun 28 15:06:57 2013 -0400

----------------------------------------------------------------------
 .gitignore                                      |   1 +
 lib/blackberry10/exec.js                        |  15 +-
 lib/blackberry10/platform.js                    |   7 +-
 lib/blackberry10/plugin/.gitkeep                |   0
 lib/blackberry10/plugin/FileTransfer.js         | 187 -------
 .../plugin/blackberry10/InAppBrowser.js         |  86 ---
 lib/blackberry10/plugin/blackberry10/capture.js |  76 ---
 lib/blackberry10/plugin/blackberry10/compass.js | 162 ------
 lib/blackberry10/plugin/blackberry10/event.js   | 102 ----
 .../plugin/blackberry10/exception.js            |  74 ---
 .../plugin/blackberry10/fileTransfer.js         | 201 -------
 .../plugin/blackberry10/fileUtils.js            |  47 --
 .../plugin/blackberry10/magnetometer.js         |  45 --
 lib/blackberry10/plugin/blackberry10/media.js   | 189 -------
 lib/blackberry10/plugin/blackberry10/utils.js   | 556 -------------------
 lib/blackberry10/plugin/blackberry10/vibrate.js |  31 --
 lib/scripts/bootstrap-blackberry10.js           |   7 +-
 test/blackberry10/test.capture.js               | 222 --------
 test/blackberry10/test.compass.js               |  61 --
 test/blackberry10/test.event.js                 | 188 -------
 test/blackberry10/test.magnetometer.js          |  80 ---
 21 files changed, 6 insertions(+), 2331 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 7522d0d..2291753 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ pkg/
 tags
 .DS_Store
 node_modules/
+.gitkeep

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/exec.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/exec.js b/lib/blackberry10/exec.js
index efa3729..57aef49 100644
--- a/lib/blackberry10/exec.js
+++ b/lib/blackberry10/exec.js
@@ -19,14 +19,6 @@
  *
 */
 
-var cordova = require('cordova'),
-    plugins = {
-        'Compass' : require('cordova/plugin/blackberry10/magnetometer'),
-        'Capture' : require('cordova/plugin/blackberry10/capture'),
-        'Media': require('cordova/plugin/blackberry10/media'),
-        'FileTransfer': require('cordova/plugin/blackberry10/fileTransfer')
-    };
-
 /**
  * Execute a cordova command.  It is up to the native side whether this action
  * is synchronous or asynchronous.  The native side can return:
@@ -41,9 +33,4 @@ var cordova = require('cordova'),
  * @param {String} action       Action to be run in cordova
  * @param {String[]} [args]     Zero or more arguments to pass to the method
  */
-module.exports = function (success, fail, service, action, args) {
-    if (plugins[service] && plugins[service][action]) {
-        return plugins[service][action](args, success, fail);
-    }
-    return webworks.exec(success, fail, service, action, args);
-};
+module.exports = webworks.exec;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/platform.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/platform.js b/lib/blackberry10/platform.js
index 0b15ca1..007c06e 100644
--- a/lib/blackberry10/platform.js
+++ b/lib/blackberry10/platform.js
@@ -28,11 +28,6 @@ module.exports = {
 
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
         modulemapper.loadMatchingModules(new RegExp('cordova/blackberry10/.*bbsymbols$'));
-
-        modulemapper.clobbers('cordova/plugin/blackberry10/vibrate', 'navigator.notification.vibrate');
-        modulemapper.clobbers('cordova/plugin/File', 'File');
-        modulemapper.merges('cordova/plugin/blackberry10/compass', 'navigator.compass');
-
         modulemapper.mapModules(window);
 
         //override to pass online/offline events to window
@@ -42,6 +37,6 @@ module.exports = {
             } else {
                 addDocumentEventListener.apply(document, arguments);
             }
-        }
+        };
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/.gitkeep
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/.gitkeep b/lib/blackberry10/plugin/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/FileTransfer.js b/lib/blackberry10/plugin/FileTransfer.js
deleted file mode 100644
index 09b9d5f..0000000
--- a/lib/blackberry10/plugin/FileTransfer.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec'),
-    FileTransferError = require('cordova/plugin/FileTransferError');
-
-function getBasicAuthHeader(urlString) {
-    var header =  null;
-
-    if (window.btoa) {
-        // parse the url using the Location object
-        var url = document.createElement('a');
-        url.href = urlString;
-
-        var credentials = null;
-        var protocol = url.protocol + "//";
-        var origin = protocol + url.host;
-
-        // check whether there are the username:password credentials in the url
-        if (url.href.indexOf(origin) !== 0) { // credentials found
-            var atIndex = url.href.indexOf("@");
-            credentials = url.href.substring(protocol.length, atIndex);
-        }
-
-        if (credentials) {
-            var authHeader = "Authorization";
-            var authHeaderValue = "Basic " + window.btoa(credentials);
-
-            header = {
-                name : authHeader,
-                value : authHeaderValue
-            };
-        }
-    }
-
-    return header;
-}
-
-var idCounter = 0;
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {
-    this._id = ++idCounter;
-    this.onprogress = null; // optional callback
-};
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String}           Full path of the file on the device
-* @param server {String}             URL of the server to receive the file
-* @param successCallback (Function}  Callback to be invoked when upload has completed
-* @param errorCallback {Function}    Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {
-    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);
-    // check for options
-    var fileKey = null;
-    var fileName = null;
-    var mimeType = null;
-    var params = null;
-    var chunkedMode = true;
-    var headers = null;
-    var httpMethod = null;
-    var basicAuthHeader = getBasicAuthHeader(server);
-    if (basicAuthHeader) {
-        options = options || {};
-        options.headers = options.headers || {};
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    if (options) {
-        fileKey = options.fileKey;
-        fileName = options.fileName;
-        mimeType = options.mimeType;
-        headers = options.headers;
-        httpMethod = options.httpMethod || "POST";
-        if (httpMethod.toUpperCase() == "PUT"){
-            httpMethod = "PUT";
-        } else {
-            httpMethod = "POST";
-        }
-        if (options.chunkedMode !== null || typeof options.chunkedMode != "undefined") {
-            chunkedMode = options.chunkedMode;
-        }
-        if (options.params) {
-            params = options.params;
-        }
-        else {
-            params = {};
-        }
-    }
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
-        errorCallback(error);
-    };
-
-    var self = this;
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                self.onprogress(result);
-            }
-        } else {
-            successCallback && successCallback(result);
-        }
-    };
-    exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String}          URL of the server to receive the file
- * @param target {String}         Full path of the file on the device
- * @param successCallback (Function}  Callback to be invoked when upload has completed
- * @param errorCallback {Function}    Callback to be invoked upon error
- * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
- * @param options {FileDownloadOptions} Optional parameters such as headers
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
-    argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
-    var self = this;
-
-    var basicAuthHeader = getBasicAuthHeader(source);
-    if (basicAuthHeader) {
-        options = options || {};
-        options.headers = options.headers || {};
-        options.headers[basicAuthHeader.name] = basicAuthHeader.value;
-    }
-
-    var headers = null;
-    if (options) {
-        headers = options.headers || null;
-    }
-
-    var win = function(result) {
-        if (typeof result.lengthComputable != "undefined") {
-            if (self.onprogress) {
-                return self.onprogress(result);
-            }
-        } else if (successCallback) {
-            successCallback(result);
-        }
-    };
-
-    var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
-        errorCallback(error);
-    };
-
-    exec(win, fail, 'FileTransfer', 'download', [source, target, trustAllHosts, this._id, headers]);
-};
-
-/**
- * Aborts the ongoing file transfer on this object. The original error
- * callback for the file transfer will be called if necessary.
- */
-FileTransfer.prototype.abort = function() {
-    exec(null, null, 'FileTransfer', 'abort', [this._id]);
-};
-
-module.exports = FileTransfer;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/InAppBrowser.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/InAppBrowser.js b/lib/blackberry10/plugin/blackberry10/InAppBrowser.js
deleted file mode 100644
index e42a293..0000000
--- a/lib/blackberry10/plugin/blackberry10/InAppBrowser.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var cordova = require('cordova'),
-    modulemapper = require('cordova/modulemapper'),
-    origOpen = modulemapper.getOriginalSymbol(window, 'open'),
-    browser = {
-        close: function () { } //dummy so we don't have to check for undefined
-    };
-
-var navigate = {
-    "_blank": function (url, whitelisted) {
-        return origOpen(url, "_blank");
-    },
-
-    "_self": function (url, whitelisted) {
-        if (whitelisted) {
-            window.location.href = url;
-            return window;
-        }
-        else {
-            return origOpen(url, "_blank");
-        }
-    },
-
-    "_system": function (url, whitelisted) {
-        blackberry.invoke.invoke({
-            target: "sys.browser",
-            uri: url
-        }, function () {}, function () {});
-
-        return {
-            close: function () { }
-        };
-    }
-};
-
-module.exports = {
-    open: function (args, win, fail) {
-        var url = args[0],
-            target = args[1] || '_self',
-            a = document.createElement('a');
-
-        //Make all URLs absolute
-        a.href = url;
-        url = a.href;
-
-        switch (target) {
-            case '_self':
-            case '_system':
-            case '_blank':
-                break;
-            default:
-                target = '_blank';
-                break;
-        }
-
-        webworks.exec(function (whitelisted) {
-            browser = navigate[target](url, whitelisted);
-        }, fail, "org.apache.cordova", "isWhitelisted", [url], true);
-
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "" };
-    },
-    close: function (args, win, fail) {
-        browser.close();
-        return { "status" : cordova.callbackStatus.OK, "message" : "" };
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/capture.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/capture.js b/lib/blackberry10/plugin/blackberry10/capture.js
deleted file mode 100644
index 3c8f1cb..0000000
--- a/lib/blackberry10/plugin/blackberry10/capture.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var cordova = require('cordova');
-
-function capture(action, win, fail) {
-    var noop = function () {};
-
-    blackberry.invoke.card.invokeCamera(action, function (path) {
-        var sb = blackberry.io.sandbox;
-        blackberry.io.sandbox = false;
-        window.webkitRequestFileSystem(window.PERSISTENT, 1024, function (fs) {
-            fs.root.getFile(path, {}, function (fe) {
-                fe.file(function (file) {
-                    file.fullPath = fe.fullPath;
-                    win([file]);
-                    blackberry.io.sandbox = sb;
-                }, fail);
-            }, fail);
-        }, fail);
-    }, noop, noop);
-}
-
-module.exports = {
-    getSupportedAudioModes: function (args, win, fail) {
-        return {"status": cordova.callbackStatus.OK, "message": []};
-    },
-    getSupportedImageModes: function (args, win, fail) {
-        return {"status": cordova.callbackStatus.OK, "message": []};
-    },
-    getSupportedVideoModes: function (args, win, fail) {
-        return {"status": cordova.callbackStatus.OK, "message": []};
-    },
-    captureImage: function (args, win, fail) {
-        if (args[0].limit > 0) {
-            capture("photo", win, fail);
-        }
-        else {
-            win([]);
-        }
-
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
-    },
-    captureVideo: function (args, win, fail) {
-        if (args[0].limit > 0) {
-            capture("video", win, fail);
-        }
-        else {
-            win([]);
-        }
-
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
-    },
-    captureAudio: function (args, win, fail) {
-        fail("Capturing Audio not supported");
-        return {"status": cordova.callbackStatus.NO_RESULT, "message": "WebWorks Is On It"};
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/compass.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/compass.js b/lib/blackberry10/plugin/blackberry10/compass.js
deleted file mode 100644
index 061ceb5..0000000
--- a/lib/blackberry10/plugin/blackberry10/compass.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var exec = require('cordova/exec'),
-    utils = require('cordova/utils'),
-    CompassHeading = require('cordova/plugin/CompassHeading'),
-    CompassError = require('cordova/plugin/CompassError'),
-    timers = {},
-    listeners = [],
-    heading = null,
-    running = false,
-    start = function () {
-        exec(function (result) {
-            heading = new CompassHeading(result.magneticHeading, result.trueHeading, result.headingAccuracy, result.timestamp);
-            listeners.forEach(function (l) {
-                l.win(heading);
-            });
-        }, function (e) {
-            listeners.forEach(function (l) {
-                l.fail(e);
-            });
-        },
-        "Compass", "start", []);
-        running = true;
-    },
-    stop = function () {
-        exec(null, null, "Compass", "stop", []);
-        running = false;
-    },
-    createCallbackPair = function (win, fail) {
-        return {win:win, fail:fail};
-    },
-    removeListeners = function (l) {
-        var idx = listeners.indexOf(l);
-        if (idx > -1) {
-            listeners.splice(idx, 1);
-            if (listeners.length === 0) {
-                stop();
-            }
-        }
-    },
-    compass = {
-        /**
-         * Asynchronously acquires the current heading.
-         * @param {Function} successCallback The function to call when the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {CompassOptions} options The options for getting the heading data (not used).
-         */
-        getCurrentHeading:function(successCallback, errorCallback, options) {
-            if (typeof successCallback !== "function") {
-                throw "getCurrentHeading must be called with at least a success callback function as first parameter.";
-            }
-
-            var p;
-            var win = function(a) {
-                removeListeners(p);
-                successCallback(a);
-            };
-            var fail = function(e) {
-                removeListeners(p);
-                errorCallback(e);
-            };
-
-            p = createCallbackPair(win, fail);
-            listeners.push(p);
-
-            if (!running) {
-                start();
-            }
-        },
-
-        /**
-         * Asynchronously acquires the heading repeatedly at a given interval.
-         * @param {Function} successCallback The function to call each time the heading
-         * data is available
-         * @param {Function} errorCallback The function to call when there is an error
-         * getting the heading data.
-         * @param {HeadingOptions} options The options for getting the heading data
-         * such as timeout and the frequency of the watch. For iOS, filter parameter
-         * specifies to watch via a distance filter rather than time.
-         */
-        watchHeading:function(successCallback, errorCallback, options) {
-            var frequency = (options !== undefined && options.frequency !== undefined) ? options.frequency : 100;
-            var filter = (options !== undefined && options.filter !== undefined) ? options.filter : 0;
-
-            // successCallback required
-            if (typeof successCallback !== "function") {
-              console.log("Compass Error: successCallback is not a function");
-              return;
-            }
-
-            // errorCallback optional
-            if (errorCallback && (typeof errorCallback !== "function")) {
-              console.log("Compass Error: errorCallback is not a function");
-              return;
-            }
-            // Keep reference to watch id, and report heading readings as often as defined in frequency
-            var id = utils.createUUID();
-
-            var p = createCallbackPair(function(){}, function(e) {
-                removeListeners(p);
-                errorCallback(e);
-            });
-            listeners.push(p);
-
-            timers[id] = {
-                timer:window.setInterval(function() {
-                    if (heading) {
-                        successCallback(heading);
-                    }
-                }, frequency),
-                listeners:p
-            };
-
-            if (running) {
-                // If we're already running then immediately invoke the success callback
-                // but only if we have retrieved a value, sample code does not check for null ...
-                if(heading) {
-                    successCallback(heading);
-                }
-            } else {
-                start();
-            }
-
-            return id;
-        },
-
-        /**
-         * Clears the specified heading watch.
-         * @param {String} watchId The ID of the watch returned from #watchHeading.
-         */
-        clearWatch:function(id) {
-            // Stop javascript timer & remove from timer list
-            if (id && timers[id]) {
-                window.clearInterval(timers[id].timer);
-                removeListeners(timers[id].listeners);
-                delete timers[id];
-            }
-        }
-    };
-
-module.exports = compass;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/event.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/event.js b/lib/blackberry10/plugin/blackberry10/event.js
deleted file mode 100644
index 9e91fe4..0000000
--- a/lib/blackberry10/plugin/blackberry10/event.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var _handlers = {};
-
-function _add(featureId, name, cb, success, fail, once) {
-    var handler;
-    if (featureId && name && typeof cb === "function") {
-        handler = {
-            func: cb,
-            once: !!once
-        };
-        //If this is the first time we are adding a cb
-        if (!_handlers.hasOwnProperty(name)) {
-            _handlers[name] = [handler];
-            //Once listeners should not be registered with the context because there is no underlying event to call them
-            //HOWEVER the webview needs to register itself with lib/event.
-            if (once) {
-                window.webworks.exec(success, fail, "event", "once", {"eventName": name});
-            } else {
-                window.webworks.exec(success, fail, featureId, "add", {"eventName": name});
-            }
-        } else if (!_handlers[name].some(function (element, index, array) {
-            return element.func === cb;
-        })) {
-            //Only add unique callbacks
-            _handlers[name].push(handler);
-        }
-    }
-}
-
-module.exports = {
-    add: function (featureId, name, cb, success, fail) {
-        _add(featureId, name, cb, success, fail, false);
-    },
-
-    once: function (featureId, name, cb, success, fail) {
-        _add(featureId, name, cb, success, fail, true);
-    },
-
-    isOn: function (name) {
-        return !!_handlers[name];
-    },
-
-    remove: function (featureId, name, cb, success, fail) {
-        if (featureId && name && typeof cb === "function") {
-            if (_handlers.hasOwnProperty(name)) {
-                _handlers[name] = _handlers[name].filter(function (element, index, array) {
-                    return element.func !== cb || element.once;
-                });
-
-                if (_handlers[name].length === 0) {
-                    delete _handlers[name];
-                    window.webworks.exec(success, fail, featureId, "remove", {"eventName": name});
-                }
-            }
-        }
-    },
-
-    trigger: function (name, args) {
-        var parsedArgs;
-        if (_handlers.hasOwnProperty(name)) {
-            if (args && args !== "undefined") {
-                parsedArgs = JSON.parse(decodeURIComponent(unescape(args)));
-            }
-            //Call the handlers
-            _handlers[name].forEach(function (handler) {
-                if (handler) {
-                    //args should be an array of arguments
-                    handler.func.apply(undefined, parsedArgs);
-                }
-            });
-            //Remove the once listeners
-            _handlers[name] = _handlers[name].filter(function (handler) {
-                return !handler.once;
-            });
-            //Clean up the array if it is empty
-            if (_handlers[name].length === 0) {
-                delete _handlers[name];
-                //No need to call remove since this would only be for callbacks
-            }
-        }
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/exception.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/exception.js b/lib/blackberry10/plugin/blackberry10/exception.js
deleted file mode 100644
index 515d46d..0000000
--- a/lib/blackberry10/plugin/blackberry10/exception.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-module.exports = {
-
-    types: {
-        Application: "Application",
-        ArgumentLength: "ArgumentLength",
-        ArgumentType: "ArgumentType",
-        Argument: "Argument",
-        NotificationType: "NotificationType",
-        NotificationStateType: "NotificationStateType",
-        DomObjectNotFound: "DomObjectNotFound",
-        MethodNotImplemented: "MethodNotImplemented",
-        InvalidState: "InvalidState",
-        ApplicationState: "ApplicationState"
-    },
-
-    handle: function handle(exception, reThrow) {
-        reThrow = reThrow || false;
-
-        var eMsg = exception.message || "exception caught!",
-        msg = eMsg + "\n\n" + (exception.stack || "*no stack provided*") + "\n\n";
-
-        console.error(msg);
-
-        if (reThrow) {
-            throw exception;
-        }
-    },
-
-    raise: function raise(exceptionType, message, customExceptionObject) {
-        var obj = customExceptionObject || {
-                type: "",
-                message: "",
-
-                toString: function () {
-                    var result = this.name + ': "' + this.message + '"';
-
-                    if (this.stack) {
-                        result += "\n" + this.stack;
-                    }
-                    return result;
-                }
-            };
-
-        message = message || "";
-
-        obj.name = exceptionType;
-        obj.type = exceptionType;
-        // TODO: include the exception objects original message if exists
-        obj.message = message;
-
-        throw obj;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/fileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/fileTransfer.js b/lib/blackberry10/plugin/blackberry10/fileTransfer.js
deleted file mode 100644
index b4756b3..0000000
--- a/lib/blackberry10/plugin/blackberry10/fileTransfer.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/*global Blob:false */
-var cordova = require('cordova'),
-    nativeResolveLocalFileSystemURI = function(uri, success, fail) {
-        if (uri.substring(0,11) !== "filesystem:") {
-            uri = "filesystem:" + uri;
-        }
-        resolveLocalFileSystemURI(uri, success, fail);
-    },
-    xhr;
-
-function getParentPath(filePath) {
-    var pos = filePath.lastIndexOf('/');
-    return filePath.substring(0, pos + 1);
-}
-
-function getFileName(filePath) {
-    var pos = filePath.lastIndexOf('/');
-    return filePath.substring(pos + 1);
-}
-
-function checkURL(url) {
-    return url.indexOf(' ') === -1 ?  true : false;
-}
-
-module.exports = {
-    abort: function () {
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
-    },
-
-    upload: function(args, win, fail) {
-        var filePath = args[0],
-            server = args[1],
-            fileKey = args[2],
-            fileName = args[3],
-            mimeType = args[4],
-            params = args[5],
-            /*trustAllHosts = args[6],*/
-            chunkedMode = args[7],
-            headers = args[8];
-
-        if (!checkURL(server)) {
-            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, server, filePath));
-        }
-
-        nativeResolveLocalFileSystemURI(filePath, function(entry) {
-            entry.file(function(file) {
-                function uploadFile(blobFile) {
-                    var fd = new FormData();
-
-                    fd.append(fileKey, blobFile, fileName);
-                    for (var prop in params) {
-                        if(params.hasOwnProperty(prop)) {
-                            fd.append(prop, params[prop]);
-                        }
-                    }
-
-                    xhr = new XMLHttpRequest();
-                    xhr.open("POST", server);
-                    xhr.onload = function(evt) {
-                        if (xhr.status === 200) {
-                            var result = new FileUploadResult();
-                            result.bytesSent = file.size;
-                            result.responseCode = xhr.status;
-                            result.response = xhr.response;
-                            win(result);
-                        } else if (xhr.status === 404) {
-                            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, server, filePath, xhr.status, xhr.response));
-                        } else {
-                            fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, xhr.status, xhr.response));
-                        }
-                    };
-                    xhr.ontimeout = function(evt) {
-                        fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, xhr.status, xhr.response));
-                    };
-                    xhr.onerror = function () {
-                        fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, this.status, xhr.response));
-                    };
-                    xhr.onprogress = function (evt) {
-                        win(evt);
-                    };
-
-                    for (var header in headers) {
-                        if (headers.hasOwnProperty(header)) {
-                            xhr.setRequestHeader(header, headers[header]);
-                        }
-                    }
-
-                    xhr.send(fd);
-                }
-
-                var bytesPerChunk;
-                if (chunkedMode === true) {
-                    bytesPerChunk = 1024 * 1024; // 1MB chunk sizes.
-                } else {
-                    bytesPerChunk = file.size;
-                }
-                var start = 0;
-                var end = bytesPerChunk;
-                while (start < file.size) {
-                    var chunk = file.slice(start, end, mimeType);
-                    uploadFile(chunk);
-                    start = end;
-                    end = start + bytesPerChunk;
-                }
-            }, function(error) {
-                fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR, server, filePath));
-            });
-        }, function(error) {
-            fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR, server, filePath));
-        });
-
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
-    },
-
-    download: function (args, win, fail) {
-        var source = args[0],
-            target = args[1],
-            headers = args[4],
-            fileWriter;
-
-        if (!checkURL(source)) {
-            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, source, target));
-        }
-
-        xhr = new XMLHttpRequest();
-
-        function writeFile(entry) {
-            entry.createWriter(function (writer) {
-                fileWriter = writer;
-                fileWriter.onwriteend = function (evt) {
-                    if (!evt.target.error) {
-                        win(entry);
-                    } else {
-                        fail(evt.target.error);
-                    }
-                };
-                fileWriter.onerror = function (evt) {
-                    fail(evt.target.error);
-                };
-                fileWriter.write(new Blob([xhr.response]));
-            }, function (error) {
-                fail(error);
-            });
-        }
-
-        xhr.onerror = function (e) {
-            fail(new FileTransferError(FileTransferError.CONNECTION_ERR, source, target, xhr.status, xhr.response));
-        };
-
-        xhr.onload = function () {
-            if (xhr.readyState === xhr.DONE) {
-                if (xhr.status === 200 && xhr.response) {
-                    nativeResolveLocalFileSystemURI(getParentPath(target), function (dir) {
-                        dir.getFile(getFileName(target), {create: true}, writeFile, function (error) {
-                            fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR, source, target, xhr.status, xhr.response));
-                        });
-                    }, function (error) {
-                        fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR, source, target, xhr.status, xhr.response));
-                    });
-                } else if (xhr.status === 404) {
-                    fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, source, target, xhr.status, xhr.response));
-                } else {
-                    fail(new FileTransferError(FileTransferError.CONNECTION_ERR, source, target, xhr.status, xhr.response));
-                }
-            }
-        };
-        xhr.onprogress = function (evt) {
-            win(evt);
-        };
-
-        xhr.open("GET", source, true);
-        for (var header in headers) {
-            if (headers.hasOwnProperty(header)) {
-                xhr.setRequestHeader(header, headers[header]);
-            }
-        }
-        xhr.send();
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/fileUtils.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/fileUtils.js b/lib/blackberry10/plugin/blackberry10/fileUtils.js
deleted file mode 100644
index e26e4e9..0000000
--- a/lib/blackberry10/plugin/blackberry10/fileUtils.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-function convertPath(url) {
-    return decodeURI(url).substring(11).replace(/\/$/, '');
-}
-
-module.exports = {
-
-    createEntry: function (entry) {
-        var cordovaEntry;
-        if (entry.isFile) {
-            cordovaEntry = new window.FileEntry(entry.name, convertPath(entry.toURL()));
-        } else {
-            cordovaEntry = new window.DirectoryEntry(entry.name, convertPath(entry.toURL()));
-        }
-        cordovaEntry.nativeEntry = entry;
-        return cordovaEntry;
-    },
-
-    getEntryForURI: function (uri, success, fail) {
-        //TODO: account for local vs file system
-        window.resolveLocalFileSystemURI(uri, success, fail);
-    },
-
-    getFileSystemName: function (fs) {
-        return (fs.name.indexOf('Persistent') != -1) ? 'persistent' : 'temporary';
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/magnetometer.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/magnetometer.js b/lib/blackberry10/plugin/blackberry10/magnetometer.js
deleted file mode 100644
index 72aa90e..0000000
--- a/lib/blackberry10/plugin/blackberry10/magnetometer.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var cordova = require('cordova'),
-    callback;
-
-module.exports = {
-    start: function (args, win, fail) {
-        window.removeEventListener("deviceorientation", callback);
-        callback = function (orientation) {
-            var heading = 360 - orientation.alpha;
-            win({
-                magneticHeading: heading,
-                trueHeading: heading,
-                headingAccuracy: 0,
-                timestamp: orientation.timeStamp
-            });
-        };
-
-        window.addEventListener("deviceorientation", callback);
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
-    },
-    stop: function (args, win, fail) {
-        window.removeEventListener("deviceorientation", callback);
-        return { "status" : cordova.callbackStatus.OK, "message" : "removed" };
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/media.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/media.js b/lib/blackberry10/plugin/blackberry10/media.js
deleted file mode 100644
index a141a99..0000000
--- a/lib/blackberry10/plugin/blackberry10/media.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var cordova = require('cordova'),
-    audioObjects = {};
-
-module.exports = {
-    create: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            src = args[1];
-
-        if (typeof src == "undefined"){
-            audioObjects[id] = new Audio();
-        } else {
-            audioObjects[id] = new Audio(src);
-        }
-
-        return {"status" : 1, "message" : "Audio object created" };
-    },
-    startPlayingAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (args.length === 1 || typeof args[1] == "undefined" ) {
-            return {"status" : 9, "message" : "Media source argument not found"};
-        }
-
-        if (audio) {
-            audio.pause();
-            audioObjects[id] = undefined;
-        }
-
-        audio = audioObjects[id] = new Audio(args[1]);
-        audio.play();
-        return {"status" : 1, "message" : "Audio play started" };
-    },
-    stopPlayingAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (!audio) {
-            return {"status" : 2, "message" : "Audio Object has not been initialized"};
-        }
-
-        audio.pause();
-        audioObjects[id] = undefined;
-
-        return {"status" : 1, "message" : "Audio play stopped" };
-    },
-    seekToAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (!audio) {
-            result = {"status" : 2, "message" : "Audio Object has not been initialized"};
-        } else if (args.length === 1) {
-            result = {"status" : 9, "message" : "Media seek time argument not found"};
-        } else {
-            try {
-                audio.currentTime = args[1];
-            } catch (e) {
-                console.log('Error seeking audio: ' + e);
-                return {"status" : 3, "message" : "Error seeking audio: " + e};
-            }
-
-            result = {"status" : 1, "message" : "Seek to audio succeeded" };
-        }
-        return result;
-    },
-    pausePlayingAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (!audio) {
-            return {"status" : 2, "message" : "Audio Object has not been initialized"};
-        }
-
-        audio.pause();
-
-        return {"status" : 1, "message" : "Audio paused" };
-    },
-    getCurrentPositionAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (!audio) {
-            return {"status" : 2, "message" : "Audio Object has not been initialized"};
-        }
-
-        return {"status" : 1, "message" : audio.currentTime };
-    },
-    getDuration: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (!audio) {
-            return {"status" : 2, "message" : "Audio Object has not been initialized"};
-        }
-
-        return {"status" : 1, "message" : audio.duration };
-    },
-    startRecordingAudio: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        if (args.length <= 1) {
-            return {"status" : 9, "message" : "Media start recording, insufficient arguments"};
-        }
-
-        blackberry.media.microphone.record(args[1], win, fail);
-        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "WebWorks Is On It" };
-    },
-    stopRecordingAudio: function (args, win, fail) {
-    },
-    release: function (args, win, fail) {
-        if (!args.length) {
-            return {"status" : 9, "message" : "Media Object id was not sent in arguments"};
-        }
-
-        var id = args[0],
-            audio = audioObjects[id],
-            result;
-
-        if (audio) {
-            if(audio.src !== ""){
-                audio.src = undefined;
-            }
-            audioObjects[id] = undefined;
-            //delete audio;
-        }
-
-        result = {"status" : 1, "message" : "Media resources released"};
-
-        return result;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/utils.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/utils.js b/lib/blackberry10/plugin/blackberry10/utils.js
deleted file mode 100644
index 3a630da..0000000
--- a/lib/blackberry10/plugin/blackberry10/utils.js
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var self,
-    exception = require('cordova/plugin/blackberry10/exception');
-
-function S4() {
-    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
-}
-
-self = module.exports = {
-    validateNumberOfArguments: function (lowerBound, upperBound, numberOfArguments, customExceptionType, customExceptionMessage, customExceptionObject) {
-
-        customExceptionMessage = customExceptionMessage || "";
-
-        if (arguments.length < 3 || arguments.length > 6) {
-            exception.raise(exception.types.Argument, "Wrong number of arguments when calling: validateNumberOfArguments()");
-        }
-
-        if (isNaN(lowerBound) && isNaN(upperBound) && isNaN(numberOfArguments)) {
-            exception.raise(exception.types.ArgumentType, "(validateNumberOfArguments) Arguments are not numbers");
-        }
-
-        lowerBound = parseInt(lowerBound, 10);
-        upperBound = parseInt(upperBound, 10);
-        numberOfArguments = parseInt(numberOfArguments, 10);
-
-        if (numberOfArguments < lowerBound || numberOfArguments > upperBound) {
-            exception.raise((customExceptionType || exception.types.ArgumentLength), (customExceptionMessage + "\n\nWrong number of arguments"), customExceptionObject);
-        }
-
-    },
-
-    validateArgumentType: function (arg, argType, customExceptionType, customExceptionMessage, customExceptionObject) {
-        var invalidArg = false,
-            msg;
-
-        switch (argType) {
-        case "array":
-            if (!arg instanceof Array) {
-                invalidArg = true;
-            }
-            break;
-        case "date":
-            if (!arg instanceof Date) {
-                invalidArg = true;
-            }
-            break;
-        case "integer":
-            if (typeof arg === "number") {
-                if (arg !== Math.floor(arg)) {
-                    invalidArg = true;
-                }
-            }
-            else {
-                invalidArg = true;
-            }
-            break;
-        default:
-            if (typeof arg !== argType) {
-                invalidArg = true;
-            }
-            break;
-        }
-
-        if (invalidArg) {
-            msg = customExceptionMessage +  ("\n\nInvalid Argument type. argument: " + arg + " ==> was expected to be of type: " + argType);
-            exception.raise((customExceptionType || exception.types.ArgumentType), msg, customExceptionObject);
-        }
-    },
-
-    validateMultipleArgumentTypes: function (argArray, argTypeArray, customExceptionType, customExceptionMessage, customExceptionObject) {
-        for (var i = 0; i < argArray.length; i++) {
-            this.validateArgumentType(argArray[i], argTypeArray[i], customExceptionType, customExceptionMessage, customExceptionObject);
-        }
-    },
-
-    arrayContains: function (array, obj) {
-        var i = array.length;
-        while (i--) {
-            if (array[i] === obj) {
-                return true;
-            }
-        }
-        return false;
-    },
-
-    some: function (obj, predicate, scope) {
-        if (obj instanceof Array) {
-            return obj.some(predicate, scope);
-        }
-        else {
-            var values = self.map(obj, predicate, scope);
-
-            return self.reduce(values, function (some, value) {
-                return value ? value : some;
-            }, false);
-        }
-    },
-
-    count: function (obj) {
-        return self.sum(obj, function (total) {
-            return 1;
-        });
-    },
-
-    sum: function (obj, selector, scope) {
-        var values = self.map(obj, selector, scope);
-        return self.reduce(values, function (total, value) {
-            return total + value;
-        });
-    },
-
-    max: function (obj, selector, scope) {
-        var values = self.map(obj, selector, scope);
-        return self.reduce(values, function (max, value) {
-            return max < value ? value : max;
-        }, Number.MIN_VALUE);
-    },
-
-    min: function (obj, selector, scope) {
-        var values = self.map(obj, selector, scope);
-        return self.reduce(values, function (min, value) {
-            return min > value ? value : min;
-        }, Number.MAX_VALUE);
-    },
-
-    forEach: function (obj, action, scope) {
-        if (obj instanceof Array) {
-            return obj.forEach(action, scope);
-        }
-        else {
-            self.map(obj, action, scope);
-        }
-    },
-
-    filter: function (obj, predicate, scope) {
-        if (obj instanceof Array) {
-            return obj.filter(predicate, scope);
-        }
-        else {
-            var result = [];
-            self.forEach(obj, function (value, index) {
-                if (predicate.apply(scope, [value, index])) {
-                    result.push(value);
-                }
-
-            }, scope);
-
-            return result;
-        }
-    },
-
-    reduce: function (obj, func, init, scope) {
-        var i,
-            initial = init === undefined ? 0 : init,
-            result = initial;
-
-
-        if (obj instanceof Array) {
-            return obj.reduce(func, initial);
-        }
-        else if (obj instanceof NamedNodeMap) {
-            for (i = 0; i < obj.length; i++) {
-                result = func.apply(scope, [result, obj[i], i]);
-            }
-        }
-        else {
-            for (i in obj) {
-                if (obj.hasOwnProperty(i)) {
-                    result = func.apply(scope, [result, obj[i], i]);
-                }
-            }
-        }
-
-        return result;
-
-    },
-
-    map: function (obj, func, scope) {
-        var i,
-            returnVal = null,
-            result = [];
-
-        if (obj instanceof Array) {
-            return obj.map(func, scope);
-        }
-        else if (obj instanceof NamedNodeMap) {
-            for (i = 0; i < obj.length; i++) {
-                returnVal = func.apply(scope, [obj[i], i]);
-                result.push(returnVal);
-            }
-        }
-        else {
-            for (i in obj) {
-                if (obj.hasOwnProperty(i)) {
-                    returnVal = func.apply(scope, [obj[i], i]);
-                    result.push(returnVal);
-                }
-            }
-        }
-
-        return result;
-    },
-
-    series: function (tasks, callback) {
-
-        var execute = function () {
-            var args = [],
-                task;
-
-            if (tasks.length) {
-                task = tasks.shift();
-                args = args.concat(task.args).concat(execute);
-                task.func.apply(this, args);
-            }
-            else {
-                callback.func.apply(this, callback.args);
-            }
-        };
-
-        execute();
-    },
-
-    regexSanitize: function (regexString) {
-        return regexString.replace("^", "\\^")
-                    .replace("$", "\\$")
-                    .replace("(", "\\(")
-                    .replace(")", "\\)")
-                    .replace("<", "\\<")
-                    .replace("[", "\\[")
-                    .replace("{", "\\{")
-                    .replace(/\\/, "\\\\")
-                    .replace("|", "\\|")
-                    .replace(">", "\\>")
-                    .replace(".", "\\.")
-                    .replace("*", "\\*")
-                    .replace("+", "\\+")
-                    .replace("?", "\\?");
-    },
-
-    find: function (comparison, collection, startInx, endInx, callback) {
-        var results = [],
-            compare = function (s, pattern) {
-
-                if (typeof(s) !== "string" || pattern === null) {
-                    return s === pattern;
-                }
-
-                var regex = pattern.replace(/\./g, "\\.")
-                                   .replace(/\^/g, "\\^")
-                                   .replace(/\*/g, ".*")
-                                   .replace(/\\\.\*/g, "\\*");
-
-                regex = "^".concat(regex, "$");
-
-                return !!s.match(new RegExp(regex, "i"));
-            };
-
-        self.forEach(collection, function (c) {
-            var match,
-                fail = false;
-
-            self.forEach(comparison, function (value, key) {
-                if (!fail && value !== undefined) {
-
-                    if (compare(c[key], value)) {
-                        match = c;
-                    }
-                    else {
-                        fail = true;
-                        match = null;
-                    }
-                }
-            });
-
-            if (match) {
-                results.push(match);
-            }
-        });
-
-        if (callback) {
-            if (startInx === undefined) {
-                startInx = 0;
-            }
-            if (endInx === undefined) {
-                endInx = results.length;
-            }
-            if (startInx === endInx) {
-                endInx = startInx + 1;
-            }
-
-            callback.apply(null, [results.slice(startInx, endInx)]);
-        }
-    },
-
-    mixin: function (mixin, to) {
-        Object.getOwnPropertyNames(mixin).forEach(function (prop) {
-            if (Object.hasOwnProperty.call(mixin, prop)) {
-                Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(mixin, prop));
-            }
-        });
-        return to;
-    },
-
-    copy: function (obj) {
-        var i,
-            newObj = (obj === null ? false : global.toString.call(obj) === "[object Array]") ? [] : {};
-
-        if (typeof obj === 'number' ||
-            typeof obj === 'string' ||
-            typeof obj === 'boolean' ||
-            obj === null ||
-            obj === undefined) {
-            return obj;
-        }
-
-        if (obj instanceof Date) {
-            return new Date(obj);
-        }
-
-        if (obj instanceof RegExp) {
-            return new RegExp(obj);
-        }
-
-        for (i in obj) {
-            if (obj.hasOwnProperty(i)) {
-                if (obj[i] && typeof obj[i] === "object") {
-                    if (obj[i] instanceof Date) {
-                        newObj[i] = obj[i];
-                    }
-                    else {
-                        newObj[i] = self.copy(obj[i]);
-                    }
-                }
-                else {
-                    newObj[i] = obj[i];
-                }
-            }
-        }
-
-        return newObj;
-    },
-
-    startsWith : function (str, substr) {
-        return str.indexOf(substr) === 0;
-    },
-
-    endsWith : function (str, substr) {
-        return str.indexOf(substr, str.length - substr.length) !== -1;
-    },
-
-    parseUri : function (str) {
-        var i, uri = {},
-            key = [ "source", "scheme", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor" ],
-            matcher = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(str);
-
-        for (i = key.length - 1; i >= 0; i--) {
-            uri[key[i]] = matcher[i] || "";
-        }
-
-        return uri;
-    },
-
-    // uri - output from parseUri
-    isAbsoluteURI : function (uri) {
-        if (uri && uri.source) {
-            return uri.relative !== uri.source;
-        }
-
-        return false;
-    },
-
-    fileNameToImageMIME : function (fileName) {
-
-        var extensionsToMIME = {},
-            ext;
-
-        extensionsToMIME.png = 'image/png';
-        extensionsToMIME.jpg = 'image/jpeg';
-        extensionsToMIME.jpe = 'image/jpeg';
-        extensionsToMIME.jpeg = 'image/jpeg';
-        extensionsToMIME.gif = 'image/gif';
-        extensionsToMIME.bmp = 'image/bmp';
-        extensionsToMIME.bm = 'image/bmp';
-        extensionsToMIME.svg = 'image/svg+xml';
-        extensionsToMIME.tif = 'image/tiff';
-        extensionsToMIME.tiff = 'image/tiff';
-
-        ext = fileName.split('.').pop();
-        return extensionsToMIME[ext];
-    },
-
-    isLocalURI : function (uri) {
-        return uri && uri.scheme && "local:///".indexOf(uri.scheme.toLowerCase()) !== -1;
-    },
-
-    isFileURI : function (uri) {
-        return uri && uri.scheme && "file://".indexOf(uri.scheme.toLowerCase()) !== -1;
-    },
-
-    isHttpURI : function (uri) {
-        return uri && uri.scheme && "http://".indexOf(uri.scheme.toLowerCase()) !== -1;
-    },
-
-    isHttpsURI : function (uri) {
-        return uri && uri.scheme && "https://".indexOf(uri.scheme.toLowerCase()) !== -1;
-    },
-
-    // Checks if the specified uri starts with 'data:'
-    isDataURI : function (uri) {
-        return uri && uri.scheme && "data:".indexOf(uri.scheme.toLowerCase()) !== -1;
-    },
-
-    performExec : function (featureId, property, args) {
-        var result;
-
-        window.webworks.exec(function (data, response) {
-            result = data;
-        }, function (data, response) {
-            throw data;
-        }, featureId, property, args, true);
-
-        return result;
-    },
-
-    inNode : function () {
-        return !!require.resolve;
-    },
-
-    requireWebview : function () {
-        return require("./webview");
-    },
-    convertDataToBinary : function (data, dataEncoding) {
-        var rawData,
-            uint8Array,
-            i;
-
-        if (data) {
-            if (dataEncoding.toLowerCase() === "base64") {
-                rawData = window.atob(data);
-            }
-            else {
-                rawData = data;
-            }
-
-            uint8Array = new Uint8Array(new ArrayBuffer(rawData.length));
-
-            for (i = 0; i < uint8Array.length; i++) {
-                uint8Array[i] = rawData.charCodeAt(i);
-            }
-
-            return uint8Array.buffer;
-        }
-    },
-    getBlobWithArrayBufferAsData : function (data, dataEncoding) {
-        var rawData,
-            blobBuilderObj = new window.WebKitBlobBuilder();
-        rawData = this.convertDataToBinary(data, dataEncoding);
-        blobBuilderObj.append(rawData);
-
-        return blobBuilderObj.getBlob("arraybuffer");
-    },
-    loadModule: function (module) {
-        return require(module);
-    },
-    loadExtensionModule: function (extBasename, path) {
-        var ext = require("./manifest")[extBasename];
-
-        if (ext) {
-            return require("../ext/" + ext.namespace + "/" + path);
-        } else {
-            return null;
-        }
-    },
-    hasPermission: function (config, permission) {
-        if (config && config.permissions && config.permissions.length) {
-            return config.permissions.indexOf(permission) >= 0;
-        }
-
-        return false;
-    },
-    guid: function () {
-        return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
-    },
-    getURIPrefix: function () {
-        return "http://localhost:8472/";
-    },
-    translatePath: function (path) {
-        if (path.indexOf("local:///") === 0) {
-            var sourceDir = window.qnx.webplatform.getApplication().getEnv("HOME"); //leading slashes need to be removed
-            path = "file:///" + sourceDir.replace(/^\/*/, '') + "/../app/native/" + path.replace(/local:\/\/\//, '');
-        }
-        return path;
-    },
-    invokeInBrowser: function (url) {
-        var request = {
-            uri: url,
-            target: "sys.browser"
-        };
-        window.qnx.webplatform.getApplication().invocation.invoke(request);
-    },
-    isPersonal: function () {
-        return window.qnx.webplatform.getApplication().getEnv("PERIMETER") === "personal";
-    },
-    deepclone: function (obj) {
-        var newObj = obj instanceof Array ? [] : {},
-            key;
-
-        if (typeof obj === 'number' ||
-                typeof obj === 'string' ||
-                typeof obj === 'boolean' ||
-                obj === null ||
-                obj === undefined) {
-            return obj;
-        }
-
-        if (obj instanceof Date) {
-            return new Date(obj);
-        }
-
-        if (obj instanceof RegExp) {
-            return new RegExp(obj);
-        }
-
-        for (key in obj) {
-            if (obj.hasOwnProperty(key)) {
-                if (obj[key] && typeof obj[key] === "object") {
-                    newObj[key] = self.deepclone(obj[key]);
-                } else {
-                    newObj[key] = obj[key];
-                }
-            }
-        }
-
-        return newObj;
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/blackberry10/plugin/blackberry10/vibrate.js
----------------------------------------------------------------------
diff --git a/lib/blackberry10/plugin/blackberry10/vibrate.js b/lib/blackberry10/plugin/blackberry10/vibrate.js
deleted file mode 100644
index ba05294..0000000
--- a/lib/blackberry10/plugin/blackberry10/vibrate.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-module.exports = function (time) {
-    var proto = Object.getPrototypeOf(navigator);
-
-    if (proto && proto.vibrate) {
-        proto.vibrate(time);
-    } else if (proto && proto.webkitVibrate) {
-        //Older OS contain webkit prefix
-        proto.webkitVibrate(time);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/lib/scripts/bootstrap-blackberry10.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap-blackberry10.js b/lib/scripts/bootstrap-blackberry10.js
index 1e40bae..691faf0 100644
--- a/lib/scripts/bootstrap-blackberry10.js
+++ b/lib/scripts/bootstrap-blackberry10.js
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-
+/*global cordova*/
 (function () {
     var docAddEventListener = document.addEventListener,
         webworksReady = false,
@@ -50,7 +50,7 @@
         var params = {};
 
         function composeUri() {
-            return require("cordova/plugin/blackberry10/utils").getURIPrefix() + functionUri;
+            return "http://localhost:8472/" + functionUri;
         }
 
         function createXhrRequest(uri, isAsync) {
@@ -119,8 +119,7 @@
                 "value": value,
                 "writable": false
             });
-        },
-        event: require("cordova/plugin/blackberry10/event")
+        }
     };
 
     require("cordova/channel").onPluginsReady.subscribe(function () {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/test/blackberry10/test.capture.js
----------------------------------------------------------------------
diff --git a/test/blackberry10/test.capture.js b/test/blackberry10/test.capture.js
deleted file mode 100644
index 95b48d4..0000000
--- a/test/blackberry10/test.capture.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-describe("blackberry10 capture", function () {
-    var capture = require('cordova/plugin/blackberry10/capture'),
-        cordova = require('cordova');
-
-    describe("getSupportedAudioModes", function(){
-        it('should return Ok', function(){
-            expect(capture.getSupportedAudioModes()).toEqual({
-                status: cordova.callbackStatus.OK,
-                message: []
-            });
-        });
-    });
-
-    describe("getSupportedImageModes", function(){
-        it('should return Ok', function(){
-            expect(capture.getSupportedImageModes()).toEqual({
-                status: cordova.callbackStatus.OK,
-                message: []
-            });
-        });
-    });
-
-    describe("getSupportedVideoModes", function(){
-        it('should return Ok', function(){
-            expect(capture.getSupportedVideoModes()).toEqual({
-                status: cordova.callbackStatus.OK,
-                message: []
-            });
-        });
-    });
-
-    function testCapture(method, action) {
-        describe(method, function(){
-            beforeEach(function () {
-                global.blackberry = {
-                    invoke: {
-                        card: {
-                            invokeCamera: jasmine.createSpy('blackberry.invoke.card.invokeCamera')
-                        }
-                    }
-                };
-            });
-
-            afterEach(function () {
-                delete global.blackberry;
-            });
-
-            it('should return No Result', function(){
-                var args = [{limit: 0}],
-                    win = jasmine.createSpy('win'),
-                    fail = jasmine.createSpy('fail');
-
-                expect(capture[method](args, win, fail)).toEqual({
-                    status: cordova.callbackStatus.NO_RESULT,
-                    message: "WebWorks Is On It"
-                });
-            });
-
-            describe("when the limit is 0 or less", function () {
-                it('calls the win callback with an empty array', function(){
-                    var args = [{ limit: -9 }],
-                        win = jasmine.createSpy('win'),
-                        fail = jasmine.createSpy('fail');
-
-                    capture[method](args, win, fail);
-                    expect(win).toHaveBeenCalled();
-                });
-            });
-
-            describe("when the limit is greater than 0", function () {
-                var win, fail;
-
-                beforeEach(function () {
-                    win = jasmine.createSpy("win");
-                    fail = jasmine.createSpy("fail");
-                });
-
-                it("calls the invokeCamera method", function () {
-                    capture[method]([{limit: 1}], win, fail);
-                    expect(blackberry.invoke.card.invokeCamera).toHaveBeenCalledWith(action, 
-                                                                                     jasmine.any(Function),
-                                                                                     jasmine.any(Function),
-                                                                                     jasmine.any(Function));
-                });
-
-                describe("inside the invokeCamera callback", function () {
-                    var onsave;
-
-                    beforeEach(function () {
-                        window.webkitRequestFileSystem = jasmine.createSpy("window.webkitRequestFileSystem");
-                        global.blackberry.io = { sandbox: true };
-
-                        capture[method]([{limit: 1}], win, fail);
-                        onsave = blackberry.invoke.card.invokeCamera.mostRecentCall.args[1];
-                    });
-
-                    afterEach(function () {
-                        delete window.webkitRequestFileSystem;
-                    });
-
-                    it("sets the sandbox to false", function () {
-                        onsave();
-                        expect(blackberry.io.sandbox).toBe(false);
-                    });
-
-                    it("calls webkitRequestFileSystem", function () {
-                        onsave();
-                        expect(window.webkitRequestFileSystem).toHaveBeenCalledWith(
-                            window.PERSISTENT, 
-                            1024, 
-                            jasmine.any(Function), 
-                            fail);
-                    });
-
-                    describe("in the webkitRequestFileSystem callback", function () {
-                        var callback,
-                            fs = { root: { getFile: jasmine.createSpy("getFile") } };
-
-                        beforeEach(function () {
-                            onsave('/foo/bar/baz.gif');
-                            callback = window.webkitRequestFileSystem.mostRecentCall.args[2];
-                        });
-
-                        it("calls getfile on the provided filesystem", function () {
-                            callback(fs);
-                            expect(fs.root.getFile).toHaveBeenCalledWith('/foo/bar/baz.gif', 
-                                                                         {},
-                                                                         jasmine.any(Function), 
-                                                                         fail);
-                        });
-
-                        it("calls the file method of the fileEntity", function () {
-                            var fe = { file: jasmine.createSpy('file') };
-                            callback(fs);
-                            fs.root.getFile.mostRecentCall.args[2](fe);
-                            expect(fe.file).toHaveBeenCalledWith(jasmine.any(Function), fail);
-                        });
-
-                        describe("in the file callback", function () {
-                            var fe = { 
-                                    file: jasmine.createSpy('file'),
-                                    fullPath: 'file://this/is/the/full/path/eh.png'
-                                },
-                                fileCB;
-
-                            beforeEach(function () {
-                                callback(fs);
-                                fs.root.getFile.mostRecentCall.args[2](fe);
-                                fileCB = fe.file.mostRecentCall.args[0];
-                            });
-
-                            it("sets the fullPath of the file object", function () {
-                                var file = {};
-                                fileCB(file);
-                                expect(file.fullPath).toBe(fe.fullPath);
-                            });
-
-                            it("calls the win callback with an array containing the file", function () {
-                                var file = {};
-                                fileCB(file);
-                                expect(win).toHaveBeenCalledWith([file]);
-                            });
-
-                            it("resets the value of blackberry.io.sandbox", function () {
-                                var file = {};
-                                fileCB(file);
-                                expect(blackberry.io.sandbox).toBe(true);
-                            });
-                        });
-                    });
-                });
-            });
-        });
-    }
-
-    testCapture('captureImage', 'photo');
-    testCapture('captureVideo', 'video');
-
-    describe("captureAudio", function(){
-        it('should call the fail callback', function(){
-            var args = {},
-                win = jasmine.createSpy('win'),
-                fail = jasmine.createSpy('fail');
-
-            capture.captureAudio(args, win, fail);
-            expect(fail).toHaveBeenCalled();
-            expect(win).not.toHaveBeenCalled();
-        });
-
-        it('should return no result', function(){
-            var args = "arguments",
-                win = jasmine.createSpy('win'),
-                fail = jasmine.createSpy('fail');
-
-            expect(capture.captureAudio(args, win, fail)).toEqual({
-                status: cordova.callbackStatus.NO_RESULT,
-                message: "WebWorks Is On It"
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6e48845d/test/blackberry10/test.compass.js
----------------------------------------------------------------------
diff --git a/test/blackberry10/test.compass.js b/test/blackberry10/test.compass.js
deleted file mode 100644
index 19b231b..0000000
--- a/test/blackberry10/test.compass.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-xdescribe("blackberry10 compass", function () {
-    var compass = require('cordova/plugin/blackberry10/compass'),
-        cordova = require('cordova'),
-        exec = require('cordova/exec'),
-        utils = require('cordova/utils'),
-        CompassHeading = require('cordova/plugin/CompassHeading'),
-        CompassError = require('cordova/plugin/CompassError'),
-        win = jasmine.createSpy('win'),
-        fail = jasmine.createSpy('fail');
-
-    beforeEach(function () {
-        window.start = jasmine.createSpy('start');
-        window.stop = jasmine.createSpy('stop');
-        window.removeListeners = jasmine.createSpy('removeListeners');
-        global.listeners = [];
-
-    });
-
-    afterEach(function () {
-
-    });
-
-
-    describe("watchHeading", function(){
-        it('should return that successCallback is not a function', function(){
-            expect(compass.getCurrentHeading).toThrow("getCurrentHeading must be called with at least a success callback function as first parameter.");
-        });
-
-        it('should see that start() was called', function(){
-            compass.getCurrentHeading(win, fail);
-            expect(listeners).toHaveBeenCalled();
-        });
-
-    });
-
-    describe("clearWatch", function(){
-
-
-    });
-});