diff --git a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java b/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
index 15bb72a1..89eb195e 100644
--- a/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
+++ b/test/src/org/apache/cordova/test/HtmlNotFoundTest.java
@@ -25,7 +25,7 @@ public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2 {
- public LoadTimeoutTest()
+ private loading testActivity;
+ private FrameLayout containerView;
+ private LinearLayout innerContainer;
+ private CordovaWebView testView;
+ private long TIMEOUT = 1000;
+
+public LoadTimeoutTest()
{
super("org.apache.cordova.test",loading.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 = "http://www.google.com";
+ String url = testView.getUrl();
+ assertNotNull(url);
+ assertFalse(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/SplashscreenTest.java b/test/src/org/apache/cordova/test/SplashscreenTest.java
index 2935991a..9d81c2c6 100644
--- a/test/src/org/apache/cordova/test/SplashscreenTest.java
+++ b/test/src/org/apache/cordova/test/SplashscreenTest.java
@@ -1,12 +1,27 @@
package org.apache.cordova.test;
+import org.apache.cordova.CordovaWebView;
+
+import android.app.Dialog;
import android.test.ActivityInstrumentationTestCase2;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
public class SplashscreenTest extends ActivityInstrumentationTestCase2 {
+ 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);
+ }
}