cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [3/4] android commit: updating existing test code
Date Fri, 15 May 2015 21:13:31 GMT
updating existing test code


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

Branch: refs/heads/master
Commit: b5a58e6ca09bc4470a4e120dbec1a0b708337224
Parents: 44aa746
Author: Joe Bowser <bowserj@apache.org>
Authored: Wed May 13 11:55:44 2015 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Fri May 15 14:13:18 2015 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaPreferences.java      | 7 -------
 .../androidTest/src/org/apache/cordova/test/ErrorUrlTest.java | 2 +-
 .../src/org/apache/cordova/test/HtmlNotFoundTest.java         | 3 +--
 test/src/org/apache/cordova/test/MainTestActivity.java        | 2 +-
 4 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b5a58e6c/framework/src/org/apache/cordova/CordovaPreferences.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaPreferences.java b/framework/src/org/apache/cordova/CordovaPreferences.java
index b4f6b81..4dbc93e 100644
--- a/framework/src/org/apache/cordova/CordovaPreferences.java
+++ b/framework/src/org/apache/cordova/CordovaPreferences.java
@@ -61,13 +61,6 @@ public class CordovaPreferences {
         String value = prefs.get(name);
         if (value != null) {
             return Boolean.parseBoolean(value);
-        } else if (preferencesBundleExtras != null) {
-            Object bundleValue = preferencesBundleExtras.get(name);
-            if (bundleValue instanceof String) {
-                return "true".equals(bundleValue);
-            }
-            // Gives a nice warning if type is wrong.
-            return preferencesBundleExtras.getBoolean(name, defaultValue);
         }
         return defaultValue;
     }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b5a58e6c/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java
----------------------------------------------------------------------
diff --git a/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java b/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java
index 042ef8c..d880f63 100644
--- a/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java
+++ b/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java
@@ -24,7 +24,7 @@ package org.apache.cordova.test;
 public class ErrorUrlTest extends BaseCordovaIntegrationTest {
     private static final String START_URL = "file:///android_asset/www/htmlnotfound/index.html";
     private static final String ERROR_URL = "file:///android_asset/www/htmlnotfound/error.html";
-    private static final String INVALID_URL = "file:///android_asset/www/index.html";
+    private static final String INVALID_URL = "file:///android_asset/www/invalid.html";
 
     protected void setUp() throws Exception {
         super.setUp();

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b5a58e6c/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java
----------------------------------------------------------------------
diff --git a/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java b/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java
index 36fc3bd..235e0af 100644
--- a/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java
+++ b/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java
@@ -31,10 +31,9 @@ public class HtmlNotFoundTest extends BaseCordovaIntegrationTest {
   public void testUrl() throws Throwable
   {
       assertEquals(START_URL, testActivity.onPageFinishedUrl.take());
-      // TODO: Should this be null? Or some other way to indicate it didn't actually load?
       runTestOnUiThread(new Runnable() {
           public void run() {
-              assertEquals(START_URL, testActivity.getCordovaWebView().getUrl());
+              assertFalse(START_URL.equals(testActivity.getCordovaWebView().getUrl()));
           }
       });
   }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b5a58e6c/test/src/org/apache/cordova/test/MainTestActivity.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/MainTestActivity.java b/test/src/org/apache/cordova/test/MainTestActivity.java
index fc5d997..76697c3 100644
--- a/test/src/org/apache/cordova/test/MainTestActivity.java
+++ b/test/src/org/apache/cordova/test/MainTestActivity.java
@@ -36,7 +36,7 @@ public class MainTestActivity extends BaseTestCordovaActivity {
 
     @Override protected void loadConfig() {
         super.loadConfig();
-        // Need to set this explicitly in prefs since it's not settable via bundle extras
(for security reasons).
+        // Need to set this explicitly in prefs since it's not settable via bundle extras.
         String errorUrl = getIntent().getStringExtra("testErrorUrl");
         if (errorUrl != null) {
             preferences.set("errorUrl", errorUrl);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message