You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2014/01/22 20:38:12 UTC

[01/50] [abbrv] Removing the plugins directory after the plugins were incorrectly removed

Updated Branches:
  refs/heads/master 037ab7511 -> 40b8dc3d2


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/main.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/main.js b/test/cordova/plugins/org.apache.cordova.device/test/main.js
deleted file mode 100644
index 9508770..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/main.js
+++ /dev/null
@@ -1,163 +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 deviceInfo = function() {
-    document.getElementById("cordova").innerHTML = cordova.version;
-    document.getElementById("platform").innerHTML = device.platform;
-    document.getElementById("version").innerHTML = device.version;
-    document.getElementById("uuid").innerHTML = device.uuid;
-    document.getElementById("model").innerHTML = device.model;
-    document.getElementById("width").innerHTML = screen.width;
-    document.getElementById("height").innerHTML = screen.height;
-    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-};
-
-var getLocation = function() {
-    var suc = function(p) {
-        alert(p.coords.latitude + " " + p.coords.longitude);
-    };
-    var locFail = function() {
-    };
-    navigator.geolocation.getCurrentPosition(suc, locFail);
-};
-
-var beep = function() {
-    navigator.notification.beep(2);
-};
-
-var vibrate = function() {
-    navigator.notification.vibrate(0);
-};
-
-function roundNumber(num) {
-    var dec = 3;
-    var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
-    return result;
-}
-
-var accelerationWatch = null;
-
-function updateAcceleration(a) {
-    document.getElementById('x').innerHTML = roundNumber(a.x);
-    document.getElementById('y').innerHTML = roundNumber(a.y);
-    document.getElementById('z').innerHTML = roundNumber(a.z);
-}
-
-var toggleAccel = function() {
-    if (accelerationWatch !== null) {
-        navigator.accelerometer.clearWatch(accelerationWatch);
-        updateAcceleration({
-            x : "",
-            y : "",
-            z : ""
-        });
-        accelerationWatch = null;
-    } else {
-        var options = {};
-        options.frequency = 1000;
-        accelerationWatch = navigator.accelerometer.watchAcceleration(
-                updateAcceleration, function(ex) {
-                    alert("accel fail (" + ex.name + ": " + ex.message + ")");
-                }, options);
-    }
-};
-
-var preventBehavior = function(e) {
-    e.preventDefault();
-};
-
-function dump_pic(data) {
-    var viewport = document.getElementById('viewport');
-    console.log(data);
-    viewport.style.display = "";
-    viewport.style.position = "absolute";
-    viewport.style.top = "10px";
-    viewport.style.left = "10px";
-    document.getElementById("test_img").src = "data:image/jpeg;base64," + data;
-}
-
-function fail(msg) {
-    alert(msg);
-}
-
-function show_pic() {
-    navigator.camera.getPicture(dump_pic, fail, {
-        quality : 50
-    });
-}
-
-function close() {
-    var viewport = document.getElementById('viewport');
-    viewport.style.position = "relative";
-    viewport.style.display = "none";
-}
-
-// This is just to do this.
-function readFile() {
-    navigator.file.read('/sdcard/cordova.txt', fail, fail);
-}
-
-function writeFile() {
-    navigator.file.write('foo.txt', "This is a test of writing to a file",
-            fail, fail);
-}
-
-function contacts_success(contacts) {
-    alert(contacts.length
-            + ' contacts returned.'
-            + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
-                    : ''));
-}
-
-function get_contacts() {
-    var obj = new ContactFindOptions();
-    obj.filter = "";
-    obj.multiple = true;
-    obj.limit = 5;
-    navigator.service.contacts.find(
-            [ "displayName", "name" ], contacts_success,
-            fail, obj);
-}
-
-var networkReachableCallback = function(reachability) {
-    // There is no consistency on the format of reachability
-    var networkState = reachability.code || reachability;
-
-    var currentState = {};
-    currentState[NetworkStatus.NOT_REACHABLE] = 'No network connection';
-    currentState[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection';
-    currentState[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection';
-
-    confirm("Connection type:\n" + currentState[networkState]);
-};
-
-function check_network() {
-    navigator.network.isReachable("www.mobiledevelopersolutions.com",
-            networkReachableCallback, {});
-}
-
-function init() {
-    // the next line makes it impossible to see Contacts on the HTC Evo since it
-    // doesn't have a scroll button
-    // document.addEventListener("touchmove", preventBehavior, false);
-    document.addEventListener("deviceready", deviceInfo, true);
-    document.getElementById("user-agent").textContent = navigator.userAgent;
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/master.css
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/master.css b/test/cordova/plugins/org.apache.cordova.device/test/master.css
deleted file mode 100644
index e93c937..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/master.css
+++ /dev/null
@@ -1,164 +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.
- *
-*/
-
-  body {
-    background:#222 none repeat scroll 0 0;
-    color:#666;
-    font-family:Helvetica;
-    font-size:72%;
-    line-height:1.5em;
-    margin:0;
-    border-top:1px solid #393939;
-  }
-
-  #info{
-    background:#ffa;
-    border: 1px solid #ffd324;
-    -webkit-border-radius: 5px;
-    border-radius: 5px;
-    clear:both;
-    margin:15px 6px 0;
-    min-width:295px;
-    max-width:97%;
-    padding:4px 0px 2px 10px;
-    word-wrap:break-word;
-    margin-bottom:10px;
-    display:inline-block;
-    min-height: 160px;
-    max-height: 300px;
-    overflow: auto;
-    -webkit-overflow-scrolling: touch;
-  }
-  
-  #info > h4{
-    font-size:.95em;
-    margin:5px 0;
-  }
- 	
-  #stage.theme{
-    padding-top:3px;
-  }
-
-  /* Definition List */
-  #stage.theme > dl{
-  	padding-top:10px;
-  	clear:both;
-  	margin:0;
-  	list-style-type:none;
-  	padding-left:10px;
-  	overflow:auto;
-  }
-
-  #stage.theme > dl > dt{
-  	font-weight:bold;
-  	float:left;
-  	margin-left:5px;
-  }
-
-  #stage.theme > dl > dd{
-  	width:45px;
-  	float:left;
-  	color:#a87;
-  	font-weight:bold;
-  }
-
-  /* Content Styling */
-  #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
-    margin:1em 0 .5em 13px;
-  }
-
-  #stage.theme > h1{
-    color:#eee;
-    font-size:1.6em;
-    text-align:center;
-    margin:0;
-    margin-top:15px;
-    padding:0;
-  }
-
-  #stage.theme > h2{
-  	clear:both;
-    margin:0;
-    padding:3px;
-    font-size:1em;
-    text-align:center;
-  }
-
-  /* Stage Buttons */
-  #stage.theme .btn{
-  	border: 1px solid #555;
-  	-webkit-border-radius: 5px;
-  	border-radius: 5px;
-  	text-align:center;
-  	display:inline-block;
-  	background:#444;
-  	width:150px;
-  	color:#9ab;
-  	font-size:1.1em;
-  	text-decoration:none;
-  	padding:1.2em 0;
-  	margin:3px 0px 3px 5px;
-  }
-  
-  #stage.theme .large{
-  	width:308px;
-  	padding:1.2em 0;
-  }
-  
-  #stage.theme .wide{
-    width:100%;
-    padding:1.2em 0;
-  }
-  
-  #stage.theme .backBtn{
-   border: 1px solid #555;
-   -webkit-border-radius: 5px;
-   border-radius: 5px;
-   text-align:center;
-   display:block;
-   float:right;
-   background:#666;
-   width:75px;
-   color:#9ab;
-   font-size:1.1em;
-   text-decoration:none;
-   padding:1.2em 0;
-   margin:3px 5px 3px 5px;
-  }
-  
-  #stage.theme .input{
-   border: 1px solid #555;
-   -webkit-border-radius: 5px;
-   border-radius: 5px;
-   text-align:center;
-   display:block;
-   float:light;
-   background:#888;
-   color:#9cd;
-   font-size:1.1em;
-   text-decoration:none;
-   padding:1.2em 0;
-   margin:3px 0px 3px 5px;    
- }
-  
-  #stage.theme .numeric{
-   width:100%;
-  }


[15/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/log.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/log.js b/test/cordova/lib/log.js
new file mode 100644
index 0000000..7339b1c
--- /dev/null
+++ b/test/cordova/lib/log.js
@@ -0,0 +1,57 @@
+#!/usr/bin/env node
+
+/*
+       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 shell = require('shelljs'),
+    path  = require('path'),
+    Q     = require('q'),
+    child_process = require('child_process'),
+    ROOT  = path.join(__dirname, '..', '..');
+
+/*
+ * Starts running logcat in the shell.
+ * Returns a promise.
+ */
+module.exports.run = function() {
+    var cmd = 'adb logcat | grep -v nativeGetEnabledTags';
+    var d = Q.defer();
+    var adb = child_process.spawn('adb', ['logcat']);
+
+    adb.stdout.on('data', function(data) {
+        var lines = data ? data.toString().split('\n') : [];
+        var out = lines.filter(function(x) { return x.indexOf('nativeGetEnabledTags') < 0; });
+        console.log(out.join('\n'));
+    });
+
+    adb.stderr.on('data', console.error);
+    adb.on('close', function(code) {
+        if (code > 0) {
+            d.reject('Failed to run logcat command.');
+        } else d.resolve();
+    });
+
+    return d.promise;
+}
+
+module.exports.help = function() {
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'corodva', 'log')));
+    console.log('Gives the logcat output on the command line.');
+    process.exit(0);
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/run.js b/test/cordova/lib/run.js
new file mode 100644
index 0000000..6806014
--- /dev/null
+++ b/test/cordova/lib/run.js
@@ -0,0 +1,139 @@
+#!/usr/bin/env node
+
+/*
+       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 path  = require('path'),
+    build = require('./build'),
+    emulator = require('./emulator'),
+    device   = require('./device'),
+    Q = require('q');
+
+/*
+ * Runs the application on a device if availible.
+ * If not device is found, it will use a started emulator.
+ * If no started emulators are found it will attempt to start an avd.
+ * If no avds are found it will error out.
+ * Returns a promise.
+ */
+ module.exports.run = function(args) {
+    var build_type;
+    var install_target;
+
+    for (var i=2; i<args.length; i++) {
+        if (args[i] == '--debug') {
+            build_type = '--debug';
+        } else if (args[i] == '--release') {
+            build_type = '--release';
+        } else if (args[i] == '--nobuild') {
+            build_type = '--nobuild';
+        } else if (args[i] == '--device') {
+            install_target = '--device';
+        } else if (args[i] == '--emulator') {
+            install_target = '--emulator';
+        } else if (args[i].substring(0, 9) == '--target=') {
+            install_target = args[i].substring(9, args[i].length);
+        } else {
+            console.error('ERROR : Run option \'' + args[i] + '\' not recognized.');
+            process.exit(2);
+        }
+    }
+
+    return build.run(build_type).then(function() {
+        if (install_target == '--device') {
+            return device.install();
+        } else if (install_target == '--emulator') {
+            return emulator.list_started().then(function(started) {
+                var p = started && started.length > 0 ? Q() : emulator.start();
+                return p.then(function() { emulator.install(); });
+            });
+        } else if (install_target) {
+            var devices, started_emulators, avds;
+            return device.list()
+            .then(function(res) {
+                devices = res;
+                return emulator.list_started();
+            }).then(function(res) {
+                started_emulators = res;
+                return emulator.list_images();
+            }).then(function(res) {
+                avds = res;
+                if (devices.indexOf(install_target) > -1) {
+                    return device.install(install_target);
+                } else if (started_emulators.indexOf(install_target) > -1) {
+                    return emulator.install(install_target);
+                } else {
+                    // if target emulator isn't started, then start it.
+                    var emulator_ID;
+                    for(avd in avds) {
+                        if(avds[avd].name == install_target) {
+                            return emulator.start(install_target)
+                            .then(function() { emulator.install(emulator_ID); });
+                        }
+                    }
+                    return Q.reject('Target \'' + install_target + '\' not found, unable to run project');
+                }
+            });
+        } else {
+            // no target given, deploy to device if availible, otherwise use the emulator.
+            return device.list()
+            .then(function(device_list) {
+                if (device_list.length > 0) {
+                    console.log('WARNING : No target specified, deploying to device \'' + device_list[0] + '\'.');
+                    return device.install(device_list[0]);
+                } else {
+                    return emulator.list_started()
+                    .then(function(emulator_list) {
+                        if (emulator_list.length > 0) {
+                            console.log('WARNING : No target specified, deploying to emulator \'' + emulator_list[0] + '\'.');
+                            return emulator.install(emulator_list[0]);
+                        } else {
+                            console.log('WARNING : No started emulators found, starting an emulator.');
+                            return emulator.best_image()
+                            .then(function(best_avd) {
+                                if(best_avd) {
+                                    return emulator.start(best_avd.name)
+                                    .then(function(emulator_ID) {
+                                        console.log('WARNING : No target specified, deploying to emulator \'' + emulator_ID + '\'.');
+                                        return emulator.install(emulator_ID);
+                                    });
+                                } else {
+                                    return emulator.start();
+                                }
+                            });
+                        }
+                    });
+                }
+            });
+        }
+    });
+}
+
+module.exports.help = function() {
+    console.log('Usage: ' + path.relative(process.cwd(), args[0]) + ' [options]');
+    console.log('Build options :');
+    console.log('    --debug : Builds project in debug mode');
+    console.log('    --release : Builds project in release mode');
+    console.log('    --nobuild : Runs the currently built project without recompiling');
+    console.log('Deploy options :');
+    console.log('    --device : Will deploy the built project to a device');
+    console.log('    --emulator : Will deploy the built project to an emulator if one exists');
+    console.log('    --target=<target_id> : Installs to the target with the specified id.');
+    process.exit(0);
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/test/cordova/lib/start-emulator b/test/cordova/lib/start-emulator
new file mode 100755
index 0000000..f96bdc3
--- /dev/null
+++ b/test/cordova/lib/start-emulator
@@ -0,0 +1,39 @@
+#!/usr/bin/env node
+
+/*
+       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 emulator = require('./emulator'),
+      args   = process.argv;
+
+var install_target;
+if(args.length > 2) {
+    if (args[2].substring(0, 9) == '--target=') {
+        install_target = args[2].substring(9, args[2].length);
+     } else {
+        console.error('ERROR : argument \'' + args[2] + '\' not recognized.');
+        process.exit(2);
+     }
+}
+
+emulator.start(install_target).done(null, function(err) {
+    console.error('ERROR: ' + err);
+    process.exit(2);
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/start-emulator.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/start-emulator.bat b/test/cordova/lib/start-emulator.bat
new file mode 100644
index 0000000..9329d95
--- /dev/null
+++ b/test/cordova/lib/start-emulator.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0start-emulator"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/log
----------------------------------------------------------------------
diff --git a/test/cordova/log b/test/cordova/log
new file mode 100755
index 0000000..47f0605
--- /dev/null
+++ b/test/cordova/log
@@ -0,0 +1,36 @@
+#!/usr/bin/env node
+
+/*
+       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 log  = require('./lib/log'),
+    reqs = require('./lib/check_reqs'),
+    args = process.argv;
+
+// Usage support for when args are given
+if(args.length > 2) {
+    log.help();
+} else {
+    reqs.run().done(function() {
+        return log.run();
+    }, function(err) {
+        console.error('ERROR: ' + err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/log.bat
----------------------------------------------------------------------
diff --git a/test/cordova/log.bat b/test/cordova/log.bat
new file mode 100644
index 0000000..875982f
--- /dev/null
+++ b/test/cordova/log.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0log"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/.bin/shjs
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/.bin/shjs b/test/cordova/node_modules/.bin/shjs
new file mode 120000
index 0000000..a044997
--- /dev/null
+++ b/test/cordova/node_modules/.bin/shjs
@@ -0,0 +1 @@
+../shelljs/bin/shjs
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/CONTRIBUTING.md b/test/cordova/node_modules/q/CONTRIBUTING.md
new file mode 100644
index 0000000..500ab17
--- /dev/null
+++ b/test/cordova/node_modules/q/CONTRIBUTING.md
@@ -0,0 +1,40 @@
+
+For pull requests:
+
+-   Be consistent with prevalent style and design decisions.
+-   Add a Jasmine spec to `specs/q-spec.js`.
+-   Use `npm test` to avoid regressions.
+-   Run tests in `q-spec/run.html` in as many supported browsers as you
+    can find the will to deal with.
+-   Do not build minified versions; we do this each release.
+-   If you would be so kind, add a note to `CHANGES.md` in an
+    appropriate section:
+
+    -   `Next Major Version` if it introduces backward incompatibilities
+        to code in the wild using documented features.
+    -   `Next Minor Version` if it adds a new feature.
+    -   `Next Patch Version` if it fixes a bug.
+
+For releases:
+
+-   Run `npm test`.
+-   Run tests in `q-spec/run.html` in a representative sample of every
+    browser under the sun.
+-   Run `npm run cover` and make sure you're happy with the results.
+-   Run `npm run minify` and be sure to commit the resulting `q.min.js`.
+-   Note the Gzipped size output by the previous command, and update
+    `README.md` if it has changed to 1 significant digit.
+-   Stash any local changes.
+-   Update `CHANGES.md` to reflect all changes in the differences
+    between `HEAD` and the previous tagged version.  Give credit where
+    credit is due.
+-   Update `README.md` to address all new, non-experimental features.
+-   Update the API reference on the Wiki to reflect all non-experimental
+    features.
+-   Use `npm version major|minor|patch` to update `package.json`,
+    commit, and tag the new version.
+-   Use `npm publish` to send up a new release.
+-   Send an email to the q-continuum mailing list announcing the new
+    release and the notes from the change log.  This helps folks
+    maintaining other package ecosystems.
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/LICENSE
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/LICENSE b/test/cordova/node_modules/q/LICENSE
new file mode 100644
index 0000000..76c5fe4
--- /dev/null
+++ b/test/cordova/node_modules/q/LICENSE
@@ -0,0 +1,19 @@
+
+Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/README.md
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/README.md b/test/cordova/node_modules/q/README.md
new file mode 100644
index 0000000..c0f513c
--- /dev/null
+++ b/test/cordova/node_modules/q/README.md
@@ -0,0 +1,813 @@
+[![Build Status](https://secure.travis-ci.org/kriskowal/q.png?branch=master)](http://travis-ci.org/kriskowal/q)
+
+<a href="http://promises-aplus.github.com/promises-spec">
+    <img src="http://promises-aplus.github.com/promises-spec/assets/logo-small.png"
+         align="right" alt="Promises/A+ logo" />
+</a>
+
+If a function cannot return a value or throw an exception without
+blocking, it can return a promise instead.  A promise is an object
+that represents the return value or the thrown exception that the
+function may eventually provide.  A promise can also be used as a
+proxy for a [remote object][Q-Connection] to overcome latency.
+
+[Q-Connection]: https://github.com/kriskowal/q-connection
+
+On the first pass, promises can mitigate the “[Pyramid of
+Doom][POD]”: the situation where code marches to the right faster
+than it marches forward.
+
+[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
+
+```javascript
+step1(function (value1) {
+    step2(value1, function(value2) {
+        step3(value2, function(value3) {
+            step4(value3, function(value4) {
+                // Do something with value4
+            });
+        });
+    });
+});
+```
+
+With a promise library, you can flatten the pyramid.
+
+```javascript
+Q.fcall(promisedStep1)
+.then(promisedStep2)
+.then(promisedStep3)
+.then(promisedStep4)
+.then(function (value4) {
+    // Do something with value4
+})
+.catch(function (error) {
+    // Handle any error from all above steps
+})
+.done();
+```
+
+With this approach, you also get implicit error propagation, just like `try`,
+`catch`, and `finally`.  An error in `promisedStep1` will flow all the way to
+the `catch` function, where it’s caught and handled.  (Here `promisedStepN` is
+a version of `stepN` that returns a promise.)
+
+The callback approach is called an “inversion of control”.
+A function that accepts a callback instead of a return value
+is saying, “Don’t call me, I’ll call you.”.  Promises
+[un-invert][IOC] the inversion, cleanly separating the input
+arguments from control flow arguments.  This simplifies the
+use and creation of API’s, particularly variadic,
+rest and spread arguments.
+
+[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript
+
+
+## Getting Started
+
+The Q module can be loaded as:
+
+-   A ``<script>`` tag (creating a ``Q`` global variable): ~2.5 KB minified and
+    gzipped.
+-   A Node.js and CommonJS module, available in [npm](https://npmjs.org/) as
+    the [q](https://npmjs.org/package/q) package
+-   An AMD module
+-   A [component](https://github.com/component/component) as ``microjs/q``
+-   Using [bower](http://bower.io/) as ``q``
+-   Using [NuGet](http://nuget.org/) as [Q](https://nuget.org/packages/q)
+
+Q can exchange promises with jQuery, Dojo, When.js, WinJS, and more.
+
+## Resources
+
+Our [wiki][] contains a number of useful resources, including:
+
+- A method-by-method [Q API reference][reference].
+- A growing [examples gallery][examples], showing how Q can be used to make
+  everything better. From XHR to database access to accessing the Flickr API,
+  Q is there for you.
+- There are many libraries that produce and consume Q promises for everything
+  from file system/database access or RPC to templating. For a list of some of
+  the more popular ones, see [Libraries][].
+- If you want materials that introduce the promise concept generally, and the
+  below tutorial isn't doing it for you, check out our collection of
+  [presentations, blog posts, and podcasts][resources].
+- A guide for those [coming from jQuery's `$.Deferred`][jquery].
+
+We'd also love to have you join the Q-Continuum [mailing list][].
+
+[wiki]: https://github.com/kriskowal/q/wiki
+[reference]: https://github.com/kriskowal/q/wiki/API-Reference
+[examples]: https://github.com/kriskowal/q/wiki/Examples-Gallery
+[Libraries]: https://github.com/kriskowal/q/wiki/Libraries
+[resources]: https://github.com/kriskowal/q/wiki/General-Promise-Resources
+[jquery]: https://github.com/kriskowal/q/wiki/Coming-from-jQuery
+[mailing list]: https://groups.google.com/forum/#!forum/q-continuum
+
+
+## Tutorial
+
+Promises have a ``then`` method, which you can use to get the eventual
+return value (fulfillment) or thrown exception (rejection).
+
+```javascript
+promiseMeSomething()
+.then(function (value) {
+}, function (reason) {
+});
+```
+
+If ``promiseMeSomething`` returns a promise that gets fulfilled later
+with a return value, the first function (the fulfillment handler) will be
+called with the value.  However, if the ``promiseMeSomething`` function
+gets rejected later by a thrown exception, the second function (the
+rejection handler) will be called with the exception.
+
+Note that resolution of a promise is always asynchronous: that is, the
+fulfillment or rejection handler will always be called in the next turn of the
+event loop (i.e. `process.nextTick` in Node). This gives you a nice
+guarantee when mentally tracing the flow of your code, namely that
+``then`` will always return before either handler is executed.
+
+In this tutorial, we begin with how to consume and work with promises. We'll
+talk about how to create them, and thus create functions like
+`promiseMeSomething` that return promises, [below](#the-beginning).
+
+
+### Propagation
+
+The ``then`` method returns a promise, which in this example, I’m
+assigning to ``outputPromise``.
+
+```javascript
+var outputPromise = getInputPromise()
+.then(function (input) {
+}, function (reason) {
+});
+```
+
+The ``outputPromise`` variable becomes a new promise for the return
+value of either handler.  Since a function can only either return a
+value or throw an exception, only one handler will ever be called and it
+will be responsible for resolving ``outputPromise``.
+
+-   If you return a value in a handler, ``outputPromise`` will get
+    fulfilled.
+
+-   If you throw an exception in a handler, ``outputPromise`` will get
+    rejected.
+
+-   If you return a **promise** in a handler, ``outputPromise`` will
+    “become” that promise.  Being able to become a new promise is useful
+    for managing delays, combining results, or recovering from errors.
+
+If the ``getInputPromise()`` promise gets rejected and you omit the
+rejection handler, the **error** will go to ``outputPromise``:
+
+```javascript
+var outputPromise = getInputPromise()
+.then(function (value) {
+});
+```
+
+If the input promise gets fulfilled and you omit the fulfillment handler, the
+**value** will go to ``outputPromise``:
+
+```javascript
+var outputPromise = getInputPromise()
+.then(null, function (error) {
+});
+```
+
+Q promises provide a ``fail`` shorthand for ``then`` when you are only
+interested in handling the error:
+
+```javascript
+var outputPromise = getInputPromise()
+.fail(function (error) {
+});
+```
+
+If you are writing JavaScript for modern engines only or using
+CoffeeScript, you may use `catch` instead of `fail`.
+
+Promises also have a ``fin`` function that is like a ``finally`` clause.
+The final handler gets called, with no arguments, when the promise
+returned by ``getInputPromise()`` either returns a value or throws an
+error.  The value returned or error thrown by ``getInputPromise()``
+passes directly to ``outputPromise`` unless the final handler fails, and
+may be delayed if the final handler returns a promise.
+
+```javascript
+var outputPromise = getInputPromise()
+.fin(function () {
+    // close files, database connections, stop servers, conclude tests
+});
+```
+
+-   If the handler returns a value, the value is ignored
+-   If the handler throws an error, the error passes to ``outputPromise``
+-   If the handler returns a promise, ``outputPromise`` gets postponed.  The
+    eventual value or error has the same effect as an immediate return
+    value or thrown error: a value would be ignored, an error would be
+    forwarded.
+
+If you are writing JavaScript for modern engines only or using
+CoffeeScript, you may use `finally` instead of `fin`.
+
+### Chaining
+
+There are two ways to chain promises.  You can chain promises either
+inside or outside handlers.  The next two examples are equivalent.
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return getUser(username)
+    .then(function (user) {
+        // if we get here without an error,
+        // the value returned here
+        // or the exception thrown here
+        // resolves the promise returned
+        // by the first line
+    })
+});
+```
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return getUser(username);
+})
+.then(function (user) {
+    // if we get here without an error,
+    // the value returned here
+    // or the exception thrown here
+    // resolves the promise returned
+    // by the first line
+});
+```
+
+The only difference is nesting.  It’s useful to nest handlers if you
+need to capture multiple input values in your closure.
+
+```javascript
+function authenticate() {
+    return getUsername()
+    .then(function (username) {
+        return getUser(username);
+    })
+    // chained because we will not need the user name in the next event
+    .then(function (user) {
+        return getPassword()
+        // nested because we need both user and password next
+        .then(function (password) {
+            if (user.passwordHash !== hash(password)) {
+                throw new Error("Can't authenticate");
+            }
+        });
+    });
+}
+```
+
+
+### Combination
+
+You can turn an array of promises into a promise for the whole,
+fulfilled array using ``all``.
+
+```javascript
+return Q.all([
+    eventualAdd(2, 2),
+    eventualAdd(10, 20)
+]);
+```
+
+If you have a promise for an array, you can use ``spread`` as a
+replacement for ``then``.  The ``spread`` function “spreads” the
+values over the arguments of the fulfillment handler.  The rejection handler
+will get called at the first sign of failure.  That is, whichever of
+the recived promises fails first gets handled by the rejection handler.
+
+```javascript
+function eventualAdd(a, b) {
+    return Q.spread([a, b], function (a, b) {
+        return a + b;
+    })
+}
+```
+
+But ``spread`` calls ``all`` initially, so you can skip it in chains.
+
+```javascript
+return getUsername()
+.then(function (username) {
+    return [username, getUser(username)];
+})
+.spread(function (username, user) {
+});
+```
+
+The ``all`` function returns a promise for an array of values.  When this
+promise is fulfilled, the array contains the fulfillment values of the original
+promises, in the same order as those promises.  If one of the given promises
+is rejected, the returned promise is immediately rejected, not waiting for the
+rest of the batch.  If you want to wait for all of the promises to either be
+fulfilled or rejected, you can use ``allSettled``.
+
+```javascript
+Q.allSettled(promises)
+.then(function (results) {
+    results.forEach(function (result) {
+        if (result.state === "fulfilled") {
+            var value = result.value;
+        } else {
+            var reason = result.reason;
+        }
+    });
+});
+```
+
+
+### Sequences
+
+If you have a number of promise-producing functions that need
+to be run sequentially, you can of course do so manually:
+
+```javascript
+return foo(initialVal).then(bar).then(baz).then(qux);
+```
+
+However, if you want to run a dynamically constructed sequence of
+functions, you'll want something like this:
+
+```javascript
+var funcs = [foo, bar, baz, qux];
+
+var result = Q(initialVal);
+funcs.forEach(function (f) {
+    result = result.then(f);
+});
+return result;
+```
+
+You can make this slightly more compact using `reduce`:
+
+```javascript
+return funcs.reduce(function (soFar, f) {
+    return soFar.then(f);
+}, Q(initialVal));
+```
+
+Or, you could use th ultra-compact version:
+
+```javascript
+return funcs.reduce(Q.when, Q());
+```
+
+### Handling Errors
+
+One sometimes-unintuive aspect of promises is that if you throw an
+exception in the fulfillment handler, it will not be be caught by the error
+handler.
+
+```javascript
+return foo()
+.then(function (value) {
+    throw new Error("Can't bar.");
+}, function (error) {
+    // We only get here if "foo" fails
+});
+```
+
+To see why this is, consider the parallel between promises and
+``try``/``catch``. We are ``try``-ing to execute ``foo()``: the error
+handler represents a ``catch`` for ``foo()``, while the fulfillment handler
+represents code that happens *after* the ``try``/``catch`` block.
+That code then needs its own ``try``/``catch`` block.
+
+In terms of promises, this means chaining your rejection handler:
+
+```javascript
+return foo()
+.then(function (value) {
+    throw new Error("Can't bar.");
+})
+.fail(function (error) {
+    // We get here with either foo's error or bar's error
+});
+```
+
+### Progress Notification
+
+It's possible for promises to report their progress, e.g. for tasks that take a
+long time like a file upload. Not all promises will implement progress
+notifications, but for those that do, you can consume the progress values using
+a third parameter to ``then``:
+
+```javascript
+return uploadFile()
+.then(function () {
+    // Success uploading the file
+}, function (err) {
+    // There was an error, and we get the reason for error
+}, function (progress) {
+    // We get notified of the upload's progress as it is executed
+});
+```
+
+Like `fail`, Q also provides a shorthand for progress callbacks
+called `progress`:
+
+```javascript
+return uploadFile().progress(function (progress) {
+    // We get notified of the upload's progress
+});
+```
+
+### The End
+
+When you get to the end of a chain of promises, you should either
+return the last promise or end the chain.  Since handlers catch
+errors, it’s an unfortunate pattern that the exceptions can go
+unobserved.
+
+So, either return it,
+
+```javascript
+return foo()
+.then(function () {
+    return "bar";
+});
+```
+
+Or, end it.
+
+```javascript
+foo()
+.then(function () {
+    return "bar";
+})
+.done();
+```
+
+Ending a promise chain makes sure that, if an error doesn’t get
+handled before the end, it will get rethrown and reported.
+
+This is a stopgap. We are exploring ways to make unhandled errors
+visible without any explicit handling.
+
+
+### The Beginning
+
+Everything above assumes you get a promise from somewhere else.  This
+is the common case.  Every once in a while, you will need to create a
+promise from scratch.
+
+#### Using ``Q.fcall``
+
+You can create a promise from a value using ``Q.fcall``.  This returns a
+promise for 10.
+
+```javascript
+return Q.fcall(function () {
+    return 10;
+});
+```
+
+You can also use ``fcall`` to get a promise for an exception.
+
+```javascript
+return Q.fcall(function () {
+    throw new Error("Can't do it");
+});
+```
+
+As the name implies, ``fcall`` can call functions, or even promised
+functions.  This uses the ``eventualAdd`` function above to add two
+numbers.
+
+```javascript
+return Q.fcall(eventualAdd, 2, 2);
+```
+
+
+#### Using Deferreds
+
+If you have to interface with asynchronous functions that are callback-based
+instead of promise-based, Q provides a few shortcuts (like ``Q.nfcall`` and
+friends). But much of the time, the solution will be to use *deferreds*.
+
+```javascript
+var deferred = Q.defer();
+FS.readFile("foo.txt", "utf-8", function (error, text) {
+    if (error) {
+        deferred.reject(new Error(error));
+    } else {
+        deferred.resolve(text);
+    }
+});
+return deferred.promise;
+```
+
+Note that a deferred can be resolved with a value or a promise.  The
+``reject`` function is a shorthand for resolving with a rejected
+promise.
+
+```javascript
+// this:
+deferred.reject(new Error("Can't do it"));
+
+// is shorthand for:
+var rejection = Q.fcall(function () {
+    throw new Error("Can't do it");
+});
+deferred.resolve(rejection);
+```
+
+This is a simplified implementation of ``Q.delay``.
+
+```javascript
+function delay(ms) {
+    var deferred = Q.defer();
+    setTimeout(deferred.resolve, ms);
+    return deferred.promise;
+}
+```
+
+This is a simplified implementation of ``Q.timeout``
+
+```javascript
+function timeout(promise, ms) {
+    var deferred = Q.defer();
+    Q.when(promise, deferred.resolve);
+    delay(ms).then(function () {
+        deferred.reject(new Error("Timed out"));
+    });
+    return deferred.promise;
+}
+```
+
+Finally, you can send a progress notification to the promise with
+``deferred.notify``.
+
+For illustration, this is a wrapper for XML HTTP requests in the browser. Note
+that a more [thorough][XHR] implementation would be in order in practice.
+
+[XHR]: https://github.com/montagejs/mr/blob/71e8df99bb4f0584985accd6f2801ef3015b9763/browser.js#L29-L73
+
+```javascript
+function requestOkText(url) {
+    var request = new XMLHttpRequest();
+    var deferred = Q.defer();
+
+    request.open("GET", url, true);
+    request.onload = onload;
+    request.onerror = onerror;
+    request.onprogress = onprogress;
+    request.send();
+
+    function onload() {
+        if (request.status === 200) {
+            deferred.resolve(request.responseText);
+        } else {
+            deferred.reject(new Error("Status code was " + request.status));
+        }
+    }
+
+    function onerror() {
+        deferred.reject(new Error("Can't XHR " + JSON.stringify(url)));
+    }
+
+    function onprogress(event) {
+        deferred.notify(event.loaded / event.total);
+    }
+
+    return deferred.promise;
+}
+```
+
+Below is an example of how to use this ``requestOkText`` function:
+
+```javascript
+requestOkText("http://localhost:3000")
+.then(function (responseText) {
+    // If the HTTP response returns 200 OK, log the response text.
+    console.log(responseText);
+}, function (error) {
+    // If there's an error or a non-200 status code, log the error.
+    console.error(error);
+}, function (progress) {
+    // Log the progress as it comes in.
+    console.log("Request progress: " + Math.round(progress * 100) + "%");
+});
+```
+
+### The Middle
+
+If you are using a function that may return a promise, but just might
+return a value if it doesn’t need to defer, you can use the “static”
+methods of the Q library.
+
+The ``when`` function is the static equivalent for ``then``.
+
+```javascript
+return Q.when(valueOrPromise, function (value) {
+}, function (error) {
+});
+```
+
+All of the other methods on a promise have static analogs with the
+same name.
+
+The following are equivalent:
+
+```javascript
+return Q.all([a, b]);
+```
+
+```javascript
+return Q.fcall(function () {
+    return [a, b];
+})
+.all();
+```
+
+When working with promises provided by other libraries, you should
+convert it to a Q promise.  Not all promise libraries make the same
+guarantees as Q and certainly don’t provide all of the same methods.
+Most libraries only provide a partially functional ``then`` method.
+This thankfully is all we need to turn them into vibrant Q promises.
+
+```javascript
+return Q($.ajax(...))
+.then(function () {
+});
+```
+
+If there is any chance that the promise you receive is not a Q promise
+as provided by your library, you should wrap it using a Q function.
+You can even use ``Q.invoke`` as a shorthand.
+
+```javascript
+return Q.invoke($, 'ajax', ...)
+.then(function () {
+});
+```
+
+
+### Over the Wire
+
+A promise can serve as a proxy for another object, even a remote
+object.  There are methods that allow you to optimistically manipulate
+properties or call functions.  All of these interactions return
+promises, so they can be chained.
+
+```
+direct manipulation         using a promise as a proxy
+--------------------------  -------------------------------
+value.foo                   promise.get("foo")
+value.foo = value           promise.put("foo", value)
+delete value.foo            promise.del("foo")
+value.foo(...args)          promise.post("foo", [args])
+value.foo(...args)          promise.invoke("foo", ...args)
+value(...args)              promise.fapply([args])
+value(...args)              promise.fcall(...args)
+```
+
+If the promise is a proxy for a remote object, you can shave
+round-trips by using these functions instead of ``then``.  To take
+advantage of promises for remote objects, check out [Q-Connection][].
+
+[Q-Connection]: https://github.com/kriskowal/q-connection
+
+Even in the case of non-remote objects, these methods can be used as
+shorthand for particularly-simple fulfillment handlers. For example, you
+can replace
+
+```javascript
+return Q.fcall(function () {
+    return [{ foo: "bar" }, { foo: "baz" }];
+})
+.then(function (value) {
+    return value[0].foo;
+});
+```
+
+with
+
+```javascript
+return Q.fcall(function () {
+    return [{ foo: "bar" }, { foo: "baz" }];
+})
+.get(0)
+.get("foo");
+```
+
+
+### Adapting Node
+
+If you're working with functions that make use of the Node.js callback pattern,
+where callbacks are in the form of `function(err, result)`, Q provides a few
+useful utility functions for converting between them. The most straightforward
+are probably `Q.nfcall` and `Q.nfapply` ("Node function call/apply") for calling
+Node.js-style functions and getting back a promise:
+
+```javascript
+return Q.nfcall(FS.readFile, "foo.txt", "utf-8");
+return Q.nfapply(FS.readFile, ["foo.txt", "utf-8"]);
+```
+
+If you are working with methods, instead of simple functions, you can easily
+run in to the usual problems where passing a method to another function—like
+`Q.nfcall`—"un-binds" the method from its owner. To avoid this, you can either
+use `Function.prototype.bind` or some nice shortcut methods we provide:
+
+```javascript
+return Q.ninvoke(redisClient, "get", "user:1:id");
+return Q.npost(redisClient, "get", ["user:1:id"]);
+```
+
+You can also create reusable wrappers with `Q.denodeify` or `Q.nbind`:
+
+```javascript
+var readFile = Q.denodeify(FS.readFile);
+return readFile("foo.txt", "utf-8");
+
+var redisClientGet = Q.nbind(redisClient.get, redisClient);
+return redisClientGet("user:1:id");
+```
+
+Finally, if you're working with raw deferred objects, there is a
+`makeNodeResolver` method on deferreds that can be handy:
+
+```javascript
+var deferred = Q.defer();
+FS.readFile("foo.txt", "utf-8", deferred.makeNodeResolver());
+return deferred.promise;
+```
+
+### Long Stack Traces
+
+Q comes with optional support for “long stack traces,” wherein the `stack`
+property of `Error` rejection reasons is rewritten to be traced along
+asynchronous jumps instead of stopping at the most recent one. As an example:
+
+```js
+function theDepthsOfMyProgram() {
+  Q.delay(100).done(function explode() {
+    throw new Error("boo!");
+  });
+}
+
+theDepthsOfMyProgram();
+```
+
+usually would give a rather unhelpful stack trace looking something like
+
+```
+Error: boo!
+    at explode (/path/to/test.js:3:11)
+    at _fulfilled (/path/to/test.js:q:54)
+    at resolvedValue.promiseDispatch.done (/path/to/q.js:823:30)
+    at makePromise.promise.promiseDispatch (/path/to/q.js:496:13)
+    at pending (/path/to/q.js:397:39)
+    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
+```
+
+But, if you turn this feature on by setting
+
+```js
+Q.longStackSupport = true;
+```
+
+then the above code gives a nice stack trace to the tune of
+
+```
+Error: boo!
+    at explode (/path/to/test.js:3:11)
+From previous event:
+    at theDepthsOfMyProgram (/path/to/test.js:2:16)
+    at Object.<anonymous> (/path/to/test.js:7:1)
+```
+
+Note how you can see the the function that triggered the async operation in the
+stack trace! This is very helpful for debugging, as otherwise you end up getting
+only the first line, plus a bunch of Q internals, with no sign of where the
+operation started.
+
+This feature does come with somewhat-serious performance and memory overhead,
+however. If you're working with lots of promises, or trying to scale a server
+to many users, you should probably keep it off. But in development, go for it!
+
+## Tests
+
+You can view the results of the Q test suite [in your browser][tests]!
+
+[tests]: https://rawgithub.com/kriskowal/q/master/spec/q-spec.html
+
+## License
+
+Copyright 2009–2013 Kristopher Michael Kowal
+MIT License (enclosed)
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/benchmark/compare-with-callbacks.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/benchmark/compare-with-callbacks.js b/test/cordova/node_modules/q/benchmark/compare-with-callbacks.js
new file mode 100644
index 0000000..97f1298
--- /dev/null
+++ b/test/cordova/node_modules/q/benchmark/compare-with-callbacks.js
@@ -0,0 +1,71 @@
+"use strict";
+
+var Q = require("../q");
+var fs = require("fs");
+
+suite("A single simple async operation", function () {
+    bench("with an immediately-fulfilled promise", function (done) {
+        Q().then(done);
+    });
+
+    bench("with direct setImmediate usage", function (done) {
+        setImmediate(done);
+    });
+
+    bench("with direct setTimeout(…, 0)", function (done) {
+        setTimeout(done, 0);
+    });
+});
+
+suite("A fs.readFile", function () {
+    var denodeified = Q.denodeify(fs.readFile);
+
+    set("iterations", 1000);
+    set("delay", 1000);
+
+    bench("directly, with callbacks", function (done) {
+        fs.readFile(__filename, done);
+    });
+
+    bench("with Q.nfcall", function (done) {
+        Q.nfcall(fs.readFile, __filename).then(done);
+    });
+
+    bench("with a Q.denodeify'ed version", function (done) {
+        denodeified(__filename).then(done);
+    });
+
+    bench("with manual usage of deferred.makeNodeResolver", function (done) {
+        var deferred = Q.defer();
+        fs.readFile(__filename, deferred.makeNodeResolver());
+        deferred.promise.then(done);
+    });
+});
+
+suite("1000 operations in parallel", function () {
+    function makeCounter(desiredCount, ultimateCallback) {
+        var soFar = 0;
+        return function () {
+            if (++soFar === desiredCount) {
+                ultimateCallback();
+            }
+        };
+    }
+    var numberOfOps = 1000;
+
+    bench("with immediately-fulfilled promises", function (done) {
+        var counter = makeCounter(numberOfOps, done);
+
+        for (var i = 0; i < numberOfOps; ++i) {
+            Q().then(counter);
+        }
+    });
+
+    bench("with direct setImmediate usage", function (done) {
+        var counter = makeCounter(numberOfOps, done);
+
+        for (var i = 0; i < numberOfOps; ++i) {
+            setImmediate(counter);
+        }
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/benchmark/scenarios.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/benchmark/scenarios.js b/test/cordova/node_modules/q/benchmark/scenarios.js
new file mode 100644
index 0000000..7c18564
--- /dev/null
+++ b/test/cordova/node_modules/q/benchmark/scenarios.js
@@ -0,0 +1,36 @@
+"use strict";
+
+var Q = require("../q");
+
+suite("Chaining", function () {
+    var numberToChain = 1000;
+
+    bench("Chaining many already-fulfilled promises together", function (done) {
+        var currentPromise = Q();
+        for (var i = 0; i < numberToChain; ++i) {
+            currentPromise = currentPromise.then(function () {
+                return Q();
+            });
+        }
+
+        currentPromise.then(done);
+    });
+
+    bench("Chaining and then fulfilling the end of the chain", function (done) {
+        var deferred = Q.defer();
+
+        var currentPromise = deferred.promise;
+        for (var i = 0; i < numberToChain; ++i) {
+            (function () {
+                var promiseToReturn = currentPromise;
+                currentPromise = Q().then(function () {
+                    return promiseToReturn;
+                });
+            }());
+        }
+
+        currentPromise.then(done);
+
+        deferred.resolve();
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/package.json
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/package.json b/test/cordova/node_modules/q/package.json
new file mode 100644
index 0000000..2ef9436
--- /dev/null
+++ b/test/cordova/node_modules/q/package.json
@@ -0,0 +1,93 @@
+{
+  "name": "q",
+  "version": "0.9.7",
+  "description": "A library for promises (CommonJS/Promises/A,B,D)",
+  "homepage": "https://github.com/kriskowal/q",
+  "author": {
+    "name": "Kris Kowal",
+    "email": "kris@cixar.com",
+    "url": "https://github.com/kriskowal"
+  },
+  "keywords": [
+    "q",
+    "promise",
+    "promises",
+    "promises-a",
+    "promises-aplus",
+    "deferred",
+    "future",
+    "async",
+    "flow control",
+    "fluent",
+    "browser",
+    "node"
+  ],
+  "contributors": [
+    {
+      "name": "Kris Kowal",
+      "email": "kris@cixar.com",
+      "url": "https://github.com/kriskowal"
+    },
+    {
+      "name": "Irakli Gozalishvili",
+      "email": "rfobic@gmail.com",
+      "url": "http://jeditoolkit.com"
+    },
+    {
+      "name": "Domenic Denicola",
+      "email": "domenic@domenicdenicola.com",
+      "url": "http://domenicdenicola.com"
+    }
+  ],
+  "bugs": {
+    "url": "http://github.com/kriskowal/q/issues"
+  },
+  "license": {
+    "type": "MIT",
+    "url": "http://github.com/kriskowal/q/raw/master/LICENSE"
+  },
+  "main": "q.js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/kriskowal/q.git"
+  },
+  "engines": {
+    "node": ">=0.6.0",
+    "teleport": ">=0.2.0"
+  },
+  "dependencies": {},
+  "devDependencies": {
+    "jshint": "~2.1.9",
+    "cover": "*",
+    "jasmine-node": "1.11.0",
+    "opener": "*",
+    "promises-aplus-tests": "1.x",
+    "grunt": "~0.4.1",
+    "grunt-cli": "~0.1.9",
+    "grunt-contrib-uglify": "~0.2.2",
+    "matcha": "~0.2.0"
+  },
+  "scripts": {
+    "test": "jasmine-node spec && promises-aplus-tests spec/aplus-adapter",
+    "test-browser": "opener spec/q-spec.html",
+    "benchmark": "matcha",
+    "lint": "jshint q.js",
+    "cover": "cover run node_modules/jasmine-node/bin/jasmine-node spec && cover report html && opener cover_html/index.html",
+    "minify": "grunt",
+    "prepublish": "grunt"
+  },
+  "overlay": {
+    "teleport": {
+      "dependencies": {
+        "system": ">=0.0.4"
+      }
+    }
+  },
+  "directories": {
+    "test": "./spec"
+  },
+  "readme": "[![Build Status](https://secure.travis-ci.org/kriskowal/q.png?branch=master)](http://travis-ci.org/kriskowal/q)\n\n<a href=\"http://promises-aplus.github.com/promises-spec\">\n    <img src=\"http://promises-aplus.github.com/promises-spec/assets/logo-small.png\"\n         align=\"right\" alt=\"Promises/A+ logo\" />\n</a>\n\nIf a function cannot return a value or throw an exception without\nblocking, it can return a promise instead.  A promise is an object\nthat represents the return value or the thrown exception that the\nfunction may eventually provide.  A promise can also be used as a\nproxy for a [remote object][Q-Connection] to overcome latency.\n\n[Q-Connection]: https://github.com/kriskowal/q-connection\n\nOn the first pass, promises can mitigate the “[Pyramid of\nDoom][POD]”: the situation where code marches to the right faster\nthan it marches forward.\n\n[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/\n\n```javascript\nstep1(
 function (value1) {\n    step2(value1, function(value2) {\n        step3(value2, function(value3) {\n            step4(value3, function(value4) {\n                // Do something with value4\n            });\n        });\n    });\n});\n```\n\nWith a promise library, you can flatten the pyramid.\n\n```javascript\nQ.fcall(promisedStep1)\n.then(promisedStep2)\n.then(promisedStep3)\n.then(promisedStep4)\n.then(function (value4) {\n    // Do something with value4\n})\n.catch(function (error) {\n    // Handle any error from all above steps\n})\n.done();\n```\n\nWith this approach, you also get implicit error propagation, just like `try`,\n`catch`, and `finally`.  An error in `promisedStep1` will flow all the way to\nthe `catch` function, where it’s caught and handled.  (Here `promisedStepN` is\na version of `stepN` that returns a promise.)\n\nThe callback approach is called an “inversion of control”.\nA function that accepts a callback instead of a return value\nis saying, “Don’
 t call me, I’ll call you.”.  Promises\n[un-invert][IOC] the inversion, cleanly separating the input\narguments from control flow arguments.  This simplifies the\nuse and creation of API’s, particularly variadic,\nrest and spread arguments.\n\n[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript\n\n\n## Getting Started\n\nThe Q module can be loaded as:\n\n-   A ``<script>`` tag (creating a ``Q`` global variable): ~2.5 KB minified and\n    gzipped.\n-   A Node.js and CommonJS module, available in [npm](https://npmjs.org/) as\n    the [q](https://npmjs.org/package/q) package\n-   An AMD module\n-   A [component](https://github.com/component/component) as ``microjs/q``\n-   Using [bower](http://bower.io/) as ``q``\n-   Using [NuGet](http://nuget.org/) as [Q](https://nuget.org/packages/q)\n\nQ can exchange promises with jQuery, Dojo, When.js, WinJS, and more.\n\n## Resources\n\nOur [wiki][] contains a
  number of useful resources, including:\n\n- A method-by-method [Q API reference][reference].\n- A growing [examples gallery][examples], showing how Q can be used to make\n  everything better. From XHR to database access to accessing the Flickr API,\n  Q is there for you.\n- There are many libraries that produce and consume Q promises for everything\n  from file system/database access or RPC to templating. For a list of some of\n  the more popular ones, see [Libraries][].\n- If you want materials that introduce the promise concept generally, and the\n  below tutorial isn't doing it for you, check out our collection of\n  [presentations, blog posts, and podcasts][resources].\n- A guide for those [coming from jQuery's `$.Deferred`][jquery].\n\nWe'd also love to have you join the Q-Continuum [mailing list][].\n\n[wiki]: https://github.com/kriskowal/q/wiki\n[reference]: https://github.com/kriskowal/q/wiki/API-Reference\n[examples]: https://github.com/kriskowal/q/wiki/Examples-Gallery\n[
 Libraries]: https://github.com/kriskowal/q/wiki/Libraries\n[resources]: https://github.com/kriskowal/q/wiki/General-Promise-Resources\n[jquery]: https://github.com/kriskowal/q/wiki/Coming-from-jQuery\n[mailing list]: https://groups.google.com/forum/#!forum/q-continuum\n\n\n## Tutorial\n\nPromises have a ``then`` method, which you can use to get the eventual\nreturn value (fulfillment) or thrown exception (rejection).\n\n```javascript\npromiseMeSomething()\n.then(function (value) {\n}, function (reason) {\n});\n```\n\nIf ``promiseMeSomething`` returns a promise that gets fulfilled later\nwith a return value, the first function (the fulfillment handler) will be\ncalled with the value.  However, if the ``promiseMeSomething`` function\ngets rejected later by a thrown exception, the second function (the\nrejection handler) will be called with the exception.\n\nNote that resolution of a promise is always asynchronous: that is, the\nfulfillment or rejection handler will always be called in
  the next turn of the\nevent loop (i.e. `process.nextTick` in Node). This gives you a nice\nguarantee when mentally tracing the flow of your code, namely that\n``then`` will always return before either handler is executed.\n\nIn this tutorial, we begin with how to consume and work with promises. We'll\ntalk about how to create them, and thus create functions like\n`promiseMeSomething` that return promises, [below](#the-beginning).\n\n\n### Propagation\n\nThe ``then`` method returns a promise, which in this example, I’m\nassigning to ``outputPromise``.\n\n```javascript\nvar outputPromise = getInputPromise()\n.then(function (input) {\n}, function (reason) {\n});\n```\n\nThe ``outputPromise`` variable becomes a new promise for the return\nvalue of either handler.  Since a function can only either return a\nvalue or throw an exception, only one handler will ever be called and it\nwill be responsible for resolving ``outputPromise``.\n\n-   If you return a value in a handler, ``outputPr
 omise`` will get\n    fulfilled.\n\n-   If you throw an exception in a handler, ``outputPromise`` will get\n    rejected.\n\n-   If you return a **promise** in a handler, ``outputPromise`` will\n    “become” that promise.  Being able to become a new promise is useful\n    for managing delays, combining results, or recovering from errors.\n\nIf the ``getInputPromise()`` promise gets rejected and you omit the\nrejection handler, the **error** will go to ``outputPromise``:\n\n```javascript\nvar outputPromise = getInputPromise()\n.then(function (value) {\n});\n```\n\nIf the input promise gets fulfilled and you omit the fulfillment handler, the\n**value** will go to ``outputPromise``:\n\n```javascript\nvar outputPromise = getInputPromise()\n.then(null, function (error) {\n});\n```\n\nQ promises provide a ``fail`` shorthand for ``then`` when you are only\ninterested in handling the error:\n\n```javascript\nvar outputPromise = getInputPromise()\n.fail(function (error) {\n});\n```\n\nIf
  you are writing JavaScript for modern engines only or using\nCoffeeScript, you may use `catch` instead of `fail`.\n\nPromises also have a ``fin`` function that is like a ``finally`` clause.\nThe final handler gets called, with no arguments, when the promise\nreturned by ``getInputPromise()`` either returns a value or throws an\nerror.  The value returned or error thrown by ``getInputPromise()``\npasses directly to ``outputPromise`` unless the final handler fails, and\nmay be delayed if the final handler returns a promise.\n\n```javascript\nvar outputPromise = getInputPromise()\n.fin(function () {\n    // close files, database connections, stop servers, conclude tests\n});\n```\n\n-   If the handler returns a value, the value is ignored\n-   If the handler throws an error, the error passes to ``outputPromise``\n-   If the handler returns a promise, ``outputPromise`` gets postponed.  The\n    eventual value or error has the same effect as an immediate return\n    value or thrown erro
 r: a value would be ignored, an error would be\n    forwarded.\n\nIf you are writing JavaScript for modern engines only or using\nCoffeeScript, you may use `finally` instead of `fin`.\n\n### Chaining\n\nThere are two ways to chain promises.  You can chain promises either\ninside or outside handlers.  The next two examples are equivalent.\n\n```javascript\nreturn getUsername()\n.then(function (username) {\n    return getUser(username)\n    .then(function (user) {\n        // if we get here without an error,\n        // the value returned here\n        // or the exception thrown here\n        // resolves the promise returned\n        // by the first line\n    })\n});\n```\n\n```javascript\nreturn getUsername()\n.then(function (username) {\n    return getUser(username);\n})\n.then(function (user) {\n    // if we get here without an error,\n    // the value returned here\n    // or the exception thrown here\n    // resolves the promise returned\n    // by the first line\n});\n```\n\nThe
  only difference is nesting.  It’s useful to nest handlers if you\nneed to capture multiple input values in your closure.\n\n```javascript\nfunction authenticate() {\n    return getUsername()\n    .then(function (username) {\n        return getUser(username);\n    })\n    // chained because we will not need the user name in the next event\n    .then(function (user) {\n        return getPassword()\n        // nested because we need both user and password next\n        .then(function (password) {\n            if (user.passwordHash !== hash(password)) {\n                throw new Error(\"Can't authenticate\");\n            }\n        });\n    });\n}\n```\n\n\n### Combination\n\nYou can turn an array of promises into a promise for the whole,\nfulfilled array using ``all``.\n\n```javascript\nreturn Q.all([\n    eventualAdd(2, 2),\n    eventualAdd(10, 20)\n]);\n```\n\nIf you have a promise for an array, you can use ``spread`` as a\nreplacement for ``then``.  The ``spread`` function “s
 preads” the\nvalues over the arguments of the fulfillment handler.  The rejection handler\nwill get called at the first sign of failure.  That is, whichever of\nthe recived promises fails first gets handled by the rejection handler.\n\n```javascript\nfunction eventualAdd(a, b) {\n    return Q.spread([a, b], function (a, b) {\n        return a + b;\n    })\n}\n```\n\nBut ``spread`` calls ``all`` initially, so you can skip it in chains.\n\n```javascript\nreturn getUsername()\n.then(function (username) {\n    return [username, getUser(username)];\n})\n.spread(function (username, user) {\n});\n```\n\nThe ``all`` function returns a promise for an array of values.  When this\npromise is fulfilled, the array contains the fulfillment values of the original\npromises, in the same order as those promises.  If one of the given promises\nis rejected, the returned promise is immediately rejected, not waiting for the\nrest of the batch.  If you want to wait for all of the promises to either be\
 nfulfilled or rejected, you can use ``allSettled``.\n\n```javascript\nQ.allSettled(promises)\n.then(function (results) {\n    results.forEach(function (result) {\n        if (result.state === \"fulfilled\") {\n            var value = result.value;\n        } else {\n            var reason = result.reason;\n        }\n    });\n});\n```\n\n\n### Sequences\n\nIf you have a number of promise-producing functions that need\nto be run sequentially, you can of course do so manually:\n\n```javascript\nreturn foo(initialVal).then(bar).then(baz).then(qux);\n```\n\nHowever, if you want to run a dynamically constructed sequence of\nfunctions, you'll want something like this:\n\n```javascript\nvar funcs = [foo, bar, baz, qux];\n\nvar result = Q(initialVal);\nfuncs.forEach(function (f) {\n    result = result.then(f);\n});\nreturn result;\n```\n\nYou can make this slightly more compact using `reduce`:\n\n```javascript\nreturn funcs.reduce(function (soFar, f) {\n    return soFar.then(f);\n}, Q(initi
 alVal));\n```\n\nOr, you could use th ultra-compact version:\n\n```javascript\nreturn funcs.reduce(Q.when, Q());\n```\n\n### Handling Errors\n\nOne sometimes-unintuive aspect of promises is that if you throw an\nexception in the fulfillment handler, it will not be be caught by the error\nhandler.\n\n```javascript\nreturn foo()\n.then(function (value) {\n    throw new Error(\"Can't bar.\");\n}, function (error) {\n    // We only get here if \"foo\" fails\n});\n```\n\nTo see why this is, consider the parallel between promises and\n``try``/``catch``. We are ``try``-ing to execute ``foo()``: the error\nhandler represents a ``catch`` for ``foo()``, while the fulfillment handler\nrepresents code that happens *after* the ``try``/``catch`` block.\nThat code then needs its own ``try``/``catch`` block.\n\nIn terms of promises, this means chaining your rejection handler:\n\n```javascript\nreturn foo()\n.then(function (value) {\n    throw new Error(\"Can't bar.\");\n})\n.fail(function (error) {
 \n    // We get here with either foo's error or bar's error\n});\n```\n\n### Progress Notification\n\nIt's possible for promises to report their progress, e.g. for tasks that take a\nlong time like a file upload. Not all promises will implement progress\nnotifications, but for those that do, you can consume the progress values using\na third parameter to ``then``:\n\n```javascript\nreturn uploadFile()\n.then(function () {\n    // Success uploading the file\n}, function (err) {\n    // There was an error, and we get the reason for error\n}, function (progress) {\n    // We get notified of the upload's progress as it is executed\n});\n```\n\nLike `fail`, Q also provides a shorthand for progress callbacks\ncalled `progress`:\n\n```javascript\nreturn uploadFile().progress(function (progress) {\n    // We get notified of the upload's progress\n});\n```\n\n### The End\n\nWhen you get to the end of a chain of promises, you should either\nreturn the last promise or end the chain.  Since han
 dlers catch\nerrors, it’s an unfortunate pattern that the exceptions can go\nunobserved.\n\nSo, either return it,\n\n```javascript\nreturn foo()\n.then(function () {\n    return \"bar\";\n});\n```\n\nOr, end it.\n\n```javascript\nfoo()\n.then(function () {\n    return \"bar\";\n})\n.done();\n```\n\nEnding a promise chain makes sure that, if an error doesn’t get\nhandled before the end, it will get rethrown and reported.\n\nThis is a stopgap. We are exploring ways to make unhandled errors\nvisible without any explicit handling.\n\n\n### The Beginning\n\nEverything above assumes you get a promise from somewhere else.  This\nis the common case.  Every once in a while, you will need to create a\npromise from scratch.\n\n#### Using ``Q.fcall``\n\nYou can create a promise from a value using ``Q.fcall``.  This returns a\npromise for 10.\n\n```javascript\nreturn Q.fcall(function () {\n    return 10;\n});\n```\n\nYou can also use ``fcall`` to get a promise for an exception.\n\n```javascr
 ipt\nreturn Q.fcall(function () {\n    throw new Error(\"Can't do it\");\n});\n```\n\nAs the name implies, ``fcall`` can call functions, or even promised\nfunctions.  This uses the ``eventualAdd`` function above to add two\nnumbers.\n\n```javascript\nreturn Q.fcall(eventualAdd, 2, 2);\n```\n\n\n#### Using Deferreds\n\nIf you have to interface with asynchronous functions that are callback-based\ninstead of promise-based, Q provides a few shortcuts (like ``Q.nfcall`` and\nfriends). But much of the time, the solution will be to use *deferreds*.\n\n```javascript\nvar deferred = Q.defer();\nFS.readFile(\"foo.txt\", \"utf-8\", function (error, text) {\n    if (error) {\n        deferred.reject(new Error(error));\n    } else {\n        deferred.resolve(text);\n    }\n});\nreturn deferred.promise;\n```\n\nNote that a deferred can be resolved with a value or a promise.  The\n``reject`` function is a shorthand for resolving with a rejected\npromise.\n\n```javascript\n// this:\ndeferred.reject
 (new Error(\"Can't do it\"));\n\n// is shorthand for:\nvar rejection = Q.fcall(function () {\n    throw new Error(\"Can't do it\");\n});\ndeferred.resolve(rejection);\n```\n\nThis is a simplified implementation of ``Q.delay``.\n\n```javascript\nfunction delay(ms) {\n    var deferred = Q.defer();\n    setTimeout(deferred.resolve, ms);\n    return deferred.promise;\n}\n```\n\nThis is a simplified implementation of ``Q.timeout``\n\n```javascript\nfunction timeout(promise, ms) {\n    var deferred = Q.defer();\n    Q.when(promise, deferred.resolve);\n    delay(ms).then(function () {\n        deferred.reject(new Error(\"Timed out\"));\n    });\n    return deferred.promise;\n}\n```\n\nFinally, you can send a progress notification to the promise with\n``deferred.notify``.\n\nFor illustration, this is a wrapper for XML HTTP requests in the browser. Note\nthat a more [thorough][XHR] implementation would be in order in practice.\n\n[XHR]: https://github.com/montagejs/mr/blob/71e8df99bb4f058498
 5accd6f2801ef3015b9763/browser.js#L29-L73\n\n```javascript\nfunction requestOkText(url) {\n    var request = new XMLHttpRequest();\n    var deferred = Q.defer();\n\n    request.open(\"GET\", url, true);\n    request.onload = onload;\n    request.onerror = onerror;\n    request.onprogress = onprogress;\n    request.send();\n\n    function onload() {\n        if (request.status === 200) {\n            deferred.resolve(request.responseText);\n        } else {\n            deferred.reject(new Error(\"Status code was \" + request.status));\n        }\n    }\n\n    function onerror() {\n        deferred.reject(new Error(\"Can't XHR \" + JSON.stringify(url)));\n    }\n\n    function onprogress(event) {\n        deferred.notify(event.loaded / event.total);\n    }\n\n    return deferred.promise;\n}\n```\n\nBelow is an example of how to use this ``requestOkText`` function:\n\n```javascript\nrequestOkText(\"http://localhost:3000\")\n.then(function (responseText) {\n    // If the HTTP response 
 returns 200 OK, log the response text.\n    console.log(responseText);\n}, function (error) {\n    // If there's an error or a non-200 status code, log the error.\n    console.error(error);\n}, function (progress) {\n    // Log the progress as it comes in.\n    console.log(\"Request progress: \" + Math.round(progress * 100) + \"%\");\n});\n```\n\n### The Middle\n\nIf you are using a function that may return a promise, but just might\nreturn a value if it doesn’t need to defer, you can use the “static”\nmethods of the Q library.\n\nThe ``when`` function is the static equivalent for ``then``.\n\n```javascript\nreturn Q.when(valueOrPromise, function (value) {\n}, function (error) {\n});\n```\n\nAll of the other methods on a promise have static analogs with the\nsame name.\n\nThe following are equivalent:\n\n```javascript\nreturn Q.all([a, b]);\n```\n\n```javascript\nreturn Q.fcall(function () {\n    return [a, b];\n})\n.all();\n```\n\nWhen working with promises provided by other 
 libraries, you should\nconvert it to a Q promise.  Not all promise libraries make the same\nguarantees as Q and certainly don’t provide all of the same methods.\nMost libraries only provide a partially functional ``then`` method.\nThis thankfully is all we need to turn them into vibrant Q promises.\n\n```javascript\nreturn Q($.ajax(...))\n.then(function () {\n});\n```\n\nIf there is any chance that the promise you receive is not a Q promise\nas provided by your library, you should wrap it using a Q function.\nYou can even use ``Q.invoke`` as a shorthand.\n\n```javascript\nreturn Q.invoke($, 'ajax', ...)\n.then(function () {\n});\n```\n\n\n### Over the Wire\n\nA promise can serve as a proxy for another object, even a remote\nobject.  There are methods that allow you to optimistically manipulate\nproperties or call functions.  All of these interactions return\npromises, so they can be chained.\n\n```\ndirect manipulation         using a promise as a proxy\n--------------------------
   -------------------------------\nvalue.foo                   promise.get(\"foo\")\nvalue.foo = value           promise.put(\"foo\", value)\ndelete value.foo            promise.del(\"foo\")\nvalue.foo(...args)          promise.post(\"foo\", [args])\nvalue.foo(...args)          promise.invoke(\"foo\", ...args)\nvalue(...args)              promise.fapply([args])\nvalue(...args)              promise.fcall(...args)\n```\n\nIf the promise is a proxy for a remote object, you can shave\nround-trips by using these functions instead of ``then``.  To take\nadvantage of promises for remote objects, check out [Q-Connection][].\n\n[Q-Connection]: https://github.com/kriskowal/q-connection\n\nEven in the case of non-remote objects, these methods can be used as\nshorthand for particularly-simple fulfillment handlers. For example, you\ncan replace\n\n```javascript\nreturn Q.fcall(function () {\n    return [{ foo: \"bar\" }, { foo: \"baz\" }];\n})\n.then(function (value) {\n    return value[0].foo;\
 n});\n```\n\nwith\n\n```javascript\nreturn Q.fcall(function () {\n    return [{ foo: \"bar\" }, { foo: \"baz\" }];\n})\n.get(0)\n.get(\"foo\");\n```\n\n\n### Adapting Node\n\nIf you're working with functions that make use of the Node.js callback pattern,\nwhere callbacks are in the form of `function(err, result)`, Q provides a few\nuseful utility functions for converting between them. The most straightforward\nare probably `Q.nfcall` and `Q.nfapply` (\"Node function call/apply\") for calling\nNode.js-style functions and getting back a promise:\n\n```javascript\nreturn Q.nfcall(FS.readFile, \"foo.txt\", \"utf-8\");\nreturn Q.nfapply(FS.readFile, [\"foo.txt\", \"utf-8\"]);\n```\n\nIf you are working with methods, instead of simple functions, you can easily\nrun in to the usual problems where passing a method to another function—like\n`Q.nfcall`—\"un-binds\" the method from its owner. To avoid this, you can either\nuse `Function.prototype.bind` or some nice shortcut methods we prov
 ide:\n\n```javascript\nreturn Q.ninvoke(redisClient, \"get\", \"user:1:id\");\nreturn Q.npost(redisClient, \"get\", [\"user:1:id\"]);\n```\n\nYou can also create reusable wrappers with `Q.denodeify` or `Q.nbind`:\n\n```javascript\nvar readFile = Q.denodeify(FS.readFile);\nreturn readFile(\"foo.txt\", \"utf-8\");\n\nvar redisClientGet = Q.nbind(redisClient.get, redisClient);\nreturn redisClientGet(\"user:1:id\");\n```\n\nFinally, if you're working with raw deferred objects, there is a\n`makeNodeResolver` method on deferreds that can be handy:\n\n```javascript\nvar deferred = Q.defer();\nFS.readFile(\"foo.txt\", \"utf-8\", deferred.makeNodeResolver());\nreturn deferred.promise;\n```\n\n### Long Stack Traces\n\nQ comes with optional support for “long stack traces,” wherein the `stack`\nproperty of `Error` rejection reasons is rewritten to be traced along\nasynchronous jumps instead of stopping at the most recent one. As an example:\n\n```js\nfunction theDepthsOfMyProgram() {\n  Q.d
 elay(100).done(function explode() {\n    throw new Error(\"boo!\");\n  });\n}\n\ntheDepthsOfMyProgram();\n```\n\nusually would give a rather unhelpful stack trace looking something like\n\n```\nError: boo!\n    at explode (/path/to/test.js:3:11)\n    at _fulfilled (/path/to/test.js:q:54)\n    at resolvedValue.promiseDispatch.done (/path/to/q.js:823:30)\n    at makePromise.promise.promiseDispatch (/path/to/q.js:496:13)\n    at pending (/path/to/q.js:397:39)\n    at process.startup.processNextTick.process._tickCallback (node.js:244:9)\n```\n\nBut, if you turn this feature on by setting\n\n```js\nQ.longStackSupport = true;\n```\n\nthen the above code gives a nice stack trace to the tune of\n\n```\nError: boo!\n    at explode (/path/to/test.js:3:11)\nFrom previous event:\n    at theDepthsOfMyProgram (/path/to/test.js:2:16)\n    at Object.<anonymous> (/path/to/test.js:7:1)\n```\n\nNote how you can see the the function that triggered the async operation in the\nstack trace! This is very h
 elpful for debugging, as otherwise you end up getting\nonly the first line, plus a bunch of Q internals, with no sign of where the\noperation started.\n\nThis feature does come with somewhat-serious performance and memory overhead,\nhowever. If you're working with lots of promises, or trying to scale a server\nto many users, you should probably keep it off. But in development, go for it!\n\n## Tests\n\nYou can view the results of the Q test suite [in your browser][tests]!\n\n[tests]: https://rawgithub.com/kriskowal/q/master/spec/q-spec.html\n\n## License\n\nCopyright 2009–2013 Kristopher Michael Kowal\nMIT License (enclosed)\n\n",
+  "readmeFilename": "README.md",
+  "_id": "q@0.9.7",
+  "_from": "q@~0.9"
+}


[34/50] [abbrv] git commit: CB-5481 Fix for Cordova trying to get config.xml from the wrong namespace

Posted by bo...@apache.org.
CB-5481 Fix for Cordova trying to get config.xml from the wrong namespace


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/91729b30
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/91729b30
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/91729b30

Branch: refs/heads/master
Commit: 91729b302fef43668de8f72193093a27fdf2bd7a
Parents: 6fee8d8
Author: Håkon Nilsen <hn...@gmail.com>
Authored: Wed Dec 4 21:06:15 2013 +0100
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:21 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Config.java        | 11 ++++++++---
 framework/src/org/apache/cordova/PluginManager.java | 14 ++++++++++----
 2 files changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/91729b30/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 6e2a29c..63374f6 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -68,10 +68,15 @@ public class Config {
             return;
         }
 
-        int id = action.getResources().getIdentifier("config", "xml", action.getPackageName());
+        // First checking the class namespace for config.xml
+        int id = action.getResources().getIdentifier("config", "xml", action.getClass().getPackage().getName());
         if (id == 0) {
-            LOG.i("CordovaLog", "config.xml missing. Ignoring...");
-            return;
+            // If we couldn't find config.xml there, we'll look in the namespace from AndroidManifest.xml
+            id = action.getResources().getIdentifier("config", "xml", action.getPackageName());
+            if (id == 0) {
+                LOG.i("CordovaLog", "config.xml missing. Ignoring...");
+                return;
+            }
         }
 
         // Add implicitly allowed URLs

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/91729b30/framework/src/org/apache/cordova/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginManager.java b/framework/src/org/apache/cordova/PluginManager.java
index 08f7a12..732f4f6 100755
--- a/framework/src/org/apache/cordova/PluginManager.java
+++ b/framework/src/org/apache/cordova/PluginManager.java
@@ -110,11 +110,17 @@ public class PluginManager {
      * Load plugins from res/xml/config.xml
      */
     public void loadPlugins() {
-        int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName());
+
+        // First checking the class namespace for config.xml
+        int id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getClass().getPackage().getName());
         if (id == 0) {
-            this.pluginConfigurationMissing();
-            //We have the error, we need to exit without crashing!
-            return;
+            // If we couldn't find config.xml there, we'll look in the namespace from AndroidManifest.xml
+            id = this.ctx.getActivity().getResources().getIdentifier("config", "xml", this.ctx.getActivity().getPackageName());
+            if (id == 0) {
+                this.pluginConfigurationMissing();
+                //We have the error, we need to exit without crashing!
+                return;
+            }
         }
         XmlResourceParser xml = this.ctx.getActivity().getResources().getXml(id);
         int eventType = -1;


[25/50] [abbrv] git commit: Updated CordovaWebView to experiment with onScrollChanged messages

Posted by bo...@apache.org.
Updated CordovaWebView to experiment with onScrollChanged messages


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/ea0ae1d4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/ea0ae1d4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/ea0ae1d4

Branch: refs/heads/master
Commit: ea0ae1d4044af0fa4716b51d5d564ae0b964c15e
Parents: a4029b2
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Nov 18 11:08:43 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:18 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/ea0ae1d4/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 44bd9fc..e6d911f 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -621,6 +621,15 @@ public class CordovaWebView extends AmazonWebView {
         this.loadUrlIntoView(url);
     }
     
+    
+    public void onScrollChanged(int l, int t, int oldl, int oldt)
+    {
+        super.onScrollChanged(l, t, oldl, oldt);
+        //We should post a message that the scroll changed
+        LOG.d(TAG, "Scroll changed: oldl = %d, l = %d", oldl, l);
+        LOG.d(TAG, "Scroll changed: oldt = %d, t = %d", oldt, t);
+    }
+    
     /**
      * Send JavaScript statement back to JavaScript.
      * (This is a convenience method)


[18/50] [abbrv] git commit: Fixing plugins configuration, Device shouldn't be checked in here

Posted by bo...@apache.org.
Fixing plugins configuration, Device shouldn't be checked in here


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/39253394
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/39253394
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/39253394

Branch: refs/heads/master
Commit: 39253394994f452f4bf8fc83ee95b9697d2f0d89
Parents: 60d0541
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Nov 12 14:27:09 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:16 2014 -0800

----------------------------------------------------------------------
 test/assets/www/cordova_plugins.js              | 10 +--
 .../org.apache.cordova.device/www/device.js     | 78 --------------------
 test/res/xml/config.xml                         |  6 +-
 3 files changed, 2 insertions(+), 92 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/39253394/test/assets/www/cordova_plugins.js
----------------------------------------------------------------------
diff --git a/test/assets/www/cordova_plugins.js b/test/assets/www/cordova_plugins.js
index f23dd64..fbe1f44 100644
--- a/test/assets/www/cordova_plugins.js
+++ b/test/assets/www/cordova_plugins.js
@@ -1,11 +1,3 @@
 cordova.define('cordova/plugin_list', function(require, exports, module) {
-module.exports = [
-    {
-        "file": "plugins/org.apache.cordova.device/www/device.js",
-        "id": "org.apache.cordova.device.device",
-        "clobbers": [
-            "device"
-        ]
-    }
-]
+module.exports = []
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/39253394/test/assets/www/plugins/org.apache.cordova.device/www/device.js
----------------------------------------------------------------------
diff --git a/test/assets/www/plugins/org.apache.cordova.device/www/device.js b/test/assets/www/plugins/org.apache.cordova.device/www/device.js
deleted file mode 100644
index c0697f6..0000000
--- a/test/assets/www/plugins/org.apache.cordova.device/www/device.js
+++ /dev/null
@@ -1,78 +0,0 @@
-cordova.define("org.apache.cordova.device.device", function(require, exports, module) {/*
- *
- * 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'),
-    channel = require('cordova/channel'),
-    utils = require('cordova/utils'),
-    exec = require('cordova/exec'),
-    cordova = require('cordova');
-
-channel.createSticky('onCordovaInfoReady');
-// Tell cordova channel to wait on the CordovaInfoReady event
-channel.waitForInitialization('onCordovaInfoReady');
-
-/**
- * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-function Device() {
-    this.available = false;
-    this.platform = null;
-    this.version = null;
-    this.uuid = null;
-    this.cordova = null;
-    this.model = null;
-
-    var me = this;
-
-    channel.onCordovaReady.subscribe(function() {
-        me.getInfo(function(info) {
-            //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
-            //TODO: CB-5105 native implementations should not return info.cordova
-            var buildLabel = cordova.version;
-            me.available = true;
-            me.platform = info.platform;
-            me.version = info.version;
-            me.uuid = info.uuid;
-            me.cordova = buildLabel;
-            me.model = info.model;
-            channel.onCordovaInfoReady.fire();
-        },function(e) {
-            me.available = false;
-            utils.alert("[ERROR] Error initializing Cordova: " + e);
-        });
-    });
-}
-
-/**
- * Get device info
- *
- * @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. (OPTIONAL)
- */
-Device.prototype.getInfo = function(successCallback, errorCallback) {
-    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
-    exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
-};
-
-module.exports = new Device();
-});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/39253394/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml
index 0d90083..b5c6170 100644
--- a/test/res/xml/config.xml
+++ b/test/res/xml/config.xml
@@ -4,8 +4,7 @@
     <description>
         A sample Apache Cordova application that responds to the deviceready event.
     </description>
-    <author email="callback-dev@incubator.apache.org" href="http://cordova.io">
-        Apache Cordova Team
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
     </author>
     <access origin="*.apache.org" />
     <content src="index.html" />
@@ -18,7 +17,4 @@
     <feature name="App">
         <param name="android-package" value="org.apache.cordova.App" />
     </feature>
-    <feature name="Device">
-        <param name="android-package" value="org.apache.cordova.device.Device" />
-    </feature>
 </widget>


[19/50] [abbrv] git commit: Removing device plugin

Posted by bo...@apache.org.
Removing device plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/60d0541b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/60d0541b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/60d0541b

Branch: refs/heads/master
Commit: 60d0541b91a8dcfa1e4883914b20c0d8998a9ed7
Parents: d0df1d4
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Nov 12 14:25:37 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:16 2014 -0800

----------------------------------------------------------------------
 test/src/org/apache/cordova/device/Device.java | 200 --------------------
 1 file changed, 200 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/60d0541b/test/src/org/apache/cordova/device/Device.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/device/Device.java b/test/src/org/apache/cordova/device/Device.java
deleted file mode 100644
index 2ce3cc7..0000000
--- a/test/src/org/apache/cordova/device/Device.java
+++ /dev/null
@@ -1,200 +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.
-*/
-package org.apache.cordova.device;
-
-import java.util.TimeZone;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.LOG;
-import org.apache.cordova.CordovaInterface;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.provider.Settings;
-import android.telephony.TelephonyManager;
-
-public class Device extends CordovaPlugin {
-    public static final String TAG = "Device";
-
-    public static String cordovaVersion = "dev";              // Cordova version
-    public static String platform = "Android";                  // Device OS
-    public static String uuid;                                  // Device UUID
-
-    BroadcastReceiver telephonyReceiver = null;
-
-    /**
-     * Constructor.
-     */
-    public Device() {
-    }
-
-    /**
-     * Sets the context of the Command. This can then be used to do things like
-     * get file paths associated with the Activity.
-     *
-     * @param cordova The context of the main Activity.
-     * @param webView The CordovaWebView Cordova is running in.
-     */
-    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
-        super.initialize(cordova, webView);
-        Device.uuid = getUuid();
-        this.initTelephonyReceiver();
-    }
-
-    /**
-     * Executes the request and returns PluginResult.
-     *
-     * @param action            The action to execute.
-     * @param args              JSONArry of arguments for the plugin.
-     * @param callbackContext   The callback id used when calling back into JavaScript.
-     * @return                  True if the action was valid, false if not.
-     */
-    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
-        if (action.equals("getDeviceInfo")) {
-            JSONObject r = new JSONObject();
-            r.put("uuid", Device.uuid);
-            r.put("version", this.getOSVersion());
-            r.put("platform", Device.platform);
-            r.put("cordova", Device.cordovaVersion);
-            r.put("model", this.getModel());
-            callbackContext.success(r);
-        }
-        else {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Unregister receiver.
-     */
-    public void onDestroy() {
-        this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
-    }
-
-    //--------------------------------------------------------------------------
-    // LOCAL METHODS
-    //--------------------------------------------------------------------------
-
-    /**
-     * Listen for telephony events: RINGING, OFFHOOK and IDLE
-     * Send these events to all plugins using
-     *      CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle")
-     */
-    private void initTelephonyReceiver() {
-        IntentFilter intentFilter = new IntentFilter();
-        intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
-        //final CordovaInterface mycordova = this.cordova;
-        this.telephonyReceiver = new BroadcastReceiver() {
-
-            @Override
-            public void onReceive(Context context, Intent intent) {
-
-                // If state has changed
-                if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
-                    if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) {
-                        String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
-                        if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
-                            LOG.i(TAG, "Telephone RINGING");
-                            webView.postMessage("telephone", "ringing");
-                        }
-                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
-                            LOG.i(TAG, "Telephone OFFHOOK");
-                            webView.postMessage("telephone", "offhook");
-                        }
-                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) {
-                            LOG.i(TAG, "Telephone IDLE");
-                            webView.postMessage("telephone", "idle");
-                        }
-                    }
-                }
-            }
-        };
-
-        // Register the receiver
-        this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
-    }
-
-    /**
-     * Get the OS name.
-     *
-     * @return
-     */
-    public String getPlatform() {
-        return Device.platform;
-    }
-
-    /**
-     * Get the device's Universally Unique Identifier (UUID).
-     *
-     * @return
-     */
-    public String getUuid() {
-        String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
-        return uuid;
-    }
-
-    /**
-     * Get the Cordova version.
-     *
-     * @return
-     */
-    public String getCordovaVersion() {
-        return Device.cordovaVersion;
-    }
-
-    public String getModel() {
-        String model = android.os.Build.MODEL;
-        return model;
-    }
-
-    public String getProductName() {
-        String productname = android.os.Build.PRODUCT;
-        return productname;
-    }
-
-    /**
-     * Get the OS version.
-     *
-     * @return
-     */
-    public String getOSVersion() {
-        String osversion = android.os.Build.VERSION.RELEASE;
-        return osversion;
-    }
-
-    public String getSDKVersion() {
-        @SuppressWarnings("deprecation")
-        String sdkversion = android.os.Build.VERSION.SDK;
-        return sdkversion;
-    }
-
-    public String getTimeZoneID() {
-        TimeZone tz = TimeZone.getDefault();
-        return (tz.getID());
-    }
-
-}


[36/50] [abbrv] git commit: Add missing semicolon

Posted by bo...@apache.org.
Add missing semicolon


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

Branch: refs/heads/master
Commit: 6fee8d897356147e6295b6ea911c75e09c2b2f7d
Parents: dbea632
Author: charles bourasseau <ch...@gmail.com>
Authored: Thu Nov 28 11:17:38 2013 +0100
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:21 2014 -0800

----------------------------------------------------------------------
 bin/templates/project/Activity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/6fee8d89/bin/templates/project/Activity.java
----------------------------------------------------------------------
diff --git a/bin/templates/project/Activity.java b/bin/templates/project/Activity.java
index 00248b7..a515ab0 100644
--- a/bin/templates/project/Activity.java
+++ b/bin/templates/project/Activity.java
@@ -31,7 +31,7 @@ public class __ACTIVITY__ extends CordovaActivity
         super.init();
         // Set by <content src="index.html" /> in config.xml
         super.loadUrl(Config.getStartUrl());
-        //super.loadUrl("file:///android_asset/www/index.html")
+        //super.loadUrl("file:///android_asset/www/index.html");
     }
 }
 


[40/50] [abbrv] git commit: CB-5504: Moving code to the App plugin inside Cordova, the place where the grey area beween plugin and platform exists

Posted by bo...@apache.org.
CB-5504: Moving code to the App plugin inside Cordova, the place where the grey area beween plugin and platform exists


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/eec8045f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/eec8045f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/eec8045f

Branch: refs/heads/master
Commit: eec8045f83735acae19834797aa2a8e41b9f8280
Parents: 474fb53
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Dec 9 14:03:22 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/App.java | 62 ++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/eec8045f/framework/src/org/apache/cordova/App.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java
index 64af74e..965748d 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -27,6 +27,12 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.telephony.TelephonyManager;
+
 import java.util.HashMap;
 
 /**
@@ -34,6 +40,22 @@ import java.util.HashMap;
  */
 public class App extends CordovaPlugin {
 
+    protected static final String TAG = "CordovaApp";
+    private BroadcastReceiver telephonyReceiver;
+
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
+        super.initialize(cordova, webView);
+        this.initTelephonyReceiver();
+    }
+
+
     /**
      * Executes the request and returns PluginResult.
      *
@@ -221,5 +243,45 @@ public class App extends CordovaPlugin {
     public void exitApp() {
         this.webView.postMessage("exit", null);
     }
+    
+
+    /**
+     * Listen for telephony events: RINGING, OFFHOOK and IDLE
+     * Send these events to all plugins using
+     *      CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle")
+     */
+    private void initTelephonyReceiver() {
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
+        //final CordovaInterface mycordova = this.cordova;
+        this.telephonyReceiver = new BroadcastReceiver() {
+
+            @Override
+            public void onReceive(Context context, Intent intent) {
+
+                // If state has changed
+                if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
+                    if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) {
+                        String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
+                        if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
+                            LOG.i(TAG, "Telephone RINGING");
+                            webView.postMessage("telephone", "ringing");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
+                            LOG.i(TAG, "Telephone OFFHOOK");
+                            webView.postMessage("telephone", "offhook");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) {
+                            LOG.i(TAG, "Telephone IDLE");
+                            webView.postMessage("telephone", "idle");
+                        }
+                    }
+                }
+            }
+        };
+
+        // Register the receiver
+        this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
+    }
 
 }


[46/50] [abbrv] git commit: CB-5714 Fix of android build when too big output stops build with error due to buffer overflow.

Posted by bo...@apache.org.
CB-5714 Fix of android build when too big output stops build with error due to buffer overflow.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/8e9e5d18
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/8e9e5d18
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/8e9e5d18

Branch: refs/heads/master
Commit: 8e9e5d189397259ccd52e8713e7a98fd6121783a
Parents: 629ac53
Author: Vyacheslav Shabelnik <vy...@kredito.de>
Authored: Mon Dec 23 17:20:54 2013 +0200
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:23 2014 -0800

----------------------------------------------------------------------
 bin/templates/cordova/lib/exec.js | 3 +--
 test/cordova/lib/exec.js          | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/8e9e5d18/bin/templates/cordova/lib/exec.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/exec.js b/bin/templates/cordova/lib/exec.js
index 6afa9c0..66831e3 100644
--- a/bin/templates/cordova/lib/exec.js
+++ b/bin/templates/cordova/lib/exec.js
@@ -29,8 +29,7 @@ module.exports = function(cmd, opt_cwd) {
     var d = Q.defer();
     console.log('exec: ' + cmd);
     try {
-        child_process.exec(cmd, {cwd: opt_cwd}, function(err, stdout, stderr) {
-            console.log([cmd, err, stdout, stderr]);
+            child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) {
             if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
             else d.resolve(stdout);
         });

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/8e9e5d18/test/cordova/lib/exec.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/exec.js b/test/cordova/lib/exec.js
index 6afa9c0..da1c520 100644
--- a/test/cordova/lib/exec.js
+++ b/test/cordova/lib/exec.js
@@ -29,7 +29,7 @@ module.exports = function(cmd, opt_cwd) {
     var d = Q.defer();
     console.log('exec: ' + cmd);
     try {
-        child_process.exec(cmd, {cwd: opt_cwd}, function(err, stdout, stderr) {
+        child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) {
             console.log([cmd, err, stdout, stderr]);
             if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
             else d.resolve(stdout);


[47/50] [abbrv] git commit: CB-5715 Add Eclipse .project file to create template.

Posted by bo...@apache.org.
CB-5715 Add Eclipse .project file to create template.

Adds resource filter to hide CordovaLib/, platform_www/, and cordova/.
Adds linked resources to root www/, merges/, config.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/70ce1117
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/70ce1117
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/70ce1117

Branch: refs/heads/master
Commit: 70ce111759f7bb0d692772809a0c5c4d2cc5ca3f
Parents: 4963927
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Jan 2 16:40:48 2014 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:23 2014 -0800

----------------------------------------------------------------------
 bin/create                                |  1 +
 bin/lib/create.js                         |  9 +++-
 bin/templates/project/eclipse-project     | 45 +++++++++++++++++
 bin/templates/project/eclipse-project-CLI | 67 ++++++++++++++++++++++++++
 4 files changed, 121 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 9ab6689..455ba30 100755
--- a/bin/create
+++ b/bin/create
@@ -37,3 +37,4 @@ if(args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h'
     });
 }
 
+create.createProject(args._[0], args._[1], args._[2], args._[3], args['--shared'], args['--cli']).done();

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index c482b5a..c542ab8 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -105,7 +105,7 @@ function copyScripts(projectPath) {
  * Returns a promise.
  */
 
-exports.createProject = function(project_path, package_name, project_name, project_template_dir) {
+exports.createProject = function(project_path, package_name, project_name, project_template_dir, use_shared_project, use_cli_template) {
     var VERSION = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
 
     // Set default values for path, package and name
@@ -154,6 +154,12 @@ exports.createProject = function(project_path, package_name, project_name, proje
             shell.cp('-r', path.join(project_template_dir, 'res'), project_path);
             // Manually create directories that would be empty within the template (since git doesn't track directories).
             shell.mkdir(path.join(project_path, 'libs'));
+            // Add in the proper eclipse project file.
+            if (use_cli_template) {
+                shell.cp(path.join(project_template_dir, 'eclipse-project-CLI'), path.join(project_path, '.project'));
+            } else {
+                shell.cp(path.join(project_template_dir, 'eclipse-project'), path.join(project_path, '.project'));
+            }
 
             // copy cordova.js, cordova.jar and res/xml
             shell.cp('-r', path.join(ROOT, 'framework', 'res', 'xml'), path.join(project_path, 'res'));
@@ -164,6 +170,7 @@ exports.createProject = function(project_path, package_name, project_name, proje
             shell.cp('-f', path.join(project_template_dir, 'Activity.java'), activity_path);
             shell.sed('-i', /__ACTIVITY__/, safe_activity_name, activity_path);
             shell.sed('-i', /__NAME__/, project_name, path.join(project_path, 'res', 'values', 'strings.xml'));
+            shell.sed('-i', /__NAME__/, project_name, path.join(project_path, '.project'));
             shell.sed('-i', /__ID__/, package_name, activity_path);
 
             shell.cp('-f', path.join(project_template_dir, 'AndroidManifest.xml'), manifest_path);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/templates/project/eclipse-project
----------------------------------------------------------------------
diff --git a/bin/templates/project/eclipse-project b/bin/templates/project/eclipse-project
new file mode 100644
index 0000000..42bcc3e
--- /dev/null
+++ b/bin/templates/project/eclipse-project
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>__NAME__</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1388696068187</id>
+			<name></name>
+			<type>10</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-true-CordovaLib|platform_www|cordova</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/70ce1117/bin/templates/project/eclipse-project-CLI
----------------------------------------------------------------------
diff --git a/bin/templates/project/eclipse-project-CLI b/bin/templates/project/eclipse-project-CLI
new file mode 100644
index 0000000..5772dec
--- /dev/null
+++ b/bin/templates/project/eclipse-project-CLI
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>__NAME__</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>** Cordova Project **</name>
+			<type>2</type>
+			<locationURI>virtual:/virtual</locationURI>
+		</link>
+		<link>
+                        <name>** Cordova Project **/config.xml</name>
+			<type>1</type>
+			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/www/config.xml</locationURI>
+		</link>
+                <link>
+                        <name>** Cordova Project **/www</name>
+                        <type>2</type>
+			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/www</locationURI>
+                </link>
+                <link>
+                        <name>** Cordova Project **/merges</name>
+                        <type>2</type>
+			<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/merges</locationURI>
+                </link>
+	</linkedResources>
+	<filteredResources>
+		<filter>
+			<id>1388696068187</id>
+			<name></name>
+			<type>10</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-true-CordovaLib|platform_www|cordova</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>
+


[38/50] [abbrv] git commit: CB-5489: clean up docs for deprecated methods

Posted by bo...@apache.org.
CB-5489: clean up docs for deprecated methods

- fixed grammer in log message in Config.java
- updated the class javadoc in CordovaActivity to catch up to reality: use config.xml instead of set*Property() methods.
- added deprecation message for SetFullscreen


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/156ae3d4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/156ae3d4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/156ae3d4

Branch: refs/heads/master
Commit: 156ae3d4cb8a990799f3dfcaa2b2f30cffaa03ec
Parents: eec8045
Author: Marcel Kinard <cm...@gmail.com>
Authored: Fri Dec 6 12:27:03 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Config.java    |  2 +-
 .../src/org/apache/cordova/CordovaActivity.java | 60 +++-----------------
 2 files changed, 10 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/156ae3d4/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 63374f6..0ba9fa1 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -99,7 +99,7 @@ public class Config {
                 }
                 else if (strNode.equals("log")) {
                     String level = xml.getAttributeValue(null, "level");
-                    Log.d(TAG, "The <log> tags is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
+                    Log.d(TAG, "The <log> tag is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
                     if (level != null) {
                         LOG.setLogLevel(level);
                     }

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/156ae3d4/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index 5a1932f..8c11d3d 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -68,6 +68,7 @@ import android.widget.LinearLayout;
  * 
  * <pre>
  *     package org.apache.cordova.examples;
+ *
  *     import android.os.Bundle;
  *     import org.apache.cordova.*;
  *
@@ -75,63 +76,19 @@ import android.widget.LinearLayout;
  *       &#64;Override
  *       public void onCreate(Bundle savedInstanceState) {
  *         super.onCreate(savedInstanceState);
- *
- *         // Set properties for activity
- *         super.setStringProperty("loadingDialog", "Title,Message"); // show loading dialog
- *         super.setStringProperty("errorUrl", "file:///android_asset/www/error.html"); // if error loading file in super.loadUrl().
- *
- *         // Clear cache if you want
- *         super.appView.clearCache(true);
- *
+ *         super.init();
  *         // Load your application
- *         super.setIntegerProperty("splashscreen", R.drawable.splash); // load splash.jpg image from the resource drawable directory
- *         super.loadUrl("file:///android_asset/www/index.html", 3000); // show splash screen 3 sec before loading app
+ *         super.loadUrl(Config.getStartUrl());
  *       }
  *     }
  * </pre>
  * 
- * Properties: The application can be configured using the following properties:
- * 
- * <pre>
- *      // Display a native loading dialog when loading app.  Format for value = "Title,Message".
- *      // (String - default=null)
- *      super.setStringProperty("loadingDialog", "Wait,Loading Demo...");
- *
- *      // Display a native loading dialog when loading sub-pages.  Format for value = "Title,Message".
- *      // (String - default=null)
- *      super.setStringProperty("loadingPageDialog", "Loading page...");
- *
- *      // Load a splash screen image from the resource drawable directory.
- *      // (Integer - default=0)
- *      super.setIntegerProperty("splashscreen", R.drawable.splash);
- *
- *      // Set the background color.
- *      // (Integer - default=0 or BLACK)
- *      super.setIntegerProperty("backgroundColor", Color.WHITE);
- *
- *      // Time in msec to wait before triggering a timeout error when loading
- *      // with super.loadUrl().  (Integer - default=20000)
- *      super.setIntegerProperty("loadUrlTimeoutValue", 60000);
- *
- *      // URL to load if there's an error loading specified URL with loadUrl().
- *      // Should be a local URL starting with file://. (String - default=null)
- *      super.setStringProperty("errorUrl", "file:///android_asset/www/error.html");
- *
- *      // Enable app to keep running in background. (Boolean - default=true)
- *      super.setBooleanProperty("keepRunning", false);
- * </pre>
- *
- * Cordova.xml configuration:
- * 
- * <pre>
- *      Cordova uses a configuration file at res/xml/cordova.xml to specify the following settings.
+ * Cordova xml configuration: Cordova uses a configuration file at 
+ * res/xml/config.xml to specify its settings. See "The config.xml File"
+ * guide in cordova-docs at http://cordova.apache.org/docs for the documentation
+ * for the configuration. The use of the set*Property() methods is
+ * deprecated in favor of the config.xml file.
  *
- *      Approved list of URLs that can be loaded into Cordova
- *          &lt;access origin="http://server regexp" subdomains="true" /&gt;
- *      Log level: ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)
- *          &lt;log level="DEBUG" /&gt;
- * </pre>
- * 
  */
 public class CordovaActivity extends Activity implements CordovaInterface {
     public static String TAG = "CordovaActivity";
@@ -312,6 +269,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
         if (this.getBooleanProperty("SetFullscreen", false))
         {
+            Log.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version.");
             getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                 WindowManager.LayoutParams.FLAG_FULLSCREEN);
         }


[07/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/FixWebView.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/FixWebView.java b/test/src/org/apache/cordova/test/junit/FixWebView.java
new file mode 100755
index 0000000..9ac952f
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/FixWebView.java
@@ -0,0 +1,44 @@
+/*
+       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.
+*/
+package org.apache.cordova.test.junit;
+
+import com.amazon.android.webkit.AmazonWebView;
+
+import android.content.Context;
+
+public class FixWebView extends AmazonWebView {
+
+    public FixWebView(Context context) {
+        super(context);
+    }
+
+    @Override
+    public void pauseTimers() {
+        // Do nothing
+    }
+
+    /**
+     * This method is with different signature in order to stop the timers while move application to background
+     * @param realPause
+     */
+    public void pauseTimers(@SuppressWarnings("unused") boolean realPause) {
+        super.pauseTimers();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/GapClientTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/GapClientTest.java b/test/src/org/apache/cordova/test/junit/GapClientTest.java
new file mode 100644
index 0000000..4540d92
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/GapClientTest.java
@@ -0,0 +1,68 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CordovaChromeClient;
+import org.apache.cordova.PluginManager;
+import org.apache.cordova.test.CordovaWebViewTestActivity;
+
+import android.content.Context;
+import android.content.res.AssetManager;
+import android.content.res.Resources;
+import android.test.ActivityInstrumentationTestCase2;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class GapClientTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
+	
+	private CordovaWebViewTestActivity testActivity;
+	private FrameLayout containerView;
+	private LinearLayout innerContainer;
+	private View testView;
+	private String rString;
+	private CordovaChromeClient appCode;
+
+	public GapClientTest() {
+		super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.class);
+	}
+	
+	protected void setUp() throws Exception{
+		super.setUp();
+		testActivity = this.getActivity();
+		containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+		innerContainer = (LinearLayout) containerView.getChildAt(0);
+		testView = innerContainer.getChildAt(0);
+		
+	}
+	
+	public void testPreconditions(){
+	    assertNotNull(innerContainer);
+		assertNotNull(testView);
+	}
+	
+	public void testForCordovaView() {
+	    String className = testView.getClass().getSimpleName();
+	    assertTrue(className.equals("CordovaWebView"));
+	}
+	
+	
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java b/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
new file mode 100644
index 0000000..9b3863e
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
@@ -0,0 +1,76 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.test.htmlnotfound;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2<htmlnotfound> {
+
+  private int TIMEOUT = 1000;
+  private htmlnotfound testActivity;
+  private FrameLayout containerView;
+  private LinearLayout innerContainer;
+  private CordovaWebView testView;
+  private AmazonWebViewOnUiThread mUiThread;
+
+  public HtmlNotFoundTest() {
+    super("org.apache.cordova.test",htmlnotfound.class);
+  }
+  
+  
+  protected void setUp() throws Exception {
+    super.setUp();
+    testActivity = this.getActivity();
+    containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+    innerContainer = (LinearLayout) containerView.getChildAt(0);
+    testView = (CordovaWebView) innerContainer.getChildAt(0);
+    mUiThread = new AmazonWebViewOnUiThread(this, testView);
+  }
+
+  public void testPreconditions(){
+    assertNotNull(innerContainer);
+    assertNotNull(testView);
+  }
+
+  public void testUrl()
+  {
+      sleep();
+      String good_url = "file:///android_asset/www/htmlnotfound/error.html";
+      String url = mUiThread.getUrl();
+      assertNotNull(url);
+      assertFalse(url.equals(good_url));
+  }
+
+  private void sleep() {
+      try {
+        Thread.sleep(TIMEOUT);
+      } catch (InterruptedException e) {
+        fail("Unexpected Timeout");
+      }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/IFrameTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/IFrameTest.java b/test/src/org/apache/cordova/test/junit/IFrameTest.java
new file mode 100644
index 0000000..ba76463
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/IFrameTest.java
@@ -0,0 +1,94 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.test.iframe;
+import org.apache.cordova.test.util.Purity;
+
+import android.app.Activity;
+import android.app.Instrumentation;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.TouchUtils;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class IFrameTest extends ActivityInstrumentationTestCase2 {
+  
+    
+    private Instrumentation mInstr;
+    private Activity testActivity;
+    private FrameLayout containerView;
+    private LinearLayout innerContainer;
+    private CordovaWebView testView;
+    private AmazonWebViewOnUiThread mUiThread;
+    private TouchUtils touch;
+    private Purity touchTool;
+    
+    public IFrameTest() {
+        super("org.apache.cordova.test",iframe.class);
+    }
+
+  
+    protected void setUp() throws Exception {
+      super.setUp();
+      mInstr = this.getInstrumentation();
+      testActivity = this.getActivity();
+      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+      innerContainer = (LinearLayout) containerView.getChildAt(0);
+      testView = (CordovaWebView) innerContainer.getChildAt(0);
+      mUiThread = new AmazonWebViewOnUiThread(this, testView);
+      touch = new TouchUtils();
+      touchTool = new Purity(testActivity, getInstrumentation());
+    }
+  
+  
+    public void testIframeDest()
+    {
+        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+        sleep(3000);
+        testView.sendJavascript("loadUrl('index2.html')");
+        sleep(1000);
+        String url = mUiThread.getUrl();
+        assertTrue(url.endsWith("index.html"));
+    }
+    
+    public void testIframeHistory()
+    {
+        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+        sleep(3000);
+        testView.sendJavascript("loadUrl('index2.html')");
+        sleep(1000);
+        String url = mUiThread.getUrl();
+        mUiThread.backHistory();
+        sleep(1000);
+        assertTrue(url.endsWith("index.html"));
+    }
+    
+    private void sleep(int timeout) {
+        try {
+          Thread.sleep(timeout);
+        } catch (InterruptedException e) {
+          fail("Unexpected Timeout");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/LifecycleTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/LifecycleTest.java b/test/src/org/apache/cordova/test/junit/LifecycleTest.java
new file mode 100644
index 0000000..5423575
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/LifecycleTest.java
@@ -0,0 +1,34 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.test.lifecycle;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+public class LifecycleTest extends ActivityInstrumentationTestCase2<lifecycle> {
+  
+  public LifecycleTest()
+  {
+    super("org.apache.cordova.test",lifecycle.class);
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/MenuTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/MenuTest.java b/test/src/org/apache/cordova/test/junit/MenuTest.java
new file mode 100644
index 0000000..6c1ace6
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/MenuTest.java
@@ -0,0 +1,32 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.test.menus;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+public class MenuTest extends ActivityInstrumentationTestCase2<menus> {
+
+    public MenuTest() {
+      super("org.apache.cordova.test", menus.class);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/PluginManagerTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/PluginManagerTest.java b/test/src/org/apache/cordova/test/junit/PluginManagerTest.java
new file mode 100644
index 0000000..bcdead6
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/PluginManagerTest.java
@@ -0,0 +1,70 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.PluginManager;
+import org.apache.cordova.test.CordovaWebViewTestActivity;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class PluginManagerTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
+	
+	private CordovaWebViewTestActivity testActivity;
+	private FrameLayout containerView;
+	private LinearLayout innerContainer;
+	private View testView;
+	private String rString;
+	private PluginManager pMan;
+
+	public PluginManagerTest() {
+		super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.class);
+	}
+	
+	protected void setUp() throws Exception{
+		super.setUp();
+		testActivity = this.getActivity();
+		containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+		innerContainer = (LinearLayout) containerView.getChildAt(0);
+		testView = innerContainer.getChildAt(0);
+		
+	}
+	
+	public void testPreconditions(){
+	    assertNotNull(innerContainer);
+	    assertNotNull(testView);
+	}
+	
+	
+	public void testForPluginManager() {
+	  /*
+	    CordovaWebView v = (CordovaWebView) testView;
+	    pMan = v.getPluginManager();
+	    assertNotNull(pMan);
+	    String className = pMan.getClass().getSimpleName();
+	    assertTrue(className.equals("PluginManager"));
+	    */
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/SplashscreenTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/SplashscreenTest.java b/test/src/org/apache/cordova/test/junit/SplashscreenTest.java
new file mode 100644
index 0000000..14da5ac
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/SplashscreenTest.java
@@ -0,0 +1,49 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.test.splashscreen;
+
+import android.app.Dialog;
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class SplashscreenTest extends ActivityInstrumentationTestCase2<splashscreen> {
+  
+  private splashscreen testActivity;
+  private Dialog containerView;
+
+  public SplashscreenTest()
+  {
+      super("org.apache.cordova.test",splashscreen.class);
+  }
+  
+  protected void setUp() throws Exception {
+      super.setUp();
+      testActivity = this.getActivity();
+      //containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+      //containerView = (Dialog) testActivity.findViewById(id);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/UserWebViewTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/UserWebViewTest.java b/test/src/org/apache/cordova/test/junit/UserWebViewTest.java
new file mode 100644
index 0000000..62dcbe0
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/UserWebViewTest.java
@@ -0,0 +1,76 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CordovaWebViewClient;
+import org.apache.cordova.CordovaChromeClient;
+import org.apache.cordova.test.userwebview;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class UserWebViewTest extends ActivityInstrumentationTestCase2<userwebview> {
+
+  public UserWebViewTest ()
+  {
+    super(userwebview.class);
+  }
+  
+  private int TIMEOUT = 1000;
+  userwebview testActivity;
+  private FrameLayout containerView;
+  private LinearLayout innerContainer;
+  private CordovaWebView testView;
+  
+
+  protected void setUp() throws Exception {
+      super.setUp();
+      testActivity = this.getActivity();
+      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+      innerContainer = (LinearLayout) containerView.getChildAt(0);
+      testView = (CordovaWebView) innerContainer.getChildAt(0);
+  }
+  
+  public void testPreconditions(){
+      assertNotNull(innerContainer);
+      assertNotNull(testView);
+  }
+  
+  public void testCustom()
+  {
+    assertTrue(CordovaWebView.class.isInstance(testView));
+    assertTrue(CordovaWebViewClient.class.isInstance(testActivity.testViewClient));
+    assertTrue(CordovaChromeClient.class.isInstance(testActivity.testChromeClient));
+  }
+  
+
+  private void sleep() {
+      try {
+        Thread.sleep(TIMEOUT);
+      } catch (InterruptedException e) {
+        fail("Unexpected Timeout");
+      }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/XhrTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/XhrTest.java b/test/src/org/apache/cordova/test/junit/XhrTest.java
new file mode 100644
index 0000000..16c977f
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/XhrTest.java
@@ -0,0 +1,34 @@
+package org.apache.cordova.test.junit;
+/*
+ *
+ * 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.
+ *
+*/
+
+
+import org.apache.cordova.test.xhr;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+public class XhrTest extends ActivityInstrumentationTestCase2<xhr> {
+
+  public XhrTest()
+  {
+    super(xhr.class);
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/lifecycle.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/lifecycle.java b/test/src/org/apache/cordova/test/lifecycle.java
new file mode 100755
index 0000000..30c5b8b
--- /dev/null
+++ b/test/src/org/apache/cordova/test/lifecycle.java
@@ -0,0 +1,30 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class lifecycle extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/lifecycle/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/loading.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/loading.java b/test/src/org/apache/cordova/test/loading.java
new file mode 100755
index 0000000..b1b08ae
--- /dev/null
+++ b/test/src/org/apache/cordova/test/loading.java
@@ -0,0 +1,31 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class loading extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.setStringProperty("loadingDialog", "Testing,Loading...");
+        super.loadUrl("http://www.google.com");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/menus.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/menus.java b/test/src/org/apache/cordova/test/menus.java
new file mode 100755
index 0000000..12d5230
--- /dev/null
+++ b/test/src/org/apache/cordova/test/menus.java
@@ -0,0 +1,80 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import android.view.ContextMenu;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ContextMenu.ContextMenuInfo;
+
+import org.apache.cordova.*;
+import org.apache.cordova.LOG;
+
+public class menus extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+        super.registerForContextMenu(super.appView);
+        super.loadUrl("file:///android_asset/www/menus/index.html");
+    }
+
+    // Demonstrate how to add your own menus to app
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        int base = Menu.FIRST;
+        // Group, item id, order, title
+        menu.add(base, base, base, "Item1");
+        menu.add(base, base + 1, base + 1, "Item2");
+        menu.add(base, base + 2, base + 2, "Item3");
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        LOG.d("menus", "Item " + item.getItemId() + " pressed.");
+        this.appView.loadUrl("javascript:alert('Menu " + item.getItemId() + " pressed.')");
+        return super.onOptionsItemSelected(item);
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        LOG.d("menus", "onPrepareOptionsMenu()");
+        // this.appView.loadUrl("javascript:alert('onPrepareOptionsMenu()')");
+        return true;
+    }
+
+    @Override
+    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo info) {
+        LOG.d("menus", "onCreateContextMenu()");
+        menu.setHeaderTitle("Test Context Menu");
+        menu.add(200, 200, 200, "Context Item1");
+    }
+
+    @Override
+    public boolean onContextItemSelected(MenuItem item) {
+        this.appView.loadUrl("javascript:alert('Context Menu " + item.getItemId() + " pressed.')");
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/splashscreen.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/splashscreen.java b/test/src/org/apache/cordova/test/splashscreen.java
new file mode 100755
index 0000000..ef49d73
--- /dev/null
+++ b/test/src/org/apache/cordova/test/splashscreen.java
@@ -0,0 +1,37 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+import org.apache.cordova.test.R;
+import org.apache.cordova.test.R.drawable;
+
+public class splashscreen extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+
+        // Show splashscreen
+        this.setIntegerProperty("splashscreen", R.drawable.sandy);
+
+        super.loadUrl("file:///android_asset/www/splashscreen/index.html", 2000);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/tests.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/tests.java b/test/src/org/apache/cordova/test/tests.java
new file mode 100755
index 0000000..80c7f24
--- /dev/null
+++ b/test/src/org/apache/cordova/test/tests.java
@@ -0,0 +1,32 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class tests extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+        //super.pluginManager.addService("Activity", "org.apache.cordova.test.ActivityPlugin");
+        super.loadUrl("file:///android_asset/www/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/timeout.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/timeout.java b/test/src/org/apache/cordova/test/timeout.java
new file mode 100755
index 0000000..31edb8d
--- /dev/null
+++ b/test/src/org/apache/cordova/test/timeout.java
@@ -0,0 +1,34 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class timeout extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+
+        // Short timeout to cause error
+        this.setIntegerProperty("loadUrlTimeoutValue", 10);
+        super.loadUrl("http://www.google.com");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/userwebview.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/userwebview.java b/test/src/org/apache/cordova/test/userwebview.java
new file mode 100755
index 0000000..ff04abc
--- /dev/null
+++ b/test/src/org/apache/cordova/test/userwebview.java
@@ -0,0 +1,76 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback;
+import org.apache.cordova.*;
+
+import com.amazon.android.webkit.AmazonWebView;
+
+public class userwebview extends DroidGap {
+    
+    public TestViewClient testViewClient;
+    public TestChromeClient testChromeClient;
+    
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        testViewClient = new TestViewClient(this);
+        testChromeClient = new TestChromeClient(this);
+        super.init(new CordovaWebView(this), new TestViewClient(this), new TestChromeClient(this));
+        super.loadUrl("file:///android_asset/www/userwebview/index.html");
+    }
+
+    public class TestChromeClient extends CordovaChromeClient {
+        public TestChromeClient(DroidGap arg0) {
+            super(arg0);
+            LOG.d("userwebview", "TestChromeClient()");
+        }
+
+        public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {
+            LOG.d("userwebview", "onGeolocationPermissionsShowPrompt(" + origin + ")");
+            super.onGeolocationPermissionsShowPrompt(origin, callback);
+            callback.invoke(origin, true, false);
+        }
+    }
+
+    /**
+     * This class can be used to override the GapViewClient and receive notification of webview events.
+     */
+    public class TestViewClient extends CordovaWebViewClient {
+        public TestViewClient(DroidGap arg0) {
+            super(arg0);
+            LOG.d("userwebview", "TestViewClient()");
+        }
+        
+        @Override
+        public boolean shouldOverrideUrlLoading(AmazonWebView view, String url) {
+            LOG.d("userwebview", "shouldOverrideUrlLoading(" + url + ")");
+            return super.shouldOverrideUrlLoading(view, url);
+        }
+        
+        @Override
+        public void onReceivedError(AmazonWebView view, int errorCode, String description, String failingUrl) {
+            LOG.d("userwebview", "onReceivedError: Error code=" + errorCode + " Description=" + description + " URL=" + failingUrl);
+            super.onReceivedError(view, errorCode, description, failingUrl);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/whitelist.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/whitelist.java b/test/src/org/apache/cordova/test/whitelist.java
new file mode 100755
index 0000000..518b52b
--- /dev/null
+++ b/test/src/org/apache/cordova/test/whitelist.java
@@ -0,0 +1,51 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+
+import org.apache.cordova.*;
+
+import com.amazon.android.webkit.AmazonWebView;
+
+public class whitelist extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init(new CordovaWebView(this), new TestViewClient(this), new CordovaChromeClient(this));
+        super.loadUrl("file:///android_asset/www/whitelist/index.html");
+    }
+
+    /**
+     * This class can be used to override the GapViewClient and receive notification of webview events.
+     */
+    public class TestViewClient extends CordovaWebViewClient {
+
+        public TestViewClient(DroidGap arg0) {
+            super(arg0);
+        }
+        
+        @Override
+        public boolean shouldOverrideUrlLoading(AmazonWebView view, String url) {
+            LOG.d("whitelist", "shouldOverrideUrlLoading(" + url + ")");
+            LOG.d("whitelist", "originalUrl=" + view.getOriginalUrl());
+            return super.shouldOverrideUrlLoading(view, url);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/xhr.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/xhr.java b/test/src/org/apache/cordova/test/xhr.java
new file mode 100755
index 0000000..402e0ad
--- /dev/null
+++ b/test/src/org/apache/cordova/test/xhr.java
@@ -0,0 +1,30 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class xhr extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/xhr/index.html");
+    }
+}


[26/50] [abbrv] git commit: CB-5490: add javadoc target to ant script

Posted by bo...@apache.org.
CB-5490: add javadoc target to ant script

- add javadoc target to ant script. It must be invoked explicitly to run.
- ignore the generated javadoc html directories.
- clean up javadoc errors in source files.
- upon invoking 'clean' target, erase generated jar and javadoc


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/648c5d6d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/648c5d6d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/648c5d6d

Branch: refs/heads/master
Commit: 648c5d6d2adb048c4983da64efd0d68dc3d5968e
Parents: 228a900
Author: Marcel Kinard <cm...@gmail.com>
Authored: Tue Nov 26 12:56:23 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:18 2014 -0800

----------------------------------------------------------------------
 .gitignore                                      | 39 ++++++++++++++++++++
 framework/build.xml                             | 33 ++++++++++++++++-
 framework/src/org/apache/cordova/Config.java    |  2 +-
 .../src/org/apache/cordova/CordovaActivity.java | 38 ++++++++++++-------
 .../org/apache/cordova/CordovaInterface.java    |  2 +-
 .../src/org/apache/cordova/CordovaWebView.java  |  8 ++--
 framework/src/org/apache/cordova/LOG.java       |  2 +-
 .../src/org/apache/cordova/PluginEntry.java     |  2 +-
 .../src/org/apache/cordova/PluginManager.java   |  2 +-
 framework/src/org/apache/cordova/Whitelist.java |  2 +-
 10 files changed, 105 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f19b35
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,39 @@
+.DS_Store
+default.properties
+gen
+assets/www/cordova.js
+framework/assets/www/.tmp*
+local.properties
+framework/lib
+proguard.cfg
+proguard.cfg
+proguard-project.txt
+framework/bin
+framework/test/org/apache/cordova/*.class
+framework/assets/www/.DS_Store
+framework/assets/www/cordova-*.js
+framework/assets/www/phonegap-*.js
+framework/libs
+framework/javadoc-public
+framework/javadoc-private
+test/libs
+example
+./test
+test/bin
+test/assets/www/.tmp*
+test/assets/www/cordova.js
+test/cordova/plugins/org.apache.cordova.device/www/device.js
+test/cordova/plugins/org.apache.cordova.device/src/android/Device.java
+tmp/**
+.metadata
+tmp/**/*
+Thumbs.db
+Desktop.ini
+*.tmp
+*.bak
+*.swp
+*.class
+*.jar
+# IntelliJ IDEA files
+*.iml
+.idea

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/build.xml
----------------------------------------------------------------------
diff --git a/framework/build.xml b/framework/build.xml
index 46242aa..3957084 100644
--- a/framework/build.xml
+++ b/framework/build.xml
@@ -95,6 +95,13 @@
     <target name="-post-compile">
     </target>
 -->
+    <target name="-pre-clean">
+        <!-- delete generated javadoc -->
+        <delete dir="javadoc-public" failonerror="false" />
+        <delete dir="javadoc-private" failonerror="false" />
+        <!-- delete generated jar -->
+        <delete file="cordova-${version}.jar" failonerror="false" />
+    </target>
 
     <!-- Import the actual build file.
 
@@ -120,7 +127,31 @@
          that includes all JavaScript code.
     -->
     <target name="jar" depends="-compile">
-      <jar jarfile="cordova-${version}.jar" basedir="bin/classes" excludes="org/apache/cordova/R.class,org/apache/cordova/R$*.class"/>
+        <jar
+            basedir="bin/classes"
+            excludes="org/apache/cordova/R.class,org/apache/cordova/R$*.class"
+            jarfile="cordova-${version}.jar" />
+    </target>
+    
+    <target name="javadoc">
+        <delete dir="javadoc-public" failonerror="false" />
+        <javadoc
+            access="public" 
+            destdir="javadoc-public"
+            classpath="${sdk.dir}/platforms/${target}/android.jar">
+            <packageset dir="src">
+                <include name="org/apache/cordova/**" />
+            </packageset>
+        </javadoc>
+        <delete dir="javadoc-private" failonerror="false" />
+        <javadoc
+            access="private" 
+            destdir="javadoc-private"
+            classpath="${sdk.dir}/platforms/${target}/android.jar">
+            <packageset dir="src">
+                <include name="org/apache/cordova/**" />
+            </packageset>
+        </javadoc>
     </target>
 
     <!-- tests for Java files -->

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 19d7adc..6e2a29c 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -208,7 +208,7 @@ public class Config {
      * Determine if URL is in approved list of URLs to load.
      *
      * @param url
-     * @return
+     * @return true if whitelisted
      */
     public static boolean isUrlWhiteListed(String url) {
         if (self == null) {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index f369b77..5a1932f 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -65,13 +65,14 @@ import android.widget.LinearLayout;
  * html file that contains the application.
  *
  * As an example:
- *
+ * 
+ * <pre>
  *     package org.apache.cordova.examples;
  *     import android.os.Bundle;
  *     import org.apache.cordova.*;
  *
  *     public class Example extends CordovaActivity {
- *       @Override
+ *       &#64;Override
  *       public void onCreate(Bundle savedInstanceState) {
  *         super.onCreate(savedInstanceState);
  *
@@ -87,9 +88,11 @@ import android.widget.LinearLayout;
  *         super.loadUrl("file:///android_asset/www/index.html", 3000); // show splash screen 3 sec before loading app
  *       }
  *     }
- *
+ * </pre>
+ * 
  * Properties: The application can be configured using the following properties:
- *
+ * 
+ * <pre>
  *      // Display a native loading dialog when loading app.  Format for value = "Title,Message".
  *      // (String - default=null)
  *      super.setStringProperty("loadingDialog", "Wait,Loading Demo...");
@@ -116,15 +119,19 @@ import android.widget.LinearLayout;
  *
  *      // Enable app to keep running in background. (Boolean - default=true)
  *      super.setBooleanProperty("keepRunning", false);
+ * </pre>
  *
  * Cordova.xml configuration:
+ * 
+ * <pre>
  *      Cordova uses a configuration file at res/xml/cordova.xml to specify the following settings.
  *
  *      Approved list of URLs that can be loaded into Cordova
- *          <access origin="http://server regexp" subdomains="true" />
+ *          &lt;access origin="http://server regexp" subdomains="true" /&gt;
  *      Log level: ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)
- *          <log level="DEBUG" />
- *
+ *          &lt;log level="DEBUG" /&gt;
+ * </pre>
+ * 
  */
 public class CordovaActivity extends Activity implements CordovaInterface {
     public static String TAG = "CordovaActivity";
@@ -331,7 +338,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
     /**
      * Get the Android activity.
      *
-     * @return
+     * @return the Activity
      */
     public Activity getActivity() {
         return this;
@@ -599,7 +606,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      *
      * @param name
      * @param defaultValue
-     * @return
+     * @return the boolean value of the named property
      */
     public boolean getBooleanProperty(String name, boolean defaultValue) {
         Bundle bundle = this.getIntent().getExtras();
@@ -630,7 +637,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      *
      * @param name
      * @param defaultValue
-     * @return
+     * @return the int value for the named property
      */
     public int getIntegerProperty(String name, int defaultValue) {
         Bundle bundle = this.getIntent().getExtras();
@@ -655,7 +662,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      *
      * @param name
      * @param defaultValue
-     * @return
+     * @return the String value for the named property
      */
     public String getStringProperty(String name, String defaultValue) {
         Bundle bundle = this.getIntent().getExtras();
@@ -675,7 +682,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      *
      * @param name
      * @param defaultValue
-     * @return
+     * @return the double value for the named property
      */
     public double getDoubleProperty(String name, double defaultValue) {
         Bundle bundle = this.getIntent().getExtras();
@@ -870,6 +877,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      * @param serviceType
      * @param className
      */
+    @Deprecated
     public void addService(String serviceType, String className) {
         if (this.appView != null && this.appView.pluginManager != null) {
             this.appView.pluginManager.addService(serviceType, className);
@@ -1068,7 +1076,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
      * Determine if URL is in approved list of URLs to load.
      *
      * @param url
-     * @return
+     * @return true if the url is whitelisted
      */
     public boolean isUrlWhiteListed(String url) {
         return Config.isUrlWhiteListed(url);
@@ -1099,8 +1107,10 @@ public class CordovaActivity extends Activity implements CordovaInterface {
     /**
      * Get Activity context.
      *
-     * @return
+     * @return self
+     * @deprecated
      */
+    @Deprecated
     public Context getContext() {
         LOG.d(TAG, "This will be deprecated December 2012");
         return this;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/CordovaInterface.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaInterface.java b/framework/src/org/apache/cordova/CordovaInterface.java
index ffe49bd..4d0dd93 100755
--- a/framework/src/org/apache/cordova/CordovaInterface.java
+++ b/framework/src/org/apache/cordova/CordovaInterface.java
@@ -53,7 +53,7 @@ public interface CordovaInterface {
     /**
      * Get the Android activity.
      *
-     * @return
+     * @return the Activity
      */
     public abstract Activity getActivity();
     

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 00eb6d7..44bd9fc 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -425,10 +425,10 @@ public class CordovaWebView extends AmazonWebView {
     }
 
 	/**
-	 * Override this method to decide wether or not you need to request the
+	 * Override this method to decide whether or not you need to request the
 	 * focus when your application start
 	 * 
-	 * @return
+	 * @return true unless this method is overriden to return a different value
 	 */
     protected boolean shouldRequestFocusOnInit() {
 		return true;
@@ -746,7 +746,7 @@ public class CordovaWebView extends AmazonWebView {
      *
      * @param name
      * @param defaultValue
-     * @return
+     * @return the String value for the named property
      */
     public String getProperty(String name, String defaultValue) {
         Bundle bundle = this.cordova.getActivity().getIntent().getExtras();
@@ -1056,7 +1056,7 @@ public class CordovaWebView extends AmazonWebView {
      * if the video overlay is showing then we need to know 
      * as it effects back button handling
      * 
-     * @return
+     * @return true if custom view is showing
      */
     public boolean isCustomViewShowing() {
         return mCustomView != null;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/LOG.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/LOG.java b/framework/src/org/apache/cordova/LOG.java
index d5fdfdd..3dd1a75 100755
--- a/framework/src/org/apache/cordova/LOG.java
+++ b/framework/src/org/apache/cordova/LOG.java
@@ -65,7 +65,7 @@ public class LOG {
      * Determine if log level will be logged
      *
      * @param logLevel
-     * @return
+     * @return true if the parameter passed in is greater than or equal to the current log level
      */
     public static boolean isLoggable(int logLevel) {
         return (logLevel >= LOGLEVEL);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/PluginEntry.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginEntry.java b/framework/src/org/apache/cordova/PluginEntry.java
index e668d89..e800eba 100755
--- a/framework/src/org/apache/cordova/PluginEntry.java
+++ b/framework/src/org/apache/cordova/PluginEntry.java
@@ -107,7 +107,7 @@ public class PluginEntry {
      * Get the class.
      *
      * @param clazz
-     * @return
+     * @return a reference to the named class
      * @throws ClassNotFoundException
      */
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginManager.java b/framework/src/org/apache/cordova/PluginManager.java
index 06f6033..08f7a12 100755
--- a/framework/src/org/apache/cordova/PluginManager.java
+++ b/framework/src/org/apache/cordova/PluginManager.java
@@ -339,7 +339,7 @@ public class PluginManager {
      *
      * @param id                The message id
      * @param data              The message data
-     * @return
+     * @return                  Object to stop propagation or null
      */
     public Object postMessage(String id, Object data) {
         Object obj = this.ctx.onMessage(id, data);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/648c5d6d/framework/src/org/apache/cordova/Whitelist.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Whitelist.java b/framework/src/org/apache/cordova/Whitelist.java
index f23ac3d..a868a77 100644
--- a/framework/src/org/apache/cordova/Whitelist.java
+++ b/framework/src/org/apache/cordova/Whitelist.java
@@ -149,7 +149,7 @@ public class Whitelist {
      * Determine if URL is in approved list of URLs to load.
      *
      * @param uri
-     * @return
+     * @return true if wide open or whitelisted
      */
     public boolean isUrlWhiteListed(String uri) {
         // If there is no whitelist, then it's wide open


[50/50] [abbrv] git commit: CB-5422: Don't require JAVA_HOME to be defined

Posted by bo...@apache.org.
CB-5422: Don't require JAVA_HOME to be defined

JAVA_HOME is not necessarily defined on Linux and Mac.
Print out the value of JAVA_HOME in the error message
in case "java -version" fails.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/17d373a5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/17d373a5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/17d373a5

Branch: refs/heads/master
Commit: 17d373a5af9785c6ab409db2930a6fd1654e63b0
Parents: 5bc99c0
Author: Mark Koudritsky <ka...@chromium.org>
Authored: Wed Nov 27 16:59:20 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:24 2014 -0800

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/17d373a5/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 807086e..ef11e0c 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -52,16 +52,18 @@ module.exports.check_ant = function() {
 
 // Returns a promise.
 module.exports.check_java = function() {
-    if(process.env.JAVA_HOME) {
-        var d = Q.defer();
-        child_process.exec('java', function(err, stdout, stderr) {
-            if(err) d.reject(new Error('ERROR : executing command \'java\', make sure you java environment is set up. Including your JDK and JRE.'));
-            else d.resolve();
-        });
-        return d.promise;
-    } else {
-        return Q.reject(new Error('ERROR : Make sure JAVA_HOME is set, as well as paths to your JDK and JRE for java.'));
-    }
+    var d = Q.defer();
+    child_process.exec('java -version', function(err, stdout, stderr) {
+        if(err) {
+            var msg =
+                'Failed to run \'java -version\', make sure your java environment is set up\n' +
+                'including JDK and JRE.\n' +
+                'Your JAVA_HOME variable is ' + process.env.JAVA_HOME + '\n';
+            d.reject(new Error(msg + err));
+        }
+        else d.resolve();
+    });
+    return d.promise;
 }
 
 // Returns a promise.


[27/50] [abbrv] git commit: Moving the console.log out of run() method

Posted by bo...@apache.org.
Moving the console.log out of run() method

Since cordova-cli calls the check_req library run() method, we do not
want to always console.log on success in there (not usually a useful side
effect).


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/a4029b23
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/a4029b23
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/a4029b23

Branch: refs/heads/master
Commit: a4029b23f4bc9714830458201ed174427cc870b8
Parents: 648c5d6
Author: Michal Mocny <mm...@gmail.com>
Authored: Fri Nov 29 14:39:09 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:18 2014 -0800

----------------------------------------------------------------------
 bin/check_reqs        | 13 ++++++++-----
 bin/lib/check_reqs.js |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a4029b23/bin/check_reqs
----------------------------------------------------------------------
diff --git a/bin/check_reqs b/bin/check_reqs
index 2ac8752..372a383 100755
--- a/bin/check_reqs
+++ b/bin/check_reqs
@@ -21,8 +21,11 @@
 
 var check_reqs = require('./lib/check_reqs');
 
-check_reqs.run().done(null, function(err) {
-    console.log(err);
-    process.exit(2);
-});
-
+check_reqs.run().done(
+    function success() {
+        console.log('Looks like your environment fully supports cordova-android development!');
+    }, function fail(err) {
+        console.log(err);
+        process.exit(2);
+    }
+);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a4029b23/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 266bec9..807086e 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -89,5 +89,5 @@ module.exports.check_android = function() {
 
 // Returns a promise.
 module.exports.run = function() {
-    return Q.all([this.check_ant(), this.check_java, this.check_android()]);
+    return Q.all([this.check_ant(), this.check_java(), this.check_android()]);
 }


[02/50] [abbrv] Removing the plugins directory after the plugins were incorrectly removed

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
deleted file mode 100644
index bccb66c..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
+++ /dev/null
@@ -1,2530 +0,0 @@
-var isCommonJS = typeof window == "undefined";
-
-/**
- * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
- *
- * @namespace
- */
-var jasmine = {};
-if (isCommonJS) exports.jasmine = jasmine;
-/**
- * @private
- */
-jasmine.unimplementedMethod_ = function() {
-  throw new Error("unimplemented method");
-};
-
-/**
- * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
- * a plain old variable and may be redefined by somebody else.
- *
- * @private
- */
-jasmine.undefined = jasmine.___undefined___;
-
-/**
- * Show diagnostic messages in the console if set to true
- *
- */
-jasmine.VERBOSE = false;
-
-/**
- * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
- *
- */
-jasmine.DEFAULT_UPDATE_INTERVAL = 250;
-
-/**
- * Default timeout interval in milliseconds for waitsFor() blocks.
- */
-jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
-
-jasmine.getGlobal = function() {
-  function getGlobal() {
-    return this;
-  }
-
-  return getGlobal();
-};
-
-/**
- * Allows for bound functions to be compared.  Internal use only.
- *
- * @ignore
- * @private
- * @param base {Object} bound 'this' for the function
- * @param name {Function} function to find
- */
-jasmine.bindOriginal_ = function(base, name) {
-  var original = base[name];
-  if (original.apply) {
-    return function() {
-      return original.apply(base, arguments);
-    };
-  } else {
-    // IE support
-    return jasmine.getGlobal()[name];
-  }
-};
-
-jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
-jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
-jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
-jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
-
-jasmine.MessageResult = function(values) {
-  this.type = 'log';
-  this.values = values;
-  this.trace = new Error(); // todo: test better
-};
-
-jasmine.MessageResult.prototype.toString = function() {
-  var text = "";
-  for (var i = 0; i < this.values.length; i++) {
-    if (i > 0) text += " ";
-    if (jasmine.isString_(this.values[i])) {
-      text += this.values[i];
-    } else {
-      text += jasmine.pp(this.values[i]);
-    }
-  }
-  return text;
-};
-
-jasmine.ExpectationResult = function(params) {
-  this.type = 'expect';
-  this.matcherName = params.matcherName;
-  this.passed_ = params.passed;
-  this.expected = params.expected;
-  this.actual = params.actual;
-  this.message = this.passed_ ? 'Passed.' : params.message;
-
-  var trace = (params.trace || new Error(this.message));
-  this.trace = this.passed_ ? '' : trace;
-};
-
-jasmine.ExpectationResult.prototype.toString = function () {
-  return this.message;
-};
-
-jasmine.ExpectationResult.prototype.passed = function () {
-  return this.passed_;
-};
-
-/**
- * Getter for the Jasmine environment. Ensures one gets created
- */
-jasmine.getEnv = function() {
-  var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
-  return env;
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isArray_ = function(value) {
-  return jasmine.isA_("Array", value);
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isString_ = function(value) {
-  return jasmine.isA_("String", value);
-};
-
-/**
- * @ignore
- * @private
- * @param value
- * @returns {Boolean}
- */
-jasmine.isNumber_ = function(value) {
-  return jasmine.isA_("Number", value);
-};
-
-/**
- * @ignore
- * @private
- * @param {String} typeName
- * @param value
- * @returns {Boolean}
- */
-jasmine.isA_ = function(typeName, value) {
-  return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
-};
-
-/**
- * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
- *
- * @param value {Object} an object to be outputted
- * @returns {String}
- */
-jasmine.pp = function(value) {
-  var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
-  stringPrettyPrinter.format(value);
-  return stringPrettyPrinter.string;
-};
-
-/**
- * Returns true if the object is a DOM Node.
- *
- * @param {Object} obj object to check
- * @returns {Boolean}
- */
-jasmine.isDomNode = function(obj) {
-  return obj.nodeType > 0;
-};
-
-/**
- * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
- *
- * @example
- * // don't care about which function is passed in, as long as it's a function
- * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
- *
- * @param {Class} clazz
- * @returns matchable object of the type clazz
- */
-jasmine.any = function(clazz) {
-  return new jasmine.Matchers.Any(clazz);
-};
-
-/**
- * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the
- * attributes on the object.
- *
- * @example
- * // don't care about any other attributes than foo.
- * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"});
- *
- * @param sample {Object} sample
- * @returns matchable object for the sample
- */
-jasmine.objectContaining = function (sample) {
-    return new jasmine.Matchers.ObjectContaining(sample);
-};
-
-/**
- * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
- *
- * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
- * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
- *
- * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
- *
- * Spies are torn down at the end of every spec.
- *
- * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
- *
- * @example
- * // a stub
- * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
- *
- * // spy example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- *
- * // actual foo.not will not be called, execution stops
- * spyOn(foo, 'not');
-
- // foo.not spied upon, execution will continue to implementation
- * spyOn(foo, 'not').andCallThrough();
- *
- * // fake example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- *
- * // foo.not(val) will return val
- * spyOn(foo, 'not').andCallFake(function(value) {return value;});
- *
- * // mock example
- * foo.not(7 == 7);
- * expect(foo.not).toHaveBeenCalled();
- * expect(foo.not).toHaveBeenCalledWith(true);
- *
- * @constructor
- * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
- * @param {String} name
- */
-jasmine.Spy = function(name) {
-  /**
-   * The name of the spy, if provided.
-   */
-  this.identity = name || 'unknown';
-  /**
-   *  Is this Object a spy?
-   */
-  this.isSpy = true;
-  /**
-   * The actual function this spy stubs.
-   */
-  this.plan = function() {
-  };
-  /**
-   * Tracking of the most recent call to the spy.
-   * @example
-   * var mySpy = jasmine.createSpy('foo');
-   * mySpy(1, 2);
-   * mySpy.mostRecentCall.args = [1, 2];
-   */
-  this.mostRecentCall = {};
-
-  /**
-   * Holds arguments for each call to the spy, indexed by call count
-   * @example
-   * var mySpy = jasmine.createSpy('foo');
-   * mySpy(1, 2);
-   * mySpy(7, 8);
-   * mySpy.mostRecentCall.args = [7, 8];
-   * mySpy.argsForCall[0] = [1, 2];
-   * mySpy.argsForCall[1] = [7, 8];
-   */
-  this.argsForCall = [];
-  this.calls = [];
-};
-
-/**
- * Tells a spy to call through to the actual implemenatation.
- *
- * @example
- * var foo = {
- *   bar: function() { // do some stuff }
- * }
- *
- * // defining a spy on an existing property: foo.bar
- * spyOn(foo, 'bar').andCallThrough();
- */
-jasmine.Spy.prototype.andCallThrough = function() {
-  this.plan = this.originalValue;
-  return this;
-};
-
-/**
- * For setting the return value of a spy.
- *
- * @example
- * // defining a spy from scratch: foo() returns 'baz'
- * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
- *
- * // defining a spy on an existing property: foo.bar() returns 'baz'
- * spyOn(foo, 'bar').andReturn('baz');
- *
- * @param {Object} value
- */
-jasmine.Spy.prototype.andReturn = function(value) {
-  this.plan = function() {
-    return value;
-  };
-  return this;
-};
-
-/**
- * For throwing an exception when a spy is called.
- *
- * @example
- * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
- * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
- *
- * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
- * spyOn(foo, 'bar').andThrow('baz');
- *
- * @param {String} exceptionMsg
- */
-jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
-  this.plan = function() {
-    throw exceptionMsg;
-  };
-  return this;
-};
-
-/**
- * Calls an alternate implementation when a spy is called.
- *
- * @example
- * var baz = function() {
- *   // do some stuff, return something
- * }
- * // defining a spy from scratch: foo() calls the function baz
- * var foo = jasmine.createSpy('spy on foo').andCall(baz);
- *
- * // defining a spy on an existing property: foo.bar() calls an anonymnous function
- * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
- *
- * @param {Function} fakeFunc
- */
-jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
-  this.plan = fakeFunc;
-  return this;
-};
-
-/**
- * Resets all of a spy's the tracking variables so that it can be used again.
- *
- * @example
- * spyOn(foo, 'bar');
- *
- * foo.bar();
- *
- * expect(foo.bar.callCount).toEqual(1);
- *
- * foo.bar.reset();
- *
- * expect(foo.bar.callCount).toEqual(0);
- */
-jasmine.Spy.prototype.reset = function() {
-  this.wasCalled = false;
-  this.callCount = 0;
-  this.argsForCall = [];
-  this.calls = [];
-  this.mostRecentCall = {};
-};
-
-jasmine.createSpy = function(name) {
-
-  var spyObj = function() {
-    spyObj.wasCalled = true;
-    spyObj.callCount++;
-    var args = jasmine.util.argsToArray(arguments);
-    spyObj.mostRecentCall.object = this;
-    spyObj.mostRecentCall.args = args;
-    spyObj.argsForCall.push(args);
-    spyObj.calls.push({object: this, args: args});
-    return spyObj.plan.apply(this, arguments);
-  };
-
-  var spy = new jasmine.Spy(name);
-
-  for (var prop in spy) {
-    spyObj[prop] = spy[prop];
-  }
-
-  spyObj.reset();
-
-  return spyObj;
-};
-
-/**
- * Determines whether an object is a spy.
- *
- * @param {jasmine.Spy|Object} putativeSpy
- * @returns {Boolean}
- */
-jasmine.isSpy = function(putativeSpy) {
-  return putativeSpy && putativeSpy.isSpy;
-};
-
-/**
- * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
- * large in one call.
- *
- * @param {String} baseName name of spy class
- * @param {Array} methodNames array of names of methods to make spies
- */
-jasmine.createSpyObj = function(baseName, methodNames) {
-  if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {
-    throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
-  }
-  var obj = {};
-  for (var i = 0; i < methodNames.length; i++) {
-    obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
-  }
-  return obj;
-};
-
-/**
- * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
- *
- * Be careful not to leave calls to <code>jasmine.log</code> in production code.
- */
-jasmine.log = function() {
-  var spec = jasmine.getEnv().currentSpec;
-  spec.log.apply(spec, arguments);
-};
-
-/**
- * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
- *
- * @example
- * // spy example
- * var foo = {
- *   not: function(bool) { return !bool; }
- * }
- * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
- *
- * @see jasmine.createSpy
- * @param obj
- * @param methodName
- * @returns a Jasmine spy that can be chained with all spy methods
- */
-var spyOn = function(obj, methodName) {
-  return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
-};
-if (isCommonJS) exports.spyOn = spyOn;
-
-/**
- * Creates a Jasmine spec that will be added to the current suite.
- *
- * // TODO: pending tests
- *
- * @example
- * it('should be true', function() {
- *   expect(true).toEqual(true);
- * });
- *
- * @param {String} desc description of this specification
- * @param {Function} func defines the preconditions and expectations of the spec
- */
-var it = function(desc, func) {
-  return jasmine.getEnv().it(desc, func);
-};
-if (isCommonJS) exports.it = it;
-
-/**
- * Creates a <em>disabled</em> Jasmine spec.
- *
- * A convenience method that allows existing specs to be disabled temporarily during development.
- *
- * @param {String} desc description of this specification
- * @param {Function} func defines the preconditions and expectations of the spec
- */
-var xit = function(desc, func) {
-  return jasmine.getEnv().xit(desc, func);
-};
-if (isCommonJS) exports.xit = xit;
-
-/**
- * Starts a chain for a Jasmine expectation.
- *
- * It is passed an Object that is the actual value and should chain to one of the many
- * jasmine.Matchers functions.
- *
- * @param {Object} actual Actual value to test against and expected value
- */
-var expect = function(actual) {
-  return jasmine.getEnv().currentSpec.expect(actual);
-};
-if (isCommonJS) exports.expect = expect;
-
-/**
- * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
- *
- * @param {Function} func Function that defines part of a jasmine spec.
- */
-var runs = function(func) {
-  jasmine.getEnv().currentSpec.runs(func);
-};
-if (isCommonJS) exports.runs = runs;
-
-/**
- * Waits a fixed time period before moving to the next block.
- *
- * @deprecated Use waitsFor() instead
- * @param {Number} timeout milliseconds to wait
- */
-var waits = function(timeout) {
-  jasmine.getEnv().currentSpec.waits(timeout);
-};
-if (isCommonJS) exports.waits = waits;
-
-/**
- * Waits for the latchFunction to return true before proceeding to the next block.
- *
- * @param {Function} latchFunction
- * @param {String} optional_timeoutMessage
- * @param {Number} optional_timeout
- */
-var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
-  jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
-};
-if (isCommonJS) exports.waitsFor = waitsFor;
-
-/**
- * A function that is called before each spec in a suite.
- *
- * Used for spec setup, including validating assumptions.
- *
- * @param {Function} beforeEachFunction
- */
-var beforeEach = function(beforeEachFunction) {
-  jasmine.getEnv().beforeEach(beforeEachFunction);
-};
-if (isCommonJS) exports.beforeEach = beforeEach;
-
-/**
- * A function that is called after each spec in a suite.
- *
- * Used for restoring any state that is hijacked during spec execution.
- *
- * @param {Function} afterEachFunction
- */
-var afterEach = function(afterEachFunction) {
-  jasmine.getEnv().afterEach(afterEachFunction);
-};
-if (isCommonJS) exports.afterEach = afterEach;
-
-/**
- * Defines a suite of specifications.
- *
- * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
- * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
- * of setup in some tests.
- *
- * @example
- * // TODO: a simple suite
- *
- * // TODO: a simple suite with a nested describe block
- *
- * @param {String} description A string, usually the class under test.
- * @param {Function} specDefinitions function that defines several specs.
- */
-var describe = function(description, specDefinitions) {
-  return jasmine.getEnv().describe(description, specDefinitions);
-};
-if (isCommonJS) exports.describe = describe;
-
-/**
- * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
- *
- * @param {String} description A string, usually the class under test.
- * @param {Function} specDefinitions function that defines several specs.
- */
-var xdescribe = function(description, specDefinitions) {
-  return jasmine.getEnv().xdescribe(description, specDefinitions);
-};
-if (isCommonJS) exports.xdescribe = xdescribe;
-
-
-// Provide the XMLHttpRequest class for IE 5.x-6.x:
-jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
-  function tryIt(f) {
-    try {
-      return f();
-    } catch(e) {
-    }
-    return null;
-  }
-
-  var xhr = tryIt(function() {
-    return new ActiveXObject("Msxml2.XMLHTTP.6.0");
-  }) ||
-    tryIt(function() {
-      return new ActiveXObject("Msxml2.XMLHTTP.3.0");
-    }) ||
-    tryIt(function() {
-      return new ActiveXObject("Msxml2.XMLHTTP");
-    }) ||
-    tryIt(function() {
-      return new ActiveXObject("Microsoft.XMLHTTP");
-    });
-
-  if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
-
-  return xhr;
-} : XMLHttpRequest;
-/**
- * @namespace
- */
-jasmine.util = {};
-
-/**
- * Declare that a child class inherit it's prototype from the parent class.
- *
- * @private
- * @param {Function} childClass
- * @param {Function} parentClass
- */
-jasmine.util.inherit = function(childClass, parentClass) {
-  /**
-   * @private
-   */
-  var subclass = function() {
-  };
-  subclass.prototype = parentClass.prototype;
-  childClass.prototype = new subclass();
-};
-
-jasmine.util.formatException = function(e) {
-  var lineNumber;
-  if (e.line) {
-    lineNumber = e.line;
-  }
-  else if (e.lineNumber) {
-    lineNumber = e.lineNumber;
-  }
-
-  var file;
-
-  if (e.sourceURL) {
-    file = e.sourceURL;
-  }
-  else if (e.fileName) {
-    file = e.fileName;
-  }
-
-  var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
-
-  if (file && lineNumber) {
-    message += ' in ' + file + ' (line ' + lineNumber + ')';
-  }
-
-  return message;
-};
-
-jasmine.util.htmlEscape = function(str) {
-  if (!str) return str;
-  return str.replace(/&/g, '&amp;')
-    .replace(/</g, '&lt;')
-    .replace(/>/g, '&gt;');
-};
-
-jasmine.util.argsToArray = function(args) {
-  var arrayOfArgs = [];
-  for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
-  return arrayOfArgs;
-};
-
-jasmine.util.extend = function(destination, source) {
-  for (var property in source) destination[property] = source[property];
-  return destination;
-};
-
-/**
- * Environment for Jasmine
- *
- * @constructor
- */
-jasmine.Env = function() {
-  this.currentSpec = null;
-  this.currentSuite = null;
-  this.currentRunner_ = new jasmine.Runner(this);
-
-  this.reporter = new jasmine.MultiReporter();
-
-  this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
-  this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
-  this.lastUpdate = 0;
-  this.specFilter = function() {
-    return true;
-  };
-
-  this.nextSpecId_ = 0;
-  this.nextSuiteId_ = 0;
-  this.equalityTesters_ = [];
-
-  // wrap matchers
-  this.matchersClass = function() {
-    jasmine.Matchers.apply(this, arguments);
-  };
-  jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
-
-  jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
-};
-
-
-jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
-jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
-jasmine.Env.prototype.setInterval = jasmine.setInterval;
-jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
-
-/**
- * @returns an object containing jasmine version build info, if set.
- */
-jasmine.Env.prototype.version = function () {
-  if (jasmine.version_) {
-    return jasmine.version_;
-  } else {
-    throw new Error('Version not set');
-  }
-};
-
-/**
- * @returns string containing jasmine version build info, if set.
- */
-jasmine.Env.prototype.versionString = function() {
-  if (!jasmine.version_) {
-    return "version unknown";
-  }
-
-  var version = this.version();
-  var versionString = version.major + "." + version.minor + "." + version.build;
-  if (version.release_candidate) {
-    versionString += ".rc" + version.release_candidate;
-  }
-  versionString += " revision " + version.revision;
-  return versionString;
-};
-
-/**
- * @returns a sequential integer starting at 0
- */
-jasmine.Env.prototype.nextSpecId = function () {
-  return this.nextSpecId_++;
-};
-
-/**
- * @returns a sequential integer starting at 0
- */
-jasmine.Env.prototype.nextSuiteId = function () {
-  return this.nextSuiteId_++;
-};
-
-/**
- * Register a reporter to receive status updates from Jasmine.
- * @param {jasmine.Reporter} reporter An object which will receive status updates.
- */
-jasmine.Env.prototype.addReporter = function(reporter) {
-  this.reporter.addReporter(reporter);
-};
-
-jasmine.Env.prototype.execute = function() {
-  this.currentRunner_.execute();
-};
-
-jasmine.Env.prototype.describe = function(description, specDefinitions) {
-  var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
-
-  var parentSuite = this.currentSuite;
-  if (parentSuite) {
-    parentSuite.add(suite);
-  } else {
-    this.currentRunner_.add(suite);
-  }
-
-  this.currentSuite = suite;
-
-  var declarationError = null;
-  try {
-    specDefinitions.call(suite);
-  } catch(e) {
-    declarationError = e;
-  }
-
-  if (declarationError) {
-    this.it("encountered a declaration exception", function() {
-      throw declarationError;
-    });
-  }
-
-  this.currentSuite = parentSuite;
-
-  return suite;
-};
-
-jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
-  if (this.currentSuite) {
-    this.currentSuite.beforeEach(beforeEachFunction);
-  } else {
-    this.currentRunner_.beforeEach(beforeEachFunction);
-  }
-};
-
-jasmine.Env.prototype.currentRunner = function () {
-  return this.currentRunner_;
-};
-
-jasmine.Env.prototype.afterEach = function(afterEachFunction) {
-  if (this.currentSuite) {
-    this.currentSuite.afterEach(afterEachFunction);
-  } else {
-    this.currentRunner_.afterEach(afterEachFunction);
-  }
-
-};
-
-jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
-  return {
-    execute: function() {
-    }
-  };
-};
-
-jasmine.Env.prototype.it = function(description, func) {
-  var spec = new jasmine.Spec(this, this.currentSuite, description);
-  this.currentSuite.add(spec);
-  this.currentSpec = spec;
-
-  if (func) {
-    spec.runs(func);
-  }
-
-  return spec;
-};
-
-jasmine.Env.prototype.xit = function(desc, func) {
-  return {
-    id: this.nextSpecId(),
-    runs: function() {
-    }
-  };
-};
-
-jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
-  if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
-    return true;
-  }
-
-  a.__Jasmine_been_here_before__ = b;
-  b.__Jasmine_been_here_before__ = a;
-
-  var hasKey = function(obj, keyName) {
-    return obj !== null && obj[keyName] !== jasmine.undefined;
-  };
-
-  for (var property in b) {
-    if (!hasKey(a, property) && hasKey(b, property)) {
-      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
-    }
-  }
-  for (property in a) {
-    if (!hasKey(b, property) && hasKey(a, property)) {
-      mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
-    }
-  }
-  for (property in b) {
-    if (property == '__Jasmine_been_here_before__') continue;
-    if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
-      mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
-    }
-  }
-
-  if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
-    mismatchValues.push("arrays were not the same length");
-  }
-
-  delete a.__Jasmine_been_here_before__;
-  delete b.__Jasmine_been_here_before__;
-  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
-};
-
-jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
-  mismatchKeys = mismatchKeys || [];
-  mismatchValues = mismatchValues || [];
-
-  for (var i = 0; i < this.equalityTesters_.length; i++) {
-    var equalityTester = this.equalityTesters_[i];
-    var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
-    if (result !== jasmine.undefined) return result;
-  }
-
-  if (a === b) return true;
-
-  if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
-    return (a == jasmine.undefined && b == jasmine.undefined);
-  }
-
-  if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
-    return a === b;
-  }
-
-  if (a instanceof Date && b instanceof Date) {
-    return a.getTime() == b.getTime();
-  }
-
-  if (a.jasmineMatches) {
-    return a.jasmineMatches(b);
-  }
-
-  if (b.jasmineMatches) {
-    return b.jasmineMatches(a);
-  }
-
-  if (a instanceof jasmine.Matchers.ObjectContaining) {
-    return a.matches(b);
-  }
-
-  if (b instanceof jasmine.Matchers.ObjectContaining) {
-    return b.matches(a);
-  }
-
-  if (jasmine.isString_(a) && jasmine.isString_(b)) {
-    return (a == b);
-  }
-
-  if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
-    return (a == b);
-  }
-
-  if (typeof a === "object" && typeof b === "object") {
-    return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
-  }
-
-  //Straight check
-  return (a === b);
-};
-
-jasmine.Env.prototype.contains_ = function(haystack, needle) {
-  if (jasmine.isArray_(haystack)) {
-    for (var i = 0; i < haystack.length; i++) {
-      if (this.equals_(haystack[i], needle)) return true;
-    }
-    return false;
-  }
-  return haystack.indexOf(needle) >= 0;
-};
-
-jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
-  this.equalityTesters_.push(equalityTester);
-};
-/** No-op base class for Jasmine reporters.
- *
- * @constructor
- */
-jasmine.Reporter = function() {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.reportSpecResults = function(spec) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.Reporter.prototype.log = function(str) {
-};
-
-/**
- * Blocks are functions with executable code that make up a spec.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {Function} func
- * @param {jasmine.Spec} spec
- */
-jasmine.Block = function(env, func, spec) {
-  this.env = env;
-  this.func = func;
-  this.spec = spec;
-};
-
-jasmine.Block.prototype.execute = function(onComplete) {  
-  try {
-    this.func.apply(this.spec);
-  } catch (e) {
-    this.spec.fail(e);
-  }
-  onComplete();
-};
-/** JavaScript API reporter.
- *
- * @constructor
- */
-jasmine.JsApiReporter = function() {
-  this.started = false;
-  this.finished = false;
-  this.suites_ = [];
-  this.results_ = {};
-};
-
-jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
-  this.started = true;
-  var suites = runner.topLevelSuites();
-  for (var i = 0; i < suites.length; i++) {
-    var suite = suites[i];
-    this.suites_.push(this.summarize_(suite));
-  }
-};
-
-jasmine.JsApiReporter.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
-  var isSuite = suiteOrSpec instanceof jasmine.Suite;
-  var summary = {
-    id: suiteOrSpec.id,
-    name: suiteOrSpec.description,
-    type: isSuite ? 'suite' : 'spec',
-    children: []
-  };
-  
-  if (isSuite) {
-    var children = suiteOrSpec.children();
-    for (var i = 0; i < children.length; i++) {
-      summary.children.push(this.summarize_(children[i]));
-    }
-  }
-  return summary;
-};
-
-jasmine.JsApiReporter.prototype.results = function() {
-  return this.results_;
-};
-
-jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
-  return this.results_[specId];
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
-  this.finished = true;
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
-  this.results_[spec.id] = {
-    messages: spec.results().getItems(),
-    result: spec.results().failedCount > 0 ? "failed" : "passed"
-  };
-};
-
-//noinspection JSUnusedLocalSymbols
-jasmine.JsApiReporter.prototype.log = function(str) {
-};
-
-jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
-  var results = {};
-  for (var i = 0; i < specIds.length; i++) {
-    var specId = specIds[i];
-    results[specId] = this.summarizeResult_(this.results_[specId]);
-  }
-  return results;
-};
-
-jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
-  var summaryMessages = [];
-  var messagesLength = result.messages.length;
-  for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
-    var resultMessage = result.messages[messageIndex];
-    summaryMessages.push({
-      text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
-      passed: resultMessage.passed ? resultMessage.passed() : true,
-      type: resultMessage.type,
-      message: resultMessage.message,
-      trace: {
-        stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
-      }
-    });
-  }
-
-  return {
-    result : result.result,
-    messages : summaryMessages
-  };
-};
-
-/**
- * @constructor
- * @param {jasmine.Env} env
- * @param actual
- * @param {jasmine.Spec} spec
- */
-jasmine.Matchers = function(env, actual, spec, opt_isNot) {
-  this.env = env;
-  this.actual = actual;
-  this.spec = spec;
-  this.isNot = opt_isNot || false;
-  this.reportWasCalled_ = false;
-};
-
-// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
-jasmine.Matchers.pp = function(str) {
-  throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
-};
-
-// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
-jasmine.Matchers.prototype.report = function(result, failing_message, details) {
-  throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
-};
-
-jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
-  for (var methodName in prototype) {
-    if (methodName == 'report') continue;
-    var orig = prototype[methodName];
-    matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
-  }
-};
-
-jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
-  return function() {
-    var matcherArgs = jasmine.util.argsToArray(arguments);
-    var result = matcherFunction.apply(this, arguments);
-
-    if (this.isNot) {
-      result = !result;
-    }
-
-    if (this.reportWasCalled_) return result;
-
-    var message;
-    if (!result) {
-      if (this.message) {
-        message = this.message.apply(this, arguments);
-        if (jasmine.isArray_(message)) {
-          message = message[this.isNot ? 1 : 0];
-        }
-      } else {
-        var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
-        message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
-        if (matcherArgs.length > 0) {
-          for (var i = 0; i < matcherArgs.length; i++) {
-            if (i > 0) message += ",";
-            message += " " + jasmine.pp(matcherArgs[i]);
-          }
-        }
-        message += ".";
-      }
-    }
-    var expectationResult = new jasmine.ExpectationResult({
-      matcherName: matcherName,
-      passed: result,
-      expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
-      actual: this.actual,
-      message: message
-    });
-    this.spec.addMatcherResult(expectationResult);
-    return jasmine.undefined;
-  };
-};
-
-
-
-
-/**
- * toBe: compares the actual to the expected using ===
- * @param expected
- */
-jasmine.Matchers.prototype.toBe = function(expected) {
-  return this.actual === expected;
-};
-
-/**
- * toNotBe: compares the actual to the expected using !==
- * @param expected
- * @deprecated as of 1.0. Use not.toBe() instead.
- */
-jasmine.Matchers.prototype.toNotBe = function(expected) {
-  return this.actual !== expected;
-};
-
-/**
- * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
- *
- * @param expected
- */
-jasmine.Matchers.prototype.toEqual = function(expected) {
-  return this.env.equals_(this.actual, expected);
-};
-
-/**
- * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
- * @param expected
- * @deprecated as of 1.0. Use not.toEqual() instead.
- */
-jasmine.Matchers.prototype.toNotEqual = function(expected) {
-  return !this.env.equals_(this.actual, expected);
-};
-
-/**
- * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
- * a pattern or a String.
- *
- * @param expected
- */
-jasmine.Matchers.prototype.toMatch = function(expected) {
-  return new RegExp(expected).test(this.actual);
-};
-
-/**
- * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
- * @param expected
- * @deprecated as of 1.0. Use not.toMatch() instead.
- */
-jasmine.Matchers.prototype.toNotMatch = function(expected) {
-  return !(new RegExp(expected).test(this.actual));
-};
-
-/**
- * Matcher that compares the actual to jasmine.undefined.
- */
-jasmine.Matchers.prototype.toBeDefined = function() {
-  return (this.actual !== jasmine.undefined);
-};
-
-/**
- * Matcher that compares the actual to jasmine.undefined.
- */
-jasmine.Matchers.prototype.toBeUndefined = function() {
-  return (this.actual === jasmine.undefined);
-};
-
-/**
- * Matcher that compares the actual to null.
- */
-jasmine.Matchers.prototype.toBeNull = function() {
-  return (this.actual === null);
-};
-
-/**
- * Matcher that boolean not-nots the actual.
- */
-jasmine.Matchers.prototype.toBeTruthy = function() {
-  return !!this.actual;
-};
-
-
-/**
- * Matcher that boolean nots the actual.
- */
-jasmine.Matchers.prototype.toBeFalsy = function() {
-  return !this.actual;
-};
-
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was called.
- */
-jasmine.Matchers.prototype.toHaveBeenCalled = function() {
-  if (arguments.length > 0) {
-    throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
-  }
-
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy " + this.actual.identity + " to have been called.",
-      "Expected spy " + this.actual.identity + " not to have been called."
-    ];
-  };
-
-  return this.actual.wasCalled;
-};
-
-/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
-jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was not called.
- *
- * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
- */
-jasmine.Matchers.prototype.wasNotCalled = function() {
-  if (arguments.length > 0) {
-    throw new Error('wasNotCalled does not take arguments');
-  }
-
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy " + this.actual.identity + " to not have been called.",
-      "Expected spy " + this.actual.identity + " to have been called."
-    ];
-  };
-
-  return !this.actual.wasCalled;
-};
-
-/**
- * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
- *
- * @example
- *
- */
-jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
-  var expectedArgs = jasmine.util.argsToArray(arguments);
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-  this.message = function() {
-    if (this.actual.callCount === 0) {
-      // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
-      return [
-        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.",
-        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."
-      ];
-    } else {
-      return [
-        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall),
-        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall)
-      ];
-    }
-  };
-
-  return this.env.contains_(this.actual.argsForCall, expectedArgs);
-};
-
-/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
-jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
-
-/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
-jasmine.Matchers.prototype.wasNotCalledWith = function() {
-  var expectedArgs = jasmine.util.argsToArray(arguments);
-  if (!jasmine.isSpy(this.actual)) {
-    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
-  }
-
-  this.message = function() {
-    return [
-      "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
-      "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
-    ];
-  };
-
-  return !this.env.contains_(this.actual.argsForCall, expectedArgs);
-};
-
-/**
- * Matcher that checks that the expected item is an element in the actual Array.
- *
- * @param {Object} expected
- */
-jasmine.Matchers.prototype.toContain = function(expected) {
-  return this.env.contains_(this.actual, expected);
-};
-
-/**
- * Matcher that checks that the expected item is NOT an element in the actual Array.
- *
- * @param {Object} expected
- * @deprecated as of 1.0. Use not.toContain() instead.
- */
-jasmine.Matchers.prototype.toNotContain = function(expected) {
-  return !this.env.contains_(this.actual, expected);
-};
-
-jasmine.Matchers.prototype.toBeLessThan = function(expected) {
-  return this.actual < expected;
-};
-
-jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
-  return this.actual > expected;
-};
-
-/**
- * Matcher that checks that the expected item is equal to the actual item
- * up to a given level of decimal precision (default 2).
- *
- * @param {Number} expected
- * @param {Number} precision
- */
-jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {
-  if (!(precision === 0)) {
-    precision = precision || 2;
-  }
-  var multiplier = Math.pow(10, precision);
-  var actual = Math.round(this.actual * multiplier);
-  expected = Math.round(expected * multiplier);
-  return expected == actual;
-};
-
-/**
- * Matcher that checks that the expected exception was thrown by the actual.
- *
- * @param {String} expected
- */
-jasmine.Matchers.prototype.toThrow = function(expected) {
-  var result = false;
-  var exception;
-  if (typeof this.actual != 'function') {
-    throw new Error('Actual is not a function');
-  }
-  try {
-    this.actual();
-  } catch (e) {
-    exception = e;
-  }
-  if (exception) {
-    result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
-  }
-
-  var not = this.isNot ? "not " : "";
-
-  this.message = function() {
-    if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
-      return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
-    } else {
-      return "Expected function to throw an exception.";
-    }
-  };
-
-  return result;
-};
-
-jasmine.Matchers.Any = function(expectedClass) {
-  this.expectedClass = expectedClass;
-};
-
-jasmine.Matchers.Any.prototype.jasmineMatches = function(other) {
-  if (this.expectedClass == String) {
-    return typeof other == 'string' || other instanceof String;
-  }
-
-  if (this.expectedClass == Number) {
-    return typeof other == 'number' || other instanceof Number;
-  }
-
-  if (this.expectedClass == Function) {
-    return typeof other == 'function' || other instanceof Function;
-  }
-
-  if (this.expectedClass == Object) {
-    return typeof other == 'object';
-  }
-
-  return other instanceof this.expectedClass;
-};
-
-jasmine.Matchers.Any.prototype.jasmineToString = function() {
-  return '<jasmine.any(' + this.expectedClass + ')>';
-};
-
-jasmine.Matchers.ObjectContaining = function (sample) {
-  this.sample = sample;
-};
-
-jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
-  mismatchKeys = mismatchKeys || [];
-  mismatchValues = mismatchValues || [];
-
-  var env = jasmine.getEnv();
-
-  var hasKey = function(obj, keyName) {
-    return obj != null && obj[keyName] !== jasmine.undefined;
-  };
-
-  for (var property in this.sample) {
-    if (!hasKey(other, property) && hasKey(this.sample, property)) {
-      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
-    }
-    else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
-      mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
-    }
-  }
-
-  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
-};
-
-jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () {
-  return "<jasmine.objectContaining(" + jasmine.pp(this.sample) + ")>";
-};
-// Mock setTimeout, clearTimeout
-// Contributed by Pivotal Computer Systems, www.pivotalsf.com
-
-jasmine.FakeTimer = function() {
-  this.reset();
-
-  var self = this;
-  self.setTimeout = function(funcToCall, millis) {
-    self.timeoutsMade++;
-    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
-    return self.timeoutsMade;
-  };
-
-  self.setInterval = function(funcToCall, millis) {
-    self.timeoutsMade++;
-    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
-    return self.timeoutsMade;
-  };
-
-  self.clearTimeout = function(timeoutKey) {
-    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
-  };
-
-  self.clearInterval = function(timeoutKey) {
-    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
-  };
-
-};
-
-jasmine.FakeTimer.prototype.reset = function() {
-  this.timeoutsMade = 0;
-  this.scheduledFunctions = {};
-  this.nowMillis = 0;
-};
-
-jasmine.FakeTimer.prototype.tick = function(millis) {
-  var oldMillis = this.nowMillis;
-  var newMillis = oldMillis + millis;
-  this.runFunctionsWithinRange(oldMillis, newMillis);
-  this.nowMillis = newMillis;
-};
-
-jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
-  var scheduledFunc;
-  var funcsToRun = [];
-  for (var timeoutKey in this.scheduledFunctions) {
-    scheduledFunc = this.scheduledFunctions[timeoutKey];
-    if (scheduledFunc != jasmine.undefined &&
-        scheduledFunc.runAtMillis >= oldMillis &&
-        scheduledFunc.runAtMillis <= nowMillis) {
-      funcsToRun.push(scheduledFunc);
-      this.scheduledFunctions[timeoutKey] = jasmine.undefined;
-    }
-  }
-
-  if (funcsToRun.length > 0) {
-    funcsToRun.sort(function(a, b) {
-      return a.runAtMillis - b.runAtMillis;
-    });
-    for (var i = 0; i < funcsToRun.length; ++i) {
-      try {
-        var funcToRun = funcsToRun[i];
-        this.nowMillis = funcToRun.runAtMillis;
-        funcToRun.funcToCall();
-        if (funcToRun.recurring) {
-          this.scheduleFunction(funcToRun.timeoutKey,
-              funcToRun.funcToCall,
-              funcToRun.millis,
-              true);
-        }
-      } catch(e) {
-      }
-    }
-    this.runFunctionsWithinRange(oldMillis, nowMillis);
-  }
-};
-
-jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
-  this.scheduledFunctions[timeoutKey] = {
-    runAtMillis: this.nowMillis + millis,
-    funcToCall: funcToCall,
-    recurring: recurring,
-    timeoutKey: timeoutKey,
-    millis: millis
-  };
-};
-
-/**
- * @namespace
- */
-jasmine.Clock = {
-  defaultFakeTimer: new jasmine.FakeTimer(),
-
-  reset: function() {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.defaultFakeTimer.reset();
-  },
-
-  tick: function(millis) {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.defaultFakeTimer.tick(millis);
-  },
-
-  runFunctionsWithinRange: function(oldMillis, nowMillis) {
-    jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
-  },
-
-  scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
-    jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
-  },
-
-  useMock: function() {
-    if (!jasmine.Clock.isInstalled()) {
-      var spec = jasmine.getEnv().currentSpec;
-      spec.after(jasmine.Clock.uninstallMock);
-
-      jasmine.Clock.installMock();
-    }
-  },
-
-  installMock: function() {
-    jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
-  },
-
-  uninstallMock: function() {
-    jasmine.Clock.assertInstalled();
-    jasmine.Clock.installed = jasmine.Clock.real;
-  },
-
-  real: {
-    setTimeout: jasmine.getGlobal().setTimeout,
-    clearTimeout: jasmine.getGlobal().clearTimeout,
-    setInterval: jasmine.getGlobal().setInterval,
-    clearInterval: jasmine.getGlobal().clearInterval
-  },
-
-  assertInstalled: function() {
-    if (!jasmine.Clock.isInstalled()) {
-      throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
-    }
-  },
-
-  isInstalled: function() {
-    return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
-  },
-
-  installed: null
-};
-jasmine.Clock.installed = jasmine.Clock.real;
-
-//else for IE support
-jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
-  if (jasmine.Clock.installed.setTimeout.apply) {
-    return jasmine.Clock.installed.setTimeout.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.setTimeout(funcToCall, millis);
-  }
-};
-
-jasmine.getGlobal().setInterval = function(funcToCall, millis) {
-  if (jasmine.Clock.installed.setInterval.apply) {
-    return jasmine.Clock.installed.setInterval.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.setInterval(funcToCall, millis);
-  }
-};
-
-jasmine.getGlobal().clearTimeout = function(timeoutKey) {
-  if (jasmine.Clock.installed.clearTimeout.apply) {
-    return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.clearTimeout(timeoutKey);
-  }
-};
-
-jasmine.getGlobal().clearInterval = function(timeoutKey) {
-  if (jasmine.Clock.installed.clearTimeout.apply) {
-    return jasmine.Clock.installed.clearInterval.apply(this, arguments);
-  } else {
-    return jasmine.Clock.installed.clearInterval(timeoutKey);
-  }
-};
-
-/**
- * @constructor
- */
-jasmine.MultiReporter = function() {
-  this.subReporters_ = [];
-};
-jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
-
-jasmine.MultiReporter.prototype.addReporter = function(reporter) {
-  this.subReporters_.push(reporter);
-};
-
-(function() {
-  var functionNames = [
-    "reportRunnerStarting",
-    "reportRunnerResults",
-    "reportSuiteResults",
-    "reportSpecStarting",
-    "reportSpecResults",
-    "log"
-  ];
-  for (var i = 0; i < functionNames.length; i++) {
-    var functionName = functionNames[i];
-    jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
-      return function() {
-        for (var j = 0; j < this.subReporters_.length; j++) {
-          var subReporter = this.subReporters_[j];
-          if (subReporter[functionName]) {
-            subReporter[functionName].apply(subReporter, arguments);
-          }
-        }
-      };
-    })(functionName);
-  }
-})();
-/**
- * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
- *
- * @constructor
- */
-jasmine.NestedResults = function() {
-  /**
-   * The total count of results
-   */
-  this.totalCount = 0;
-  /**
-   * Number of passed results
-   */
-  this.passedCount = 0;
-  /**
-   * Number of failed results
-   */
-  this.failedCount = 0;
-  /**
-   * Was this suite/spec skipped?
-   */
-  this.skipped = false;
-  /**
-   * @ignore
-   */
-  this.items_ = [];
-};
-
-/**
- * Roll up the result counts.
- *
- * @param result
- */
-jasmine.NestedResults.prototype.rollupCounts = function(result) {
-  this.totalCount += result.totalCount;
-  this.passedCount += result.passedCount;
-  this.failedCount += result.failedCount;
-};
-
-/**
- * Adds a log message.
- * @param values Array of message parts which will be concatenated later.
- */
-jasmine.NestedResults.prototype.log = function(values) {
-  this.items_.push(new jasmine.MessageResult(values));
-};
-
-/**
- * Getter for the results: message & results.
- */
-jasmine.NestedResults.prototype.getItems = function() {
-  return this.items_;
-};
-
-/**
- * Adds a result, tracking counts (total, passed, & failed)
- * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
- */
-jasmine.NestedResults.prototype.addResult = function(result) {
-  if (result.type != 'log') {
-    if (result.items_) {
-      this.rollupCounts(result);
-    } else {
-      this.totalCount++;
-      if (result.passed()) {
-        this.passedCount++;
-      } else {
-        this.failedCount++;
-      }
-    }
-  }
-  this.items_.push(result);
-};
-
-/**
- * @returns {Boolean} True if <b>everything</b> below passed
- */
-jasmine.NestedResults.prototype.passed = function() {
-  return this.passedCount === this.totalCount;
-};
-/**
- * Base class for pretty printing for expectation results.
- */
-jasmine.PrettyPrinter = function() {
-  this.ppNestLevel_ = 0;
-};
-
-/**
- * Formats a value in a nice, human-readable string.
- *
- * @param value
- */
-jasmine.PrettyPrinter.prototype.format = function(value) {
-  if (this.ppNestLevel_ > 40) {
-    throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
-  }
-
-  this.ppNestLevel_++;
-  try {
-    if (value === jasmine.undefined) {
-      this.emitScalar('undefined');
-    } else if (value === null) {
-      this.emitScalar('null');
-    } else if (value === jasmine.getGlobal()) {
-      this.emitScalar('<global>');
-    } else if (value.jasmineToString) {
-      this.emitScalar(value.jasmineToString());
-    } else if (typeof value === 'string') {
-      this.emitString(value);
-    } else if (jasmine.isSpy(value)) {
-      this.emitScalar("spy on " + value.identity);
-    } else if (value instanceof RegExp) {
-      this.emitScalar(value.toString());
-    } else if (typeof value === 'function') {
-      this.emitScalar('Function');
-    } else if (typeof value.nodeType === 'number') {
-      this.emitScalar('HTMLNode');
-    } else if (value instanceof Date) {
-      this.emitScalar('Date(' + value + ')');
-    } else if (value.__Jasmine_been_here_before__) {
-      this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
-    } else if (jasmine.isArray_(value) || typeof value == 'object') {
-      value.__Jasmine_been_here_before__ = true;
-      if (jasmine.isArray_(value)) {
-        this.emitArray(value);
-      } else {
-        this.emitObject(value);
-      }
-      delete value.__Jasmine_been_here_before__;
-    } else {
-      this.emitScalar(value.toString());
-    }
-  } finally {
-    this.ppNestLevel_--;
-  }
-};
-
-jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
-  for (var property in obj) {
-    if (property == '__Jasmine_been_here_before__') continue;
-    fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && 
-                                         obj.__lookupGetter__(property) !== null) : false);
-  }
-};
-
-jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
-jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
-
-jasmine.StringPrettyPrinter = function() {
-  jasmine.PrettyPrinter.call(this);
-
-  this.string = '';
-};
-jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
-
-jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
-  this.append(value);
-};
-
-jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
-  this.append("'" + value + "'");
-};
-
-jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
-  this.append('[ ');
-  for (var i = 0; i < array.length; i++) {
-    if (i > 0) {
-      this.append(', ');
-    }
-    this.format(array[i]);
-  }
-  this.append(' ]');
-};
-
-jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
-  var self = this;
-  this.append('{ ');
-  var first = true;
-
-  this.iterateObject(obj, function(property, isGetter) {
-    if (first) {
-      first = false;
-    } else {
-      self.append(', ');
-    }
-
-    self.append(property);
-    self.append(' : ');
-    if (isGetter) {
-      self.append('<getter>');
-    } else {
-      self.format(obj[property]);
-    }
-  });
-
-  this.append(' }');
-};
-
-jasmine.StringPrettyPrinter.prototype.append = function(value) {
-  this.string += value;
-};
-jasmine.Queue = function(env) {
-  this.env = env;
-  this.blocks = [];
-  this.running = false;
-  this.index = 0;
-  this.offset = 0;
-  this.abort = false;
-};
-
-jasmine.Queue.prototype.addBefore = function(block) {
-  this.blocks.unshift(block);
-};
-
-jasmine.Queue.prototype.add = function(block) {
-  this.blocks.push(block);
-};
-
-jasmine.Queue.prototype.insertNext = function(block) {
-  this.blocks.splice((this.index + this.offset + 1), 0, block);
-  this.offset++;
-};
-
-jasmine.Queue.prototype.start = function(onComplete) {
-  this.running = true;
-  this.onComplete = onComplete;
-  this.next_();
-};
-
-jasmine.Queue.prototype.isRunning = function() {
-  return this.running;
-};
-
-jasmine.Queue.LOOP_DONT_RECURSE = true;
-
-jasmine.Queue.prototype.next_ = function() {
-  var self = this;
-  var goAgain = true;
-
-  while (goAgain) {
-    goAgain = false;
-    
-    if (self.index < self.blocks.length && !this.abort) {
-      var calledSynchronously = true;
-      var completedSynchronously = false;
-
-      var onComplete = function () {
-        if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
-          completedSynchronously = true;
-          return;
-        }
-
-        if (self.blocks[self.index].abort) {
-          self.abort = true;
-        }
-
-        self.offset = 0;
-        self.index++;
-
-        var now = new Date().getTime();
-        if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
-          self.env.lastUpdate = now;
-          self.env.setTimeout(function() {
-            self.next_();
-          }, 0);
-        } else {
-          if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
-            goAgain = true;
-          } else {
-            self.next_();
-          }
-        }
-      };
-      self.blocks[self.index].execute(onComplete);
-
-      calledSynchronously = false;
-      if (completedSynchronously) {
-        onComplete();
-      }
-      
-    } else {
-      self.running = false;
-      if (self.onComplete) {
-        self.onComplete();
-      }
-    }
-  }
-};
-
-jasmine.Queue.prototype.results = function() {
-  var results = new jasmine.NestedResults();
-  for (var i = 0; i < this.blocks.length; i++) {
-    if (this.blocks[i].results) {
-      results.addResult(this.blocks[i].results());
-    }
-  }
-  return results;
-};
-
-
-/**
- * Runner
- *
- * @constructor
- * @param {jasmine.Env} env
- */
-jasmine.Runner = function(env) {
-  var self = this;
-  self.env = env;
-  self.queue = new jasmine.Queue(env);
-  self.before_ = [];
-  self.after_ = [];
-  self.suites_ = [];
-};
-
-jasmine.Runner.prototype.execute = function() {
-  var self = this;
-  if (self.env.reporter.reportRunnerStarting) {
-    self.env.reporter.reportRunnerStarting(this);
-  }
-  self.queue.start(function () {
-    self.finishCallback();
-  });
-};
-
-jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
-  beforeEachFunction.typeName = 'beforeEach';
-  this.before_.splice(0,0,beforeEachFunction);
-};
-
-jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
-  afterEachFunction.typeName = 'afterEach';
-  this.after_.splice(0,0,afterEachFunction);
-};
-
-
-jasmine.Runner.prototype.finishCallback = function() {
-  this.env.reporter.reportRunnerResults(this);
-};
-
-jasmine.Runner.prototype.addSuite = function(suite) {
-  this.suites_.push(suite);
-};
-
-jasmine.Runner.prototype.add = function(block) {
-  if (block instanceof jasmine.Suite) {
-    this.addSuite(block);
-  }
-  this.queue.add(block);
-};
-
-jasmine.Runner.prototype.specs = function () {
-  var suites = this.suites();
-  var specs = [];
-  for (var i = 0; i < suites.length; i++) {
-    specs = specs.concat(suites[i].specs());
-  }
-  return specs;
-};
-
-jasmine.Runner.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.Runner.prototype.topLevelSuites = function() {
-  var topLevelSuites = [];
-  for (var i = 0; i < this.suites_.length; i++) {
-    if (!this.suites_[i].parentSuite) {
-      topLevelSuites.push(this.suites_[i]);
-    }
-  }
-  return topLevelSuites;
-};
-
-jasmine.Runner.prototype.results = function() {
-  return this.queue.results();
-};
-/**
- * Internal representation of a Jasmine specification, or test.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {jasmine.Suite} suite
- * @param {String} description
- */
-jasmine.Spec = function(env, suite, description) {
-  if (!env) {
-    throw new Error('jasmine.Env() required');
-  }
-  if (!suite) {
-    throw new Error('jasmine.Suite() required');
-  }
-  var spec = this;
-  spec.id = env.nextSpecId ? env.nextSpecId() : null;
-  spec.env = env;
-  spec.suite = suite;
-  spec.description = description;
-  spec.queue = new jasmine.Queue(env);
-
-  spec.afterCallbacks = [];
-  spec.spies_ = [];
-
-  spec.results_ = new jasmine.NestedResults();
-  spec.results_.description = description;
-  spec.matchersClass = null;
-};
-
-jasmine.Spec.prototype.getFullName = function() {
-  return this.suite.getFullName() + ' ' + this.description + '.';
-};
-
-
-jasmine.Spec.prototype.results = function() {
-  return this.results_;
-};
-
-/**
- * All parameters are pretty-printed and concatenated together, then written to the spec's output.
- *
- * Be careful not to leave calls to <code>jasmine.log</code> in production code.
- */
-jasmine.Spec.prototype.log = function() {
-  return this.results_.log(arguments);
-};
-
-jasmine.Spec.prototype.runs = function (func) {
-  var block = new jasmine.Block(this.env, func, this);
-  this.addToQueue(block);
-  return this;
-};
-
-jasmine.Spec.prototype.addToQueue = function (block) {
-  if (this.queue.isRunning()) {
-    this.queue.insertNext(block);
-  } else {
-    this.queue.add(block);
-  }
-};
-
-/**
- * @param {jasmine.ExpectationResult} result
- */
-jasmine.Spec.prototype.addMatcherResult = function(result) {
-  this.results_.addResult(result);
-};
-
-jasmine.Spec.prototype.expect = function(actual) {
-  var positive = new (this.getMatchersClass_())(this.env, actual, this);
-  positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
-  return positive;
-};
-
-/**
- * Waits a fixed time period before moving to the next block.
- *
- * @deprecated Use waitsFor() instead
- * @param {Number} timeout milliseconds to wait
- */
-jasmine.Spec.prototype.waits = function(timeout) {
-  var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
-  this.addToQueue(waitsFunc);
-  return this;
-};
-
-/**
- * Waits for the latchFunction to return true before proceeding to the next block.
- *
- * @param {Function} latchFunction
- * @param {String} optional_timeoutMessage
- * @param {Number} optional_timeout
- */
-jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
-  var latchFunction_ = null;
-  var optional_timeoutMessage_ = null;
-  var optional_timeout_ = null;
-
-  for (var i = 0; i < arguments.length; i++) {
-    var arg = arguments[i];
-    switch (typeof arg) {
-      case 'function':
-        latchFunction_ = arg;
-        break;
-      case 'string':
-        optional_timeoutMessage_ = arg;
-        break;
-      case 'number':
-        optional_timeout_ = arg;
-        break;
-    }
-  }
-
-  var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
-  this.addToQueue(waitsForFunc);
-  return this;
-};
-
-jasmine.Spec.prototype.fail = function (e) {
-  var expectationResult = new jasmine.ExpectationResult({
-    passed: false,
-    message: e ? jasmine.util.formatException(e) : 'Exception',
-    trace: { stack: e.stack }
-  });
-  this.results_.addResult(expectationResult);
-};
-
-jasmine.Spec.prototype.getMatchersClass_ = function() {
-  return this.matchersClass || this.env.matchersClass;
-};
-
-jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
-  var parent = this.getMatchersClass_();
-  var newMatchersClass = function() {
-    parent.apply(this, arguments);
-  };
-  jasmine.util.inherit(newMatchersClass, parent);
-  jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
-  this.matchersClass = newMatchersClass;
-};
-
-jasmine.Spec.prototype.finishCallback = function() {
-  this.env.reporter.reportSpecResults(this);
-};
-
-jasmine.Spec.prototype.finish = function(onComplete) {
-  this.removeAllSpies();
-  this.finishCallback();
-  if (onComplete) {
-    onComplete();
-  }
-};
-
-jasmine.Spec.prototype.after = function(doAfter) {
-  if (this.queue.isRunning()) {
-    this.queue.add(new jasmine.Block(this.env, doAfter, this));
-  } else {
-    this.afterCallbacks.unshift(doAfter);
-  }
-};
-
-jasmine.Spec.prototype.execute = function(onComplete) {
-  var spec = this;
-  if (!spec.env.specFilter(spec)) {
-    spec.results_.skipped = true;
-    spec.finish(onComplete);
-    return;
-  }
-
-  this.env.reporter.reportSpecStarting(this);
-
-  spec.env.currentSpec = spec;
-
-  spec.addBeforesAndAftersToQueue();
-
-  spec.queue.start(function () {
-    spec.finish(onComplete);
-  });
-};
-
-jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
-  var runner = this.env.currentRunner();
-  var i;
-
-  for (var suite = this.suite; suite; suite = suite.parentSuite) {
-    for (i = 0; i < suite.before_.length; i++) {
-      this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
-    }
-  }
-  for (i = 0; i < runner.before_.length; i++) {
-    this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
-  }
-  for (i = 0; i < this.afterCallbacks.length; i++) {
-    this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
-  }
-  for (suite = this.suite; suite; suite = suite.parentSuite) {
-    for (i = 0; i < suite.after_.length; i++) {
-      this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
-    }
-  }
-  for (i = 0; i < runner.after_.length; i++) {
-    this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
-  }
-};
-
-jasmine.Spec.prototype.explodes = function() {
-  throw 'explodes function should not have been called';
-};
-
-jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
-  if (obj == jasmine.undefined) {
-    throw "spyOn could not find an object to spy upon for " + methodName + "()";
-  }
-
-  if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
-    throw methodName + '() method does not exist';
-  }
-
-  if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
-    throw new Error(methodName + ' has already been spied upon');
-  }
-
-  var spyObj = jasmine.createSpy(methodName);
-
-  this.spies_.push(spyObj);
-  spyObj.baseObj = obj;
-  spyObj.methodName = methodName;
-  spyObj.originalValue = obj[methodName];
-
-  obj[methodName] = spyObj;
-
-  return spyObj;
-};
-
-jasmine.Spec.prototype.removeAllSpies = function() {
-  for (var i = 0; i < this.spies_.length; i++) {
-    var spy = this.spies_[i];
-    spy.baseObj[spy.methodName] = spy.originalValue;
-  }
-  this.spies_ = [];
-};
-
-/**
- * Internal representation of a Jasmine suite.
- *
- * @constructor
- * @param {jasmine.Env} env
- * @param {String} description
- * @param {Function} specDefinitions
- * @param {jasmine.Suite} parentSuite
- */
-jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
-  var self = this;
-  self.id = env.nextSuiteId ? env.nextSuiteId() : null;
-  self.description = description;
-  self.queue = new jasmine.Queue(env);
-  self.parentSuite = parentSuite;
-  self.env = env;
-  self.before_ = [];
-  self.after_ = [];
-  self.children_ = [];
-  self.suites_ = [];
-  self.specs_ = [];
-};
-
-jasmine.Suite.prototype.getFullName = function() {
-  var fullName = this.description;
-  for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
-    fullName = parentSuite.description + ' ' + fullName;
-  }
-  return fullName;
-};
-
-jasmine.Suite.prototype.finish = function(onComplete) {
-  this.env.reporter.reportSuiteResults(this);
-  this.finished = true;
-  if (typeof(onComplete) == 'function') {
-    onComplete();
-  }
-};
-
-jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
-  beforeEachFunction.typeName = 'beforeEach';
-  this.before_.unshift(beforeEachFunction);
-};
-
-jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
-  afterEachFunction.typeName = 'afterEach';
-  this.after_.unshift(afterEachFunction);
-};
-
-jasmine.Suite.prototype.results = function() {
-  return this.queue.results();
-};
-
-jasmine.Suite.prototype.add = function(suiteOrSpec) {
-  this.children_.push(suiteOrSpec);
-  if (suiteOrSpec instanceof jasmine.Suite) {
-    this.suites_.push(suiteOrSpec);
-    this.env.currentRunner().addSuite(suiteOrSpec);
-  } else {
-    this.specs_.push(suiteOrSpec);
-  }
-  this.queue.add(suiteOrSpec);
-};
-
-jasmine.Suite.prototype.specs = function() {
-  return this.specs_;
-};
-
-jasmine.Suite.prototype.suites = function() {
-  return this.suites_;
-};
-
-jasmine.Suite.prototype.children = function() {
-  return this.children_;
-};
-
-jasmine.Suite.prototype.execute = function(onComplete) {
-  var self = this;
-  this.queue.start(function () {
-    self.finish(onComplete);
-  });
-};
-jasmine.WaitsBlock = function(env, timeout, spec) {
-  this.timeout = timeout;
-  jasmine.Block.call(this, env, null, spec);
-};
-
-jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
-
-jasmine.WaitsBlock.prototype.execute = function (onComplete) {
-  if (jasmine.VERBOSE) {
-    this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
-  }
-  this.env.setTimeout(function () {
-    onComplete();
-  }, this.timeout);
-};
-/**
- * A block which waits for some condition to become true, with timeout.
- *
- * @constructor
- * @extends jasmine.Block
- * @param {jasmine.Env} env The Jasmine environment.
- * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
- * @param {Function} latchFunction A function which returns true when the desired condition has been met.
- * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
- * @param {jasmine.Spec} spec The Jasmine spec.
- */
-jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
-  this.timeout = timeout || env.defaultTimeoutInterval;
-  this.latchFunction = latchFunction;
-  this.message = message;
-  this.totalTimeSpentWaitingForLatch = 0;
-  jasmine.Block.call(this, env, null, spec);
-};
-jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
-
-jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
-
-jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
-  if (jasmine.VERBOSE) {
-    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
-  }
-  var latchFunctionResult;
-  try {
-    latchFunctionResult = this.latchFunction.apply(this.spec);
-  } catch (e) {
-    this.spec.fail(e);
-    onComplete();
-    return;
-  }
-
-  if (latchFunctionResult) {
-    onComplete();
-  } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
-    var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
-    this.spec.fail({
-      name: 'timeout',
-      message: message
-    });
-
-    this.abort = true;
-    onComplete();
-  } else {
-    this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
-    var self = this;
-    this.env.setTimeout(function() {
-      self.execute(onComplete);
-    }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
-  }
-};
-
-jasmine.version_= {
-  "major": 1,
-  "minor": 2,
-  "build": 0,
-  "revision": 1333310630,
-  "release_candidate": 1
-};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html b/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
deleted file mode 100644
index 7252e67..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-
- 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.
-
--->
-
-
-<html>
-
-<head>
-  <title>Cordova: Device API Specs</title>
-
-  <meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=1.0;" />
-  <!-- Load jasmine -->
-  <link href="../jasmine.css" rel="stylesheet"/>
-  <script type="text/javascript" src="../jasmine.js"></script>
-  <script type="text/javascript" src="../html/HtmlReporterHelpers.js"></script>
-  <script type="text/javascript" src="../html/HtmlReporter.js"></script>
-  <script type="text/javascript" src="../html/ReporterView.js"></script>
-  <script type="text/javascript" src="../html/SpecView.js"></script>
-  <script type="text/javascript" src="../html/SuiteView.js"></script>
-  <script type="text/javascript" src="../html/TrivialReporter.js"></script>
-
-  <!-- Source -->
-  <script type="text/javascript" src="../../cordova-incl.js"></script>
-
-  <!-- Load Test Runner -->
-  <script type="text/javascript" src="../test-runner.js"></script>
-
-  <!-- Tests -->
-  <script type="text/javascript" src="../tests/device.tests.js"></script>
-
-  <script type="text/javascript">
-    document.addEventListener('deviceready', function () {
-      var jasmineEnv = jasmine.getEnv();
-      jasmineEnv.updateInterval = 1000;
-
-      var htmlReporter = new jasmine.HtmlReporter();
-
-      jasmineEnv.addReporter(htmlReporter);
-
-      jasmineEnv.specFilter = function(spec) {
-        return htmlReporter.specFilter(spec);
-      };
-
-      jasmineEnv.execute();
-    }, false);
-  </script>
-</head>
-
-<body>
-  <a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
-</body>
-</html>
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
deleted file mode 100644
index f72b3cc..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
+++ /dev/null
@@ -1,62 +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.
- *
-*/
-
-if (window.sessionStorage != null) {
-    window.sessionStorage.clear();
-}
-
-// Timeout is 2 seconds to allow physical devices enough
-// time to query the response. This is important for some
-// Android devices.
-var Tests = function() {};
-Tests.TEST_TIMEOUT = 7500;
-
-// Creates a spy that will fail if called.
-function createDoNotCallSpy(name, opt_extraMessage) {
-    return jasmine.createSpy().andCallFake(function() {
-        var errorMessage = name + ' should not have been called.';
-        if (arguments.length) {
-            errorMessage += ' Got args: ' + JSON.stringify(arguments);
-        }
-        if (opt_extraMessage) {
-            errorMessage += '\n' + opt_extraMessage;
-        }
-        expect(false).toBe(true, errorMessage);
-    });
-}
-
-// Waits for any of the given spys to be called.
-// Last param may be a custom timeout duration.
-function waitsForAny() {
-    var spys = [].slice.call(arguments);
-    var timeout = Tests.TEST_TIMEOUT;
-    if (typeof spys[spys.length - 1] == 'number') {
-        timeout = spys.pop();
-    }
-    waitsFor(function() {
-        for (var i = 0; i < spys.length; ++i) {
-            if (spys[i].wasCalled) {
-                return true;
-            }
-        }
-        return false;
-    }, "Expecting callbacks to be called.", timeout);
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
deleted file mode 100644
index 0bcd0d9..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
+++ /dev/null
@@ -1,64 +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('Device Information (window.device)', function () {
-	it("should exist", function() {
-        expect(window.device).toBeDefined();
-	});
-
-	it("should contain a platform specification that is a string", function() {
-        expect(window.device.platform).toBeDefined();
-		expect((new String(window.device.platform)).length > 0).toBe(true);
-	});
-
-	it("should contain a version specification that is a string", function() {
-        expect(window.device.version).toBeDefined();
-		expect((new String(window.device.version)).length > 0).toBe(true);
-	});
-
-	it("should contain a UUID specification that is a string or a number", function() {
-        expect(window.device.uuid).toBeDefined();
-		if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') {
-		    expect((new String(window.device.uuid)).length > 0).toBe(true);
-		} else {
-			expect(window.device.uuid > 0).toBe(true);
-		}
-	});
-
-	it("should contain a cordova specification that is a string", function() {
-        expect(window.device.cordova).toBeDefined();
-		expect((new String(window.device.cordova)).length > 0).toBe(true);
-	});
-
-    it("should depend on the precense of cordova.version string", function() {
-            expect(window.cordova.version).toBeDefined();
-            expect((new String(window.cordova.version)).length > 0).toBe(true);
-    });
-
-    it("should contain device.cordova equal to cordova.version", function() {
-             expect(window.device.cordova).toBe(window.cordova.version);
-    });
-
-	it("should contain a model specification that is a string", function() {
-        expect(window.device.model).toBeDefined();
-		expect((new String(window.device.model)).length > 0).toBe(true);
-	});
-});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js b/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
deleted file mode 100644
index a82c590..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
+++ /dev/null
@@ -1,85 +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 PLAT;
-(function getPlatform() {
-    var platforms = {
-        android: /Android/,
-        ios: /(iPad)|(iPhone)|(iPod)/,
-        blackberry10: /(BB10)/,
-        blackberry: /(PlayBook)|(BlackBerry)/,
-        windows8: /MSAppHost/,
-        windowsphone: /Windows Phone/
-    };
-    for (var key in platforms) {
-        if (platforms[key].exec(navigator.userAgent)) {
-            PLAT = key;
-            break;
-        }
-    }
-})();
-
-var scripts = document.getElementsByTagName('script');
-var currentPath = scripts[scripts.length - 1].src;
-var platformCordovaPath = currentPath.replace("cordova-incl.js", "cordova." + PLAT + ".js");
-var normalCordovaPath = currentPath.replace("cordova-incl.js", "cordova.js");
-var cordovaPath = normalCordovaPath;
-
-if (PLAT) {
-    // XHR to local file is an error on some platforms, windowsphone for one 
-    try {
-        var xhr = new XMLHttpRequest();
-        xhr.open("GET", platformCordovaPath, false);
-        xhr.onreadystatechange = function() {
-
-            if (this.readyState == this.DONE && this.responseText.length > 0) {
-                if(parseInt(this.status) >= 400){
-                    cordovaPath = normalCordovaPath;
-                }else{
-                    cordovaPath = platformCordovaPath;
-                }
-            }
-        };
-        xhr.send(null);
-    }
-    catch(e){
-        cordovaPath = normalCordovaPath;
-    } // access denied!
-}
-
-if (!window._doNotWriteCordovaScript) {
-    if (PLAT != "windows8") {
-        document.write('<script type="text/javascript" charset="utf-8" src="' + cordovaPath + '"></script>');
-    } else {
-        var s = document.createElement('script');
-        s.src = cordovaPath;
-        document.head.appendChild(s);
-    }
-}
-
-function backHome() {
-    if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
-        navigator.app.backHistory();
-    }
-    else {
-        window.history.go(-1);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/index.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/index.html b/test/cordova/plugins/org.apache.cordova.device/test/index.html
deleted file mode 100644
index 82f6d3b..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-
- 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.
-
--->
-
-
-<html>
-  <head>
-    <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
-    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
-    <title>Cordova Mobile Spec</title>
-	  <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
-	  <script type="text/javascript" charset="utf-8" src="cordova-incl.js"></script>
-	  <script type="text/javascript" charset="utf-8" src="main.js"></script>
-
-  </head>
-  <body onload="init();" id="stage" class="theme">
-    <h1>Apache Cordova Tests</h1>
-    <div id="info">
-        <h4>cordova.version: <span id="cordova"> </span></h4>
-        <h4>Platform: <span id="platform">  </span></h4>
-        <h4>Version: <span id="version"> </span></h4>
-        <h4>UUID: <span id="uuid">  </span></h4>
-        <h4>Model: <span id="model"> </span></h4>
-        <h4>Width: <span id="width">  </span>,   Height: <span id="height">
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
-        <h4>User-Agent: <span id="user-agent"> </span></h4>
-     </div>
-    <a href="autotest/index.html" class="btn large">Automatic Test</a>
-    <a href="accelerometer/index.html" class="btn large">Accelerometer</a>
-    <a href="audio/index.html" class="btn large">Audio Play/Record</a>
-    <a href="battery/index.html" class="btn large">Battery</a>
-    <a href="camera/index.html" class="btn large">Camera</a>
-    <a href="capture/index.html" class="btn large">Capture</a>
-    <a href="compass/index.html" class="btn large">Compass</a>
-    <a href="contacts/index.html" class="btn large">Contacts</a>
-    <a href="events/index.html" class="btn large">Events</a>
-    <a href="location/index.html" class="btn large">Location</a>
-    <a href="lazyloadjs/index.html" class="btn large">Lazy Loading of cordova-incl.js</a>
-    <a href="misc/index.html" class="btn large">Misc Content</a>
-    <a href="network/index.html" class="btn large">Network</a>
-    <a href="notification/index.html" class="btn large">Notification</a>
-    <a href="splashscreen/index.html" class="btn large">Splashscreen</a>
-    <a href="sql/index.html" class="btn large">Web SQL</a>
-    <a href="storage/index.html" class="btn large">Local Storage</a>
-    <a href="benchmarks/index.html" class="btn large">Benchmarks</a>
-    <a href="inappbrowser/index.html" class="btn large">In App Browser</a>
-  </body>
-</html>


[03/50] [abbrv] Removing the plugins directory after the plugins were incorrectly removed

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
deleted file mode 100644
index 167ac50..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/* @deprecated Use jasmine.HtmlReporter instead
- */
-jasmine.TrivialReporter = function(doc) {
-  this.document = doc || document;
-  this.suiteDivs = {};
-  this.logRunningSpecs = false;
-};
-
-jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
-  var el = document.createElement(type);
-
-  for (var i = 2; i < arguments.length; i++) {
-    var child = arguments[i];
-
-    if (typeof child === 'string') {
-      el.appendChild(document.createTextNode(child));
-    } else {
-      if (child) { el.appendChild(child); }
-    }
-  }
-
-  for (var attr in attrs) {
-    if (attr == "className") {
-      el[attr] = attrs[attr];
-    } else {
-      el.setAttribute(attr, attrs[attr]);
-    }
-  }
-
-  return el;
-};
-
-jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
-  var showPassed, showSkipped;
-
-  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
-      this.createDom('div', { className: 'banner' },
-        this.createDom('div', { className: 'logo' },
-            this.createDom('span', { className: 'title' }, "Jasmine"),
-            this.createDom('span', { className: 'version' }, runner.env.versionString())),
-        this.createDom('div', { className: 'options' },
-            "Show ",
-            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
-            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
-            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
-            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
-            )
-          ),
-
-      this.runnerDiv = this.createDom('div', { className: 'runner running' },
-          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
-          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
-          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
-      );
-
-  this.document.body.appendChild(this.outerDiv);
-
-  var suites = runner.suites();
-  for (var i = 0; i < suites.length; i++) {
-    var suite = suites[i];
-    var suiteDiv = this.createDom('div', { className: 'suite' },
-        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
-        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
-    this.suiteDivs[suite.id] = suiteDiv;
-    var parentDiv = this.outerDiv;
-    if (suite.parentSuite) {
-      parentDiv = this.suiteDivs[suite.parentSuite.id];
-    }
-    parentDiv.appendChild(suiteDiv);
-  }
-
-  this.startedAt = new Date();
-
-  var self = this;
-  showPassed.onclick = function(evt) {
-    if (showPassed.checked) {
-      self.outerDiv.className += ' show-passed';
-    } else {
-      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
-    }
-  };
-
-  showSkipped.onclick = function(evt) {
-    if (showSkipped.checked) {
-      self.outerDiv.className += ' show-skipped';
-    } else {
-      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
-    }
-  };
-};
-
-jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
-  var results = runner.results();
-  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
-  this.runnerDiv.setAttribute("class", className);
-  //do it twice for IE
-  this.runnerDiv.setAttribute("className", className);
-  var specs = runner.specs();
-  var specCount = 0;
-  for (var i = 0; i < specs.length; i++) {
-    if (this.specFilter(specs[i])) {
-      specCount++;
-    }
-  }
-  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
-  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
-  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
-
-  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
-};
-
-jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
-  var results = suite.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.totalCount === 0) { // todo: change this to check results.skipped
-    status = 'skipped';
-  }
-  this.suiteDivs[suite.id].className += " " + status;
-};
-
-jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
-  if (this.logRunningSpecs) {
-    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
-  }
-};
-
-jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
-  var results = spec.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.skipped) {
-    status = 'skipped';
-  }
-  var specDiv = this.createDom('div', { className: 'spec '  + status },
-      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(spec.getFullName()),
-        title: spec.getFullName()
-      }, spec.description));
-
-
-  var resultItems = results.getItems();
-  var messagesDiv = this.createDom('div', { className: 'messages' });
-  for (var i = 0; i < resultItems.length; i++) {
-    var result = resultItems[i];
-
-    if (result.type == 'log') {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
-    } else if (result.type == 'expect' && result.passed && !result.passed()) {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
-
-      if (result.trace.stack) {
-        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
-      }
-    }
-  }
-
-  if (messagesDiv.childNodes.length > 0) {
-    specDiv.appendChild(messagesDiv);
-  }
-
-  this.suiteDivs[spec.suite.id].appendChild(specDiv);
-};
-
-jasmine.TrivialReporter.prototype.log = function() {
-  var console = jasmine.getGlobal().console;
-  if (console && console.log) {
-    if (console.log.apply) {
-      console.log.apply(console, arguments);
-    } else {
-      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
-    }
-  }
-};
-
-jasmine.TrivialReporter.prototype.getLocation = function() {
-  return this.document.location;
-};
-
-jasmine.TrivialReporter.prototype.specFilter = function(spec) {
-  var paramMap = {};
-  var params = this.getLocation().search.substring(1).split('&');
-  for (var i = 0; i < params.length; i++) {
-    var p = params[i].split('=');
-    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
-  }
-
-  if (!paramMap.spec) {
-    return true;
-  }
-  return spec.getFullName().indexOf(paramMap.spec) === 0;
-};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html b/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
deleted file mode 100644
index 6ebccbd..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-
- 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.
-
--->
-
-
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
-    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=1.0;" />
-
-    <title>Cordova API Specs</title>
-
-    <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
-    <script type="text/javascript" src="../cordova-incl.js"></script>
-  </head>
-  <body id="stage" class="theme">
-    <h1>Cordova API Specs</h1>
-
-    <a href="pages/all.html" class="btn large" style="width:100%;">Run All Tests</a>
-    <a href="pages/accelerometer.html" class="btn large" style="width:100%;">Run Accelerometer Tests</a>
-    <a href="pages/battery.html" class="btn large" style="width:100%;">Run Battery Tests</a>
-    <a href="pages/camera.html" class="btn large" style="width:100%;">Run Camera Tests</a>
-    <a href="pages/capture.html" class="btn large" style="width:100%;">Run Capture Tests</a>
-    <a href="pages/compass.html" class="btn large" style="width:100%;">Run Compass Tests</a>
-    <a href="pages/contacts.html" class="btn large" style="width:100%;">Run Contacts Tests</a>
-    <a href="pages/datauri.html" class="btn large" style="width:100%;">Run Data URI Tests</a>
-    <a href="pages/device.html" class="btn large" style="width:100%;">Run Device Tests</a>
-    <a href="pages/file.html" class="btn large" style="width:100%;">Run File Tests</a>
-    <a href="pages/filetransfer.html" class="btn large" style="width:100%;">Run FileTransfer Tests</a>
-    <a href="pages/geolocation.html" class="btn large" style="width:100%;">Run Geolocation Tests</a>
-    <a href="pages/globalization.html" class="btn large" style="width:100%;">Run Globalization Tests</a>
-    <a href="pages/media.html" class="btn large" style="width:100%;">Run Media Tests</a>
-    <a href="pages/network.html" class="btn large" style="width:100%;">Run Network Tests</a>
-    <a href="pages/notification.html" class="btn large" style="width:100%;">Run Notification Tests</a>
-    <a href="pages/platform.html" class="btn large" style="width:100%;">Run Platform Tests</a>
-    <a href="pages/storage.html" class="btn large" style="width:100%;">Run Storage Tests</a>
-    <a href="pages/bridge.html" class="btn large" style="width:100%;">Run Bridge Tests</a>
-
-    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
deleted file mode 100644
index 826e575..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
+++ /dev/null
@@ -1,81 +0,0 @@
-body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
-
-#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
-#HTMLReporter a { text-decoration: none; }
-#HTMLReporter a:hover { text-decoration: underline; }
-#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
-#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
-#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
-#HTMLReporter .version { color: #aaaaaa; }
-#HTMLReporter .banner { margin-top: 14px; }
-#HTMLReporter .duration { color: #aaaaaa; float: right; }
-#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }
-#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }
-#HTMLReporter .symbolSummary li.passed { font-size: 14px; }
-#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; }
-#HTMLReporter .symbolSummary li.failed { line-height: 9px; }
-#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
-#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }
-#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; }
-#HTMLReporter .symbolSummary li.pending { line-height: 11px; }
-#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; }
-#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
-#HTMLReporter .runningAlert { background-color: #666666; }
-#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
-#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
-#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
-#HTMLReporter .passingAlert { background-color: #a6b779; }
-#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
-#HTMLReporter .failingAlert { background-color: #cf867e; }
-#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
-#HTMLReporter .results { margin-top: 14px; }
-#HTMLReporter #details { display: none; }
-#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }
-#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
-#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
-#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
-#HTMLReporter.showDetails .summary { display: none; }
-#HTMLReporter.showDetails #details { display: block; }
-#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
-#HTMLReporter .summary { margin-top: 14px; }
-#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
-#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }
-#HTMLReporter .summary .specSummary.failed a { color: #b03911; }
-#HTMLReporter .description + .suite { margin-top: 0; }
-#HTMLReporter .suite { margin-top: 14px; }
-#HTMLReporter .suite a { color: #333333; }
-#HTMLReporter #details .specDetail { margin-bottom: 28px; }
-#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
-#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
-#HTMLReporter .resultMessage span.result { display: block; }
-#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
-
-#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }
-#TrivialReporter a:visited, #TrivialReporter a { color: #303; }
-#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }
-#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }
-#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }
-#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }
-#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }
-#TrivialReporter .runner.running { background-color: yellow; }
-#TrivialReporter .options { text-align: right; font-size: .8em; }
-#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }
-#TrivialReporter .suite .suite { margin: 5px; }
-#TrivialReporter .suite.passed { background-color: #dfd; }
-#TrivialReporter .suite.failed { background-color: #fdd; }
-#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }
-#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }
-#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }
-#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }
-#TrivialReporter .spec.skipped { background-color: #bbb; }
-#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }
-#TrivialReporter .passed { background-color: #cfc; display: none; }
-#TrivialReporter .failed { background-color: #fbb; }
-#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }
-#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }
-#TrivialReporter .resultMessage .mismatch { color: black; }
-#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }
-#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }
-#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }
-#TrivialReporter #jasmine_content { position: fixed; right: 100%; }
-#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }


[05/50] [abbrv] git commit: This should use plugman to install plugins. Adding path depenencies for plugins is wrong, and shouldn't be done

Posted by bo...@apache.org.
This should use plugman to install plugins. Adding path depenencies for plugins is wrong, and shouldn't be done


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/8f293733
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/8f293733
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/8f293733

Branch: refs/heads/master
Commit: 8f293733a660e861e20260d0770e5f56dbfad195
Parents: aeae418
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Nov 12 13:59:17 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:15 2014 -0800

----------------------------------------------------------------------
 test/build.xml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/8f293733/test/build.xml
----------------------------------------------------------------------
diff --git a/test/build.xml b/test/build.xml
index edede82..ae2f807 100755
--- a/test/build.xml
+++ b/test/build.xml
@@ -66,9 +66,16 @@
 
 <!-- extension targets. Uncomment the ones where you want to do custom work
      in between standard targets -->
-<!--
+
     <target name="-pre-build">
+        <!-- copy in the current cordova.js file from the parent project -->
+        <copy file="../framework/assets/www/cordova.js" 
+              todir="assets/www"
+              preservelastmodified="true"
+              failonerror="true"
+              verbose="true" />
     </target>
+<!--    
     <target name="-pre-compile">
     </target>
 


[31/50] [abbrv] git commit: CB-5487: Remote Debugging is on when your Android app is debuggable.

Posted by bo...@apache.org.
CB-5487: Remote Debugging is on when your Android app is debuggable.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/8b67088c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/8b67088c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/8b67088c

Branch: refs/heads/master
Commit: 8b67088c9f3c0128c8044e92a744a12baf358423
Parents: bbac797
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Nov 29 15:54:07 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:19 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java  | 27 +++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/8b67088c/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 9e70a9d..767ea00 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -38,6 +38,9 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
@@ -334,7 +337,7 @@ public class CordovaWebView extends AmazonWebView {
         // while we do this
         if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
             Level16Apis.enableUniversalAccess(settings);
-                
+        
         if (getWebViewBackend(this.cordova.getFactory()) == WebViewBackend.ANDROID) {
         	File appCacheDir = this.cordova.getActivity().getDir(APPCACHE_DIR, Context.MODE_PRIVATE);
             if (appCacheDir.exists()) {
@@ -364,6 +367,28 @@ public class CordovaWebView extends AmazonWebView {
             // enable the local storage database normally with the Chromium back-end
             settings.setDatabaseEnabled(true);
         }
+        
+        
+        //Determine whether we're in debug or release mode, and turn on Debugging!
+        try {
+            final String packageName = this.cordova.getActivity().getPackageName();
+            final PackageManager pm = this.cordova.getActivity().getPackageManager();
+            ApplicationInfo appInfo;
+            
+            appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
+            
+            if((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 &&  
+                android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT)
+            {
+                setWebContentsDebuggingEnabled(true);
+            }
+        } catch (IllegalArgumentException e) {
+            Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
+            e.printStackTrace();
+        } catch (NameNotFoundException e) {
+            Log.d(TAG, "This should never happen: Your application's package can't be found.");
+            e.printStackTrace();
+        }  
 
         // Enable DOM storage
         settings.setDomStorageEnabled(true);


[06/50] [abbrv] git commit: CB-5349: fixed regression in update script

Posted by bo...@apache.org.
CB-5349: fixed regression in update script


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/aeae418d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/aeae418d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/aeae418d

Branch: refs/heads/master
Commit: aeae418dd418446253195fe99a1a075aad5de50c
Parents: f768066
Author: Steven Gill <st...@gmail.com>
Authored: Mon Nov 11 16:32:34 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:15 2014 -0800

----------------------------------------------------------------------
 bin/lib/create.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/aeae418d/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 14de1b0..b330a20 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -182,10 +182,10 @@ exports.createProject = function(project_path, package_name, project_name, proje
 
 // Returns a promise.
 exports.updateProject = function(projectPath) {
+    var version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
     // Check that requirements are met and proper targets are installed
     return check_reqs.run()
     .then(function() {
-        var version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
         var target_api = check_reqs.get_target();
         return ensureJarIsBuilt(version, target_api);
     }).then(function() {


[17/50] [abbrv] git commit: Updating instructions to indicate that the device plugin is required to be installed via plugman

Posted by bo...@apache.org.
Updating instructions to indicate that the device plugin is required to be installed via plugman


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/748fd98c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/748fd98c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/748fd98c

Branch: refs/heads/master
Commit: 748fd98c8063f025a4a620f61925b31134d33400
Parents: 3925339
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Nov 12 14:34:14 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:16 2014 -0800

----------------------------------------------------------------------
 test/README.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/748fd98c/test/README.md
----------------------------------------------------------------------
diff --git a/test/README.md b/test/README.md
index 5d86720..2a93f27 100755
--- a/test/README.md
+++ b/test/README.md
@@ -30,6 +30,7 @@ Before running the tests, they need to be set up.
 
 To run from command line:
 
+0. Install the Cordova Device Plugin using plugman
 0. Build by entering `ant debug install`
 0. Run tests by clicking on "CordovaTest" icon on device
 


[09/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/main.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/main.js b/test/cordova/plugins/org.apache.cordova.device/test/main.js
new file mode 100644
index 0000000..9508770
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/main.js
@@ -0,0 +1,163 @@
+/*
+ *
+ * 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 deviceInfo = function() {
+    document.getElementById("cordova").innerHTML = cordova.version;
+    document.getElementById("platform").innerHTML = device.platform;
+    document.getElementById("version").innerHTML = device.version;
+    document.getElementById("uuid").innerHTML = device.uuid;
+    document.getElementById("model").innerHTML = device.model;
+    document.getElementById("width").innerHTML = screen.width;
+    document.getElementById("height").innerHTML = screen.height;
+    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+};
+
+var getLocation = function() {
+    var suc = function(p) {
+        alert(p.coords.latitude + " " + p.coords.longitude);
+    };
+    var locFail = function() {
+    };
+    navigator.geolocation.getCurrentPosition(suc, locFail);
+};
+
+var beep = function() {
+    navigator.notification.beep(2);
+};
+
+var vibrate = function() {
+    navigator.notification.vibrate(0);
+};
+
+function roundNumber(num) {
+    var dec = 3;
+    var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
+    return result;
+}
+
+var accelerationWatch = null;
+
+function updateAcceleration(a) {
+    document.getElementById('x').innerHTML = roundNumber(a.x);
+    document.getElementById('y').innerHTML = roundNumber(a.y);
+    document.getElementById('z').innerHTML = roundNumber(a.z);
+}
+
+var toggleAccel = function() {
+    if (accelerationWatch !== null) {
+        navigator.accelerometer.clearWatch(accelerationWatch);
+        updateAcceleration({
+            x : "",
+            y : "",
+            z : ""
+        });
+        accelerationWatch = null;
+    } else {
+        var options = {};
+        options.frequency = 1000;
+        accelerationWatch = navigator.accelerometer.watchAcceleration(
+                updateAcceleration, function(ex) {
+                    alert("accel fail (" + ex.name + ": " + ex.message + ")");
+                }, options);
+    }
+};
+
+var preventBehavior = function(e) {
+    e.preventDefault();
+};
+
+function dump_pic(data) {
+    var viewport = document.getElementById('viewport');
+    console.log(data);
+    viewport.style.display = "";
+    viewport.style.position = "absolute";
+    viewport.style.top = "10px";
+    viewport.style.left = "10px";
+    document.getElementById("test_img").src = "data:image/jpeg;base64," + data;
+}
+
+function fail(msg) {
+    alert(msg);
+}
+
+function show_pic() {
+    navigator.camera.getPicture(dump_pic, fail, {
+        quality : 50
+    });
+}
+
+function close() {
+    var viewport = document.getElementById('viewport');
+    viewport.style.position = "relative";
+    viewport.style.display = "none";
+}
+
+// This is just to do this.
+function readFile() {
+    navigator.file.read('/sdcard/cordova.txt', fail, fail);
+}
+
+function writeFile() {
+    navigator.file.write('foo.txt', "This is a test of writing to a file",
+            fail, fail);
+}
+
+function contacts_success(contacts) {
+    alert(contacts.length
+            + ' contacts returned.'
+            + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
+                    : ''));
+}
+
+function get_contacts() {
+    var obj = new ContactFindOptions();
+    obj.filter = "";
+    obj.multiple = true;
+    obj.limit = 5;
+    navigator.service.contacts.find(
+            [ "displayName", "name" ], contacts_success,
+            fail, obj);
+}
+
+var networkReachableCallback = function(reachability) {
+    // There is no consistency on the format of reachability
+    var networkState = reachability.code || reachability;
+
+    var currentState = {};
+    currentState[NetworkStatus.NOT_REACHABLE] = 'No network connection';
+    currentState[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection';
+    currentState[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection';
+
+    confirm("Connection type:\n" + currentState[networkState]);
+};
+
+function check_network() {
+    navigator.network.isReachable("www.mobiledevelopersolutions.com",
+            networkReachableCallback, {});
+}
+
+function init() {
+    // the next line makes it impossible to see Contacts on the HTC Evo since it
+    // doesn't have a scroll button
+    // document.addEventListener("touchmove", preventBehavior, false);
+    document.addEventListener("deviceready", deviceInfo, true);
+    document.getElementById("user-agent").textContent = navigator.userAgent;
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/master.css
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/master.css b/test/cordova/plugins/org.apache.cordova.device/test/master.css
new file mode 100644
index 0000000..e93c937
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/master.css
@@ -0,0 +1,164 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+  body {
+    background:#222 none repeat scroll 0 0;
+    color:#666;
+    font-family:Helvetica;
+    font-size:72%;
+    line-height:1.5em;
+    margin:0;
+    border-top:1px solid #393939;
+  }
+
+  #info{
+    background:#ffa;
+    border: 1px solid #ffd324;
+    -webkit-border-radius: 5px;
+    border-radius: 5px;
+    clear:both;
+    margin:15px 6px 0;
+    min-width:295px;
+    max-width:97%;
+    padding:4px 0px 2px 10px;
+    word-wrap:break-word;
+    margin-bottom:10px;
+    display:inline-block;
+    min-height: 160px;
+    max-height: 300px;
+    overflow: auto;
+    -webkit-overflow-scrolling: touch;
+  }
+  
+  #info > h4{
+    font-size:.95em;
+    margin:5px 0;
+  }
+ 	
+  #stage.theme{
+    padding-top:3px;
+  }
+
+  /* Definition List */
+  #stage.theme > dl{
+  	padding-top:10px;
+  	clear:both;
+  	margin:0;
+  	list-style-type:none;
+  	padding-left:10px;
+  	overflow:auto;
+  }
+
+  #stage.theme > dl > dt{
+  	font-weight:bold;
+  	float:left;
+  	margin-left:5px;
+  }
+
+  #stage.theme > dl > dd{
+  	width:45px;
+  	float:left;
+  	color:#a87;
+  	font-weight:bold;
+  }
+
+  /* Content Styling */
+  #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
+    margin:1em 0 .5em 13px;
+  }
+
+  #stage.theme > h1{
+    color:#eee;
+    font-size:1.6em;
+    text-align:center;
+    margin:0;
+    margin-top:15px;
+    padding:0;
+  }
+
+  #stage.theme > h2{
+  	clear:both;
+    margin:0;
+    padding:3px;
+    font-size:1em;
+    text-align:center;
+  }
+
+  /* Stage Buttons */
+  #stage.theme .btn{
+  	border: 1px solid #555;
+  	-webkit-border-radius: 5px;
+  	border-radius: 5px;
+  	text-align:center;
+  	display:inline-block;
+  	background:#444;
+  	width:150px;
+  	color:#9ab;
+  	font-size:1.1em;
+  	text-decoration:none;
+  	padding:1.2em 0;
+  	margin:3px 0px 3px 5px;
+  }
+  
+  #stage.theme .large{
+  	width:308px;
+  	padding:1.2em 0;
+  }
+  
+  #stage.theme .wide{
+    width:100%;
+    padding:1.2em 0;
+  }
+  
+  #stage.theme .backBtn{
+   border: 1px solid #555;
+   -webkit-border-radius: 5px;
+   border-radius: 5px;
+   text-align:center;
+   display:block;
+   float:right;
+   background:#666;
+   width:75px;
+   color:#9ab;
+   font-size:1.1em;
+   text-decoration:none;
+   padding:1.2em 0;
+   margin:3px 5px 3px 5px;
+  }
+  
+  #stage.theme .input{
+   border: 1px solid #555;
+   -webkit-border-radius: 5px;
+   border-radius: 5px;
+   text-align:center;
+   display:block;
+   float:light;
+   background:#888;
+   color:#9cd;
+   font-size:1.1em;
+   text-decoration:none;
+   padding:1.2em 0;
+   margin:3px 0px 3px 5px;    
+ }
+  
+  #stage.theme .numeric{
+   width:100%;
+  }

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/www/device.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/www/device.js b/test/cordova/plugins/org.apache.cordova.device/www/device.js
new file mode 100644
index 0000000..05f4c47
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/www/device.js
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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'),
+    channel = require('cordova/channel'),
+    utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device() {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function() {
+        me.getInfo(function(info) {
+            //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            //TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            channel.onCordovaInfoReady.fire();
+        },function(e) {
+            me.available = false;
+            utils.alert("[ERROR] Error initializing Cordova: " + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @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. (OPTIONAL)
+ */
+Device.prototype.getInfo = function(successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
+};
+
+module.exports = new Device();

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/run
----------------------------------------------------------------------
diff --git a/test/cordova/run b/test/cordova/run
new file mode 100755
index 0000000..d4e2c6c
--- /dev/null
+++ b/test/cordova/run
@@ -0,0 +1,37 @@
+#!/usr/bin/env node
+
+/*
+       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 run  = require('./lib/run'),
+    reqs = require('./lib/check_reqs'),
+    args = process.argv;
+
+// Support basic help commands
+if (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
+                    args[2] == 'help' || args[2] == '-help' || args[2] == '/help') {
+    run.help();
+} else {
+    reqs.run().done(function() {
+        return run.run(args);
+    }, function(err) {
+        console.error('ERROR: ' + err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/run.bat
----------------------------------------------------------------------
diff --git a/test/cordova/run.bat b/test/cordova/run.bat
new file mode 100644
index 0000000..0aad853
--- /dev/null
+++ b/test/cordova/run.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0run"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/version
----------------------------------------------------------------------
diff --git a/test/cordova/version b/test/cordova/version
new file mode 100755
index 0000000..6ce5f80
--- /dev/null
+++ b/test/cordova/version
@@ -0,0 +1,25 @@
+#!/usr/bin/env node
+
+/*
+       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.
+*/
+
+// Coho updates this line:
+var VERSION = "3.2.0-rc1";
+
+console.log(VERSION);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/version.bat
----------------------------------------------------------------------
diff --git a/test/cordova/version.bat b/test/cordova/version.bat
new file mode 100644
index 0000000..d589002
--- /dev/null
+++ b/test/cordova/version.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0version"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2
+    EXIT /B 1
+)

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml
index 60a00cd..0d90083 100644
--- a/test/res/xml/config.xml
+++ b/test/res/xml/config.xml
@@ -1,52 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<widget xmlns     = "http://www.w3.org/ns/widgets"
-        id        = "io.cordova.helloCordova"
-        version   = "2.0.0">
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
     <name>Hello Cordova</name>
-
     <description>
         A sample Apache Cordova application that responds to the deviceready event.
     </description>
-
-    <author href="http://cordova.io" email="callback-dev@incubator.apache.org">
+    <author email="callback-dev@incubator.apache.org" href="http://cordova.io">
         Apache Cordova Team
     </author>
-
-    <access origin="*.apache.org"/>
-
-    <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
+    <access origin="*.apache.org" />
     <content src="index.html" />
-
-    <log level="DEBUG"/>
-
-    <!-- Preferences for Android -->
+    <log level="DEBUG" />
     <preference name="useBrowserHistory" value="true" />
     <preference name="exit-on-suspend" value="false" />
-
     <feature name="Activity">
         <param name="android-package" value="org.apache.cordova.test.ActivityPlugin" />
     </feature>
     <feature name="App">
-      <param name="android-package" value="org.apache.cordova.App"/>
+        <param name="android-package" value="org.apache.cordova.App" />
+    </feature>
+    <feature name="Device">
+        <param name="android-package" value="org.apache.cordova.device.Device" />
     </feature>
-         
 </widget>
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/device/Device.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/device/Device.java b/test/src/org/apache/cordova/device/Device.java
new file mode 100644
index 0000000..2ce3cc7
--- /dev/null
+++ b/test/src/org/apache/cordova/device/Device.java
@@ -0,0 +1,200 @@
+/*
+       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.
+*/
+package org.apache.cordova.device;
+
+import java.util.TimeZone;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.LOG;
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
+
+public class Device extends CordovaPlugin {
+    public static final String TAG = "Device";
+
+    public static String cordovaVersion = "dev";              // Cordova version
+    public static String platform = "Android";                  // Device OS
+    public static String uuid;                                  // Device UUID
+
+    BroadcastReceiver telephonyReceiver = null;
+
+    /**
+     * Constructor.
+     */
+    public Device() {
+    }
+
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
+        super.initialize(cordova, webView);
+        Device.uuid = getUuid();
+        this.initTelephonyReceiver();
+    }
+
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArry of arguments for the plugin.
+     * @param callbackContext   The callback id used when calling back into JavaScript.
+     * @return                  True if the action was valid, false if not.
+     */
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+        if (action.equals("getDeviceInfo")) {
+            JSONObject r = new JSONObject();
+            r.put("uuid", Device.uuid);
+            r.put("version", this.getOSVersion());
+            r.put("platform", Device.platform);
+            r.put("cordova", Device.cordovaVersion);
+            r.put("model", this.getModel());
+            callbackContext.success(r);
+        }
+        else {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Unregister receiver.
+     */
+    public void onDestroy() {
+        this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
+    }
+
+    //--------------------------------------------------------------------------
+    // LOCAL METHODS
+    //--------------------------------------------------------------------------
+
+    /**
+     * Listen for telephony events: RINGING, OFFHOOK and IDLE
+     * Send these events to all plugins using
+     *      CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle")
+     */
+    private void initTelephonyReceiver() {
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
+        //final CordovaInterface mycordova = this.cordova;
+        this.telephonyReceiver = new BroadcastReceiver() {
+
+            @Override
+            public void onReceive(Context context, Intent intent) {
+
+                // If state has changed
+                if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
+                    if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) {
+                        String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
+                        if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
+                            LOG.i(TAG, "Telephone RINGING");
+                            webView.postMessage("telephone", "ringing");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
+                            LOG.i(TAG, "Telephone OFFHOOK");
+                            webView.postMessage("telephone", "offhook");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) {
+                            LOG.i(TAG, "Telephone IDLE");
+                            webView.postMessage("telephone", "idle");
+                        }
+                    }
+                }
+            }
+        };
+
+        // Register the receiver
+        this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
+    }
+
+    /**
+     * Get the OS name.
+     *
+     * @return
+     */
+    public String getPlatform() {
+        return Device.platform;
+    }
+
+    /**
+     * Get the device's Universally Unique Identifier (UUID).
+     *
+     * @return
+     */
+    public String getUuid() {
+        String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+        return uuid;
+    }
+
+    /**
+     * Get the Cordova version.
+     *
+     * @return
+     */
+    public String getCordovaVersion() {
+        return Device.cordovaVersion;
+    }
+
+    public String getModel() {
+        String model = android.os.Build.MODEL;
+        return model;
+    }
+
+    public String getProductName() {
+        String productname = android.os.Build.PRODUCT;
+        return productname;
+    }
+
+    /**
+     * Get the OS version.
+     *
+     * @return
+     */
+    public String getOSVersion() {
+        String osversion = android.os.Build.VERSION.RELEASE;
+        return osversion;
+    }
+
+    public String getSDKVersion() {
+        @SuppressWarnings("deprecation")
+        String sdkversion = android.os.Build.VERSION.SDK;
+        return sdkversion;
+    }
+
+    public String getTimeZoneID() {
+        TimeZone tz = TimeZone.getDefault();
+        return (tz.getID());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java b/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
deleted file mode 100644
index 887c2e4..0000000
--- a/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package org.apache.cordova.test;
-
-/*
- *
- * 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.
- *
- */
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.actions.backbuttonmultipage;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.inputmethod.BaseInputConnection;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class BackButtonMultiPageTest extends
-		ActivityInstrumentationTestCase2<backbuttonmultipage> {
-
-	private int TIMEOUT = 1000;
-	backbuttonmultipage testActivity;
-	private FrameLayout containerView;
-	private LinearLayout innerContainer;
-	private CordovaWebView testView;
-
-	private AmazonWebViewOnUiThread mUiThread;
-
-	public BackButtonMultiPageTest() {
-		super("org.apache.cordova.test", backbuttonmultipage.class);
-	}
-
-	protected void setUp() throws Exception {
-		super.setUp();
-		testActivity = this.getActivity();
-		// Sleep to make sure main page is properly loaded
-		sleep();
-		containerView = (FrameLayout) testActivity
-				.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = (CordovaWebView) innerContainer.getChildAt(0);
-		mUiThread = new AmazonWebViewOnUiThread(this, testView);
-	}
-
-	public void testPreconditions() {
-		assertNotNull(innerContainer);
-		assertNotNull(testView);
-	}
-
-	public void testViaHref() {
-		testView.sendJavascript("window.location = 'sample2.html';");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.sendJavascript("window.location = 'sample3.html';");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		boolean didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		assertTrue(didGoBack);
-		didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();		
-		assertTrue(url.endsWith("index.html"));
-		assertTrue(didGoBack);
-	}
-
-	public void testViaLoadUrl() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		boolean didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		assertTrue(didGoBack);
-		didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-		assertTrue(didGoBack);
-	}
-
-	public void testViaBackButtonOnView() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		BaseInputConnection viewConnection = new BaseInputConnection(testView,
-				true);
-		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
-				KeyEvent.KEYCODE_BACK);
-		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
-				KeyEvent.KEYCODE_BACK);
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-	}
-
-	public void testViaBackButtonOnLayout() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		BaseInputConnection viewConnection = new BaseInputConnection(
-				containerView, true);
-		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
-				KeyEvent.KEYCODE_BACK);
-		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
-				KeyEvent.KEYCODE_BACK);
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-	}
-
-	private void sleep() {
-		try {
-			Thread.sleep(TIMEOUT);
-		} catch (InterruptedException e) {
-			fail("Unexpected Timeout");
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaActivity.java b/test/src/org/apache/cordova/test/CordovaActivity.java
new file mode 100644
index 0000000..f3a7839
--- /dev/null
+++ b/test/src/org/apache/cordova/test/CordovaActivity.java
@@ -0,0 +1,33 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import org.apache.cordova.DroidGap;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class CordovaActivity extends DroidGap {
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaActivityTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaActivityTest.java b/test/src/org/apache/cordova/test/CordovaActivityTest.java
deleted file mode 100644
index ac0a8ca..0000000
--- a/test/src/org/apache/cordova/test/CordovaActivityTest.java
+++ /dev/null
@@ -1,96 +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.
-*/
-
-package org.apache.cordova.test;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.PluginManager;
-import org.apache.cordova.test.actions.CordovaActivity;
-
-import android.app.Instrumentation;
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class CordovaActivityTest extends ActivityInstrumentationTestCase2<CordovaActivity> {
-
-    private CordovaActivity testActivity;
-    private FrameLayout containerView;
-    private LinearLayout innerContainer;
-    private CordovaWebView testView;
-    private Instrumentation mInstr;
-    private int TIMEOUT = 1000;
-    
-    @SuppressWarnings("deprecation")
-    public CordovaActivityTest()
-    {
-        super("org.apache.cordova.test",CordovaActivity.class);
-    }
-    
-    protected void setUp() throws Exception {
-        super.setUp();
-        mInstr = this.getInstrumentation();
-        testActivity = this.getActivity();
-        containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-        innerContainer = (LinearLayout) containerView.getChildAt(0);
-        testView = (CordovaWebView) innerContainer.getChildAt(0);
-        
-    }
-    
-    public void testPreconditions(){
-        assertNotNull(innerContainer);
-        assertNotNull(testView);
-    }
-    
-
-    public void testForCordovaView() {
-        String className = testView.getClass().getSimpleName();
-        assertTrue(className.equals("CordovaWebView"));
-    }
-    
-    public void testForLinearLayout() {
-        String className = innerContainer.getClass().getSimpleName();
-        assertTrue(className.equals("LinearLayoutSoftKeyboardDetect"));
-    }
-    
-
-    public void testPauseAndResume() throws Throwable
-    {
-        runTestOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                mInstr.callActivityOnPause(testActivity);
-                sleep();
-                assertTrue(testView.isPaused());
-                mInstr.callActivityOnResume(testActivity);
-                sleep();
-                assertFalse(testView.isPaused());
-            }
-        });
-
-    }
-    
-    private void sleep() {
-        try {
-          Thread.sleep(TIMEOUT);
-        } catch (InterruptedException e) {
-          fail("Unexpected Timeout");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaDriverAction.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaDriverAction.java b/test/src/org/apache/cordova/test/CordovaDriverAction.java
new file mode 100644
index 0000000..cb8939b
--- /dev/null
+++ b/test/src/org/apache/cordova/test/CordovaDriverAction.java
@@ -0,0 +1,87 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test;
+
+import java.util.concurrent.ExecutorService;
+
+import org.apache.cordova.CordovaInterface;
+import org.apache.cordova.CordovaPlugin;
+
+import com.amazon.android.webkit.AmazonWebKitFactories;
+import com.amazon.android.webkit.AmazonWebKitFactory;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+
+
+public class CordovaDriverAction extends Activity implements CordovaInterface {
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    public void startActivityForResult(CordovaPlugin command, Intent intent,
+            int requestCode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setActivityResultCallback(CordovaPlugin plugin) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public Activity getActivity() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Deprecated
+    public Context getContext() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Deprecated
+    public void cancelLoadUrl() {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public Object onMessage(String id, Object data) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ExecutorService getThreadPool() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public AmazonWebKitFactory getFactory() {
+        return AmazonWebKitFactories.getDefaultFactory();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaResourceApiTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaResourceApiTest.java b/test/src/org/apache/cordova/test/CordovaResourceApiTest.java
deleted file mode 100644
index 2966021..0000000
--- a/test/src/org/apache/cordova/test/CordovaResourceApiTest.java
+++ /dev/null
@@ -1,281 +0,0 @@
-
-package org.apache.cordova.test;
-
-/*
- *
- * 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.
- *
- */
-
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.os.Environment;
-import android.provider.MediaStore;
-import android.test.ActivityInstrumentationTestCase2;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.CordovaResourceApi;
-import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.PluginEntry;
-import org.apache.cordova.test.actions.CordovaWebViewTestActivity;
-import org.json.JSONArray;
-import org.json.JSONException;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Scanner;
-
-public class CordovaResourceApiTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
-
-    public CordovaResourceApiTest()
-    {
-        super(CordovaWebViewTestActivity.class);
-    }
-
-    CordovaWebView cordovaWebView;
-    CordovaResourceApi resourceApi;
-
-    private CordovaWebViewTestActivity activity;
-    String execPayload;
-    Integer execStatus;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        activity = this.getActivity();
-        cordovaWebView = activity.cordovaWebView;
-        resourceApi = cordovaWebView.getResourceApi();
-        resourceApi.setThreadCheckingEnabled(false);
-        cordovaWebView.pluginManager.addService(new PluginEntry("CordovaResourceApiTestPlugin1", new CordovaPlugin() {
-            @Override
-            public Uri remapUri(Uri uri) {
-                if (uri.getQuery() != null && uri.getQuery().contains("pluginRewrite")) {
-                    return cordovaWebView.getResourceApi().remapUri(
-                            Uri.parse("data:text/plain;charset=utf-8,pass"));
-                }
-                return null;
-            }
-            public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
-                synchronized (CordovaResourceApiTest.this) {
-                    execPayload = args.getString(0);
-                    execStatus = args.getInt(1);
-                    CordovaResourceApiTest.this.notify();
-                }
-                return true;
-            }
-        }));
-    }
-
-    private Uri createTestImageContentUri() {
-        Bitmap imageBitmap = BitmapFactory.decodeResource(activity.getResources(), R.drawable.icon);
-        String stored = MediaStore.Images.Media.insertImage(activity.getContentResolver(),
-                imageBitmap, "app-icon", "desc");
-        return Uri.parse(stored);
-    }
-
-    private void performApiTest(Uri uri, String expectedMimeType, File expectedLocalFile,
-            boolean expectRead, boolean expectWrite) throws IOException {
-        uri = resourceApi.remapUri(uri);
-        assertEquals(expectedLocalFile, resourceApi.mapUriToFile(uri));
-        
-        try {
-            OpenForReadResult readResult = resourceApi.openForRead(uri);
-            String mimeType2 = resourceApi.getMimeType(uri);
-            assertEquals("openForRead mime-type", expectedMimeType, readResult.mimeType);
-            assertEquals("getMimeType mime-type", expectedMimeType, mimeType2);
-            readResult.inputStream.read();
-            if (!expectRead) {
-                fail("Expected getInputStream to throw.");
-            }
-        } catch (IOException e) {
-            if (expectRead) {
-                throw e;
-            }
-        }
-        try {
-            OutputStream outStream = resourceApi.openOutputStream(uri);
-            outStream.write(123);
-            if (!expectWrite) {
-                fail("Expected getOutputStream to throw.");
-            }
-            outStream.close();
-        } catch (IOException e) {
-            if (expectWrite) {
-                throw e;
-            }
-        }
-    }
-
-    public void testValidContentUri() throws IOException
-    {
-        Uri contentUri = createTestImageContentUri();
-        File localFile = resourceApi.mapUriToFile(contentUri);
-        assertNotNull(localFile);
-        performApiTest(contentUri, "image/jpeg", localFile, true, true);
-    }
-
-    public void testInvalidContentUri() throws IOException
-    {
-        Uri contentUri = Uri.parse("content://media/external/images/media/999999999");
-        performApiTest(contentUri, null, null, false, false);
-    }
-
-    public void testValidAssetUri() throws IOException
-    {
-        Uri assetUri = Uri.parse("file:///android_asset/www/index.html?foo#bar"); // Also check for stripping off ? and # correctly.
-        performApiTest(assetUri, "text/html", null, true, false);
-    }
-
-    public void testInvalidAssetUri() throws IOException
-    {
-        Uri assetUri = Uri.parse("file:///android_asset/www/missing.html");
-        performApiTest(assetUri, "text/html", null, false, false);
-    }
-
-    public void testFileUriToExistingFile() throws IOException
-    {
-        File f = File.createTempFile("te s t", ".txt"); // Also check for dealing with spaces.
-        try {
-            Uri fileUri = Uri.parse(f.toURI().toString() + "?foo#bar"); // Also check for stripping off ? and # correctly.
-            performApiTest(fileUri, "text/plain", f, true, true);
-        } finally {
-            f.delete();
-        }
-    }
-
-    public void testFileUriToMissingFile() throws IOException
-    {
-        File f = new File(Environment.getExternalStorageDirectory() + "/somefilethatdoesntexist");
-        Uri fileUri = Uri.parse(f.toURI().toString());
-        try {
-            performApiTest(fileUri, null, f, false, true);
-        } finally {
-            f.delete();
-        }
-    }
-    
-    public void testFileUriToMissingFileWithMissingParent() throws IOException
-    {
-        File f = new File(Environment.getExternalStorageDirectory() + "/somedirthatismissing" + System.currentTimeMillis() + "/somefilethatdoesntexist");
-        Uri fileUri = Uri.parse(f.toURI().toString());
-        performApiTest(fileUri, null, f, false, true);
-    }
-
-    public void testUnrecognizedUri() throws IOException
-    {
-        Uri uri = Uri.parse("somescheme://foo");
-        performApiTest(uri, null, null, false, false);
-    }
-
-    public void testRelativeUri()
-    {
-        try {
-            resourceApi.openForRead(Uri.parse("/foo"));
-            fail("Should have thrown for relative URI 1.");
-        } catch (Throwable t) {
-        }
-        try {
-            resourceApi.openForRead(Uri.parse("//foo/bar"));
-            fail("Should have thrown for relative URI 2.");
-        } catch (Throwable t) {
-        }
-        try {
-            resourceApi.openForRead(Uri.parse("foo.png"));
-            fail("Should have thrown for relative URI 3.");
-        } catch (Throwable t) {
-        }
-    }
-    
-    public void testPluginOverride() throws IOException
-    {
-        Uri uri = Uri.parse("plugin-uri://foohost/android_asset/www/index.html?pluginRewrite=yes");
-        performApiTest(uri, "text/plain", null, true, false);
-    }
-
-    public void testMainThreadUsage() throws IOException
-    {
-        Uri assetUri = Uri.parse("file:///android_asset/www/index.html");
-        resourceApi.setThreadCheckingEnabled(true);
-        try {
-            resourceApi.openForRead(assetUri);
-            fail("Should have thrown for main thread check.");
-        } catch (Throwable t) {
-        }
-    }
-    
-    
-    public void testDataUriPlain() throws IOException
-    {
-        Uri uri = Uri.parse("data:text/plain;charset=utf-8,pa%20ss");
-        OpenForReadResult readResult = resourceApi.openForRead(uri);
-        assertEquals("text/plain", readResult.mimeType);
-        String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next();
-        assertEquals("pa ss", data);
-    }
-    
-    public void testDataUriBase64() throws IOException
-    {
-        Uri uri = Uri.parse("data:text/js;charset=utf-8;base64,cGFzcw==");
-        OpenForReadResult readResult = resourceApi.openForRead(uri);
-        assertEquals("text/js", readResult.mimeType);
-        String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next();
-        assertEquals("pass", data);
-    }
-    
-    public void testWebViewRequestIntercept() throws IOException
-    {
-        cordovaWebView.sendJavascript(
-            "var x = new XMLHttpRequest;\n" +
-            "x.open('GET', 'file://foo?pluginRewrite=1', false);\n" + 
-            "x.send();\n" + 
-            "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])");
-        
-        execPayload = null;
-        execStatus = null;
-        try {
-            synchronized (this) {
-                this.wait(2000);
-            }
-        } catch (InterruptedException e) {
-        }
-        assertEquals("pass", execPayload);
-        assertEquals(execStatus.intValue(), 200);
-    }
-    
-    public void testWebViewWhiteListRejection() throws IOException
-    {
-        cordovaWebView.sendJavascript(
-            "var x = new XMLHttpRequest;\n" +
-            "x.open('GET', 'http://foo/bar', false);\n" + 
-            "x.send();\n" + 
-            "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])");
-        execPayload = null;
-        execStatus = null;
-        try {
-            synchronized (this) {
-                this.wait(2000);
-            }
-        } catch (InterruptedException e) {
-        }
-        assertEquals("", execPayload);
-        assertEquals(execStatus.intValue(), 404);
-    }    
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaTest.java b/test/src/org/apache/cordova/test/CordovaTest.java
deleted file mode 100644
index 0e11b68..0000000
--- a/test/src/org/apache/cordova/test/CordovaTest.java
+++ /dev/null
@@ -1,115 +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.
-*/
-package org.apache.cordova.test;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.PluginManager;
-import org.apache.cordova.test.actions.CordovaWebViewTestActivity;
-
-import android.app.Instrumentation;
-import android.test.ActivityInstrumentationTestCase2;
-import android.view.View;
-
-public class CordovaTest extends
-    ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
-
-  private static final long TIMEOUT = 1000;
-  private CordovaWebViewTestActivity testActivity;
-  private View testView;
-  private String rString;
-
-  public CordovaTest() {
-    super("org.apache.cordova.test.activities", CordovaWebViewTestActivity.class);
-  }
-
-  protected void setUp() throws Exception {
-    super.setUp();
-    testActivity = this.getActivity();
-    testView = testActivity.findViewById(R.id.cordovaWebView);
-  }
-
-  public void testPreconditions() {
-    assertNotNull(testView);
-  }
-
-  public void testForCordovaView() {
-    //Sleep for no reason!!!!
-    sleep();
-    String className = testView.getClass().getSimpleName();
-    assertTrue(className.equals("CordovaWebView"));
-  }
-
-  /*
-  public void testForPluginManager() {
-    CordovaWebView v = (CordovaWebView) testView;
-    PluginManager p = v.getPluginManager();
-    assertNotNull(p);
-    String className = p.getClass().getSimpleName();
-    assertTrue(className.equals("PluginManager"));
-  }
-
-  public void testBackButton() {
-    CordovaWebView v = (CordovaWebView) testView;
-    assertFalse(v.checkBackKey());
-  }
-
-  public void testLoadUrl() {
-    CordovaWebView v = (CordovaWebView) testView;
-    v.loadUrlIntoView("file:///android_asset/www/index.html");
-    sleep();
-    String url = v.getUrl();
-    boolean result = url.equals("file:///android_asset/www/index.html");
-    assertTrue(result);
-    int visible = v.getVisibility();
-    assertTrue(visible == View.VISIBLE);
-  }
-
-  public void testBackHistoryFalse() {
-    CordovaWebView v = (CordovaWebView) testView;
-    // Move back in the history
-    boolean test = v.backHistory();
-    assertFalse(test);
-  }
-
-  // Make sure that we can go back
-  public void testBackHistoryTrue() {
-    this.testLoadUrl();
-    CordovaWebView v = (CordovaWebView) testView;
-    v.loadUrlIntoView("file:///android_asset/www/compass/index.html");
-    sleep();
-    String url = v.getUrl();
-    assertTrue(url.equals("file:///android_asset/www/compass/index.html"));
-    // Move back in the history
-    boolean test = v.backHistory();
-    assertTrue(test);
-    sleep();
-    url = v.getUrl();
-    assertTrue(url.equals("file:///android_asset/www/index.html"));
-  }
-  */
-  
-
-  private void sleep() {
-    try {
-      Thread.sleep(TIMEOUT);
-    } catch (InterruptedException e) {
-      fail("Unexpected Timeout");
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java
new file mode 100644
index 0000000..68a5aad
--- /dev/null
+++ b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java
@@ -0,0 +1,112 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CordovaInterface;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.LOG;
+import org.apache.cordova.test.R;
+import org.apache.cordova.test.R.id;
+import org.apache.cordova.test.R.layout;
+
+import com.amazon.android.webkit.AmazonWebKitFactories;
+import com.amazon.android.webkit.AmazonWebKitFactory;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+
+public class CordovaWebViewTestActivity extends Activity implements CordovaInterface {
+    public CordovaWebView cordovaWebView;
+
+    private final ExecutorService threadPool = Executors.newCachedThreadPool();
+    
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.main);
+
+        cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
+
+        cordovaWebView.loadUrl("file:///android_asset/www/index.html");
+
+    }
+
+    public Context getContext() {
+        return this;
+    }
+
+    public void startActivityForResult(CordovaPlugin command, Intent intent,
+            int requestCode) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setActivityResultCallback(CordovaPlugin plugin) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    //Note: This must always return an activity!
+    public Activity getActivity() {
+        return this;
+    }
+
+    @Deprecated
+    public void cancelLoadUrl() {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public Object onMessage(String id, Object data) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ExecutorService getThreadPool() {
+        // TODO Auto-generated method stub
+        return threadPool;
+    }
+    
+    @Override
+    /**
+     * The final call you receive before your activity is destroyed.
+     */
+    public void onDestroy() {
+        super.onDestroy();
+        if (cordovaWebView != null) {
+            // Send destroy event to JavaScript
+            cordovaWebView.handleDestroy();
+        }
+    }
+
+    @Override
+    public AmazonWebKitFactory getFactory() {
+        return AmazonWebKitFactories.getDefaultFactory();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/ErrorUrlTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/ErrorUrlTest.java b/test/src/org/apache/cordova/test/ErrorUrlTest.java
deleted file mode 100644
index 35f6a92..0000000
--- a/test/src/org/apache/cordova/test/ErrorUrlTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.apache.cordova.test;
-
-/*
- *
- * 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.
- *
- */
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.actions.errorurl;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class ErrorUrlTest extends ActivityInstrumentationTestCase2<errorurl> {
-
-	private int TIMEOUT = 1000;
-	errorurl testActivity;
-	private FrameLayout containerView;
-	private LinearLayout innerContainer;
-	private CordovaWebView testView;
-
-	private AmazonWebViewOnUiThread mUiThread;
-
-	public ErrorUrlTest() {
-		super("org.apache.cordova.test", errorurl.class);
-	}
-
-	protected void setUp() throws Exception {
-		super.setUp();
-		testActivity = this.getActivity();
-		containerView = (FrameLayout) testActivity
-				.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = (CordovaWebView) innerContainer.getChildAt(0);
-		mUiThread = new AmazonWebViewOnUiThread(this, testView);
-	}
-
-	public void testPreconditions() {
-		assertNotNull(innerContainer);
-		assertNotNull(testView);
-	}
-
-	// This will fail for AWV because the current url on a wrong page will
-	// return the URL used to load
-	public void testUrl() {
-		mUiThread.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
-		sleep();
-		String good_url = "file:///android_asset/www/error.html";
-		String url = mUiThread.getUrl();
-		assertNotNull(url);
-		assertTrue(url.equals(good_url));
-	}
-
-	private void sleep() {
-		try {
-			Thread.sleep(TIMEOUT);
-		} catch (InterruptedException e) {
-			fail("Unexpected Timeout");
-		}
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/FixWebView.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/FixWebView.java b/test/src/org/apache/cordova/test/FixWebView.java
deleted file mode 100755
index ac911ec..0000000
--- a/test/src/org/apache/cordova/test/FixWebView.java
+++ /dev/null
@@ -1,44 +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.
-*/
-package org.apache.cordova.test;
-
-import com.amazon.android.webkit.AmazonWebView;
-
-import android.content.Context;
-
-public class FixWebView extends AmazonWebView {
-
-    public FixWebView(Context context) {
-        super(context);
-    }
-
-    @Override
-    public void pauseTimers() {
-        // Do nothing
-    }
-
-    /**
-     * This method is with different signature in order to stop the timers while move application to background
-     * @param realPause
-     */
-    public void pauseTimers(@SuppressWarnings("unused") boolean realPause) {
-        super.pauseTimers();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/GapClientTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/GapClientTest.java b/test/src/org/apache/cordova/test/GapClientTest.java
deleted file mode 100644
index a3c2a62..0000000
--- a/test/src/org/apache/cordova/test/GapClientTest.java
+++ /dev/null
@@ -1,68 +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.
-*/
-
-package org.apache.cordova.test;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CordovaChromeClient;
-import org.apache.cordova.PluginManager;
-import org.apache.cordova.test.actions.CordovaWebViewTestActivity;
-
-import android.content.Context;
-import android.content.res.AssetManager;
-import android.content.res.Resources;
-import android.test.ActivityInstrumentationTestCase2;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class GapClientTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
-	
-	private CordovaWebViewTestActivity testActivity;
-	private FrameLayout containerView;
-	private LinearLayout innerContainer;
-	private View testView;
-	private String rString;
-	private CordovaChromeClient appCode;
-
-	public GapClientTest() {
-		super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.class);
-	}
-	
-	protected void setUp() throws Exception{
-		super.setUp();
-		testActivity = this.getActivity();
-		containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = innerContainer.getChildAt(0);
-		
-	}
-	
-	public void testPreconditions(){
-	    assertNotNull(innerContainer);
-		assertNotNull(testView);
-	}
-	
-	public void testForCordovaView() {
-	    String className = testView.getClass().getSimpleName();
-	    assertTrue(className.equals("CordovaWebView"));
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java b/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
deleted file mode 100644
index daf6af2..0000000
--- a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.actions.htmlnotfound;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2<htmlnotfound> {
-
-  private int TIMEOUT = 1000;
-  private htmlnotfound testActivity;
-  private FrameLayout containerView;
-  private LinearLayout innerContainer;
-  private CordovaWebView testView;
-  private AmazonWebViewOnUiThread mUiThread;
-
-  public HtmlNotFoundTest() {
-    super("org.apache.cordova.test",htmlnotfound.class);
-  }
-  
-  
-  protected void setUp() throws Exception {
-    super.setUp();
-    testActivity = this.getActivity();
-    containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-    innerContainer = (LinearLayout) containerView.getChildAt(0);
-    testView = (CordovaWebView) innerContainer.getChildAt(0);
-    mUiThread = new AmazonWebViewOnUiThread(this, testView);
-  }
-
-  public void testPreconditions(){
-    assertNotNull(innerContainer);
-    assertNotNull(testView);
-  }
-
-  public void testUrl()
-  {
-      sleep();
-      String good_url = "file:///android_asset/www/htmlnotfound/error.html";
-      String url = mUiThread.getUrl();
-      assertNotNull(url);
-      assertFalse(url.equals(good_url));
-  }
-
-  private void sleep() {
-      try {
-        Thread.sleep(TIMEOUT);
-      } catch (InterruptedException e) {
-        fail("Unexpected Timeout");
-      }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/IFrameTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/IFrameTest.java b/test/src/org/apache/cordova/test/IFrameTest.java
deleted file mode 100644
index d8adcfc..0000000
--- a/test/src/org/apache/cordova/test/IFrameTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.util.Purity;
-import org.apache.cordova.test.actions.iframe;
-
-import android.app.Activity;
-import android.app.Instrumentation;
-import android.test.ActivityInstrumentationTestCase2;
-import android.test.TouchUtils;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class IFrameTest extends ActivityInstrumentationTestCase2 {
-  
-    
-    private Instrumentation mInstr;
-    private Activity testActivity;
-    private FrameLayout containerView;
-    private LinearLayout innerContainer;
-    private CordovaWebView testView;
-    private AmazonWebViewOnUiThread mUiThread;
-    private TouchUtils touch;
-    private Purity touchTool;
-    
-    public IFrameTest() {
-        super("org.apache.cordova.test",iframe.class);
-    }
-
-  
-    protected void setUp() throws Exception {
-      super.setUp();
-      mInstr = this.getInstrumentation();
-      testActivity = this.getActivity();
-      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-      innerContainer = (LinearLayout) containerView.getChildAt(0);
-      testView = (CordovaWebView) innerContainer.getChildAt(0);
-      mUiThread = new AmazonWebViewOnUiThread(this, testView);
-      touch = new TouchUtils();
-      touchTool = new Purity(testActivity, getInstrumentation());
-    }
-  
-  
-    public void testIframeDest()
-    {
-        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
-        sleep(3000);
-        testView.sendJavascript("loadUrl('index2.html')");
-        sleep(1000);
-        String url = mUiThread.getUrl();
-        assertTrue(url.endsWith("index.html"));
-    }
-    
-    public void testIframeHistory()
-    {
-        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
-        sleep(3000);
-        testView.sendJavascript("loadUrl('index2.html')");
-        sleep(1000);
-        String url = mUiThread.getUrl();
-        mUiThread.backHistory();
-        sleep(1000);
-        assertTrue(url.endsWith("index.html"));
-    }
-    
-    private void sleep(int timeout) {
-        try {
-          Thread.sleep(timeout);
-        } catch (InterruptedException e) {
-          fail("Unexpected Timeout");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/LifecycleTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/LifecycleTest.java b/test/src/org/apache/cordova/test/LifecycleTest.java
deleted file mode 100644
index 396036d..0000000
--- a/test/src/org/apache/cordova/test/LifecycleTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.test.actions.lifecycle;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-public class LifecycleTest extends ActivityInstrumentationTestCase2<lifecycle> {
-  
-  public LifecycleTest()
-  {
-    super("org.apache.cordova.test",lifecycle.class);
-  }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/MenuTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/MenuTest.java b/test/src/org/apache/cordova/test/MenuTest.java
deleted file mode 100644
index 1486cca..0000000
--- a/test/src/org/apache/cordova/test/MenuTest.java
+++ /dev/null
@@ -1,32 +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.
-*/
-
-package org.apache.cordova.test;
-
-import org.apache.cordova.test.actions.menus;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-public class MenuTest extends ActivityInstrumentationTestCase2<menus> {
-
-    public MenuTest() {
-      super("org.apache.cordova.test", menus.class);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/PluginManagerTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/PluginManagerTest.java b/test/src/org/apache/cordova/test/PluginManagerTest.java
deleted file mode 100644
index c767e7d..0000000
--- a/test/src/org/apache/cordova/test/PluginManagerTest.java
+++ /dev/null
@@ -1,70 +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.
-*/
-
-package org.apache.cordova.test;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.PluginManager;
-import org.apache.cordova.test.actions.CordovaWebViewTestActivity;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class PluginManagerTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
-	
-	private CordovaWebViewTestActivity testActivity;
-	private FrameLayout containerView;
-	private LinearLayout innerContainer;
-	private View testView;
-	private String rString;
-	private PluginManager pMan;
-
-	public PluginManagerTest() {
-		super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.class);
-	}
-	
-	protected void setUp() throws Exception{
-		super.setUp();
-		testActivity = this.getActivity();
-		containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = innerContainer.getChildAt(0);
-		
-	}
-	
-	public void testPreconditions(){
-	    assertNotNull(innerContainer);
-	    assertNotNull(testView);
-	}
-	
-	
-	public void testForPluginManager() {
-	  /*
-	    CordovaWebView v = (CordovaWebView) testView;
-	    pMan = v.getPluginManager();
-	    assertNotNull(pMan);
-	    String className = pMan.getClass().getSimpleName();
-	    assertTrue(className.equals("PluginManager"));
-	    */
-	}
-	
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/SplashscreenTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/SplashscreenTest.java b/test/src/org/apache/cordova/test/SplashscreenTest.java
deleted file mode 100644
index edb8758..0000000
--- a/test/src/org/apache/cordova/test/SplashscreenTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.actions.splashscreen;
-
-import android.app.Dialog;
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class SplashscreenTest extends ActivityInstrumentationTestCase2<splashscreen> {
-  
-  private splashscreen testActivity;
-  private Dialog containerView;
-
-  public SplashscreenTest()
-  {
-      super("org.apache.cordova.test",splashscreen.class);
-  }
-  
-  protected void setUp() throws Exception {
-      super.setUp();
-      testActivity = this.getActivity();
-      //containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-      //containerView = (Dialog) testActivity.findViewById(id);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/UserWebViewTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/UserWebViewTest.java b/test/src/org/apache/cordova/test/UserWebViewTest.java
deleted file mode 100644
index e7a240a..0000000
--- a/test/src/org/apache/cordova/test/UserWebViewTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CordovaWebViewClient;
-import org.apache.cordova.CordovaChromeClient;
-import org.apache.cordova.test.actions.userwebview;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class UserWebViewTest extends ActivityInstrumentationTestCase2<userwebview> {
-
-  public UserWebViewTest ()
-  {
-    super(userwebview.class);
-  }
-  
-  private int TIMEOUT = 1000;
-  userwebview testActivity;
-  private FrameLayout containerView;
-  private LinearLayout innerContainer;
-  private CordovaWebView testView;
-  
-
-  protected void setUp() throws Exception {
-      super.setUp();
-      testActivity = this.getActivity();
-      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
-      innerContainer = (LinearLayout) containerView.getChildAt(0);
-      testView = (CordovaWebView) innerContainer.getChildAt(0);
-  }
-  
-  public void testPreconditions(){
-      assertNotNull(innerContainer);
-      assertNotNull(testView);
-  }
-  
-  public void testCustom()
-  {
-    assertTrue(CordovaWebView.class.isInstance(testView));
-    assertTrue(CordovaWebViewClient.class.isInstance(testActivity.testViewClient));
-    assertTrue(CordovaChromeClient.class.isInstance(testActivity.testChromeClient));
-  }
-  
-
-  private void sleep() {
-      try {
-        Thread.sleep(TIMEOUT);
-      } catch (InterruptedException e) {
-        fail("Unexpected Timeout");
-      }
-    }
-
-}


[21/50] [abbrv] git commit: CB-5346: remove dependency on device plugin

Posted by bo...@apache.org.
CB-5346: remove dependency on device plugin

- remove dependency on the device plugin in the js and html
- clean out dollar signs chars that were accidently appended to the license
- fix punctuation in the viewport value


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/07e922f1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/07e922f1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/07e922f1

Branch: refs/heads/master
Commit: 07e922f1a9cdd704f2bb512e06569c62d5da77b3
Parents: 748fd98
Author: Marcel Kinard <cm...@gmail.com>
Authored: Wed Nov 13 14:43:43 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:17 2014 -0800

----------------------------------------------------------------------
 test/README.md                                  |  1 -
 test/assets/www/backbuttonmultipage/index.html  |  5 +-
 .../assets/www/backbuttonmultipage/sample2.html |  5 +-
 .../assets/www/backbuttonmultipage/sample3.html |  5 +-
 test/assets/www/background/index.html           | 54 ++++++++------------
 test/assets/www/background/index2.html          | 54 ++++++++------------
 test/assets/www/backgroundcolor/index.html      |  8 ++-
 test/assets/www/basicauth/index.html            |  8 ++-
 test/assets/www/fullscreen/index.html           |  8 ++-
 test/assets/www/iframe/index.html               |  8 ++-
 test/assets/www/iframe/index2.html              |  8 ++-
 test/assets/www/index.html                      |  7 +--
 test/assets/www/lifecycle/index.html            | 22 ++------
 test/assets/www/lifecycle/index2.html           |  5 ++
 test/assets/www/main.js                         | 13 +----
 test/assets/www/menus/index.html                |  8 ++-
 test/assets/www/splashscreen/index.html         | 40 +++++++--------
 test/assets/www/userwebview/index.html          | 40 +++++++--------
 test/assets/www/whitelist/index.html            | 40 +++++++--------
 test/assets/www/whitelist/index2.html           | 40 +++++++--------
 test/assets/www/xhr/index.html                  | 40 +++++++--------
 21 files changed, 172 insertions(+), 247 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/README.md
----------------------------------------------------------------------
diff --git a/test/README.md b/test/README.md
index 2a93f27..5d86720 100755
--- a/test/README.md
+++ b/test/README.md
@@ -30,7 +30,6 @@ Before running the tests, they need to be set up.
 
 To run from command line:
 
-0. Install the Cordova Device Plugin using plugman
 0. Build by entering `ant debug install`
 0. Run tests by clicking on "CordovaTest" icon on device
 

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/backbuttonmultipage/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/backbuttonmultipage/index.html b/test/assets/www/backbuttonmultipage/index.html
index afab731..8afa729 100755
--- a/test/assets/www/backbuttonmultipage/index.html
+++ b/test/assets/www/backbuttonmultipage/index.html
@@ -27,9 +27,8 @@ $
 <body onload="init();" id="stage" class="theme">
     <h1>Cordova Android Tests</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;</span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
     </div>
     <div id="info">
         <h4>Page 1</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/backbuttonmultipage/sample2.html
----------------------------------------------------------------------
diff --git a/test/assets/www/backbuttonmultipage/sample2.html b/test/assets/www/backbuttonmultipage/sample2.html
index 397ac70..9d8c7dd 100755
--- a/test/assets/www/backbuttonmultipage/sample2.html
+++ b/test/assets/www/backbuttonmultipage/sample2.html
@@ -27,9 +27,8 @@ $
 <body onload="init();" id="stage" class="theme">
     <h1>Cordova Android Tests</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;</span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
     </div>
     <div id="info">
         <h4>Page 2</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/backbuttonmultipage/sample3.html
----------------------------------------------------------------------
diff --git a/test/assets/www/backbuttonmultipage/sample3.html b/test/assets/www/backbuttonmultipage/sample3.html
index f4b1f8a..31890b1 100755
--- a/test/assets/www/backbuttonmultipage/sample3.html
+++ b/test/assets/www/backbuttonmultipage/sample3.html
@@ -27,9 +27,8 @@ $
 <body onload="init();" id="stage" class="theme">
     <h1>Cordova Android Tests</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;</span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
     </div>
     <div id="info">
         <h4>Page 3</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/background/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/background/index.html b/test/assets/www/background/index.html
index 2a073a6..751806b 100755
--- a/test/assets/www/background/index.html
+++ b/test/assets/www/background/index.html
@@ -1,21 +1,21 @@
 <!DOCTYPE HTML>
 <!--
-         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.$
+         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.
 -->
 <html>
 <head>
@@ -40,13 +40,8 @@ $
 
 	function onDeviceReady() {
 		// Register the event listener
-		document.getElementById("platform").innerHTML = device.platform;
-		document.getElementById("version").innerHTML = device.version;
-		document.getElementById("uuid").innerHTML = device.uuid;
-		document.getElementById("name").innerHTML = device.name;
-		document.getElementById("width").innerHTML = screen.width;
-		document.getElementById("height").innerHTML = screen.height;
-		document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+		document.getElementById("deviceready").innerHTML = "fired";
+		document.getElementById("cordova").innerHTML = cordova.version;
 
 		document.addEventListener("pause", onPause, false);
 		document.addEventListener("resume", onResume, false);
@@ -84,17 +79,8 @@ $
 <body onload="onLoad()" onunload="onUnLoaded()"  id="stage" class="theme">
 	<h1>Events</h1>
 	<div id="info">
-		<h4>
-			Platform: <span id="platform"> &nbsp;</span>, Version: <span
-				id="version">&nbsp;</span>
-		</h4>
-		<h4>
-			UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span>
-		</h4>
-		<h4>
-			Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
-			</span>, Color Depth: <span id="colorDepth"></span>
-		</h4>
+            <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+            <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
 	</div>
 	<div id="info">
 	   Press "Home" button, then return to this app to see pause/resume.<br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/background/index2.html
----------------------------------------------------------------------
diff --git a/test/assets/www/background/index2.html b/test/assets/www/background/index2.html
index addf6eb..fa5a367 100755
--- a/test/assets/www/background/index2.html
+++ b/test/assets/www/background/index2.html
@@ -1,21 +1,21 @@
 <!DOCTYPE HTML>
 <!--
-         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.$
+         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.
 -->
 <html>
 <head>
@@ -40,13 +40,8 @@ $
 
     function onDeviceReady() {
         // Register the event listener
-        document.getElementById("platform").innerHTML = device.platform;
-        document.getElementById("version").innerHTML = device.version;
-        document.getElementById("uuid").innerHTML = device.uuid;
-        document.getElementById("name").innerHTML = device.name;
-        document.getElementById("width").innerHTML = screen.width;
-        document.getElementById("height").innerHTML = screen.height;
-        document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+        document.getElementById("deviceready").innerHTML = "fired";
+        document.getElementById("cordova").innerHTML = cordova.version;
 
         document.addEventListener("pause", onPause, false);
         document.addEventListener("resume", onResume, false);
@@ -84,17 +79,8 @@ $
 <body onload="onLoad()" onunload="onUnLoaded()"  id="stage" class="theme">
     <h1>Events</h1>
     <div id="info">
-        <h4>
-            Platform: <span id="platform"> &nbsp;</span>, Version: <span
-                id="version">&nbsp;</span>
-        </h4>
-        <h4>
-            UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span>
-        </h4>
-        <h4>
-            Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
-            </span>, Color Depth: <span id="colorDepth"></span>
-        </h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
     </div>
     <div id="info">
        <h4>Press "Back" button to return to Page 1.</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/backgroundcolor/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/backgroundcolor/index.html b/test/assets/www/backgroundcolor/index.html
index 0746dcf..3b09d64 100755
--- a/test/assets/www/backgroundcolor/index.html
+++ b/test/assets/www/backgroundcolor/index.html
@@ -19,7 +19,7 @@
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@
   <body onload="init();" id="stage" class="theme">
     <h1>Background Color Test</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      Before this page was show, you should have seen the background flash green.</br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/basicauth/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/basicauth/index.html b/test/assets/www/basicauth/index.html
index 02ff0b2..5d2bc51 100755
--- a/test/assets/www/basicauth/index.html
+++ b/test/assets/www/basicauth/index.html
@@ -19,7 +19,7 @@
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@
   <body onload="init();" id="stage" class="theme">
     <h1>Basic Auth</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      Loading link below should be successful and show page indicating username=test & password=test. <br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/fullscreen/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/fullscreen/index.html b/test/assets/www/fullscreen/index.html
index 8fa24da..ab43cc4 100755
--- a/test/assets/www/fullscreen/index.html
+++ b/test/assets/www/fullscreen/index.html
@@ -19,7 +19,7 @@
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@
   <body onload="init();" id="stage" class="theme">
     <h1>Full Screen Test</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      The app should take over the entire screen. <br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/iframe/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/iframe/index.html b/test/assets/www/iframe/index.html
index 0b3c3d7..de8febf 100755
--- a/test/assets/www/iframe/index.html
+++ b/test/assets/www/iframe/index.html
@@ -19,7 +19,7 @@ $
 -->
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -33,10 +33,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>IFrame</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
     </div>
     <div id="info">
     Press the two buttons:<br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/iframe/index2.html
----------------------------------------------------------------------
diff --git a/test/assets/www/iframe/index2.html b/test/assets/www/iframe/index2.html
index abe692b..a244c45 100755
--- a/test/assets/www/iframe/index2.html
+++ b/test/assets/www/iframe/index2.html
@@ -19,7 +19,7 @@ $
 -->
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>IFrame window</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      This should display a Cordova page inside an iframe.  The info above should be filled out.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/index.html b/test/assets/www/index.html
index 590b593..53d402d 100755
--- a/test/assets/www/index.html
+++ b/test/assets/www/index.html
@@ -38,11 +38,8 @@
   <body onload="init();" id="stage" class="theme">
     <h1>Cordova Android Tests</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
-        <h4>Cordova Version: <span id="cordova">&nbsp;</span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
     <div id="info">
         <h4>Run each of the test activities below:</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/lifecycle/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/lifecycle/index.html b/test/assets/www/lifecycle/index.html
index d965924..69a1870 100755
--- a/test/assets/www/lifecycle/index.html
+++ b/test/assets/www/lifecycle/index.html
@@ -40,13 +40,8 @@ $
 
 	function onDeviceReady() {
 		// Register the event listener
-		document.getElementById("platform").innerHTML = device.platform;
-		document.getElementById("version").innerHTML = device.version;
-		document.getElementById("uuid").innerHTML = device.uuid;
-		document.getElementById("name").innerHTML = device.name;
-		document.getElementById("width").innerHTML = screen.width;
-		document.getElementById("height").innerHTML = screen.height;
-		document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+		document.getElementById("deviceready").innerHTML = "fired";
+		document.getElementById("cordova").innerHTML = cordova.version;
 
 		document.addEventListener("pause", onPause, false);
 		document.addEventListener("resume", onResume, false);
@@ -84,17 +79,8 @@ $
 <body onload="onLoad()" onunload="onUnLoaded()"  id="stage" class="theme">
 	<h1>Events</h1>
 	<div id="info">
-		<h4>
-			Platform: <span id="platform"> &nbsp;</span>, Version: <span
-				id="version">&nbsp;</span>
-		</h4>
-		<h4>
-			UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span>
-		</h4>
-		<h4>
-			Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
-			</span>, Color Depth: <span id="colorDepth"></span>
-		</h4>
+       <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+       <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
 	</div>
 	<div id="info">
 	   <h4>Test 1</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/lifecycle/index2.html
----------------------------------------------------------------------
diff --git a/test/assets/www/lifecycle/index2.html b/test/assets/www/lifecycle/index2.html
index bfa3ed8..caa2482 100755
--- a/test/assets/www/lifecycle/index2.html
+++ b/test/assets/www/lifecycle/index2.html
@@ -40,6 +40,7 @@ $
 
     function onDeviceReady() {
         // Register the event listener
+<<<<<<< HEAD
         document.getElementById("platform").innerHTML = device.platform;
         document.getElementById("version").innerHTML = device.version;
         document.getElementById("uuid").innerHTML = device.uuid;
@@ -47,6 +48,10 @@ $
         document.getElementById("width").innerHTML = screen.width;
         document.getElementById("height").innerHTML = screen.height;
         document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+=======
+        document.getElementById("deviceready").innerHTML = "fired";
+        document.getElementById("cordova").innerHTML = cordova.version;
+>>>>>>> 8e753a6... CB-5346: remove dependency on device plugin
 
         document.addEventListener("pause", onPause, false);
         document.addEventListener("resume", onResume, false);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/main.js
----------------------------------------------------------------------
diff --git a/test/assets/www/main.js b/test/assets/www/main.js
index aa1b226..f525a5c 100755
--- a/test/assets/www/main.js
+++ b/test/assets/www/main.js
@@ -18,17 +18,8 @@
 */
 
 var deviceInfo = function() {
-    document.getElementById("platform").innerHTML = device.platform;
-    document.getElementById("version").innerHTML = device.version;
-    document.getElementById("uuid").innerHTML = device.uuid;
-    document.getElementById("name").innerHTML = device.name;
-    document.getElementById("width").innerHTML = screen.width;
-    document.getElementById("height").innerHTML = screen.height;
-    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-    var el = document.getElementById("cordova");
-    if (el) {
-    	el.innerHTML = device.cordova;
-    }
+    document.getElementById("deviceready").innerHTML = "fired";
+    document.getElementById("cordova").innerHTML = cordova.version;
 };
 
 var getLocation = function() {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/menus/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/menus/index.html b/test/assets/www/menus/index.html
index 38322bc..3a4c0ce 100755
--- a/test/assets/www/menus/index.html
+++ b/test/assets/www/menus/index.html
@@ -19,7 +19,7 @@ $
 -->
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
 	  <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>Menu Test</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      <h4>The menu items should be:</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/splashscreen/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/splashscreen/index.html b/test/assets/www/splashscreen/index.html
index 8d2cd9f..5f5d9e8 100755
--- a/test/assets/www/splashscreen/index.html
+++ b/test/assets/www/splashscreen/index.html
@@ -1,25 +1,25 @@
 <!--
-         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.$
+         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.
 -->
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
 	  <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>Splash Screen Test</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      You should have seen the splash screen for 2 seconds.</div>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/userwebview/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/userwebview/index.html b/test/assets/www/userwebview/index.html
index 51eec6a..b1a653a 100755
--- a/test/assets/www/userwebview/index.html
+++ b/test/assets/www/userwebview/index.html
@@ -1,25 +1,25 @@
 <!--
-         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.$
+         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.
 -->
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
 	  <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>User WebView/Client/Chrome Test</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      <h4>The following should be seen in LogCat:</h4>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/whitelist/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/whitelist/index.html b/test/assets/www/whitelist/index.html
index cf09d4c..b9596c9 100755
--- a/test/assets/www/whitelist/index.html
+++ b/test/assets/www/whitelist/index.html
@@ -1,25 +1,25 @@
 <!--
-         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.$
+         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.
 -->
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>Whitelist Page 1</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      Loading Page 2 should be successful.<br>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/whitelist/index2.html
----------------------------------------------------------------------
diff --git a/test/assets/www/whitelist/index2.html b/test/assets/www/whitelist/index2.html
index 1ba780b..5d990ad 100755
--- a/test/assets/www/whitelist/index2.html
+++ b/test/assets/www/whitelist/index2.html
@@ -1,25 +1,25 @@
 <!--
-         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.$
+         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.
 -->
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -29,10 +29,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>Whitelist Page 2</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      Press "backbutton"

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/07e922f1/test/assets/www/xhr/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/xhr/index.html b/test/assets/www/xhr/index.html
index 9eddb1d..d1b997a 100755
--- a/test/assets/www/xhr/index.html
+++ b/test/assets/www/xhr/index.html
@@ -1,25 +1,25 @@
 <!--
-         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.$
+         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.
 -->
 <!DOCTYPE HTML>
 <html>
   <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta name="viewport" content="width=320, user-scalable=no" />
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Cordova Tests</title>
       <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
@@ -49,10 +49,8 @@ $
   <body onload="init();" id="stage" class="theme">
     <h1>XHR</h1>
     <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>Cordova: <span id="cordova"> &nbsp;</span></h4>
+        <h4>Deviceready: <span id="deviceready"> &nbsp;</span></h4>
      </div>
      <div id="info">
      Press buttons below to test.  You should see an alert with results displayed.


[37/50] [abbrv] git commit: CB-5047: Adding a defaults.xml template

Posted by bo...@apache.org.
CB-5047: Adding a defaults.xml template

This template will be consumed by the CLI, instead of the default
platform config.xml which is consumed by the bin/create workflow.  We
remove the user app specific settings since those are to be edited in
the top level app config.xml by the user, and are injected by the CLI.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/474fb531
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/474fb531
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/474fb531

Branch: refs/heads/master
Commit: 474fb531b57dde5820832fe74d3b408488fa2613
Parents: 91729b3
Author: Michal Mocny <mm...@gmail.com>
Authored: Thu Dec 5 14:06:23 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:21 2014 -0800

----------------------------------------------------------------------
 bin/templates/cordova/defaults.xml | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/474fb531/bin/templates/cordova/defaults.xml
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/defaults.xml b/bin/templates/cordova/defaults.xml
new file mode 100644
index 0000000..1654c13
--- /dev/null
+++ b/bin/templates/cordova/defaults.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        id        = "io.cordova.helloCordova"
+        version   = "2.0.0">
+
+    <!-- Preferences for Android -->
+    <preference name="loglevel" value="DEBUG" />
+
+    <!-- This is required for native Android hooks -->
+    <feature name="App">
+        <param name="android-package" value="org.apache.cordova.App" />
+    </feature>
+</widget>


[13/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/package.json
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/package.json b/test/cordova/node_modules/shelljs/package.json
new file mode 100644
index 0000000..fd09b45
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/package.json
@@ -0,0 +1,48 @@
+{
+  "name": "shelljs",
+  "version": "0.2.6",
+  "author": {
+    "name": "Artur Adib",
+    "email": "aadib@mozilla.com"
+  },
+  "description": "Portable Unix shell commands for Node.js",
+  "keywords": [
+    "unix",
+    "shell",
+    "makefile",
+    "make",
+    "jake",
+    "synchronous"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/arturadib/shelljs.git"
+  },
+  "homepage": "http://github.com/arturadib/shelljs",
+  "main": "./shell.js",
+  "scripts": {
+    "test": "node scripts/run-tests"
+  },
+  "bin": {
+    "shjs": "./bin/shjs"
+  },
+  "dependencies": {},
+  "devDependencies": {
+    "jshint": "~2.1.11"
+  },
+  "optionalDependencies": {},
+  "engines": {
+    "node": ">=0.8.0"
+  },
+  "readme": "# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)\n\nShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!\n\nThe project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:\n\n+ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader\n+ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger\n+ [JSHint](http://jshint.com) - Most popular JavaScript linter\n+ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers\n+ [Yeoman](http://yeoman.io/) - Web application stack and d
 evelopment tool\n+ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation\n\nand [many more](https://npmjs.org/browse/depended/shelljs).\n\n## Installing\n\nVia npm:\n\n```bash\n$ npm install [-g] shelljs\n```\n\nIf the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to\nrun ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:\n\n```bash\n$ shjs my_script\n```\n\nYou can also just copy `shell.js` into your project's directory, and `require()` accordingly.\n\n\n## Examples\n\n### JavaScript\n\n```javascript\nrequire('shelljs/global');\n\nif (!which('git')) {\n  echo('Sorry, this script requires git');\n  exit(1);\n}\n\n// Copy files to release dir\nmkdir('-p', 'out/Release');\ncp('-R', 'stuff/*', 'out/Release');\n\n// Replace macros in each .js file\ncd('lib');\nls('*.js').forEach(function(file) {\n  sed('-i', 'BUILD_VERSION', 'v0.1.2', file);\n  se
 d('-i', /.*REMOVE_THIS_LINE.*\\n/, '', file);\n  sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat('macro.js'), file);\n});\ncd('..');\n\n// Run external tool synchronously\nif (exec('git commit -am \"Auto-commit\"').code !== 0) {\n  echo('Error: Git commit failed');\n  exit(1);\n}\n```\n\n### CoffeeScript\n\n```coffeescript\nrequire 'shelljs/global'\n\nif not which 'git'\n  echo 'Sorry, this script requires git'\n  exit 1\n\n# Copy files to release dir\nmkdir '-p', 'out/Release'\ncp '-R', 'stuff/*', 'out/Release'\n\n# Replace macros in each .js file\ncd 'lib'\nfor file in ls '*.js'\n  sed '-i', 'BUILD_VERSION', 'v0.1.2', file\n  sed '-i', /.*REMOVE_THIS_LINE.*\\n/, '', file\n  sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\\n/, cat 'macro.js', file\ncd '..'\n\n# Run external tool synchronously\nif (exec 'git commit -am \"Auto-commit\"').code != 0\n  echo 'Error: Git commit failed'\n  exit 1\n```\n\n## Global vs. Local\n\nThe example above uses the convenience script `shelljs/global` to reduc
 e verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.\n\nExample:\n\n```javascript\nvar shell = require('shelljs');\nshell.echo('hello world');\n```\n\n## Make tool\n\nA convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.\n\nExample (CoffeeScript):\n\n```coffeescript\nrequire 'shelljs/make'\n\ntarget.all = ->\n  target.bundle()\n  target.docs()\n\ntarget.bundle = ->\n  cd __dirname\n  mkdir 'build'\n  cd 'lib'\n  (cat '*.js').to '../build/output.js'\n\ntarget.docs = ->\n  cd __dirname\n  mkdir 'docs'\n  cd 'lib'\n  for file in ls '*.js'\n    text = grep '//@', file     # extract special comments\n    text.replace '//@', ''      # remove comment tags\n    text.to 'do
 cs/my_docs.md'\n```\n\nTo run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on.\n\n\n\n<!-- \n\n  DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED\n\n-->\n\n\n## Command reference\n\n\nAll commands run synchronously, unless otherwise stated.\n\n\n### cd('dir')\nChanges to directory `dir` for the duration of the script\n\n\n### pwd()\nReturns the current directory.\n\n\n### ls([options ,] path [,path ...])\n### ls([options ,] path_array)\nAvailable options:\n\n+ `-R`: recursive\n+ `-A`: all files (include files beginning with `.`, except for `.` and `..`)\n\nExamples:\n\n```javascript\nls('projs/*.js');\nls('-R', '/users/me', '/tmp');\nls('-R', ['/users/me', '/tmp']); // same as above\n```\n\nReturns array of files in the given path, or in current directory if no path provided.\n\n\n### find(path [,path ...])\n### find(path_array)\nExamples:\n\n```javascript\nfind('src', 'lib');\nfind(['src
 ', 'lib']); // same as above\nfind('.').filter(function(file) { return file.match(/\\.js$/); });\n```\n\nReturns array of all files (however deep) in the given paths.\n\nThe main difference from `ls('-R', path)` is that the resulting file names\ninclude the base directories, e.g. `lib/resources/file1` instead of just `file1`.\n\n\n### cp([options ,] source [,source ...], dest)\n### cp([options ,] source_array, dest)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\ncp('file1', 'dir1');\ncp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');\ncp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above\n```\n\nCopies files. The wildcard `*` is accepted.\n\n\n### rm([options ,] file [, file ...])\n### rm([options ,] file_array)\nAvailable options:\n\n+ `-f`: force\n+ `-r, -R`: recursive\n\nExamples:\n\n```javascript\nrm('-rf', '/tmp/*');\nrm('some_file.txt', 'another_file.txt');\nrm(['some_file.txt', 'another_file.txt']); // same as above\n`
 ``\n\nRemoves files. The wildcard `*` is accepted.\n\n\n### mv(source [, source ...], dest')\n### mv(source_array, dest')\nAvailable options:\n\n+ `f`: force\n\nExamples:\n\n```javascript\nmv('-f', 'file', 'dir/');\nmv('file1', 'file2', 'dir/');\nmv(['file1', 'file2'], 'dir/'); // same as above\n```\n\nMoves files. The wildcard `*` is accepted.\n\n\n### mkdir([options ,] dir [, dir ...])\n### mkdir([options ,] dir_array)\nAvailable options:\n\n+ `p`: full path (will create intermediate dirs if necessary)\n\nExamples:\n\n```javascript\nmkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');\nmkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above\n```\n\nCreates directories.\n\n\n### test(expression)\nAvailable expression primaries:\n\n+ `'-b', 'path'`: true if path is a block device\n+ `'-c', 'path'`: true if path is a character device\n+ `'-d', 'path'`: true if path is a directory\n+ `'-e', 'path'`: true if path exists\n+ `'-f', 'path'`: true if path is a regular file\n+ `'-L', 'path'`: t
 rue if path is a symboilc link\n+ `'-p', 'path'`: true if path is a pipe (FIFO)\n+ `'-S', 'path'`: true if path is a socket\n\nExamples:\n\n```javascript\nif (test('-d', path)) { /* do something with dir */ };\nif (!test('-f', path)) continue; // skip if it's a regular file\n```\n\nEvaluates expression using the available primaries and returns corresponding value.\n\n\n### cat(file [, file ...])\n### cat(file_array)\n\nExamples:\n\n```javascript\nvar str = cat('file*.txt');\nvar str = cat('file1', 'file2');\nvar str = cat(['file1', 'file2']); // same as above\n```\n\nReturns a string containing the given file, or a concatenated string\ncontaining the files if more than one file is given (a new line character is\nintroduced between each file). Wildcard `*` accepted.\n\n\n### 'string'.to(file)\n\nExamples:\n\n```javascript\ncat('input.txt').to('output.txt');\n```\n\nAnalogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, 
 `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_\n\n\n### 'string'.toEnd(file)\n\nExamples:\n\n```javascript\ncat('input.txt').toEnd('output.txt');\n```\n\nAnalogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as\nthose returned by `cat`, `grep`, etc).\n\n\n### sed([options ,] search_regex, replace_str, file)\nAvailable options:\n\n+ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_\n\nExamples:\n\n```javascript\nsed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');\nsed(/.*DELETE_THIS_LINE.*\\n/, '', 'source.js');\n```\n\nReads an input string from `file` and performs a JavaScript `replace()` on the input\nusing the given search regex and replacement string. Returns the new string after replacement.\n\n\n### grep([options ,] regex_filter, file [, file ...])\n### grep([options ,] regex_filter, file_array)\nAvailable options:\n\n+ `-v`: Inverse the sense of the regex and prin
 t the lines not matching the criteria.\n\nExamples:\n\n```javascript\ngrep('-v', 'GLOBAL_VARIABLE', '*.js');\ngrep('GLOBAL_VARIABLE', '*.js');\n```\n\nReads input string from given files and returns a string containing all lines of the\nfile that match the given `regex_filter`. Wildcard `*` accepted.\n\n\n### which(command)\n\nExamples:\n\n```javascript\nvar nodeExec = which('node');\n```\n\nSearches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.\nReturns string containing the absolute path to the command.\n\n\n### echo(string [,string ...])\n\nExamples:\n\n```javascript\necho('hello world');\nvar str = echo('hello world');\n```\n\nPrints string to stdout, and returns string with additional utility methods\nlike `.to()`.\n\n\n### pushd([options,] [dir | '-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.\n\nArguments:\n\n+
  `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.\n+ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n+ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.\n\nExamples:\n\n```javascript\n// process.cwd() === '/usr'\npushd('/etc'); // Returns /etc /usr\npushd('+1');   // Returns /usr /etc\n```\n\nSave the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.\n\n### popd([options,] ['-N' | '+N'])\n\nAvailable options:\n\n+ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.\n\nArguments:\n\n+ `+N`: Removes the Nth directory (count
 ing from the left of the list printed by dirs), starting with zero.\n+ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.\n\nExamples:\n\n```javascript\necho(process.cwd()); // '/usr'\npushd('/etc');       // '/etc /usr'\necho(process.cwd()); // '/etc'\npopd();              // '/usr'\necho(process.cwd()); // '/usr'\n```\n\nWhen no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.\n\n### dirs([options | '+N' | '-N'])\n\nAvailable options:\n\n+ `-c`: Clears the directory stack by deleting all of the elements.\n\nArguments:\n\n+ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.\n+ `-N`: Displays the Nth directory (counting from t
 he right of the list printed by dirs when invoked without options), starting with zero.\n\nDisplay the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.\n\nSee also: pushd, popd\n\n\n### exit(code)\nExits the current process with the given exit code.\n\n### env['VAR_NAME']\nObject containing environment variables (both getter and setter). Shortcut to process.env.\n\n### exec(command [, options] [, callback])\nAvailable options (all `false` by default):\n\n+ `async`: Asynchronous execution. Defaults to true if a callback is provided.\n+ `silent`: Do not echo program output to console.\n\nExamples:\n\n```javascript\nvar version = exec('node --version', {silent:true}).output;\n\nvar child = exec('some_long_running_process', {async:true});\nchild.stdout.on('data', function(data) {\n  /* ... do something with data ... */\n});\n\nexec('some_long_running_process', function(code, output) {\n  console.log('Exit code:
 ', code);\n  console.log('Program output:', output);\n});\n```\n\nExecutes the given `command` _synchronously_, unless otherwise specified.\nWhen in synchronous mode returns the object `{ code:..., output:... }`, containing the program's\n`output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and\nthe `callback` gets the arguments `(code, output)`.\n\n**Note:** For long-lived processes, it's best to run `exec()` asynchronously as\nthe current synchronous implementation uses a lot of CPU. This should be getting\nfixed soon.\n\n\n### chmod(octal_mode || octal_string, file)\n### chmod(symbolic_mode, file)\n\nAvailable options:\n\n+ `-v`: output a diagnostic for every file processed\n+ `-c`: like verbose but report only when a change is made\n+ `-R`: change files and directories recursively\n\nExamples:\n\n```javascript\nchmod(755, '/Users/brandon');\nchmod('755', '/Users/brandon'); // same as above\nchmod('u+x', '/Users/brandon');\n```\n\nAlters th
 e permissions of a file or directory by either specifying the\nabsolute permissions in octal form or expressing the changes in symbols.\nThis command tries to mimic the POSIX behavior as much as possible.\nNotable exceptions:\n\n+ In symbolic modes, 'a-r' and '-r' are identical.  No consideration is\n  given to the umask.\n+ There is no \"quiet\" option since default behavior is to run silent.\n\n\n## Non-Unix commands\n\n\n### tempdir()\n\nExamples:\n\n```javascript\nvar tmp = tempdir(); // \"/tmp\" for most *nix platforms\n```\n\nSearches and returns string containing a writeable, platform-dependent temporary directory.\nFollows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).\n\n\n### error()\nTests if error occurred in the last command. Returns `null` if no error occurred,\notherwise returns string explaining the error\n\n\n## Configuration\n\n\n### config.silent\nExample:\n\n```javascript\nvar silentState = config.silent; // save old
  silent state\nconfig.silent = true;\n/* ... */\nconfig.silent = silentState; // restore old silent state\n```\n\nSuppresses all command output if `true`, except for `echo()` calls.\nDefault is `false`.\n\n### config.fatal\nExample:\n\n```javascript\nconfig.fatal = true;\ncp('this_file_does_not_exist', '/dev/null'); // dies here\n/* more commands... */\n```\n\nIf `true` the script will die on errors. Default is `false`.\n",
+  "readmeFilename": "README.md",
+  "bugs": {
+    "url": "https://github.com/arturadib/shelljs/issues"
+  },
+  "_id": "shelljs@0.2.6",
+  "dist": {
+    "shasum": "3c1e3cebca47c6819cb354ae1e1f8f8452ed71dd"
+  },
+  "_from": "shelljs@0.2.6",
+  "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz"
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/scripts/generate-docs.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/scripts/generate-docs.js b/test/cordova/node_modules/shelljs/scripts/generate-docs.js
new file mode 100755
index 0000000..532fed9
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/scripts/generate-docs.js
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+require('../global');
+
+echo('Appending docs to README.md');
+
+cd(__dirname + '/..');
+
+// Extract docs from shell.js
+var docs = grep('//@', 'shell.js');
+
+docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) {
+  var file = path.match('.js$') ? path : path+'.js';
+  return grep('//@', file);
+});
+
+// Remove '//@'
+docs = docs.replace(/\/\/\@ ?/g, '');
+// Append docs to README
+sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md');
+
+echo('All done.');

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/scripts/run-tests.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/scripts/run-tests.js b/test/cordova/node_modules/shelljs/scripts/run-tests.js
new file mode 100755
index 0000000..f9d31e0
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/scripts/run-tests.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node
+require('../global');
+
+var path = require('path');
+
+var failed = false;
+
+//
+// Lint
+//
+JSHINT_BIN = './node_modules/jshint/bin/jshint';
+cd(__dirname + '/..');
+
+if (!test('-f', JSHINT_BIN)) {
+  echo('JSHint not found. Run `npm install` in the root dir first.');
+  exit(1);
+}
+
+if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) {
+  failed = true;
+  echo('*** JSHINT FAILED! (return code != 0)');
+  echo();
+} else {
+  echo('All JSHint tests passed');
+  echo();
+}
+
+//
+// Unit tests
+//
+cd(__dirname + '/../test');
+ls('*.js').forEach(function(file) {
+  echo('Running test:', file);
+  if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit)
+    failed = true;
+    echo('*** TEST FAILED! (missing exit code "123")');
+    echo();
+  }
+});
+
+if (failed) {
+  echo();
+  echo('*******************************************************');
+  echo('WARNING: Some tests did not pass!');
+  echo('*******************************************************');
+  exit(1);
+} else {
+  echo();
+  echo('All tests passed.');
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/shell.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/shell.js b/test/cordova/node_modules/shelljs/shell.js
new file mode 100644
index 0000000..e56c5de
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/shell.js
@@ -0,0 +1,153 @@
+//
+// ShellJS
+// Unix shell commands on top of Node's API
+//
+// Copyright (c) 2012 Artur Adib
+// http://github.com/arturadib/shelljs
+//
+
+var common = require('./src/common');
+
+
+//@
+//@ All commands run synchronously, unless otherwise stated.
+//@
+
+//@include ./src/cd
+var _cd = require('./src/cd');
+exports.cd = common.wrap('cd', _cd);
+
+//@include ./src/pwd
+var _pwd = require('./src/pwd');
+exports.pwd = common.wrap('pwd', _pwd);
+
+//@include ./src/ls
+var _ls = require('./src/ls');
+exports.ls = common.wrap('ls', _ls);
+
+//@include ./src/find
+var _find = require('./src/find');
+exports.find = common.wrap('find', _find);
+
+//@include ./src/cp
+var _cp = require('./src/cp');
+exports.cp = common.wrap('cp', _cp);
+
+//@include ./src/rm
+var _rm = require('./src/rm');
+exports.rm = common.wrap('rm', _rm);
+
+//@include ./src/mv
+var _mv = require('./src/mv');
+exports.mv = common.wrap('mv', _mv);
+
+//@include ./src/mkdir
+var _mkdir = require('./src/mkdir');
+exports.mkdir = common.wrap('mkdir', _mkdir);
+
+//@include ./src/test
+var _test = require('./src/test');
+exports.test = common.wrap('test', _test);
+
+//@include ./src/cat
+var _cat = require('./src/cat');
+exports.cat = common.wrap('cat', _cat);
+
+//@include ./src/to
+var _to = require('./src/to');
+String.prototype.to = common.wrap('to', _to);
+
+//@include ./src/toEnd
+var _toEnd = require('./src/toEnd');
+String.prototype.toEnd = common.wrap('toEnd', _toEnd);
+
+//@include ./src/sed
+var _sed = require('./src/sed');
+exports.sed = common.wrap('sed', _sed);
+
+//@include ./src/grep
+var _grep = require('./src/grep');
+exports.grep = common.wrap('grep', _grep);
+
+//@include ./src/which
+var _which = require('./src/which');
+exports.which = common.wrap('which', _which);
+
+//@include ./src/echo
+var _echo = require('./src/echo');
+exports.echo = _echo; // don't common.wrap() as it could parse '-options'
+
+//@include ./src/dirs
+var _dirs = require('./src/dirs').dirs;
+exports.dirs = common.wrap("dirs", _dirs);
+var _pushd = require('./src/dirs').pushd;
+exports.pushd = common.wrap('pushd', _pushd);
+var _popd = require('./src/dirs').popd;
+exports.popd = common.wrap("popd", _popd);
+
+//@
+//@ ### exit(code)
+//@ Exits the current process with the given exit code.
+exports.exit = process.exit;
+
+//@
+//@ ### env['VAR_NAME']
+//@ Object containing environment variables (both getter and setter). Shortcut to process.env.
+exports.env = process.env;
+
+//@include ./src/exec
+var _exec = require('./src/exec');
+exports.exec = common.wrap('exec', _exec, {notUnix:true});
+
+//@include ./src/chmod
+var _chmod = require('./src/chmod');
+exports.chmod = common.wrap('chmod', _chmod);
+
+
+
+//@
+//@ ## Non-Unix commands
+//@
+
+//@include ./src/tempdir
+var _tempDir = require('./src/tempdir');
+exports.tempdir = common.wrap('tempdir', _tempDir);
+
+
+//@include ./src/error
+var _error = require('./src/error');
+exports.error = _error;
+
+
+
+//@
+//@ ## Configuration
+//@
+
+exports.config = common.config;
+
+//@
+//@ ### config.silent
+//@ Example:
+//@
+//@ ```javascript
+//@ var silentState = config.silent; // save old silent state
+//@ config.silent = true;
+//@ /* ... */
+//@ config.silent = silentState; // restore old silent state
+//@ ```
+//@
+//@ Suppresses all command output if `true`, except for `echo()` calls.
+//@ Default is `false`.
+
+//@
+//@ ### config.fatal
+//@ Example:
+//@
+//@ ```javascript
+//@ config.fatal = true;
+//@ cp('this_file_does_not_exist', '/dev/null'); // dies here
+//@ /* more commands... */
+//@ ```
+//@
+//@ If `true` the script will die on errors. Default is `false`.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/cat.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/cat.js b/test/cordova/node_modules/shelljs/src/cat.js
new file mode 100644
index 0000000..f6f4d25
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/cat.js
@@ -0,0 +1,43 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### cat(file [, file ...])
+//@ ### cat(file_array)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var str = cat('file*.txt');
+//@ var str = cat('file1', 'file2');
+//@ var str = cat(['file1', 'file2']); // same as above
+//@ ```
+//@
+//@ Returns a string containing the given file, or a concatenated string
+//@ containing the files if more than one file is given (a new line character is
+//@ introduced between each file). Wildcard `*` accepted.
+function _cat(options, files) {
+  var cat = '';
+
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  files.forEach(function(file) {
+    if (!fs.existsSync(file))
+      common.error('no such file or directory: ' + file);
+
+    cat += fs.readFileSync(file, 'utf8') + '\n';
+  });
+
+  if (cat[cat.length-1] === '\n')
+    cat = cat.substring(0, cat.length-1);
+
+  return common.ShellString(cat);
+}
+module.exports = _cat;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/cd.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/cd.js b/test/cordova/node_modules/shelljs/src/cd.js
new file mode 100644
index 0000000..230f432
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/cd.js
@@ -0,0 +1,19 @@
+var fs = require('fs');
+var common = require('./common');
+
+//@
+//@ ### cd('dir')
+//@ Changes to directory `dir` for the duration of the script
+function _cd(options, dir) {
+  if (!dir)
+    common.error('directory not specified');
+
+  if (!fs.existsSync(dir))
+    common.error('no such file or directory: ' + dir);
+
+  if (!fs.statSync(dir).isDirectory())
+    common.error('not a directory: ' + dir);
+
+  process.chdir(dir);
+}
+module.exports = _cd;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/chmod.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/chmod.js b/test/cordova/node_modules/shelljs/src/chmod.js
new file mode 100644
index 0000000..f288893
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/chmod.js
@@ -0,0 +1,208 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+var PERMS = (function (base) {
+  return {
+    OTHER_EXEC  : base.EXEC,
+    OTHER_WRITE : base.WRITE,
+    OTHER_READ  : base.READ,
+
+    GROUP_EXEC  : base.EXEC  << 3,
+    GROUP_WRITE : base.WRITE << 3,
+    GROUP_READ  : base.READ << 3,
+
+    OWNER_EXEC  : base.EXEC << 6,
+    OWNER_WRITE : base.WRITE << 6,
+    OWNER_READ  : base.READ << 6,
+
+    // Literal octal numbers are apparently not allowed in "strict" javascript.  Using parseInt is
+    // the preferred way, else a jshint warning is thrown.
+    STICKY      : parseInt('01000', 8),
+    SETGID      : parseInt('02000', 8),
+    SETUID      : parseInt('04000', 8),
+
+    TYPE_MASK   : parseInt('0770000', 8)
+  };
+})({
+  EXEC  : 1,
+  WRITE : 2,
+  READ  : 4
+});
+
+//@
+//@ ### chmod(octal_mode || octal_string, file)
+//@ ### chmod(symbolic_mode, file)
+//@
+//@ Available options:
+//@
+//@ + `-v`: output a diagnostic for every file processed//@
+//@ + `-c`: like verbose but report only when a change is made//@
+//@ + `-R`: change files and directories recursively//@
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ chmod(755, '/Users/brandon');
+//@ chmod('755', '/Users/brandon'); // same as above
+//@ chmod('u+x', '/Users/brandon');
+//@ ```
+//@
+//@ Alters the permissions of a file or directory by either specifying the
+//@ absolute permissions in octal form or expressing the changes in symbols.
+//@ This command tries to mimic the POSIX behavior as much as possible.
+//@ Notable exceptions:
+//@
+//@ + In symbolic modes, 'a-r' and '-r' are identical.  No consideration is
+//@   given to the umask.
+//@ + There is no "quiet" option since default behavior is to run silent.
+function _chmod(options, mode, filePattern) {
+  if (!filePattern) {
+    if (options.length > 0 && options.charAt(0) === '-') {
+      // Special case where the specified file permissions started with - to subtract perms, which
+      // get picked up by the option parser as command flags.
+      // If we are down by one argument and options starts with -, shift everything over.
+      filePattern = mode;
+      mode = options;
+      options = '';
+    }
+    else {
+      common.error('You must specify a file.');
+    }
+  }
+
+  options = common.parseOptions(options, {
+    'R': 'recursive',
+    'c': 'changes',
+    'v': 'verbose'
+  });
+
+  if (typeof filePattern === 'string') {
+    filePattern = [ filePattern ];
+  }
+
+  var files;
+
+  if (options.recursive) {
+    files = [];
+    common.expand(filePattern).forEach(function addFile(expandedFile) {
+      var stat = fs.lstatSync(expandedFile);
+
+      if (!stat.isSymbolicLink()) {
+        files.push(expandedFile);
+
+        if (stat.isDirectory()) {  // intentionally does not follow symlinks.
+          fs.readdirSync(expandedFile).forEach(function (child) {
+            addFile(expandedFile + '/' + child);
+          });
+        }
+      }
+    });
+  }
+  else {
+    files = common.expand(filePattern);
+  }
+
+  files.forEach(function innerChmod(file) {
+    file = path.resolve(file);
+    if (!fs.existsSync(file)) {
+      common.error('File not found: ' + file);
+    }
+
+    // When recursing, don't follow symlinks.
+    if (options.recursive && fs.lstatSync(file).isSymbolicLink()) {
+      return;
+    }
+
+    var perms = fs.statSync(file).mode;
+    var type = perms & PERMS.TYPE_MASK;
+
+    var newPerms = perms;
+
+    if (isNaN(parseInt(mode, 8))) {
+      // parse options
+      mode.split(',').forEach(function (symbolicMode) {
+        /*jshint regexdash:true */
+        var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i;
+        var matches = pattern.exec(symbolicMode);
+
+        if (matches) {
+          var applyTo = matches[1];
+          var operator = matches[2];
+          var change = matches[3];
+
+          var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === '';
+          var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === '';
+          var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === '';
+
+          var changeRead   = change.indexOf('r') != -1;
+          var changeWrite  = change.indexOf('w') != -1;
+          var changeExec   = change.indexOf('x') != -1;
+          var changeSticky = change.indexOf('t') != -1;
+          var changeSetuid = change.indexOf('s') != -1;
+
+          var mask = 0;
+          if (changeOwner) {
+            mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0);
+          }
+          if (changeGroup) {
+            mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0);
+          }
+          if (changeOther) {
+            mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0);
+          }
+
+          // Sticky bit is special - it's not tied to user, group or other.
+          if (changeSticky) {
+            mask |= PERMS.STICKY;
+          }
+
+          switch (operator) {
+            case '+':
+              newPerms |= mask;
+              break;
+
+            case '-':
+              newPerms &= ~mask;
+              break;
+
+            case '=':
+              newPerms = type + mask;
+
+              // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared.
+              if (fs.statSync(file).isDirectory()) {
+                newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+              }
+              break;
+          }
+
+          if (options.verbose) {
+            log(file + ' -> ' + newPerms.toString(8));
+          }
+
+          if (perms != newPerms) {
+            if (!options.verbose && options.changes) {
+              log(file + ' -> ' + newPerms.toString(8));
+            }
+            fs.chmodSync(file, newPerms);
+          }
+        }
+        else {
+          common.error('Invalid symbolic mode change: ' + symbolicMode);
+        }
+      });
+    }
+    else {
+      // they gave us a full number
+      newPerms = type + parseInt(mode, 8);
+
+      // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared.
+      if (fs.statSync(file).isDirectory()) {
+        newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms;
+      }
+
+      fs.chmodSync(file, newPerms);
+    }
+  });
+}
+module.exports = _chmod;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/common.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/common.js b/test/cordova/node_modules/shelljs/src/common.js
new file mode 100644
index 0000000..fe20871
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/common.js
@@ -0,0 +1,189 @@
+var os = require('os');
+var fs = require('fs');
+var _ls = require('./ls');
+
+// Module globals
+var config = {
+  silent: false,
+  fatal: false
+};
+exports.config = config;
+
+var state = {
+  error: null,
+  currentCmd: 'shell.js',
+  tempDir: null
+};
+exports.state = state;
+
+var platform = os.type().match(/^Win/) ? 'win' : 'unix';
+exports.platform = platform;
+
+function log() {
+  if (!config.silent)
+    console.log.apply(this, arguments);
+}
+exports.log = log;
+
+// Shows error message. Throws unless _continue or config.fatal are true
+function error(msg, _continue) {
+  if (state.error === null)
+    state.error = '';
+  state.error += state.currentCmd + ': ' + msg + '\n';
+
+  if (msg.length > 0)
+    log(state.error);
+
+  if (config.fatal)
+    process.exit(1);
+
+  if (!_continue)
+    throw '';
+}
+exports.error = error;
+
+// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings.
+// For now, this is a dummy function to bookmark places we need such strings
+function ShellString(str) {
+  return str;
+}
+exports.ShellString = ShellString;
+
+// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.:
+//   parseOptions('-a', {'a':'alice', 'b':'bob'});
+function parseOptions(str, map) {
+  if (!map)
+    error('parseOptions() internal error: no map given');
+
+  // All options are false by default
+  var options = {};
+  for (var letter in map)
+    options[map[letter]] = false;
+
+  if (!str)
+    return options; // defaults
+
+  if (typeof str !== 'string')
+    error('parseOptions() internal error: wrong str');
+
+  // e.g. match[1] = 'Rf' for str = '-Rf'
+  var match = str.match(/^\-(.+)/);
+  if (!match)
+    return options;
+
+  // e.g. chars = ['R', 'f']
+  var chars = match[1].split('');
+
+  chars.forEach(function(c) {
+    if (c in map)
+      options[map[c]] = true;
+    else
+      error('option not recognized: '+c);
+  });
+
+  return options;
+}
+exports.parseOptions = parseOptions;
+
+// Expands wildcards with matching (ie. existing) file names.
+// For example:
+//   expand(['file*.js']) = ['file1.js', 'file2.js', ...]
+//   (if the files 'file1.js', 'file2.js', etc, exist in the current dir)
+function expand(list) {
+  var expanded = [];
+  list.forEach(function(listEl) {
+    // Wildcard present?
+    if (listEl.search(/\*/) > -1) {
+      _ls('', listEl).forEach(function(file) {
+        expanded.push(file);
+      });
+    } else {
+      expanded.push(listEl);
+    }
+  });
+  return expanded;
+}
+exports.expand = expand;
+
+// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e.
+// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006
+function unlinkSync(file) {
+  try {
+    fs.unlinkSync(file);
+  } catch(e) {
+    // Try to override file permission
+    if (e.code === 'EPERM') {
+      fs.chmodSync(file, '0666');
+      fs.unlinkSync(file);
+    } else {
+      throw e;
+    }
+  }
+}
+exports.unlinkSync = unlinkSync;
+
+// e.g. 'shelljs_a5f185d0443ca...'
+function randomFileName() {
+  function randomHash(count) {
+    if (count === 1)
+      return parseInt(16*Math.random(), 10).toString(16);
+    else {
+      var hash = '';
+      for (var i=0; i<count; i++)
+        hash += randomHash(1);
+      return hash;
+    }
+  }
+
+  return 'shelljs_'+randomHash(20);
+}
+exports.randomFileName = randomFileName;
+
+// extend(target_obj, source_obj1 [, source_obj2 ...])
+// Shallow extend, e.g.:
+//    extend({A:1}, {b:2}, {c:3}) returns {A:1, b:2, c:3}
+function extend(target) {
+  var sources = [].slice.call(arguments, 1);
+  sources.forEach(function(source) {
+    for (var key in source)
+      target[key] = source[key];
+  });
+
+  return target;
+}
+exports.extend = extend;
+
+// Common wrapper for all Unix-like commands
+function wrap(cmd, fn, options) {
+  return function() {
+    var retValue = null;
+
+    state.currentCmd = cmd;
+    state.error = null;
+
+    try {
+      var args = [].slice.call(arguments, 0);
+
+      if (options && options.notUnix) {
+        retValue = fn.apply(this, args);
+      } else {
+        if (args.length === 0 || typeof args[0] !== 'string' || args[0][0] !== '-')
+          args.unshift(''); // only add dummy option if '-option' not already present
+        retValue = fn.apply(this, args);
+      }
+    } catch (e) {
+      if (!state.error) {
+        // If state.error hasn't been set it's an error thrown by Node, not us - probably a bug...
+        console.log('shell.js: internal error');
+        console.log(e.stack || e);
+        process.exit(1);
+      }
+      if (config.fatal)
+        throw e;
+    }
+
+    state.currentCmd = 'shell.js';
+    return retValue;
+  };
+} // wrap
+exports.wrap = wrap;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/cp.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/cp.js b/test/cordova/node_modules/shelljs/src/cp.js
new file mode 100644
index 0000000..a1bc529
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/cp.js
@@ -0,0 +1,200 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+
+// Buffered file copy, synchronous
+// (Using readFileSync() + writeFileSync() could easily cause a memory overflow
+//  with large files)
+function copyFileSync(srcFile, destFile) {
+  if (!fs.existsSync(srcFile))
+    common.error('copyFileSync: no such file or directory: ' + srcFile);
+
+  var BUF_LENGTH = 64*1024,
+      buf = new Buffer(BUF_LENGTH),
+      bytesRead = BUF_LENGTH,
+      pos = 0,
+      fdr = null,
+      fdw = null;
+
+  try {
+    fdr = fs.openSync(srcFile, 'r');
+  } catch(e) {
+    common.error('copyFileSync: could not read src file ('+srcFile+')');
+  }
+
+  try {
+    fdw = fs.openSync(destFile, 'w');
+  } catch(e) {
+    common.error('copyFileSync: could not write to dest file (code='+e.code+'):'+destFile);
+  }
+
+  while (bytesRead === BUF_LENGTH) {
+    bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
+    fs.writeSync(fdw, buf, 0, bytesRead);
+    pos += bytesRead;
+  }
+
+  fs.closeSync(fdr);
+  fs.closeSync(fdw);
+
+  fs.chmodSync(destFile, fs.statSync(srcFile).mode);
+}
+
+// Recursively copies 'sourceDir' into 'destDir'
+// Adapted from https://github.com/ryanmcgrath/wrench-js
+//
+// Copyright (c) 2010 Ryan McGrath
+// Copyright (c) 2012 Artur Adib
+//
+// Licensed under the MIT License
+// http://www.opensource.org/licenses/mit-license.php
+function cpdirSyncRecursive(sourceDir, destDir, opts) {
+  if (!opts) opts = {};
+
+  /* Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */
+  var checkDir = fs.statSync(sourceDir);
+  try {
+    fs.mkdirSync(destDir, checkDir.mode);
+  } catch (e) {
+    //if the directory already exists, that's okay
+    if (e.code !== 'EEXIST') throw e;
+  }
+
+  var files = fs.readdirSync(sourceDir);
+
+  for (var i = 0; i < files.length; i++) {
+    var srcFile = sourceDir + "/" + files[i];
+    var destFile = destDir + "/" + files[i];
+    var srcFileStat = fs.lstatSync(srcFile);
+
+    if (srcFileStat.isDirectory()) {
+      /* recursion this thing right on back. */
+      cpdirSyncRecursive(srcFile, destFile, opts);
+    } else if (srcFileStat.isSymbolicLink()) {
+      var symlinkFull = fs.readlinkSync(srcFile);
+      fs.symlinkSync(symlinkFull, destFile);
+    } else {
+      /* At this point, we've hit a file actually worth copying... so copy it on over. */
+      if (fs.existsSync(destFile) && !opts.force) {
+        common.log('skipping existing file: ' + files[i]);
+      } else {
+        copyFileSync(srcFile, destFile);
+      }
+    }
+
+  } // for files
+} // cpdirSyncRecursive
+
+
+//@
+//@ ### cp([options ,] source [,source ...], dest)
+//@ ### cp([options ,] source_array, dest)
+//@ Available options:
+//@
+//@ + `-f`: force
+//@ + `-r, -R`: recursive
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cp('file1', 'dir1');
+//@ cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
+//@ cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
+//@ ```
+//@
+//@ Copies files. The wildcard `*` is accepted.
+function _cp(options, sources, dest) {
+  options = common.parseOptions(options, {
+    'f': 'force',
+    'R': 'recursive',
+    'r': 'recursive'
+  });
+
+  // Get sources, dest
+  if (arguments.length < 3) {
+    common.error('missing <source> and/or <dest>');
+  } else if (arguments.length > 3) {
+    sources = [].slice.call(arguments, 1, arguments.length - 1);
+    dest = arguments[arguments.length - 1];
+  } else if (typeof sources === 'string') {
+    sources = [sources];
+  } else if ('length' in sources) {
+    sources = sources; // no-op for array
+  } else {
+    common.error('invalid arguments');
+  }
+
+  var exists = fs.existsSync(dest),
+      stats = exists && fs.statSync(dest);
+
+  // Dest is not existing dir, but multiple sources given
+  if ((!exists || !stats.isDirectory()) && sources.length > 1)
+    common.error('dest is not a directory (too many sources)');
+
+  // Dest is an existing file, but no -f given
+  if (exists && stats.isFile() && !options.force)
+    common.error('dest file already exists: ' + dest);
+
+  if (options.recursive) {
+    // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*"
+    // (see Github issue #15)
+    sources.forEach(function(src, i) {
+      if (src[src.length - 1] === '/')
+        sources[i] += '*';
+    });
+
+    // Create dest
+    try {
+      fs.mkdirSync(dest, parseInt('0777', 8));
+    } catch (e) {
+      // like Unix's cp, keep going even if we can't create dest dir
+    }
+  }
+
+  sources = common.expand(sources);
+
+  sources.forEach(function(src) {
+    if (!fs.existsSync(src)) {
+      common.error('no such file or directory: '+src, true);
+      return; // skip file
+    }
+
+    // If here, src exists
+    if (fs.statSync(src).isDirectory()) {
+      if (!options.recursive) {
+        // Non-Recursive
+        common.log(src + ' is a directory (not copied)');
+      } else {
+        // Recursive
+        // 'cp /a/source dest' should create 'source' in 'dest'
+        var newDest = path.join(dest, path.basename(src)),
+            checkDir = fs.statSync(src);
+        try {
+          fs.mkdirSync(newDest, checkDir.mode);
+        } catch (e) {
+          //if the directory already exists, that's okay
+          if (e.code !== 'EEXIST') throw e;
+        }
+
+        cpdirSyncRecursive(src, newDest, {force: options.force});
+      }
+      return; // done with dir
+    }
+
+    // If here, src is a file
+
+    // When copying to '/path/dir':
+    //    thisDest = '/path/dir/file1'
+    var thisDest = dest;
+    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
+      thisDest = path.normalize(dest + '/' + path.basename(src));
+
+    if (fs.existsSync(thisDest) && !options.force) {
+      common.error('dest file already exists: ' + thisDest, true);
+      return; // skip file
+    }
+
+    copyFileSync(src, thisDest);
+  }); // forEach(src)
+}
+module.exports = _cp;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/dirs.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/dirs.js b/test/cordova/node_modules/shelljs/src/dirs.js
new file mode 100644
index 0000000..58fae8b
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/dirs.js
@@ -0,0 +1,191 @@
+var common = require('./common');
+var _cd = require('./cd');
+var path = require('path');
+
+// Pushd/popd/dirs internals
+var _dirStack = [];
+
+function _isStackIndex(index) {
+  return (/^[\-+]\d+$/).test(index);
+}
+
+function _parseStackIndex(index) {
+  if (_isStackIndex(index)) {
+    if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd
+      return (/^-/).test(index) ? Number(index) - 1 : Number(index);
+    } else {
+      common.error(index + ': directory stack index out of range');
+    }
+  } else {
+    common.error(index + ': invalid number');
+  }
+}
+
+function _actualDirStack() {
+  return [process.cwd()].concat(_dirStack);
+}
+
+//@
+//@ ### pushd([options,] [dir | '-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
+//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ // process.cwd() === '/usr'
+//@ pushd('/etc'); // Returns /etc /usr
+//@ pushd('+1');   // Returns /usr /etc
+//@ ```
+//@
+//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+function _pushd(options, dir) {
+  if (_isStackIndex(options)) {
+    dir = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'n' : 'no-cd'
+  });
+
+  var dirs = _actualDirStack();
+
+  if (dir === '+0') {
+    return dirs; // +0 is a noop
+  } else if (!dir) {
+    if (dirs.length > 1) {
+      dirs = dirs.splice(1, 1).concat(dirs);
+    } else {
+      return common.error('no other directory');
+    }
+  } else if (_isStackIndex(dir)) {
+    var n = _parseStackIndex(dir);
+    dirs = dirs.slice(n).concat(dirs.slice(0, n));
+  } else {
+    if (options['no-cd']) {
+      dirs.splice(1, 0, dir);
+    } else {
+      dirs.unshift(dir);
+    }
+  }
+
+  if (options['no-cd']) {
+    dirs = dirs.slice(1);
+  } else {
+    dir = path.resolve(dirs.shift());
+    _cd('', dir);
+  }
+
+  _dirStack = dirs;
+  return _dirs('');
+}
+exports.pushd = _pushd;
+
+//@
+//@ ### popd([options,] ['-N' | '+N'])
+//@
+//@ Available options:
+//@
+//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
+//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo(process.cwd()); // '/usr'
+//@ pushd('/etc');       // '/etc /usr'
+//@ echo(process.cwd()); // '/etc'
+//@ popd();              // '/usr'
+//@ echo(process.cwd()); // '/usr'
+//@ ```
+//@
+//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+function _popd(options, index) {
+  if (_isStackIndex(options)) {
+    index = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'n' : 'no-cd'
+  });
+
+  if (!_dirStack.length) {
+    return common.error('directory stack empty');
+  }
+
+  index = _parseStackIndex(index || '+0');
+
+  if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) {
+    index = index > 0 ? index - 1 : index;
+    _dirStack.splice(index, 1);
+  } else {
+    var dir = path.resolve(_dirStack.shift());
+    _cd('', dir);
+  }
+
+  return _dirs('');
+}
+exports.popd = _popd;
+
+//@
+//@ ### dirs([options | '+N' | '-N'])
+//@
+//@ Available options:
+//@
+//@ + `-c`: Clears the directory stack by deleting all of the elements.
+//@
+//@ Arguments:
+//@
+//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
+//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+//@
+//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+//@
+//@ See also: pushd, popd
+function _dirs(options, index) {
+  if (_isStackIndex(options)) {
+    index = options;
+    options = '';
+  }
+
+  options = common.parseOptions(options, {
+    'c' : 'clear'
+  });
+
+  if (options['clear']) {
+    _dirStack = [];
+    return _dirStack;
+  }
+
+  var stack = _actualDirStack();
+
+  if (index) {
+    index = _parseStackIndex(index);
+
+    if (index < 0) {
+      index = stack.length + index;
+    }
+
+    common.log(stack[index]);
+    return stack[index];
+  }
+
+  common.log(stack.join(' '));
+
+  return stack;
+}
+exports.dirs = _dirs;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/echo.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/echo.js b/test/cordova/node_modules/shelljs/src/echo.js
new file mode 100644
index 0000000..760ea84
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/echo.js
@@ -0,0 +1,20 @@
+var common = require('./common');
+
+//@
+//@ ### echo(string [,string ...])
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ echo('hello world');
+//@ var str = echo('hello world');
+//@ ```
+//@
+//@ Prints string to stdout, and returns string with additional utility methods
+//@ like `.to()`.
+function _echo() {
+  var messages = [].slice.call(arguments, 0);
+  console.log.apply(this, messages);
+  return common.ShellString(messages.join(' '));
+}
+module.exports = _echo;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/error.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/error.js b/test/cordova/node_modules/shelljs/src/error.js
new file mode 100644
index 0000000..cca3efb
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/error.js
@@ -0,0 +1,10 @@
+var common = require('./common');
+
+//@
+//@ ### error()
+//@ Tests if error occurred in the last command. Returns `null` if no error occurred,
+//@ otherwise returns string explaining the error
+function error() {
+  return common.state.error;
+};
+module.exports = error;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/exec.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/exec.js b/test/cordova/node_modules/shelljs/src/exec.js
new file mode 100644
index 0000000..7ccdbc0
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/exec.js
@@ -0,0 +1,181 @@
+var common = require('./common');
+var _tempDir = require('./tempdir');
+var _pwd = require('./pwd');
+var path = require('path');
+var fs = require('fs');
+var child = require('child_process');
+
+// Hack to run child_process.exec() synchronously (sync avoids callback hell)
+// Uses a custom wait loop that checks for a flag file, created when the child process is done.
+// (Can't do a wait loop that checks for internal Node variables/messages as
+// Node is single-threaded; callbacks and other internal state changes are done in the
+// event loop).
+function execSync(cmd, opts) {
+  var tempDir = _tempDir();
+  var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      codeFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      scriptFile = path.resolve(tempDir+'/'+common.randomFileName()),
+      sleepFile = path.resolve(tempDir+'/'+common.randomFileName());
+
+  var options = common.extend({
+    silent: common.config.silent
+  }, opts);
+
+  var previousStdoutContent = '';
+  // Echoes stdout changes from running process, if not silent
+  function updateStdout() {
+    if (options.silent || !fs.existsSync(stdoutFile))
+      return;
+
+    var stdoutContent = fs.readFileSync(stdoutFile, 'utf8');
+    // No changes since last time?
+    if (stdoutContent.length <= previousStdoutContent.length)
+      return;
+
+    process.stdout.write(stdoutContent.substr(previousStdoutContent.length));
+    previousStdoutContent = stdoutContent;
+  }
+
+  function escape(str) {
+    return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
+  }
+
+  cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix
+
+  var script =
+   "var child = require('child_process')," +
+   "     fs = require('fs');" +
+   "child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {" +
+   "  fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');" +
+   "});";
+
+  if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile);
+  if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile);
+  if (fs.existsSync(codeFile)) common.unlinkSync(codeFile);
+
+  fs.writeFileSync(scriptFile, script);
+  child.exec('"'+process.execPath+'" '+scriptFile, {
+    env: process.env,
+    cwd: _pwd(),
+    maxBuffer: 20*1024*1024
+  });
+
+  // The wait loop
+  // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage
+  // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing
+  // CPU usage, though apparently not so much on Windows)
+  while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+  while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); }
+
+  // At this point codeFile exists, but it's not necessarily flushed yet.
+  // Keep reading it until it is.
+  var code = parseInt('', 10);
+  while (isNaN(code)) {
+    code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10);
+  }
+
+  var stdout = fs.readFileSync(stdoutFile, 'utf8');
+
+  // No biggie if we can't erase the files now -- they're in a temp dir anyway
+  try { common.unlinkSync(scriptFile); } catch(e) {}
+  try { common.unlinkSync(stdoutFile); } catch(e) {}
+  try { common.unlinkSync(codeFile); } catch(e) {}
+  try { common.unlinkSync(sleepFile); } catch(e) {}
+
+  // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html
+  if (code === 1 || code === 2 || code >= 126)  {
+      common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes
+  }
+  // True if successful, false if not
+  var obj = {
+    code: code,
+    output: stdout
+  };
+  return obj;
+} // execSync()
+
+// Wrapper around exec() to enable echoing output to console in real time
+function execAsync(cmd, opts, callback) {
+  var output = '';
+
+  var options = common.extend({
+    silent: common.config.silent
+  }, opts);
+
+  var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) {
+    if (callback)
+      callback(err ? err.code : 0, output);
+  });
+
+  c.stdout.on('data', function(data) {
+    output += data;
+    if (!options.silent)
+      process.stdout.write(data);
+  });
+
+  c.stderr.on('data', function(data) {
+    output += data;
+    if (!options.silent)
+      process.stdout.write(data);
+  });
+
+  return c;
+}
+
+//@
+//@ ### exec(command [, options] [, callback])
+//@ Available options (all `false` by default):
+//@
+//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided.
+//@ + `silent`: Do not echo program output to console.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var version = exec('node --version', {silent:true}).output;
+//@
+//@ var child = exec('some_long_running_process', {async:true});
+//@ child.stdout.on('data', function(data) {
+//@   /* ... do something with data ... */
+//@ });
+//@
+//@ exec('some_long_running_process', function(code, output) {
+//@   console.log('Exit code:', code);
+//@   console.log('Program output:', output);
+//@ });
+//@ ```
+//@
+//@ Executes the given `command` _synchronously_, unless otherwise specified.
+//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+//@ `output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and
+//@ the `callback` gets the arguments `(code, output)`.
+//@
+//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+//@ the current synchronous implementation uses a lot of CPU. This should be getting
+//@ fixed soon.
+function _exec(command, options, callback) {
+  if (!command)
+    common.error('must specify command');
+
+  // Callback is defined instead of options.
+  if (typeof options === 'function') {
+    callback = options;
+    options = { async: true };
+  }
+
+  // Callback is defined with options.
+  if (typeof options === 'object' && typeof callback === 'function') {
+    options.async = true;
+  }
+
+  options = common.extend({
+    silent: common.config.silent,
+    async: false
+  }, options);
+
+  if (options.async)
+    return execAsync(command, options, callback);
+  else
+    return execSync(command, options);
+}
+module.exports = _exec;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/find.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/find.js b/test/cordova/node_modules/shelljs/src/find.js
new file mode 100644
index 0000000..d9eeec2
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/find.js
@@ -0,0 +1,51 @@
+var fs = require('fs');
+var common = require('./common');
+var _ls = require('./ls');
+
+//@
+//@ ### find(path [,path ...])
+//@ ### find(path_array)
+//@ Examples:
+//@
+//@ ```javascript
+//@ find('src', 'lib');
+//@ find(['src', 'lib']); // same as above
+//@ find('.').filter(function(file) { return file.match(/\.js$/); });
+//@ ```
+//@
+//@ Returns array of all files (however deep) in the given paths.
+//@
+//@ The main difference from `ls('-R', path)` is that the resulting file names
+//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+function _find(options, paths) {
+  if (!paths)
+    common.error('no path specified');
+  else if (typeof paths === 'object')
+    paths = paths; // assume array
+  else if (typeof paths === 'string')
+    paths = [].slice.call(arguments, 1);
+
+  var list = [];
+
+  function pushFile(file) {
+    if (common.platform === 'win')
+      file = file.replace(/\\/g, '/');
+    list.push(file);
+  }
+
+  // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs
+  // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory
+
+  paths.forEach(function(file) {
+    pushFile(file);
+
+    if (fs.statSync(file).isDirectory()) {
+      _ls('-RA', file+'/*').forEach(function(subfile) {
+        pushFile(subfile);
+      });
+    }
+  });
+
+  return list;
+}
+module.exports = _find;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/grep.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/grep.js b/test/cordova/node_modules/shelljs/src/grep.js
new file mode 100644
index 0000000..00c7d6a
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/grep.js
@@ -0,0 +1,52 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### grep([options ,] regex_filter, file [, file ...])
+//@ ### grep([options ,] regex_filter, file_array)
+//@ Available options:
+//@
+//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ grep('-v', 'GLOBAL_VARIABLE', '*.js');
+//@ grep('GLOBAL_VARIABLE', '*.js');
+//@ ```
+//@
+//@ Reads input string from given files and returns a string containing all lines of the
+//@ file that match the given `regex_filter`. Wildcard `*` accepted.
+function _grep(options, regex, files) {
+  options = common.parseOptions(options, {
+    'v': 'inverse'
+  });
+
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 2);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  var grep = '';
+  files.forEach(function(file) {
+    if (!fs.existsSync(file)) {
+      common.error('no such file or directory: ' + file, true);
+      return;
+    }
+
+    var contents = fs.readFileSync(file, 'utf8'),
+        lines = contents.split(/\r*\n/);
+    lines.forEach(function(line) {
+      var matched = line.match(regex);
+      if ((options.inverse && !matched) || (!options.inverse && matched))
+        grep += line + '\n';
+    });
+  });
+
+  return common.ShellString(grep);
+}
+module.exports = _grep;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/ls.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/ls.js b/test/cordova/node_modules/shelljs/src/ls.js
new file mode 100644
index 0000000..3345db4
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/ls.js
@@ -0,0 +1,126 @@
+var path = require('path');
+var fs = require('fs');
+var common = require('./common');
+var _cd = require('./cd');
+var _pwd = require('./pwd');
+
+//@
+//@ ### ls([options ,] path [,path ...])
+//@ ### ls([options ,] path_array)
+//@ Available options:
+//@
+//@ + `-R`: recursive
+//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ ls('projs/*.js');
+//@ ls('-R', '/users/me', '/tmp');
+//@ ls('-R', ['/users/me', '/tmp']); // same as above
+//@ ```
+//@
+//@ Returns array of files in the given path, or in current directory if no path provided.
+function _ls(options, paths) {
+  options = common.parseOptions(options, {
+    'R': 'recursive',
+    'A': 'all',
+    'a': 'all_deprecated'
+  });
+
+  if (options.all_deprecated) {
+    // We won't support the -a option as it's hard to image why it's useful
+    // (it includes '.' and '..' in addition to '.*' files)
+    // For backwards compatibility we'll dump a deprecated message and proceed as before
+    common.log('ls: Option -a is deprecated. Use -A instead');
+    options.all = true;
+  }
+
+  if (!paths)
+    paths = ['.'];
+  else if (typeof paths === 'object')
+    paths = paths; // assume array
+  else if (typeof paths === 'string')
+    paths = [].slice.call(arguments, 1);
+
+  var list = [];
+
+  // Conditionally pushes file to list - returns true if pushed, false otherwise
+  // (e.g. prevents hidden files to be included unless explicitly told so)
+  function pushFile(file, query) {
+    // hidden file?
+    if (path.basename(file)[0] === '.') {
+      // not explicitly asking for hidden files?
+      if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1))
+        return false;
+    }
+
+    if (common.platform === 'win')
+      file = file.replace(/\\/g, '/');
+
+    list.push(file);
+    return true;
+  }
+
+  paths.forEach(function(p) {
+    if (fs.existsSync(p)) {
+      var stats = fs.statSync(p);
+      // Simple file?
+      if (stats.isFile()) {
+        pushFile(p, p);
+        return; // continue
+      }
+
+      // Simple dir?
+      if (stats.isDirectory()) {
+        // Iterate over p contents
+        fs.readdirSync(p).forEach(function(file) {
+          if (!pushFile(file, p))
+            return;
+
+          // Recursive?
+          if (options.recursive) {
+            var oldDir = _pwd();
+            _cd('', p);
+            if (fs.statSync(file).isDirectory())
+              list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*'));
+            _cd('', oldDir);
+          }
+        });
+        return; // continue
+      }
+    }
+
+    // p does not exist - possible wildcard present
+
+    var basename = path.basename(p);
+    var dirname = path.dirname(p);
+    // Wildcard present on an existing dir? (e.g. '/tmp/*.js')
+    if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) {
+      // Escape special regular expression chars
+      var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1');
+      // Translates wildcard into regex
+      regexp = '^' + regexp.replace(/\*/g, '.*') + '$';
+      // Iterate over directory contents
+      fs.readdirSync(dirname).forEach(function(file) {
+        if (file.match(new RegExp(regexp))) {
+          if (!pushFile(path.normalize(dirname+'/'+file), basename))
+            return;
+
+          // Recursive?
+          if (options.recursive) {
+            var pp = dirname + '/' + file;
+            if (fs.lstatSync(pp).isDirectory())
+              list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*'));
+          } // recursive
+        } // if file matches
+      }); // forEach
+      return;
+    }
+
+    common.error('no such file or directory: ' + p, true);
+  });
+
+  return list;
+}
+module.exports = _ls;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/mkdir.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/mkdir.js b/test/cordova/node_modules/shelljs/src/mkdir.js
new file mode 100644
index 0000000..5a7088f
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/mkdir.js
@@ -0,0 +1,68 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+// Recursively creates 'dir'
+function mkdirSyncRecursive(dir) {
+  var baseDir = path.dirname(dir);
+
+  // Base dir exists, no recursion necessary
+  if (fs.existsSync(baseDir)) {
+    fs.mkdirSync(dir, parseInt('0777', 8));
+    return;
+  }
+
+  // Base dir does not exist, go recursive
+  mkdirSyncRecursive(baseDir);
+
+  // Base dir created, can create dir
+  fs.mkdirSync(dir, parseInt('0777', 8));
+}
+
+//@
+//@ ### mkdir([options ,] dir [, dir ...])
+//@ ### mkdir([options ,] dir_array)
+//@ Available options:
+//@
+//@ + `p`: full path (will create intermediate dirs if necessary)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+//@ ```
+//@
+//@ Creates directories.
+function _mkdir(options, dirs) {
+  options = common.parseOptions(options, {
+    'p': 'fullpath'
+  });
+  if (!dirs)
+    common.error('no paths given');
+
+  if (typeof dirs === 'string')
+    dirs = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  dirs.forEach(function(dir) {
+    if (fs.existsSync(dir)) {
+      if (!options.fullpath)
+          common.error('path already exists: ' + dir, true);
+      return; // skip dir
+    }
+
+    // Base dir does not exist, and no -p option given
+    var baseDir = path.dirname(dir);
+    if (!fs.existsSync(baseDir) && !options.fullpath) {
+      common.error('no such file or directory: ' + baseDir, true);
+      return; // skip dir
+    }
+
+    if (options.fullpath)
+      mkdirSyncRecursive(dir);
+    else
+      fs.mkdirSync(dir, parseInt('0777', 8));
+  });
+} // mkdir
+module.exports = _mkdir;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/mv.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/mv.js b/test/cordova/node_modules/shelljs/src/mv.js
new file mode 100644
index 0000000..11f9607
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/mv.js
@@ -0,0 +1,80 @@
+var fs = require('fs');
+var path = require('path');
+var common = require('./common');
+
+//@
+//@ ### mv(source [, source ...], dest')
+//@ ### mv(source_array, dest')
+//@ Available options:
+//@
+//@ + `f`: force
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ mv('-f', 'file', 'dir/');
+//@ mv('file1', 'file2', 'dir/');
+//@ mv(['file1', 'file2'], 'dir/'); // same as above
+//@ ```
+//@
+//@ Moves files. The wildcard `*` is accepted.
+function _mv(options, sources, dest) {
+  options = common.parseOptions(options, {
+    'f': 'force'
+  });
+
+  // Get sources, dest
+  if (arguments.length < 3) {
+    common.error('missing <source> and/or <dest>');
+  } else if (arguments.length > 3) {
+    sources = [].slice.call(arguments, 1, arguments.length - 1);
+    dest = arguments[arguments.length - 1];
+  } else if (typeof sources === 'string') {
+    sources = [sources];
+  } else if ('length' in sources) {
+    sources = sources; // no-op for array
+  } else {
+    common.error('invalid arguments');
+  }
+
+  sources = common.expand(sources);
+
+  var exists = fs.existsSync(dest),
+      stats = exists && fs.statSync(dest);
+
+  // Dest is not existing dir, but multiple sources given
+  if ((!exists || !stats.isDirectory()) && sources.length > 1)
+    common.error('dest is not a directory (too many sources)');
+
+  // Dest is an existing file, but no -f given
+  if (exists && stats.isFile() && !options.force)
+    common.error('dest file already exists: ' + dest);
+
+  sources.forEach(function(src) {
+    if (!fs.existsSync(src)) {
+      common.error('no such file or directory: '+src, true);
+      return; // skip file
+    }
+
+    // If here, src exists
+
+    // When copying to '/path/dir':
+    //    thisDest = '/path/dir/file1'
+    var thisDest = dest;
+    if (fs.existsSync(dest) && fs.statSync(dest).isDirectory())
+      thisDest = path.normalize(dest + '/' + path.basename(src));
+
+    if (fs.existsSync(thisDest) && !options.force) {
+      common.error('dest file already exists: ' + thisDest, true);
+      return; // skip file
+    }
+
+    if (path.resolve(src) === path.dirname(path.resolve(thisDest))) {
+      common.error('cannot move to self: '+src, true);
+      return; // skip file
+    }
+
+    fs.renameSync(src, thisDest);
+  }); // forEach(src)
+} // mv
+module.exports = _mv;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/popd.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/popd.js b/test/cordova/node_modules/shelljs/src/popd.js
new file mode 100644
index 0000000..11ea24f
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/popd.js
@@ -0,0 +1 @@
+// see dirs.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/pushd.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/pushd.js b/test/cordova/node_modules/shelljs/src/pushd.js
new file mode 100644
index 0000000..11ea24f
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/pushd.js
@@ -0,0 +1 @@
+// see dirs.js
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/pwd.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/pwd.js b/test/cordova/node_modules/shelljs/src/pwd.js
new file mode 100644
index 0000000..41727bb
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/pwd.js
@@ -0,0 +1,11 @@
+var path = require('path');
+var common = require('./common');
+
+//@
+//@ ### pwd()
+//@ Returns the current directory.
+function _pwd(options) {
+  var pwd = path.resolve(process.cwd());
+  return common.ShellString(pwd);
+}
+module.exports = _pwd;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/rm.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/rm.js b/test/cordova/node_modules/shelljs/src/rm.js
new file mode 100644
index 0000000..3abe6e1
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/rm.js
@@ -0,0 +1,145 @@
+var common = require('./common');
+var fs = require('fs');
+
+// Recursively removes 'dir'
+// Adapted from https://github.com/ryanmcgrath/wrench-js
+//
+// Copyright (c) 2010 Ryan McGrath
+// Copyright (c) 2012 Artur Adib
+//
+// Licensed under the MIT License
+// http://www.opensource.org/licenses/mit-license.php
+function rmdirSyncRecursive(dir, force) {
+  var files;
+
+  files = fs.readdirSync(dir);
+
+  // Loop through and delete everything in the sub-tree after checking it
+  for(var i = 0; i < files.length; i++) {
+    var file = dir + "/" + files[i],
+        currFile = fs.lstatSync(file);
+
+    if(currFile.isDirectory()) { // Recursive function back to the beginning
+      rmdirSyncRecursive(file, force);
+    }
+
+    else if(currFile.isSymbolicLink()) { // Unlink symlinks
+      if (force || isWriteable(file)) {
+        try {
+          common.unlinkSync(file);
+        } catch (e) {
+          common.error('could not remove file (code '+e.code+'): ' + file, true);
+        }
+      }
+    }
+
+    else // Assume it's a file - perhaps a try/catch belongs here?
+      if (force || isWriteable(file)) {
+        try {
+          common.unlinkSync(file);
+        } catch (e) {
+          common.error('could not remove file (code '+e.code+'): ' + file, true);
+        }
+      }
+  }
+
+  // Now that we know everything in the sub-tree has been deleted, we can delete the main directory.
+  // Huzzah for the shopkeep.
+
+  var result;
+  try {
+    result = fs.rmdirSync(dir);
+  } catch(e) {
+    common.error('could not remove directory (code '+e.code+'): ' + dir, true);
+  }
+
+  return result;
+} // rmdirSyncRecursive
+
+// Hack to determine if file has write permissions for current user
+// Avoids having to check user, group, etc, but it's probably slow
+function isWriteable(file) {
+  var writePermission = true;
+  try {
+    var __fd = fs.openSync(file, 'a');
+    fs.closeSync(__fd);
+  } catch(e) {
+    writePermission = false;
+  }
+
+  return writePermission;
+}
+
+//@
+//@ ### rm([options ,] file [, file ...])
+//@ ### rm([options ,] file_array)
+//@ Available options:
+//@
+//@ + `-f`: force
+//@ + `-r, -R`: recursive
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ rm('-rf', '/tmp/*');
+//@ rm('some_file.txt', 'another_file.txt');
+//@ rm(['some_file.txt', 'another_file.txt']); // same as above
+//@ ```
+//@
+//@ Removes files. The wildcard `*` is accepted.
+function _rm(options, files) {
+  options = common.parseOptions(options, {
+    'f': 'force',
+    'r': 'recursive',
+    'R': 'recursive'
+  });
+  if (!files)
+    common.error('no paths given');
+
+  if (typeof files === 'string')
+    files = [].slice.call(arguments, 1);
+  // if it's array leave it as it is
+
+  files = common.expand(files);
+
+  files.forEach(function(file) {
+    if (!fs.existsSync(file)) {
+      // Path does not exist, no force flag given
+      if (!options.force)
+        common.error('no such file or directory: '+file, true);
+
+      return; // skip file
+    }
+
+    // If here, path exists
+
+    var stats = fs.lstatSync(file);
+    if (stats.isFile() || stats.isSymbolicLink()) {
+
+      // Do not check for file writing permissions
+      if (options.force) {
+        common.unlinkSync(file);
+        return;
+      }
+
+      if (isWriteable(file))
+        common.unlinkSync(file);
+      else
+        common.error('permission denied: '+file, true);
+
+      return;
+    } // simple file
+
+    // Path is an existing directory, but no -r flag given
+    if (stats.isDirectory() && !options.recursive) {
+      common.error('path is a directory', true);
+      return; // skip path
+    }
+
+    // Recursively remove existing directory
+    if (stats.isDirectory() && options.recursive) {
+      rmdirSyncRecursive(file, options.force);
+    }
+  }); // forEach(file)
+} // rm
+module.exports = _rm;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/sed.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/sed.js b/test/cordova/node_modules/shelljs/src/sed.js
new file mode 100644
index 0000000..9783252
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/sed.js
@@ -0,0 +1,43 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### sed([options ,] search_regex, replace_str, file)
+//@ Available options:
+//@
+//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
+//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
+//@ ```
+//@
+//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input
+//@ using the given search regex and replacement string. Returns the new string after replacement.
+function _sed(options, regex, replacement, file) {
+  options = common.parseOptions(options, {
+    'i': 'inplace'
+  });
+
+  if (typeof replacement === 'string')
+    replacement = replacement; // no-op
+  else if (typeof replacement === 'number')
+    replacement = replacement.toString(); // fallback
+  else
+    common.error('invalid replacement string');
+
+  if (!file)
+    common.error('no file given');
+
+  if (!fs.existsSync(file))
+    common.error('no such file or directory: ' + file);
+
+  var result = fs.readFileSync(file, 'utf8').replace(regex, replacement);
+  if (options.inplace)
+    fs.writeFileSync(file, result, 'utf8');
+
+  return common.ShellString(result);
+}
+module.exports = _sed;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/tempdir.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/tempdir.js b/test/cordova/node_modules/shelljs/src/tempdir.js
new file mode 100644
index 0000000..45953c2
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/tempdir.js
@@ -0,0 +1,56 @@
+var common = require('./common');
+var os = require('os');
+var fs = require('fs');
+
+// Returns false if 'dir' is not a writeable directory, 'dir' otherwise
+function writeableDir(dir) {
+  if (!dir || !fs.existsSync(dir))
+    return false;
+
+  if (!fs.statSync(dir).isDirectory())
+    return false;
+
+  var testFile = dir+'/'+common.randomFileName();
+  try {
+    fs.writeFileSync(testFile, ' ');
+    common.unlinkSync(testFile);
+    return dir;
+  } catch (e) {
+    return false;
+  }
+}
+
+
+//@
+//@ ### tempdir()
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var tmp = tempdir(); // "/tmp" for most *nix platforms
+//@ ```
+//@
+//@ Searches and returns string containing a writeable, platform-dependent temporary directory.
+//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
+function _tempDir() {
+  var state = common.state;
+  if (state.tempDir)
+    return state.tempDir; // from cache
+
+  state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+
+                  writeableDir(process.env['TMPDIR']) ||
+                  writeableDir(process.env['TEMP']) ||
+                  writeableDir(process.env['TMP']) ||
+                  writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS
+                  writeableDir('C:\\TEMP') || // Windows
+                  writeableDir('C:\\TMP') || // Windows
+                  writeableDir('\\TEMP') || // Windows
+                  writeableDir('\\TMP') || // Windows
+                  writeableDir('/tmp') ||
+                  writeableDir('/var/tmp') ||
+                  writeableDir('/usr/tmp') ||
+                  writeableDir('.'); // last resort
+
+  return state.tempDir;
+}
+module.exports = _tempDir;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/test.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/test.js b/test/cordova/node_modules/shelljs/src/test.js
new file mode 100644
index 0000000..8a4ac7d
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/test.js
@@ -0,0 +1,85 @@
+var common = require('./common');
+var fs = require('fs');
+
+//@
+//@ ### test(expression)
+//@ Available expression primaries:
+//@
+//@ + `'-b', 'path'`: true if path is a block device
+//@ + `'-c', 'path'`: true if path is a character device
+//@ + `'-d', 'path'`: true if path is a directory
+//@ + `'-e', 'path'`: true if path exists
+//@ + `'-f', 'path'`: true if path is a regular file
+//@ + `'-L', 'path'`: true if path is a symboilc link
+//@ + `'-p', 'path'`: true if path is a pipe (FIFO)
+//@ + `'-S', 'path'`: true if path is a socket
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ if (test('-d', path)) { /* do something with dir */ };
+//@ if (!test('-f', path)) continue; // skip if it's a regular file
+//@ ```
+//@
+//@ Evaluates expression using the available primaries and returns corresponding value.
+function _test(options, path) {
+  if (!path)
+    common.error('no path given');
+
+  // hack - only works with unary primaries
+  options = common.parseOptions(options, {
+    'b': 'block',
+    'c': 'character',
+    'd': 'directory',
+    'e': 'exists',
+    'f': 'file',
+    'L': 'link',
+    'p': 'pipe',
+    'S': 'socket'
+  });
+
+  var canInterpret = false;
+  for (var key in options)
+    if (options[key] === true) {
+      canInterpret = true;
+      break;
+    }
+
+  if (!canInterpret)
+    common.error('could not interpret expression');
+
+  if (options.link) {
+    try {
+      return fs.lstatSync(path).isSymbolicLink();
+    } catch(e) {
+      return false;
+    }
+  }
+
+  if (!fs.existsSync(path))
+    return false;
+
+  if (options.exists)
+    return true;
+
+  var stats = fs.statSync(path);
+
+  if (options.block)
+    return stats.isBlockDevice();
+
+  if (options.character)
+    return stats.isCharacterDevice();
+
+  if (options.directory)
+    return stats.isDirectory();
+
+  if (options.file)
+    return stats.isFile();
+
+  if (options.pipe)
+    return stats.isFIFO();
+
+  if (options.socket)
+    return stats.isSocket();
+} // test
+module.exports = _test;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/to.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/to.js b/test/cordova/node_modules/shelljs/src/to.js
new file mode 100644
index 0000000..f029999
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/to.js
@@ -0,0 +1,29 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+//@
+//@ ### 'string'.to(file)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cat('input.txt').to('output.txt');
+//@ ```
+//@
+//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
+//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
+function _to(options, file) {
+  if (!file)
+    common.error('wrong arguments');
+
+  if (!fs.existsSync( path.dirname(file) ))
+      common.error('no such file or directory: ' + path.dirname(file));
+
+  try {
+    fs.writeFileSync(file, this.toString(), 'utf8');
+  } catch(e) {
+    common.error('could not write to file (code '+e.code+'): '+file, true);
+  }
+}
+module.exports = _to;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/toEnd.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/toEnd.js b/test/cordova/node_modules/shelljs/src/toEnd.js
new file mode 100644
index 0000000..f6d099d
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/toEnd.js
@@ -0,0 +1,29 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+//@
+//@ ### 'string'.toEnd(file)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ cat('input.txt').toEnd('output.txt');
+//@ ```
+//@
+//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
+//@ those returned by `cat`, `grep`, etc).
+function _toEnd(options, file) {
+  if (!file)
+    common.error('wrong arguments');
+
+  if (!fs.existsSync( path.dirname(file) ))
+      common.error('no such file or directory: ' + path.dirname(file));
+
+  try {
+    fs.appendFileSync(file, this.toString(), 'utf8');
+  } catch(e) {
+    common.error('could not append to file (code '+e.code+'): '+file, true);
+  }
+}
+module.exports = _toEnd;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/src/which.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/src/which.js b/test/cordova/node_modules/shelljs/src/which.js
new file mode 100644
index 0000000..fadb96c
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/src/which.js
@@ -0,0 +1,79 @@
+var common = require('./common');
+var fs = require('fs');
+var path = require('path');
+
+// Cross-platform method for splitting environment PATH variables
+function splitPath(p) {
+  for (i=1;i<2;i++) {}
+
+  if (!p)
+    return [];
+
+  if (common.platform === 'win')
+    return p.split(';');
+  else
+    return p.split(':');
+}
+
+//@
+//@ ### which(command)
+//@
+//@ Examples:
+//@
+//@ ```javascript
+//@ var nodeExec = which('node');
+//@ ```
+//@
+//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
+//@ Returns string containing the absolute path to the command.
+function _which(options, cmd) {
+  if (!cmd)
+    common.error('must specify command');
+
+  var pathEnv = process.env.path || process.env.Path || process.env.PATH,
+      pathArray = splitPath(pathEnv),
+      where = null;
+
+  // No relative/absolute paths provided?
+  if (cmd.search(/\//) === -1) {
+    // Search for command in PATH
+    pathArray.forEach(function(dir) {
+      if (where)
+        return; // already found it
+
+      var attempt = path.resolve(dir + '/' + cmd);
+      if (fs.existsSync(attempt)) {
+        where = attempt;
+        return;
+      }
+
+      if (common.platform === 'win') {
+        var baseAttempt = attempt;
+        attempt = baseAttempt + '.exe';
+        if (fs.existsSync(attempt)) {
+          where = attempt;
+          return;
+        }
+        attempt = baseAttempt + '.cmd';
+        if (fs.existsSync(attempt)) {
+          where = attempt;
+          return;
+        }
+        attempt = baseAttempt + '.bat';
+        if (fs.existsSync(attempt)) {
+          where = attempt;
+          return;
+        }
+      } // if 'win'
+    });
+  }
+
+  // Command not found anywhere?
+  if (!fs.existsSync(cmd) && !where)
+    return null;
+
+  where = where || path.resolve(cmd);
+
+  return common.ShellString(where);
+}
+module.exports = _which;

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/android.json
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/android.json b/test/cordova/plugins/android.json
new file mode 100644
index 0000000..b18aa36
--- /dev/null
+++ b/test/cordova/plugins/android.json
@@ -0,0 +1 @@
+{"prepare_queue":{"installed":[],"uninstalled":[]},"config_munge":{"res/xml/config.xml":{"/*":{"<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>":1}}},"installed_plugins":{"org.apache.cordova.device":{"PACKAGE_NAME":"org.apache.cordova.test"}},"dependent_plugins":{}}
\ No newline at end of file


[22/50] [abbrv] git commit: Add javadoc comments to source classes

Posted by bo...@apache.org.
Add javadoc comments to source classes


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/eb0aa970
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/eb0aa970
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/eb0aa970

Branch: refs/heads/master
Commit: eb0aa970c07b59c608a299c54d4d8f04a7063e06
Parents: 20ee58f
Author: Marcel Kinard <cm...@gmail.com>
Authored: Fri Nov 22 17:37:20 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:17 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaChromeClient.java      |  8 ++++++++
 framework/src/org/apache/cordova/CordovaWebView.java     | 11 ++++++++++-
 .../src/org/apache/cordova/CordovaWebViewClient.java     |  9 +++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/eb0aa970/framework/src/org/apache/cordova/CordovaChromeClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaChromeClient.java b/framework/src/org/apache/cordova/CordovaChromeClient.java
index bc31c66..1ed1a3d 100755
--- a/framework/src/org/apache/cordova/CordovaChromeClient.java
+++ b/framework/src/org/apache/cordova/CordovaChromeClient.java
@@ -49,6 +49,14 @@ import android.widget.RelativeLayout;
 
 /**
  * This class is the AmazonWebChromeClient that implements callbacks for our web view.
+ * The kind of callbacks that happen here are on the chrome outside the document,
+ * such as onCreateWindow(), onConsoleMessage(), onProgressChanged(), etc. Related
+ * to but different than CordovaWebViewClient.
+ *
+ * @see <a href="http://developer.android.com/reference/android/webkit/WebChromeClient.html">WebChromeClient</a>
+ * @see <a href="http://developer.android.com/guide/webapps/webview.html">WebView guide</a>
+ * @see CordovaWebViewClient
+ * @see CordovaWebView
  */
 public class CordovaChromeClient extends AmazonWebChromeClient {
 

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/eb0aa970/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 200e7fe..00eb6d7 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -60,6 +60,13 @@ import com.amazon.android.webkit.AmazonWebKitFactory;
 import android.widget.FrameLayout;
 
 public class CordovaWebView extends AmazonWebView {
+/*
+ * This class is our web view.
+ *
+ * @see <a href="http://developer.android.com/guide/webapps/webview.html">WebView guide</a>
+ * @see <a href="http://developer.android.com/reference/android/webkit/WebView.html">WebView</a>
+ */
+
 
     public static final String TAG = "CordovaWebView";
     public static final String CORDOVA_VERSION = "3.3.0-dev";
@@ -267,7 +274,9 @@ public class CordovaWebView extends AmazonWebView {
         this.setup();
     }
 
-
+    /**
+     * set the WebViewClient, but provide special case handling for IceCreamSandwich.
+     */
     private void initWebViewClient(CordovaInterface cordova) {
         if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB ||
                 android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/eb0aa970/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index 00ce660..b2abd85 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -45,6 +45,15 @@ import com.amazon.android.webkit.AmazonWebViewClient;
 
 /**
  * This class is the AmazonWebViewClient that implements callbacks for our web view.
+ * The kind of callbacks that happen here are regarding the rendering of the
+ * document instead of the chrome surrounding it, such as onPageStarted(), 
+ * shouldOverrideUrlLoading(), etc. Related to but different than
+ * CordovaChromeClient.
+ *
+ * @see <a href="http://developer.android.com/reference/android/webkit/WebViewClient.html">WebViewClient</a>
+ * @see <a href="http://developer.android.com/guide/webapps/webview.html">WebView guide</a>
+ * @see CordovaChromeClient
+ * @see CordovaWebView
  */
 public class CordovaWebViewClient extends AmazonWebViewClient {
 


[16/50] [abbrv] git commit: CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
CB-5302: Massive movement to get tests working again


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/f768066d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/f768066d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/f768066d

Branch: refs/heads/master
Commit: f768066d343a98b55eab5f0703a01592fd3b7ef9
Parents: 6c0fb15
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Nov 6 15:04:47 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:15 2014 -0800

----------------------------------------------------------------------
 test/.classpath                                 |    1 +
 test/AndroidManifest.xml                        |   40 +-
 test/assets/www/cordova_plugins.js              |   11 +
 test/assets/www/index.html                      |   34 +-
 .../org.apache.cordova.device/www/device.js     |   78 +
 test/cordova/android_sdk_version                |   29 +
 test/cordova/build                              |   37 +
 test/cordova/build.bat                          |   26 +
 test/cordova/check_reqs                         |   28 +
 test/cordova/clean                              |   36 +
 test/cordova/clean.bat                          |   26 +
 test/cordova/lib/android_sdk_version.js         |   65 +
 test/cordova/lib/appinfo.js                     |   41 +
 test/cordova/lib/build.js                       |   87 +
 test/cordova/lib/check_reqs.js                  |   94 +
 test/cordova/lib/clean.js                       |   38 +
 test/cordova/lib/device.js                      |   86 +
 test/cordova/lib/emulator.js                    |  330 +++
 test/cordova/lib/exec.js                        |   43 +
 test/cordova/lib/install-device                 |   42 +
 test/cordova/lib/install-device.bat             |   26 +
 test/cordova/lib/install-emulator               |   38 +
 test/cordova/lib/install-emulator.bat           |   26 +
 test/cordova/lib/list-devices                   |   33 +
 test/cordova/lib/list-devices.bat               |   26 +
 test/cordova/lib/list-emulator-images           |   32 +
 test/cordova/lib/list-emulator-images.bat       |   26 +
 test/cordova/lib/list-started-emulators         |   32 +
 test/cordova/lib/list-started-emulators.bat     |   26 +
 test/cordova/lib/log.js                         |   57 +
 test/cordova/lib/run.js                         |  139 +
 test/cordova/lib/start-emulator                 |   39 +
 test/cordova/lib/start-emulator.bat             |   26 +
 test/cordova/log                                |   36 +
 test/cordova/log.bat                            |   26 +
 test/cordova/node_modules/.bin/shjs             |    1 +
 test/cordova/node_modules/q/CONTRIBUTING.md     |   40 +
 test/cordova/node_modules/q/LICENSE             |   19 +
 test/cordova/node_modules/q/README.md           |  813 ++++++
 .../q/benchmark/compare-with-callbacks.js       |   71 +
 .../node_modules/q/benchmark/scenarios.js       |   36 +
 test/cordova/node_modules/q/package.json        |   93 +
 test/cordova/node_modules/q/q.js                | 1937 ++++++++++++++
 test/cordova/node_modules/q/queue.js            |   35 +
 .../node_modules/shelljs/.documentup.json       |    6 +
 test/cordova/node_modules/shelljs/.jshintrc     |    7 +
 test/cordova/node_modules/shelljs/.npmignore    |    2 +
 test/cordova/node_modules/shelljs/.travis.yml   |    5 +
 test/cordova/node_modules/shelljs/LICENSE       |   26 +
 test/cordova/node_modules/shelljs/README.md     |  552 ++++
 test/cordova/node_modules/shelljs/bin/shjs      |   51 +
 test/cordova/node_modules/shelljs/global.js     |    3 +
 test/cordova/node_modules/shelljs/make.js       |   47 +
 test/cordova/node_modules/shelljs/package.json  |   48 +
 .../shelljs/scripts/generate-docs.js            |   21 +
 .../node_modules/shelljs/scripts/run-tests.js   |   50 +
 test/cordova/node_modules/shelljs/shell.js      |  153 ++
 test/cordova/node_modules/shelljs/src/cat.js    |   43 +
 test/cordova/node_modules/shelljs/src/cd.js     |   19 +
 test/cordova/node_modules/shelljs/src/chmod.js  |  208 ++
 test/cordova/node_modules/shelljs/src/common.js |  189 ++
 test/cordova/node_modules/shelljs/src/cp.js     |  200 ++
 test/cordova/node_modules/shelljs/src/dirs.js   |  191 ++
 test/cordova/node_modules/shelljs/src/echo.js   |   20 +
 test/cordova/node_modules/shelljs/src/error.js  |   10 +
 test/cordova/node_modules/shelljs/src/exec.js   |  181 ++
 test/cordova/node_modules/shelljs/src/find.js   |   51 +
 test/cordova/node_modules/shelljs/src/grep.js   |   52 +
 test/cordova/node_modules/shelljs/src/ls.js     |  126 +
 test/cordova/node_modules/shelljs/src/mkdir.js  |   68 +
 test/cordova/node_modules/shelljs/src/mv.js     |   80 +
 test/cordova/node_modules/shelljs/src/popd.js   |    1 +
 test/cordova/node_modules/shelljs/src/pushd.js  |    1 +
 test/cordova/node_modules/shelljs/src/pwd.js    |   11 +
 test/cordova/node_modules/shelljs/src/rm.js     |  145 +
 test/cordova/node_modules/shelljs/src/sed.js    |   43 +
 .../cordova/node_modules/shelljs/src/tempdir.js |   56 +
 test/cordova/node_modules/shelljs/src/test.js   |   85 +
 test/cordova/node_modules/shelljs/src/to.js     |   29 +
 test/cordova/node_modules/shelljs/src/toEnd.js  |   29 +
 test/cordova/node_modules/shelljs/src/which.js  |   79 +
 test/cordova/plugins/android.json               |    1 +
 .../org.apache.cordova.device/.fetch.json       |    1 +
 .../plugins/org.apache.cordova.device/LICENSE   |  202 ++
 .../plugins/org.apache.cordova.device/README.md |    5 +
 .../org.apache.cordova.device/RELEASENOTES.md   |   40 +
 .../docs/device.cordova.md                      |   80 +
 .../org.apache.cordova.device/docs/device.md    |  104 +
 .../docs/device.model.md                        |  106 +
 .../docs/device.name.md                         |  108 +
 .../docs/device.platform.md                     |   99 +
 .../docs/device.uuid.md                         |  115 +
 .../docs/device.version.md                      |   86 +
 .../org.apache.cordova.device/plugin.xml        |  103 +
 .../src/android/Device.java                     |  200 ++
 .../src/blackberry10/index.js                   |   69 +
 .../src/firefoxos/DeviceProxy.js                |   39 +
 .../src/ios/CDVDevice.h                         |   30 +
 .../src/ios/CDVDevice.m                         |   90 +
 .../src/windows8/DeviceProxy.js                 |   50 +
 .../org.apache.cordova.device/src/wp/Device.cs  |  135 +
 .../test/autotest/html/HtmlReporter.js          |  101 +
 .../test/autotest/html/HtmlReporterHelpers.js   |   60 +
 .../test/autotest/html/ReporterView.js          |  164 ++
 .../test/autotest/html/SpecView.js              |   79 +
 .../test/autotest/html/SuiteView.js             |   22 +
 .../test/autotest/html/TrivialReporter.js       |  192 ++
 .../test/autotest/index.html                    |   59 +
 .../test/autotest/jasmine.css                   |   81 +
 .../test/autotest/jasmine.js                    | 2530 ++++++++++++++++++
 .../test/autotest/pages/device.html             |   71 +
 .../test/autotest/test-runner.js                |   62 +
 .../test/autotest/tests/device.tests.js         |   64 +
 .../test/cordova-incl.js                        |   85 +
 .../org.apache.cordova.device/test/index.html   |   66 +
 .../org.apache.cordova.device/test/main.js      |  163 ++
 .../org.apache.cordova.device/test/master.css   |  164 ++
 .../org.apache.cordova.device/www/device.js     |   77 +
 test/cordova/run                                |   37 +
 test/cordova/run.bat                            |   26 +
 test/cordova/version                            |   25 +
 test/cordova/version.bat                        |   26 +
 test/res/xml/config.xml                         |   46 +-
 test/src/org/apache/cordova/device/Device.java  |  200 ++
 .../cordova/test/BackButtonMultiPageTest.java   |  170 --
 .../apache/cordova/test/CordovaActivity.java    |   33 +
 .../cordova/test/CordovaActivityTest.java       |   96 -
 .../cordova/test/CordovaDriverAction.java       |   87 +
 .../cordova/test/CordovaResourceApiTest.java    |  281 --
 .../org/apache/cordova/test/CordovaTest.java    |  115 -
 .../test/CordovaWebViewTestActivity.java        |  112 +
 .../org/apache/cordova/test/ErrorUrlTest.java   |   79 -
 .../src/org/apache/cordova/test/FixWebView.java |   44 -
 .../org/apache/cordova/test/GapClientTest.java  |   68 -
 .../apache/cordova/test/HtmlNotFoundTest.java   |   76 -
 .../src/org/apache/cordova/test/IFrameTest.java |   94 -
 .../org/apache/cordova/test/LifecycleTest.java  |   34 -
 test/src/org/apache/cordova/test/MenuTest.java  |   32 -
 .../apache/cordova/test/PluginManagerTest.java  |   70 -
 .../apache/cordova/test/SplashscreenTest.java   |   49 -
 .../apache/cordova/test/UserWebViewTest.java    |   76 -
 test/src/org/apache/cordova/test/XhrTest.java   |   34 -
 .../cordova/test/actions/CordovaActivity.java   |   33 -
 .../test/actions/CordovaDriverAction.java       |   87 -
 .../actions/CordovaWebViewTestActivity.java     |  112 -
 .../test/actions/backbuttonmultipage.java       |   31 -
 .../apache/cordova/test/actions/background.java |   33 -
 .../cordova/test/actions/backgroundcolor.java   |   40 -
 .../apache/cordova/test/actions/basicauth.java  |   44 -
 .../apache/cordova/test/actions/errorurl.java   |   33 -
 .../apache/cordova/test/actions/fullscreen.java |   39 -
 .../cordova/test/actions/htmlnotfound.java      |   31 -
 .../org/apache/cordova/test/actions/iframe.java |   30 -
 .../apache/cordova/test/actions/lifecycle.java  |   30 -
 .../apache/cordova/test/actions/loading.java    |   31 -
 .../org/apache/cordova/test/actions/menus.java  |   80 -
 .../cordova/test/actions/splashscreen.java      |   37 -
 .../org/apache/cordova/test/actions/tests.java  |   32 -
 .../apache/cordova/test/actions/timeout.java    |   34 -
 .../cordova/test/actions/userwebview.java       |   76 -
 .../apache/cordova/test/actions/whitelist.java  |   51 -
 .../org/apache/cordova/test/actions/xhr.java    |   30 -
 .../cordova/test/backbuttonmultipage.java       |   31 +
 .../src/org/apache/cordova/test/background.java |   33 +
 .../apache/cordova/test/backgroundcolor.java    |   40 +
 test/src/org/apache/cordova/test/basicauth.java |   44 +
 test/src/org/apache/cordova/test/errorurl.java  |   33 +
 .../src/org/apache/cordova/test/fullscreen.java |   39 +
 .../org/apache/cordova/test/htmlnotfound.java   |   31 +
 test/src/org/apache/cordova/test/iframe.java    |   30 +
 .../test/junit/BackButtonMultiPageTest.java     |  170 ++
 .../cordova/test/junit/CordovaActivityTest.java |   96 +
 .../test/junit/CordovaResourceApiTest.java      |  282 ++
 .../apache/cordova/test/junit/CordovaTest.java  |  116 +
 .../apache/cordova/test/junit/ErrorUrlTest.java |   79 +
 .../apache/cordova/test/junit/FixWebView.java   |   44 +
 .../cordova/test/junit/GapClientTest.java       |   68 +
 .../cordova/test/junit/HtmlNotFoundTest.java    |   76 +
 .../apache/cordova/test/junit/IFrameTest.java   |   94 +
 .../cordova/test/junit/LifecycleTest.java       |   34 +
 .../org/apache/cordova/test/junit/MenuTest.java |   32 +
 .../cordova/test/junit/PluginManagerTest.java   |   70 +
 .../cordova/test/junit/SplashscreenTest.java    |   49 +
 .../cordova/test/junit/UserWebViewTest.java     |   76 +
 .../org/apache/cordova/test/junit/XhrTest.java  |   34 +
 test/src/org/apache/cordova/test/lifecycle.java |   30 +
 test/src/org/apache/cordova/test/loading.java   |   31 +
 test/src/org/apache/cordova/test/menus.java     |   80 +
 .../org/apache/cordova/test/splashscreen.java   |   37 +
 test/src/org/apache/cordova/test/tests.java     |   32 +
 test/src/org/apache/cordova/test/timeout.java   |   34 +
 .../org/apache/cordova/test/userwebview.java    |   76 +
 test/src/org/apache/cordova/test/whitelist.java |   51 +
 test/src/org/apache/cordova/test/xhr.java       |   30 +
 194 files changed, 15916 insertions(+), 2306 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/.classpath
----------------------------------------------------------------------
diff --git a/test/.classpath b/test/.classpath
index a4763d1..bb0c759 100644
--- a/test/.classpath
+++ b/test/.classpath
@@ -4,5 +4,6 @@
 	<classpathentry kind="src" path="gen"/>
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
 	<classpathentry kind="output" path="bin/classes"/>
 </classpath>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/test/AndroidManifest.xml b/test/AndroidManifest.xml
index ee778ae..0ac3520 100755
--- a/test/AndroidManifest.xml
+++ b/test/AndroidManifest.xml
@@ -60,7 +60,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.CordovaWebViewTestActivity" >
+            android:name="org.apache.cordova.test.CordovaWebViewTestActivity" >
             <intent-filter >
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
@@ -70,7 +70,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.background" >
+            android:name="org.apache.cordova.test.background" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -80,7 +80,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.backgroundcolor" >
+            android:name="org.apache.cordova.test.backgroundcolor" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -90,7 +90,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.basicauth" >
+            android:name="org.apache.cordova.test.basicauth" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -100,7 +100,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.CordovaActivity" >
+            android:name="org.apache.cordova.test.CordovaActivity" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -110,7 +110,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.CordovaDriverAction" >
+            android:name="org.apache.cordova.test.CordovaDriverAction" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -120,7 +120,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.errorurl" >
+            android:name="org.apache.cordova.test.errorurl" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -130,7 +130,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.fullscreen" >
+            android:name="org.apache.cordova.test.fullscreen" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -140,7 +140,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.htmlnotfound" >
+            android:name="org.apache.cordova.test.htmlnotfound" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -150,7 +150,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.iframe" >
+            android:name="org.apache.cordova.test.iframe" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -160,7 +160,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.lifecycle" >
+            android:name="org.apache.cordova.test.lifecycle" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -170,7 +170,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.loading" >
+            android:name="org.apache.cordova.test.loading" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -180,7 +180,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.menus" >
+            android:name="org.apache.cordova.test.menus" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -190,7 +190,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.splashscreen" >
+            android:name="org.apache.cordova.test.splashscreen" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -200,7 +200,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.tests" >
+            android:name="org.apache.cordova.test.tests" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -210,7 +210,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.timeout" >
+            android:name="org.apache.cordova.test.timeout" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -220,7 +220,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.userwebview" >
+            android:name="org.apache.cordova.test.userwebview" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -230,7 +230,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.whitelist" >
+            android:name="org.apache.cordova.test.whitelist" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -240,7 +240,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.xhr" >
+            android:name="org.apache.cordova.test.xhr" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />
@@ -250,7 +250,7 @@
             android:windowSoftInputMode="adjustPan"
             android:label="@string/app_name" 
             android:configChanges="orientation|keyboardHidden"
-            android:name=".actions.backbuttonmultipage" >
+            android:name="org.apache.cordova.test.backbuttonmultipage" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.SAMPLE_CODE" />

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/assets/www/cordova_plugins.js
----------------------------------------------------------------------
diff --git a/test/assets/www/cordova_plugins.js b/test/assets/www/cordova_plugins.js
new file mode 100644
index 0000000..f23dd64
--- /dev/null
+++ b/test/assets/www/cordova_plugins.js
@@ -0,0 +1,11 @@
+cordova.define('cordova/plugin_list', function(require, exports, module) {
+module.exports = [
+    {
+        "file": "plugins/org.apache.cordova.device/www/device.js",
+        "id": "org.apache.cordova.device.device",
+        "clobbers": [
+            "device"
+        ]
+    }
+]
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/assets/www/index.html
----------------------------------------------------------------------
diff --git a/test/assets/www/index.html b/test/assets/www/index.html
index 13f0825..590b593 100755
--- a/test/assets/www/index.html
+++ b/test/assets/www/index.html
@@ -47,22 +47,22 @@
     <div id="info">
         <h4>Run each of the test activities below:</h4>
     </div>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.jqmtabbackbutton');">Backbutton jQM tab</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.backbuttonmultipage');">Backbutton with multiple pages</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.backgroundcolor');">Background Color</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.basicauth');">Basic Authentication</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.errorurl');">Error URL</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.fullscreen');">Full Screen</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.htmlnotfound');">HTML not found</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.iframe');">IFrame</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.lifecycle');">Lifecycle</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.loading');">Loading indicator</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.menus');">Menus</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.background');">No multitasking</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.splashscreen');">Splash screen</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.timeout');">Load timeout</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.userwebview');">User WebView/Client/Chrome</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.whitelist');">Whitelist</button>
-    <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.xhr');">XHR</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.jqmtabbackbutton');">Backbutton jQM tab</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.backbuttonmultipage');">Backbutton with multiple pages</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.backgroundcolor');">Background Color</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.basicauth');">Basic Authentication</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.errorurl');">Error URL</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.fullscreen');">Full Screen</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.htmlnotfound');">HTML not found</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.iframe');">IFrame</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.lifecycle');">Lifecycle</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.loading');">Loading indicator</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.menus');">Menus</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.background');">No multitasking</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.splashscreen');">Splash screen</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.timeout');">Load timeout</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.userwebview');">User WebView/Client/Chrome</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.whitelist');">Whitelist</button>
+    <button class="btn large" onclick="startActivity('org.apache.cordova.test.xhr');">XHR</button>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/assets/www/plugins/org.apache.cordova.device/www/device.js
----------------------------------------------------------------------
diff --git a/test/assets/www/plugins/org.apache.cordova.device/www/device.js b/test/assets/www/plugins/org.apache.cordova.device/www/device.js
new file mode 100644
index 0000000..c0697f6
--- /dev/null
+++ b/test/assets/www/plugins/org.apache.cordova.device/www/device.js
@@ -0,0 +1,78 @@
+cordova.define("org.apache.cordova.device.device", function(require, exports, module) {/*
+ *
+ * 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'),
+    channel = require('cordova/channel'),
+    utils = require('cordova/utils'),
+    exec = require('cordova/exec'),
+    cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device() {
+    this.available = false;
+    this.platform = null;
+    this.version = null;
+    this.uuid = null;
+    this.cordova = null;
+    this.model = null;
+
+    var me = this;
+
+    channel.onCordovaReady.subscribe(function() {
+        me.getInfo(function(info) {
+            //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+            //TODO: CB-5105 native implementations should not return info.cordova
+            var buildLabel = cordova.version;
+            me.available = true;
+            me.platform = info.platform;
+            me.version = info.version;
+            me.uuid = info.uuid;
+            me.cordova = buildLabel;
+            me.model = info.model;
+            channel.onCordovaInfoReady.fire();
+        },function(e) {
+            me.available = false;
+            utils.alert("[ERROR] Error initializing Cordova: " + e);
+        });
+    });
+}
+
+/**
+ * Get device info
+ *
+ * @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. (OPTIONAL)
+ */
+Device.prototype.getInfo = function(successCallback, errorCallback) {
+    argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+    exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
+};
+
+module.exports = new Device();
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/android_sdk_version
----------------------------------------------------------------------
diff --git a/test/cordova/android_sdk_version b/test/cordova/android_sdk_version
new file mode 100755
index 0000000..547f41b
--- /dev/null
+++ b/test/cordova/android_sdk_version
@@ -0,0 +1,29 @@
+#!/usr/bin/env node
+
+/*
+       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 android_sdk_version = require('./lib/android_sdk_version');
+
+android_sdk_version.run().done(null, function(err) {
+    console.log(err);
+    process.exit(2);
+});
+
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/build
----------------------------------------------------------------------
diff --git a/test/cordova/build b/test/cordova/build
new file mode 100755
index 0000000..a38f3b6
--- /dev/null
+++ b/test/cordova/build
@@ -0,0 +1,37 @@
+#!/usr/bin/env node
+
+/*
+       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 build = require('./lib/build'),
+    reqs  = require('./lib/check_reqs'),
+    args  = process.argv;
+
+// Support basic help commands
+if(args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
+                    args[2] == 'help' || args[2] == '-help' || args[2] == '/help') {
+    build.help();
+} else {
+    reqs.run().then(function() {
+        return build.run(args[2]);
+    }).done(null, function(err) {
+        console.error(err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/build.bat
----------------------------------------------------------------------
diff --git a/test/cordova/build.bat b/test/cordova/build.bat
new file mode 100644
index 0000000..2f317e3
--- /dev/null
+++ b/test/cordova/build.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0build"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/check_reqs
----------------------------------------------------------------------
diff --git a/test/cordova/check_reqs b/test/cordova/check_reqs
new file mode 100755
index 0000000..2ac8752
--- /dev/null
+++ b/test/cordova/check_reqs
@@ -0,0 +1,28 @@
+#!/usr/bin/env node
+
+/*
+       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 check_reqs = require('./lib/check_reqs');
+
+check_reqs.run().done(null, function(err) {
+    console.log(err);
+    process.exit(2);
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/clean
----------------------------------------------------------------------
diff --git a/test/cordova/clean b/test/cordova/clean
new file mode 100755
index 0000000..4e0808b
--- /dev/null
+++ b/test/cordova/clean
@@ -0,0 +1,36 @@
+#!/usr/bin/env node
+
+/*
+       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 clean = require('./lib/clean'),
+    reqs  = require('./lib/check_reqs'),
+    args  = process.argv;
+
+// Usage support for when args are given
+if(args.length > 2) {
+    clean.help();
+} else {
+    reqs.run().done(function() {
+        return clean.run();
+    }, function(err) {
+        console.error('ERROR: ' + err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/test/cordova/clean.bat b/test/cordova/clean.bat
new file mode 100644
index 0000000..fa1f669
--- /dev/null
+++ b/test/cordova/clean.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0clean"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/android_sdk_version.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/android_sdk_version.js b/test/cordova/lib/android_sdk_version.js
new file mode 100755
index 0000000..d03e1e7
--- /dev/null
+++ b/test/cordova/lib/android_sdk_version.js
@@ -0,0 +1,65 @@
+#!/usr/bin/env node
+
+/*
+       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 shell = require('shelljs'),
+    child_process = require('child_process'),
+    Q     = require('q');
+
+get_highest_sdk = function(results){
+    var reg = /\d+/;
+    var apiLevels = [];
+    for(var i=0;i<results.length;i++){
+        apiLevels[i] = parseInt(results[i].match(reg)[0]);
+    }
+    apiLevels.sort(function(a,b){return b-a});
+    console.log(apiLevels[0]);
+}
+
+get_sdks = function() {
+    var d = Q.defer();
+    child_process.exec('android list targets', function(err, stdout, stderr) {
+        if (err) d.reject(stderr);
+        else d.resolve(stdout);
+    });
+
+    return d.promise.then(function(output) {
+        var reg = /android-\d+/gi;
+        var results = output.match(reg);
+        if(results.length===0){
+            return Q.reject(new Error('No android sdks installed.'));
+        }else{
+            get_highest_sdk(results);
+        }
+
+        return Q();
+    }, function(stderr) {
+        if (stderr.match(/command\snot\sfound/)) {
+            return Q.reject(new Error('The command \"android\" failed. Make sure you have the latest Android SDK installed, and the \"android\" command (inside the tools/ folder) is added to your path.'));
+        } else {
+            return Q.reject(new Error('An error occurred while listing Android targets'));
+        }
+    });
+}
+
+module.exports.run = function() {
+    return Q.all([get_sdks()]);
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/appinfo.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/appinfo.js b/test/cordova/lib/appinfo.js
new file mode 100644
index 0000000..1f8ebe2
--- /dev/null
+++ b/test/cordova/lib/appinfo.js
@@ -0,0 +1,41 @@
+#!/usr/bin/env node
+
+/*
+       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 path = require('path');
+var fs = require('fs');
+var cachedAppInfo = null;
+
+function readAppInfoFromManifest() {
+    var manifestPath = path.join(__dirname, '..', '..', 'AndroidManifest.xml');
+    var manifestData = fs.readFileSync(manifestPath, {encoding:'utf8'});
+    var packageName = /\bpackage\s*=\s*"(.+?)"/.exec(manifestData);
+    if (!packageName) throw new Error('Could not find package name within ' + manifestPath);
+    var activityTag = /<activity\b[\s\S]*<\/activity>/.exec(manifestData);
+    if (!activityTag) throw new Error('Could not find <activity> within ' + manifestPath);
+    var activityName = /\bandroid:name\s*=\s*"(.+?)"/.exec(activityTag);
+    if (!activityName) throw new Error('Could not find android:name within ' + manifestPath);
+
+    return packageName[1] + '/.' + activityName[1];
+}
+
+exports.getActivityName = function() {
+    return cachedAppInfo = cachedAppInfo || readAppInfoFromManifest();
+};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/build.js b/test/cordova/lib/build.js
new file mode 100644
index 0000000..e57e26b
--- /dev/null
+++ b/test/cordova/lib/build.js
@@ -0,0 +1,87 @@
+#!/usr/bin/env node
+
+/*
+       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 shell   = require('shelljs'),
+    exec    = require('./exec'),
+    Q       = require('q'),
+    clean   = require('./clean'),
+    path    = require('path'),
+    fs      = require('fs'),
+    ROOT    = path.join(__dirname, '..', '..');
+
+/*
+ * Builds the project with ant.
+ * Returns a promise.
+ */
+module.exports.run = function(build_type) {
+    //default build type
+    build_type = typeof build_type !== 'undefined' ? build_type : "--debug";
+    var cmd;
+    switch(build_type) {
+        case '--debug' :
+            cmd = 'ant debug -f ' + path.join(ROOT, 'build.xml');
+            break;
+        case '--release' :
+            cmd = 'ant release -f ' + path.join(ROOT, 'build.xml');
+            break;
+        case '--nobuild' :
+            console.log('Skipping build...');
+            return Q();
+        default :
+            return Q.reject('Build option \'' + build_type + '\' not recognized.');
+    }
+    if(cmd) {
+        return clean.run() // TODO: Can we stop cleaning every time and let ant build incrementally?
+        .then(function() {
+            return exec(cmd);
+        });
+    }
+    return Q();
+}
+
+/*
+ * Gets the path to the apk file, if not such file exists then
+ * the script will error out. (should we error or just return undefined?)
+ */
+module.exports.get_apk = function() {
+    if(fs.existsSync(path.join(ROOT, 'bin'))) {
+        var bin_files = fs.readdirSync(path.join(ROOT, 'bin'));
+        for (file in bin_files) {
+            if(path.extname(bin_files[file]) == '.apk') {
+                return path.join(ROOT, 'bin', bin_files[file]);
+            }
+        }
+        console.error('ERROR : No .apk found in \'bin\' folder');
+        process.exit(2);
+    } else {
+        console.error('ERROR : unable to find project bin folder, could not locate .apk');
+        process.exit(2);
+    }
+}
+
+module.exports.help = function() {
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'corodva', 'build')) + ' [build_type]');
+    console.log('Build Types : ');
+    console.log('    \'--debug\': Default build, will build project in using ant debug');
+    console.log('    \'--release\': will build project using ant release');
+    console.log('    \'--nobuild\': will skip build process (can be used with run command)');
+    process.exit(0);
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/check_reqs.js b/test/cordova/lib/check_reqs.js
new file mode 100644
index 0000000..f4def79
--- /dev/null
+++ b/test/cordova/lib/check_reqs.js
@@ -0,0 +1,94 @@
+#!/usr/bin/env node
+
+/*
+       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 shell = require('shelljs'),
+    child_process = require('child_process'),
+    Q     = require('q'),
+    path  = require('path'),
+    fs    = require('fs'),
+    ROOT  = path.join(__dirname, '..', '..');
+
+// Get valid target from framework/project.properties
+module.exports.get_target = function() {
+    if(fs.existsSync(path.join(ROOT, 'framework', 'project.properties'))) {
+        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'framework', 'project.properties'));
+        return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
+    } else if (fs.existsSync(path.join(ROOT, 'project.properties'))) {
+        // if no target found, we're probably in a project and project.properties is in ROOT.
+        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties'));
+        return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
+    }
+}
+
+// Returns a promise.
+module.exports.check_ant = function() {
+    var d = Q.defer();
+    child_process.exec('ant -version', function(err, stdout, stderr) {
+        if (err) d.reject(new Error('ERROR : executing command \'ant\', make sure you have ant installed and added to your path.'));
+        else d.resolve();
+    });
+    return d.promise;
+}
+
+// Returns a promise.
+module.exports.check_java = function() {
+    if(process.env.JAVA_HOME) {
+        var d = Q.defer();
+        child_process.exec('java -version', function(err, stdout, stderr) {
+            if(err) d.reject(new Error('ERROR : executing command \'java\', make sure you java environment is set up. Including your JDK and JRE.' + err));
+            else d.resolve();
+        });
+        return d.promise;
+    } else {
+        return Q.reject(new Error('ERROR : Make sure JAVA_HOME is set, as well as paths to your JDK and JRE for java.'));
+    }
+}
+
+// Returns a promise.
+module.exports.check_android = function() {
+    var valid_target = this.get_target();
+    var d = Q.defer();
+    child_process.exec('android list targets', function(err, stdout, stderr) {
+        if (err) d.reject(stderr);
+        else d.resolve(stdout);
+    });
+
+    return d.promise.then(function(output) {
+        if (!output.match(valid_target)) {
+            return Q.reject(new Error('Please install Android target ' + valid_target.split('-')[1] + ' (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run \"android\" from your command-line to install/update any missing SDKs or tools.'));
+        }
+        return Q();
+    }, function(stderr) {
+        if (stderr.match(/command\snot\sfound/)) {
+            return Q.reject(new Error('The command \"android\" failed. Make sure you have the latest Android SDK installed, and the \"android\" command (inside the tools/ folder) is added to your path.'));
+        } else {
+            return Q.reject(new Error('An error occurred while listing Android targets'));
+        }
+    });
+}
+
+// Returns a promise.
+module.exports.run = function() {
+    return Q.all([this.check_ant(), this.check_java(), this.check_android()]).then(function() {
+        console.log('Looks like your environment fully supports cordova-android development!');
+    });
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/clean.js b/test/cordova/lib/clean.js
new file mode 100644
index 0000000..0f955f6
--- /dev/null
+++ b/test/cordova/lib/clean.js
@@ -0,0 +1,38 @@
+#!/usr/bin/env node
+
+/*
+       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('./exec'),
+    path  = require('path'),
+    ROOT = path.join(__dirname, '..', '..');
+
+/*
+ * Cleans the project using ant
+ * Returns a promise.
+ */
+module.exports.run = function() {
+    return exec('ant clean -f ' + path.join(ROOT, 'build.xml'));
+}
+
+module.exports.help = function() {
+    console.log('Usage: ' + path.relative(process.cwd(), process.argv[1]));
+    console.log('Cleans the project directory.');
+    process.exit(0);
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/device.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/device.js b/test/cordova/lib/device.js
new file mode 100644
index 0000000..df2a33c
--- /dev/null
+++ b/test/cordova/lib/device.js
@@ -0,0 +1,86 @@
+#!/usr/bin/env node
+
+/*
+       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('./exec'),
+    Q     = require('q'),
+    path  = require('path'),
+    build = require('./build'),
+    appinfo = require('./appinfo'),
+    ROOT = path.join(__dirname, '..', '..');
+
+/**
+ * Returns a promise for the list of the device ID's found
+ */
+module.exports.list = function() {
+    return exec('adb devices')
+    .then(function(output) {
+        var response = output.split('\n');
+        var device_list = [];
+        for (var i = 1; i < response.length; i++) {
+            if (response[i].match(/\w+\tdevice/) && !response[i].match(/emulator/)) {
+                device_list.push(response[i].replace(/\tdevice/, '').replace('\r', ''));
+            }
+        }
+        return device_list;
+    });
+}
+
+/*
+ * Installs a previously built application on the device
+ * and launches it.
+ * Returns a promise.
+ */
+module.exports.install = function(target) {
+    var launchName;
+    return this.list()
+    .then(function(device_list) {
+        if (!device_list || !device_list.length)
+            return Q.reject('ERROR: Failed to deploy to device, no devices found.');
+
+        // default device
+        target = typeof target !== 'undefined' ? target : device_list[0];
+
+        if (device_list.indexOf(target) < 0)
+            return Q.reject('ERROR: Unable to find target \'' + target + '\'.');
+
+        var apk_path = build.get_apk();
+        launchName = appinfo.getActivityName();
+        console.log('Installing app on device...');
+        var cmd = 'adb -s ' + target + ' install -r ' + apk_path;
+        return exec(cmd);
+    }).then(function(output) {
+        if (output.match(/Failure/)) return Q.reject('ERROR: Failed to install apk to device: ' + output);
+
+        //unlock screen
+        var cmd = 'adb -s ' + target + ' shell input keyevent 82';
+        return exec(cmd);
+    }, function(err) { return Q.reject('ERROR: Failed to install apk to device: ' + err); })
+    .then(function() {
+        // launch the application
+        console.log('Launching application...');
+        var cmd = 'adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launchName;
+        return exec(cmd);
+    }).then(function() {
+        console.log('LANCH SUCCESS');
+    }, function(err) {
+        return Q.reject('ERROR: Failed to launch application on device: ' + err);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/emulator.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/emulator.js b/test/cordova/lib/emulator.js
new file mode 100644
index 0000000..367cd94
--- /dev/null
+++ b/test/cordova/lib/emulator.js
@@ -0,0 +1,330 @@
+#!/usr/bin/env node
+
+/*
+       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 shell = require('shelljs'),
+    exec  = require('./exec'),
+    Q     = require('q'),
+    path  = require('path'),
+    appinfo = require('./appinfo'),
+    build = require('./build'),
+    ROOT  = path.join(__dirname, '..', '..'),
+    child_process = require('child_process'),
+    new_emulator = 'cordova_emulator';
+
+/**
+ * Returns a Promise for a list of emulator images in the form of objects
+ * {
+       name   : <emulator_name>,
+       path   : <path_to_emulator_image>,
+       target : <api_target>,
+       abi    : <cpu>,
+       skin   : <skin>
+   }
+ */
+module.exports.list_images = function() {
+    return exec('android list avds')
+    .then(function(output) {
+        var response = output.split('\n');
+        var emulator_list = [];
+        for (var i = 1; i < response.length; i++) {
+            // To return more detailed information use img_obj
+            var img_obj = {};
+            if (response[i].match(/Name:\s/)) {
+                img_obj['name'] = response[i].split('Name: ')[1].replace('\r', '');
+                if (response[i + 1].match(/Path:\s/)) {
+                    i++;
+                    img_obj['path'] = response[i].split('Path: ')[1].replace('\r', '');
+                }
+                if (response[i + 1].match(/\(API\slevel\s/)) {
+                    i++;
+                    img_obj['target'] = response[i].replace('\r', '');
+                }
+                if (response[i + 1].match(/ABI:\s/)) {
+                    i++;
+                    img_obj['abi'] = response[i].split('ABI: ')[1].replace('\r', '');
+                }
+                if (response[i + 1].match(/Skin:\s/)) {
+                    i++;
+                    img_obj['skin'] = response[i].split('Skin: ')[1].replace('\r', '');
+                }
+
+                emulator_list.push(img_obj);
+            }
+            /* To just return a list of names use this
+            if (response[i].match(/Name:\s/)) {
+                emulator_list.push(response[i].split('Name: ')[1].replace('\r', '');
+            }*/
+
+        }
+        return emulator_list;
+    });
+}
+
+/**
+ * Will return the closest avd to the projects target
+ * or undefined if no avds exist.
+ * Returns a promise.
+ */
+module.exports.best_image = function() {
+    var project_target = this.get_target().replace('android-', '');
+    return this.list_images()
+    .then(function(images) {
+        var closest = 9999;
+        var best = images[0];
+        for (i in images) {
+            var target = images[i].target;
+            if(target) {
+                var num = target.split('(API level ')[1].replace(')', '');
+                if (num == project_target) {
+                    return images[i];
+                } else if (project_target - num < closest && project_target > num) {
+                    var closest = project_target - num;
+                    best = images[i];
+                }
+            }
+        }
+        return best;
+    });
+}
+
+// Returns a promise.
+module.exports.list_started = function() {
+    return exec('adb devices')
+    .then(function(output) {
+        var response = output.split('\n');
+        var started_emulator_list = [];
+        for (var i = 1; i < response.length; i++) {
+            if (response[i].match(/device/) && response[i].match(/emulator/)) {
+                started_emulator_list.push(response[i].replace(/\tdevice/, '').replace('\r', ''));
+            }
+        }
+        return started_emulator_list;
+    });
+}
+
+module.exports.get_target = function() {
+    var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties'));
+    return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
+}
+
+// Returns a promise.
+module.exports.list_targets = function() {
+    return exec('android list targets')
+    .then(function(output) {
+        var target_out = output.split('\n');
+        var targets = [];
+        for (var i = target_out.length; i >= 0; i--) {
+            if(target_out[i].match(/id:/)) {
+                targets.push(targets[i].split(' ')[1]);
+            }
+        }
+        return targets;
+    });
+}
+
+/*
+ * Starts an emulator with the given ID,
+ * and returns the started ID of that emulator.
+ * If no ID is given it will used the first image availible,
+ * if no image is availible it will error out (maybe create one?).
+ *
+ * Returns a promise.
+ */
+module.exports.start = function(emulator_ID) {
+    var self = this;
+    var emulator_id, num_started, started_emulators;
+
+    return self.list_started()
+    .then(function(list) {
+        started_emulators = list;
+        num_started = started_emulators.length;
+        if (typeof emulator_ID === 'undefined') {
+            return self.list_images()
+            .then(function(emulator_list) {
+                if (emulator_list.length > 0) {
+                    return self.best_image()
+                    .then(function(best) {
+                        emulator_ID = best.name;
+                        console.log('WARNING : no emulator specified, defaulting to ' + emulator_ID);
+                        return emulator_ID;
+                    });
+                } else {
+                    return Q.reject('ERROR : No emulator images (avds) found, if you would like to create an\n' +
+                        ' avd follow the instructions provided here:\n' +
+                        ' http://developer.android.com/tools/devices/index.html\n' +
+                        ' Or run \'android create avd --name <name> --target <targetID>\'\n' +
+                        ' in on the command line.');
+                }
+            });
+        } else {
+            return Q(emulator_ID);
+        }
+    }).then(function() {
+        var cmd, args;
+        if(process.platform == 'win32' || process.platform == 'win64') {
+            cmd = '%comspec%';
+            args = ['/c', 'start', 'cmd', '/c', 'emulator', '-avd', emulator_ID];
+        } else {
+            cmd = 'emulator';
+            args = ['-avd', emulator_ID];
+        }
+        var proc = child_process.spawn(cmd, args, { stdio: 'inherit', detached: true });
+        proc.unref(); // Don't wait for it to finish, since the emulator will probably keep running for a long time.
+    }).then(function() {
+        // wait for emulator to start
+        console.log('Waiting for emulator...');
+        return self.wait_for_emulator(num_started);
+    }).then(function(new_started) {
+        if (new_started.length > 1) {
+            for (i in new_started) {
+                if (started_emulators.indexOf(new_started[i]) < 0) {
+                    emulator_id = new_started[i];
+                }
+            }
+        } else {
+            emulator_id = new_started[0];
+        }
+        if (!emulator_id) return Q.reject('ERROR :  Failed to start emulator, could not find new emulator');
+
+        //wait for emulator to boot up
+        process.stdout.write('Booting up emulator (this may take a while)...');
+        return self.wait_for_boot(emulator_id);
+    }).then(function() {
+        console.log('BOOT COMPLETE');
+
+        //unlock screen
+        return exec('adb -s ' + emulator_id + ' shell input keyevent 82');
+    }).then(function() {
+        //return the new emulator id for the started emulators
+        return emulator_id;
+    });
+}
+
+/*
+ * Waits for the new emulator to apear on the started-emulator list.
+ * Returns a promise with a list of newly started emulators' IDs.
+ */
+module.exports.wait_for_emulator = function(num_running) {
+    var self = this;
+    return self.list_started()
+    .then(function(new_started) {
+        if (new_started.length > num_running) {
+            return new_started;
+        } else {
+            return Q.delay(1000).then(function() {
+                return self.wait_for_emulator(num_running);
+            });
+        }
+    });
+}
+
+/*
+ * Waits for the boot animation property of the emulator to switch to 'stopped'
+ */
+module.exports.wait_for_boot = function(emulator_id) {
+    var self = this;
+    return exec('adb -s ' + emulator_id + ' shell getprop init.svc.bootanim')
+    .then(function(output) {
+        if (output.match(/stopped/)) {
+            return;
+        } else {
+            process.stdout.write('.');
+            return Q.delay(3000).then(function() {
+                return self.wait_for_boot(emulator_id);
+            });
+        }
+    });
+}
+
+/*
+ * Create avd
+ * TODO : Enter the stdin input required to complete the creation of an avd.
+ * Returns a promise.
+ */
+module.exports.create_image = function(name, target) {
+    console.log('Creating avd named ' + name);
+    if (target) {
+        return exec('android create avd --name ' + name + ' --target ' + target)
+        .then(null, function(error) {
+            console.error('ERROR : Failed to create emulator image : ');
+            console.error(' Do you have the latest android targets including ' + target + '?');
+            console.error(create.output);
+        });
+    } else {
+        console.log('WARNING : Project target not found, creating avd with a different target but the project may fail to install.');
+        return exec('android create avd --name ' + name + ' --target ' + this.list_targets()[0])
+        .then(function() {
+            // TODO: This seems like another error case, even though it always happens.
+            console.error('ERROR : Unable to create an avd emulator, no targets found.');
+            console.error('Please insure you have targets availible by runing the "android" command');
+            return Q.reject();
+        }, function(error) {
+            console.error('ERROR : Failed to create emulator image : ');
+            console.error(error);
+        });
+    }
+}
+
+/*
+ * Installs a previously built application on the emulator and launches it.
+ * If no target is specified, then it picks one.
+ * If no started emulators are found, error out.
+ * Returns a promise.
+ */
+module.exports.install = function(target) {
+    var self = this;
+    return this.list_started()
+    .then(function(emulator_list) {
+        if (emulator_list.length < 1) {
+            return Q.reject('No started emulators found, please start an emultor before deploying your project.');
+        }
+
+        // default emulator
+        target = typeof target !== 'undefined' ? target : emulator_list[0];
+        if (emulator_list.indexOf(target) < 0) {
+            return Q.reject('Unable to find target \'' + target + '\'. Failed to deploy to emulator.');
+        }
+
+        console.log('Installing app on emulator...');
+        var apk_path = build.get_apk();
+        return exec('adb -s ' + target + ' install -r ' + apk_path);
+    }).then(function(output) {
+        if (output.match(/Failure/)) {
+            return Q.reject('Failed to install apk to emulator: ' + output);
+        }
+        return Q();
+    }, function(err) {
+        return Q.reject('Failed to install apk to emulator: ' + err);
+    }).then(function() {
+        //unlock screen
+        return exec('adb -s ' + target + ' shell input keyevent 82');
+    }).then(function() {
+        // launch the application
+        console.log('Launching application...');
+        var launchName = appinfo.getActivityName();
+        cmd = 'adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launchName;
+        return exec(cmd);
+    }).then(function(output) {
+        console.log('LAUNCH SUCCESS');
+    }, function(err) {
+        return Q.reject('Failed to launch app on emulator: ' + err);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/exec.js
----------------------------------------------------------------------
diff --git a/test/cordova/lib/exec.js b/test/cordova/lib/exec.js
new file mode 100644
index 0000000..6afa9c0
--- /dev/null
+++ b/test/cordova/lib/exec.js
@@ -0,0 +1,43 @@
+#!/usr/bin/env node
+
+/*
+       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 child_process = require('child_process'),
+    Q       = require('q');
+
+// Takes a command and optional current working directory.
+// Returns a promise that either resolves with the stdout, or
+// rejects with an error message and the stderr.
+module.exports = function(cmd, opt_cwd) {
+    var d = Q.defer();
+    console.log('exec: ' + cmd);
+    try {
+        child_process.exec(cmd, {cwd: opt_cwd}, function(err, stdout, stderr) {
+            console.log([cmd, err, stdout, stderr]);
+            if (err) d.reject('Error executing "' + cmd + '": ' + stderr);
+            else d.resolve(stdout);
+        });
+    } catch(e) {
+        console.error('error caught: ' + e);
+        d.reject(e);
+    }
+    return d.promise;
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/test/cordova/lib/install-device b/test/cordova/lib/install-device
new file mode 100755
index 0000000..fc4b784
--- /dev/null
+++ b/test/cordova/lib/install-device
@@ -0,0 +1,42 @@
+#!/usr/bin/env node
+
+/*
+       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 device = require('./device'),
+    args   = process.argv;
+
+if(args.length > 2) {
+    var install_target;
+    if (args[2].substring(0, 9) == '--target=') {
+        install_target = args[2].substring(9, args[2].length);
+        device.install(install_target).done(null, function(err) {
+            console.error('ERROR: ' + err);
+            process.exit(2);
+        });
+     } else {
+        console.error('ERROR : argument \'' + args[2] + '\' not recognized.');
+        process.exit(2);
+     }
+} else {
+    device.install().done(null, function(err) {
+        console.error('ERROR: ' + err);
+        process.exit(2);
+    });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/install-device.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/install-device.bat b/test/cordova/lib/install-device.bat
new file mode 100644
index 0000000..ac7214a
--- /dev/null
+++ b/test/cordova/lib/install-device.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0install-device"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/test/cordova/lib/install-emulator b/test/cordova/lib/install-emulator
new file mode 100755
index 0000000..aa2a34f
--- /dev/null
+++ b/test/cordova/lib/install-emulator
@@ -0,0 +1,38 @@
+#!/usr/bin/env node
+
+/*
+       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 emulator = require('./emulator'),
+    args     = process.argv;
+
+var install_target;
+if(args.length > 2) {
+    if (args[2].substring(0, 9) == '--target=') {
+        install_target = args[2].substring(9, args[2].length);
+     } else {
+        console.error('ERROR : argument \'' + args[2] + '\' not recognized.');
+        process.exit(2);
+     }
+}
+
+emulator.install(install_target).done(null, function(err) {
+    console.error('ERROR: ' + err);
+    process.exit(2);
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/install-emulator.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/install-emulator.bat b/test/cordova/lib/install-emulator.bat
new file mode 100644
index 0000000..1ec6779
--- /dev/null
+++ b/test/cordova/lib/install-emulator.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0install-emulator"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-devices b/test/cordova/lib/list-devices
new file mode 100755
index 0000000..e390bff
--- /dev/null
+++ b/test/cordova/lib/list-devices
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+/*
+       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 devices = require('./device');
+
+// Usage support for when args are given
+devices.list().done(function(device_list) {
+    device_list && device_list.forEach(function(dev) {
+        console.log(dev);
+    });
+}, function(err) {
+    console.error('ERROR: ' + err);
+    process.exit(2);
+});
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-devices.bat b/test/cordova/lib/list-devices.bat
new file mode 100644
index 0000000..c0bcdd9
--- /dev/null
+++ b/test/cordova/lib/list-devices.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0list-devices"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-emulator-images b/test/cordova/lib/list-emulator-images
new file mode 100755
index 0000000..996cf55
--- /dev/null
+++ b/test/cordova/lib/list-emulator-images
@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+/*
+       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 emulators = require('./emulator');
+
+// Usage support for when args are given
+emulators.list_images().done(function(emulator_list) {
+    emulator_list && emulator_list.forEach(function(emu) {
+        console.log(emu.name);
+    });
+}, function(err) {
+    console.error('ERROR: ' + err);
+    process.exit(2);
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-emulator-images.bat b/test/cordova/lib/list-emulator-images.bat
new file mode 100644
index 0000000..661cbf9
--- /dev/null
+++ b/test/cordova/lib/list-emulator-images.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0list-emulator-images"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO. 
+    ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-started-emulators b/test/cordova/lib/list-started-emulators
new file mode 100755
index 0000000..2ae8c5a
--- /dev/null
+++ b/test/cordova/lib/list-started-emulators
@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+/*
+       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 emulators = require('./emulator');
+
+// Usage support for when args are given
+emulators.list_started().done(function(emulator_list) {
+    emulator_list && emulator_list.forEach(function(emu) {
+        console.log(emu);
+    });
+}, function(err) {
+    console.error('ERROR: ' + err);
+    process.exit(2);
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/lib/list-started-emulators.bat
----------------------------------------------------------------------
diff --git a/test/cordova/lib/list-started-emulators.bat b/test/cordova/lib/list-started-emulators.bat
new file mode 100644
index 0000000..a4e88f7
--- /dev/null
+++ b/test/cordova/lib/list-started-emulators.bat
@@ -0,0 +1,26 @@
+:: 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.
+
+@ECHO OFF
+SET script_path="%~dp0list-started-emulators"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file


[39/50] [abbrv] git commit: Fix incorrect MIME type for .js files loaded through CordovaResourceAPI.

Posted by bo...@apache.org.
Fix incorrect MIME type for .js files loaded through CordovaResourceAPI.

This fixes devtools complaining about .js files being served as "text/plain"
when they have gone through remapUrl().


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/629ac532
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/629ac532
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/629ac532

Branch: refs/heads/master
Commit: 629ac53217514289034cbec2009b8bb5f3936b47
Parents: dbd01fa
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 23 15:04:54 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaResourceApi.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/629ac532/framework/src/org/apache/cordova/CordovaResourceApi.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaResourceApi.java b/framework/src/org/apache/cordova/CordovaResourceApi.java
index 96f3d25..ea2a90d 100644
--- a/framework/src/org/apache/cordova/CordovaResourceApi.java
+++ b/framework/src/org/apache/cordova/CordovaResourceApi.java
@@ -188,6 +188,9 @@ public class CordovaResourceApi {
         extension = extension.toLowerCase(Locale.getDefault());
         if (extension.equals("3ga")) {
             return "audio/3gpp";
+        } else if (extension.equals("js")) {
+            // Missing from the map :(.
+            return "text/javascript";
         }
         return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
     }


[35/50] [abbrv] git commit: Spelling fixes

Posted by bo...@apache.org.
Spelling fixes


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/dbea6320
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/dbea6320
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/dbea6320

Branch: refs/heads/master
Commit: dbea6320c5b62bce42e23f46fb0271daed9ce867
Parents: f25327b
Author: Josh Soref <js...@blackberry.com>
Authored: Wed Oct 30 21:06:58 2013 -0400
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:21 2014 -0800

----------------------------------------------------------------------
 RELEASENOTES.md                                      | 2 +-
 bin/templates/cordova/lib/build.js                   | 2 +-
 bin/templates/cordova/lib/emulator.js                | 6 +++---
 bin/templates/cordova/lib/log.js                     | 2 +-
 bin/templates/cordova/lib/run.js                     | 4 ++--
 bin/templates/project/assets/www/js/index.js         | 2 +-
 framework/src/org/apache/cordova/App.java            | 4 ++--
 framework/src/org/apache/cordova/CordovaWebView.java | 6 +++---
 8 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 915d563..a3e4815 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -32,7 +32,7 @@
 * [CB-4764] Deprecated DirectoryManager.java (moved into plugins)
 * [CB-4763] Deprecated FileHelper.java (moved into plugins), Move getMimeType() into CordovaResourceApi.
 * [CB-4725] Add CordovaWebView.CORDOVA_VERSION constant
-* Incremeting version check for Android 4.3 API Level 18
+* Incrementing version check for Android 4.3 API Level 18
 * [CB-3542] rewrote cli tooling scripts in node
 * Allow CordovaChromeClient subclasses access to CordovaInterface and CordovaWebView members
 * Refactor CordovaActivity.init so that subclasses can easily override factory methods for webview objects

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index e57e26b..f0adb37 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -78,7 +78,7 @@ module.exports.get_apk = function() {
 }
 
 module.exports.help = function() {
-    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'corodva', 'build')) + ' [build_type]');
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'build')) + ' [build_type]');
     console.log('Build Types : ');
     console.log('    \'--debug\': Default build, will build project in using ant debug');
     console.log('    \'--release\': will build project using ant release');

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/bin/templates/cordova/lib/emulator.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js
index fe24480..a8663fa 100644
--- a/bin/templates/cordova/lib/emulator.js
+++ b/bin/templates/cordova/lib/emulator.js
@@ -143,8 +143,8 @@ module.exports.list_targets = function() {
 /*
  * Starts an emulator with the given ID,
  * and returns the started ID of that emulator.
- * If no ID is given it will used the first image availible,
- * if no image is availible it will error out (maybe create one?).
+ * If no ID is given it will used the first image available,
+ * if no image is available it will error out (maybe create one?).
  *
  * Returns a promise.
  */
@@ -274,7 +274,7 @@ module.exports.create_image = function(name, target) {
         .then(function() {
             // TODO: This seems like another error case, even though it always happens.
             console.error('ERROR : Unable to create an avd emulator, no targets found.');
-            console.error('Please insure you have targets availible by runing the "android" command');
+            console.error('Please insure you have targets available by running the "android" command');
             return Q.reject();
         }, function(error) {
             console.error('ERROR : Failed to create emulator image : ');

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/bin/templates/cordova/lib/log.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/log.js b/bin/templates/cordova/lib/log.js
index 7339b1c..329dfc9 100644
--- a/bin/templates/cordova/lib/log.js
+++ b/bin/templates/cordova/lib/log.js
@@ -51,7 +51,7 @@ module.exports.run = function() {
 }
 
 module.exports.help = function() {
-    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'corodva', 'log')));
+    console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'log')));
     console.log('Gives the logcat output on the command line.');
     process.exit(0);
 }

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/bin/templates/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js
index 6806014..dd67901 100644
--- a/bin/templates/cordova/lib/run.js
+++ b/bin/templates/cordova/lib/run.js
@@ -26,7 +26,7 @@ var path  = require('path'),
     Q = require('q');
 
 /*
- * Runs the application on a device if availible.
+ * Runs the application on a device if available.
  * If not device is found, it will use a started emulator.
  * If no started emulators are found it will attempt to start an avd.
  * If no avds are found it will error out.
@@ -91,7 +91,7 @@ var path  = require('path'),
                 }
             });
         } else {
-            // no target given, deploy to device if availible, otherwise use the emulator.
+            // no target given, deploy to device if available, otherwise use the emulator.
             return device.list()
             .then(function(device_list) {
                 if (device_list.length > 0) {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/bin/templates/project/assets/www/js/index.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/assets/www/js/index.js b/bin/templates/project/assets/www/js/index.js
index 31d9064..87b5660 100644
--- a/bin/templates/project/assets/www/js/index.js
+++ b/bin/templates/project/assets/www/js/index.js
@@ -31,7 +31,7 @@ var app = {
     // deviceready Event Handler
     //
     // The scope of 'this' is the event. In order to call the 'receivedEvent'
-    // function, we must explicity call 'app.receivedEvent(...);'
+    // function, we must explicitly call 'app.receivedEvent(...);'
     onDeviceReady: function() {
         app.receivedEvent('deviceready');
     },

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/framework/src/org/apache/cordova/App.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java
index 86c6572..64af74e 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -190,7 +190,7 @@ public class App extends CordovaPlugin {
      * @param override		T=override, F=cancel override
      */
     public void overrideBackbutton(boolean override) {
-        LOG.i("App", "WARNING: Back Button Default Behaviour will be overridden.  The backbutton event will be fired!");
+        LOG.i("App", "WARNING: Back Button Default Behavior will be overridden.  The backbutton event will be fired!");
         webView.bindButton(override);
     }
 
@@ -202,7 +202,7 @@ public class App extends CordovaPlugin {
      * @param override      T=override, F=cancel override
      */
     public void overrideButton(String button, boolean override) {
-        LOG.i("App", "WARNING: Volume Button Default Behaviour will be overridden.  The volume event will be fired!");
+        LOG.i("App", "WARNING: Volume Button Default Behavior will be overridden.  The volume event will be fired!");
         webView.bindButton(button, override);
     }
 

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbea6320/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 767ea00..36ef8a1 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -866,11 +866,11 @@ public class CordovaWebView extends AmazonWebView {
                     if (this.backHistory()) {
                         return true;
                     }
-                    // If not, then invoke default behaviour
+                    // If not, then invoke default behavior
                     else {
                         //this.activityState = ACTIVITY_EXITING;
                     	//return false;
-                    	// If they hit back button when app is initializing, app should exit instead of hang until initilazation (CB2-458)
+                    	// If they hit back button when app is initializing, app should exit instead of hang until initialization (CB2-458)
                     	this.cordova.getActivity().finish();
                     }
                 }
@@ -1072,7 +1072,7 @@ public class CordovaWebView extends AmazonWebView {
 
     public void hideCustomView() {
         // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
-        Log.d(TAG, "Hidding Custom View");
+        Log.d(TAG, "Hiding Custom View");
         if (mCustomView == null) return;
 
         // Hide the custom view.


[41/50] [abbrv] git commit: Backfill 3.2.0 release notes

Posted by bo...@apache.org.
Backfill 3.2.0 release notes


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/9e1609dd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/9e1609dd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/9e1609dd

Branch: refs/heads/master
Commit: 9e1609dd4b250761c28418ef776bcd515902b7a8
Parents: 156ae3d
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 16 13:47:33 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 RELEASENOTES.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/9e1609dd/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index a3e4815..4ef5646 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,19 @@
 -->
 ## Release Notes for Cordova (Android) ##
 
+### 3.2.0 (Nov 2013) ###
+
+27 commits from 7 authors. Highlights include:
+
+* CB-5193 Fix Android WebSQL sometime throwing SECURITY_ERR.
+* CB-5191 Deprecate <url-filter>
+* Updating shelljs to 0.2.6. Copy now preserves mode bits.
+* CB-4872 Added android version scripts (android_sdk_version, etc)
+* CB-5117 Output confirmation message if check_reqs passes.
+* CB-5080 Find resources in a way that works with aapt's --rename-manifest-package
+* CB-4527 Don't delete .bat files even when on non-windows platform
+* CB-4892 Fix create script only escaping the first space instead of all spaces.
+
 ### 3.1.0 (Sept 2013) ###
 
 55 commits from 9 authors. Highlights include:


[10/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
new file mode 100644
index 0000000..bccb66c
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.js
@@ -0,0 +1,2530 @@
+var isCommonJS = typeof window == "undefined";
+
+/**
+ * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+ *
+ * @namespace
+ */
+var jasmine = {};
+if (isCommonJS) exports.jasmine = jasmine;
+/**
+ * @private
+ */
+jasmine.unimplementedMethod_ = function() {
+  throw new Error("unimplemented method");
+};
+
+/**
+ * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.undefined = jasmine.___undefined___;
+
+/**
+ * Show diagnostic messages in the console if set to true
+ *
+ */
+jasmine.VERBOSE = false;
+
+/**
+ * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
+ *
+ */
+jasmine.DEFAULT_UPDATE_INTERVAL = 250;
+
+/**
+ * Default timeout interval in milliseconds for waitsFor() blocks.
+ */
+jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
+
+jasmine.getGlobal = function() {
+  function getGlobal() {
+    return this;
+  }
+
+  return getGlobal();
+};
+
+/**
+ * Allows for bound functions to be compared.  Internal use only.
+ *
+ * @ignore
+ * @private
+ * @param base {Object} bound 'this' for the function
+ * @param name {Function} function to find
+ */
+jasmine.bindOriginal_ = function(base, name) {
+  var original = base[name];
+  if (original.apply) {
+    return function() {
+      return original.apply(base, arguments);
+    };
+  } else {
+    // IE support
+    return jasmine.getGlobal()[name];
+  }
+};
+
+jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
+jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
+jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
+jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
+
+jasmine.MessageResult = function(values) {
+  this.type = 'log';
+  this.values = values;
+  this.trace = new Error(); // todo: test better
+};
+
+jasmine.MessageResult.prototype.toString = function() {
+  var text = "";
+  for (var i = 0; i < this.values.length; i++) {
+    if (i > 0) text += " ";
+    if (jasmine.isString_(this.values[i])) {
+      text += this.values[i];
+    } else {
+      text += jasmine.pp(this.values[i]);
+    }
+  }
+  return text;
+};
+
+jasmine.ExpectationResult = function(params) {
+  this.type = 'expect';
+  this.matcherName = params.matcherName;
+  this.passed_ = params.passed;
+  this.expected = params.expected;
+  this.actual = params.actual;
+  this.message = this.passed_ ? 'Passed.' : params.message;
+
+  var trace = (params.trace || new Error(this.message));
+  this.trace = this.passed_ ? '' : trace;
+};
+
+jasmine.ExpectationResult.prototype.toString = function () {
+  return this.message;
+};
+
+jasmine.ExpectationResult.prototype.passed = function () {
+  return this.passed_;
+};
+
+/**
+ * Getter for the Jasmine environment. Ensures one gets created
+ */
+jasmine.getEnv = function() {
+  var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
+  return env;
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isArray_ = function(value) {
+  return jasmine.isA_("Array", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isString_ = function(value) {
+  return jasmine.isA_("String", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isNumber_ = function(value) {
+  return jasmine.isA_("Number", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param {String} typeName
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isA_ = function(typeName, value) {
+  return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
+};
+
+/**
+ * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
+ *
+ * @param value {Object} an object to be outputted
+ * @returns {String}
+ */
+jasmine.pp = function(value) {
+  var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
+  stringPrettyPrinter.format(value);
+  return stringPrettyPrinter.string;
+};
+
+/**
+ * Returns true if the object is a DOM Node.
+ *
+ * @param {Object} obj object to check
+ * @returns {Boolean}
+ */
+jasmine.isDomNode = function(obj) {
+  return obj.nodeType > 0;
+};
+
+/**
+ * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
+ *
+ * @example
+ * // don't care about which function is passed in, as long as it's a function
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
+ *
+ * @param {Class} clazz
+ * @returns matchable object of the type clazz
+ */
+jasmine.any = function(clazz) {
+  return new jasmine.Matchers.Any(clazz);
+};
+
+/**
+ * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the
+ * attributes on the object.
+ *
+ * @example
+ * // don't care about any other attributes than foo.
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"});
+ *
+ * @param sample {Object} sample
+ * @returns matchable object for the sample
+ */
+jasmine.objectContaining = function (sample) {
+    return new jasmine.Matchers.ObjectContaining(sample);
+};
+
+/**
+ * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+ *
+ * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
+ * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+ *
+ * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
+ *
+ * Spies are torn down at the end of every spec.
+ *
+ * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+ *
+ * @example
+ * // a stub
+ * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
+ *
+ * // spy example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ *
+ * // actual foo.not will not be called, execution stops
+ * spyOn(foo, 'not');
+
+ // foo.not spied upon, execution will continue to implementation
+ * spyOn(foo, 'not').andCallThrough();
+ *
+ * // fake example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ *
+ * // foo.not(val) will return val
+ * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+ *
+ * // mock example
+ * foo.not(7 == 7);
+ * expect(foo.not).toHaveBeenCalled();
+ * expect(foo.not).toHaveBeenCalledWith(true);
+ *
+ * @constructor
+ * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+ * @param {String} name
+ */
+jasmine.Spy = function(name) {
+  /**
+   * The name of the spy, if provided.
+   */
+  this.identity = name || 'unknown';
+  /**
+   *  Is this Object a spy?
+   */
+  this.isSpy = true;
+  /**
+   * The actual function this spy stubs.
+   */
+  this.plan = function() {
+  };
+  /**
+   * Tracking of the most recent call to the spy.
+   * @example
+   * var mySpy = jasmine.createSpy('foo');
+   * mySpy(1, 2);
+   * mySpy.mostRecentCall.args = [1, 2];
+   */
+  this.mostRecentCall = {};
+
+  /**
+   * Holds arguments for each call to the spy, indexed by call count
+   * @example
+   * var mySpy = jasmine.createSpy('foo');
+   * mySpy(1, 2);
+   * mySpy(7, 8);
+   * mySpy.mostRecentCall.args = [7, 8];
+   * mySpy.argsForCall[0] = [1, 2];
+   * mySpy.argsForCall[1] = [7, 8];
+   */
+  this.argsForCall = [];
+  this.calls = [];
+};
+
+/**
+ * Tells a spy to call through to the actual implemenatation.
+ *
+ * @example
+ * var foo = {
+ *   bar: function() { // do some stuff }
+ * }
+ *
+ * // defining a spy on an existing property: foo.bar
+ * spyOn(foo, 'bar').andCallThrough();
+ */
+jasmine.Spy.prototype.andCallThrough = function() {
+  this.plan = this.originalValue;
+  return this;
+};
+
+/**
+ * For setting the return value of a spy.
+ *
+ * @example
+ * // defining a spy from scratch: foo() returns 'baz'
+ * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() returns 'baz'
+ * spyOn(foo, 'bar').andReturn('baz');
+ *
+ * @param {Object} value
+ */
+jasmine.Spy.prototype.andReturn = function(value) {
+  this.plan = function() {
+    return value;
+  };
+  return this;
+};
+
+/**
+ * For throwing an exception when a spy is called.
+ *
+ * @example
+ * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+ * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+ * spyOn(foo, 'bar').andThrow('baz');
+ *
+ * @param {String} exceptionMsg
+ */
+jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
+  this.plan = function() {
+    throw exceptionMsg;
+  };
+  return this;
+};
+
+/**
+ * Calls an alternate implementation when a spy is called.
+ *
+ * @example
+ * var baz = function() {
+ *   // do some stuff, return something
+ * }
+ * // defining a spy from scratch: foo() calls the function baz
+ * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+ *
+ * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+ * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+ *
+ * @param {Function} fakeFunc
+ */
+jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
+  this.plan = fakeFunc;
+  return this;
+};
+
+/**
+ * Resets all of a spy's the tracking variables so that it can be used again.
+ *
+ * @example
+ * spyOn(foo, 'bar');
+ *
+ * foo.bar();
+ *
+ * expect(foo.bar.callCount).toEqual(1);
+ *
+ * foo.bar.reset();
+ *
+ * expect(foo.bar.callCount).toEqual(0);
+ */
+jasmine.Spy.prototype.reset = function() {
+  this.wasCalled = false;
+  this.callCount = 0;
+  this.argsForCall = [];
+  this.calls = [];
+  this.mostRecentCall = {};
+};
+
+jasmine.createSpy = function(name) {
+
+  var spyObj = function() {
+    spyObj.wasCalled = true;
+    spyObj.callCount++;
+    var args = jasmine.util.argsToArray(arguments);
+    spyObj.mostRecentCall.object = this;
+    spyObj.mostRecentCall.args = args;
+    spyObj.argsForCall.push(args);
+    spyObj.calls.push({object: this, args: args});
+    return spyObj.plan.apply(this, arguments);
+  };
+
+  var spy = new jasmine.Spy(name);
+
+  for (var prop in spy) {
+    spyObj[prop] = spy[prop];
+  }
+
+  spyObj.reset();
+
+  return spyObj;
+};
+
+/**
+ * Determines whether an object is a spy.
+ *
+ * @param {jasmine.Spy|Object} putativeSpy
+ * @returns {Boolean}
+ */
+jasmine.isSpy = function(putativeSpy) {
+  return putativeSpy && putativeSpy.isSpy;
+};
+
+/**
+ * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
+ * large in one call.
+ *
+ * @param {String} baseName name of spy class
+ * @param {Array} methodNames array of names of methods to make spies
+ */
+jasmine.createSpyObj = function(baseName, methodNames) {
+  if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {
+    throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
+  }
+  var obj = {};
+  for (var i = 0; i < methodNames.length; i++) {
+    obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
+  }
+  return obj;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.log = function() {
+  var spec = jasmine.getEnv().currentSpec;
+  spec.log.apply(spec, arguments);
+};
+
+/**
+ * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
+ *
+ * @example
+ * // spy example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+ *
+ * @see jasmine.createSpy
+ * @param obj
+ * @param methodName
+ * @returns a Jasmine spy that can be chained with all spy methods
+ */
+var spyOn = function(obj, methodName) {
+  return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
+};
+if (isCommonJS) exports.spyOn = spyOn;
+
+/**
+ * Creates a Jasmine spec that will be added to the current suite.
+ *
+ * // TODO: pending tests
+ *
+ * @example
+ * it('should be true', function() {
+ *   expect(true).toEqual(true);
+ * });
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var it = function(desc, func) {
+  return jasmine.getEnv().it(desc, func);
+};
+if (isCommonJS) exports.it = it;
+
+/**
+ * Creates a <em>disabled</em> Jasmine spec.
+ *
+ * A convenience method that allows existing specs to be disabled temporarily during development.
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var xit = function(desc, func) {
+  return jasmine.getEnv().xit(desc, func);
+};
+if (isCommonJS) exports.xit = xit;
+
+/**
+ * Starts a chain for a Jasmine expectation.
+ *
+ * It is passed an Object that is the actual value and should chain to one of the many
+ * jasmine.Matchers functions.
+ *
+ * @param {Object} actual Actual value to test against and expected value
+ */
+var expect = function(actual) {
+  return jasmine.getEnv().currentSpec.expect(actual);
+};
+if (isCommonJS) exports.expect = expect;
+
+/**
+ * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
+ *
+ * @param {Function} func Function that defines part of a jasmine spec.
+ */
+var runs = function(func) {
+  jasmine.getEnv().currentSpec.runs(func);
+};
+if (isCommonJS) exports.runs = runs;
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+var waits = function(timeout) {
+  jasmine.getEnv().currentSpec.waits(timeout);
+};
+if (isCommonJS) exports.waits = waits;
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+  jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
+};
+if (isCommonJS) exports.waitsFor = waitsFor;
+
+/**
+ * A function that is called before each spec in a suite.
+ *
+ * Used for spec setup, including validating assumptions.
+ *
+ * @param {Function} beforeEachFunction
+ */
+var beforeEach = function(beforeEachFunction) {
+  jasmine.getEnv().beforeEach(beforeEachFunction);
+};
+if (isCommonJS) exports.beforeEach = beforeEach;
+
+/**
+ * A function that is called after each spec in a suite.
+ *
+ * Used for restoring any state that is hijacked during spec execution.
+ *
+ * @param {Function} afterEachFunction
+ */
+var afterEach = function(afterEachFunction) {
+  jasmine.getEnv().afterEach(afterEachFunction);
+};
+if (isCommonJS) exports.afterEach = afterEach;
+
+/**
+ * Defines a suite of specifications.
+ *
+ * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+ * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+ * of setup in some tests.
+ *
+ * @example
+ * // TODO: a simple suite
+ *
+ * // TODO: a simple suite with a nested describe block
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var describe = function(description, specDefinitions) {
+  return jasmine.getEnv().describe(description, specDefinitions);
+};
+if (isCommonJS) exports.describe = describe;
+
+/**
+ * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var xdescribe = function(description, specDefinitions) {
+  return jasmine.getEnv().xdescribe(description, specDefinitions);
+};
+if (isCommonJS) exports.xdescribe = xdescribe;
+
+
+// Provide the XMLHttpRequest class for IE 5.x-6.x:
+jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
+  function tryIt(f) {
+    try {
+      return f();
+    } catch(e) {
+    }
+    return null;
+  }
+
+  var xhr = tryIt(function() {
+    return new ActiveXObject("Msxml2.XMLHTTP.6.0");
+  }) ||
+    tryIt(function() {
+      return new ActiveXObject("Msxml2.XMLHTTP.3.0");
+    }) ||
+    tryIt(function() {
+      return new ActiveXObject("Msxml2.XMLHTTP");
+    }) ||
+    tryIt(function() {
+      return new ActiveXObject("Microsoft.XMLHTTP");
+    });
+
+  if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
+
+  return xhr;
+} : XMLHttpRequest;
+/**
+ * @namespace
+ */
+jasmine.util = {};
+
+/**
+ * Declare that a child class inherit it's prototype from the parent class.
+ *
+ * @private
+ * @param {Function} childClass
+ * @param {Function} parentClass
+ */
+jasmine.util.inherit = function(childClass, parentClass) {
+  /**
+   * @private
+   */
+  var subclass = function() {
+  };
+  subclass.prototype = parentClass.prototype;
+  childClass.prototype = new subclass();
+};
+
+jasmine.util.formatException = function(e) {
+  var lineNumber;
+  if (e.line) {
+    lineNumber = e.line;
+  }
+  else if (e.lineNumber) {
+    lineNumber = e.lineNumber;
+  }
+
+  var file;
+
+  if (e.sourceURL) {
+    file = e.sourceURL;
+  }
+  else if (e.fileName) {
+    file = e.fileName;
+  }
+
+  var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
+
+  if (file && lineNumber) {
+    message += ' in ' + file + ' (line ' + lineNumber + ')';
+  }
+
+  return message;
+};
+
+jasmine.util.htmlEscape = function(str) {
+  if (!str) return str;
+  return str.replace(/&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;');
+};
+
+jasmine.util.argsToArray = function(args) {
+  var arrayOfArgs = [];
+  for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
+  return arrayOfArgs;
+};
+
+jasmine.util.extend = function(destination, source) {
+  for (var property in source) destination[property] = source[property];
+  return destination;
+};
+
+/**
+ * Environment for Jasmine
+ *
+ * @constructor
+ */
+jasmine.Env = function() {
+  this.currentSpec = null;
+  this.currentSuite = null;
+  this.currentRunner_ = new jasmine.Runner(this);
+
+  this.reporter = new jasmine.MultiReporter();
+
+  this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
+  this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+  this.lastUpdate = 0;
+  this.specFilter = function() {
+    return true;
+  };
+
+  this.nextSpecId_ = 0;
+  this.nextSuiteId_ = 0;
+  this.equalityTesters_ = [];
+
+  // wrap matchers
+  this.matchersClass = function() {
+    jasmine.Matchers.apply(this, arguments);
+  };
+  jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
+
+  jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
+};
+
+
+jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
+jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
+jasmine.Env.prototype.setInterval = jasmine.setInterval;
+jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
+
+/**
+ * @returns an object containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.version = function () {
+  if (jasmine.version_) {
+    return jasmine.version_;
+  } else {
+    throw new Error('Version not set');
+  }
+};
+
+/**
+ * @returns string containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.versionString = function() {
+  if (!jasmine.version_) {
+    return "version unknown";
+  }
+
+  var version = this.version();
+  var versionString = version.major + "." + version.minor + "." + version.build;
+  if (version.release_candidate) {
+    versionString += ".rc" + version.release_candidate;
+  }
+  versionString += " revision " + version.revision;
+  return versionString;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSpecId = function () {
+  return this.nextSpecId_++;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSuiteId = function () {
+  return this.nextSuiteId_++;
+};
+
+/**
+ * Register a reporter to receive status updates from Jasmine.
+ * @param {jasmine.Reporter} reporter An object which will receive status updates.
+ */
+jasmine.Env.prototype.addReporter = function(reporter) {
+  this.reporter.addReporter(reporter);
+};
+
+jasmine.Env.prototype.execute = function() {
+  this.currentRunner_.execute();
+};
+
+jasmine.Env.prototype.describe = function(description, specDefinitions) {
+  var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
+
+  var parentSuite = this.currentSuite;
+  if (parentSuite) {
+    parentSuite.add(suite);
+  } else {
+    this.currentRunner_.add(suite);
+  }
+
+  this.currentSuite = suite;
+
+  var declarationError = null;
+  try {
+    specDefinitions.call(suite);
+  } catch(e) {
+    declarationError = e;
+  }
+
+  if (declarationError) {
+    this.it("encountered a declaration exception", function() {
+      throw declarationError;
+    });
+  }
+
+  this.currentSuite = parentSuite;
+
+  return suite;
+};
+
+jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
+  if (this.currentSuite) {
+    this.currentSuite.beforeEach(beforeEachFunction);
+  } else {
+    this.currentRunner_.beforeEach(beforeEachFunction);
+  }
+};
+
+jasmine.Env.prototype.currentRunner = function () {
+  return this.currentRunner_;
+};
+
+jasmine.Env.prototype.afterEach = function(afterEachFunction) {
+  if (this.currentSuite) {
+    this.currentSuite.afterEach(afterEachFunction);
+  } else {
+    this.currentRunner_.afterEach(afterEachFunction);
+  }
+
+};
+
+jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
+  return {
+    execute: function() {
+    }
+  };
+};
+
+jasmine.Env.prototype.it = function(description, func) {
+  var spec = new jasmine.Spec(this, this.currentSuite, description);
+  this.currentSuite.add(spec);
+  this.currentSpec = spec;
+
+  if (func) {
+    spec.runs(func);
+  }
+
+  return spec;
+};
+
+jasmine.Env.prototype.xit = function(desc, func) {
+  return {
+    id: this.nextSpecId(),
+    runs: function() {
+    }
+  };
+};
+
+jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
+  if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
+    return true;
+  }
+
+  a.__Jasmine_been_here_before__ = b;
+  b.__Jasmine_been_here_before__ = a;
+
+  var hasKey = function(obj, keyName) {
+    return obj !== null && obj[keyName] !== jasmine.undefined;
+  };
+
+  for (var property in b) {
+    if (!hasKey(a, property) && hasKey(b, property)) {
+      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+    }
+  }
+  for (property in a) {
+    if (!hasKey(b, property) && hasKey(a, property)) {
+      mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
+    }
+  }
+  for (property in b) {
+    if (property == '__Jasmine_been_here_before__') continue;
+    if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
+      mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
+    }
+  }
+
+  if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
+    mismatchValues.push("arrays were not the same length");
+  }
+
+  delete a.__Jasmine_been_here_before__;
+  delete b.__Jasmine_been_here_before__;
+  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+};
+
+jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
+  mismatchKeys = mismatchKeys || [];
+  mismatchValues = mismatchValues || [];
+
+  for (var i = 0; i < this.equalityTesters_.length; i++) {
+    var equalityTester = this.equalityTesters_[i];
+    var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
+    if (result !== jasmine.undefined) return result;
+  }
+
+  if (a === b) return true;
+
+  if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
+    return (a == jasmine.undefined && b == jasmine.undefined);
+  }
+
+  if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
+    return a === b;
+  }
+
+  if (a instanceof Date && b instanceof Date) {
+    return a.getTime() == b.getTime();
+  }
+
+  if (a.jasmineMatches) {
+    return a.jasmineMatches(b);
+  }
+
+  if (b.jasmineMatches) {
+    return b.jasmineMatches(a);
+  }
+
+  if (a instanceof jasmine.Matchers.ObjectContaining) {
+    return a.matches(b);
+  }
+
+  if (b instanceof jasmine.Matchers.ObjectContaining) {
+    return b.matches(a);
+  }
+
+  if (jasmine.isString_(a) && jasmine.isString_(b)) {
+    return (a == b);
+  }
+
+  if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
+    return (a == b);
+  }
+
+  if (typeof a === "object" && typeof b === "object") {
+    return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
+  }
+
+  //Straight check
+  return (a === b);
+};
+
+jasmine.Env.prototype.contains_ = function(haystack, needle) {
+  if (jasmine.isArray_(haystack)) {
+    for (var i = 0; i < haystack.length; i++) {
+      if (this.equals_(haystack[i], needle)) return true;
+    }
+    return false;
+  }
+  return haystack.indexOf(needle) >= 0;
+};
+
+jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
+  this.equalityTesters_.push(equalityTester);
+};
+/** No-op base class for Jasmine reporters.
+ *
+ * @constructor
+ */
+jasmine.Reporter = function() {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecResults = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.log = function(str) {
+};
+
+/**
+ * Blocks are functions with executable code that make up a spec.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {Function} func
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Block = function(env, func, spec) {
+  this.env = env;
+  this.func = func;
+  this.spec = spec;
+};
+
+jasmine.Block.prototype.execute = function(onComplete) {  
+  try {
+    this.func.apply(this.spec);
+  } catch (e) {
+    this.spec.fail(e);
+  }
+  onComplete();
+};
+/** JavaScript API reporter.
+ *
+ * @constructor
+ */
+jasmine.JsApiReporter = function() {
+  this.started = false;
+  this.finished = false;
+  this.suites_ = [];
+  this.results_ = {};
+};
+
+jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
+  this.started = true;
+  var suites = runner.topLevelSuites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    this.suites_.push(this.summarize_(suite));
+  }
+};
+
+jasmine.JsApiReporter.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
+  var isSuite = suiteOrSpec instanceof jasmine.Suite;
+  var summary = {
+    id: suiteOrSpec.id,
+    name: suiteOrSpec.description,
+    type: isSuite ? 'suite' : 'spec',
+    children: []
+  };
+  
+  if (isSuite) {
+    var children = suiteOrSpec.children();
+    for (var i = 0; i < children.length; i++) {
+      summary.children.push(this.summarize_(children[i]));
+    }
+  }
+  return summary;
+};
+
+jasmine.JsApiReporter.prototype.results = function() {
+  return this.results_;
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
+  return this.results_[specId];
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
+  this.finished = true;
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
+  this.results_[spec.id] = {
+    messages: spec.results().getItems(),
+    result: spec.results().failedCount > 0 ? "failed" : "passed"
+  };
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.log = function(str) {
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
+  var results = {};
+  for (var i = 0; i < specIds.length; i++) {
+    var specId = specIds[i];
+    results[specId] = this.summarizeResult_(this.results_[specId]);
+  }
+  return results;
+};
+
+jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
+  var summaryMessages = [];
+  var messagesLength = result.messages.length;
+  for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
+    var resultMessage = result.messages[messageIndex];
+    summaryMessages.push({
+      text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
+      passed: resultMessage.passed ? resultMessage.passed() : true,
+      type: resultMessage.type,
+      message: resultMessage.message,
+      trace: {
+        stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
+      }
+    });
+  }
+
+  return {
+    result : result.result,
+    messages : summaryMessages
+  };
+};
+
+/**
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param actual
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Matchers = function(env, actual, spec, opt_isNot) {
+  this.env = env;
+  this.actual = actual;
+  this.spec = spec;
+  this.isNot = opt_isNot || false;
+  this.reportWasCalled_ = false;
+};
+
+// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
+jasmine.Matchers.pp = function(str) {
+  throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
+};
+
+// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
+jasmine.Matchers.prototype.report = function(result, failing_message, details) {
+  throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
+};
+
+jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
+  for (var methodName in prototype) {
+    if (methodName == 'report') continue;
+    var orig = prototype[methodName];
+    matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
+  }
+};
+
+jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
+  return function() {
+    var matcherArgs = jasmine.util.argsToArray(arguments);
+    var result = matcherFunction.apply(this, arguments);
+
+    if (this.isNot) {
+      result = !result;
+    }
+
+    if (this.reportWasCalled_) return result;
+
+    var message;
+    if (!result) {
+      if (this.message) {
+        message = this.message.apply(this, arguments);
+        if (jasmine.isArray_(message)) {
+          message = message[this.isNot ? 1 : 0];
+        }
+      } else {
+        var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
+        message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
+        if (matcherArgs.length > 0) {
+          for (var i = 0; i < matcherArgs.length; i++) {
+            if (i > 0) message += ",";
+            message += " " + jasmine.pp(matcherArgs[i]);
+          }
+        }
+        message += ".";
+      }
+    }
+    var expectationResult = new jasmine.ExpectationResult({
+      matcherName: matcherName,
+      passed: result,
+      expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
+      actual: this.actual,
+      message: message
+    });
+    this.spec.addMatcherResult(expectationResult);
+    return jasmine.undefined;
+  };
+};
+
+
+
+
+/**
+ * toBe: compares the actual to the expected using ===
+ * @param expected
+ */
+jasmine.Matchers.prototype.toBe = function(expected) {
+  return this.actual === expected;
+};
+
+/**
+ * toNotBe: compares the actual to the expected using !==
+ * @param expected
+ * @deprecated as of 1.0. Use not.toBe() instead.
+ */
+jasmine.Matchers.prototype.toNotBe = function(expected) {
+  return this.actual !== expected;
+};
+
+/**
+ * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toEqual = function(expected) {
+  return this.env.equals_(this.actual, expected);
+};
+
+/**
+ * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ * @param expected
+ * @deprecated as of 1.0. Use not.toEqual() instead.
+ */
+jasmine.Matchers.prototype.toNotEqual = function(expected) {
+  return !this.env.equals_(this.actual, expected);
+};
+
+/**
+ * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
+ * a pattern or a String.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toMatch = function(expected) {
+  return new RegExp(expected).test(this.actual);
+};
+
+/**
+ * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+ * @param expected
+ * @deprecated as of 1.0. Use not.toMatch() instead.
+ */
+jasmine.Matchers.prototype.toNotMatch = function(expected) {
+  return !(new RegExp(expected).test(this.actual));
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeDefined = function() {
+  return (this.actual !== jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeUndefined = function() {
+  return (this.actual === jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to null.
+ */
+jasmine.Matchers.prototype.toBeNull = function() {
+  return (this.actual === null);
+};
+
+/**
+ * Matcher that boolean not-nots the actual.
+ */
+jasmine.Matchers.prototype.toBeTruthy = function() {
+  return !!this.actual;
+};
+
+
+/**
+ * Matcher that boolean nots the actual.
+ */
+jasmine.Matchers.prototype.toBeFalsy = function() {
+  return !this.actual;
+};
+
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called.
+ */
+jasmine.Matchers.prototype.toHaveBeenCalled = function() {
+  if (arguments.length > 0) {
+    throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
+  }
+
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy " + this.actual.identity + " to have been called.",
+      "Expected spy " + this.actual.identity + " not to have been called."
+    ];
+  };
+
+  return this.actual.wasCalled;
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
+jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was not called.
+ *
+ * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
+ */
+jasmine.Matchers.prototype.wasNotCalled = function() {
+  if (arguments.length > 0) {
+    throw new Error('wasNotCalled does not take arguments');
+  }
+
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy " + this.actual.identity + " to not have been called.",
+      "Expected spy " + this.actual.identity + " to have been called."
+    ];
+  };
+
+  return !this.actual.wasCalled;
+};
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
+ *
+ * @example
+ *
+ */
+jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
+  var expectedArgs = jasmine.util.argsToArray(arguments);
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+  this.message = function() {
+    if (this.actual.callCount === 0) {
+      // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
+      return [
+        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.",
+        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."
+      ];
+    } else {
+      return [
+        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall),
+        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall)
+      ];
+    }
+  };
+
+  return this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
+
+/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasNotCalledWith = function() {
+  var expectedArgs = jasmine.util.argsToArray(arguments);
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
+      "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
+    ];
+  };
+
+  return !this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/**
+ * Matcher that checks that the expected item is an element in the actual Array.
+ *
+ * @param {Object} expected
+ */
+jasmine.Matchers.prototype.toContain = function(expected) {
+  return this.env.contains_(this.actual, expected);
+};
+
+/**
+ * Matcher that checks that the expected item is NOT an element in the actual Array.
+ *
+ * @param {Object} expected
+ * @deprecated as of 1.0. Use not.toContain() instead.
+ */
+jasmine.Matchers.prototype.toNotContain = function(expected) {
+  return !this.env.contains_(this.actual, expected);
+};
+
+jasmine.Matchers.prototype.toBeLessThan = function(expected) {
+  return this.actual < expected;
+};
+
+jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
+  return this.actual > expected;
+};
+
+/**
+ * Matcher that checks that the expected item is equal to the actual item
+ * up to a given level of decimal precision (default 2).
+ *
+ * @param {Number} expected
+ * @param {Number} precision
+ */
+jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {
+  if (!(precision === 0)) {
+    precision = precision || 2;
+  }
+  var multiplier = Math.pow(10, precision);
+  var actual = Math.round(this.actual * multiplier);
+  expected = Math.round(expected * multiplier);
+  return expected == actual;
+};
+
+/**
+ * Matcher that checks that the expected exception was thrown by the actual.
+ *
+ * @param {String} expected
+ */
+jasmine.Matchers.prototype.toThrow = function(expected) {
+  var result = false;
+  var exception;
+  if (typeof this.actual != 'function') {
+    throw new Error('Actual is not a function');
+  }
+  try {
+    this.actual();
+  } catch (e) {
+    exception = e;
+  }
+  if (exception) {
+    result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
+  }
+
+  var not = this.isNot ? "not " : "";
+
+  this.message = function() {
+    if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
+      return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
+    } else {
+      return "Expected function to throw an exception.";
+    }
+  };
+
+  return result;
+};
+
+jasmine.Matchers.Any = function(expectedClass) {
+  this.expectedClass = expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.jasmineMatches = function(other) {
+  if (this.expectedClass == String) {
+    return typeof other == 'string' || other instanceof String;
+  }
+
+  if (this.expectedClass == Number) {
+    return typeof other == 'number' || other instanceof Number;
+  }
+
+  if (this.expectedClass == Function) {
+    return typeof other == 'function' || other instanceof Function;
+  }
+
+  if (this.expectedClass == Object) {
+    return typeof other == 'object';
+  }
+
+  return other instanceof this.expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.jasmineToString = function() {
+  return '<jasmine.any(' + this.expectedClass + ')>';
+};
+
+jasmine.Matchers.ObjectContaining = function (sample) {
+  this.sample = sample;
+};
+
+jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
+  mismatchKeys = mismatchKeys || [];
+  mismatchValues = mismatchValues || [];
+
+  var env = jasmine.getEnv();
+
+  var hasKey = function(obj, keyName) {
+    return obj != null && obj[keyName] !== jasmine.undefined;
+  };
+
+  for (var property in this.sample) {
+    if (!hasKey(other, property) && hasKey(this.sample, property)) {
+      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+    }
+    else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
+      mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
+    }
+  }
+
+  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+};
+
+jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () {
+  return "<jasmine.objectContaining(" + jasmine.pp(this.sample) + ")>";
+};
+// Mock setTimeout, clearTimeout
+// Contributed by Pivotal Computer Systems, www.pivotalsf.com
+
+jasmine.FakeTimer = function() {
+  this.reset();
+
+  var self = this;
+  self.setTimeout = function(funcToCall, millis) {
+    self.timeoutsMade++;
+    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
+    return self.timeoutsMade;
+  };
+
+  self.setInterval = function(funcToCall, millis) {
+    self.timeoutsMade++;
+    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
+    return self.timeoutsMade;
+  };
+
+  self.clearTimeout = function(timeoutKey) {
+    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+  };
+
+  self.clearInterval = function(timeoutKey) {
+    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+  };
+
+};
+
+jasmine.FakeTimer.prototype.reset = function() {
+  this.timeoutsMade = 0;
+  this.scheduledFunctions = {};
+  this.nowMillis = 0;
+};
+
+jasmine.FakeTimer.prototype.tick = function(millis) {
+  var oldMillis = this.nowMillis;
+  var newMillis = oldMillis + millis;
+  this.runFunctionsWithinRange(oldMillis, newMillis);
+  this.nowMillis = newMillis;
+};
+
+jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
+  var scheduledFunc;
+  var funcsToRun = [];
+  for (var timeoutKey in this.scheduledFunctions) {
+    scheduledFunc = this.scheduledFunctions[timeoutKey];
+    if (scheduledFunc != jasmine.undefined &&
+        scheduledFunc.runAtMillis >= oldMillis &&
+        scheduledFunc.runAtMillis <= nowMillis) {
+      funcsToRun.push(scheduledFunc);
+      this.scheduledFunctions[timeoutKey] = jasmine.undefined;
+    }
+  }
+
+  if (funcsToRun.length > 0) {
+    funcsToRun.sort(function(a, b) {
+      return a.runAtMillis - b.runAtMillis;
+    });
+    for (var i = 0; i < funcsToRun.length; ++i) {
+      try {
+        var funcToRun = funcsToRun[i];
+        this.nowMillis = funcToRun.runAtMillis;
+        funcToRun.funcToCall();
+        if (funcToRun.recurring) {
+          this.scheduleFunction(funcToRun.timeoutKey,
+              funcToRun.funcToCall,
+              funcToRun.millis,
+              true);
+        }
+      } catch(e) {
+      }
+    }
+    this.runFunctionsWithinRange(oldMillis, nowMillis);
+  }
+};
+
+jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+  this.scheduledFunctions[timeoutKey] = {
+    runAtMillis: this.nowMillis + millis,
+    funcToCall: funcToCall,
+    recurring: recurring,
+    timeoutKey: timeoutKey,
+    millis: millis
+  };
+};
+
+/**
+ * @namespace
+ */
+jasmine.Clock = {
+  defaultFakeTimer: new jasmine.FakeTimer(),
+
+  reset: function() {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.defaultFakeTimer.reset();
+  },
+
+  tick: function(millis) {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.defaultFakeTimer.tick(millis);
+  },
+
+  runFunctionsWithinRange: function(oldMillis, nowMillis) {
+    jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
+  },
+
+  scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
+    jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
+  },
+
+  useMock: function() {
+    if (!jasmine.Clock.isInstalled()) {
+      var spec = jasmine.getEnv().currentSpec;
+      spec.after(jasmine.Clock.uninstallMock);
+
+      jasmine.Clock.installMock();
+    }
+  },
+
+  installMock: function() {
+    jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
+  },
+
+  uninstallMock: function() {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.installed = jasmine.Clock.real;
+  },
+
+  real: {
+    setTimeout: jasmine.getGlobal().setTimeout,
+    clearTimeout: jasmine.getGlobal().clearTimeout,
+    setInterval: jasmine.getGlobal().setInterval,
+    clearInterval: jasmine.getGlobal().clearInterval
+  },
+
+  assertInstalled: function() {
+    if (!jasmine.Clock.isInstalled()) {
+      throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
+    }
+  },
+
+  isInstalled: function() {
+    return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
+  },
+
+  installed: null
+};
+jasmine.Clock.installed = jasmine.Clock.real;
+
+//else for IE support
+jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
+  if (jasmine.Clock.installed.setTimeout.apply) {
+    return jasmine.Clock.installed.setTimeout.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.setTimeout(funcToCall, millis);
+  }
+};
+
+jasmine.getGlobal().setInterval = function(funcToCall, millis) {
+  if (jasmine.Clock.installed.setInterval.apply) {
+    return jasmine.Clock.installed.setInterval.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.setInterval(funcToCall, millis);
+  }
+};
+
+jasmine.getGlobal().clearTimeout = function(timeoutKey) {
+  if (jasmine.Clock.installed.clearTimeout.apply) {
+    return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.clearTimeout(timeoutKey);
+  }
+};
+
+jasmine.getGlobal().clearInterval = function(timeoutKey) {
+  if (jasmine.Clock.installed.clearTimeout.apply) {
+    return jasmine.Clock.installed.clearInterval.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.clearInterval(timeoutKey);
+  }
+};
+
+/**
+ * @constructor
+ */
+jasmine.MultiReporter = function() {
+  this.subReporters_ = [];
+};
+jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
+
+jasmine.MultiReporter.prototype.addReporter = function(reporter) {
+  this.subReporters_.push(reporter);
+};
+
+(function() {
+  var functionNames = [
+    "reportRunnerStarting",
+    "reportRunnerResults",
+    "reportSuiteResults",
+    "reportSpecStarting",
+    "reportSpecResults",
+    "log"
+  ];
+  for (var i = 0; i < functionNames.length; i++) {
+    var functionName = functionNames[i];
+    jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
+      return function() {
+        for (var j = 0; j < this.subReporters_.length; j++) {
+          var subReporter = this.subReporters_[j];
+          if (subReporter[functionName]) {
+            subReporter[functionName].apply(subReporter, arguments);
+          }
+        }
+      };
+    })(functionName);
+  }
+})();
+/**
+ * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
+ *
+ * @constructor
+ */
+jasmine.NestedResults = function() {
+  /**
+   * The total count of results
+   */
+  this.totalCount = 0;
+  /**
+   * Number of passed results
+   */
+  this.passedCount = 0;
+  /**
+   * Number of failed results
+   */
+  this.failedCount = 0;
+  /**
+   * Was this suite/spec skipped?
+   */
+  this.skipped = false;
+  /**
+   * @ignore
+   */
+  this.items_ = [];
+};
+
+/**
+ * Roll up the result counts.
+ *
+ * @param result
+ */
+jasmine.NestedResults.prototype.rollupCounts = function(result) {
+  this.totalCount += result.totalCount;
+  this.passedCount += result.passedCount;
+  this.failedCount += result.failedCount;
+};
+
+/**
+ * Adds a log message.
+ * @param values Array of message parts which will be concatenated later.
+ */
+jasmine.NestedResults.prototype.log = function(values) {
+  this.items_.push(new jasmine.MessageResult(values));
+};
+
+/**
+ * Getter for the results: message & results.
+ */
+jasmine.NestedResults.prototype.getItems = function() {
+  return this.items_;
+};
+
+/**
+ * Adds a result, tracking counts (total, passed, & failed)
+ * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ */
+jasmine.NestedResults.prototype.addResult = function(result) {
+  if (result.type != 'log') {
+    if (result.items_) {
+      this.rollupCounts(result);
+    } else {
+      this.totalCount++;
+      if (result.passed()) {
+        this.passedCount++;
+      } else {
+        this.failedCount++;
+      }
+    }
+  }
+  this.items_.push(result);
+};
+
+/**
+ * @returns {Boolean} True if <b>everything</b> below passed
+ */
+jasmine.NestedResults.prototype.passed = function() {
+  return this.passedCount === this.totalCount;
+};
+/**
+ * Base class for pretty printing for expectation results.
+ */
+jasmine.PrettyPrinter = function() {
+  this.ppNestLevel_ = 0;
+};
+
+/**
+ * Formats a value in a nice, human-readable string.
+ *
+ * @param value
+ */
+jasmine.PrettyPrinter.prototype.format = function(value) {
+  if (this.ppNestLevel_ > 40) {
+    throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
+  }
+
+  this.ppNestLevel_++;
+  try {
+    if (value === jasmine.undefined) {
+      this.emitScalar('undefined');
+    } else if (value === null) {
+      this.emitScalar('null');
+    } else if (value === jasmine.getGlobal()) {
+      this.emitScalar('<global>');
+    } else if (value.jasmineToString) {
+      this.emitScalar(value.jasmineToString());
+    } else if (typeof value === 'string') {
+      this.emitString(value);
+    } else if (jasmine.isSpy(value)) {
+      this.emitScalar("spy on " + value.identity);
+    } else if (value instanceof RegExp) {
+      this.emitScalar(value.toString());
+    } else if (typeof value === 'function') {
+      this.emitScalar('Function');
+    } else if (typeof value.nodeType === 'number') {
+      this.emitScalar('HTMLNode');
+    } else if (value instanceof Date) {
+      this.emitScalar('Date(' + value + ')');
+    } else if (value.__Jasmine_been_here_before__) {
+      this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
+    } else if (jasmine.isArray_(value) || typeof value == 'object') {
+      value.__Jasmine_been_here_before__ = true;
+      if (jasmine.isArray_(value)) {
+        this.emitArray(value);
+      } else {
+        this.emitObject(value);
+      }
+      delete value.__Jasmine_been_here_before__;
+    } else {
+      this.emitScalar(value.toString());
+    }
+  } finally {
+    this.ppNestLevel_--;
+  }
+};
+
+jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+  for (var property in obj) {
+    if (property == '__Jasmine_been_here_before__') continue;
+    fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && 
+                                         obj.__lookupGetter__(property) !== null) : false);
+  }
+};
+
+jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
+
+jasmine.StringPrettyPrinter = function() {
+  jasmine.PrettyPrinter.call(this);
+
+  this.string = '';
+};
+jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
+
+jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
+  this.append(value);
+};
+
+jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
+  this.append("'" + value + "'");
+};
+
+jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
+  this.append('[ ');
+  for (var i = 0; i < array.length; i++) {
+    if (i > 0) {
+      this.append(', ');
+    }
+    this.format(array[i]);
+  }
+  this.append(' ]');
+};
+
+jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
+  var self = this;
+  this.append('{ ');
+  var first = true;
+
+  this.iterateObject(obj, function(property, isGetter) {
+    if (first) {
+      first = false;
+    } else {
+      self.append(', ');
+    }
+
+    self.append(property);
+    self.append(' : ');
+    if (isGetter) {
+      self.append('<getter>');
+    } else {
+      self.format(obj[property]);
+    }
+  });
+
+  this.append(' }');
+};
+
+jasmine.StringPrettyPrinter.prototype.append = function(value) {
+  this.string += value;
+};
+jasmine.Queue = function(env) {
+  this.env = env;
+  this.blocks = [];
+  this.running = false;
+  this.index = 0;
+  this.offset = 0;
+  this.abort = false;
+};
+
+jasmine.Queue.prototype.addBefore = function(block) {
+  this.blocks.unshift(block);
+};
+
+jasmine.Queue.prototype.add = function(block) {
+  this.blocks.push(block);
+};
+
+jasmine.Queue.prototype.insertNext = function(block) {
+  this.blocks.splice((this.index + this.offset + 1), 0, block);
+  this.offset++;
+};
+
+jasmine.Queue.prototype.start = function(onComplete) {
+  this.running = true;
+  this.onComplete = onComplete;
+  this.next_();
+};
+
+jasmine.Queue.prototype.isRunning = function() {
+  return this.running;
+};
+
+jasmine.Queue.LOOP_DONT_RECURSE = true;
+
+jasmine.Queue.prototype.next_ = function() {
+  var self = this;
+  var goAgain = true;
+
+  while (goAgain) {
+    goAgain = false;
+    
+    if (self.index < self.blocks.length && !this.abort) {
+      var calledSynchronously = true;
+      var completedSynchronously = false;
+
+      var onComplete = function () {
+        if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
+          completedSynchronously = true;
+          return;
+        }
+
+        if (self.blocks[self.index].abort) {
+          self.abort = true;
+        }
+
+        self.offset = 0;
+        self.index++;
+
+        var now = new Date().getTime();
+        if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
+          self.env.lastUpdate = now;
+          self.env.setTimeout(function() {
+            self.next_();
+          }, 0);
+        } else {
+          if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
+            goAgain = true;
+          } else {
+            self.next_();
+          }
+        }
+      };
+      self.blocks[self.index].execute(onComplete);
+
+      calledSynchronously = false;
+      if (completedSynchronously) {
+        onComplete();
+      }
+      
+    } else {
+      self.running = false;
+      if (self.onComplete) {
+        self.onComplete();
+      }
+    }
+  }
+};
+
+jasmine.Queue.prototype.results = function() {
+  var results = new jasmine.NestedResults();
+  for (var i = 0; i < this.blocks.length; i++) {
+    if (this.blocks[i].results) {
+      results.addResult(this.blocks[i].results());
+    }
+  }
+  return results;
+};
+
+
+/**
+ * Runner
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ */
+jasmine.Runner = function(env) {
+  var self = this;
+  self.env = env;
+  self.queue = new jasmine.Queue(env);
+  self.before_ = [];
+  self.after_ = [];
+  self.suites_ = [];
+};
+
+jasmine.Runner.prototype.execute = function() {
+  var self = this;
+  if (self.env.reporter.reportRunnerStarting) {
+    self.env.reporter.reportRunnerStarting(this);
+  }
+  self.queue.start(function () {
+    self.finishCallback();
+  });
+};
+
+jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
+  beforeEachFunction.typeName = 'beforeEach';
+  this.before_.splice(0,0,beforeEachFunction);
+};
+
+jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
+  afterEachFunction.typeName = 'afterEach';
+  this.after_.splice(0,0,afterEachFunction);
+};
+
+
+jasmine.Runner.prototype.finishCallback = function() {
+  this.env.reporter.reportRunnerResults(this);
+};
+
+jasmine.Runner.prototype.addSuite = function(suite) {
+  this.suites_.push(suite);
+};
+
+jasmine.Runner.prototype.add = function(block) {
+  if (block instanceof jasmine.Suite) {
+    this.addSuite(block);
+  }
+  this.queue.add(block);
+};
+
+jasmine.Runner.prototype.specs = function () {
+  var suites = this.suites();
+  var specs = [];
+  for (var i = 0; i < suites.length; i++) {
+    specs = specs.concat(suites[i].specs());
+  }
+  return specs;
+};
+
+jasmine.Runner.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.Runner.prototype.topLevelSuites = function() {
+  var topLevelSuites = [];
+  for (var i = 0; i < this.suites_.length; i++) {
+    if (!this.suites_[i].parentSuite) {
+      topLevelSuites.push(this.suites_[i]);
+    }
+  }
+  return topLevelSuites;
+};
+
+jasmine.Runner.prototype.results = function() {
+  return this.queue.results();
+};
+/**
+ * Internal representation of a Jasmine specification, or test.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {jasmine.Suite} suite
+ * @param {String} description
+ */
+jasmine.Spec = function(env, suite, description) {
+  if (!env) {
+    throw new Error('jasmine.Env() required');
+  }
+  if (!suite) {
+    throw new Error('jasmine.Suite() required');
+  }
+  var spec = this;
+  spec.id = env.nextSpecId ? env.nextSpecId() : null;
+  spec.env = env;
+  spec.suite = suite;
+  spec.description = description;
+  spec.queue = new jasmine.Queue(env);
+
+  spec.afterCallbacks = [];
+  spec.spies_ = [];
+
+  spec.results_ = new jasmine.NestedResults();
+  spec.results_.description = description;
+  spec.matchersClass = null;
+};
+
+jasmine.Spec.prototype.getFullName = function() {
+  return this.suite.getFullName() + ' ' + this.description + '.';
+};
+
+
+jasmine.Spec.prototype.results = function() {
+  return this.results_;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.Spec.prototype.log = function() {
+  return this.results_.log(arguments);
+};
+
+jasmine.Spec.prototype.runs = function (func) {
+  var block = new jasmine.Block(this.env, func, this);
+  this.addToQueue(block);
+  return this;
+};
+
+jasmine.Spec.prototype.addToQueue = function (block) {
+  if (this.queue.isRunning()) {
+    this.queue.insertNext(block);
+  } else {
+    this.queue.add(block);
+  }
+};
+
+/**
+ * @param {jasmine.ExpectationResult} result
+ */
+jasmine.Spec.prototype.addMatcherResult = function(result) {
+  this.results_.addResult(result);
+};
+
+jasmine.Spec.prototype.expect = function(actual) {
+  var positive = new (this.getMatchersClass_())(this.env, actual, this);
+  positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
+  return positive;
+};
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+jasmine.Spec.prototype.waits = function(timeout) {
+  var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
+  this.addToQueue(waitsFunc);
+  return this;
+};
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+  var latchFunction_ = null;
+  var optional_timeoutMessage_ = null;
+  var optional_timeout_ = null;
+
+  for (var i = 0; i < arguments.length; i++) {
+    var arg = arguments[i];
+    switch (typeof arg) {
+      case 'function':
+        latchFunction_ = arg;
+        break;
+      case 'string':
+        optional_timeoutMessage_ = arg;
+        break;
+      case 'number':
+        optional_timeout_ = arg;
+        break;
+    }
+  }
+
+  var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
+  this.addToQueue(waitsForFunc);
+  return this;
+};
+
+jasmine.Spec.prototype.fail = function (e) {
+  var expectationResult = new jasmine.ExpectationResult({
+    passed: false,
+    message: e ? jasmine.util.formatException(e) : 'Exception',
+    trace: { stack: e.stack }
+  });
+  this.results_.addResult(expectationResult);
+};
+
+jasmine.Spec.prototype.getMatchersClass_ = function() {
+  return this.matchersClass || this.env.matchersClass;
+};
+
+jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
+  var parent = this.getMatchersClass_();
+  var newMatchersClass = function() {
+    parent.apply(this, arguments);
+  };
+  jasmine.util.inherit(newMatchersClass, parent);
+  jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
+  this.matchersClass = newMatchersClass;
+};
+
+jasmine.Spec.prototype.finishCallback = function() {
+  this.env.reporter.reportSpecResults(this);
+};
+
+jasmine.Spec.prototype.finish = function(onComplete) {
+  this.removeAllSpies();
+  this.finishCallback();
+  if (onComplete) {
+    onComplete();
+  }
+};
+
+jasmine.Spec.prototype.after = function(doAfter) {
+  if (this.queue.isRunning()) {
+    this.queue.add(new jasmine.Block(this.env, doAfter, this));
+  } else {
+    this.afterCallbacks.unshift(doAfter);
+  }
+};
+
+jasmine.Spec.prototype.execute = function(onComplete) {
+  var spec = this;
+  if (!spec.env.specFilter(spec)) {
+    spec.results_.skipped = true;
+    spec.finish(onComplete);
+    return;
+  }
+
+  this.env.reporter.reportSpecStarting(this);
+
+  spec.env.currentSpec = spec;
+
+  spec.addBeforesAndAftersToQueue();
+
+  spec.queue.start(function () {
+    spec.finish(onComplete);
+  });
+};
+
+jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
+  var runner = this.env.currentRunner();
+  var i;
+
+  for (var suite = this.suite; suite; suite = suite.parentSuite) {
+    for (i = 0; i < suite.before_.length; i++) {
+      this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
+    }
+  }
+  for (i = 0; i < runner.before_.length; i++) {
+    this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
+  }
+  for (i = 0; i < this.afterCallbacks.length; i++) {
+    this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
+  }
+  for (suite = this.suite; suite; suite = suite.parentSuite) {
+    for (i = 0; i < suite.after_.length; i++) {
+      this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
+    }
+  }
+  for (i = 0; i < runner.after_.length; i++) {
+    this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
+  }
+};
+
+jasmine.Spec.prototype.explodes = function() {
+  throw 'explodes function should not have been called';
+};
+
+jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
+  if (obj == jasmine.undefined) {
+    throw "spyOn could not find an object to spy upon for " + methodName + "()";
+  }
+
+  if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
+    throw methodName + '() method does not exist';
+  }
+
+  if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
+    throw new Error(methodName + ' has already been spied upon');
+  }
+
+  var spyObj = jasmine.createSpy(methodName);
+
+  this.spies_.push(spyObj);
+  spyObj.baseObj = obj;
+  spyObj.methodName = methodName;
+  spyObj.originalValue = obj[methodName];
+
+  obj[methodName] = spyObj;
+
+  return spyObj;
+};
+
+jasmine.Spec.prototype.removeAllSpies = function() {
+  for (var i = 0; i < this.spies_.length; i++) {
+    var spy = this.spies_[i];
+    spy.baseObj[spy.methodName] = spy.originalValue;
+  }
+  this.spies_ = [];
+};
+
+/**
+ * Internal representation of a Jasmine suite.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {String} description
+ * @param {Function} specDefinitions
+ * @param {jasmine.Suite} parentSuite
+ */
+jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
+  var self = this;
+  self.id = env.nextSuiteId ? env.nextSuiteId() : null;
+  self.description = description;
+  self.queue = new jasmine.Queue(env);
+  self.parentSuite = parentSuite;
+  self.env = env;
+  self.before_ = [];
+  self.after_ = [];
+  self.children_ = [];
+  self.suites_ = [];
+  self.specs_ = [];
+};
+
+jasmine.Suite.prototype.getFullName = function() {
+  var fullName = this.description;
+  for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+    fullName = parentSuite.description + ' ' + fullName;
+  }
+  return fullName;
+};
+
+jasmine.Suite.prototype.finish = function(onComplete) {
+  this.env.reporter.reportSuiteResults(this);
+  this.finished = true;
+  if (typeof(onComplete) == 'function') {
+    onComplete();
+  }
+};
+
+jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
+  beforeEachFunction.typeName = 'beforeEach';
+  this.before_.unshift(beforeEachFunction);
+};
+
+jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
+  afterEachFunction.typeName = 'afterEach';
+  this.after_.unshift(afterEachFunction);
+};
+
+jasmine.Suite.prototype.results = function() {
+  return this.queue.results();
+};
+
+jasmine.Suite.prototype.add = function(suiteOrSpec) {
+  this.children_.push(suiteOrSpec);
+  if (suiteOrSpec instanceof jasmine.Suite) {
+    this.suites_.push(suiteOrSpec);
+    this.env.currentRunner().addSuite(suiteOrSpec);
+  } else {
+    this.specs_.push(suiteOrSpec);
+  }
+  this.queue.add(suiteOrSpec);
+};
+
+jasmine.Suite.prototype.specs = function() {
+  return this.specs_;
+};
+
+jasmine.Suite.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.Suite.prototype.children = function() {
+  return this.children_;
+};
+
+jasmine.Suite.prototype.execute = function(onComplete) {
+  var self = this;
+  this.queue.start(function () {
+    self.finish(onComplete);
+  });
+};
+jasmine.WaitsBlock = function(env, timeout, spec) {
+  this.timeout = timeout;
+  jasmine.Block.call(this, env, null, spec);
+};
+
+jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
+
+jasmine.WaitsBlock.prototype.execute = function (onComplete) {
+  if (jasmine.VERBOSE) {
+    this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
+  }
+  this.env.setTimeout(function () {
+    onComplete();
+  }, this.timeout);
+};
+/**
+ * A block which waits for some condition to become true, with timeout.
+ *
+ * @constructor
+ * @extends jasmine.Block
+ * @param {jasmine.Env} env The Jasmine environment.
+ * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
+ * @param {Function} latchFunction A function which returns true when the desired condition has been met.
+ * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
+ * @param {jasmine.Spec} spec The Jasmine spec.
+ */
+jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
+  this.timeout = timeout || env.defaultTimeoutInterval;
+  this.latchFunction = latchFunction;
+  this.message = message;
+  this.totalTimeSpentWaitingForLatch = 0;
+  jasmine.Block.call(this, env, null, spec);
+};
+jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
+
+jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
+
+jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
+  if (jasmine.VERBOSE) {
+    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
+  }
+  var latchFunctionResult;
+  try {
+    latchFunctionResult = this.latchFunction.apply(this.spec);
+  } catch (e) {
+    this.spec.fail(e);
+    onComplete();
+    return;
+  }
+
+  if (latchFunctionResult) {
+    onComplete();
+  } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
+    var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
+    this.spec.fail({
+      name: 'timeout',
+      message: message
+    });
+
+    this.abort = true;
+    onComplete();
+  } else {
+    this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
+    var self = this;
+    this.env.setTimeout(function() {
+      self.execute(onComplete);
+    }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
+  }
+};
+
+jasmine.version_= {
+  "major": 1,
+  "minor": 2,
+  "build": 0,
+  "revision": 1333310630,
+  "release_candidate": 1
+};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html b/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
new file mode 100644
index 0000000..7252e67
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/pages/device.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<!--
+
+ 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.
+
+-->
+
+
+<html>
+
+<head>
+  <title>Cordova: Device API Specs</title>
+
+  <meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=1.0;" />
+  <!-- Load jasmine -->
+  <link href="../jasmine.css" rel="stylesheet"/>
+  <script type="text/javascript" src="../jasmine.js"></script>
+  <script type="text/javascript" src="../html/HtmlReporterHelpers.js"></script>
+  <script type="text/javascript" src="../html/HtmlReporter.js"></script>
+  <script type="text/javascript" src="../html/ReporterView.js"></script>
+  <script type="text/javascript" src="../html/SpecView.js"></script>
+  <script type="text/javascript" src="../html/SuiteView.js"></script>
+  <script type="text/javascript" src="../html/TrivialReporter.js"></script>
+
+  <!-- Source -->
+  <script type="text/javascript" src="../../cordova-incl.js"></script>
+
+  <!-- Load Test Runner -->
+  <script type="text/javascript" src="../test-runner.js"></script>
+
+  <!-- Tests -->
+  <script type="text/javascript" src="../tests/device.tests.js"></script>
+
+  <script type="text/javascript">
+    document.addEventListener('deviceready', function () {
+      var jasmineEnv = jasmine.getEnv();
+      jasmineEnv.updateInterval = 1000;
+
+      var htmlReporter = new jasmine.HtmlReporter();
+
+      jasmineEnv.addReporter(htmlReporter);
+
+      jasmineEnv.specFilter = function(spec) {
+        return htmlReporter.specFilter(spec);
+      };
+
+      jasmineEnv.execute();
+    }, false);
+  </script>
+</head>
+
+<body>
+  <a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
+</body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
new file mode 100644
index 0000000..f72b3cc
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/test-runner.js
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+if (window.sessionStorage != null) {
+    window.sessionStorage.clear();
+}
+
+// Timeout is 2 seconds to allow physical devices enough
+// time to query the response. This is important for some
+// Android devices.
+var Tests = function() {};
+Tests.TEST_TIMEOUT = 7500;
+
+// Creates a spy that will fail if called.
+function createDoNotCallSpy(name, opt_extraMessage) {
+    return jasmine.createSpy().andCallFake(function() {
+        var errorMessage = name + ' should not have been called.';
+        if (arguments.length) {
+            errorMessage += ' Got args: ' + JSON.stringify(arguments);
+        }
+        if (opt_extraMessage) {
+            errorMessage += '\n' + opt_extraMessage;
+        }
+        expect(false).toBe(true, errorMessage);
+    });
+}
+
+// Waits for any of the given spys to be called.
+// Last param may be a custom timeout duration.
+function waitsForAny() {
+    var spys = [].slice.call(arguments);
+    var timeout = Tests.TEST_TIMEOUT;
+    if (typeof spys[spys.length - 1] == 'number') {
+        timeout = spys.pop();
+    }
+    waitsFor(function() {
+        for (var i = 0; i < spys.length; ++i) {
+            if (spys[i].wasCalled) {
+                return true;
+            }
+        }
+        return false;
+    }, "Expecting callbacks to be called.", timeout);
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
new file mode 100644
index 0000000..0bcd0d9
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/tests/device.tests.js
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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('Device Information (window.device)', function () {
+	it("should exist", function() {
+        expect(window.device).toBeDefined();
+	});
+
+	it("should contain a platform specification that is a string", function() {
+        expect(window.device.platform).toBeDefined();
+		expect((new String(window.device.platform)).length > 0).toBe(true);
+	});
+
+	it("should contain a version specification that is a string", function() {
+        expect(window.device.version).toBeDefined();
+		expect((new String(window.device.version)).length > 0).toBe(true);
+	});
+
+	it("should contain a UUID specification that is a string or a number", function() {
+        expect(window.device.uuid).toBeDefined();
+		if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') {
+		    expect((new String(window.device.uuid)).length > 0).toBe(true);
+		} else {
+			expect(window.device.uuid > 0).toBe(true);
+		}
+	});
+
+	it("should contain a cordova specification that is a string", function() {
+        expect(window.device.cordova).toBeDefined();
+		expect((new String(window.device.cordova)).length > 0).toBe(true);
+	});
+
+    it("should depend on the precense of cordova.version string", function() {
+            expect(window.cordova.version).toBeDefined();
+            expect((new String(window.cordova.version)).length > 0).toBe(true);
+    });
+
+    it("should contain device.cordova equal to cordova.version", function() {
+             expect(window.device.cordova).toBe(window.cordova.version);
+    });
+
+	it("should contain a model specification that is a string", function() {
+        expect(window.device.model).toBeDefined();
+		expect((new String(window.device.model)).length > 0).toBe(true);
+	});
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js b/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
new file mode 100644
index 0000000..a82c590
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/cordova-incl.js
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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 PLAT;
+(function getPlatform() {
+    var platforms = {
+        android: /Android/,
+        ios: /(iPad)|(iPhone)|(iPod)/,
+        blackberry10: /(BB10)/,
+        blackberry: /(PlayBook)|(BlackBerry)/,
+        windows8: /MSAppHost/,
+        windowsphone: /Windows Phone/
+    };
+    for (var key in platforms) {
+        if (platforms[key].exec(navigator.userAgent)) {
+            PLAT = key;
+            break;
+        }
+    }
+})();
+
+var scripts = document.getElementsByTagName('script');
+var currentPath = scripts[scripts.length - 1].src;
+var platformCordovaPath = currentPath.replace("cordova-incl.js", "cordova." + PLAT + ".js");
+var normalCordovaPath = currentPath.replace("cordova-incl.js", "cordova.js");
+var cordovaPath = normalCordovaPath;
+
+if (PLAT) {
+    // XHR to local file is an error on some platforms, windowsphone for one 
+    try {
+        var xhr = new XMLHttpRequest();
+        xhr.open("GET", platformCordovaPath, false);
+        xhr.onreadystatechange = function() {
+
+            if (this.readyState == this.DONE && this.responseText.length > 0) {
+                if(parseInt(this.status) >= 400){
+                    cordovaPath = normalCordovaPath;
+                }else{
+                    cordovaPath = platformCordovaPath;
+                }
+            }
+        };
+        xhr.send(null);
+    }
+    catch(e){
+        cordovaPath = normalCordovaPath;
+    } // access denied!
+}
+
+if (!window._doNotWriteCordovaScript) {
+    if (PLAT != "windows8") {
+        document.write('<script type="text/javascript" charset="utf-8" src="' + cordovaPath + '"></script>');
+    } else {
+        var s = document.createElement('script');
+        s.src = cordovaPath;
+        document.head.appendChild(s);
+    }
+}
+
+function backHome() {
+    if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
+        navigator.app.backHistory();
+    }
+    else {
+        window.history.go(-1);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/index.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/index.html b/test/cordova/plugins/org.apache.cordova.device/test/index.html
new file mode 100644
index 0000000..82f6d3b
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/index.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!--
+
+ 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.
+
+-->
+
+
+<html>
+  <head>
+    <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <title>Cordova Mobile Spec</title>
+	  <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+	  <script type="text/javascript" charset="utf-8" src="cordova-incl.js"></script>
+	  <script type="text/javascript" charset="utf-8" src="main.js"></script>
+
+  </head>
+  <body onload="init();" id="stage" class="theme">
+    <h1>Apache Cordova Tests</h1>
+    <div id="info">
+        <h4>cordova.version: <span id="cordova"> </span></h4>
+        <h4>Platform: <span id="platform">  </span></h4>
+        <h4>Version: <span id="version"> </span></h4>
+        <h4>UUID: <span id="uuid">  </span></h4>
+        <h4>Model: <span id="model"> </span></h4>
+        <h4>Width: <span id="width">  </span>,   Height: <span id="height">
+                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+        <h4>User-Agent: <span id="user-agent"> </span></h4>
+     </div>
+    <a href="autotest/index.html" class="btn large">Automatic Test</a>
+    <a href="accelerometer/index.html" class="btn large">Accelerometer</a>
+    <a href="audio/index.html" class="btn large">Audio Play/Record</a>
+    <a href="battery/index.html" class="btn large">Battery</a>
+    <a href="camera/index.html" class="btn large">Camera</a>
+    <a href="capture/index.html" class="btn large">Capture</a>
+    <a href="compass/index.html" class="btn large">Compass</a>
+    <a href="contacts/index.html" class="btn large">Contacts</a>
+    <a href="events/index.html" class="btn large">Events</a>
+    <a href="location/index.html" class="btn large">Location</a>
+    <a href="lazyloadjs/index.html" class="btn large">Lazy Loading of cordova-incl.js</a>
+    <a href="misc/index.html" class="btn large">Misc Content</a>
+    <a href="network/index.html" class="btn large">Network</a>
+    <a href="notification/index.html" class="btn large">Notification</a>
+    <a href="splashscreen/index.html" class="btn large">Splashscreen</a>
+    <a href="sql/index.html" class="btn large">Web SQL</a>
+    <a href="storage/index.html" class="btn large">Local Storage</a>
+    <a href="benchmarks/index.html" class="btn large">Benchmarks</a>
+    <a href="inappbrowser/index.html" class="btn large">In App Browser</a>
+  </body>
+</html>


[11/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
new file mode 100644
index 0000000..167ac50
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/TrivialReporter.js
@@ -0,0 +1,192 @@
+/* @deprecated Use jasmine.HtmlReporter instead
+ */
+jasmine.TrivialReporter = function(doc) {
+  this.document = doc || document;
+  this.suiteDivs = {};
+  this.logRunningSpecs = false;
+};
+
+jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) { el.appendChild(child); }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
+  var showPassed, showSkipped;
+
+  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
+      this.createDom('div', { className: 'banner' },
+        this.createDom('div', { className: 'logo' },
+            this.createDom('span', { className: 'title' }, "Jasmine"),
+            this.createDom('span', { className: 'version' }, runner.env.versionString())),
+        this.createDom('div', { className: 'options' },
+            "Show ",
+            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
+            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
+            )
+          ),
+
+      this.runnerDiv = this.createDom('div', { className: 'runner running' },
+          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
+          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
+          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
+      );
+
+  this.document.body.appendChild(this.outerDiv);
+
+  var suites = runner.suites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    var suiteDiv = this.createDom('div', { className: 'suite' },
+        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
+        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
+    this.suiteDivs[suite.id] = suiteDiv;
+    var parentDiv = this.outerDiv;
+    if (suite.parentSuite) {
+      parentDiv = this.suiteDivs[suite.parentSuite.id];
+    }
+    parentDiv.appendChild(suiteDiv);
+  }
+
+  this.startedAt = new Date();
+
+  var self = this;
+  showPassed.onclick = function(evt) {
+    if (showPassed.checked) {
+      self.outerDiv.className += ' show-passed';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
+    }
+  };
+
+  showSkipped.onclick = function(evt) {
+    if (showSkipped.checked) {
+      self.outerDiv.className += ' show-skipped';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
+    }
+  };
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
+  var results = runner.results();
+  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
+  this.runnerDiv.setAttribute("class", className);
+  //do it twice for IE
+  this.runnerDiv.setAttribute("className", className);
+  var specs = runner.specs();
+  var specCount = 0;
+  for (var i = 0; i < specs.length; i++) {
+    if (this.specFilter(specs[i])) {
+      specCount++;
+    }
+  }
+  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
+  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
+  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
+
+  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
+};
+
+jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
+  var results = suite.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.totalCount === 0) { // todo: change this to check results.skipped
+    status = 'skipped';
+  }
+  this.suiteDivs[suite.id].className += " " + status;
+};
+
+jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
+  if (this.logRunningSpecs) {
+    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+  }
+};
+
+jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
+  var results = spec.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+  var specDiv = this.createDom('div', { className: 'spec '  + status },
+      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(spec.getFullName()),
+        title: spec.getFullName()
+      }, spec.description));
+
+
+  var resultItems = results.getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    specDiv.appendChild(messagesDiv);
+  }
+
+  this.suiteDivs[spec.suite.id].appendChild(specDiv);
+};
+
+jasmine.TrivialReporter.prototype.log = function() {
+  var console = jasmine.getGlobal().console;
+  if (console && console.log) {
+    if (console.log.apply) {
+      console.log.apply(console, arguments);
+    } else {
+      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+    }
+  }
+};
+
+jasmine.TrivialReporter.prototype.getLocation = function() {
+  return this.document.location;
+};
+
+jasmine.TrivialReporter.prototype.specFilter = function(spec) {
+  var paramMap = {};
+  var params = this.getLocation().search.substring(1).split('&');
+  for (var i = 0; i < params.length; i++) {
+    var p = params[i].split('=');
+    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+  }
+
+  if (!paramMap.spec) {
+    return true;
+  }
+  return spec.getFullName().indexOf(paramMap.spec) === 0;
+};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html b/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
new file mode 100644
index 0000000..6ebccbd
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/index.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+
+ 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.
+
+-->
+
+
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes, initial-scale=1.0;" />
+
+    <title>Cordova API Specs</title>
+
+    <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+    <script type="text/javascript" src="../cordova-incl.js"></script>
+  </head>
+  <body id="stage" class="theme">
+    <h1>Cordova API Specs</h1>
+
+    <a href="pages/all.html" class="btn large" style="width:100%;">Run All Tests</a>
+    <a href="pages/accelerometer.html" class="btn large" style="width:100%;">Run Accelerometer Tests</a>
+    <a href="pages/battery.html" class="btn large" style="width:100%;">Run Battery Tests</a>
+    <a href="pages/camera.html" class="btn large" style="width:100%;">Run Camera Tests</a>
+    <a href="pages/capture.html" class="btn large" style="width:100%;">Run Capture Tests</a>
+    <a href="pages/compass.html" class="btn large" style="width:100%;">Run Compass Tests</a>
+    <a href="pages/contacts.html" class="btn large" style="width:100%;">Run Contacts Tests</a>
+    <a href="pages/datauri.html" class="btn large" style="width:100%;">Run Data URI Tests</a>
+    <a href="pages/device.html" class="btn large" style="width:100%;">Run Device Tests</a>
+    <a href="pages/file.html" class="btn large" style="width:100%;">Run File Tests</a>
+    <a href="pages/filetransfer.html" class="btn large" style="width:100%;">Run FileTransfer Tests</a>
+    <a href="pages/geolocation.html" class="btn large" style="width:100%;">Run Geolocation Tests</a>
+    <a href="pages/globalization.html" class="btn large" style="width:100%;">Run Globalization Tests</a>
+    <a href="pages/media.html" class="btn large" style="width:100%;">Run Media Tests</a>
+    <a href="pages/network.html" class="btn large" style="width:100%;">Run Network Tests</a>
+    <a href="pages/notification.html" class="btn large" style="width:100%;">Run Notification Tests</a>
+    <a href="pages/platform.html" class="btn large" style="width:100%;">Run Platform Tests</a>
+    <a href="pages/storage.html" class="btn large" style="width:100%;">Run Storage Tests</a>
+    <a href="pages/bridge.html" class="btn large" style="width:100%;">Run Bridge Tests</a>
+
+    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
new file mode 100644
index 0000000..826e575
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/jasmine.css
@@ -0,0 +1,81 @@
+body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
+
+#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
+#HTMLReporter a { text-decoration: none; }
+#HTMLReporter a:hover { text-decoration: underline; }
+#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
+#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
+#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
+#HTMLReporter .version { color: #aaaaaa; }
+#HTMLReporter .banner { margin-top: 14px; }
+#HTMLReporter .duration { color: #aaaaaa; float: right; }
+#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }
+#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }
+#HTMLReporter .symbolSummary li.passed { font-size: 14px; }
+#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: "\02022"; }
+#HTMLReporter .symbolSummary li.failed { line-height: 9px; }
+#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
+#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }
+#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: "\02022"; }
+#HTMLReporter .symbolSummary li.pending { line-height: 11px; }
+#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: "-"; }
+#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
+#HTMLReporter .runningAlert { background-color: #666666; }
+#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
+#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
+#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
+#HTMLReporter .passingAlert { background-color: #a6b779; }
+#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
+#HTMLReporter .failingAlert { background-color: #cf867e; }
+#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
+#HTMLReporter .results { margin-top: 14px; }
+#HTMLReporter #details { display: none; }
+#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }
+#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
+#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
+#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
+#HTMLReporter.showDetails .summary { display: none; }
+#HTMLReporter.showDetails #details { display: block; }
+#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
+#HTMLReporter .summary { margin-top: 14px; }
+#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
+#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }
+#HTMLReporter .summary .specSummary.failed a { color: #b03911; }
+#HTMLReporter .description + .suite { margin-top: 0; }
+#HTMLReporter .suite { margin-top: 14px; }
+#HTMLReporter .suite a { color: #333333; }
+#HTMLReporter #details .specDetail { margin-bottom: 28px; }
+#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
+#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
+#HTMLReporter .resultMessage span.result { display: block; }
+#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
+
+#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }
+#TrivialReporter a:visited, #TrivialReporter a { color: #303; }
+#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }
+#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }
+#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }
+#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }
+#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }
+#TrivialReporter .runner.running { background-color: yellow; }
+#TrivialReporter .options { text-align: right; font-size: .8em; }
+#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }
+#TrivialReporter .suite .suite { margin: 5px; }
+#TrivialReporter .suite.passed { background-color: #dfd; }
+#TrivialReporter .suite.failed { background-color: #fdd; }
+#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }
+#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }
+#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }
+#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }
+#TrivialReporter .spec.skipped { background-color: #bbb; }
+#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }
+#TrivialReporter .passed { background-color: #cfc; display: none; }
+#TrivialReporter .failed { background-color: #fbb; }
+#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }
+#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }
+#TrivialReporter .resultMessage .mismatch { color: black; }
+#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }
+#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }
+#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }
+#TrivialReporter #jasmine_content { position: fixed; right: 100%; }
+#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }


[23/50] [abbrv] git commit: CB-5471: add deprecation javadoc/annotation

Posted by bo...@apache.org.
CB-5471: add deprecation javadoc/annotation


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/228a9009
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/228a9009
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/228a9009

Branch: refs/heads/master
Commit: 228a9009fceae3c951f0a804a132329cfcd6eb81
Parents: eb0aa97
Author: Marcel Kinard <cm...@gmail.com>
Authored: Tue Nov 26 12:05:23 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:17 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaActivity.java     | 16 ++++++++++++++++
 framework/src/org/apache/cordova/DroidGap.java      | 12 ++++++++++--
 2 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/228a9009/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index 897b54e..f369b77 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -697,10 +697,14 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
     /**
      * Set boolean property on activity.
+     * This method has been deprecated in 3.0 and will be removed at a future
+     * time. Please use config.xml instead.
      *
      * @param name
      * @param value
+     * @deprecated
      */
+    @Deprecated
     public void setBooleanProperty(String name, boolean value) {
         Log.d(TAG, "Setting boolean properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml");
         this.getIntent().putExtra(name.toLowerCase(), value);
@@ -708,10 +712,14 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
     /**
      * Set int property on activity.
+     * This method has been deprecated in 3.0 and will be removed at a future
+     * time. Please use config.xml instead.
      *
      * @param name
      * @param value
+     * @deprecated
      */
+    @Deprecated
     public void setIntegerProperty(String name, int value) {
         Log.d(TAG, "Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml");
         this.getIntent().putExtra(name.toLowerCase(), value);
@@ -719,10 +727,14 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
     /**
      * Set string property on activity.
+     * This method has been deprecated in 3.0 and will be removed at a future
+     * time. Please use config.xml instead.
      *
      * @param name
      * @param value
+     * @deprecated
      */
+    @Deprecated
     public void setStringProperty(String name, String value) {
         Log.d(TAG, "Setting string properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml");
         this.getIntent().putExtra(name.toLowerCase(), value);
@@ -730,10 +742,14 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
     /**
      * Set double property on activity.
+     * This method has been deprecated in 3.0 and will be removed at a future
+     * time. Please use config.xml instead.
      *
      * @param name
      * @param value
+     * @deprecated
      */
+    @Deprecated
     public void setDoubleProperty(String name, double value) {
         Log.d(TAG, "Setting double properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml");
         this.getIntent().putExtra(name.toLowerCase(), value);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/228a9009/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index fbaf6c4..d72d2a4 100644
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -17,10 +17,18 @@
        under the License.
 */
 
-// We moved everything to CordovaActivity
-
 package org.apache.cordova;
 
+/**
+ * This used to be the class that should be extended by application
+ * developers, but everything has been moved to CordovaActivity. So
+ * you should extend CordovaActivity instead of DroidGap. This class
+ * will be removed at a future time.
+ *
+ * @see CordovaActivity
+ * @deprecated
+ */
+@Deprecated
 public class DroidGap extends CordovaActivity {
 
 }


[30/50] [abbrv] git commit: Updating the README

Posted by bo...@apache.org.
Updating the README


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/bbac7970
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/bbac7970
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/bbac7970

Branch: refs/heads/master
Commit: bbac7970bd0c7ab7c5a403cb684b7f27d9eae34f
Parents: a14901d
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Nov 29 14:25:39 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:19 2014 -0800

----------------------------------------------------------------------
 test/README.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/bbac7970/test/README.md
----------------------------------------------------------------------
diff --git a/test/README.md b/test/README.md
index 5d86720..ff673cf 100755
--- a/test/README.md
+++ b/test/README.md
@@ -24,7 +24,10 @@ These tests are designed to verify Android native features and other Android spe
 
 ## Initial Setup ##
 
-Before running the tests, they need to be set up.
+There really isn't any manual setup to do. The ant script takes care of that.
+You don't even need to compile cordova-x.y.z.jar or copy it, because 
+project.properties has a library reference to ../framework.  However, Robotium has to be 
+installed for the onScrollChanged tests to work correctly.  It can be found at https://code.google.com/p/robotium/
 
 0. Copy cordova-x.y.z.jar into libs directory
 


[32/50] [abbrv] git commit: prevent ClassNotFound exception for emtpy class name

Posted by bo...@apache.org.
prevent ClassNotFound exception for emtpy class name

Signed-off-by: Joe Bowser <bo...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/d291bff6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/d291bff6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/d291bff6

Branch: refs/heads/master
Commit: d291bff6fd1a2ca7ab7fbc6132520fbc3f4dfe57
Parents: 8b67088
Author: ignisvulpis <ax...@nennker.de>
Authored: Tue Dec 3 23:46:06 2013 +0100
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:19 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/PluginEntry.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d291bff6/framework/src/org/apache/cordova/PluginEntry.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/PluginEntry.java b/framework/src/org/apache/cordova/PluginEntry.java
index e800eba..4f89538 100755
--- a/framework/src/org/apache/cordova/PluginEntry.java
+++ b/framework/src/org/apache/cordova/PluginEntry.java
@@ -113,7 +113,7 @@ public class PluginEntry {
     @SuppressWarnings("rawtypes")
     private Class getClassByName(final String clazz) throws ClassNotFoundException {
         Class c = null;
-        if (clazz != null) {
+        if ((clazz != null) && !("".equals(clazz))) {
             c = Class.forName(clazz);
         }
         return c;


[44/50] [abbrv] git commit: CB-5447 Removed android:debuggable=“true” from project template.

Posted by bo...@apache.org.
CB-5447 Removed android:debuggable=“true” from project template.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/4963927c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/4963927c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/4963927c

Branch: refs/heads/master
Commit: 4963927c1b1b9cdbc71211d7e57a16a1546d6ab2
Parents: 8e9e5d1
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 30 11:20:13 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:23 2014 -0800

----------------------------------------------------------------------
 bin/lib/create.js                         | 12 +++++++++++-
 bin/templates/project/AndroidManifest.xml |  3 +--
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/4963927c/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index b330a20..c482b5a 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -180,6 +180,12 @@ exports.createProject = function(project_path, package_name, project_name, proje
     });
 }
 
+// Attribute removed in Cordova 4.4 (CB-5447).
+function removeDebuggableFromManifest(projectPath) {
+    var manifestPath   = path.join(projectPath, 'AndroidManifest.xml');
+    shell.sed('-i', /\s*android:debuggable="true"/, '', manifestPath);
+}
+
 // Returns a promise.
 exports.updateProject = function(projectPath) {
     var version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
@@ -191,7 +197,11 @@ exports.updateProject = function(projectPath) {
     }).then(function() {
         copyJsAndJar(projectPath, version);
         copyScripts(projectPath);
-        console.log('Android project is now at version ' + version);
+        removeDebuggableFromManifest(projectPath);
+        return runAndroidUpdate(projectPath, target_api, false)
+        .then(function() {
+            console.log('Android project is now at version ' + version);
+        });
     });
 };
 

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/4963927c/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/AndroidManifest.xml b/bin/templates/project/AndroidManifest.xml
index 3a3b6a6..48a378c 100644
--- a/bin/templates/project/AndroidManifest.xml
+++ b/bin/templates/project/AndroidManifest.xml
@@ -31,8 +31,7 @@
     <uses-permission android:name="android.permission.INTERNET" />
 
     <application android:icon="@drawable/icon" android:label="@string/app_name"
-        android:hardwareAccelerated="true"
-        android:debuggable="true">
+        android:hardwareAccelerated="true">
         <activity android:name="__ACTIVITY__" android:label="@string/app_name"
                 android:theme="@android:style/Theme.Black.NoTitleBar"
                 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">


[33/50] [abbrv] git commit: Forgot Apache Headers on MessageTest

Posted by bo...@apache.org.
Forgot Apache Headers on MessageTest


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/f25327bd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/f25327bd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/f25327bd

Branch: refs/heads/master
Commit: f25327bdbe8a9a73b13c3cac85a3cbadd813a997
Parents: 6976296
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Dec 3 15:52:25 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:20 2014 -0800

----------------------------------------------------------------------
 .../apache/cordova/test/junit/MessageTest.java    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f25327bd/test/src/org/apache/cordova/test/junit/MessageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/MessageTest.java b/test/src/org/apache/cordova/test/junit/MessageTest.java
index 0f048ea..4d0ce16 100644
--- a/test/src/org/apache/cordova/test/junit/MessageTest.java
+++ b/test/src/org/apache/cordova/test/junit/MessageTest.java
@@ -1,3 +1,21 @@
+/*
+       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.
+*/
 package org.apache.cordova.test.junit;
 
 import org.apache.cordova.CordovaPlugin;


[28/50] [abbrv] git commit: Update JS snapshot to version 3.4.0-dev (via coho)

Posted by bo...@apache.org.
Update JS snapshot to version 3.4.0-dev (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/6976296a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/6976296a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/6976296a

Branch: refs/heads/master
Commit: 6976296aba915b6ca897b8fcb6b5cfba9369ad2d
Parents: d291bff
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Dec 3 15:44:23 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:19 2014 -0800

----------------------------------------------------------------------
 framework/assets/www/cordova.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/6976296a/framework/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/framework/assets/www/cordova.js b/framework/assets/www/cordova.js
index 12fab4f..7ff1897 100644
--- a/framework/assets/www/cordova.js
+++ b/framework/assets/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: android
-// 3.3.0-dev-aac4947
+// 3.3.0-dev-c9de1bc
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
  under the License.
 */
 ;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.3.0-dev-aac4947';
+var CORDOVA_JS_BUILD_LABEL = '3.3.0-dev-c9de1bc';
 // file: lib/scripts/require.js
 
 /*jshint -W079 */


[29/50] [abbrv] git commit: Updating tests to KitKat, and making the tests more thread-safe

Posted by bo...@apache.org.
Updating tests to KitKat, and making the tests more thread-safe


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/a14901dd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/a14901dd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/a14901dd

Branch: refs/heads/master
Commit: a14901dd3e97217e699eb8d0bd3438018b4567dd
Parents: b832242
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Nov 29 13:43:24 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:19 2014 -0800

----------------------------------------------------------------------
 test/AndroidManifest.xml                        |   2 +-
 test/res/xml/config.xml                         |   3 +
 .../apache/cordova/pluginApi/pluginStub.java    |  39 +++
 .../test/junit/BackButtonMultiPageTest.java     | 347 ++++++++++++-------
 .../cordova/test/junit/CordovaActivityTest.java |  19 +-
 .../apache/cordova/test/junit/ErrorUrlTest.java |  76 ++--
 .../cordova/test/junit/HtmlNotFoundTest.java    |  18 +-
 .../apache/cordova/test/junit/IFrameTest.java   |  60 +++-
 .../apache/cordova/test/junit/MessageTest.java  |  55 +++
 9 files changed, 438 insertions(+), 181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/test/AndroidManifest.xml b/test/AndroidManifest.xml
index 0ac3520..8815624 100755
--- a/test/AndroidManifest.xml
+++ b/test/AndroidManifest.xml
@@ -46,7 +46,7 @@
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
     <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    
-    <uses-sdk android:minSdkVersion="8" />
+    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"/>
 
     <instrumentation
         android:name="android.test.InstrumentationTestRunner"

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml
index b5c6170..1986cff 100644
--- a/test/res/xml/config.xml
+++ b/test/res/xml/config.xml
@@ -14,6 +14,9 @@
     <feature name="Activity">
         <param name="android-package" value="org.apache.cordova.test.ActivityPlugin" />
     </feature>
+    <feature name="PluginStub">
+        <param name="android-package" value="org.apache.cordova.pluginApi.pluginStub" />
+    </feature>
     <feature name="App">
         <param name="android-package" value="org.apache.cordova.App" />
     </feature>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/pluginApi/pluginStub.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/pluginApi/pluginStub.java b/test/src/org/apache/cordova/pluginApi/pluginStub.java
new file mode 100644
index 0000000..b91a7af
--- /dev/null
+++ b/test/src/org/apache/cordova/pluginApi/pluginStub.java
@@ -0,0 +1,39 @@
+/*
+       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.
+*/
+
+/*
+ * This plugin is a test of all the message callbacks and actions available to plugins
+ * 
+ */
+
+package org.apache.cordova.pluginApi;
+
+import org.apache.cordova.CordovaPlugin;
+
+public class pluginStub extends CordovaPlugin {
+    
+    public String id;
+    public Object data;
+    
+    public Object onMessage(String id, Object input)
+    {
+       this.data = input;
+       return input;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java b/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
index e1c9a28..ec8c7d1 100644
--- a/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
+++ b/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
@@ -26,6 +26,7 @@ import org.apache.cordova.test.backbuttonmultipage;
 
 import android.test.ActivityInstrumentationTestCase2;
 import android.util.Log;
+import android.test.UiThreadTest;
 import android.view.KeyEvent;
 import android.view.inputmethod.BaseInputConnection;
 import android.widget.FrameLayout;
@@ -40,131 +41,241 @@ public class BackButtonMultiPageTest extends
 	private LinearLayout innerContainer;
 	private CordovaWebView testView;
 
-	private AmazonWebViewOnUiThread mUiThread;
+    public BackButtonMultiPageTest() {
+    super(backbuttonmultipage.class);
+  }
 
-	public BackButtonMultiPageTest() {
-		super("org.apache.cordova.test", backbuttonmultipage.class);
-	}
+  @UiThreadTest
+  protected void setUp() throws Exception {
+      super.setUp();
+      testActivity = this.getActivity();
+      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+      innerContainer = (LinearLayout) containerView.getChildAt(0);
+      testView = (CordovaWebView) innerContainer.getChildAt(0);
+      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html");
+      sleep();
+  }
 
-	protected void setUp() throws Exception {
-		super.setUp();
-		testActivity = this.getActivity();
-		// Sleep to make sure main page is properly loaded
-		sleep();
-		containerView = (FrameLayout) testActivity
-				.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = (CordovaWebView) innerContainer.getChildAt(0);
-		mUiThread = new AmazonWebViewOnUiThread(this, testView);
-	}
+  @UiThreadTest
+  public void testPreconditions(){
+      assertNotNull(innerContainer);
+      assertNotNull(testView);
+      String url = testView.getUrl();
+      assertTrue(url.endsWith("index.html"));
+  }
+  
+  public void testViaHref() throws Throwable {
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              testView.sendJavascript("window.location = 'sample2.html';");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.sendJavascript("window.location = 'sample3.html';");          }
+      });
+     
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample3.html"));
+              testView.backHistory();
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.backHistory();
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("index.html"));
+          }
+      });
+  }
+  
+
+  public void testViaLoadUrl() throws Throwable {
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample3.html"));
+              testView.backHistory();
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.backHistory();
+          }
+      });
+      sleep();
+      url = testView.getUrl();
+      assertTrue(url.endsWith("index.html"));
+      assertTrue(didGoBack);
+    }
 
 	public void testPreconditions() {
 		assertNotNull(innerContainer);
 		assertNotNull(testView);
 	}
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("index.html"));
+              testView.backHistory();
+          }
+      });
+  }
 
-	public void testViaHref() {
-		testView.sendJavascript("window.location = 'sample2.html';");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.sendJavascript("window.location = 'sample3.html';");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		boolean didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		assertTrue(didGoBack);
-		didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();		
-		assertTrue(url.endsWith("index.html"));
-		assertTrue(didGoBack);
-	}
-
-	public void testViaLoadUrl() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		boolean didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		assertTrue(didGoBack);
-		didGoBack = mUiThread.backHistory();
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-		assertTrue(didGoBack);
-	}
-
-	public void testViaBackButtonOnView() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		BaseInputConnection viewConnection = new BaseInputConnection(testView,
-				true);
-		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
-				KeyEvent.KEYCODE_BACK);
-		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
-				KeyEvent.KEYCODE_BACK);
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-	}
-
-	public void testViaBackButtonOnLayout() {
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-		sleep();
-		String url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample3.html"));
-		BaseInputConnection viewConnection = new BaseInputConnection(
-				containerView, true);
-		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
-				KeyEvent.KEYCODE_BACK);
-		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
-				KeyEvent.KEYCODE_BACK);
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("sample2.html"));
-		viewConnection.sendKeyEvent(backDown);
-		viewConnection.sendKeyEvent(backUp);
-		sleep();
-		url = mUiThread.getUrl();
-		assertTrue(url.endsWith("index.html"));
-	}
-
-	private void sleep() {
-		try {
-			Thread.sleep(TIMEOUT);
-		} catch (InterruptedException e) {
-			fail("Unexpected Timeout");
-		}
-	}
+  public void testViaBackButtonOnView() throws Throwable {
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample3.html"));
+              BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
+              KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
+              KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
+              viewConnection.sendKeyEvent(backDown);
+              viewConnection.sendKeyEvent(backUp);
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
+              KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
+              KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
+              viewConnection.sendKeyEvent(backDown);
+              viewConnection.sendKeyEvent(backUp);
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("index.html"));
+          }
+      });
+      
+  }
+  
+  public void testViaBackButtonOnLayout() throws Throwable {
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample3.html"));
+              BaseInputConnection viewConnection = new BaseInputConnection(containerView, true);
+              KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
+              KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
+              viewConnection.sendKeyEvent(backDown);
+              viewConnection.sendKeyEvent(backUp);
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("sample2.html"));
+              BaseInputConnection viewConnection = new BaseInputConnection(containerView, true);
+              KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
+              KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
+              viewConnection.sendKeyEvent(backDown);
+              viewConnection.sendKeyEvent(backUp);
+          }
+      });
+      sleep();
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String url = testView.getUrl();
+              assertTrue(url.endsWith("index.html"));
+          }
+      });
+      
+  }
+  
+  @UiThreadTest
+  private void sleep() {
+      try {
+          Thread.sleep(TIMEOUT);
+      } catch (InterruptedException e) {
+          fail("Unexpected Timeout");
+      }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java b/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
index a2bbb07..f9d70b2 100644
--- a/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
+++ b/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
@@ -73,17 +73,26 @@ public class CordovaActivityTest extends ActivityInstrumentationTestCase2<Cordov
     public void testPauseAndResume() throws Throwable
     {
         runTestOnUiThread(new Runnable() {
-            @Override
-            public void run() {
+            public void run()
+            {
                 mInstr.callActivityOnPause(testActivity);
-                sleep();
+            }
+        });
+        sleep();
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
                 assertTrue(testView.isPaused());
                 mInstr.callActivityOnResume(testActivity);
-                sleep();
+            }
+        });
+        sleep();
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
                 assertFalse(testView.isPaused());
             }
         });
-
     }
     
     private void sleep() {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java b/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
index c04804d..2c3fd62 100644
--- a/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
+++ b/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
@@ -30,45 +30,47 @@ import android.widget.LinearLayout;
 
 public class ErrorUrlTest extends ActivityInstrumentationTestCase2<errorurl> {
 
-	private int TIMEOUT = 1000;
-	errorurl testActivity;
-	private FrameLayout containerView;
-	private LinearLayout innerContainer;
-	private CordovaWebView testView;
+  private int TIMEOUT = 1000;
+  errorurl testActivity;
+  private FrameLayout containerView;
+  private LinearLayout innerContainer;
+  private CordovaWebView testView;
+  
+  public ErrorUrlTest() {
+    super("org.apache.cordova.test",errorurl.class);
+  }
+  
+  
+  protected void setUp() throws Exception {
+      super.setUp();
+      testActivity = this.getActivity();
+      containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+      innerContainer = (LinearLayout) containerView.getChildAt(0);
+      testView = (CordovaWebView) innerContainer.getChildAt(0);
+  }
+  
+  public void testPreconditions(){
+      assertNotNull(innerContainer);
+      assertNotNull(testView);
+  }
+  
+  public void testUrl() throws Throwable
+  {
+    sleep();
+    runTestOnUiThread(new Runnable() {
+        public void run()
+        {
+            String good_url = "file:///android_asset/www/htmlnotfound/error.html";
+            String url = testView.getUrl();
+            assertNotNull(url);
+            assertTrue(url.equals(good_url));
+         
+        }
+    });
+  }
 
-	private AmazonWebViewOnUiThread mUiThread;
 
-	public ErrorUrlTest() {
-		super("org.apache.cordova.test", errorurl.class);
-	}
-
-	protected void setUp() throws Exception {
-		super.setUp();
-		testActivity = this.getActivity();
-		containerView = (FrameLayout) testActivity
-				.findViewById(android.R.id.content);
-		innerContainer = (LinearLayout) containerView.getChildAt(0);
-		testView = (CordovaWebView) innerContainer.getChildAt(0);
-		mUiThread = new AmazonWebViewOnUiThread(this, testView);
-	}
-
-	public void testPreconditions() {
-		assertNotNull(innerContainer);
-		assertNotNull(testView);
-	}
-
-	// This will fail for AWV because the current url on a wrong page will
-	// return the URL used to load
-	public void testUrl() {
-		mUiThread.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
-		sleep();
-		String good_url = "file:///android_asset/www/error.html";
-		String url = mUiThread.getUrl();
-		assertNotNull(url);
-		assertTrue(url.equals(good_url));
-	}
-
-	private void sleep() {
+   private void sleep() {
 		try {
 			Thread.sleep(TIMEOUT);
 		} catch (InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java b/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
index 9b3863e..abc4802 100644
--- a/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
+++ b/test/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java
@@ -35,7 +35,6 @@ public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2<htmlnotfo
   private FrameLayout containerView;
   private LinearLayout innerContainer;
   private CordovaWebView testView;
-  private AmazonWebViewOnUiThread mUiThread;
 
   public HtmlNotFoundTest() {
     super("org.apache.cordova.test",htmlnotfound.class);
@@ -48,7 +47,6 @@ public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2<htmlnotfo
     containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
     innerContainer = (LinearLayout) containerView.getChildAt(0);
     testView = (CordovaWebView) innerContainer.getChildAt(0);
-    mUiThread = new AmazonWebViewOnUiThread(this, testView);
   }
 
   public void testPreconditions(){
@@ -56,13 +54,19 @@ public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2<htmlnotfo
     assertNotNull(testView);
   }
 
-  public void testUrl()
+  public void testUrl() throws Throwable
   {
       sleep();
-      String good_url = "file:///android_asset/www/htmlnotfound/error.html";
-      String url = mUiThread.getUrl();
-      assertNotNull(url);
-      assertFalse(url.equals(good_url));
+      runTestOnUiThread(new Runnable() {
+          public void run()
+          {
+              String good_url = "file:///android_asset/www/htmlnotfound/error.html";
+              String url = testView.getUrl();
+              assertNotNull(url);
+              assertFalse(url.equals(good_url));
+          }
+      });
+
   }
 
   private void sleep() {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/IFrameTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/IFrameTest.java b/test/src/org/apache/cordova/test/junit/IFrameTest.java
index ba76463..800dead 100644
--- a/test/src/org/apache/cordova/test/junit/IFrameTest.java
+++ b/test/src/org/apache/cordova/test/junit/IFrameTest.java
@@ -40,7 +40,6 @@ public class IFrameTest extends ActivityInstrumentationTestCase2 {
     private FrameLayout containerView;
     private LinearLayout innerContainer;
     private CordovaWebView testView;
-    private AmazonWebViewOnUiThread mUiThread;
     private TouchUtils touch;
     private Purity touchTool;
     
@@ -56,32 +55,67 @@ public class IFrameTest extends ActivityInstrumentationTestCase2 {
       containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
       innerContainer = (LinearLayout) containerView.getChildAt(0);
       testView = (CordovaWebView) innerContainer.getChildAt(0);
-      mUiThread = new AmazonWebViewOnUiThread(this, testView);
       touch = new TouchUtils();
       touchTool = new Purity(testActivity, getInstrumentation());
     }
   
   
-    public void testIframeDest()
+    public void testIframeDest() throws Throwable
     {
-        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+            }
+        });
         sleep(3000);
-        testView.sendJavascript("loadUrl('index2.html')");
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                testView.sendJavascript("loadUrl('index2.html')");
+            }
+        });
         sleep(1000);
-        String url = mUiThread.getUrl();
-        assertTrue(url.endsWith("index.html"));
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                String url = testView.getUrl();
+                assertTrue(url.endsWith("index.html"));
+            }
+        });
     }
     
-    public void testIframeHistory()
+    public void testIframeHistory() throws Throwable
     {
-        testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');");
+            }
+        });
         sleep(3000);
-        testView.sendJavascript("loadUrl('index2.html')");
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                testView.sendJavascript("loadUrl('index2.html')");
+            }
+        });
         sleep(1000);
-        String url = mUiThread.getUrl();
-        mUiThread.backHistory();
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                String url = testView.getUrl();
+                testView.backHistory();
+            }
+        });
         sleep(1000);
-        assertTrue(url.endsWith("index.html"));
+        runTestOnUiThread(new Runnable() {
+            public void run()
+            {
+                String url = testView.getUrl();
+                assertTrue(url.endsWith("index.html"));
+            }
+        });
     }
     
     private void sleep(int timeout) {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/a14901dd/test/src/org/apache/cordova/test/junit/MessageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/MessageTest.java b/test/src/org/apache/cordova/test/junit/MessageTest.java
new file mode 100644
index 0000000..0f048ea
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/MessageTest.java
@@ -0,0 +1,55 @@
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.ScrollEvent;
+import org.apache.cordova.pluginApi.pluginStub;
+import org.apache.cordova.test.CordovaWebViewTestActivity;
+import org.apache.cordova.test.R;
+
+import com.jayway.android.robotium.solo.By;
+import com.jayway.android.robotium.solo.Solo;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.view.View;
+
+public class MessageTest extends
+ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> { 
+    private CordovaWebViewTestActivity testActivity;
+    private CordovaWebView testView;
+    private pluginStub testPlugin;
+    private int TIMEOUT = 1000;
+    
+    private Solo solo;
+
+    public MessageTest() {
+        super("org.apache.cordova.test.activities", CordovaWebViewTestActivity.class);
+      }
+
+      protected void setUp() throws Exception {
+        super.setUp();
+        testActivity = this.getActivity();
+        testView = (CordovaWebView) testActivity.findViewById(R.id.cordovaWebView);
+        testPlugin = (pluginStub) testView.pluginManager.getPlugin("PluginStub");
+        solo = new Solo(getInstrumentation(), getActivity());
+      }
+      
+      public void testOnScrollChanged()
+      {
+          solo.waitForWebElement(By.textContent("Cordova Android Tests"));
+          solo.scrollDown();
+          sleep();
+          Object data = testPlugin.data;
+          assertTrue(data.getClass().getSimpleName().equals("ScrollEvent"));
+      }
+
+      
+      
+      private void sleep() {
+          try {
+            Thread.sleep(TIMEOUT);
+          } catch (InterruptedException e) {
+            fail("Unexpected Timeout");
+          }
+        }
+}


[48/50] [abbrv] git commit: Removed the code segment that allows web debugging. We have devtools plugin to do so.

Posted by bo...@apache.org.
Removed the code segment that allows web debugging. We have devtools plugin to do so.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/5bc99c04
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/5bc99c04
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/5bc99c04

Branch: refs/heads/master
Commit: 5bc99c0475755bc670ce94ca8d740f274ccb81bf
Parents: fdb3bef
Author: Archana Naik <na...@lab126.com>
Authored: Wed Dec 18 11:13:44 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:24 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java  | 24 +-------------------
 1 file changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/5bc99c04/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index c7ea6abf..da7de0b 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -367,29 +367,7 @@ public class CordovaWebView extends AmazonWebView {
             // enable the local storage database normally with the Chromium back-end
             settings.setDatabaseEnabled(true);
         }
-        
-        
-        //Determine whether we're in debug or release mode, and turn on Debugging!
-        try {
-            final String packageName = this.cordova.getActivity().getPackageName();
-            final PackageManager pm = this.cordova.getActivity().getPackageManager();
-            ApplicationInfo appInfo;
-            
-            appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
-            
-            if((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 &&  
-                android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT)
-            {
-                setWebContentsDebuggingEnabled(true);
-            }
-        } catch (IllegalArgumentException e) {
-            Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
-            e.printStackTrace();
-        } catch (NameNotFoundException e) {
-            Log.d(TAG, "This should never happen: Your application's package can't be found.");
-            e.printStackTrace();
-        }  
-
+                
         // Enable DOM storage
         settings.setDomStorageEnabled(true);
 


[43/50] [abbrv] git commit: CB-5592 Set MIME type for openExternal when scheme is file:

Posted by bo...@apache.org.
CB-5592 Set MIME type for openExternal when scheme is file:


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/dbd01fa0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/dbd01fa0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/dbd01fa0

Branch: refs/heads/master
Commit: dbd01fa0afef39c6e4f7ea60eded2d6dc44c8395
Parents: 86c591b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Dec 20 11:17:24 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java  | 33 +++++++++-----------
 1 file changed, 14 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/dbd01fa0/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 36ef8a1..c7ea6abf 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -736,29 +736,24 @@ public class CordovaWebView extends AmazonWebView {
                 // TODO: What about params?
                 // Load new URL
                 this.loadUrl(url);
+                return;
             }
             // Load in default viewer if not
-            else {
-                LOG.w(TAG, "showWebPage: Cannot load URL into webview since it is not in white list.  Loading into browser instead. (URL=" + url + ")");
-                try {
-                    Intent intent = new Intent(Intent.ACTION_VIEW);
-                    intent.setData(Uri.parse(url));
-                    cordova.getActivity().startActivity(intent);
-                } catch (android.content.ActivityNotFoundException e) {
-                    LOG.e(TAG, "Error loading url " + url, e);
-                }
-            }
+            LOG.w(TAG, "showWebPage: Cannot load URL into webview since it is not in white list.  Loading into browser instead. (URL=" + url + ")");
         }
-
-        // Load in default view intent
-        else {
-            try {
-                Intent intent = new Intent(Intent.ACTION_VIEW);
-                intent.setData(Uri.parse(url));
-                cordova.getActivity().startActivity(intent);
-            } catch (android.content.ActivityNotFoundException e) {
-                LOG.e(TAG, "Error loading url " + url, e);
+        try {
+            // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent".
+            // Adding the MIME type to http: URLs causes them to not be handled by the downloader.
+            Intent intent = new Intent(Intent.ACTION_VIEW);
+            Uri uri = Uri.parse(url);
+            if ("file".equals(uri.getScheme())) {
+                intent.setDataAndType(uri, resourceApi.getMimeType(uri));
+            } else {
+                intent.setData(uri);
             }
+            cordova.getActivity().startActivity(intent);
+        } catch (android.content.ActivityNotFoundException e) {
+            LOG.e(TAG, "Error loading url " + url, e);
         }
     }
 


[49/50] [abbrv] git commit: Set VERSION to 3.4.0-dev (via coho)

Posted by bo...@apache.org.
Set VERSION to 3.4.0-dev (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/40b8dc3d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/40b8dc3d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/40b8dc3d

Branch: refs/heads/master
Commit: 40b8dc3d2bc464cc8ef8ac1f37c28e1aef567e2f
Parents: 17d373a
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Dec 3 15:44:21 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:24 2014 -0800

----------------------------------------------------------------------
 VERSION                                              | 2 +-
 bin/templates/cordova/version                        | 2 +-
 framework/src/org/apache/cordova/CordovaWebView.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/40b8dc3d/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 6d7d659..688932a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.3.0-dev
+3.4.0-dev

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/40b8dc3d/bin/templates/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/version b/bin/templates/cordova/version
index 624e3d8..61b62e6 100755
--- a/bin/templates/cordova/version
+++ b/bin/templates/cordova/version
@@ -20,6 +20,6 @@
 */
 
 // Coho updates this line:
-var VERSION = "3.3.0-dev";
+var VERSION = "3.4.0-dev";
 
 console.log(VERSION);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/40b8dc3d/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index da7de0b..f06c66d 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -72,7 +72,7 @@ public class CordovaWebView extends AmazonWebView {
 
 
     public static final String TAG = "CordovaWebView";
-    public static final String CORDOVA_VERSION = "3.3.0-dev";
+    public static final String CORDOVA_VERSION = "3.4.0-dev";
 
     private ArrayList<Integer> keyDownCodes = new ArrayList<Integer>();
     private ArrayList<Integer> keyUpCodes = new ArrayList<Integer>();


[24/50] [abbrv] git commit: CB-5445: Adding onScrollChanged and the ScrollEvent object. (Forgot to add the WebView)

Posted by bo...@apache.org.
CB-5445: Adding onScrollChanged and the ScrollEvent object. (Forgot to add the WebView)


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/b8322423
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/b8322423
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/b8322423

Branch: refs/heads/master
Commit: b8322423f19d7acd3a08c452249229cdf9f404fe
Parents: ea0ae1d
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Nov 27 11:51:22 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:18 2014 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/b8322423/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index e6d911f..9e70a9d 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -628,6 +628,8 @@ public class CordovaWebView extends AmazonWebView {
         //We should post a message that the scroll changed
         LOG.d(TAG, "Scroll changed: oldl = %d, l = %d", oldl, l);
         LOG.d(TAG, "Scroll changed: oldt = %d, t = %d", oldt, t);
+        ScrollEvent myEvent = new ScrollEvent(l, t, oldl, oldt, this);
+        this.postMessage("onScrollChanged", myEvent);
     }
     
     /**


[12/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/.fetch.json
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/.fetch.json b/test/cordova/plugins/org.apache.cordova.device/.fetch.json
new file mode 100644
index 0000000..f22cd81
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/.fetch.json
@@ -0,0 +1 @@
+{"source":{"type":"local","path":"/Users/jbowser/plugins/cordova-plugin-device"}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/LICENSE
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/LICENSE b/test/cordova/plugins/org.apache.cordova.device/LICENSE
new file mode 100644
index 0000000..7a4a3ea
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/README.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/README.md b/test/cordova/plugins/org.apache.cordova.device/README.md
new file mode 100644
index 0000000..e07ef89
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/README.md
@@ -0,0 +1,5 @@
+cordova-plugin-device
+-----------------------
+To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface).
+
+If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/plugin_ref_plugman.md.html).

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md b/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
new file mode 100644
index 0000000..17b77b6
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
@@ -0,0 +1,40 @@
+<!--
+#
+# 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.
+#
+-->
+# Release Notes
+
+### 0.2.1 (Sept 5, 2013)
+* removed extraneous print statement
+* [CB-4432] copyright notice change
+
+### 0.2.3 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* [windows8] commandProxy has moved
+* [BlackBerry10] removed uneeded permission tags in plugin.xml
+* CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* updated to use commandProxy for ffos
+* add firefoxos support
+* [CB-4752] Incremented plugin version on dev branch. 
+
+### 0.2.4 (Oct 28, 2013)
+* CB-5128: added repo + issue tag in plugin.xml for device plugin
+* CB-5085 device.cordova returning wrong value
+* [CB-4915] Incremented plugin version on dev branch.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
new file mode 100644
index 0000000..b29e24f
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
@@ -0,0 +1,80 @@
+---
+ license: 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.
+---
+
+device.cordova
+===============
+
+Get the version of Cordova running on the device.
+
+    var string = device.cordova;
+
+Description
+-----------
+
+`device.cordova` returns the version of Cordova running on the device.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    var name = device.cordova;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.md
new file mode 100644
index 0000000..3748d36
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.md
@@ -0,0 +1,104 @@
+---
+ license: 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.
+---
+
+Device
+======
+
+> The `device` object describes the device's hardware and software.
+
+Properties
+----------
+
+- device.name
+- device.cordova
+- device.platform
+- device.uuid
+- device.version
+- device.model
+
+Variable Scope
+--------------
+
+Since `device` is assigned to the `window` object, it is implicitly in the global scope.
+
+    // These reference the same `device`
+    var phoneName = window.device.name;
+    var phoneName = device.name;
+
+Permissions
+-----------
+
+### Android
+
+#### app/res/xml/config.xml
+
+    <plugin name="Device" value="org.apache.cordova.Device" />
+
+#### app/AndroidManifest.xml
+
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+
+### Bada
+
+#### manifest.xml
+
+    <Privilege>
+        <Name>SYSTEM_SERVICE</Name>
+    </Privilege>
+
+### BlackBerry WebWorks
+
+#### www/plugins.xml
+
+    <plugin name="Device" value="org.apache.cordova.device.Device" />
+
+#### www/config.xml
+
+    <feature id="blackberry.app" required="true" version="1.0.0.0" />
+    <rim:permissions>
+        <rim:permit>read_device_identifying_information</rim:permit>
+    </rim:permissions>
+
+### iOS
+
+    No permissions are required.
+
+### webOS
+
+    No permissions are required.
+
+### Windows Phone
+
+#### Properties/WPAppManifest.xml
+
+    <Capabilities>
+        <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
+        <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+        <Capability Name="ID_CAP_IDENTITY_USER" />
+    </Capabilities>
+
+Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
+
+### Tizen
+
+#### config.xml
+
+    <feature name="http://tizen.org/api/systeminfo" required="true"/>
+
+Reference: [Application Manifest for Tizen Web Application](https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures)

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
new file mode 100644
index 0000000..e5238e4
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
@@ -0,0 +1,106 @@
+---
+ license: 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.
+---
+
+device.model
+===========
+
+Get the device's model name.
+
+    var string = device.model;
+
+Description
+-----------
+
+The `device.model` returns the name of the device's model or
+product. The value is set by the device manufacturer and may be
+different across versions of the same product.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- webOS
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Android:    Nexus One       returns "Passion" (Nexus One code name)
+    //             Motorola Droid  returns "voles"
+    // BlackBerry: Torch 9800      returns "9800"
+    // iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+    //
+    var model = device.model;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Model: '    + device.model    + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>
+
+Android Quirks
+--------------
+
+- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
+
+Windows Phone 7 and 8 Quirks
+-------------
+
+- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
+
+Bada Quirks
+-----------
+- Returns the manufacturer model name, for example, `Samsung Wave S8500`
+
+Tizen Quirks
+-----------
+- Returns the device model assigned by the vendor, for example, `TIZEN`

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
new file mode 100644
index 0000000..a70648f
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
@@ -0,0 +1,108 @@
+---
+ license: 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.
+---
+
+device.name
+===========
+
+__WARNING:__ `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.
+
+Get the device's model name.
+
+    var string = device.name;
+
+Description
+-----------
+
+`device.name` returns the name of the device's model or product. This
+value is set by the device manufacturer and may be different across
+versions of the same product.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- webOS
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Android:    Nexus One       returns "Passion" (Nexus One code name)
+    //             Motorola Droid  returns "voles"
+    // BlackBerry: Torch 9800      returns "9800"
+    // iOS:     All devices     returns either "iPhone", "iPod Touch", "iPhone Simulator", "iPad", "iPad Simulator"
+    //
+    var name = device.name;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Model: '    + device.model    + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>
+
+Android Quirks
+--------------
+
+- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
+
+Windows Phone 7 and 8 Quirks
+-------------
+
+- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
+
+Bada Quirks
+-----------
+- Returns the manufacturer model name, for example, `Samsung Wave S8500`
+
+Tizen Quirks
+-----------
+- Returns the device model assigned by the vendor, for example, `TIZEN`

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
new file mode 100644
index 0000000..0d2cacb
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
@@ -0,0 +1,99 @@
+---
+ license: 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.
+---
+
+device.platform
+===============
+
+Get the device's operating system name.
+
+    var string = device.platform;
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- webOS
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Depending on the device, a few examples are:
+    //   - "Android"
+    //   - "BlackBerry"
+    //   - "iOS"
+    //   - "webOS"
+    //   - "WinCE"
+    //   - "Tizen"
+    var devicePlatform = device.platform;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>
+
+BlackBerry Quirks
+-----------------
+
+Devices may return the device platform version number instead of the
+platform name.  For example, the Storm2 9550 returns a value such as
+`2.13.0.95`.
+
+Windows Phone 7 Quirks
+-----------------
+
+Windows Phone 7 devices report the platform as `WinCE`.
+
+Windows Phone 8 Quirks
+-----------------
+
+Windows Phone 8 devices report the platform as `Win32NT`.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
new file mode 100644
index 0000000..76abf73
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
@@ -0,0 +1,115 @@
+---
+ license: 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.
+---
+
+device.uuid
+===========
+
+Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
+
+    var string = device.uuid;
+
+Description
+-----------
+
+The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
+
+Supported Platforms
+-------------------
+
+- Android
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- webOS
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Android: Returns a random 64-bit integer (as a string, again!)
+    //          The integer is generated on the device's first boot
+    //
+    // BlackBerry: Returns the PIN number of the device
+    //             This is a nine-digit unique integer (as a string, though!)
+    //
+    // iPhone: (Paraphrased from the UIDevice Class documentation)
+    //         Returns a string of hash values created from multiple hardware identifies.
+    //         It is guaranteed to be unique for every device and cannot be tied
+    //         to the user account.
+    // Windows Phone 7 : Returns a hash of device+current user,
+    // if the user is not defined, a guid is generated and will persist until the app is uninstalled
+    //
+    // webOS: returns the device NDUID
+    //
+    // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
+    // unique to every GSM and UMTS mobile phone.
+    var deviceID = device.uuid;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>
+
+iOS Quirk
+-------------
+
+The `uuid` on iOS is not unique to a device, but varies for each
+application, for each installation.  It changes if you delete and
+re-install the app, and possibly also when you upgrade iOS, or even
+upgrade your app per version (apparent in iOS 5.1). The `uuid` is not
+a reliable value.
+
+Windows Phone 7 and 8 Quirks
+-------------
+
+The `uuid` for Windows Phone 7 requires the permission
+`ID_CAP_IDENTITY_DEVICE`.  Microsoft will likely deprecate this
+property soon.  If the capability is not available, the application
+generates a persistent guid that is maintained for the duration of the
+application's installation on the device.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
new file mode 100644
index 0000000..ecd4733
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
@@ -0,0 +1,86 @@
+---
+ license: 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.
+---
+
+device.version
+==============
+
+Get the operating system version.
+
+    var string = device.version;
+
+Supported Platforms
+-------------------
+
+- Android 2.1+
+- BlackBerry WebWorks (OS 5.0 and higher)
+- iOS
+- Windows Phone 7 and 8
+- Bada 1.2 & 2.x
+- webOS
+- Tizen
+- Windows 8
+
+Quick Example
+-------------
+
+    // Android:    Froyo OS would return "2.2"
+    //             Eclair OS would return "2.1", "2.0.1", or "2.0"
+    //             Version can also return update level "2.1-update1"
+    //
+    // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+    //
+    // iPhone:     iOS 3.2 returns "3.2"
+    //
+    // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+    // webOS: webOS 2.2.4 return 2.2.4
+    // Tizen: returns "TIZEN_20120425_2"
+    var deviceVersion = device.version;
+
+Full Example
+------------
+
+    <!DOCTYPE html>
+    <html>
+      <head>
+        <title>Device Properties Example</title>
+
+        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
+        <script type="text/javascript" charset="utf-8">
+
+        // Wait for device API libraries to load
+        //
+        document.addEventListener("deviceready", onDeviceReady, false);
+
+        // device APIs are available
+        //
+        function onDeviceReady() {
+            var element = document.getElementById('deviceProperties');
+            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
+                                'Device Cordova: '  + device.cordova  + '<br />' +
+                                'Device Platform: ' + device.platform + '<br />' +
+                                'Device UUID: '     + device.uuid     + '<br />' +
+                                'Device Version: '  + device.version  + '<br />';
+        }
+
+        </script>
+      </head>
+      <body>
+        <p id="deviceProperties">Loading device properties...</p>
+      </body>
+    </html>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/plugin.xml
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/plugin.xml b/test/cordova/plugins/org.apache.cordova.device/plugin.xml
new file mode 100644
index 0000000..7eb03c4
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/plugin.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+    xmlns:rim="http://www.blackberry.com/ns/widgets"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="org.apache.cordova.device"
+    version="0.2.4">
+    <name>Device</name>
+    <description>Cordova Device Plugin</description>
+    <license>Apache 2.0</license>
+    <keywords>cordova,device</keywords>
+    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git</repo>
+    <issue>https://issues.apache.org/jira/browse/CB/component/12320648</issue>
+
+    <js-module src="www/device.js" name="device">
+        <clobbers target="device" />
+    </js-module>
+
+    <!-- firefoxos -->
+    <platform name="firefoxos">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Device">
+                <param name="firefoxos-package" value="Device" />
+            </feature>
+        </config-file>                                         
+        
+        <js-module src="src/firefoxos/DeviceProxy.js" name="DeviceProxy">
+            <runs />
+        </js-module>
+    </platform>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="Device" >
+                <param name="android-package" value="org.apache.cordova.device.Device"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/android/Device.java" target-dir="src/org/apache/cordova/device" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Device">
+                <param name="ios-package" value="CDVDevice"/>
+            </feature>
+        </config-file>
+
+        <header-file src="src/ios/CDVDevice.h" />
+        <source-file src="src/ios/CDVDevice.m" />
+    </platform>
+
+    <!-- blackberry10 -->
+    <platform name="blackberry10">
+        <source-file src="src/blackberry10/index.js" target-dir="Device" />
+        <config-file target="www/config.xml" parent="/widget">
+            <feature name="Device" value="Device"/>
+        </config-file>
+        <config-file target="www/config.xml" parent="/widget/rim:permissions">
+            <rim:permit>read_device_identifying_information</rim:permit>
+        </config-file>
+    </platform>
+
+    <!-- wp7 -->
+    <platform name="wp7">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Device">
+                <param name="wp-package" value="Device"/>
+            </feature>
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+            <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+        </config-file>
+
+        <source-file src="src/wp/Device.cs" />
+    </platform>
+
+    <!-- wp8 -->
+    <platform name="wp8">
+        <config-file target="config.xml" parent="/*">
+            <feature name="Device">
+                <param name="wp-package" value="Device"/>
+            </feature>
+        </config-file>
+
+        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+            <Capability Name="ID_CAP_IDENTITY_DEVICE" />
+        </config-file>
+
+        <source-file src="src/wp/Device.cs" />
+    </platform>
+
+    <!-- windows8 -->
+    <platform name="windows8">
+        <js-module src="src/windows8/DeviceProxy.js" name="DeviceProxy">
+            <merges target="" />
+        </js-module>
+    </platform>
+
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/android/Device.java
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/android/Device.java b/test/cordova/plugins/org.apache.cordova.device/src/android/Device.java
new file mode 100644
index 0000000..2ce3cc7
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/android/Device.java
@@ -0,0 +1,200 @@
+/*
+       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.
+*/
+package org.apache.cordova.device;
+
+import java.util.TimeZone;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.LOG;
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
+
+public class Device extends CordovaPlugin {
+    public static final String TAG = "Device";
+
+    public static String cordovaVersion = "dev";              // Cordova version
+    public static String platform = "Android";                  // Device OS
+    public static String uuid;                                  // Device UUID
+
+    BroadcastReceiver telephonyReceiver = null;
+
+    /**
+     * Constructor.
+     */
+    public Device() {
+    }
+
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    public void initialize(CordovaInterface cordova, CordovaWebView webView) {
+        super.initialize(cordova, webView);
+        Device.uuid = getUuid();
+        this.initTelephonyReceiver();
+    }
+
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArry of arguments for the plugin.
+     * @param callbackContext   The callback id used when calling back into JavaScript.
+     * @return                  True if the action was valid, false if not.
+     */
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+        if (action.equals("getDeviceInfo")) {
+            JSONObject r = new JSONObject();
+            r.put("uuid", Device.uuid);
+            r.put("version", this.getOSVersion());
+            r.put("platform", Device.platform);
+            r.put("cordova", Device.cordovaVersion);
+            r.put("model", this.getModel());
+            callbackContext.success(r);
+        }
+        else {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Unregister receiver.
+     */
+    public void onDestroy() {
+        this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
+    }
+
+    //--------------------------------------------------------------------------
+    // LOCAL METHODS
+    //--------------------------------------------------------------------------
+
+    /**
+     * Listen for telephony events: RINGING, OFFHOOK and IDLE
+     * Send these events to all plugins using
+     *      CordovaActivity.onMessage("telephone", "ringing" | "offhook" | "idle")
+     */
+    private void initTelephonyReceiver() {
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
+        //final CordovaInterface mycordova = this.cordova;
+        this.telephonyReceiver = new BroadcastReceiver() {
+
+            @Override
+            public void onReceive(Context context, Intent intent) {
+
+                // If state has changed
+                if ((intent != null) && intent.getAction().equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
+                    if (intent.hasExtra(TelephonyManager.EXTRA_STATE)) {
+                        String extraData = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
+                        if (extraData.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
+                            LOG.i(TAG, "Telephone RINGING");
+                            webView.postMessage("telephone", "ringing");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) {
+                            LOG.i(TAG, "Telephone OFFHOOK");
+                            webView.postMessage("telephone", "offhook");
+                        }
+                        else if (extraData.equals(TelephonyManager.EXTRA_STATE_IDLE)) {
+                            LOG.i(TAG, "Telephone IDLE");
+                            webView.postMessage("telephone", "idle");
+                        }
+                    }
+                }
+            }
+        };
+
+        // Register the receiver
+        this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
+    }
+
+    /**
+     * Get the OS name.
+     *
+     * @return
+     */
+    public String getPlatform() {
+        return Device.platform;
+    }
+
+    /**
+     * Get the device's Universally Unique Identifier (UUID).
+     *
+     * @return
+     */
+    public String getUuid() {
+        String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+        return uuid;
+    }
+
+    /**
+     * Get the Cordova version.
+     *
+     * @return
+     */
+    public String getCordovaVersion() {
+        return Device.cordovaVersion;
+    }
+
+    public String getModel() {
+        String model = android.os.Build.MODEL;
+        return model;
+    }
+
+    public String getProductName() {
+        String productname = android.os.Build.PRODUCT;
+        return productname;
+    }
+
+    /**
+     * Get the OS version.
+     *
+     * @return
+     */
+    public String getOSVersion() {
+        String osversion = android.os.Build.VERSION.RELEASE;
+        return osversion;
+    }
+
+    public String getSDKVersion() {
+        @SuppressWarnings("deprecation")
+        String sdkversion = android.os.Build.VERSION.SDK;
+        return sdkversion;
+    }
+
+    public String getTimeZoneID() {
+        TimeZone tz = TimeZone.getDefault();
+        return (tz.getID());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js b/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
new file mode 100644
index 0000000..639ac64
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
@@ -0,0 +1,69 @@
+/*
+ *
+ * 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 getModelName () {
+    var modelName = window.qnx.webplatform.device.modelName;
+    //Pre 10.2 (meaning Z10 or Q10)
+    if (typeof modelName === "undefined") {
+        if (window.screen.height === 720 && window.screen.width === 720) {
+            if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) {
+                modelName = "Q10";
+            } else {
+                modelName = "Q5";
+            }
+        } else if ((window.screen.height === 1280 && window.screen.width === 768) ||
+                   (window.screen.height === 768 && window.screen.width === 1280)) {
+            modelName = "Z10";
+        } else {
+            modelName = window.qnx.webplatform.deviceName;
+        }
+    }
+
+    return modelName;
+}
+
+function getUUID () {
+    var uuid = "";
+    try {
+        //Must surround by try catch because this will throw if the app is missing permissions
+        uuid = window.qnx.webplatform.device.devicePin;
+    } catch (e) {
+        //DO Nothing
+    }
+    return uuid;
+}
+
+module.exports = {
+    getDeviceInfo: function (success, fail, args, env) {
+        var result = new PluginResult(args, env),
+            modelName = getModelName(),
+            uuid = getUUID(),
+            info = {
+                platform: "blackberry10",
+                version: window.qnx.webplatform.device.scmBundle,
+                model: modelName,
+                uuid: uuid,
+                cordova: "dev"
+            };
+
+        result.ok(info);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js b/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
new file mode 100644
index 0000000..f37e761
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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 firefoxos = require('cordova/platform');
+var cordova = require('cordova');
+
+module.exports = {
+    getDeviceInfo: function(success, error) {
+        setTimeout(function () {
+            success({
+                cordova: firefoxos.cordovaVersion,
+                platform: 'firefoxos',
+                model: null,
+                version: null,
+                uuid: null
+            });
+        }, 0);
+    }
+};
+
+require("cordova/firefoxos/commandProxy").add("Device", module.exports);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
new file mode 100644
index 0000000..a146d88
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
@@ -0,0 +1,30 @@
+/*
+ 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.
+ */
+
+#import <UIKit/UIKit.h>
+#import <Cordova/CDVPlugin.h>
+
+@interface CDVDevice : CDVPlugin
+{}
+
++ (NSString*)cordovaVersion;
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
new file mode 100644
index 0000000..7e18d92
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
@@ -0,0 +1,90 @@
+/*
+ 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.
+ */
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#import <Cordova/CDV.h>
+#import "CDVDevice.h"
+
+@implementation UIDevice (ModelVersion)
+
+- (NSString*)modelVersion
+{
+    size_t size;
+
+    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+    char* machine = malloc(size);
+    sysctlbyname("hw.machine", machine, &size, NULL, 0);
+    NSString* platform = [NSString stringWithUTF8String:machine];
+    free(machine);
+
+    return platform;
+}
+
+@end
+
+@interface CDVDevice () {}
+@end
+
+@implementation CDVDevice
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
+{
+    NSDictionary* deviceProperties = [self deviceProperties];
+    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
+
+    /* Settings.plist
+     * Read the optional Settings.plist file and push these user-defined settings down into the web application.
+     * This can be useful for supplying build-time configuration variables down to the app to change its behavior,
+     * such as specifying Full / Lite version, or localization (English vs German, for instance).
+     */
+    // TODO: turn this into an iOS only plugin
+    NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"];
+
+    if ([temp respondsToSelector:@selector(JSONString)]) {
+        NSLog(@"Deprecation warning: window.Setting will be removed Aug 2013. Refer to https://issues.apache.org/jira/browse/CB-2433");
+        NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]];
+        [self.commandDelegate evalJs:js];
+    }
+
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+- (NSDictionary*)deviceProperties
+{
+    UIDevice* device = [UIDevice currentDevice];
+    NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
+
+    [devProps setObject:[device modelVersion] forKey:@"model"];
+    [devProps setObject:@"iOS" forKey:@"platform"];
+    [devProps setObject:[device systemVersion] forKey:@"version"];
+    [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"];
+    [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
+
+    NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
+    return devReturn;
+}
+
++ (NSString*)cordovaVersion
+{
+    return CDV_VERSION;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js b/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
new file mode 100644
index 0000000..16145c0
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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');
+var utils = require('cordova/utils');
+
+module.exports = {
+
+    getDeviceInfo:function(win,fail,args) {
+
+        // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
+        var deviceId;
+
+        var localSettings = Windows.Storage.ApplicationData.current.localSettings;
+
+        if (localSettings.values.deviceId) {
+            deviceId = localSettings.values.deviceId;
+        }
+        else {
+            deviceId = localSettings.values.deviceId = utils.createUUID();
+        }
+
+        setTimeout(function () {
+            win({ platform: "windows8", version: "8", uuid: deviceId, cordova: '0.0.0', model: window.clientInformation.platform });
+        }, 0);
+    }
+
+};
+
+require("cordova/windows8/commandProxy").add("Device", module.exports);
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs b/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
new file mode 100644
index 0000000..0d2576d
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
@@ -0,0 +1,135 @@
+/*  
+	Licensed 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.
+*/
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Info;
+using System.IO.IsolatedStorage;
+using System.Windows.Resources;
+using System.IO;
+using System.Diagnostics;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+    public class Device : BaseCommand
+    {
+        public void getDeviceInfo(string notused)
+        {
+
+            string res = String.Format("\"name\":\"{0}\",\"cordova\":\"{1}\",\"platform\":\"{2}\",\"uuid\":\"{3}\",\"version\":\"{4}\",\"model\":\"{5}\"",
+                                        this.name,
+                                        this.cordova,
+                                        this.platform,
+                                        this.uuid,
+                                        this.version,
+                                        this.model);
+
+
+
+            res = "{" + res + "}";
+            //Debug.WriteLine("Result::" + res);
+            DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res));
+        }
+
+        public string model
+        {
+            get
+            {
+                return DeviceStatus.DeviceName;
+                //return String.Format("{0},{1},{2}", DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceHardwareVersion, DeviceStatus.DeviceFirmwareVersion); 
+            }
+        }
+
+        public string name
+        {
+            get
+            {
+                return DeviceStatus.DeviceName;
+                
+            }
+        }
+
+        public string cordova
+        {
+            get
+            {
+                // TODO: should be able to dynamically read the Cordova version from somewhere...
+                return "3.0.0";
+            }
+        }
+
+        public string platform
+        {
+            get
+            {
+                return Environment.OSVersion.Platform.ToString();
+            }
+        }
+
+        public string uuid
+        {
+            get
+            {
+                string returnVal = "";
+                object id;
+                UserExtendedProperties.TryGetValue("ANID", out id);
+
+                if (id != null)
+                {
+                    returnVal = id.ToString().Substring(2, 32);
+                }
+                else
+                {
+                    returnVal = "???unknown???";
+
+                    using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication())
+                    {
+                        try
+                        {
+                            IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage);
+
+                            using (StreamReader reader = new StreamReader(fileStream))
+                            {
+                                returnVal = reader.ReadLine();
+                            }
+                        }
+                        catch (Exception /*ex*/)
+                        {
+
+                        }
+                    }
+                }
+
+                return returnVal;
+            }
+        }
+
+        public string version
+        {
+            get
+            {
+                return Environment.OSVersion.Version.ToString();
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
new file mode 100644
index 0000000..7d9d924
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
@@ -0,0 +1,101 @@
+jasmine.HtmlReporter = function(_doc) {
+  var self = this;
+  var doc = _doc || window.document;
+
+  var reporterView;
+
+  var dom = {};
+
+  // Jasmine Reporter Public Interface
+  self.logRunningSpecs = false;
+
+  self.reportRunnerStarting = function(runner) {
+    var specs = runner.specs() || [];
+
+    if (specs.length == 0) {
+      return;
+    }
+
+    createReporterDom(runner.env.versionString());
+    doc.body.appendChild(dom.reporter);
+
+    reporterView = new jasmine.HtmlReporter.ReporterView(dom);
+    reporterView.addSpecs(specs, self.specFilter);
+  };
+
+  self.reportRunnerResults = function(runner) {
+    reporterView && reporterView.complete();
+  };
+
+  self.reportSuiteResults = function(suite) {
+    reporterView.suiteComplete(suite);
+  };
+
+  self.reportSpecStarting = function(spec) {
+    if (self.logRunningSpecs) {
+      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+    }
+  };
+
+  self.reportSpecResults = function(spec) {
+    reporterView.specComplete(spec);
+  };
+
+  self.log = function() {
+    var console = jasmine.getGlobal().console;
+    if (console && console.log) {
+      if (console.log.apply) {
+        console.log.apply(console, arguments);
+      } else {
+        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+      }
+    }
+  };
+
+  self.specFilter = function(spec) {
+    if (!focusedSpecName()) {
+      return true;
+    }
+
+    return spec.getFullName().indexOf(focusedSpecName()) === 0;
+  };
+
+  return self;
+
+  function focusedSpecName() {
+    var specName;
+
+    (function memoizeFocusedSpec() {
+      if (specName) {
+        return;
+      }
+
+      var paramMap = [];
+      var params = doc.location.search.substring(1).split('&');
+
+      for (var i = 0; i < params.length; i++) {
+        var p = params[i].split('=');
+        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+      }
+
+      specName = paramMap.spec;
+    })();
+
+    return specName;
+  }
+
+  function createReporterDom(version) {
+    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
+      dom.banner = self.createDom('div', { className: 'banner' },
+        self.createDom('span', { className: 'title' }, "Jasmine "),
+        self.createDom('span', { className: 'version' }, version)),
+
+      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
+      dom.alert = self.createDom('div', {className: 'alert'}),
+      dom.results = self.createDom('div', {className: 'results'},
+        dom.summary = self.createDom('div', { className: 'summary' }),
+        dom.details = self.createDom('div', { id: 'details' }))
+    );
+  }
+};
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
new file mode 100644
index 0000000..745e1e0
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
@@ -0,0 +1,60 @@
+jasmine.HtmlReporterHelpers = {};
+
+jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) {
+        el.appendChild(child);
+      }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
+  var results = child.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+
+  return status;
+};
+
+jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
+  var parentDiv = this.dom.summary;
+  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
+  var parent = child[parentSuite];
+
+  if (parent) {
+    if (typeof this.views.suites[parent.id] == 'undefined') {
+      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
+    }
+    parentDiv = this.views.suites[parent.id].element;
+  }
+
+  parentDiv.appendChild(childElement);
+};
+
+
+jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
+  for(var fn in jasmine.HtmlReporterHelpers) {
+    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
+  }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
new file mode 100644
index 0000000..6a6d005
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
@@ -0,0 +1,164 @@
+jasmine.HtmlReporter.ReporterView = function(dom) {
+  this.startedAt = new Date();
+  this.runningSpecCount = 0;
+  this.completeSpecCount = 0;
+  this.passedCount = 0;
+  this.failedCount = 0;
+  this.skippedCount = 0;
+
+  this.createResultsMenu = function() {
+    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
+      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
+      ' | ',
+      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
+
+    this.summaryMenuItem.onclick = function() {
+      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
+    };
+
+    this.detailsMenuItem.onclick = function() {
+      showDetails();
+    };
+  };
+
+  this.addSpecs = function(specs, specFilter) {
+    this.totalSpecCount = specs.length;
+
+    this.views = {
+      specs: {},
+      suites: {}
+    };
+
+    for (var i = 0; i < specs.length; i++) {
+      var spec = specs[i];
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
+      if (specFilter(spec)) {
+        this.runningSpecCount++;
+      }
+    }
+  };
+
+  this.specComplete = function(spec) {
+    this.completeSpecCount++;
+
+    if (isUndefined(this.views.specs[spec.id])) {
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
+    }
+
+    var specView = this.views.specs[spec.id];
+
+    switch (specView.status()) {
+      case 'passed':
+        this.passedCount++;
+        break;
+
+      case 'failed':
+        this.failedCount++;
+        break;
+
+      case 'skipped':
+        this.skippedCount++;
+        break;
+    }
+
+    specView.refresh();
+    this.refresh();
+  };
+
+  this.suiteComplete = function(suite) {
+    var suiteView = this.views.suites[suite.id];
+    if (isUndefined(suiteView)) {
+      return;
+    }
+    suiteView.refresh();
+  };
+
+  this.refresh = function() {
+
+    if (isUndefined(this.resultsMenu)) {
+      this.createResultsMenu();
+    }
+
+    // currently running UI
+    if (isUndefined(this.runningAlert)) {
+      this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"});
+      dom.alert.appendChild(this.runningAlert);
+    }
+    this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
+
+    // skipped specs UI
+    if (isUndefined(this.skippedAlert)) {
+      this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"});
+    }
+
+    this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.skippedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.skippedAlert);
+    }
+
+    // passing specs UI
+    if (isUndefined(this.passedAlert)) {
+      this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"});
+    }
+    this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
+
+    // failing specs UI
+    if (isUndefined(this.failedAlert)) {
+      this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
+    }
+    this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
+
+    if (this.failedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.failedAlert);
+      dom.alert.appendChild(this.resultsMenu);
+    }
+
+    // summary info
+    this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
+    this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
+  };
+
+  this.complete = function() {
+    dom.alert.removeChild(this.runningAlert);
+
+    this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.failedCount === 0) {
+      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
+    } else {
+      showDetails();
+    }
+
+    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
+  };
+
+  return this;
+
+  function showDetails() {
+    if (dom.reporter.className.search(/showDetails/) === -1) {
+      dom.reporter.className += " showDetails";
+    }
+  }
+
+  function isUndefined(obj) {
+    return typeof obj === 'undefined';
+  }
+
+  function isDefined(obj) {
+    return !isUndefined(obj);
+  }
+
+  function specPluralizedFor(count) {
+    var str = count + " spec";
+    if (count > 1) {
+      str += "s"
+    }
+    return str;
+  }
+
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
+
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
new file mode 100644
index 0000000..e8a3c23
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
@@ -0,0 +1,79 @@
+jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
+  this.spec = spec;
+  this.dom = dom;
+  this.views = views;
+
+  this.symbol = this.createDom('li', { className: 'pending' });
+  this.dom.symbolSummary.appendChild(this.symbol);
+
+  this.summary = this.createDom('div', { className: 'specSummary' },
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
+        title: this.spec.getFullName()
+      }, this.spec.description)
+  );
+
+  this.detail = this.createDom('div', { className: 'specDetail' },
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
+        title: this.spec.getFullName()
+      }, this.spec.getFullName())
+  );
+};
+
+jasmine.HtmlReporter.SpecView.prototype.status = function() {
+  return this.getSpecStatus(this.spec);
+};
+
+jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
+  this.symbol.className = this.status();
+
+  switch (this.status()) {
+    case 'skipped':
+      break;
+
+    case 'passed':
+      this.appendSummaryToSuiteDiv();
+      break;
+
+    case 'failed':
+      this.appendSummaryToSuiteDiv();
+      this.appendFailureDetail();
+      break;
+  }
+};
+
+jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
+  this.summary.className += ' ' + this.status();
+  this.appendToSummary(this.spec, this.summary);
+};
+
+jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
+  this.detail.className += ' ' + this.status();
+
+  var resultItems = this.spec.results().getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    this.detail.appendChild(messagesDiv);
+    this.dom.details.appendChild(this.detail);
+  }
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
new file mode 100644
index 0000000..19a1efa
--- /dev/null
+++ b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
@@ -0,0 +1,22 @@
+jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
+  this.suite = suite;
+  this.dom = dom;
+  this.views = views;
+
+  this.element = this.createDom('div', { className: 'suite' },
+      this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description)
+  );
+
+  this.appendToSummary(this.suite, this.element);
+};
+
+jasmine.HtmlReporter.SuiteView.prototype.status = function() {
+  return this.getSpecStatus(this.suite);
+};
+
+jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
+  this.element.className += " " + this.status();
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
+


[14/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/q.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/q.js b/test/cordova/node_modules/q/q.js
new file mode 100644
index 0000000..66389fc
--- /dev/null
+++ b/test/cordova/node_modules/q/q.js
@@ -0,0 +1,1937 @@
+// vim:ts=4:sts=4:sw=4:
+/*!
+ *
+ * Copyright 2009-2012 Kris Kowal under the terms of the MIT
+ * license found at http://github.com/kriskowal/q/raw/master/LICENSE
+ *
+ * With parts by Tyler Close
+ * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
+ * at http://www.opensource.org/licenses/mit-license.html
+ * Forked at ref_send.js version: 2009-05-11
+ *
+ * With parts by Mark Miller
+ * Copyright (C) 2011 Google Inc.
+ *
+ * Licensed 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 (definition) {
+    // Turn off strict mode for this function so we can assign to global.Q
+    /* jshint strict: false */
+
+    // This file will function properly as a <script> tag, or a module
+    // using CommonJS and NodeJS or RequireJS module formats.  In
+    // Common/Node/RequireJS, the module exports the Q API and when
+    // executed as a simple <script>, it creates a Q global instead.
+
+    // Montage Require
+    if (typeof bootstrap === "function") {
+        bootstrap("promise", definition);
+
+    // CommonJS
+    } else if (typeof exports === "object") {
+        module.exports = definition();
+
+    // RequireJS
+    } else if (typeof define === "function" && define.amd) {
+        define(definition);
+
+    // SES (Secure EcmaScript)
+    } else if (typeof ses !== "undefined") {
+        if (!ses.ok()) {
+            return;
+        } else {
+            ses.makeQ = definition;
+        }
+
+    // <script>
+    } else {
+        Q = definition();
+    }
+
+})(function () {
+"use strict";
+
+var hasStacks = false;
+try {
+    throw new Error();
+} catch (e) {
+    hasStacks = !!e.stack;
+}
+
+// All code after this point will be filtered from stack traces reported
+// by Q.
+var qStartingLine = captureLine();
+var qFileName;
+
+// shims
+
+// used for fallback in "allResolved"
+var noop = function () {};
+
+// Use the fastest possible means to execute a task in a future turn
+// of the event loop.
+var nextTick =(function () {
+    // linked list of tasks (single, with head node)
+    var head = {task: void 0, next: null};
+    var tail = head;
+    var flushing = false;
+    var requestTick = void 0;
+    var isNodeJS = false;
+
+    function flush() {
+        /* jshint loopfunc: true */
+
+        while (head.next) {
+            head = head.next;
+            var task = head.task;
+            head.task = void 0;
+            var domain = head.domain;
+
+            if (domain) {
+                head.domain = void 0;
+                domain.enter();
+            }
+
+            try {
+                task();
+
+            } catch (e) {
+                if (isNodeJS) {
+                    // In node, uncaught exceptions are considered fatal errors.
+                    // Re-throw them synchronously to interrupt flushing!
+
+                    // Ensure continuation if the uncaught exception is suppressed
+                    // listening "uncaughtException" events (as domains does).
+                    // Continue in next event to avoid tick recursion.
+                    if (domain) {
+                        domain.exit();
+                    }
+                    setTimeout(flush, 0);
+                    if (domain) {
+                        domain.enter();
+                    }
+
+                    throw e;
+
+                } else {
+                    // In browsers, uncaught exceptions are not fatal.
+                    // Re-throw them asynchronously to avoid slow-downs.
+                    setTimeout(function() {
+                       throw e;
+                    }, 0);
+                }
+            }
+
+            if (domain) {
+                domain.exit();
+            }
+        }
+
+        flushing = false;
+    }
+
+    nextTick = function (task) {
+        tail = tail.next = {
+            task: task,
+            domain: isNodeJS && process.domain,
+            next: null
+        };
+
+        if (!flushing) {
+            flushing = true;
+            requestTick();
+        }
+    };
+
+    if (typeof process !== "undefined" && process.nextTick) {
+        // Node.js before 0.9. Note that some fake-Node environments, like the
+        // Mocha test runner, introduce a `process` global without a `nextTick`.
+        isNodeJS = true;
+
+        requestTick = function () {
+            process.nextTick(flush);
+        };
+
+    } else if (typeof setImmediate === "function") {
+        // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate
+        if (typeof window !== "undefined") {
+            requestTick = setImmediate.bind(window, flush);
+        } else {
+            requestTick = function () {
+                setImmediate(flush);
+            };
+        }
+
+    } else if (typeof MessageChannel !== "undefined") {
+        // modern browsers
+        // http://www.nonblocking.io/2011/06/windownexttick.html
+        var channel = new MessageChannel();
+        // At least Safari Version 6.0.5 (8536.30.1) intermittently cannot create
+        // working message ports the first time a page loads.
+        channel.port1.onmessage = function () {
+            requestTick = requestPortTick;
+            channel.port1.onmessage = flush;
+            flush();
+        };
+        var requestPortTick = function () {
+            // Opera requires us to provide a message payload, regardless of
+            // whether we use it.
+            channel.port2.postMessage(0);
+        };
+        requestTick = function () {
+            setTimeout(flush, 0);
+            requestPortTick();
+        };
+
+    } else {
+        // old browsers
+        requestTick = function () {
+            setTimeout(flush, 0);
+        };
+    }
+
+    return nextTick;
+})();
+
+// Attempt to make generics safe in the face of downstream
+// modifications.
+// There is no situation where this is necessary.
+// If you need a security guarantee, these primordials need to be
+// deeply frozen anyway, and if you don’t need a security guarantee,
+// this is just plain paranoid.
+// However, this does have the nice side-effect of reducing the size
+// of the code by reducing x.call() to merely x(), eliminating many
+// hard-to-minify characters.
+// See Mark Miller’s explanation of what this does.
+// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming
+var call = Function.call;
+function uncurryThis(f) {
+    return function () {
+        return call.apply(f, arguments);
+    };
+}
+// This is equivalent, but slower:
+// uncurryThis = Function_bind.bind(Function_bind.call);
+// http://jsperf.com/uncurrythis
+
+var array_slice = uncurryThis(Array.prototype.slice);
+
+var array_reduce = uncurryThis(
+    Array.prototype.reduce || function (callback, basis) {
+        var index = 0,
+            length = this.length;
+        // concerning the initial value, if one is not provided
+        if (arguments.length === 1) {
+            // seek to the first value in the array, accounting
+            // for the possibility that is is a sparse array
+            do {
+                if (index in this) {
+                    basis = this[index++];
+                    break;
+                }
+                if (++index >= length) {
+                    throw new TypeError();
+                }
+            } while (1);
+        }
+        // reduce
+        for (; index < length; index++) {
+            // account for the possibility that the array is sparse
+            if (index in this) {
+                basis = callback(basis, this[index], index);
+            }
+        }
+        return basis;
+    }
+);
+
+var array_indexOf = uncurryThis(
+    Array.prototype.indexOf || function (value) {
+        // not a very good shim, but good enough for our one use of it
+        for (var i = 0; i < this.length; i++) {
+            if (this[i] === value) {
+                return i;
+            }
+        }
+        return -1;
+    }
+);
+
+var array_map = uncurryThis(
+    Array.prototype.map || function (callback, thisp) {
+        var self = this;
+        var collect = [];
+        array_reduce(self, function (undefined, value, index) {
+            collect.push(callback.call(thisp, value, index, self));
+        }, void 0);
+        return collect;
+    }
+);
+
+var object_create = Object.create || function (prototype) {
+    function Type() { }
+    Type.prototype = prototype;
+    return new Type();
+};
+
+var object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
+
+var object_keys = Object.keys || function (object) {
+    var keys = [];
+    for (var key in object) {
+        if (object_hasOwnProperty(object, key)) {
+            keys.push(key);
+        }
+    }
+    return keys;
+};
+
+var object_toString = uncurryThis(Object.prototype.toString);
+
+function isObject(value) {
+    return value === Object(value);
+}
+
+// generator related shims
+
+// FIXME: Remove this function once ES6 generators are in SpiderMonkey.
+function isStopIteration(exception) {
+    return (
+        object_toString(exception) === "[object StopIteration]" ||
+        exception instanceof QReturnValue
+    );
+}
+
+// FIXME: Remove this helper and Q.return once ES6 generators are in
+// SpiderMonkey.
+var QReturnValue;
+if (typeof ReturnValue !== "undefined") {
+    QReturnValue = ReturnValue;
+} else {
+    QReturnValue = function (value) {
+        this.value = value;
+    };
+}
+
+// Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only
+// engine that has a deployed base of browsers that support generators.
+// However, SM's generators use the Python-inspired semantics of
+// outdated ES6 drafts.  We would like to support ES6, but we'd also
+// like to make it possible to use generators in deployed browsers, so
+// we also support Python-style generators.  At some point we can remove
+// this block.
+var hasES6Generators;
+try {
+    /* jshint evil: true, nonew: false */
+    new Function("(function* (){ yield 1; })");
+    hasES6Generators = true;
+} catch (e) {
+    hasES6Generators = false;
+}
+
+// long stack traces
+
+var STACK_JUMP_SEPARATOR = "From previous event:";
+
+function makeStackTraceLong(error, promise) {
+    // If possible, transform the error stack trace by removing Node and Q
+    // cruft, then concatenating with the stack trace of `promise`. See #57.
+    if (hasStacks &&
+        promise.stack &&
+        typeof error === "object" &&
+        error !== null &&
+        error.stack &&
+        error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1
+    ) {
+        var stacks = [];
+        for (var p = promise; !!p; p = p.source) {
+            if (p.stack) {
+                stacks.unshift(p.stack);
+            }
+        }
+        stacks.unshift(error.stack);
+
+        var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n");
+        error.stack = filterStackString(concatedStacks);
+    }
+}
+
+function filterStackString(stackString) {
+    var lines = stackString.split("\n");
+    var desiredLines = [];
+    for (var i = 0; i < lines.length; ++i) {
+        var line = lines[i];
+
+        if (!isInternalFrame(line) && !isNodeFrame(line) && line) {
+            desiredLines.push(line);
+        }
+    }
+    return desiredLines.join("\n");
+}
+
+function isNodeFrame(stackLine) {
+    return stackLine.indexOf("(module.js:") !== -1 ||
+           stackLine.indexOf("(node.js:") !== -1;
+}
+
+function getFileNameAndLineNumber(stackLine) {
+    // Named functions: "at functionName (filename:lineNumber:columnNumber)"
+    // In IE10 function name can have spaces ("Anonymous function") O_o
+    var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);
+    if (attempt1) {
+        return [attempt1[1], Number(attempt1[2])];
+    }
+
+    // Anonymous functions: "at filename:lineNumber:columnNumber"
+    var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine);
+    if (attempt2) {
+        return [attempt2[1], Number(attempt2[2])];
+    }
+
+    // Firefox style: "function@filename:lineNumber or @filename:lineNumber"
+    var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine);
+    if (attempt3) {
+        return [attempt3[1], Number(attempt3[2])];
+    }
+}
+
+function isInternalFrame(stackLine) {
+    var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);
+
+    if (!fileNameAndLineNumber) {
+        return false;
+    }
+
+    var fileName = fileNameAndLineNumber[0];
+    var lineNumber = fileNameAndLineNumber[1];
+
+    return fileName === qFileName &&
+        lineNumber >= qStartingLine &&
+        lineNumber <= qEndingLine;
+}
+
+// discover own file name and line number range for filtering stack
+// traces
+function captureLine() {
+    if (!hasStacks) {
+        return;
+    }
+
+    try {
+        throw new Error();
+    } catch (e) {
+        var lines = e.stack.split("\n");
+        var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2];
+        var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);
+        if (!fileNameAndLineNumber) {
+            return;
+        }
+
+        qFileName = fileNameAndLineNumber[0];
+        return fileNameAndLineNumber[1];
+    }
+}
+
+function deprecate(callback, name, alternative) {
+    return function () {
+        if (typeof console !== "undefined" &&
+            typeof console.warn === "function") {
+            console.warn(name + " is deprecated, use " + alternative +
+                         " instead.", new Error("").stack);
+        }
+        return callback.apply(callback, arguments);
+    };
+}
+
+// end of shims
+// beginning of real work
+
+/**
+ * Constructs a promise for an immediate reference, passes promises through, or
+ * coerces promises from different systems.
+ * @param value immediate reference or promise
+ */
+function Q(value) {
+    // If the object is already a Promise, return it directly.  This enables
+    // the resolve function to both be used to created references from objects,
+    // but to tolerably coerce non-promises to promises.
+    if (isPromise(value)) {
+        return value;
+    }
+
+    // assimilate thenables
+    if (isPromiseAlike(value)) {
+        return coerce(value);
+    } else {
+        return fulfill(value);
+    }
+}
+Q.resolve = Q;
+
+/**
+ * Performs a task in a future turn of the event loop.
+ * @param {Function} task
+ */
+Q.nextTick = nextTick;
+
+/**
+ * Controls whether or not long stack traces will be on
+ */
+Q.longStackSupport = false;
+
+/**
+ * Constructs a {promise, resolve, reject} object.
+ *
+ * `resolve` is a callback to invoke with a more resolved value for the
+ * promise. To fulfill the promise, invoke `resolve` with any value that is
+ * not a thenable. To reject the promise, invoke `resolve` with a rejected
+ * thenable, or invoke `reject` with the reason directly. To resolve the
+ * promise to another thenable, thus putting it in the same state, invoke
+ * `resolve` with that other thenable.
+ */
+Q.defer = defer;
+function defer() {
+    // if "messages" is an "Array", that indicates that the promise has not yet
+    // been resolved.  If it is "undefined", it has been resolved.  Each
+    // element of the messages array is itself an array of complete arguments to
+    // forward to the resolved promise.  We coerce the resolution value to a
+    // promise using the `resolve` function because it handles both fully
+    // non-thenable values and other thenables gracefully.
+    var messages = [], progressListeners = [], resolvedPromise;
+
+    var deferred = object_create(defer.prototype);
+    var promise = object_create(Promise.prototype);
+
+    promise.promiseDispatch = function (resolve, op, operands) {
+        var args = array_slice(arguments);
+        if (messages) {
+            messages.push(args);
+            if (op === "when" && operands[1]) { // progress operand
+                progressListeners.push(operands[1]);
+            }
+        } else {
+            nextTick(function () {
+                resolvedPromise.promiseDispatch.apply(resolvedPromise, args);
+            });
+        }
+    };
+
+    // XXX deprecated
+    promise.valueOf = deprecate(function () {
+        if (messages) {
+            return promise;
+        }
+        var nearerValue = nearer(resolvedPromise);
+        if (isPromise(nearerValue)) {
+            resolvedPromise = nearerValue; // shorten chain
+        }
+        return nearerValue;
+    }, "valueOf", "inspect");
+
+    promise.inspect = function () {
+        if (!resolvedPromise) {
+            return { state: "pending" };
+        }
+        return resolvedPromise.inspect();
+    };
+
+    if (Q.longStackSupport && hasStacks) {
+        try {
+            throw new Error();
+        } catch (e) {
+            // NOTE: don't try to use `Error.captureStackTrace` or transfer the
+            // accessor around; that causes memory leaks as per GH-111. Just
+            // reify the stack trace as a string ASAP.
+            //
+            // At the same time, cut off the first line; it's always just
+            // "[object Promise]\n", as per the `toString`.
+            promise.stack = e.stack.substring(e.stack.indexOf("\n") + 1);
+        }
+    }
+
+    // NOTE: we do the checks for `resolvedPromise` in each method, instead of
+    // consolidating them into `become`, since otherwise we'd create new
+    // promises with the lines `become(whatever(value))`. See e.g. GH-252.
+
+    function become(newPromise) {
+        resolvedPromise = newPromise;
+        promise.source = newPromise;
+
+        array_reduce(messages, function (undefined, message) {
+            nextTick(function () {
+                newPromise.promiseDispatch.apply(newPromise, message);
+            });
+        }, void 0);
+
+        messages = void 0;
+        progressListeners = void 0;
+    }
+
+    deferred.promise = promise;
+    deferred.resolve = function (value) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(Q(value));
+    };
+
+    deferred.fulfill = function (value) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(fulfill(value));
+    };
+    deferred.reject = function (reason) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        become(reject(reason));
+    };
+    deferred.notify = function (progress) {
+        if (resolvedPromise) {
+            return;
+        }
+
+        array_reduce(progressListeners, function (undefined, progressListener) {
+            nextTick(function () {
+                progressListener(progress);
+            });
+        }, void 0);
+    };
+
+    return deferred;
+}
+
+/**
+ * Creates a Node-style callback that will resolve or reject the deferred
+ * promise.
+ * @returns a nodeback
+ */
+defer.prototype.makeNodeResolver = function () {
+    var self = this;
+    return function (error, value) {
+        if (error) {
+            self.reject(error);
+        } else if (arguments.length > 2) {
+            self.resolve(array_slice(arguments, 1));
+        } else {
+            self.resolve(value);
+        }
+    };
+};
+
+/**
+ * @param resolver {Function} a function that returns nothing and accepts
+ * the resolve, reject, and notify functions for a deferred.
+ * @returns a promise that may be resolved with the given resolve and reject
+ * functions, or rejected by a thrown exception in resolver
+ */
+Q.promise = promise;
+function promise(resolver) {
+    if (typeof resolver !== "function") {
+        throw new TypeError("resolver must be a function.");
+    }
+    var deferred = defer();
+    try {
+        resolver(deferred.resolve, deferred.reject, deferred.notify);
+    } catch (reason) {
+        deferred.reject(reason);
+    }
+    return deferred.promise;
+}
+
+// XXX experimental.  This method is a way to denote that a local value is
+// serializable and should be immediately dispatched to a remote upon request,
+// instead of passing a reference.
+Q.passByCopy = function (object) {
+    //freeze(object);
+    //passByCopies.set(object, true);
+    return object;
+};
+
+Promise.prototype.passByCopy = function () {
+    //freeze(object);
+    //passByCopies.set(object, true);
+    return this;
+};
+
+/**
+ * If two promises eventually fulfill to the same value, promises that value,
+ * but otherwise rejects.
+ * @param x {Any*}
+ * @param y {Any*}
+ * @returns {Any*} a promise for x and y if they are the same, but a rejection
+ * otherwise.
+ *
+ */
+Q.join = function (x, y) {
+    return Q(x).join(y);
+};
+
+Promise.prototype.join = function (that) {
+    return Q([this, that]).spread(function (x, y) {
+        if (x === y) {
+            // TODO: "===" should be Object.is or equiv
+            return x;
+        } else {
+            throw new Error("Can't join: not the same: " + x + " " + y);
+        }
+    });
+};
+
+/**
+ * Returns a promise for the first of an array of promises to become fulfilled.
+ * @param answers {Array[Any*]} promises to race
+ * @returns {Any*} the first promise to be fulfilled
+ */
+Q.race = race;
+function race(answerPs) {
+    return promise(function(resolve, reject) {
+        // Switch to this once we can assume at least ES5
+        // answerPs.forEach(function(answerP) {
+        //     Q(answerP).then(resolve, reject);
+        // });
+        // Use this in the meantime
+        for (var i = 0, len = answerPs.length; i < len; i++) {
+            Q(answerPs[i]).then(resolve, reject);
+        }
+    });
+}
+
+Promise.prototype.race = function () {
+    return this.then(Q.race);
+};
+
+/**
+ * Constructs a Promise with a promise descriptor object and optional fallback
+ * function.  The descriptor contains methods like when(rejected), get(name),
+ * set(name, value), post(name, args), and delete(name), which all
+ * return either a value, a promise for a value, or a rejection.  The fallback
+ * accepts the operation name, a resolver, and any further arguments that would
+ * have been forwarded to the appropriate method above had a method been
+ * provided with the proper name.  The API makes no guarantees about the nature
+ * of the returned object, apart from that it is usable whereever promises are
+ * bought and sold.
+ */
+Q.makePromise = Promise;
+function Promise(descriptor, fallback, inspect) {
+    if (fallback === void 0) {
+        fallback = function (op) {
+            return reject(new Error(
+                "Promise does not support operation: " + op
+            ));
+        };
+    }
+    if (inspect === void 0) {
+        inspect = function () {
+            return {state: "unknown"};
+        };
+    }
+
+    var promise = object_create(Promise.prototype);
+
+    promise.promiseDispatch = function (resolve, op, args) {
+        var result;
+        try {
+            if (descriptor[op]) {
+                result = descriptor[op].apply(promise, args);
+            } else {
+                result = fallback.call(promise, op, args);
+            }
+        } catch (exception) {
+            result = reject(exception);
+        }
+        if (resolve) {
+            resolve(result);
+        }
+    };
+
+    promise.inspect = inspect;
+
+    // XXX deprecated `valueOf` and `exception` support
+    if (inspect) {
+        var inspected = inspect();
+        if (inspected.state === "rejected") {
+            promise.exception = inspected.reason;
+        }
+
+        promise.valueOf = deprecate(function () {
+            var inspected = inspect();
+            if (inspected.state === "pending" ||
+                inspected.state === "rejected") {
+                return promise;
+            }
+            return inspected.value;
+        });
+    }
+
+    return promise;
+}
+
+Promise.prototype.toString = function () {
+    return "[object Promise]";
+};
+
+Promise.prototype.then = function (fulfilled, rejected, progressed) {
+    var self = this;
+    var deferred = defer();
+    var done = false;   // ensure the untrusted promise makes at most a
+                        // single call to one of the callbacks
+
+    function _fulfilled(value) {
+        try {
+            return typeof fulfilled === "function" ? fulfilled(value) : value;
+        } catch (exception) {
+            return reject(exception);
+        }
+    }
+
+    function _rejected(exception) {
+        if (typeof rejected === "function") {
+            makeStackTraceLong(exception, self);
+            try {
+                return rejected(exception);
+            } catch (newException) {
+                return reject(newException);
+            }
+        }
+        return reject(exception);
+    }
+
+    function _progressed(value) {
+        return typeof progressed === "function" ? progressed(value) : value;
+    }
+
+    nextTick(function () {
+        self.promiseDispatch(function (value) {
+            if (done) {
+                return;
+            }
+            done = true;
+
+            deferred.resolve(_fulfilled(value));
+        }, "when", [function (exception) {
+            if (done) {
+                return;
+            }
+            done = true;
+
+            deferred.resolve(_rejected(exception));
+        }]);
+    });
+
+    // Progress propagator need to be attached in the current tick.
+    self.promiseDispatch(void 0, "when", [void 0, function (value) {
+        var newValue;
+        var threw = false;
+        try {
+            newValue = _progressed(value);
+        } catch (e) {
+            threw = true;
+            if (Q.onerror) {
+                Q.onerror(e);
+            } else {
+                throw e;
+            }
+        }
+
+        if (!threw) {
+            deferred.notify(newValue);
+        }
+    }]);
+
+    return deferred.promise;
+};
+
+/**
+ * Registers an observer on a promise.
+ *
+ * Guarantees:
+ *
+ * 1. that fulfilled and rejected will be called only once.
+ * 2. that either the fulfilled callback or the rejected callback will be
+ *    called, but not both.
+ * 3. that fulfilled and rejected will not be called in this turn.
+ *
+ * @param value      promise or immediate reference to observe
+ * @param fulfilled  function to be called with the fulfilled value
+ * @param rejected   function to be called with the rejection exception
+ * @param progressed function to be called on any progress notifications
+ * @return promise for the return value from the invoked callback
+ */
+Q.when = when;
+function when(value, fulfilled, rejected, progressed) {
+    return Q(value).then(fulfilled, rejected, progressed);
+}
+
+Promise.prototype.thenResolve = function (value) {
+    return this.then(function () { return value; });
+};
+
+Q.thenResolve = function (promise, value) {
+    return Q(promise).thenResolve(value);
+};
+
+Promise.prototype.thenReject = function (reason) {
+    return this.then(function () { throw reason; });
+};
+
+Q.thenReject = function (promise, reason) {
+    return Q(promise).thenReject(reason);
+};
+
+/**
+ * If an object is not a promise, it is as "near" as possible.
+ * If a promise is rejected, it is as "near" as possible too.
+ * If it’s a fulfilled promise, the fulfillment value is nearer.
+ * If it’s a deferred promise and the deferred has been resolved, the
+ * resolution is "nearer".
+ * @param object
+ * @returns most resolved (nearest) form of the object
+ */
+
+// XXX should we re-do this?
+Q.nearer = nearer;
+function nearer(value) {
+    if (isPromise(value)) {
+        var inspected = value.inspect();
+        if (inspected.state === "fulfilled") {
+            return inspected.value;
+        }
+    }
+    return value;
+}
+
+/**
+ * @returns whether the given object is a promise.
+ * Otherwise it is a fulfilled value.
+ */
+Q.isPromise = isPromise;
+function isPromise(object) {
+    return isObject(object) &&
+        typeof object.promiseDispatch === "function" &&
+        typeof object.inspect === "function";
+}
+
+Q.isPromiseAlike = isPromiseAlike;
+function isPromiseAlike(object) {
+    return isObject(object) && typeof object.then === "function";
+}
+
+/**
+ * @returns whether the given object is a pending promise, meaning not
+ * fulfilled or rejected.
+ */
+Q.isPending = isPending;
+function isPending(object) {
+    return isPromise(object) && object.inspect().state === "pending";
+}
+
+Promise.prototype.isPending = function () {
+    return this.inspect().state === "pending";
+};
+
+/**
+ * @returns whether the given object is a value or fulfilled
+ * promise.
+ */
+Q.isFulfilled = isFulfilled;
+function isFulfilled(object) {
+    return !isPromise(object) || object.inspect().state === "fulfilled";
+}
+
+Promise.prototype.isFulfilled = function () {
+    return this.inspect().state === "fulfilled";
+};
+
+/**
+ * @returns whether the given object is a rejected promise.
+ */
+Q.isRejected = isRejected;
+function isRejected(object) {
+    return isPromise(object) && object.inspect().state === "rejected";
+}
+
+Promise.prototype.isRejected = function () {
+    return this.inspect().state === "rejected";
+};
+
+//// BEGIN UNHANDLED REJECTION TRACKING
+
+// This promise library consumes exceptions thrown in handlers so they can be
+// handled by a subsequent promise.  The exceptions get added to this array when
+// they are created, and removed when they are handled.  Note that in ES6 or
+// shimmed environments, this would naturally be a `Set`.
+var unhandledReasons = [];
+var unhandledRejections = [];
+var unhandledReasonsDisplayed = false;
+var trackUnhandledRejections = true;
+function displayUnhandledReasons() {
+    if (
+        !unhandledReasonsDisplayed &&
+        typeof window !== "undefined" &&
+        !window.Touch &&
+        window.console
+    ) {
+        console.warn("[Q] Unhandled rejection reasons (should be empty):",
+                     unhandledReasons);
+    }
+
+    unhandledReasonsDisplayed = true;
+}
+
+function logUnhandledReasons() {
+    for (var i = 0; i < unhandledReasons.length; i++) {
+        var reason = unhandledReasons[i];
+        console.warn("Unhandled rejection reason:", reason);
+    }
+}
+
+function resetUnhandledRejections() {
+    unhandledReasons.length = 0;
+    unhandledRejections.length = 0;
+    unhandledReasonsDisplayed = false;
+
+    if (!trackUnhandledRejections) {
+        trackUnhandledRejections = true;
+
+        // Show unhandled rejection reasons if Node exits without handling an
+        // outstanding rejection.  (Note that Browserify presently produces a
+        // `process` global without the `EventEmitter` `on` method.)
+        if (typeof process !== "undefined" && process.on) {
+            process.on("exit", logUnhandledReasons);
+        }
+    }
+}
+
+function trackRejection(promise, reason) {
+    if (!trackUnhandledRejections) {
+        return;
+    }
+
+    unhandledRejections.push(promise);
+    if (reason && typeof reason.stack !== "undefined") {
+        unhandledReasons.push(reason.stack);
+    } else {
+        unhandledReasons.push("(no stack) " + reason);
+    }
+    displayUnhandledReasons();
+}
+
+function untrackRejection(promise) {
+    if (!trackUnhandledRejections) {
+        return;
+    }
+
+    var at = array_indexOf(unhandledRejections, promise);
+    if (at !== -1) {
+        unhandledRejections.splice(at, 1);
+        unhandledReasons.splice(at, 1);
+    }
+}
+
+Q.resetUnhandledRejections = resetUnhandledRejections;
+
+Q.getUnhandledReasons = function () {
+    // Make a copy so that consumers can't interfere with our internal state.
+    return unhandledReasons.slice();
+};
+
+Q.stopUnhandledRejectionTracking = function () {
+    resetUnhandledRejections();
+    if (typeof process !== "undefined" && process.on) {
+        process.removeListener("exit", logUnhandledReasons);
+    }
+    trackUnhandledRejections = false;
+};
+
+resetUnhandledRejections();
+
+//// END UNHANDLED REJECTION TRACKING
+
+/**
+ * Constructs a rejected promise.
+ * @param reason value describing the failure
+ */
+Q.reject = reject;
+function reject(reason) {
+    var rejection = Promise({
+        "when": function (rejected) {
+            // note that the error has been handled
+            if (rejected) {
+                untrackRejection(this);
+            }
+            return rejected ? rejected(reason) : this;
+        }
+    }, function fallback() {
+        return this;
+    }, function inspect() {
+        return { state: "rejected", reason: reason };
+    });
+
+    // Note that the reason has not been handled.
+    trackRejection(rejection, reason);
+
+    return rejection;
+}
+
+/**
+ * Constructs a fulfilled promise for an immediate reference.
+ * @param value immediate reference
+ */
+Q.fulfill = fulfill;
+function fulfill(value) {
+    return Promise({
+        "when": function () {
+            return value;
+        },
+        "get": function (name) {
+            return value[name];
+        },
+        "set": function (name, rhs) {
+            value[name] = rhs;
+        },
+        "delete": function (name) {
+            delete value[name];
+        },
+        "post": function (name, args) {
+            // Mark Miller proposes that post with no name should apply a
+            // promised function.
+            if (name === null || name === void 0) {
+                return value.apply(void 0, args);
+            } else {
+                return value[name].apply(value, args);
+            }
+        },
+        "apply": function (thisp, args) {
+            return value.apply(thisp, args);
+        },
+        "keys": function () {
+            return object_keys(value);
+        }
+    }, void 0, function inspect() {
+        return { state: "fulfilled", value: value };
+    });
+}
+
+/**
+ * Converts thenables to Q promises.
+ * @param promise thenable promise
+ * @returns a Q promise
+ */
+function coerce(promise) {
+    var deferred = defer();
+    nextTick(function () {
+        try {
+            promise.then(deferred.resolve, deferred.reject, deferred.notify);
+        } catch (exception) {
+            deferred.reject(exception);
+        }
+    });
+    return deferred.promise;
+}
+
+/**
+ * Annotates an object such that it will never be
+ * transferred away from this process over any promise
+ * communication channel.
+ * @param object
+ * @returns promise a wrapping of that object that
+ * additionally responds to the "isDef" message
+ * without a rejection.
+ */
+Q.master = master;
+function master(object) {
+    return Promise({
+        "isDef": function () {}
+    }, function fallback(op, args) {
+        return dispatch(object, op, args);
+    }, function () {
+        return Q(object).inspect();
+    });
+}
+
+/**
+ * Spreads the values of a promised array of arguments into the
+ * fulfillment callback.
+ * @param fulfilled callback that receives variadic arguments from the
+ * promised array
+ * @param rejected callback that receives the exception if the promise
+ * is rejected.
+ * @returns a promise for the return value or thrown exception of
+ * either callback.
+ */
+Q.spread = spread;
+function spread(value, fulfilled, rejected) {
+    return Q(value).spread(fulfilled, rejected);
+}
+
+Promise.prototype.spread = function (fulfilled, rejected) {
+    return this.all().then(function (array) {
+        return fulfilled.apply(void 0, array);
+    }, rejected);
+};
+
+/**
+ * The async function is a decorator for generator functions, turning
+ * them into asynchronous generators.  Although generators are only part
+ * of the newest ECMAScript 6 drafts, this code does not cause syntax
+ * errors in older engines.  This code should continue to work and will
+ * in fact improve over time as the language improves.
+ *
+ * ES6 generators are currently part of V8 version 3.19 with the
+ * --harmony-generators runtime flag enabled.  SpiderMonkey has had them
+ * for longer, but under an older Python-inspired form.  This function
+ * works on both kinds of generators.
+ *
+ * Decorates a generator function such that:
+ *  - it may yield promises
+ *  - execution will continue when that promise is fulfilled
+ *  - the value of the yield expression will be the fulfilled value
+ *  - it returns a promise for the return value (when the generator
+ *    stops iterating)
+ *  - the decorated function returns a promise for the return value
+ *    of the generator or the first rejected promise among those
+ *    yielded.
+ *  - if an error is thrown in the generator, it propagates through
+ *    every following yield until it is caught, or until it escapes
+ *    the generator function altogether, and is translated into a
+ *    rejection for the promise returned by the decorated generator.
+ */
+Q.async = async;
+function async(makeGenerator) {
+    return function () {
+        // when verb is "send", arg is a value
+        // when verb is "throw", arg is an exception
+        function continuer(verb, arg) {
+            var result;
+            if (hasES6Generators) {
+                try {
+                    result = generator[verb](arg);
+                } catch (exception) {
+                    return reject(exception);
+                }
+                if (result.done) {
+                    return result.value;
+                } else {
+                    return when(result.value, callback, errback);
+                }
+            } else {
+                // FIXME: Remove this case when SM does ES6 generators.
+                try {
+                    result = generator[verb](arg);
+                } catch (exception) {
+                    if (isStopIteration(exception)) {
+                        return exception.value;
+                    } else {
+                        return reject(exception);
+                    }
+                }
+                return when(result, callback, errback);
+            }
+        }
+        var generator = makeGenerator.apply(this, arguments);
+        var callback = continuer.bind(continuer, "next");
+        var errback = continuer.bind(continuer, "throw");
+        return callback();
+    };
+}
+
+/**
+ * The spawn function is a small wrapper around async that immediately
+ * calls the generator and also ends the promise chain, so that any
+ * unhandled errors are thrown instead of forwarded to the error
+ * handler. This is useful because it's extremely common to run
+ * generators at the top-level to work with libraries.
+ */
+Q.spawn = spawn;
+function spawn(makeGenerator) {
+    Q.done(Q.async(makeGenerator)());
+}
+
+// FIXME: Remove this interface once ES6 generators are in SpiderMonkey.
+/**
+ * Throws a ReturnValue exception to stop an asynchronous generator.
+ *
+ * This interface is a stop-gap measure to support generator return
+ * values in older Firefox/SpiderMonkey.  In browsers that support ES6
+ * generators like Chromium 29, just use "return" in your generator
+ * functions.
+ *
+ * @param value the return value for the surrounding generator
+ * @throws ReturnValue exception with the value.
+ * @example
+ * // ES6 style
+ * Q.async(function* () {
+ *      var foo = yield getFooPromise();
+ *      var bar = yield getBarPromise();
+ *      return foo + bar;
+ * })
+ * // Older SpiderMonkey style
+ * Q.async(function () {
+ *      var foo = yield getFooPromise();
+ *      var bar = yield getBarPromise();
+ *      Q.return(foo + bar);
+ * })
+ */
+Q["return"] = _return;
+function _return(value) {
+    throw new QReturnValue(value);
+}
+
+/**
+ * The promised function decorator ensures that any promise arguments
+ * are settled and passed as values (`this` is also settled and passed
+ * as a value).  It will also ensure that the result of a function is
+ * always a promise.
+ *
+ * @example
+ * var add = Q.promised(function (a, b) {
+ *     return a + b;
+ * });
+ * add(Q(a), Q(B));
+ *
+ * @param {function} callback The function to decorate
+ * @returns {function} a function that has been decorated.
+ */
+Q.promised = promised;
+function promised(callback) {
+    return function () {
+        return spread([this, all(arguments)], function (self, args) {
+            return callback.apply(self, args);
+        });
+    };
+}
+
+/**
+ * sends a message to a value in a future turn
+ * @param object* the recipient
+ * @param op the name of the message operation, e.g., "when",
+ * @param args further arguments to be forwarded to the operation
+ * @returns result {Promise} a promise for the result of the operation
+ */
+Q.dispatch = dispatch;
+function dispatch(object, op, args) {
+    return Q(object).dispatch(op, args);
+}
+
+Promise.prototype.dispatch = function (op, args) {
+    var self = this;
+    var deferred = defer();
+    nextTick(function () {
+        self.promiseDispatch(deferred.resolve, op, args);
+    });
+    return deferred.promise;
+};
+
+/**
+ * Gets the value of a property in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of property to get
+ * @return promise for the property value
+ */
+Q.get = function (object, key) {
+    return Q(object).dispatch("get", [key]);
+};
+
+Promise.prototype.get = function (key) {
+    return this.dispatch("get", [key]);
+};
+
+/**
+ * Sets the value of a property in a future turn.
+ * @param object    promise or immediate reference for object object
+ * @param name      name of property to set
+ * @param value     new value of property
+ * @return promise for the return value
+ */
+Q.set = function (object, key, value) {
+    return Q(object).dispatch("set", [key, value]);
+};
+
+Promise.prototype.set = function (key, value) {
+    return this.dispatch("set", [key, value]);
+};
+
+/**
+ * Deletes a property in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of property to delete
+ * @return promise for the return value
+ */
+Q.del = // XXX legacy
+Q["delete"] = function (object, key) {
+    return Q(object).dispatch("delete", [key]);
+};
+
+Promise.prototype.del = // XXX legacy
+Promise.prototype["delete"] = function (key) {
+    return this.dispatch("delete", [key]);
+};
+
+/**
+ * Invokes a method in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of method to invoke
+ * @param value     a value to post, typically an array of
+ *                  invocation arguments for promises that
+ *                  are ultimately backed with `resolve` values,
+ *                  as opposed to those backed with URLs
+ *                  wherein the posted value can be any
+ *                  JSON serializable object.
+ * @return promise for the return value
+ */
+// bound locally because it is used by other methods
+Q.mapply = // XXX As proposed by "Redsandro"
+Q.post = function (object, name, args) {
+    return Q(object).dispatch("post", [name, args]);
+};
+
+Promise.prototype.mapply = // XXX As proposed by "Redsandro"
+Promise.prototype.post = function (name, args) {
+    return this.dispatch("post", [name, args]);
+};
+
+/**
+ * Invokes a method in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @param name      name of method to invoke
+ * @param ...args   array of invocation arguments
+ * @return promise for the return value
+ */
+Q.send = // XXX Mark Miller's proposed parlance
+Q.mcall = // XXX As proposed by "Redsandro"
+Q.invoke = function (object, name /*...args*/) {
+    return Q(object).dispatch("post", [name, array_slice(arguments, 2)]);
+};
+
+Promise.prototype.send = // XXX Mark Miller's proposed parlance
+Promise.prototype.mcall = // XXX As proposed by "Redsandro"
+Promise.prototype.invoke = function (name /*...args*/) {
+    return this.dispatch("post", [name, array_slice(arguments, 1)]);
+};
+
+/**
+ * Applies the promised function in a future turn.
+ * @param object    promise or immediate reference for target function
+ * @param args      array of application arguments
+ */
+Q.fapply = function (object, args) {
+    return Q(object).dispatch("apply", [void 0, args]);
+};
+
+Promise.prototype.fapply = function (args) {
+    return this.dispatch("apply", [void 0, args]);
+};
+
+/**
+ * Calls the promised function in a future turn.
+ * @param object    promise or immediate reference for target function
+ * @param ...args   array of application arguments
+ */
+Q["try"] =
+Q.fcall = function (object /* ...args*/) {
+    return Q(object).dispatch("apply", [void 0, array_slice(arguments, 1)]);
+};
+
+Promise.prototype.fcall = function (/*...args*/) {
+    return this.dispatch("apply", [void 0, array_slice(arguments)]);
+};
+
+/**
+ * Binds the promised function, transforming return values into a fulfilled
+ * promise and thrown errors into a rejected one.
+ * @param object    promise or immediate reference for target function
+ * @param ...args   array of application arguments
+ */
+Q.fbind = function (object /*...args*/) {
+    var promise = Q(object);
+    var args = array_slice(arguments, 1);
+    return function fbound() {
+        return promise.dispatch("apply", [
+            this,
+            args.concat(array_slice(arguments))
+        ]);
+    };
+};
+Promise.prototype.fbind = function (/*...args*/) {
+    var promise = this;
+    var args = array_slice(arguments);
+    return function fbound() {
+        return promise.dispatch("apply", [
+            this,
+            args.concat(array_slice(arguments))
+        ]);
+    };
+};
+
+/**
+ * Requests the names of the owned properties of a promised
+ * object in a future turn.
+ * @param object    promise or immediate reference for target object
+ * @return promise for the keys of the eventually settled object
+ */
+Q.keys = function (object) {
+    return Q(object).dispatch("keys", []);
+};
+
+Promise.prototype.keys = function () {
+    return this.dispatch("keys", []);
+};
+
+/**
+ * Turns an array of promises into a promise for an array.  If any of
+ * the promises gets rejected, the whole array is rejected immediately.
+ * @param {Array*} an array (or promise for an array) of values (or
+ * promises for values)
+ * @returns a promise for an array of the corresponding values
+ */
+// By Mark Miller
+// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled
+Q.all = all;
+function all(promises) {
+    return when(promises, function (promises) {
+        var countDown = 0;
+        var deferred = defer();
+        array_reduce(promises, function (undefined, promise, index) {
+            var snapshot;
+            if (
+                isPromise(promise) &&
+                (snapshot = promise.inspect()).state === "fulfilled"
+            ) {
+                promises[index] = snapshot.value;
+            } else {
+                ++countDown;
+                when(
+                    promise,
+                    function (value) {
+                        promises[index] = value;
+                        if (--countDown === 0) {
+                            deferred.resolve(promises);
+                        }
+                    },
+                    deferred.reject,
+                    function (progress) {
+                        deferred.notify({ index: index, value: progress });
+                    }
+                );
+            }
+        }, void 0);
+        if (countDown === 0) {
+            deferred.resolve(promises);
+        }
+        return deferred.promise;
+    });
+}
+
+Promise.prototype.all = function () {
+    return all(this);
+};
+
+/**
+ * Waits for all promises to be settled, either fulfilled or
+ * rejected.  This is distinct from `all` since that would stop
+ * waiting at the first rejection.  The promise returned by
+ * `allResolved` will never be rejected.
+ * @param promises a promise for an array (or an array) of promises
+ * (or values)
+ * @return a promise for an array of promises
+ */
+Q.allResolved = deprecate(allResolved, "allResolved", "allSettled");
+function allResolved(promises) {
+    return when(promises, function (promises) {
+        promises = array_map(promises, Q);
+        return when(all(array_map(promises, function (promise) {
+            return when(promise, noop, noop);
+        })), function () {
+            return promises;
+        });
+    });
+}
+
+Promise.prototype.allResolved = function () {
+    return allResolved(this);
+};
+
+/**
+ * @see Promise#allSettled
+ */
+Q.allSettled = allSettled;
+function allSettled(promises) {
+    return Q(promises).allSettled();
+}
+
+/**
+ * Turns an array of promises into a promise for an array of their states (as
+ * returned by `inspect`) when they have all settled.
+ * @param {Array[Any*]} values an array (or promise for an array) of values (or
+ * promises for values)
+ * @returns {Array[State]} an array of states for the respective values.
+ */
+Promise.prototype.allSettled = function () {
+    return this.then(function (promises) {
+        return all(array_map(promises, function (promise) {
+            promise = Q(promise);
+            function regardless() {
+                return promise.inspect();
+            }
+            return promise.then(regardless, regardless);
+        }));
+    });
+};
+
+/**
+ * Captures the failure of a promise, giving an oportunity to recover
+ * with a callback.  If the given promise is fulfilled, the returned
+ * promise is fulfilled.
+ * @param {Any*} promise for something
+ * @param {Function} callback to fulfill the returned promise if the
+ * given promise is rejected
+ * @returns a promise for the return value of the callback
+ */
+Q.fail = // XXX legacy
+Q["catch"] = function (object, rejected) {
+    return Q(object).then(void 0, rejected);
+};
+
+Promise.prototype.fail = // XXX legacy
+Promise.prototype["catch"] = function (rejected) {
+    return this.then(void 0, rejected);
+};
+
+/**
+ * Attaches a listener that can respond to progress notifications from a
+ * promise's originating deferred. This listener receives the exact arguments
+ * passed to ``deferred.notify``.
+ * @param {Any*} promise for something
+ * @param {Function} callback to receive any progress notifications
+ * @returns the given promise, unchanged
+ */
+Q.progress = progress;
+function progress(object, progressed) {
+    return Q(object).then(void 0, void 0, progressed);
+}
+
+Promise.prototype.progress = function (progressed) {
+    return this.then(void 0, void 0, progressed);
+};
+
+/**
+ * Provides an opportunity to observe the settling of a promise,
+ * regardless of whether the promise is fulfilled or rejected.  Forwards
+ * the resolution to the returned promise when the callback is done.
+ * The callback can return a promise to defer completion.
+ * @param {Any*} promise
+ * @param {Function} callback to observe the resolution of the given
+ * promise, takes no arguments.
+ * @returns a promise for the resolution of the given promise when
+ * ``fin`` is done.
+ */
+Q.fin = // XXX legacy
+Q["finally"] = function (object, callback) {
+    return Q(object)["finally"](callback);
+};
+
+Promise.prototype.fin = // XXX legacy
+Promise.prototype["finally"] = function (callback) {
+    callback = Q(callback);
+    return this.then(function (value) {
+        return callback.fcall().then(function () {
+            return value;
+        });
+    }, function (reason) {
+        // TODO attempt to recycle the rejection with "this".
+        return callback.fcall().then(function () {
+            throw reason;
+        });
+    });
+};
+
+/**
+ * Terminates a chain of promises, forcing rejections to be
+ * thrown as exceptions.
+ * @param {Any*} promise at the end of a chain of promises
+ * @returns nothing
+ */
+Q.done = function (object, fulfilled, rejected, progress) {
+    return Q(object).done(fulfilled, rejected, progress);
+};
+
+Promise.prototype.done = function (fulfilled, rejected, progress) {
+    var onUnhandledError = function (error) {
+        // forward to a future turn so that ``when``
+        // does not catch it and turn it into a rejection.
+        nextTick(function () {
+            makeStackTraceLong(error, promise);
+            if (Q.onerror) {
+                Q.onerror(error);
+            } else {
+                throw error;
+            }
+        });
+    };
+
+    // Avoid unnecessary `nextTick`ing via an unnecessary `when`.
+    var promise = fulfilled || rejected || progress ?
+        this.then(fulfilled, rejected, progress) :
+        this;
+
+    if (typeof process === "object" && process && process.domain) {
+        onUnhandledError = process.domain.bind(onUnhandledError);
+    }
+
+    promise.then(void 0, onUnhandledError);
+};
+
+/**
+ * Causes a promise to be rejected if it does not get fulfilled before
+ * some milliseconds time out.
+ * @param {Any*} promise
+ * @param {Number} milliseconds timeout
+ * @param {String} custom error message (optional)
+ * @returns a promise for the resolution of the given promise if it is
+ * fulfilled before the timeout, otherwise rejected.
+ */
+Q.timeout = function (object, ms, message) {
+    return Q(object).timeout(ms, message);
+};
+
+Promise.prototype.timeout = function (ms, message) {
+    var deferred = defer();
+    var timeoutId = setTimeout(function () {
+        deferred.reject(new Error(message || "Timed out after " + ms + " ms"));
+    }, ms);
+
+    this.then(function (value) {
+        clearTimeout(timeoutId);
+        deferred.resolve(value);
+    }, function (exception) {
+        clearTimeout(timeoutId);
+        deferred.reject(exception);
+    }, deferred.notify);
+
+    return deferred.promise;
+};
+
+/**
+ * Returns a promise for the given value (or promised value), some
+ * milliseconds after it resolved. Passes rejections immediately.
+ * @param {Any*} promise
+ * @param {Number} milliseconds
+ * @returns a promise for the resolution of the given promise after milliseconds
+ * time has elapsed since the resolution of the given promise.
+ * If the given promise rejects, that is passed immediately.
+ */
+Q.delay = function (object, timeout) {
+    if (timeout === void 0) {
+        timeout = object;
+        object = void 0;
+    }
+    return Q(object).delay(timeout);
+};
+
+Promise.prototype.delay = function (timeout) {
+    return this.then(function (value) {
+        var deferred = defer();
+        setTimeout(function () {
+            deferred.resolve(value);
+        }, timeout);
+        return deferred.promise;
+    });
+};
+
+/**
+ * Passes a continuation to a Node function, which is called with the given
+ * arguments provided as an array, and returns a promise.
+ *
+ *      Q.nfapply(FS.readFile, [__filename])
+ *      .then(function (content) {
+ *      })
+ *
+ */
+Q.nfapply = function (callback, args) {
+    return Q(callback).nfapply(args);
+};
+
+Promise.prototype.nfapply = function (args) {
+    var deferred = defer();
+    var nodeArgs = array_slice(args);
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.fapply(nodeArgs).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Passes a continuation to a Node function, which is called with the given
+ * arguments provided individually, and returns a promise.
+ * @example
+ * Q.nfcall(FS.readFile, __filename)
+ * .then(function (content) {
+ * })
+ *
+ */
+Q.nfcall = function (callback /*...args*/) {
+    var args = array_slice(arguments, 1);
+    return Q(callback).nfapply(args);
+};
+
+Promise.prototype.nfcall = function (/*...args*/) {
+    var nodeArgs = array_slice(arguments);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.fapply(nodeArgs).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Wraps a NodeJS continuation passing function and returns an equivalent
+ * version that returns a promise.
+ * @example
+ * Q.nfbind(FS.readFile, __filename)("utf-8")
+ * .then(console.log)
+ * .done()
+ */
+Q.nfbind =
+Q.denodeify = function (callback /*...args*/) {
+    var baseArgs = array_slice(arguments, 1);
+    return function () {
+        var nodeArgs = baseArgs.concat(array_slice(arguments));
+        var deferred = defer();
+        nodeArgs.push(deferred.makeNodeResolver());
+        Q(callback).fapply(nodeArgs).fail(deferred.reject);
+        return deferred.promise;
+    };
+};
+
+Promise.prototype.nfbind =
+Promise.prototype.denodeify = function (/*...args*/) {
+    var args = array_slice(arguments);
+    args.unshift(this);
+    return Q.denodeify.apply(void 0, args);
+};
+
+Q.nbind = function (callback, thisp /*...args*/) {
+    var baseArgs = array_slice(arguments, 2);
+    return function () {
+        var nodeArgs = baseArgs.concat(array_slice(arguments));
+        var deferred = defer();
+        nodeArgs.push(deferred.makeNodeResolver());
+        function bound() {
+            return callback.apply(thisp, arguments);
+        }
+        Q(bound).fapply(nodeArgs).fail(deferred.reject);
+        return deferred.promise;
+    };
+};
+
+Promise.prototype.nbind = function (/*thisp, ...args*/) {
+    var args = array_slice(arguments, 0);
+    args.unshift(this);
+    return Q.nbind.apply(void 0, args);
+};
+
+/**
+ * Calls a method of a Node-style object that accepts a Node-style
+ * callback with a given array of arguments, plus a provided callback.
+ * @param object an object that has the named method
+ * @param {String} name name of the method of object
+ * @param {Array} args arguments to pass to the method; the callback
+ * will be provided by Q and appended to these arguments.
+ * @returns a promise for the value or error
+ */
+Q.nmapply = // XXX As proposed by "Redsandro"
+Q.npost = function (object, name, args) {
+    return Q(object).npost(name, args);
+};
+
+Promise.prototype.nmapply = // XXX As proposed by "Redsandro"
+Promise.prototype.npost = function (name, args) {
+    var nodeArgs = array_slice(args || []);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * Calls a method of a Node-style object that accepts a Node-style
+ * callback, forwarding the given variadic arguments, plus a provided
+ * callback argument.
+ * @param object an object that has the named method
+ * @param {String} name name of the method of object
+ * @param ...args arguments to pass to the method; the callback will
+ * be provided by Q and appended to these arguments.
+ * @returns a promise for the value or error
+ */
+Q.nsend = // XXX Based on Mark Miller's proposed "send"
+Q.nmcall = // XXX Based on "Redsandro's" proposal
+Q.ninvoke = function (object, name /*...args*/) {
+    var nodeArgs = array_slice(arguments, 2);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    Q(object).dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+Promise.prototype.nsend = // XXX Based on Mark Miller's proposed "send"
+Promise.prototype.nmcall = // XXX Based on "Redsandro's" proposal
+Promise.prototype.ninvoke = function (name /*...args*/) {
+    var nodeArgs = array_slice(arguments, 1);
+    var deferred = defer();
+    nodeArgs.push(deferred.makeNodeResolver());
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);
+    return deferred.promise;
+};
+
+/**
+ * If a function would like to support both Node continuation-passing-style and
+ * promise-returning-style, it can end its internal promise chain with
+ * `nodeify(nodeback)`, forwarding the optional nodeback argument.  If the user
+ * elects to use a nodeback, the result will be sent there.  If they do not
+ * pass a nodeback, they will receive the result promise.
+ * @param object a result (or a promise for a result)
+ * @param {Function} nodeback a Node.js-style callback
+ * @returns either the promise or nothing
+ */
+Q.nodeify = nodeify;
+function nodeify(object, nodeback) {
+    return Q(object).nodeify(nodeback);
+}
+
+Promise.prototype.nodeify = function (nodeback) {
+    if (nodeback) {
+        this.then(function (value) {
+            nextTick(function () {
+                nodeback(null, value);
+            });
+        }, function (error) {
+            nextTick(function () {
+                nodeback(error);
+            });
+        });
+    } else {
+        return this;
+    }
+};
+
+// All code before this point will be filtered from stack traces.
+var qEndingLine = captureLine();
+
+return Q;
+
+});

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/q/queue.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/q/queue.js b/test/cordova/node_modules/q/queue.js
new file mode 100644
index 0000000..1505fd0
--- /dev/null
+++ b/test/cordova/node_modules/q/queue.js
@@ -0,0 +1,35 @@
+
+var Q = require("./q");
+
+module.exports = Queue;
+function Queue() {
+    var ends = Q.defer();
+    var closed = Q.defer();
+    return {
+        put: function (value) {
+            var next = Q.defer();
+            ends.resolve({
+                head: value,
+                tail: next.promise
+            });
+            ends.resolve = next.resolve;
+        },
+        get: function () {
+            var result = ends.promise.get("head");
+            ends.promise = ends.promise.get("tail");
+            return result.fail(function (error) {
+                closed.resolve(error);
+                throw error;
+            });
+        },
+        closed: closed.promise,
+        close: function (error) {
+            error = error || new Error("Can't get value from closed queue");
+            var end = {head: Q.reject(error)};
+            end.tail = end;
+            ends.resolve(end);
+            return closed.promise;
+        }
+    };
+}
+

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/.documentup.json
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/.documentup.json b/test/cordova/node_modules/shelljs/.documentup.json
new file mode 100644
index 0000000..57fe301
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/.documentup.json
@@ -0,0 +1,6 @@
+{
+  "name": "ShellJS",
+  "twitter": [
+    "r2r"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/.jshintrc
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/.jshintrc b/test/cordova/node_modules/shelljs/.jshintrc
new file mode 100644
index 0000000..a80c559
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/.jshintrc
@@ -0,0 +1,7 @@
+{
+  "loopfunc": true,
+  "sub": true,
+  "undef": true,
+  "unused": true,
+  "node": true
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/.npmignore
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/.npmignore b/test/cordova/node_modules/shelljs/.npmignore
new file mode 100644
index 0000000..6b20c38
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/.npmignore
@@ -0,0 +1,2 @@
+test/
+tmp/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/.travis.yml
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/.travis.yml b/test/cordova/node_modules/shelljs/.travis.yml
new file mode 100644
index 0000000..99cdc74
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+  - "0.8"
+  - "0.10"
+  - "0.11"

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/LICENSE
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/LICENSE b/test/cordova/node_modules/shelljs/LICENSE
new file mode 100644
index 0000000..1b35ee9
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2012, Artur Adib <aa...@mozilla.com>
+All rights reserved.
+
+You may use this project under the terms of the New BSD license as follows:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Artur Adib nor the
+      names of the contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/README.md
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/README.md b/test/cordova/node_modules/shelljs/README.md
new file mode 100644
index 0000000..9120623
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/README.md
@@ -0,0 +1,552 @@
+# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs)
+
+ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts!
+
+The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like:
+
++ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader
++ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger
++ [JSHint](http://jshint.com) - Most popular JavaScript linter
++ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers
++ [Yeoman](http://yeoman.io/) - Web application stack and development tool
++ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation
+
+and [many more](https://npmjs.org/browse/depended/shelljs).
+
+## Installing
+
+Via npm:
+
+```bash
+$ npm install [-g] shelljs
+```
+
+If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to
+run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder:
+
+```bash
+$ shjs my_script
+```
+
+You can also just copy `shell.js` into your project's directory, and `require()` accordingly.
+
+
+## Examples
+
+### JavaScript
+
+```javascript
+require('shelljs/global');
+
+if (!which('git')) {
+  echo('Sorry, this script requires git');
+  exit(1);
+}
+
+// Copy files to release dir
+mkdir('-p', 'out/Release');
+cp('-R', 'stuff/*', 'out/Release');
+
+// Replace macros in each .js file
+cd('lib');
+ls('*.js').forEach(function(file) {
+  sed('-i', 'BUILD_VERSION', 'v0.1.2', file);
+  sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file);
+  sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file);
+});
+cd('..');
+
+// Run external tool synchronously
+if (exec('git commit -am "Auto-commit"').code !== 0) {
+  echo('Error: Git commit failed');
+  exit(1);
+}
+```
+
+### CoffeeScript
+
+```coffeescript
+require 'shelljs/global'
+
+if not which 'git'
+  echo 'Sorry, this script requires git'
+  exit 1
+
+# Copy files to release dir
+mkdir '-p', 'out/Release'
+cp '-R', 'stuff/*', 'out/Release'
+
+# Replace macros in each .js file
+cd 'lib'
+for file in ls '*.js'
+  sed '-i', 'BUILD_VERSION', 'v0.1.2', file
+  sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file
+  sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file
+cd '..'
+
+# Run external tool synchronously
+if (exec 'git commit -am "Auto-commit"').code != 0
+  echo 'Error: Git commit failed'
+  exit 1
+```
+
+## Global vs. Local
+
+The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`.
+
+Example:
+
+```javascript
+var shell = require('shelljs');
+shell.echo('hello world');
+```
+
+## Make tool
+
+A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script.
+
+Example (CoffeeScript):
+
+```coffeescript
+require 'shelljs/make'
+
+target.all = ->
+  target.bundle()
+  target.docs()
+
+target.bundle = ->
+  cd __dirname
+  mkdir 'build'
+  cd 'lib'
+  (cat '*.js').to '../build/output.js'
+
+target.docs = ->
+  cd __dirname
+  mkdir 'docs'
+  cd 'lib'
+  for file in ls '*.js'
+    text = grep '//@', file     # extract special comments
+    text.replace '//@', ''      # remove comment tags
+    text.to 'docs/my_docs.md'
+```
+
+To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`, and so on.
+
+
+
+<!-- 
+
+  DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED
+
+-->
+
+
+## Command reference
+
+
+All commands run synchronously, unless otherwise stated.
+
+
+### cd('dir')
+Changes to directory `dir` for the duration of the script
+
+
+### pwd()
+Returns the current directory.
+
+
+### ls([options ,] path [,path ...])
+### ls([options ,] path_array)
+Available options:
+
++ `-R`: recursive
++ `-A`: all files (include files beginning with `.`, except for `.` and `..`)
+
+Examples:
+
+```javascript
+ls('projs/*.js');
+ls('-R', '/users/me', '/tmp');
+ls('-R', ['/users/me', '/tmp']); // same as above
+```
+
+Returns array of files in the given path, or in current directory if no path provided.
+
+
+### find(path [,path ...])
+### find(path_array)
+Examples:
+
+```javascript
+find('src', 'lib');
+find(['src', 'lib']); // same as above
+find('.').filter(function(file) { return file.match(/\.js$/); });
+```
+
+Returns array of all files (however deep) in the given paths.
+
+The main difference from `ls('-R', path)` is that the resulting file names
+include the base directories, e.g. `lib/resources/file1` instead of just `file1`.
+
+
+### cp([options ,] source [,source ...], dest)
+### cp([options ,] source_array, dest)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+cp('file1', 'dir1');
+cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp');
+cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above
+```
+
+Copies files. The wildcard `*` is accepted.
+
+
+### rm([options ,] file [, file ...])
+### rm([options ,] file_array)
+Available options:
+
++ `-f`: force
++ `-r, -R`: recursive
+
+Examples:
+
+```javascript
+rm('-rf', '/tmp/*');
+rm('some_file.txt', 'another_file.txt');
+rm(['some_file.txt', 'another_file.txt']); // same as above
+```
+
+Removes files. The wildcard `*` is accepted.
+
+
+### mv(source [, source ...], dest')
+### mv(source_array, dest')
+Available options:
+
++ `f`: force
+
+Examples:
+
+```javascript
+mv('-f', 'file', 'dir/');
+mv('file1', 'file2', 'dir/');
+mv(['file1', 'file2'], 'dir/'); // same as above
+```
+
+Moves files. The wildcard `*` is accepted.
+
+
+### mkdir([options ,] dir [, dir ...])
+### mkdir([options ,] dir_array)
+Available options:
+
++ `p`: full path (will create intermediate dirs if necessary)
+
+Examples:
+
+```javascript
+mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g');
+mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above
+```
+
+Creates directories.
+
+
+### test(expression)
+Available expression primaries:
+
++ `'-b', 'path'`: true if path is a block device
++ `'-c', 'path'`: true if path is a character device
++ `'-d', 'path'`: true if path is a directory
++ `'-e', 'path'`: true if path exists
++ `'-f', 'path'`: true if path is a regular file
++ `'-L', 'path'`: true if path is a symboilc link
++ `'-p', 'path'`: true if path is a pipe (FIFO)
++ `'-S', 'path'`: true if path is a socket
+
+Examples:
+
+```javascript
+if (test('-d', path)) { /* do something with dir */ };
+if (!test('-f', path)) continue; // skip if it's a regular file
+```
+
+Evaluates expression using the available primaries and returns corresponding value.
+
+
+### cat(file [, file ...])
+### cat(file_array)
+
+Examples:
+
+```javascript
+var str = cat('file*.txt');
+var str = cat('file1', 'file2');
+var str = cat(['file1', 'file2']); // same as above
+```
+
+Returns a string containing the given file, or a concatenated string
+containing the files if more than one file is given (a new line character is
+introduced between each file). Wildcard `*` accepted.
+
+
+### 'string'.to(file)
+
+Examples:
+
+```javascript
+cat('input.txt').to('output.txt');
+```
+
+Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_
+
+
+### 'string'.toEnd(file)
+
+Examples:
+
+```javascript
+cat('input.txt').toEnd('output.txt');
+```
+
+Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as
+those returned by `cat`, `grep`, etc).
+
+
+### sed([options ,] search_regex, replace_str, file)
+Available options:
+
++ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_
+
+Examples:
+
+```javascript
+sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js');
+sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js');
+```
+
+Reads an input string from `file` and performs a JavaScript `replace()` on the input
+using the given search regex and replacement string. Returns the new string after replacement.
+
+
+### grep([options ,] regex_filter, file [, file ...])
+### grep([options ,] regex_filter, file_array)
+Available options:
+
++ `-v`: Inverse the sense of the regex and print the lines not matching the criteria.
+
+Examples:
+
+```javascript
+grep('-v', 'GLOBAL_VARIABLE', '*.js');
+grep('GLOBAL_VARIABLE', '*.js');
+```
+
+Reads input string from given files and returns a string containing all lines of the
+file that match the given `regex_filter`. Wildcard `*` accepted.
+
+
+### which(command)
+
+Examples:
+
+```javascript
+var nodeExec = which('node');
+```
+
+Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions.
+Returns string containing the absolute path to the command.
+
+
+### echo(string [,string ...])
+
+Examples:
+
+```javascript
+echo('hello world');
+var str = echo('hello world');
+```
+
+Prints string to stdout, and returns string with additional utility methods
+like `.to()`.
+
+
+### pushd([options,] [dir | '-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`.
++ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
++ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
+
+Examples:
+
+```javascript
+// process.cwd() === '/usr'
+pushd('/etc'); // Returns /etc /usr
+pushd('+1');   // Returns /usr /etc
+```
+
+Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack.
+
+### popd([options,] ['-N' | '+N'])
+
+Available options:
+
++ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
+
+Arguments:
+
++ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
++ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
+
+Examples:
+
+```javascript
+echo(process.cwd()); // '/usr'
+pushd('/etc');       // '/etc /usr'
+echo(process.cwd()); // '/etc'
+popd();              // '/usr'
+echo(process.cwd()); // '/usr'
+```
+
+When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack.
+
+### dirs([options | '+N' | '-N'])
+
+Available options:
+
++ `-c`: Clears the directory stack by deleting all of the elements.
+
+Arguments:
+
++ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
++ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
+
+Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified.
+
+See also: pushd, popd
+
+
+### exit(code)
+Exits the current process with the given exit code.
+
+### env['VAR_NAME']
+Object containing environment variables (both getter and setter). Shortcut to process.env.
+
+### exec(command [, options] [, callback])
+Available options (all `false` by default):
+
++ `async`: Asynchronous execution. Defaults to true if a callback is provided.
++ `silent`: Do not echo program output to console.
+
+Examples:
+
+```javascript
+var version = exec('node --version', {silent:true}).output;
+
+var child = exec('some_long_running_process', {async:true});
+child.stdout.on('data', function(data) {
+  /* ... do something with data ... */
+});
+
+exec('some_long_running_process', function(code, output) {
+  console.log('Exit code:', code);
+  console.log('Program output:', output);
+});
+```
+
+Executes the given `command` _synchronously_, unless otherwise specified.
+When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's
+`output` (stdout + stderr)  and its exit `code`. Otherwise returns the child process object, and
+the `callback` gets the arguments `(code, output)`.
+
+**Note:** For long-lived processes, it's best to run `exec()` asynchronously as
+the current synchronous implementation uses a lot of CPU. This should be getting
+fixed soon.
+
+
+### chmod(octal_mode || octal_string, file)
+### chmod(symbolic_mode, file)
+
+Available options:
+
++ `-v`: output a diagnostic for every file processed
++ `-c`: like verbose but report only when a change is made
++ `-R`: change files and directories recursively
+
+Examples:
+
+```javascript
+chmod(755, '/Users/brandon');
+chmod('755', '/Users/brandon'); // same as above
+chmod('u+x', '/Users/brandon');
+```
+
+Alters the permissions of a file or directory by either specifying the
+absolute permissions in octal form or expressing the changes in symbols.
+This command tries to mimic the POSIX behavior as much as possible.
+Notable exceptions:
+
++ In symbolic modes, 'a-r' and '-r' are identical.  No consideration is
+  given to the umask.
++ There is no "quiet" option since default behavior is to run silent.
+
+
+## Non-Unix commands
+
+
+### tempdir()
+
+Examples:
+
+```javascript
+var tmp = tempdir(); // "/tmp" for most *nix platforms
+```
+
+Searches and returns string containing a writeable, platform-dependent temporary directory.
+Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir).
+
+
+### error()
+Tests if error occurred in the last command. Returns `null` if no error occurred,
+otherwise returns string explaining the error
+
+
+## Configuration
+
+
+### config.silent
+Example:
+
+```javascript
+var silentState = config.silent; // save old silent state
+config.silent = true;
+/* ... */
+config.silent = silentState; // restore old silent state
+```
+
+Suppresses all command output if `true`, except for `echo()` calls.
+Default is `false`.
+
+### config.fatal
+Example:
+
+```javascript
+config.fatal = true;
+cp('this_file_does_not_exist', '/dev/null'); // dies here
+/* more commands... */
+```
+
+If `true` the script will die on errors. Default is `false`.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/bin/shjs
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/bin/shjs b/test/cordova/node_modules/shelljs/bin/shjs
new file mode 100755
index 0000000..d239a7a
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/bin/shjs
@@ -0,0 +1,51 @@
+#!/usr/bin/env node
+require('../global');
+
+if (process.argv.length < 3) {
+  console.log('ShellJS: missing argument (script name)');
+  console.log();
+  process.exit(1);
+}
+
+var args,
+  scriptName = process.argv[2];
+env['NODE_PATH'] = __dirname + '/../..';
+
+if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) {
+  if (test('-f', scriptName + '.js'))
+    scriptName += '.js';
+  if (test('-f', scriptName + '.coffee'))
+    scriptName += '.coffee';
+}
+
+if (!test('-f', scriptName)) {
+  console.log('ShellJS: script not found ('+scriptName+')');
+  console.log();
+  process.exit(1);
+}
+
+args = process.argv.slice(3);
+
+for (var i = 0, l = args.length; i < l; i++) {
+  if (args[i][0] !== "-"){
+    args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words
+  }
+}
+
+if (scriptName.match(/\.coffee$/)) {
+  //
+  // CoffeeScript
+  //
+  if (which('coffee')) {
+    exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true });
+  } else {
+    console.log('ShellJS: CoffeeScript interpreter not found');
+    console.log();
+    process.exit(1);
+  }
+} else {
+  //
+  // JavaScript
+  //
+  exec('node ' + scriptName + ' ' + args.join(' '), { async: true });
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/global.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/global.js b/test/cordova/node_modules/shelljs/global.js
new file mode 100644
index 0000000..97f0033
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/global.js
@@ -0,0 +1,3 @@
+var shell = require('./shell.js');
+for (var cmd in shell)
+  global[cmd] = shell[cmd];

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/cordova/node_modules/shelljs/make.js
----------------------------------------------------------------------
diff --git a/test/cordova/node_modules/shelljs/make.js b/test/cordova/node_modules/shelljs/make.js
new file mode 100644
index 0000000..53e5e81
--- /dev/null
+++ b/test/cordova/node_modules/shelljs/make.js
@@ -0,0 +1,47 @@
+require('./global');
+
+global.config.fatal = true;
+global.target = {};
+
+// This ensures we only execute the script targets after the entire script has
+// been evaluated
+var args = process.argv.slice(2);
+setTimeout(function() {
+  var t;
+
+  if (args.length === 1 && args[0] === '--help') {
+    console.log('Available targets:');
+    for (t in global.target)
+      console.log('  ' + t);
+    return;
+  }
+
+  // Wrap targets to prevent duplicate execution
+  for (t in global.target) {
+    (function(t, oldTarget){
+
+      // Wrap it
+      global.target[t] = function(force) {
+        if (oldTarget.done && !force)
+          return;
+        oldTarget.done = true;
+        return oldTarget.apply(oldTarget, arguments);
+      };
+
+    })(t, global.target[t]);
+  }
+
+  // Execute desired targets
+  if (args.length > 0) {
+    args.forEach(function(arg) {
+      if (arg in global.target)
+        global.target[arg]();
+      else {
+        console.log('no such target: ' + arg);
+      }
+    });
+  } else if ('all' in global.target) {
+    global.target.all();
+  }
+
+}, 0);


[20/50] [abbrv] git commit: CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check

Posted by bo...@apache.org.
CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/20ee58f0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/20ee58f0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/20ee58f0

Branch: refs/heads/master
Commit: 20ee58f094e057aa31d15110a97ce90cc3c40404
Parents: 07e922f
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Nov 20 09:35:23 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:17 2014 -0800

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/20ee58f0/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 80f88a8..266bec9 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -33,8 +33,10 @@ module.exports.get_target = function() {
         return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
     } else if (fs.existsSync(path.join(ROOT, 'project.properties'))) {
         // if no target found, we're probably in a project and project.properties is in ROOT.
-        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties'));
-        return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', '');
+        // this is called on the project itself, and can support Google APIs AND Vanilla Android
+        var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')) ||
+          shell.grep(/target=Google Inc.:Google APIs:[\d+]/, path.join(ROOT, 'project.properties'));
+        return target.split('=')[1].replace('\n', '').replace('\r', '');
     }
 }
 


[45/50] [abbrv] git commit: Added missing ScrollEvent.java file.

Posted by bo...@apache.org.
Added missing ScrollEvent.java file.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/fdb3bef8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/fdb3bef8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/fdb3bef8

Branch: refs/heads/master
Commit: fdb3bef8e3add109020a8c3ce9e1bbc10ce22731
Parents: 70ce111
Author: Archana Naik <na...@lab126.com>
Authored: Wed Dec 18 10:50:17 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:23 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/cordova/ScrollEvent.java     | 67 ++++++++++++++++++++
 1 file changed, 67 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/fdb3bef8/framework/src/org/apache/cordova/ScrollEvent.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/ScrollEvent.java b/framework/src/org/apache/cordova/ScrollEvent.java
new file mode 100644
index 0000000..5546613
--- /dev/null
+++ b/framework/src/org/apache/cordova/ScrollEvent.java
@@ -0,0 +1,67 @@
+/*
+       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.
+*/
+
+package org.apache.cordova;
+
+import android.view.View;
+
+/*
+ * This can be used by any view, including native views
+ * 
+ */
+
+
+public class ScrollEvent {
+    
+    public int l, t, nl, nt;
+    private View targetView;
+    
+    /*
+     * ScrollEvent constructor
+     * No idea why it uses l and t instead of x and y
+     * 
+     * @param x
+     * @param y
+     * @param nx
+     * @param ny
+     * @param view
+     */
+    
+    ScrollEvent(int nx, int ny, int x, int y, View view)
+    {
+        l = x; y = t; nl = nx; nt = ny;
+        targetView = view;
+    }
+    
+    public int dl()
+    {
+        return nl - l;
+    }
+    
+    public int dt()
+    {
+        return nt - t;
+    }
+    
+    public View getTargetView()
+    {
+        return targetView;
+    }
+
+}


[42/50] [abbrv] git commit: Add RELEASENOTES for 3.3.0 release

Posted by bo...@apache.org.
Add RELEASENOTES for 3.3.0 release


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/86c591b2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/86c591b2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/86c591b2

Branch: refs/heads/master
Commit: 86c591b2b964756ef428daadc4bb4f6c53210b9e
Parents: 9e1609d
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 16 13:58:26 2013 -0500
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:22 2014 -0800

----------------------------------------------------------------------
 RELEASENOTES.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/86c591b2/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 4ef5646..46e4bc8 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,23 @@
 -->
 ## Release Notes for Cordova (Android) ##
 
+### 3.3.0 (Dec 2013) ###
+
+41 commits from 11 authors. Highlights include:
+
+* CB-5481 Fix for Cordova trying to get config.xml from the wrong namespace
+* CB-5487 Enable Remote Debugging when your Android app is debuggable.
+* CB-5445 Adding onScrollChanged and the ScrollEvent object
+* CB-5422 Don't require JAVA_HOME to be defined
+* CB-5490 Add javadoc target to ant script
+* CB-5471 Deprecated DroidGap class
+* CB-5255 Prefer Google API targets over android-## targets when building.
+* CB-5232 Change create script to use Cordova as a Library Project instead of a .jar
+* CB-5302 Massive movement to get tests working again
+* CB-4996 Fix paths with spaces while launching on emulator and device
+* CB-5209 Cannot build Android app if project path contains spaces
+
+
 ### 3.2.0 (Nov 2013) ###
 
 27 commits from 7 authors. Highlights include:


[08/50] [abbrv] CB-5302: Massive movement to get tests working again

Posted by bo...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/XhrTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/XhrTest.java b/test/src/org/apache/cordova/test/XhrTest.java
deleted file mode 100644
index 7c3ed9f..0000000
--- a/test/src/org/apache/cordova/test/XhrTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.test.actions.xhr;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-public class XhrTest extends ActivityInstrumentationTestCase2<xhr> {
-
-  public XhrTest()
-  {
-    super(xhr.class);
-  }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/CordovaActivity.java b/test/src/org/apache/cordova/test/actions/CordovaActivity.java
deleted file mode 100644
index f709737..0000000
--- a/test/src/org/apache/cordova/test/actions/CordovaActivity.java
+++ /dev/null
@@ -1,33 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import org.apache.cordova.DroidGap;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class CordovaActivity extends DroidGap {
-    /** Called when the activity is first created. */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/CordovaDriverAction.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/CordovaDriverAction.java b/test/src/org/apache/cordova/test/actions/CordovaDriverAction.java
deleted file mode 100644
index 2021346..0000000
--- a/test/src/org/apache/cordova/test/actions/CordovaDriverAction.java
+++ /dev/null
@@ -1,87 +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.
-*/
-
-package org.apache.cordova.test.actions;
-
-import java.util.concurrent.ExecutorService;
-
-import org.apache.cordova.CordovaInterface;
-import org.apache.cordova.CordovaPlugin;
-
-import com.amazon.android.webkit.AmazonWebKitFactories;
-import com.amazon.android.webkit.AmazonWebKitFactory;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-
-
-public class CordovaDriverAction extends Activity implements CordovaInterface {
-    /** Called when the activity is first created. */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-    }
-
-    public void startActivityForResult(CordovaPlugin command, Intent intent,
-            int requestCode) {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public void setActivityResultCallback(CordovaPlugin plugin) {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public Activity getActivity() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Deprecated
-    public Context getContext() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Deprecated
-    public void cancelLoadUrl() {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public Object onMessage(String id, Object data) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public ExecutorService getThreadPool() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public AmazonWebKitFactory getFactory() {
-        return AmazonWebKitFactories.getDefaultFactory();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/CordovaWebViewTestActivity.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/CordovaWebViewTestActivity.java b/test/src/org/apache/cordova/test/actions/CordovaWebViewTestActivity.java
deleted file mode 100644
index b96e48f..0000000
--- a/test/src/org/apache/cordova/test/actions/CordovaWebViewTestActivity.java
+++ /dev/null
@@ -1,112 +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.
-*/
-
-package org.apache.cordova.test.actions;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.CordovaInterface;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.LOG;
-import org.apache.cordova.test.R;
-import org.apache.cordova.test.R.id;
-import org.apache.cordova.test.R.layout;
-
-import com.amazon.android.webkit.AmazonWebKitFactories;
-import com.amazon.android.webkit.AmazonWebKitFactory;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-
-public class CordovaWebViewTestActivity extends Activity implements CordovaInterface {
-    public CordovaWebView cordovaWebView;
-
-    private final ExecutorService threadPool = Executors.newCachedThreadPool();
-    
-    /** Called when the activity is first created. */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.main);
-
-        cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
-
-        cordovaWebView.loadUrl("file:///android_asset/www/index.html");
-
-    }
-
-    public Context getContext() {
-        return this;
-    }
-
-    public void startActivityForResult(CordovaPlugin command, Intent intent,
-            int requestCode) {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public void setActivityResultCallback(CordovaPlugin plugin) {
-        // TODO Auto-generated method stub
-        
-    }
-
-    //Note: This must always return an activity!
-    public Activity getActivity() {
-        return this;
-    }
-
-    @Deprecated
-    public void cancelLoadUrl() {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public Object onMessage(String id, Object data) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public ExecutorService getThreadPool() {
-        // TODO Auto-generated method stub
-        return threadPool;
-    }
-    
-    @Override
-    /**
-     * The final call you receive before your activity is destroyed.
-     */
-    public void onDestroy() {
-        super.onDestroy();
-        if (cordovaWebView != null) {
-            // Send destroy event to JavaScript
-            cordovaWebView.handleDestroy();
-        }
-    }
-
-    @Override
-    public AmazonWebKitFactory getFactory() {
-        return AmazonWebKitFactories.getDefaultFactory();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/backbuttonmultipage.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/backbuttonmultipage.java b/test/src/org/apache/cordova/test/actions/backbuttonmultipage.java
deleted file mode 100755
index 3b90484..0000000
--- a/test/src/org/apache/cordova/test/actions/backbuttonmultipage.java
+++ /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.
- */
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class backbuttonmultipage extends DroidGap {
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/background.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/background.java b/test/src/org/apache/cordova/test/actions/background.java
deleted file mode 100755
index 47c6bc7..0000000
--- a/test/src/org/apache/cordova/test/actions/background.java
+++ /dev/null
@@ -1,33 +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.
- */
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-
-import org.apache.cordova.*;
-
-public class background extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        //super.init(new FixWebView(this), new CordovaWebViewClient(this), new CordovaChromeClient(this));
-        super.setBooleanProperty("keepRunning", false);
-        super.loadUrl("file:///android_asset/www/background/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/backgroundcolor.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/backgroundcolor.java b/test/src/org/apache/cordova/test/actions/backgroundcolor.java
deleted file mode 100755
index d501824..0000000
--- a/test/src/org/apache/cordova/test/actions/backgroundcolor.java
+++ /dev/null
@@ -1,40 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.graphics.Color;
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class backgroundcolor extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Properties must be set before init() is called, since some are processed during init().
-
-        // backgroundColor can also be set in cordova.xml, but you must use the number equivalent of the color.  For example, Color.RED is
-        //      <preference name="backgroundColor" value="-65536" />
-        super.setIntegerProperty("backgroundColor", Color.GREEN);
-
-        super.init();
-        super.loadUrl("file:///android_asset/www/backgroundcolor/index.html");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/basicauth.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/basicauth.java b/test/src/org/apache/cordova/test/actions/basicauth.java
deleted file mode 100755
index ad739c9..0000000
--- a/test/src/org/apache/cordova/test/actions/basicauth.java
+++ /dev/null
@@ -1,44 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class basicauth extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-
-        // LogCat: onReceivedHttpAuthRequest(browserspy.dk:80,BrowserSpy.dk - HTTP Password Test)
-        AuthenticationToken token = new AuthenticationToken();
-        token.setUserName("test");
-        token.setPassword("test");
-        super.setAuthenticationToken(token, "browserspy.dk:80", "BrowserSpy.dk - HTTP Password Test");
-
-        // Add web site to whitelist
-        Config.init();
-        Config.addWhiteListEntry("http://browserspy.dk*", true);
-
-        // Load test
-        super.loadUrl("file:///android_asset/www/basicauth/index.html");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/errorurl.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/errorurl.java b/test/src/org/apache/cordova/test/actions/errorurl.java
deleted file mode 100755
index 8015c4f..0000000
--- a/test/src/org/apache/cordova/test/actions/errorurl.java
+++ /dev/null
@@ -1,33 +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.
- */
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class errorurl extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-        this.setStringProperty("errorUrl", "file:///android_asset/www/htmlnotfound/error.html");
-        super.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/fullscreen.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/fullscreen.java b/test/src/org/apache/cordova/test/actions/fullscreen.java
deleted file mode 100755
index 60726ad..0000000
--- a/test/src/org/apache/cordova/test/actions/fullscreen.java
+++ /dev/null
@@ -1,39 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class fullscreen extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Properties must be set before init() is called, since some are processed during init(). 
-
-        // fullscreen can also be set in cordova.xml.  For example, 
-        //      <preference name="fullscreen" value="true" />
-        super.setBooleanProperty("fullscreen", true);
-
-        super.init();
-        super.loadUrl("file:///android_asset/www/fullscreen/index.html");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/htmlnotfound.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/htmlnotfound.java b/test/src/org/apache/cordova/test/actions/htmlnotfound.java
deleted file mode 100755
index da849e0..0000000
--- a/test/src/org/apache/cordova/test/actions/htmlnotfound.java
+++ /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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class htmlnotfound extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-        super.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/iframe.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/iframe.java b/test/src/org/apache/cordova/test/actions/iframe.java
deleted file mode 100755
index 3398aa4..0000000
--- a/test/src/org/apache/cordova/test/actions/iframe.java
+++ /dev/null
@@ -1,30 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class iframe extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/iframe/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/lifecycle.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/lifecycle.java b/test/src/org/apache/cordova/test/actions/lifecycle.java
deleted file mode 100755
index 8419b0e..0000000
--- a/test/src/org/apache/cordova/test/actions/lifecycle.java
+++ /dev/null
@@ -1,30 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class lifecycle extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/lifecycle/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/loading.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/loading.java b/test/src/org/apache/cordova/test/actions/loading.java
deleted file mode 100755
index 4c52c9f..0000000
--- a/test/src/org/apache/cordova/test/actions/loading.java
+++ /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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class loading extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.setStringProperty("loadingDialog", "Testing,Loading...");
-        super.loadUrl("http://www.google.com");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/menus.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/menus.java b/test/src/org/apache/cordova/test/actions/menus.java
deleted file mode 100755
index c4cb674..0000000
--- a/test/src/org/apache/cordova/test/actions/menus.java
+++ /dev/null
@@ -1,80 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import android.view.ContextMenu;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ContextMenu.ContextMenuInfo;
-
-import org.apache.cordova.*;
-import org.apache.cordova.LOG;
-
-public class menus extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-        super.registerForContextMenu(super.appView);
-        super.loadUrl("file:///android_asset/www/menus/index.html");
-    }
-
-    // Demonstrate how to add your own menus to app
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-        int base = Menu.FIRST;
-        // Group, item id, order, title
-        menu.add(base, base, base, "Item1");
-        menu.add(base, base + 1, base + 1, "Item2");
-        menu.add(base, base + 2, base + 2, "Item3");
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        LOG.d("menus", "Item " + item.getItemId() + " pressed.");
-        this.appView.loadUrl("javascript:alert('Menu " + item.getItemId() + " pressed.')");
-        return super.onOptionsItemSelected(item);
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        LOG.d("menus", "onPrepareOptionsMenu()");
-        // this.appView.loadUrl("javascript:alert('onPrepareOptionsMenu()')");
-        return true;
-    }
-
-    @Override
-    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo info) {
-        LOG.d("menus", "onCreateContextMenu()");
-        menu.setHeaderTitle("Test Context Menu");
-        menu.add(200, 200, 200, "Context Item1");
-    }
-
-    @Override
-    public boolean onContextItemSelected(MenuItem item) {
-        this.appView.loadUrl("javascript:alert('Context Menu " + item.getItemId() + " pressed.')");
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/splashscreen.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/splashscreen.java b/test/src/org/apache/cordova/test/actions/splashscreen.java
deleted file mode 100755
index 3d924e0..0000000
--- a/test/src/org/apache/cordova/test/actions/splashscreen.java
+++ /dev/null
@@ -1,37 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-import org.apache.cordova.test.R;
-import org.apache.cordova.test.R.drawable;
-
-public class splashscreen extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-
-        // Show splashscreen
-        this.setIntegerProperty("splashscreen", R.drawable.sandy);
-
-        super.loadUrl("file:///android_asset/www/splashscreen/index.html", 2000);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/tests.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/tests.java b/test/src/org/apache/cordova/test/actions/tests.java
deleted file mode 100755
index bc326e3..0000000
--- a/test/src/org/apache/cordova/test/actions/tests.java
+++ /dev/null
@@ -1,32 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class tests extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-        //super.pluginManager.addService("Activity", "org.apache.cordova.test.ActivityPlugin");
-        super.loadUrl("file:///android_asset/www/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/timeout.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/timeout.java b/test/src/org/apache/cordova/test/actions/timeout.java
deleted file mode 100755
index 22c0881..0000000
--- a/test/src/org/apache/cordova/test/actions/timeout.java
+++ /dev/null
@@ -1,34 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class timeout extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init();
-
-        // Short timeout to cause error
-        this.setIntegerProperty("loadUrlTimeoutValue", 10);
-        super.loadUrl("http://www.google.com");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/userwebview.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/userwebview.java b/test/src/org/apache/cordova/test/actions/userwebview.java
deleted file mode 100755
index 2beb793..0000000
--- a/test/src/org/apache/cordova/test/actions/userwebview.java
+++ /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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import com.amazon.android.webkit.AmazonGeolocationPermissions.Callback;
-import org.apache.cordova.*;
-
-import com.amazon.android.webkit.AmazonWebView;
-
-public class userwebview extends DroidGap {
-    
-    public TestViewClient testViewClient;
-    public TestChromeClient testChromeClient;
-    
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        testViewClient = new TestViewClient(this);
-        testChromeClient = new TestChromeClient(this);
-        super.init(new CordovaWebView(this), new TestViewClient(this), new TestChromeClient(this));
-        super.loadUrl("file:///android_asset/www/userwebview/index.html");
-    }
-
-    public class TestChromeClient extends CordovaChromeClient {
-        public TestChromeClient(DroidGap arg0) {
-            super(arg0);
-            LOG.d("userwebview", "TestChromeClient()");
-        }
-
-        public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {
-            LOG.d("userwebview", "onGeolocationPermissionsShowPrompt(" + origin + ")");
-            super.onGeolocationPermissionsShowPrompt(origin, callback);
-            callback.invoke(origin, true, false);
-        }
-    }
-
-    /**
-     * This class can be used to override the GapViewClient and receive notification of webview events.
-     */
-    public class TestViewClient extends CordovaWebViewClient {
-        public TestViewClient(DroidGap arg0) {
-            super(arg0);
-            LOG.d("userwebview", "TestViewClient()");
-        }
-        
-        @Override
-        public boolean shouldOverrideUrlLoading(AmazonWebView view, String url) {
-            LOG.d("userwebview", "shouldOverrideUrlLoading(" + url + ")");
-            return super.shouldOverrideUrlLoading(view, url);
-        }
-        
-        @Override
-        public void onReceivedError(AmazonWebView view, int errorCode, String description, String failingUrl) {
-            LOG.d("userwebview", "onReceivedError: Error code=" + errorCode + " Description=" + description + " URL=" + failingUrl);
-            super.onReceivedError(view, errorCode, description, failingUrl);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/whitelist.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/whitelist.java b/test/src/org/apache/cordova/test/actions/whitelist.java
deleted file mode 100755
index 85a4dcb..0000000
--- a/test/src/org/apache/cordova/test/actions/whitelist.java
+++ /dev/null
@@ -1,51 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-
-import org.apache.cordova.*;
-
-import com.amazon.android.webkit.AmazonWebView;
-
-public class whitelist extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.init(new CordovaWebView(this), new TestViewClient(this), new CordovaChromeClient(this));
-        super.loadUrl("file:///android_asset/www/whitelist/index.html");
-    }
-
-    /**
-     * This class can be used to override the GapViewClient and receive notification of webview events.
-     */
-    public class TestViewClient extends CordovaWebViewClient {
-
-        public TestViewClient(DroidGap arg0) {
-            super(arg0);
-        }
-        
-        @Override
-        public boolean shouldOverrideUrlLoading(AmazonWebView view, String url) {
-            LOG.d("whitelist", "shouldOverrideUrlLoading(" + url + ")");
-            LOG.d("whitelist", "originalUrl=" + view.getOriginalUrl());
-            return super.shouldOverrideUrlLoading(view, url);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/actions/xhr.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/actions/xhr.java b/test/src/org/apache/cordova/test/actions/xhr.java
deleted file mode 100755
index 3695c11..0000000
--- a/test/src/org/apache/cordova/test/actions/xhr.java
+++ /dev/null
@@ -1,30 +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.
-*/
-package org.apache.cordova.test.actions;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class xhr extends DroidGap {
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/xhr/index.html");
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/backbuttonmultipage.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/backbuttonmultipage.java b/test/src/org/apache/cordova/test/backbuttonmultipage.java
new file mode 100755
index 0000000..8457235
--- /dev/null
+++ b/test/src/org/apache/cordova/test/backbuttonmultipage.java
@@ -0,0 +1,31 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class backbuttonmultipage extends DroidGap {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/background.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/background.java b/test/src/org/apache/cordova/test/background.java
new file mode 100755
index 0000000..7a0ba89
--- /dev/null
+++ b/test/src/org/apache/cordova/test/background.java
@@ -0,0 +1,33 @@
+/*
+       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.
+ */
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+
+import org.apache.cordova.*;
+
+public class background extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        //super.init(new FixWebView(this), new CordovaWebViewClient(this), new CordovaChromeClient(this));
+        super.setBooleanProperty("keepRunning", false);
+        super.loadUrl("file:///android_asset/www/background/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/backgroundcolor.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/backgroundcolor.java b/test/src/org/apache/cordova/test/backgroundcolor.java
new file mode 100755
index 0000000..f40a673
--- /dev/null
+++ b/test/src/org/apache/cordova/test/backgroundcolor.java
@@ -0,0 +1,40 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.graphics.Color;
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class backgroundcolor extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Properties must be set before init() is called, since some are processed during init().
+
+        // backgroundColor can also be set in cordova.xml, but you must use the number equivalent of the color.  For example, Color.RED is
+        //      <preference name="backgroundColor" value="-65536" />
+        super.setIntegerProperty("backgroundColor", Color.GREEN);
+
+        super.init();
+        super.loadUrl("file:///android_asset/www/backgroundcolor/index.html");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/basicauth.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/basicauth.java b/test/src/org/apache/cordova/test/basicauth.java
new file mode 100755
index 0000000..1b09f3d
--- /dev/null
+++ b/test/src/org/apache/cordova/test/basicauth.java
@@ -0,0 +1,44 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class basicauth extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+
+        // LogCat: onReceivedHttpAuthRequest(browserspy.dk:80,BrowserSpy.dk - HTTP Password Test)
+        AuthenticationToken token = new AuthenticationToken();
+        token.setUserName("test");
+        token.setPassword("test");
+        super.setAuthenticationToken(token, "browserspy.dk:80", "BrowserSpy.dk - HTTP Password Test");
+
+        // Add web site to whitelist
+        Config.init();
+        Config.addWhiteListEntry("http://browserspy.dk*", true);
+
+        // Load test
+        super.loadUrl("file:///android_asset/www/basicauth/index.html");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/errorurl.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/errorurl.java b/test/src/org/apache/cordova/test/errorurl.java
new file mode 100755
index 0000000..c271076
--- /dev/null
+++ b/test/src/org/apache/cordova/test/errorurl.java
@@ -0,0 +1,33 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class errorurl extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+        this.setStringProperty("errorUrl", "file:///android_asset/www/htmlnotfound/error.html");
+        super.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/fullscreen.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/fullscreen.java b/test/src/org/apache/cordova/test/fullscreen.java
new file mode 100755
index 0000000..7fcd79b
--- /dev/null
+++ b/test/src/org/apache/cordova/test/fullscreen.java
@@ -0,0 +1,39 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class fullscreen extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Properties must be set before init() is called, since some are processed during init(). 
+
+        // fullscreen can also be set in cordova.xml.  For example, 
+        //      <preference name="fullscreen" value="true" />
+        super.setBooleanProperty("fullscreen", true);
+
+        super.init();
+        super.loadUrl("file:///android_asset/www/fullscreen/index.html");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/htmlnotfound.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/htmlnotfound.java b/test/src/org/apache/cordova/test/htmlnotfound.java
new file mode 100755
index 0000000..4551ca3
--- /dev/null
+++ b/test/src/org/apache/cordova/test/htmlnotfound.java
@@ -0,0 +1,31 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class htmlnotfound extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.init();
+        super.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/iframe.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/iframe.java b/test/src/org/apache/cordova/test/iframe.java
new file mode 100755
index 0000000..de854fc
--- /dev/null
+++ b/test/src/org/apache/cordova/test/iframe.java
@@ -0,0 +1,30 @@
+/*
+       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.
+*/
+package org.apache.cordova.test;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class iframe extends DroidGap {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/iframe/index.html");
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java b/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
new file mode 100644
index 0000000..e1c9a28
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java
@@ -0,0 +1,170 @@
+package org.apache.cordova.test.junit;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.test.backbuttonmultipage;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.inputmethod.BaseInputConnection;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class BackButtonMultiPageTest extends
+		ActivityInstrumentationTestCase2<backbuttonmultipage> {
+
+	private int TIMEOUT = 1000;
+	backbuttonmultipage testActivity;
+	private FrameLayout containerView;
+	private LinearLayout innerContainer;
+	private CordovaWebView testView;
+
+	private AmazonWebViewOnUiThread mUiThread;
+
+	public BackButtonMultiPageTest() {
+		super("org.apache.cordova.test", backbuttonmultipage.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		testActivity = this.getActivity();
+		// Sleep to make sure main page is properly loaded
+		sleep();
+		containerView = (FrameLayout) testActivity
+				.findViewById(android.R.id.content);
+		innerContainer = (LinearLayout) containerView.getChildAt(0);
+		testView = (CordovaWebView) innerContainer.getChildAt(0);
+		mUiThread = new AmazonWebViewOnUiThread(this, testView);
+	}
+
+	public void testPreconditions() {
+		assertNotNull(innerContainer);
+		assertNotNull(testView);
+	}
+
+	public void testViaHref() {
+		testView.sendJavascript("window.location = 'sample2.html';");
+		sleep();
+		String url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		testView.sendJavascript("window.location = 'sample3.html';");
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample3.html"));
+		boolean didGoBack = mUiThread.backHistory();
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		assertTrue(didGoBack);
+		didGoBack = mUiThread.backHistory();
+		sleep();
+		url = mUiThread.getUrl();		
+		assertTrue(url.endsWith("index.html"));
+		assertTrue(didGoBack);
+	}
+
+	public void testViaLoadUrl() {
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+		sleep();
+		String url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample3.html"));
+		boolean didGoBack = mUiThread.backHistory();
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		assertTrue(didGoBack);
+		didGoBack = mUiThread.backHistory();
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("index.html"));
+		assertTrue(didGoBack);
+	}
+
+	public void testViaBackButtonOnView() {
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+		sleep();
+		String url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample3.html"));
+		BaseInputConnection viewConnection = new BaseInputConnection(testView,
+				true);
+		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
+				KeyEvent.KEYCODE_BACK);
+		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
+				KeyEvent.KEYCODE_BACK);
+		viewConnection.sendKeyEvent(backDown);
+		viewConnection.sendKeyEvent(backUp);
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		viewConnection.sendKeyEvent(backDown);
+		viewConnection.sendKeyEvent(backUp);
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("index.html"));
+	}
+
+	public void testViaBackButtonOnLayout() {
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
+		sleep();
+		String url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample3.html"));
+		BaseInputConnection viewConnection = new BaseInputConnection(
+				containerView, true);
+		KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN,
+				KeyEvent.KEYCODE_BACK);
+		KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP,
+				KeyEvent.KEYCODE_BACK);
+		viewConnection.sendKeyEvent(backDown);
+		viewConnection.sendKeyEvent(backUp);
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("sample2.html"));
+		viewConnection.sendKeyEvent(backDown);
+		viewConnection.sendKeyEvent(backUp);
+		sleep();
+		url = mUiThread.getUrl();
+		assertTrue(url.endsWith("index.html"));
+	}
+
+	private void sleep() {
+		try {
+			Thread.sleep(TIMEOUT);
+		} catch (InterruptedException e) {
+			fail("Unexpected Timeout");
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java b/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
new file mode 100644
index 0000000..a2bbb07
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/CordovaActivityTest.java
@@ -0,0 +1,96 @@
+/*
+       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.
+*/
+
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.PluginManager;
+import org.apache.cordova.test.CordovaActivity;
+
+import android.app.Instrumentation;
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class CordovaActivityTest extends ActivityInstrumentationTestCase2<CordovaActivity> {
+
+    private CordovaActivity testActivity;
+    private FrameLayout containerView;
+    private LinearLayout innerContainer;
+    private CordovaWebView testView;
+    private Instrumentation mInstr;
+    private int TIMEOUT = 1000;
+    
+    @SuppressWarnings("deprecation")
+    public CordovaActivityTest()
+    {
+        super("org.apache.cordova.test",CordovaActivity.class);
+    }
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        mInstr = this.getInstrumentation();
+        testActivity = this.getActivity();
+        containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
+        innerContainer = (LinearLayout) containerView.getChildAt(0);
+        testView = (CordovaWebView) innerContainer.getChildAt(0);
+        
+    }
+    
+    public void testPreconditions(){
+        assertNotNull(innerContainer);
+        assertNotNull(testView);
+    }
+    
+
+    public void testForCordovaView() {
+        String className = testView.getClass().getSimpleName();
+        assertTrue(className.equals("CordovaWebView"));
+    }
+    
+    public void testForLinearLayout() {
+        String className = innerContainer.getClass().getSimpleName();
+        assertTrue(className.equals("LinearLayoutSoftKeyboardDetect"));
+    }
+    
+
+    public void testPauseAndResume() throws Throwable
+    {
+        runTestOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                mInstr.callActivityOnPause(testActivity);
+                sleep();
+                assertTrue(testView.isPaused());
+                mInstr.callActivityOnResume(testActivity);
+                sleep();
+                assertFalse(testView.isPaused());
+            }
+        });
+
+    }
+    
+    private void sleep() {
+        try {
+          Thread.sleep(TIMEOUT);
+        } catch (InterruptedException e) {
+          fail("Unexpected Timeout");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java b/test/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java
new file mode 100644
index 0000000..4ed4b88
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java
@@ -0,0 +1,282 @@
+
+package org.apache.cordova.test.junit;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.test.ActivityInstrumentationTestCase2;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CordovaResourceApi;
+import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.PluginEntry;
+import org.apache.cordova.test.CordovaWebViewTestActivity;
+import org.apache.cordova.test.R;
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Scanner;
+
+public class CordovaResourceApiTest extends ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
+
+    public CordovaResourceApiTest()
+    {
+        super(CordovaWebViewTestActivity.class);
+    }
+
+    CordovaWebView cordovaWebView;
+    CordovaResourceApi resourceApi;
+
+    private CordovaWebViewTestActivity activity;
+    String execPayload;
+    Integer execStatus;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        activity = this.getActivity();
+        cordovaWebView = activity.cordovaWebView;
+        resourceApi = cordovaWebView.getResourceApi();
+        resourceApi.setThreadCheckingEnabled(false);
+        cordovaWebView.pluginManager.addService(new PluginEntry("CordovaResourceApiTestPlugin1", new CordovaPlugin() {
+            @Override
+            public Uri remapUri(Uri uri) {
+                if (uri.getQuery() != null && uri.getQuery().contains("pluginRewrite")) {
+                    return cordovaWebView.getResourceApi().remapUri(
+                            Uri.parse("data:text/plain;charset=utf-8,pass"));
+                }
+                return null;
+            }
+            public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+                synchronized (CordovaResourceApiTest.this) {
+                    execPayload = args.getString(0);
+                    execStatus = args.getInt(1);
+                    CordovaResourceApiTest.this.notify();
+                }
+                return true;
+            }
+        }));
+    }
+
+    private Uri createTestImageContentUri() {
+        Bitmap imageBitmap = BitmapFactory.decodeResource(activity.getResources(), R.drawable.icon);
+        String stored = MediaStore.Images.Media.insertImage(activity.getContentResolver(),
+                imageBitmap, "app-icon", "desc");
+        return Uri.parse(stored);
+    }
+
+    private void performApiTest(Uri uri, String expectedMimeType, File expectedLocalFile,
+            boolean expectRead, boolean expectWrite) throws IOException {
+        uri = resourceApi.remapUri(uri);
+        assertEquals(expectedLocalFile, resourceApi.mapUriToFile(uri));
+        
+        try {
+            OpenForReadResult readResult = resourceApi.openForRead(uri);
+            String mimeType2 = resourceApi.getMimeType(uri);
+            assertEquals("openForRead mime-type", expectedMimeType, readResult.mimeType);
+            assertEquals("getMimeType mime-type", expectedMimeType, mimeType2);
+            readResult.inputStream.read();
+            if (!expectRead) {
+                fail("Expected getInputStream to throw.");
+            }
+        } catch (IOException e) {
+            if (expectRead) {
+                throw e;
+            }
+        }
+        try {
+            OutputStream outStream = resourceApi.openOutputStream(uri);
+            outStream.write(123);
+            if (!expectWrite) {
+                fail("Expected getOutputStream to throw.");
+            }
+            outStream.close();
+        } catch (IOException e) {
+            if (expectWrite) {
+                throw e;
+            }
+        }
+    }
+
+    public void testValidContentUri() throws IOException
+    {
+        Uri contentUri = createTestImageContentUri();
+        File localFile = resourceApi.mapUriToFile(contentUri);
+        assertNotNull(localFile);
+        performApiTest(contentUri, "image/jpeg", localFile, true, true);
+    }
+
+    public void testInvalidContentUri() throws IOException
+    {
+        Uri contentUri = Uri.parse("content://media/external/images/media/999999999");
+        performApiTest(contentUri, null, null, false, false);
+    }
+
+    public void testValidAssetUri() throws IOException
+    {
+        Uri assetUri = Uri.parse("file:///android_asset/www/index.html?foo#bar"); // Also check for stripping off ? and # correctly.
+        performApiTest(assetUri, "text/html", null, true, false);
+    }
+
+    public void testInvalidAssetUri() throws IOException
+    {
+        Uri assetUri = Uri.parse("file:///android_asset/www/missing.html");
+        performApiTest(assetUri, "text/html", null, false, false);
+    }
+
+    public void testFileUriToExistingFile() throws IOException
+    {
+        File f = File.createTempFile("te s t", ".txt"); // Also check for dealing with spaces.
+        try {
+            Uri fileUri = Uri.parse(f.toURI().toString() + "?foo#bar"); // Also check for stripping off ? and # correctly.
+            performApiTest(fileUri, "text/plain", f, true, true);
+        } finally {
+            f.delete();
+        }
+    }
+
+    public void testFileUriToMissingFile() throws IOException
+    {
+        File f = new File(Environment.getExternalStorageDirectory() + "/somefilethatdoesntexist");
+        Uri fileUri = Uri.parse(f.toURI().toString());
+        try {
+            performApiTest(fileUri, null, f, false, true);
+        } finally {
+            f.delete();
+        }
+    }
+    
+    public void testFileUriToMissingFileWithMissingParent() throws IOException
+    {
+        File f = new File(Environment.getExternalStorageDirectory() + "/somedirthatismissing" + System.currentTimeMillis() + "/somefilethatdoesntexist");
+        Uri fileUri = Uri.parse(f.toURI().toString());
+        performApiTest(fileUri, null, f, false, true);
+    }
+
+    public void testUnrecognizedUri() throws IOException
+    {
+        Uri uri = Uri.parse("somescheme://foo");
+        performApiTest(uri, null, null, false, false);
+    }
+
+    public void testRelativeUri()
+    {
+        try {
+            resourceApi.openForRead(Uri.parse("/foo"));
+            fail("Should have thrown for relative URI 1.");
+        } catch (Throwable t) {
+        }
+        try {
+            resourceApi.openForRead(Uri.parse("//foo/bar"));
+            fail("Should have thrown for relative URI 2.");
+        } catch (Throwable t) {
+        }
+        try {
+            resourceApi.openForRead(Uri.parse("foo.png"));
+            fail("Should have thrown for relative URI 3.");
+        } catch (Throwable t) {
+        }
+    }
+    
+    public void testPluginOverride() throws IOException
+    {
+        Uri uri = Uri.parse("plugin-uri://foohost/android_asset/www/index.html?pluginRewrite=yes");
+        performApiTest(uri, "text/plain", null, true, false);
+    }
+
+    public void testMainThreadUsage() throws IOException
+    {
+        Uri assetUri = Uri.parse("file:///android_asset/www/index.html");
+        resourceApi.setThreadCheckingEnabled(true);
+        try {
+            resourceApi.openForRead(assetUri);
+            fail("Should have thrown for main thread check.");
+        } catch (Throwable t) {
+        }
+    }
+    
+    
+    public void testDataUriPlain() throws IOException
+    {
+        Uri uri = Uri.parse("data:text/plain;charset=utf-8,pa%20ss");
+        OpenForReadResult readResult = resourceApi.openForRead(uri);
+        assertEquals("text/plain", readResult.mimeType);
+        String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next();
+        assertEquals("pa ss", data);
+    }
+    
+    public void testDataUriBase64() throws IOException
+    {
+        Uri uri = Uri.parse("data:text/js;charset=utf-8;base64,cGFzcw==");
+        OpenForReadResult readResult = resourceApi.openForRead(uri);
+        assertEquals("text/js", readResult.mimeType);
+        String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next();
+        assertEquals("pass", data);
+    }
+    
+    public void testWebViewRequestIntercept() throws IOException
+    {
+        cordovaWebView.sendJavascript(
+            "var x = new XMLHttpRequest;\n" +
+            "x.open('GET', 'file://foo?pluginRewrite=1', false);\n" + 
+            "x.send();\n" + 
+            "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])");
+        
+        execPayload = null;
+        execStatus = null;
+        try {
+            synchronized (this) {
+                this.wait(2000);
+            }
+        } catch (InterruptedException e) {
+        }
+        assertEquals("pass", execPayload);
+        assertEquals(execStatus.intValue(), 200);
+    }
+    
+    public void testWebViewWhiteListRejection() throws IOException
+    {
+        cordovaWebView.sendJavascript(
+            "var x = new XMLHttpRequest;\n" +
+            "x.open('GET', 'http://foo/bar', false);\n" + 
+            "x.send();\n" + 
+            "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])");
+        execPayload = null;
+        execStatus = null;
+        try {
+            synchronized (this) {
+                this.wait(2000);
+            }
+        } catch (InterruptedException e) {
+        }
+        assertEquals("", execPayload);
+        assertEquals(execStatus.intValue(), 404);
+    }    
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/CordovaTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/CordovaTest.java b/test/src/org/apache/cordova/test/junit/CordovaTest.java
new file mode 100644
index 0000000..02f4ee6
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/CordovaTest.java
@@ -0,0 +1,116 @@
+/*
+       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.
+*/
+package org.apache.cordova.test.junit;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.PluginManager;
+import org.apache.cordova.test.CordovaWebViewTestActivity;
+import org.apache.cordova.test.R;
+
+import android.app.Instrumentation;
+import android.test.ActivityInstrumentationTestCase2;
+import android.view.View;
+
+public class CordovaTest extends
+    ActivityInstrumentationTestCase2<CordovaWebViewTestActivity> {
+
+  private static final long TIMEOUT = 1000;
+  private CordovaWebViewTestActivity testActivity;
+  private View testView;
+  private String rString;
+
+  public CordovaTest() {
+    super("org.apache.cordova.test.activities", CordovaWebViewTestActivity.class);
+  }
+
+  protected void setUp() throws Exception {
+    super.setUp();
+    testActivity = this.getActivity();
+    testView = testActivity.findViewById(R.id.cordovaWebView);
+  }
+
+  public void testPreconditions() {
+    assertNotNull(testView);
+  }
+
+  public void testForCordovaView() {
+    //Sleep for no reason!!!!
+    sleep();
+    String className = testView.getClass().getSimpleName();
+    assertTrue(className.equals("CordovaWebView"));
+  }
+
+  /*
+  public void testForPluginManager() {
+    CordovaWebView v = (CordovaWebView) testView;
+    PluginManager p = v.getPluginManager();
+    assertNotNull(p);
+    String className = p.getClass().getSimpleName();
+    assertTrue(className.equals("PluginManager"));
+  }
+
+  public void testBackButton() {
+    CordovaWebView v = (CordovaWebView) testView;
+    assertFalse(v.checkBackKey());
+  }
+
+  public void testLoadUrl() {
+    CordovaWebView v = (CordovaWebView) testView;
+    v.loadUrlIntoView("file:///android_asset/www/index.html");
+    sleep();
+    String url = v.getUrl();
+    boolean result = url.equals("file:///android_asset/www/index.html");
+    assertTrue(result);
+    int visible = v.getVisibility();
+    assertTrue(visible == View.VISIBLE);
+  }
+
+  public void testBackHistoryFalse() {
+    CordovaWebView v = (CordovaWebView) testView;
+    // Move back in the history
+    boolean test = v.backHistory();
+    assertFalse(test);
+  }
+
+  // Make sure that we can go back
+  public void testBackHistoryTrue() {
+    this.testLoadUrl();
+    CordovaWebView v = (CordovaWebView) testView;
+    v.loadUrlIntoView("file:///android_asset/www/compass/index.html");
+    sleep();
+    String url = v.getUrl();
+    assertTrue(url.equals("file:///android_asset/www/compass/index.html"));
+    // Move back in the history
+    boolean test = v.backHistory();
+    assertTrue(test);
+    sleep();
+    url = v.getUrl();
+    assertTrue(url.equals("file:///android_asset/www/index.html"));
+  }
+  */
+  
+
+  private void sleep() {
+    try {
+      Thread.sleep(TIMEOUT);
+    } catch (InterruptedException e) {
+      fail("Unexpected Timeout");
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/f768066d/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java b/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
new file mode 100644
index 0000000..c04804d
--- /dev/null
+++ b/test/src/org/apache/cordova/test/junit/ErrorUrlTest.java
@@ -0,0 +1,79 @@
+package org.apache.cordova.test.junit;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.test.errorurl;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+
+public class ErrorUrlTest extends ActivityInstrumentationTestCase2<errorurl> {
+
+	private int TIMEOUT = 1000;
+	errorurl testActivity;
+	private FrameLayout containerView;
+	private LinearLayout innerContainer;
+	private CordovaWebView testView;
+
+	private AmazonWebViewOnUiThread mUiThread;
+
+	public ErrorUrlTest() {
+		super("org.apache.cordova.test", errorurl.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		testActivity = this.getActivity();
+		containerView = (FrameLayout) testActivity
+				.findViewById(android.R.id.content);
+		innerContainer = (LinearLayout) containerView.getChildAt(0);
+		testView = (CordovaWebView) innerContainer.getChildAt(0);
+		mUiThread = new AmazonWebViewOnUiThread(this, testView);
+	}
+
+	public void testPreconditions() {
+		assertNotNull(innerContainer);
+		assertNotNull(testView);
+	}
+
+	// This will fail for AWV because the current url on a wrong page will
+	// return the URL used to load
+	public void testUrl() {
+		mUiThread.loadUrl("file:///android_asset/www/htmlnotfound/index.html");
+		sleep();
+		String good_url = "file:///android_asset/www/error.html";
+		String url = mUiThread.getUrl();
+		assertNotNull(url);
+		assertTrue(url.equals(good_url));
+	}
+
+	private void sleep() {
+		try {
+			Thread.sleep(TIMEOUT);
+		} catch (InterruptedException e) {
+			fail("Unexpected Timeout");
+		}
+	}
+
+}


[04/50] [abbrv] git commit: Removing the plugins directory after the plugins were incorrectly removed

Posted by bo...@apache.org.
Removing the plugins directory after the plugins were incorrectly removed


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/d0df1d40
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/d0df1d40
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/d0df1d40

Branch: refs/heads/master
Commit: d0df1d408c710a4bc867b40b6a57cdd45820eb7b
Parents: 8f29373
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Nov 12 14:24:30 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jan 22 11:37:15 2014 -0800

----------------------------------------------------------------------
 test/cordova/plugins/android.json               |    1 -
 .../org.apache.cordova.device/.fetch.json       |    1 -
 .../plugins/org.apache.cordova.device/LICENSE   |  202 --
 .../plugins/org.apache.cordova.device/README.md |    5 -
 .../org.apache.cordova.device/RELEASENOTES.md   |   40 -
 .../docs/device.cordova.md                      |   80 -
 .../org.apache.cordova.device/docs/device.md    |  104 -
 .../docs/device.model.md                        |  106 -
 .../docs/device.name.md                         |  108 -
 .../docs/device.platform.md                     |   99 -
 .../docs/device.uuid.md                         |  115 -
 .../docs/device.version.md                      |   86 -
 .../org.apache.cordova.device/plugin.xml        |  103 -
 .../src/blackberry10/index.js                   |   69 -
 .../src/firefoxos/DeviceProxy.js                |   39 -
 .../src/ios/CDVDevice.h                         |   30 -
 .../src/ios/CDVDevice.m                         |   90 -
 .../src/windows8/DeviceProxy.js                 |   50 -
 .../org.apache.cordova.device/src/wp/Device.cs  |  135 -
 .../test/autotest/html/HtmlReporter.js          |  101 -
 .../test/autotest/html/HtmlReporterHelpers.js   |   60 -
 .../test/autotest/html/ReporterView.js          |  164 --
 .../test/autotest/html/SpecView.js              |   79 -
 .../test/autotest/html/SuiteView.js             |   22 -
 .../test/autotest/html/TrivialReporter.js       |  192 --
 .../test/autotest/index.html                    |   59 -
 .../test/autotest/jasmine.css                   |   81 -
 .../test/autotest/jasmine.js                    | 2530 ------------------
 .../test/autotest/pages/device.html             |   71 -
 .../test/autotest/test-runner.js                |   62 -
 .../test/autotest/tests/device.tests.js         |   64 -
 .../test/cordova-incl.js                        |   85 -
 .../org.apache.cordova.device/test/index.html   |   66 -
 .../org.apache.cordova.device/test/main.js      |  163 --
 .../org.apache.cordova.device/test/master.css   |  164 --
 35 files changed, 5426 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/android.json
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/android.json b/test/cordova/plugins/android.json
deleted file mode 100644
index b18aa36..0000000
--- a/test/cordova/plugins/android.json
+++ /dev/null
@@ -1 +0,0 @@
-{"prepare_queue":{"installed":[],"uninstalled":[]},"config_munge":{"res/xml/config.xml":{"/*":{"<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>":1}}},"installed_plugins":{"org.apache.cordova.device":{"PACKAGE_NAME":"org.apache.cordova.test"}},"dependent_plugins":{}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/.fetch.json
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/.fetch.json b/test/cordova/plugins/org.apache.cordova.device/.fetch.json
deleted file mode 100644
index f22cd81..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/.fetch.json
+++ /dev/null
@@ -1 +0,0 @@
-{"source":{"type":"local","path":"/Users/jbowser/plugins/cordova-plugin-device"}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/LICENSE
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/LICENSE b/test/cordova/plugins/org.apache.cordova.device/LICENSE
deleted file mode 100644
index 7a4a3ea..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/README.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/README.md b/test/cordova/plugins/org.apache.cordova.device/README.md
deleted file mode 100644
index e07ef89..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-cordova-plugin-device
------------------------
-To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface).
-
-If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/plugin_ref_plugman.md.html).

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md b/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
deleted file mode 100644
index 17b77b6..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/RELEASENOTES.md
+++ /dev/null
@@ -1,40 +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.
-#
--->
-# Release Notes
-
-### 0.2.1 (Sept 5, 2013)
-* removed extraneous print statement
-* [CB-4432] copyright notice change
-
-### 0.2.3 (Sept 25, 2013)
-* CB-4889 bumping&resetting version
-* [windows8] commandProxy has moved
-* [BlackBerry10] removed uneeded permission tags in plugin.xml
-* CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device
-* Rename CHANGELOG.md -> RELEASENOTES.md
-* updated to use commandProxy for ffos
-* add firefoxos support
-* [CB-4752] Incremented plugin version on dev branch. 
-
-### 0.2.4 (Oct 28, 2013)
-* CB-5128: added repo + issue tag in plugin.xml for device plugin
-* CB-5085 device.cordova returning wrong value
-* [CB-4915] Incremented plugin version on dev branch.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
deleted file mode 100644
index b29e24f..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.cordova.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
- license: 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.
----
-
-device.cordova
-===============
-
-Get the version of Cordova running on the device.
-
-    var string = device.cordova;
-
-Description
------------
-
-`device.cordova` returns the version of Cordova running on the device.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    var name = device.cordova;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.md
deleted file mode 100644
index 3748d36..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.md
+++ /dev/null
@@ -1,104 +0,0 @@
----
- license: 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.
----
-
-Device
-======
-
-> The `device` object describes the device's hardware and software.
-
-Properties
-----------
-
-- device.name
-- device.cordova
-- device.platform
-- device.uuid
-- device.version
-- device.model
-
-Variable Scope
---------------
-
-Since `device` is assigned to the `window` object, it is implicitly in the global scope.
-
-    // These reference the same `device`
-    var phoneName = window.device.name;
-    var phoneName = device.name;
-
-Permissions
------------
-
-### Android
-
-#### app/res/xml/config.xml
-
-    <plugin name="Device" value="org.apache.cordova.Device" />
-
-#### app/AndroidManifest.xml
-
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-
-### Bada
-
-#### manifest.xml
-
-    <Privilege>
-        <Name>SYSTEM_SERVICE</Name>
-    </Privilege>
-
-### BlackBerry WebWorks
-
-#### www/plugins.xml
-
-    <plugin name="Device" value="org.apache.cordova.device.Device" />
-
-#### www/config.xml
-
-    <feature id="blackberry.app" required="true" version="1.0.0.0" />
-    <rim:permissions>
-        <rim:permit>read_device_identifying_information</rim:permit>
-    </rim:permissions>
-
-### iOS
-
-    No permissions are required.
-
-### webOS
-
-    No permissions are required.
-
-### Windows Phone
-
-#### Properties/WPAppManifest.xml
-
-    <Capabilities>
-        <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
-        <Capability Name="ID_CAP_IDENTITY_DEVICE" />
-        <Capability Name="ID_CAP_IDENTITY_USER" />
-    </Capabilities>
-
-Reference: [Application Manifest for Windows Phone](http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx)
-
-### Tizen
-
-#### config.xml
-
-    <feature name="http://tizen.org/api/systeminfo" required="true"/>
-
-Reference: [Application Manifest for Tizen Web Application](https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures)

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
deleted file mode 100644
index e5238e4..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.model.md
+++ /dev/null
@@ -1,106 +0,0 @@
----
- license: 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.
----
-
-device.model
-===========
-
-Get the device's model name.
-
-    var string = device.model;
-
-Description
------------
-
-The `device.model` returns the name of the device's model or
-product. The value is set by the device manufacturer and may be
-different across versions of the same product.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Android:    Nexus One       returns "Passion" (Nexus One code name)
-    //             Motorola Droid  returns "voles"
-    // BlackBerry: Torch 9800      returns "9800"
-    // iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
-    //
-    var model = device.model;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Model: '    + device.model    + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>
-
-Android Quirks
---------------
-
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
-
-Bada Quirks
------------
-- Returns the manufacturer model name, for example, `Samsung Wave S8500`
-
-Tizen Quirks
------------
-- Returns the device model assigned by the vendor, for example, `TIZEN`

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
deleted file mode 100644
index a70648f..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.name.md
+++ /dev/null
@@ -1,108 +0,0 @@
----
- license: 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.
----
-
-device.name
-===========
-
-__WARNING:__ `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.
-
-Get the device's model name.
-
-    var string = device.name;
-
-Description
------------
-
-`device.name` returns the name of the device's model or product. This
-value is set by the device manufacturer and may be different across
-versions of the same product.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Android:    Nexus One       returns "Passion" (Nexus One code name)
-    //             Motorola Droid  returns "voles"
-    // BlackBerry: Torch 9800      returns "9800"
-    // iOS:     All devices     returns either "iPhone", "iPod Touch", "iPhone Simulator", "iPad", "iPad Simulator"
-    //
-    var name = device.name;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Model: '    + device.model    + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>
-
-Android Quirks
---------------
-
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
-
-Bada Quirks
------------
-- Returns the manufacturer model name, for example, `Samsung Wave S8500`
-
-Tizen Quirks
------------
-- Returns the device model assigned by the vendor, for example, `TIZEN`

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
deleted file mode 100644
index 0d2cacb..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.platform.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
- license: 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.
----
-
-device.platform
-===============
-
-Get the device's operating system name.
-
-    var string = device.platform;
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Depending on the device, a few examples are:
-    //   - "Android"
-    //   - "BlackBerry"
-    //   - "iOS"
-    //   - "webOS"
-    //   - "WinCE"
-    //   - "Tizen"
-    var devicePlatform = device.platform;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>
-
-BlackBerry Quirks
------------------
-
-Devices may return the device platform version number instead of the
-platform name.  For example, the Storm2 9550 returns a value such as
-`2.13.0.95`.
-
-Windows Phone 7 Quirks
------------------
-
-Windows Phone 7 devices report the platform as `WinCE`.
-
-Windows Phone 8 Quirks
------------------
-
-Windows Phone 8 devices report the platform as `Win32NT`.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
deleted file mode 100644
index 76abf73..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.uuid.md
+++ /dev/null
@@ -1,115 +0,0 @@
----
- license: 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.
----
-
-device.uuid
-===========
-
-Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
-    var string = device.uuid;
-
-Description
------------
-
-The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Android: Returns a random 64-bit integer (as a string, again!)
-    //          The integer is generated on the device's first boot
-    //
-    // BlackBerry: Returns the PIN number of the device
-    //             This is a nine-digit unique integer (as a string, though!)
-    //
-    // iPhone: (Paraphrased from the UIDevice Class documentation)
-    //         Returns a string of hash values created from multiple hardware identifies.
-    //         It is guaranteed to be unique for every device and cannot be tied
-    //         to the user account.
-    // Windows Phone 7 : Returns a hash of device+current user,
-    // if the user is not defined, a guid is generated and will persist until the app is uninstalled
-    //
-    // webOS: returns the device NDUID
-    //
-    // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
-    // unique to every GSM and UMTS mobile phone.
-    var deviceID = device.uuid;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>
-
-iOS Quirk
--------------
-
-The `uuid` on iOS is not unique to a device, but varies for each
-application, for each installation.  It changes if you delete and
-re-install the app, and possibly also when you upgrade iOS, or even
-upgrade your app per version (apparent in iOS 5.1). The `uuid` is not
-a reliable value.
-
-Windows Phone 7 and 8 Quirks
--------------
-
-The `uuid` for Windows Phone 7 requires the permission
-`ID_CAP_IDENTITY_DEVICE`.  Microsoft will likely deprecate this
-property soon.  If the capability is not available, the application
-generates a persistent guid that is maintained for the duration of the
-application's installation on the device.

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md b/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
deleted file mode 100644
index ecd4733..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/docs/device.version.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
- license: 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.
----
-
-device.version
-==============
-
-Get the operating system version.
-
-    var string = device.version;
-
-Supported Platforms
--------------------
-
-- Android 2.1+
-- BlackBerry WebWorks (OS 5.0 and higher)
-- iOS
-- Windows Phone 7 and 8
-- Bada 1.2 & 2.x
-- webOS
-- Tizen
-- Windows 8
-
-Quick Example
--------------
-
-    // Android:    Froyo OS would return "2.2"
-    //             Eclair OS would return "2.1", "2.0.1", or "2.0"
-    //             Version can also return update level "2.1-update1"
-    //
-    // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
-    //
-    // iPhone:     iOS 3.2 returns "3.2"
-    //
-    // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
-    // webOS: webOS 2.2.4 return 2.2.4
-    // Tizen: returns "TIZEN_20120425_2"
-    var deviceVersion = device.version;
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Device Properties Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for device API libraries to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // device APIs are available
-        //
-        function onDeviceReady() {
-            var element = document.getElementById('deviceProperties');
-            element.innerHTML = 'Device Name: '     + device.name     + '<br />' +
-                                'Device Cordova: '  + device.cordova  + '<br />' +
-                                'Device Platform: ' + device.platform + '<br />' +
-                                'Device UUID: '     + device.uuid     + '<br />' +
-                                'Device Version: '  + device.version  + '<br />';
-        }
-
-        </script>
-      </head>
-      <body>
-        <p id="deviceProperties">Loading device properties...</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/plugin.xml
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/plugin.xml b/test/cordova/plugins/org.apache.cordova.device/plugin.xml
deleted file mode 100644
index 7eb03c4..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/plugin.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-    xmlns:rim="http://www.blackberry.com/ns/widgets"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="org.apache.cordova.device"
-    version="0.2.4">
-    <name>Device</name>
-    <description>Cordova Device Plugin</description>
-    <license>Apache 2.0</license>
-    <keywords>cordova,device</keywords>
-    <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git</repo>
-    <issue>https://issues.apache.org/jira/browse/CB/component/12320648</issue>
-
-    <js-module src="www/device.js" name="device">
-        <clobbers target="device" />
-    </js-module>
-
-    <!-- firefoxos -->
-    <platform name="firefoxos">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Device">
-                <param name="firefoxos-package" value="Device" />
-            </feature>
-        </config-file>                                         
-        
-        <js-module src="src/firefoxos/DeviceProxy.js" name="DeviceProxy">
-            <runs />
-        </js-module>
-    </platform>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/*">
-            <feature name="Device" >
-                <param name="android-package" value="org.apache.cordova.device.Device"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/android/Device.java" target-dir="src/org/apache/cordova/device" />
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Device">
-                <param name="ios-package" value="CDVDevice"/>
-            </feature>
-        </config-file>
-
-        <header-file src="src/ios/CDVDevice.h" />
-        <source-file src="src/ios/CDVDevice.m" />
-    </platform>
-
-    <!-- blackberry10 -->
-    <platform name="blackberry10">
-        <source-file src="src/blackberry10/index.js" target-dir="Device" />
-        <config-file target="www/config.xml" parent="/widget">
-            <feature name="Device" value="Device"/>
-        </config-file>
-        <config-file target="www/config.xml" parent="/widget/rim:permissions">
-            <rim:permit>read_device_identifying_information</rim:permit>
-        </config-file>
-    </platform>
-
-    <!-- wp7 -->
-    <platform name="wp7">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Device">
-                <param name="wp-package" value="Device"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_IDENTITY_DEVICE" />
-        </config-file>
-
-        <source-file src="src/wp/Device.cs" />
-    </platform>
-
-    <!-- wp8 -->
-    <platform name="wp8">
-        <config-file target="config.xml" parent="/*">
-            <feature name="Device">
-                <param name="wp-package" value="Device"/>
-            </feature>
-        </config-file>
-
-        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
-            <Capability Name="ID_CAP_IDENTITY_DEVICE" />
-        </config-file>
-
-        <source-file src="src/wp/Device.cs" />
-    </platform>
-
-    <!-- windows8 -->
-    <platform name="windows8">
-        <js-module src="src/windows8/DeviceProxy.js" name="DeviceProxy">
-            <merges target="" />
-        </js-module>
-    </platform>
-
-</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js b/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
deleted file mode 100644
index 639ac64..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/blackberry10/index.js
+++ /dev/null
@@ -1,69 +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 getModelName () {
-    var modelName = window.qnx.webplatform.device.modelName;
-    //Pre 10.2 (meaning Z10 or Q10)
-    if (typeof modelName === "undefined") {
-        if (window.screen.height === 720 && window.screen.width === 720) {
-            if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) {
-                modelName = "Q10";
-            } else {
-                modelName = "Q5";
-            }
-        } else if ((window.screen.height === 1280 && window.screen.width === 768) ||
-                   (window.screen.height === 768 && window.screen.width === 1280)) {
-            modelName = "Z10";
-        } else {
-            modelName = window.qnx.webplatform.deviceName;
-        }
-    }
-
-    return modelName;
-}
-
-function getUUID () {
-    var uuid = "";
-    try {
-        //Must surround by try catch because this will throw if the app is missing permissions
-        uuid = window.qnx.webplatform.device.devicePin;
-    } catch (e) {
-        //DO Nothing
-    }
-    return uuid;
-}
-
-module.exports = {
-    getDeviceInfo: function (success, fail, args, env) {
-        var result = new PluginResult(args, env),
-            modelName = getModelName(),
-            uuid = getUUID(),
-            info = {
-                platform: "blackberry10",
-                version: window.qnx.webplatform.device.scmBundle,
-                model: modelName,
-                uuid: uuid,
-                cordova: "dev"
-            };
-
-        result.ok(info);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js b/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
deleted file mode 100644
index f37e761..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
+++ /dev/null
@@ -1,39 +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 firefoxos = require('cordova/platform');
-var cordova = require('cordova');
-
-module.exports = {
-    getDeviceInfo: function(success, error) {
-        setTimeout(function () {
-            success({
-                cordova: firefoxos.cordovaVersion,
-                platform: 'firefoxos',
-                model: null,
-                version: null,
-                uuid: null
-            });
-        }, 0);
-    }
-};
-
-require("cordova/firefoxos/commandProxy").add("Device", module.exports);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
deleted file mode 100644
index a146d88..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
+++ /dev/null
@@ -1,30 +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.
- */
-
-#import <UIKit/UIKit.h>
-#import <Cordova/CDVPlugin.h>
-
-@interface CDVDevice : CDVPlugin
-{}
-
-+ (NSString*)cordovaVersion;
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m b/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
deleted file mode 100644
index 7e18d92..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
+++ /dev/null
@@ -1,90 +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.
- */
-
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-#import <Cordova/CDV.h>
-#import "CDVDevice.h"
-
-@implementation UIDevice (ModelVersion)
-
-- (NSString*)modelVersion
-{
-    size_t size;
-
-    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
-    char* machine = malloc(size);
-    sysctlbyname("hw.machine", machine, &size, NULL, 0);
-    NSString* platform = [NSString stringWithUTF8String:machine];
-    free(machine);
-
-    return platform;
-}
-
-@end
-
-@interface CDVDevice () {}
-@end
-
-@implementation CDVDevice
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
-{
-    NSDictionary* deviceProperties = [self deviceProperties];
-    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
-
-    /* Settings.plist
-     * Read the optional Settings.plist file and push these user-defined settings down into the web application.
-     * This can be useful for supplying build-time configuration variables down to the app to change its behavior,
-     * such as specifying Full / Lite version, or localization (English vs German, for instance).
-     */
-    // TODO: turn this into an iOS only plugin
-    NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"];
-
-    if ([temp respondsToSelector:@selector(JSONString)]) {
-        NSLog(@"Deprecation warning: window.Setting will be removed Aug 2013. Refer to https://issues.apache.org/jira/browse/CB-2433");
-        NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]];
-        [self.commandDelegate evalJs:js];
-    }
-
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (NSDictionary*)deviceProperties
-{
-    UIDevice* device = [UIDevice currentDevice];
-    NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
-
-    [devProps setObject:[device modelVersion] forKey:@"model"];
-    [devProps setObject:@"iOS" forKey:@"platform"];
-    [devProps setObject:[device systemVersion] forKey:@"version"];
-    [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"];
-    [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
-
-    NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
-    return devReturn;
-}
-
-+ (NSString*)cordovaVersion
-{
-    return CDV_VERSION;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js b/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
deleted file mode 100644
index 16145c0..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
+++ /dev/null
@@ -1,50 +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');
-var utils = require('cordova/utils');
-
-module.exports = {
-
-    getDeviceInfo:function(win,fail,args) {
-
-        // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
-        var deviceId;
-
-        var localSettings = Windows.Storage.ApplicationData.current.localSettings;
-
-        if (localSettings.values.deviceId) {
-            deviceId = localSettings.values.deviceId;
-        }
-        else {
-            deviceId = localSettings.values.deviceId = utils.createUUID();
-        }
-
-        setTimeout(function () {
-            win({ platform: "windows8", version: "8", uuid: deviceId, cordova: '0.0.0', model: window.clientInformation.platform });
-        }, 0);
-    }
-
-};
-
-require("cordova/windows8/commandProxy").add("Device", module.exports);
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs b/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
deleted file mode 100644
index 0d2576d..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/src/wp/Device.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-/*  
-	Licensed 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.
-*/
-
-using System;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using Microsoft.Phone.Info;
-using System.IO.IsolatedStorage;
-using System.Windows.Resources;
-using System.IO;
-using System.Diagnostics;
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
-    public class Device : BaseCommand
-    {
-        public void getDeviceInfo(string notused)
-        {
-
-            string res = String.Format("\"name\":\"{0}\",\"cordova\":\"{1}\",\"platform\":\"{2}\",\"uuid\":\"{3}\",\"version\":\"{4}\",\"model\":\"{5}\"",
-                                        this.name,
-                                        this.cordova,
-                                        this.platform,
-                                        this.uuid,
-                                        this.version,
-                                        this.model);
-
-
-
-            res = "{" + res + "}";
-            //Debug.WriteLine("Result::" + res);
-            DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res));
-        }
-
-        public string model
-        {
-            get
-            {
-                return DeviceStatus.DeviceName;
-                //return String.Format("{0},{1},{2}", DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceHardwareVersion, DeviceStatus.DeviceFirmwareVersion); 
-            }
-        }
-
-        public string name
-        {
-            get
-            {
-                return DeviceStatus.DeviceName;
-                
-            }
-        }
-
-        public string cordova
-        {
-            get
-            {
-                // TODO: should be able to dynamically read the Cordova version from somewhere...
-                return "3.0.0";
-            }
-        }
-
-        public string platform
-        {
-            get
-            {
-                return Environment.OSVersion.Platform.ToString();
-            }
-        }
-
-        public string uuid
-        {
-            get
-            {
-                string returnVal = "";
-                object id;
-                UserExtendedProperties.TryGetValue("ANID", out id);
-
-                if (id != null)
-                {
-                    returnVal = id.ToString().Substring(2, 32);
-                }
-                else
-                {
-                    returnVal = "???unknown???";
-
-                    using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication())
-                    {
-                        try
-                        {
-                            IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage);
-
-                            using (StreamReader reader = new StreamReader(fileStream))
-                            {
-                                returnVal = reader.ReadLine();
-                            }
-                        }
-                        catch (Exception /*ex*/)
-                        {
-
-                        }
-                    }
-                }
-
-                return returnVal;
-            }
-        }
-
-        public string version
-        {
-            get
-            {
-                return Environment.OSVersion.Version.ToString();
-            }
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
deleted file mode 100644
index 7d9d924..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporter.js
+++ /dev/null
@@ -1,101 +0,0 @@
-jasmine.HtmlReporter = function(_doc) {
-  var self = this;
-  var doc = _doc || window.document;
-
-  var reporterView;
-
-  var dom = {};
-
-  // Jasmine Reporter Public Interface
-  self.logRunningSpecs = false;
-
-  self.reportRunnerStarting = function(runner) {
-    var specs = runner.specs() || [];
-
-    if (specs.length == 0) {
-      return;
-    }
-
-    createReporterDom(runner.env.versionString());
-    doc.body.appendChild(dom.reporter);
-
-    reporterView = new jasmine.HtmlReporter.ReporterView(dom);
-    reporterView.addSpecs(specs, self.specFilter);
-  };
-
-  self.reportRunnerResults = function(runner) {
-    reporterView && reporterView.complete();
-  };
-
-  self.reportSuiteResults = function(suite) {
-    reporterView.suiteComplete(suite);
-  };
-
-  self.reportSpecStarting = function(spec) {
-    if (self.logRunningSpecs) {
-      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
-    }
-  };
-
-  self.reportSpecResults = function(spec) {
-    reporterView.specComplete(spec);
-  };
-
-  self.log = function() {
-    var console = jasmine.getGlobal().console;
-    if (console && console.log) {
-      if (console.log.apply) {
-        console.log.apply(console, arguments);
-      } else {
-        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
-      }
-    }
-  };
-
-  self.specFilter = function(spec) {
-    if (!focusedSpecName()) {
-      return true;
-    }
-
-    return spec.getFullName().indexOf(focusedSpecName()) === 0;
-  };
-
-  return self;
-
-  function focusedSpecName() {
-    var specName;
-
-    (function memoizeFocusedSpec() {
-      if (specName) {
-        return;
-      }
-
-      var paramMap = [];
-      var params = doc.location.search.substring(1).split('&');
-
-      for (var i = 0; i < params.length; i++) {
-        var p = params[i].split('=');
-        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
-      }
-
-      specName = paramMap.spec;
-    })();
-
-    return specName;
-  }
-
-  function createReporterDom(version) {
-    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
-      dom.banner = self.createDom('div', { className: 'banner' },
-        self.createDom('span', { className: 'title' }, "Jasmine "),
-        self.createDom('span', { className: 'version' }, version)),
-
-      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
-      dom.alert = self.createDom('div', {className: 'alert'}),
-      dom.results = self.createDom('div', {className: 'results'},
-        dom.summary = self.createDom('div', { className: 'summary' }),
-        dom.details = self.createDom('div', { id: 'details' }))
-    );
-  }
-};
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
deleted file mode 100644
index 745e1e0..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/HtmlReporterHelpers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-jasmine.HtmlReporterHelpers = {};
-
-jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
-  var el = document.createElement(type);
-
-  for (var i = 2; i < arguments.length; i++) {
-    var child = arguments[i];
-
-    if (typeof child === 'string') {
-      el.appendChild(document.createTextNode(child));
-    } else {
-      if (child) {
-        el.appendChild(child);
-      }
-    }
-  }
-
-  for (var attr in attrs) {
-    if (attr == "className") {
-      el[attr] = attrs[attr];
-    } else {
-      el.setAttribute(attr, attrs[attr]);
-    }
-  }
-
-  return el;
-};
-
-jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
-  var results = child.results();
-  var status = results.passed() ? 'passed' : 'failed';
-  if (results.skipped) {
-    status = 'skipped';
-  }
-
-  return status;
-};
-
-jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
-  var parentDiv = this.dom.summary;
-  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
-  var parent = child[parentSuite];
-
-  if (parent) {
-    if (typeof this.views.suites[parent.id] == 'undefined') {
-      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
-    }
-    parentDiv = this.views.suites[parent.id].element;
-  }
-
-  parentDiv.appendChild(childElement);
-};
-
-
-jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
-  for(var fn in jasmine.HtmlReporterHelpers) {
-    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
-  }
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
deleted file mode 100644
index 6a6d005..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/ReporterView.js
+++ /dev/null
@@ -1,164 +0,0 @@
-jasmine.HtmlReporter.ReporterView = function(dom) {
-  this.startedAt = new Date();
-  this.runningSpecCount = 0;
-  this.completeSpecCount = 0;
-  this.passedCount = 0;
-  this.failedCount = 0;
-  this.skippedCount = 0;
-
-  this.createResultsMenu = function() {
-    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
-      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
-      ' | ',
-      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
-
-    this.summaryMenuItem.onclick = function() {
-      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
-    };
-
-    this.detailsMenuItem.onclick = function() {
-      showDetails();
-    };
-  };
-
-  this.addSpecs = function(specs, specFilter) {
-    this.totalSpecCount = specs.length;
-
-    this.views = {
-      specs: {},
-      suites: {}
-    };
-
-    for (var i = 0; i < specs.length; i++) {
-      var spec = specs[i];
-      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
-      if (specFilter(spec)) {
-        this.runningSpecCount++;
-      }
-    }
-  };
-
-  this.specComplete = function(spec) {
-    this.completeSpecCount++;
-
-    if (isUndefined(this.views.specs[spec.id])) {
-      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
-    }
-
-    var specView = this.views.specs[spec.id];
-
-    switch (specView.status()) {
-      case 'passed':
-        this.passedCount++;
-        break;
-
-      case 'failed':
-        this.failedCount++;
-        break;
-
-      case 'skipped':
-        this.skippedCount++;
-        break;
-    }
-
-    specView.refresh();
-    this.refresh();
-  };
-
-  this.suiteComplete = function(suite) {
-    var suiteView = this.views.suites[suite.id];
-    if (isUndefined(suiteView)) {
-      return;
-    }
-    suiteView.refresh();
-  };
-
-  this.refresh = function() {
-
-    if (isUndefined(this.resultsMenu)) {
-      this.createResultsMenu();
-    }
-
-    // currently running UI
-    if (isUndefined(this.runningAlert)) {
-      this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"});
-      dom.alert.appendChild(this.runningAlert);
-    }
-    this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
-
-    // skipped specs UI
-    if (isUndefined(this.skippedAlert)) {
-      this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"});
-    }
-
-    this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
-
-    if (this.skippedCount === 1 && isDefined(dom.alert)) {
-      dom.alert.appendChild(this.skippedAlert);
-    }
-
-    // passing specs UI
-    if (isUndefined(this.passedAlert)) {
-      this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"});
-    }
-    this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
-
-    // failing specs UI
-    if (isUndefined(this.failedAlert)) {
-      this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
-    }
-    this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
-
-    if (this.failedCount === 1 && isDefined(dom.alert)) {
-      dom.alert.appendChild(this.failedAlert);
-      dom.alert.appendChild(this.resultsMenu);
-    }
-
-    // summary info
-    this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
-    this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
-  };
-
-  this.complete = function() {
-    dom.alert.removeChild(this.runningAlert);
-
-    this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
-
-    if (this.failedCount === 0) {
-      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
-    } else {
-      showDetails();
-    }
-
-    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
-  };
-
-  return this;
-
-  function showDetails() {
-    if (dom.reporter.className.search(/showDetails/) === -1) {
-      dom.reporter.className += " showDetails";
-    }
-  }
-
-  function isUndefined(obj) {
-    return typeof obj === 'undefined';
-  }
-
-  function isDefined(obj) {
-    return !isUndefined(obj);
-  }
-
-  function specPluralizedFor(count) {
-    var str = count + " spec";
-    if (count > 1) {
-      str += "s"
-    }
-    return str;
-  }
-
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
-
-

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
deleted file mode 100644
index e8a3c23..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SpecView.js
+++ /dev/null
@@ -1,79 +0,0 @@
-jasmine.HtmlReporter.SpecView = function(spec, dom, views) {
-  this.spec = spec;
-  this.dom = dom;
-  this.views = views;
-
-  this.symbol = this.createDom('li', { className: 'pending' });
-  this.dom.symbolSummary.appendChild(this.symbol);
-
-  this.summary = this.createDom('div', { className: 'specSummary' },
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
-        title: this.spec.getFullName()
-      }, this.spec.description)
-  );
-
-  this.detail = this.createDom('div', { className: 'specDetail' },
-      this.createDom('a', {
-        className: 'description',
-        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),
-        title: this.spec.getFullName()
-      }, this.spec.getFullName())
-  );
-};
-
-jasmine.HtmlReporter.SpecView.prototype.status = function() {
-  return this.getSpecStatus(this.spec);
-};
-
-jasmine.HtmlReporter.SpecView.prototype.refresh = function() {
-  this.symbol.className = this.status();
-
-  switch (this.status()) {
-    case 'skipped':
-      break;
-
-    case 'passed':
-      this.appendSummaryToSuiteDiv();
-      break;
-
-    case 'failed':
-      this.appendSummaryToSuiteDiv();
-      this.appendFailureDetail();
-      break;
-  }
-};
-
-jasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {
-  this.summary.className += ' ' + this.status();
-  this.appendToSummary(this.spec, this.summary);
-};
-
-jasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {
-  this.detail.className += ' ' + this.status();
-
-  var resultItems = this.spec.results().getItems();
-  var messagesDiv = this.createDom('div', { className: 'messages' });
-
-  for (var i = 0; i < resultItems.length; i++) {
-    var result = resultItems[i];
-
-    if (result.type == 'log') {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
-    } else if (result.type == 'expect' && result.passed && !result.passed()) {
-      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
-
-      if (result.trace.stack) {
-        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
-      }
-    }
-  }
-
-  if (messagesDiv.childNodes.length > 0) {
-    this.detail.appendChild(messagesDiv);
-    this.dom.details.appendChild(this.detail);
-  }
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d0df1d40/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
----------------------------------------------------------------------
diff --git a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js b/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
deleted file mode 100644
index 19a1efa..0000000
--- a/test/cordova/plugins/org.apache.cordova.device/test/autotest/html/SuiteView.js
+++ /dev/null
@@ -1,22 +0,0 @@
-jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
-  this.suite = suite;
-  this.dom = dom;
-  this.views = views;
-
-  this.element = this.createDom('div', { className: 'suite' },
-      this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description)
-  );
-
-  this.appendToSummary(this.suite, this.element);
-};
-
-jasmine.HtmlReporter.SuiteView.prototype.status = function() {
-  return this.getSpecStatus(this.suite);
-};
-
-jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
-  this.element.className += " " + this.status();
-};
-
-jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);
-