cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [04/11] CB-5302: Massive movement to get tests working again
Date Wed, 06 Nov 2013 23:06:39 GMT
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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 6d4a7ac..0000000
--- a/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
+++ /dev/null
@@ -1,158 +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.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;
-  
-
-  public BackButtonMultiPageTest() {
-    super("org.apache.cordova.test", backbuttonmultipage.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 testViaHref() {
-      testView.sendJavascript("window.location = 'sample2.html';");
-      sleep();
-      String url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      testView.sendJavascript("window.location = 'sample3.html';");
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample3.html"));
-      boolean didGoBack = testView.backHistory();
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      assertTrue(didGoBack);
-      didGoBack = testView.backHistory();
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("index.html"));
-      assertTrue(didGoBack);
-  }
-  
-  public void testViaLoadUrl() {
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-      sleep();
-      String url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample3.html"));
-      boolean didGoBack = testView.backHistory();
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      assertTrue(didGoBack);
-      didGoBack = testView.backHistory();
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("index.html"));
-      assertTrue(didGoBack);
-  }
-
-  public void testViaBackButtonOnView() {
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-      sleep();
-      String url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-      sleep();
-      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();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      viewConnection.sendKeyEvent(backDown);
-      viewConnection.sendKeyEvent(backUp);
-      sleep();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("index.html"));
-  }
-  
-  public void testViaBackButtonOnLayout() {
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
-      sleep();
-      String url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
-      sleep();
-      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();
-      url = testView.getUrl();
-      assertTrue(url.endsWith("sample2.html"));
-      viewConnection.sendKeyEvent(backDown);
-      viewConnection.sendKeyEvent(backUp);
-      sleep();
-      url = testView.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-android/blob/94fb79c1/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-android/blob/94fb79c1/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 a100f0a..0000000
--- a/test/src/org/apache/cordova/test/CordovaActivityTest.java
+++ /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.
-*/
-
-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()
-    {
-        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-android/blob/94fb79c1/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..0559f5f
--- /dev/null
+++ b/test/src/org/apache/cordova/test/CordovaDriverAction.java
@@ -0,0 +1,78 @@
+/*
+       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 android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+
+
+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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94fb79c1/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 5aad912..0000000
--- a/test/src/org/apache/cordova/test/CordovaResourceApiTest.java
+++ /dev/null
@@ -1,280 +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-android/blob/94fb79c1/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-android/blob/94fb79c1/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..7ac2c3c
--- /dev/null
+++ b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java
@@ -0,0 +1,103 @@
+/*
+       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 android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+
+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();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94fb79c1/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 5a7eb9c..0000000
--- a/test/src/org/apache/cordova/test/ErrorUrlTest.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.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;
-  
-  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()
-  {
-    sleep();
-    String good_url = "file:///android_asset/www/htmlnotfound/error.html";
-    String url = testView.getUrl();
-    assertNotNull(url);
-    assertTrue(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-android/blob/94fb79c1/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 46f155b..0000000
--- a/test/src/org/apache/cordova/test/FixWebView.java
+++ /dev/null
@@ -1,43 +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 android.content.Context;
-import android.webkit.WebView;
-
-public class FixWebView extends WebView {
-
-    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-android/blob/94fb79c1/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-android/blob/94fb79c1/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 e47d5b8..0000000
--- a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
+++ /dev/null
@@ -1,74 +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;
-
-  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);
-  }
-
-  public void testPreconditions(){
-    assertNotNull(innerContainer);
-    assertNotNull(testView);
-  }
-
-  public void testUrl()
-  {
-      sleep();
-      String good_url = "file:///android_asset/www/htmlnotfound/error.html";
-      String url = testView.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-android/blob/94fb79c1/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 7cb8798..0000000
--- a/test/src/org/apache/cordova/test/IFrameTest.java
+++ /dev/null
@@ -1,92 +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 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);
-      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 = testView.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 = testView.getUrl();
-        testView.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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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-android/blob/94fb79c1/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");
-      }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94fb79c1/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);
-  }
-}


Mime
View raw message