Fix failing tests caused by Android's whitelist behaviour change
diff --git a/config.xml b/config.xml
index 5fcfe86..922e481 100644
--- a/config.xml
+++ b/config.xml
@@ -38,6 +38,7 @@
     <allow-intent href="mailto:*" />
     <allow-intent href="tel:*" />
     <allow-intent href="www.google.com" />
+    <allow-navigation href="data:*" />
     <platform name="blackberry10">
         <access origin="file:///" />
         <access origin="https://www.apache.org" />
diff --git a/cordova-plugin-mobilespec-tests/AndroidMobileSpecTestPlugin.java b/cordova-plugin-mobilespec-tests/AndroidMobileSpecTestPlugin.java
new file mode 100644
index 0000000..3d7c717
--- /dev/null
+++ b/cordova-plugin-mobilespec-tests/AndroidMobileSpecTestPlugin.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.mobilespec;
+
+import android.net.Uri;
+
+import org.apache.cordova.CordovaPlugin;
+
+public class AndroidMobileSpecTestPlugin extends CordovaPlugin {
+    @Override
+    public Uri remapUri(Uri uri) {
+        if ("stealbridgesecret.test".equals(uri.getHost())) {
+            return Uri.parse("data:text/html,");
+        }
+        return null;
+    }
+}
diff --git a/cordova-plugin-mobilespec-tests/plugin.xml b/cordova-plugin-mobilespec-tests/plugin.xml
index 14723db..bf87049 100644
--- a/cordova-plugin-mobilespec-tests/plugin.xml
+++ b/cordova-plugin-mobilespec-tests/plugin.xml
@@ -46,4 +46,14 @@
 
     <js-module src="tests/input.tests.js" name="input.tests">
     </js-module>
+     
+    <platform name="android">
+        <source-file src="AndroidMobileSpecTestPlugin.java" target-dir="src/org/apache/cordova/mobilespec" />
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="org.apache.cordova.mobilespec.tests" >
+                <param name="android-package" value="org.apache.cordova.mobilespec.AndroidMobileSpecTestPlugin"/>
+                <param name="onload" value="true" />
+            </feature>
+        </config-file>
+    </platform>
 </plugin>
diff --git a/cordova-plugin-mobilespec-tests/tests/bridge.tests.js b/cordova-plugin-mobilespec-tests/tests/bridge.tests.js
index 9bf40f1..954f41e 100644
--- a/cordova-plugin-mobilespec-tests/tests/bridge.tests.js
+++ b/cordova-plugin-mobilespec-tests/tests/bridge.tests.js
@@ -20,20 +20,27 @@
  */
 exports.defineAutoTests = function () {
     describe('Bridge', function (done) {
+        var frame;
+        afterEach(function () {
+            if (frame) {
+                document.body.removeChild(frame);
+            }
+        });
         it("bridge.spec.1 should reject bridge from iframe with data: URL", function (done) {
             if (cordova.platformId != 'android') {
                 pending();
+                return;
             }
-            var ifr = document.createElement('iframe');
+            frame = document.createElement('iframe');
 
-            ifr.src = 'data:text/html,';
-            ifr.onload = function () {
-                var stolenSecret = ifr.contentWindow.prompt('', 'gap_init:');
+            // Gets intercepted in native.
+            frame.src = 'http://stealbridgesecret.test/';
+            frame.onload = function () {
+                var stolenSecret = frame.contentWindow.prompt('', 'gap_init:');
                 expect(!!stolenSecret).toBe(false);
                 done();
             };
-            document.body.appendChild(ifr);
+            document.body.appendChild(frame);
         });
-
     });
 }
diff --git a/cordova-plugin-mobilespec-tests/tests/datauri.tests.js b/cordova-plugin-mobilespec-tests/tests/datauri.tests.js
index bda89c8..109e97d 100644
--- a/cordova-plugin-mobilespec-tests/tests/datauri.tests.js
+++ b/cordova-plugin-mobilespec-tests/tests/datauri.tests.js
@@ -22,31 +22,20 @@
     var isWindows = (cordova.platformId === "windows") || (cordova.platformId === "windows8");
 
     describe('data uris', function () {
-        var gotFoo = false,
-            onMessageBind,
-            originalTimeout;
+        var frame;
+        var onMessageBind;
 
-        function onMessage (done, msg) {
-            gotFoo = gotFoo || msg.data == 'foo';
-            if (gotFoo) {
-                expect(gotFoo).toBe(true);
-                if (typeof(done) === 'function') {
-                    done();
-                }
+        function onMessage(done, msg) {
+            if (msg.data == 'foo') {
+                done();
             }
-        };
-
-        beforeEach(function () {
-            originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
-            jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
-        });
+        }
 
         afterEach(function () {
-            if (this.frame) {
-                document.body.removeChild(this.frame);
+            if (frame) {
+                document.body.removeChild(frame);
                 window.removeEventListener('message', onMessageBind, false);
             }
-            jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
         });
 
         it("datauri.spec.1 should work with iframes", function (done) {
@@ -58,13 +47,12 @@
                 pending();
             }
 
-            this.frame = document.createElement('iframe');
-
+            frame = document.createElement('iframe');
             onMessageBind = onMessage.bind(null, done);
             window.addEventListener('message', onMessageBind, false);
-            this.frame.src = 'data:text/html;charset=utf-8,%3Chtml%3E%3Cscript%3Eparent.postMessage%28%27foo%27%2C%27%2A%27%29%3C%2Fscript%3E%3C%2Fhtml%3E';
-            document.body.appendChild(this.frame);
-        }, 'iframe did not load.');
+            frame.src = 'data:text/html;charset=utf-8,%3Chtml%3E%3Cscript%3Eparent.postMessage%28%27foo%27%2C%27%2A%27%29%3C%2Fscript%3E%3C%2Fhtml%3E';
+            document.body.appendChild(frame);
+        }, 1000);
     });
 
     describe('data uris', function () {
diff --git a/cordova-plugin-mobilespec-tests/tests/whitelist.tests.js b/cordova-plugin-mobilespec-tests/tests/whitelist.tests.js
index 0440a08..4c7a4e4 100644
--- a/cordova-plugin-mobilespec-tests/tests/whitelist.tests.js
+++ b/cordova-plugin-mobilespec-tests/tests/whitelist.tests.js
@@ -200,7 +200,7 @@
             itShouldReject('http://www.apache.org:pass@evil.com/');
             itShouldReject('http://www.apache.org.evil.com/');
             itShouldAccept('file:///foo');
-            itShouldAccept('content:///foo');
+            itShouldReject('content:///foo');
         });
     });
 }