You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/06/15 19:17:41 UTC
[2/4] android commit: This is a poorly written test. What was I
thinking?
This is a poorly written test. What was I thinking?
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/cbd0b7a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/cbd0b7a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/cbd0b7a9
Branch: refs/heads/master
Commit: cbd0b7a94b2ee688a683885784c5fbedf5efdb0a
Parents: f060d09
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Jun 14 15:11:12 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Jun 14 15:23:55 2012 -0700
----------------------------------------------------------------------
.../org/apache/cordova/test/LoadTimeoutTest.java | 50 ---------------
1 files changed, 0 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/cbd0b7a9/test/src/org/apache/cordova/test/LoadTimeoutTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/LoadTimeoutTest.java b/test/src/org/apache/cordova/test/LoadTimeoutTest.java
deleted file mode 100644
index 1978f7e..0000000
--- a/test/src/org/apache/cordova/test/LoadTimeoutTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.cordova.test;
-
-import org.apache.cordova.CordovaWebView;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class LoadTimeoutTest extends ActivityInstrumentationTestCase2<loading> {
- 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");
- }
- }
-}