diff --git a/test/src/org/apache/cordova/test/ErrorUrlTest.java b/test/src/org/apache/cordova/test/ErrorUrlTest.java index f60b272d..59b1742e 100644 --- a/test/src/org/apache/cordova/test/ErrorUrlTest.java +++ b/test/src/org/apache/cordova/test/ErrorUrlTest.java @@ -8,6 +8,7 @@ import android.widget.LinearLayout; public class ErrorUrlTest extends ActivityInstrumentationTestCase2 { + private int TIMEOUT = 1000; errorurl testActivity; private FrameLayout containerView; private LinearLayout innerContainer; @@ -33,9 +34,21 @@ public class ErrorUrlTest extends ActivityInstrumentationTestCase2 { 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"); + } + } + + } diff --git a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java b/test/src/org/apache/cordova/test/HtmlNotFoundTest.java index 4dcf57fd..15bb72a1 100644 --- a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java +++ b/test/src/org/apache/cordova/test/HtmlNotFoundTest.java @@ -8,7 +8,7 @@ import android.widget.LinearLayout; public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2 { - + private int TIMEOUT = 1000; private htmlnotfound testActivity; private FrameLayout containerView; private LinearLayout innerContainer; @@ -27,15 +27,26 @@ public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2