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/04/04 22:38:53 UTC
[1/16] android commit: Tweaking the tests so that they merge
Updated Branches:
refs/heads/CordovaWebView 2818e05e7 -> 527f17d19
Tweaking the tests so that they merge
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/527f17d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/527f17d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/527f17d1
Branch: refs/heads/CordovaWebView
Commit: 527f17d19eeaff64b9d592230d326dd1ccb867a8
Parents: 2818e05 04aa6d3
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Apr 4 13:38:35 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Apr 4 13:38:35 2012 -0700
----------------------------------------------------------------------
framework/assets/js/cordova.android.js | 3676 ++++++------
framework/res/xml/plugins.xml | 2 +-
framework/src/com/phonegap/api/PluginManager.java | 1 +
.../src/org/apache/cordova/CameraLauncher.java | 3 +-
.../src/org/apache/cordova/ContactAccessor.java | 3 +-
.../org/apache/cordova/CordovaChromeClient.java | 3 +
.../org/apache/cordova/CordovaWebViewClient.java | 3 +
framework/src/org/apache/cordova/FileUtils.java | 20 +-
test/.classpath | 2 +-
test/.project | 1 -
test/AndroidManifest.xml | 68 +-
test/README.md | 23 +
test/ant.properties | 17 +
test/assets/www/backbuttonmultipage/index.html | 23 +
test/assets/www/backbuttonmultipage/sample2.html | 23 +
test/assets/www/backbuttonmultipage/sample3.html | 26 +
test/assets/www/background/index.html | 99 +
test/assets/www/background/index2.html | 98 +
test/assets/www/cordova-1.6.0rc1.js | 4897 +++++++++++++++
test/assets/www/cordova.js | 2 +
test/assets/www/htmlnotfound/error.html | 1 +
test/assets/www/iframe/index.html | 33 +
test/assets/www/iframe/index2.html | 24 +
test/assets/www/index.html | 47 +
test/assets/www/jqmtabbackbutton/index.html | 49 +
test/assets/www/jqmtabbackbutton/tab1.html | 29 +
test/assets/www/jqmtabbackbutton/tab2.html | 30 +
test/assets/www/jqmtabbackbutton/tab3.html | 30 +
test/assets/www/lifecycle/index.html | 108 +
test/assets/www/lifecycle/index2.html | 104 +
test/assets/www/main.js | 150 +
test/assets/www/master.css | 117 +
test/assets/www/menus/index.html | 29 +
test/assets/www/splashscreen/index.html | 22 +
test/assets/www/userwebview/index.html | 49 +
test/assets/www/whitelist/index.html | 29 +
test/assets/www/whitelist/index2.html | 23 +
test/assets/www/xhr/index.html | 48 +
test/build.xml | 85 +
test/libs/cordova-1.6.0rc1.jar | Bin 0 -> 170594 bytes
test/project.properties | 2 +-
test/res/drawable-hdpi/ic_launcher.png | Bin 4147 -> 0 bytes
test/res/drawable-ldpi/ic_launcher.png | Bin 1723 -> 0 bytes
test/res/drawable-mdpi/ic_launcher.png | Bin 2574 -> 0 bytes
test/res/drawable/icon.png | Bin 0 -> 5800 bytes
test/res/drawable/sandy.jpg | Bin 0 -> 48450 bytes
test/res/layout/main.xml | 2 +-
test/res/values/strings.xml | 7 +-
test/res/xml/cordova.xml | 5 +
test/res/xml/plugins.xml | 33 +-
.../org/apache/cordova/test/ActivityPlugin.java | 81 +
test/src/org/apache/cordova/test/FixWebView.java | 43 +
.../apache/cordova/test/backbuttonmultipage.java | 30 +
test/src/org/apache/cordova/test/background.java | 34 +
test/src/org/apache/cordova/test/errorurl.java | 32 +
test/src/org/apache/cordova/test/htmlnotfound.java | 31 +
test/src/org/apache/cordova/test/iframe.java | 30 +
.../org/apache/cordova/test/jqmtabbackbutton.java | 30 +
test/src/org/apache/cordova/test/lifecycle.java | 30 +
test/src/org/apache/cordova/test/loading.java | 31 +
test/src/org/apache/cordova/test/menus.java | 80 +
test/src/org/apache/cordova/test/splashscreen.java | 35 +
test/src/org/apache/cordova/test/tests.java | 32 +
test/src/org/apache/cordova/test/timeout.java | 34 +
test/src/org/apache/cordova/test/userwebview.java | 72 +
test/src/org/apache/cordova/test/whitelist.java | 51 +
test/src/org/apache/cordova/test/xhr.java | 30 +
67 files changed, 8884 insertions(+), 1868 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/framework/src/org/apache/cordova/CordovaChromeClient.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/.classpath
----------------------------------------------------------------------
diff --cc test/.classpath
index ab56494,8fb3e5f..0431525
mode 100644,100755..100644
--- a/test/.classpath
+++ b/test/.classpath
@@@ -4,14 -4,6 +4,14 @@@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="lib" path="libs/android_library.jar"/>
+ <classpathentry kind="lib" path="libs/android_webdriver_library.jar"/>
+ <classpathentry kind="lib" path="libs/android.jar"/>
+ <classpathentry kind="lib" path="libs/base.jar"/>
+ <classpathentry kind="lib" path="libs/commons-codec-1.3.jar"/>
+ <classpathentry kind="lib" path="libs/guava-10.0.1.jar"/>
+ <classpathentry kind="lib" path="libs/junit-4.10.jar"/>
+ <classpathentry kind="lib" path="libs/logging.jar"/>
- <classpathentry kind="lib" path="libs/cordova-1.4.1.jar"/>
+ <classpathentry kind="lib" path="libs/cordova-1.6.0rc1.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/.project
----------------------------------------------------------------------
diff --cc test/.project
index 24e3c94,d31f9d7..d31f9d7
mode 100644,100755..100644
--- a/test/.project
+++ b/test/.project
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/AndroidManifest.xml
----------------------------------------------------------------------
diff --cc test/AndroidManifest.xml
index 87da52f,b92fc01..d3072fe
mode 100644,100755..100644
--- a/test/AndroidManifest.xml
+++ b/test/AndroidManifest.xml
@@@ -1,17 -1,16 +1,15 @@@
<?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.apache.cordova.test"
- android:versionCode="1"
- android:versionName="1.0" >
-
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+ package="org.apache.cordova.test" android:versionName="1.1" android:versionCode="5">
<supports-screens
- android:largeScreens="true"
- android:normalScreens="true"
- android:smallScreens="true"
- android:xlargeScreens="true"
- android:resizeable="true"
- android:anyDensity="true"
- />
+ android:largeScreens="true"
+ android:normalScreens="true"
+ android:smallScreens="true"
++ android:xlargeScreens="true"
+ android:resizeable="true"
+ android:anyDensity="true"
+ />
- <uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@@@ -28,71 -26,62 +26,115 @@@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
- <uses-feature android:name="android.hardware.camera" />
- <uses-feature android:name="android.hardware.camera.autofocus" />
-
-
++
+ <uses-sdk android:minSdkVersion="3" />
- <uses-feature android:name="android.hardware.camera" />
- <uses-feature android:name="android.hardware.camera.autofocus" />
+ <instrumentation
+ android:name="android.test.InstrumentationTestRunner"
+ android:targetPackage="org.apache.cordova.test" />
- <application android:icon="@drawable/icon" android:label="@string/app_name"
- android:debuggable="true">
- <activity android:name="tests" android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- <activity android:name="splashscreen" android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden">
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name" >
+ <uses-library android:name="android.test.runner" />
+ <activity
+ android:windowSoftInputMode="adjustPan"
+ android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden"
+ android:name=".PhoneGapViewTestActivity" >
+ <intent-filter >
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
++ <activity android:name="tests" android:label="@string/app_name"
++ android:configChanges="orientation|keyboardHidden">
++ <intent-filter>
++ <action android:name="android.intent.action.MAIN" />
++ <category android:name="android.intent.category.SAMPLE_CODE" />
++ </intent-filter>
++ </activity>
+ <activity
+ android:windowSoftInputMode="adjustPan"
+ android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden"
+ android:name=".JailActivity" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:windowSoftInputMode="adjustPan"
+ android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden"
+ android:name=".CordovaDriverAction" >
+ <intent-filter >
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:windowSoftInputMode="adjustPan"
+ android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden"
+ android:name="org.apache.cordova.test.PhoneGapSplash" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:windowSoftInputMode="adjustPan"
+ android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden"
+ android:name="org.apache.cordova.test.PhoneGapActivity" >
+ <intent-filter>
+ <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"
++ android:configChanges="orientation|keyboardHidden">
</activity>
- </application>
-
- </manifest>
+ <activity android:name="timeout" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="htmlnotfound" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="errorurl" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="userwebview" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="menus" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="loading" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="lifecycle" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="jqmtabbackbutton" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="backbuttonmultipage" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="whitelist" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="background" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="iframe" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ <activity android:name="xhr" android:label="@string/app_name"
+ android:configChanges="orientation|keyboardHidden">
+ </activity>
+ </application>
-
- <uses-sdk android:minSdkVersion="5" />
++ <uses-sdk android:minSdkVersion="5" />
+ </manifest>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/project.properties
----------------------------------------------------------------------
diff --cc test/project.properties
index 730e911,4bcb2f5..4bcb2f5
mode 100644,100755..100644
--- a/test/project.properties
+++ b/test/project.properties
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/drawable-hdpi/ic_launcher.png
----------------------------------------------------------------------
diff --cc test/res/drawable-hdpi/ic_launcher.png
index 8074c4c,8074c4c..0000000
deleted file mode 100644,100755
Binary files differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/drawable-ldpi/ic_launcher.png
----------------------------------------------------------------------
diff --cc test/res/drawable-ldpi/ic_launcher.png
index 1095584,1095584..0000000
deleted file mode 100644,100755
Binary files differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/drawable-mdpi/ic_launcher.png
----------------------------------------------------------------------
diff --cc test/res/drawable-mdpi/ic_launcher.png
index a07c69f,a07c69f..0000000
deleted file mode 100644,100755
Binary files differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/layout/main.xml
----------------------------------------------------------------------
diff --cc test/res/layout/main.xml
index 2b020ba,d3063e0..f9c4fef
mode 100644,100755..100644
--- a/test/res/layout/main.xml
+++ b/test/res/layout/main.xml
@@@ -1,13 -1,13 +1,13 @@@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- >
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Hello World, tests"
- />
-</LinearLayout>
+ android:orientation="vertical" >
+
+ <com.phonegap.CordovaWebView
+ android:id="@+id/phoneGapView"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+
- </LinearLayout>
++</LinearLayout>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/values/strings.xml
----------------------------------------------------------------------
diff --cc test/res/values/strings.xml
index 27c3286,010e98e..9e13e36
mode 100644,100755..100644
--- a/test/res/values/strings.xml
+++ b/test/res/values/strings.xml
@@@ -1,7 -1,4 +1,4 @@@
<?xml version="1.0" encoding="utf-8"?>
<resources>
-
- <string name="hello">Hello World!</string>
- <string name="app_name">CordovaTestTest</string>
-
- </resources>
- <string name="app_name">CordovaTests</string>
++ <string name="app_name">CordovaTests</string>
+ </resources>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/527f17d1/test/res/xml/plugins.xml
----------------------------------------------------------------------
diff --cc test/res/xml/plugins.xml
index 4d84f59,8829164..8829164
mode 100644,100755..100644
--- a/test/res/xml/plugins.xml
+++ b/test/res/xml/plugins.xml