mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Updating the tests a bit, still not running
This commit is contained in:
parent
9a2eb04054
commit
d604e8b9b4
@ -27,7 +27,7 @@
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
|
||||
<uses-sdk android:minSdkVersion="3" />
|
||||
<uses-sdk android:minSdkVersion="7" />
|
||||
|
||||
<instrumentation
|
||||
android:name="android.test.InstrumentationTestRunner"
|
||||
@ -93,7 +93,8 @@
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.SAMPLE_CODE" />
|
||||
</intent-filter>
|
||||
<activity android:name="splashscreen" android:label="@string/app_name"
|
||||
</activity>
|
||||
<activity android:name="splashscreen" android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
</activity>
|
||||
<activity android:name="timeout" android:label="@string/app_name"
|
||||
@ -136,5 +137,4 @@
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
</activity>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="5" />
|
||||
</manifest>
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<com.phonegap.CordovaWebView
|
||||
<org.apache.cordova.CordovaWebView
|
||||
android:id="@+id/phoneGapView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
@ -43,13 +43,6 @@ public class CordovaActivityTest extends ActivityInstrumentationTestCase2<PhoneG
|
||||
String className = innerContainer.getClass().getSimpleName();
|
||||
assertTrue(className.equals("LinearLayoutSoftKeyboardDetect"));
|
||||
}
|
||||
|
||||
public void testForPluginManager() {
|
||||
CordovaWebView v = (CordovaWebView) testView;
|
||||
PluginManager p = v.getPluginManager();
|
||||
assertNotNull(p);
|
||||
String className = p.getClass().getSimpleName();
|
||||
assertTrue(className.equals("PluginManager"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -39,16 +39,4 @@ public class CordovaSplashTest extends ActivityInstrumentationTestCase2<PhoneGap
|
||||
assertTrue(className.equals("CordovaWebView"));
|
||||
}
|
||||
|
||||
public void testForPluginManager() {
|
||||
CordovaWebView v = (CordovaWebView) testView;
|
||||
PluginManager p = v.getPluginManager();
|
||||
assertNotNull(p);
|
||||
String className = p.getClass().getSimpleName();
|
||||
assertTrue(className.equals("PluginManager"));
|
||||
}
|
||||
|
||||
public void testBackButton() {
|
||||
CordovaWebView v = (CordovaWebView) testView;
|
||||
assertFalse(v.checkBackKey());
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ public class GapClientTest extends ActivityInstrumentationTestCase2<PhoneGapView
|
||||
containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
|
||||
innerContainer = (LinearLayout) containerView.getChildAt(0);
|
||||
testView = innerContainer.getChildAt(0);
|
||||
appCode = ((CordovaWebView) testView).getGapClient();
|
||||
|
||||
}
|
||||
|
||||
@ -45,27 +44,5 @@ public class GapClientTest extends ActivityInstrumentationTestCase2<PhoneGapView
|
||||
assertTrue(className.equals("CordovaWebView"));
|
||||
}
|
||||
|
||||
public void testGetResources() {
|
||||
Resources ls = testActivity.getResources();
|
||||
Resources rs = appCode.getResources();
|
||||
assertTrue(ls.equals(rs));
|
||||
}
|
||||
|
||||
public void testGetPackageName() {
|
||||
String ls = testActivity.getPackageName();
|
||||
String rs = appCode.getPackageName();
|
||||
assertTrue(ls.equals(rs));
|
||||
}
|
||||
|
||||
public void testGetAssets() {
|
||||
AssetManager ls = testActivity.getAssets();
|
||||
AssetManager rs = testActivity.getAssets();
|
||||
assertTrue(ls.equals(rs));
|
||||
}
|
||||
|
||||
public void testGetBaseContext() {
|
||||
Context ls = testActivity.getBaseContext();
|
||||
Context rs = testActivity.getBaseContext();
|
||||
assertTrue(ls.equals(rs));
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ public class PhoneGapViewTestActivity extends Activity {
|
||||
setContentView(R.layout.main);
|
||||
|
||||
phoneGap = (CordovaWebView) findViewById(R.id.phoneGapView);
|
||||
phoneGap.init();
|
||||
|
||||
phoneGap.loadUrl("file:///android_asset/index.html");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user