From 4358a0473094963b83335c683b43d7094aca6c44 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Tue, 10 Feb 2015 20:12:38 -0500 Subject: [PATCH] Big Refactor of integration tests: use locks rather than timeouts, deleted disabled tests, Use same activity for most tests --- test/AndroidManifest.xml | 182 ------------ test/README.md | 4 +- .../cordova/test/BackButtonMultiPageTest.java | 194 ++++++++++++ .../test/BaseCordovaIntegrationTest.java | 55 ++++ .../cordova/test/CordovaActivityTest.java} | 30 +- .../cordova/test/CordovaResourceApiTest.java | 258 ++++++++++++++++ ...plashscreenTest.java => ErrorUrlTest.java} | 41 ++- .../XhrTest.java => HtmlNotFoundTest.java} | 23 +- .../cordova/test/{junit => }/IFrameTest.java | 53 +--- .../cordova/test/InflateLayoutTest.java | 56 ++++ .../test/junit/BackButtonMultiPageTest.java | 278 ----------------- .../test/junit/CordovaActivityTest.java | 79 ----- .../test/junit/CordovaResourceApiTest.java | 281 ------------------ .../cordova/test/junit/CordovaTest.java | 116 -------- .../cordova/test/junit/ErrorUrlTest.java | 82 ----- .../apache/cordova/test/junit/FixWebView.java | 43 --- .../cordova/test/junit/HtmlNotFoundTest.java | 80 ----- .../test/junit/IntentUriOverrideTest.java | 94 ------ .../cordova/test/junit/LifecycleTest.java | 34 --- .../cordova/test/junit/PluginManagerTest.java | 70 ----- test/assets/www/error.html | 8 - test/assets/www/index.html | 36 ++- test/assets/www/main.js | 133 --------- test/assets/www/splashscreen/index.html | 38 --- test/res/drawable/sandy.jpg | Bin 48450 -> 0 bytes test/res/xml/config.xml | 3 - .../apache/cordova/pluginApi/pluginStub.java | 39 --- .../apache/cordova/test/ActivityPlugin.java | 60 ++-- ...reen.java => BaseTestCordovaActivity.java} | 29 +- .../cordova/test/CordovaDriverAction.java | 78 ----- .../test/CordovaWebViewTestActivity.java | 87 ++---- .../apache/cordova/test/MainTestActivity.java | 24 +- .../cordova/test/SabotagedActivity.java | 92 ------ .../cordova/test/backbuttonmultipage.java | 30 -- .../org/apache/cordova/test/background.java | 33 -- .../src/org/apache/cordova/test/errorurl.java | 33 -- .../org/apache/cordova/test/htmlnotfound.java | 31 -- test/src/org/apache/cordova/test/iframe.java | 30 -- .../cordova/test/junit/GapClientTest.java | 66 ---- .../org/apache/cordova/test/lifecycle.java | 30 -- test/src/org/apache/cordova/test/loading.java | 31 -- test/src/org/apache/cordova/test/menus.java | 2 +- .../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 --- .../org/apache/cordova/test/whitelist.java | 51 ---- test/src/org/apache/cordova/test/xhr.java | 30 -- 47 files changed, 743 insertions(+), 2405 deletions(-) create mode 100644 test/androidTest/src/org/apache/cordova/test/BackButtonMultiPageTest.java create mode 100644 test/androidTest/src/org/apache/cordova/test/BaseCordovaIntegrationTest.java rename test/{src/org/apache/cordova/test/backgroundcolor.java => androidTest/src/org/apache/cordova/test/CordovaActivityTest.java} (52%) mode change 100755 => 100644 create mode 100644 test/androidTest/src/org/apache/cordova/test/CordovaResourceApiTest.java rename test/androidTest/src/org/apache/cordova/test/{junit/SplashscreenTest.java => ErrorUrlTest.java} (50%) rename test/androidTest/src/org/apache/cordova/test/{junit/XhrTest.java => HtmlNotFoundTest.java} (55%) rename test/androidTest/src/org/apache/cordova/test/{junit => }/IFrameTest.java (61%) create mode 100644 test/androidTest/src/org/apache/cordova/test/InflateLayoutTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/CordovaActivityTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/CordovaTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/ErrorUrlTest.java delete mode 100755 test/androidTest/src/org/apache/cordova/test/junit/FixWebView.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/IntentUriOverrideTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/LifecycleTest.java delete mode 100644 test/androidTest/src/org/apache/cordova/test/junit/PluginManagerTest.java delete mode 100644 test/assets/www/error.html delete mode 100755 test/assets/www/splashscreen/index.html delete mode 100755 test/res/drawable/sandy.jpg delete mode 100644 test/src/org/apache/cordova/pluginApi/pluginStub.java rename test/src/org/apache/cordova/test/{fullscreen.java => BaseTestCordovaActivity.java} (60%) mode change 100755 => 100644 delete mode 100644 test/src/org/apache/cordova/test/CordovaDriverAction.java delete mode 100644 test/src/org/apache/cordova/test/SabotagedActivity.java delete mode 100755 test/src/org/apache/cordova/test/backbuttonmultipage.java delete mode 100755 test/src/org/apache/cordova/test/background.java delete mode 100755 test/src/org/apache/cordova/test/errorurl.java delete mode 100755 test/src/org/apache/cordova/test/htmlnotfound.java delete mode 100755 test/src/org/apache/cordova/test/iframe.java delete mode 100644 test/src/org/apache/cordova/test/junit/GapClientTest.java delete mode 100755 test/src/org/apache/cordova/test/lifecycle.java delete mode 100755 test/src/org/apache/cordova/test/loading.java delete mode 100755 test/src/org/apache/cordova/test/splashscreen.java delete mode 100755 test/src/org/apache/cordova/test/tests.java delete mode 100755 test/src/org/apache/cordova/test/timeout.java delete mode 100755 test/src/org/apache/cordova/test/whitelist.java delete mode 100755 test/src/org/apache/cordova/test/xhr.java diff --git a/test/AndroidManifest.xml b/test/AndroidManifest.xml index e058a420..7ceaf2e8 100755 --- a/test/AndroidManifest.xml +++ b/test/AndroidManifest.xml @@ -65,205 +65,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/README.md b/test/README.md index 700cee25..24b10c1f 100755 --- a/test/README.md +++ b/test/README.md @@ -45,9 +45,9 @@ Copy it from a freshly created project: Robotium has to be installed for the onScrollChanged tests to work correctly. It can be found at https://code.google.com/p/robotium/ and the jar should be put in the -'androidTests/libs' directory'. +'androidTest/libs' directory'. - mkdir -p androidTests/libs && curl 'http://dl.bintray.com/robotium/generic/robotium-solo-5.2.1.jar' > androidTests/libs/robotium-solo-5.2.1.jar + mkdir -p androidTest/libs && curl 'http://dl.bintray.com/robotium/generic/robotium-solo-5.2.1.jar' > androidTest/libs/robotium-solo-5.2.1.jar ## Running diff --git a/test/androidTest/src/org/apache/cordova/test/BackButtonMultiPageTest.java b/test/androidTest/src/org/apache/cordova/test/BackButtonMultiPageTest.java new file mode 100644 index 00000000..7dddec6c --- /dev/null +++ b/test/androidTest/src/org/apache/cordova/test/BackButtonMultiPageTest.java @@ -0,0 +1,194 @@ +package org.apache.cordova.test; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + + +import android.view.KeyEvent; +import android.view.inputmethod.BaseInputConnection; + +public class BackButtonMultiPageTest extends BaseCordovaIntegrationTest { + private static final String START_URL = "file:///android_asset/www/backbuttonmultipage/index.html"; + + @Override + public void setUp() throws Exception { + super.setUp(); + setUpWithStartUrl(START_URL); + } + + public void testViaHref() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + cordovaWebView.sendJavascript("window.location = 'sample2.html';"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + cordovaWebView.sendJavascript("window.location = 'sample3.html';"); } + }); + + assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertTrue(cordovaWebView.backHistory()); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertTrue(cordovaWebView.backHistory()); + } + }); + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertFalse(cordovaWebView.backHistory()); + } + }); + } + + public void testViaLoadUrl() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertTrue(cordovaWebView.backHistory()); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertTrue(cordovaWebView.backHistory()); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/index.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + assertFalse(cordovaWebView.backHistory()); + } + }); + } + + public void testViaBackButtonOnView() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + String url = cordovaWebView.getUrl(); + assertTrue(url.endsWith("sample3.html")); + BaseInputConnection viewConnection = new BaseInputConnection(cordovaWebView.getView(), true); + KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); + KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); + viewConnection.sendKeyEvent(backDown); + viewConnection.sendKeyEvent(backUp); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() + { + String url = cordovaWebView.getUrl(); + assertTrue(url.endsWith("sample2.html")); + BaseInputConnection viewConnection = new BaseInputConnection(cordovaWebView.getView(), true); + KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); + KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); + viewConnection.sendKeyEvent(backDown); + viewConnection.sendKeyEvent(backUp); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/index.html", testActivity.onPageFinishedUrl.take()); + } + + public void testViaBackButtonOnLayout() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + cordovaWebView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + String url = cordovaWebView.getUrl(); + assertTrue(url.endsWith("sample3.html")); + BaseInputConnection viewConnection = new BaseInputConnection(containerView, true); + KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); + KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); + viewConnection.sendKeyEvent(backDown); + viewConnection.sendKeyEvent(backUp); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + String url = cordovaWebView.getUrl(); + assertTrue(url.endsWith("sample2.html")); + BaseInputConnection viewConnection = new BaseInputConnection(containerView, true); + KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); + KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); + viewConnection.sendKeyEvent(backDown); + viewConnection.sendKeyEvent(backUp); + } + }); + assertEquals("file:///android_asset/www/backbuttonmultipage/index.html", testActivity.onPageFinishedUrl.take()); + } +} + diff --git a/test/androidTest/src/org/apache/cordova/test/BaseCordovaIntegrationTest.java b/test/androidTest/src/org/apache/cordova/test/BaseCordovaIntegrationTest.java new file mode 100644 index 00000000..ff769304 --- /dev/null +++ b/test/androidTest/src/org/apache/cordova/test/BaseCordovaIntegrationTest.java @@ -0,0 +1,55 @@ +package org.apache.cordova.test; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + + +import android.content.Intent; +import android.test.ActivityInstrumentationTestCase2; +import android.widget.FrameLayout; + +import org.apache.cordova.CordovaWebView; + +public class BaseCordovaIntegrationTest extends ActivityInstrumentationTestCase2 { + protected MainTestActivity testActivity; + protected FrameLayout containerView; + protected CordovaWebView cordovaWebView; + + + public BaseCordovaIntegrationTest() { + super(MainTestActivity.class); + } + + protected void setUpWithStartUrl(String url) { + setUpWithStartUrl(url, null, null); + } + protected void setUpWithStartUrl(String url, String prefKey, String prefValue) { + Intent intent = new Intent(getInstrumentation().getContext(), MainTestActivity.class); + intent.putExtra("testStartUrl", url); + if (prefKey != null) { + intent.putExtra(prefKey, prefValue); + } + setActivityIntent(intent); + testActivity = getActivity(); + containerView = (FrameLayout) testActivity.findViewById(android.R.id.content); + cordovaWebView = testActivity.getCordovaWebView(); + } +} + diff --git a/test/src/org/apache/cordova/test/backgroundcolor.java b/test/androidTest/src/org/apache/cordova/test/CordovaActivityTest.java old mode 100755 new mode 100644 similarity index 52% rename from test/src/org/apache/cordova/test/backgroundcolor.java rename to test/androidTest/src/org/apache/cordova/test/CordovaActivityTest.java index 30e297f1..5fb38479 --- a/test/src/org/apache/cordova/test/backgroundcolor.java +++ b/test/androidTest/src/org/apache/cordova/test/CordovaActivityTest.java @@ -16,22 +16,30 @@ specific language governing permissions and limitations under the License. */ + package org.apache.cordova.test; -import android.graphics.Color; -import android.os.Bundle; -import org.apache.cordova.*; +import android.view.View; +import android.view.ViewGroup; +import android.widget.LinearLayout; -public class backgroundcolor extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); +import org.apache.cordova.AndroidWebView; - // backgroundColor can also be set in cordova.xml, but you must use the number equivalent of the color. For example, Color.RED is - // - preferences.set("backgroundColor", Color.GREEN); +public class CordovaActivityTest extends BaseCordovaIntegrationTest { + private ViewGroup innerContainer; + private View testView; - super.loadUrl("file:///android_asset/www/backgroundcolor/index.html"); + protected void setUp() throws Exception { + super.setUp(); + setUpWithStartUrl(null); + innerContainer = (ViewGroup)containerView.getChildAt(0); + testView = innerContainer.getChildAt(0); } + public void testBasicLoad() throws Exception { + assertTrue(testView instanceof AndroidWebView); + assertTrue(innerContainer instanceof LinearLayout); + String onPageFinishedUrl = testActivity.onPageFinishedUrl.take(); + assertEquals(MainTestActivity.START_URL, onPageFinishedUrl); + } } diff --git a/test/androidTest/src/org/apache/cordova/test/CordovaResourceApiTest.java b/test/androidTest/src/org/apache/cordova/test/CordovaResourceApiTest.java new file mode 100644 index 00000000..73aa066f --- /dev/null +++ b/test/androidTest/src/org/apache/cordova/test/CordovaResourceApiTest.java @@ -0,0 +1,258 @@ + +package org.apache.cordova.test; + +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.net.Uri; +import android.os.Environment; +import android.provider.MediaStore; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaResourceApi; +import org.apache.cordova.CordovaResourceApi.OpenForReadResult; +import org.apache.cordova.PluginEntry; +import org.json.JSONArray; +import org.json.JSONException; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Scanner; + +public class CordovaResourceApiTest extends BaseCordovaIntegrationTest { + CordovaResourceApi resourceApi; + String execPayload; + Integer execStatus; + + protected void setUp() throws Exception { + super.setUp(); + setUpWithStartUrl(null); + resourceApi = cordovaWebView.getResourceApi(); + resourceApi.setThreadCheckingEnabled(false); + cordovaWebView.getPluginManager().addService(new PluginEntry("CordovaResourceApiTestPlugin1", new CordovaPlugin() { + @Override + public Uri remapUri(Uri uri) { + if (uri.getQuery() != null && uri.getQuery().contains("pluginRewrite")) { + return cordovaWebView.getResourceApi().remapUri( + Uri.parse("data:text/plain;charset=utf-8,pass")); + } + return null; + } + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + synchronized (CordovaResourceApiTest.this) { + execPayload = args.getString(0); + execStatus = args.getInt(1); + CordovaResourceApiTest.this.notify(); + } + return true; + } + })); + } + + private Uri createTestImageContentUri() { + Bitmap imageBitmap = BitmapFactory.decodeResource(testActivity.getResources(), R.drawable.icon); + String stored = MediaStore.Images.Media.insertImage(testActivity.getContentResolver(), + imageBitmap, "app-icon", "desc"); + return Uri.parse(stored); + } + + private void performApiTest(Uri uri, String expectedMimeType, File expectedLocalFile, + boolean expectRead, boolean expectWrite) throws IOException { + uri = resourceApi.remapUri(uri); + assertEquals(expectedLocalFile, resourceApi.mapUriToFile(uri)); + + try { + OpenForReadResult readResult = resourceApi.openForRead(uri); + String mimeType2 = resourceApi.getMimeType(uri); + assertEquals("openForRead mime-type", expectedMimeType, readResult.mimeType); + assertEquals("getMimeType mime-type", expectedMimeType, mimeType2); + readResult.inputStream.read(); + if (!expectRead) { + fail("Expected getInputStream to throw."); + } + } catch (IOException e) { + if (expectRead) { + throw e; + } + } + try { + OutputStream outStream = resourceApi.openOutputStream(uri); + outStream.write(123); + if (!expectWrite) { + fail("Expected getOutputStream to throw."); + } + outStream.close(); + } catch (IOException e) { + if (expectWrite) { + throw e; + } + } + } + + public void testJavaApis() throws IOException { + // testValidContentUri + { + Uri contentUri = createTestImageContentUri(); + File localFile = resourceApi.mapUriToFile(contentUri); + assertNotNull(localFile); + performApiTest(contentUri, "image/jpeg", localFile, true, true); + } + // testInvalidContentUri + { + Uri contentUri = Uri.parse("content://media/external/images/media/999999999"); + performApiTest(contentUri, null, null, false, false); + } + // testValidAssetUri + { + Uri assetUri = Uri.parse("file:///android_asset/www/index.html?foo#bar"); // Also check for stripping off ? and # correctly. + performApiTest(assetUri, "text/html", null, true, false); + } + // testInvalidAssetUri + { + Uri assetUri = Uri.parse("file:///android_asset/www/missing.html"); + performApiTest(assetUri, "text/html", null, false, false); + } + // testFileUriToExistingFile + { + File f = File.createTempFile("te s t", ".txt"); // Also check for dealing with spaces. + try { + Uri fileUri = Uri.parse(f.toURI().toString() + "?foo#bar"); // Also check for stripping off ? and # correctly. + performApiTest(fileUri, "text/plain", f, true, true); + } finally { + f.delete(); + } + } + // testFileUriToMissingFile + { + File f = new File(Environment.getExternalStorageDirectory() + "/somefilethatdoesntexist"); + Uri fileUri = Uri.parse(f.toURI().toString()); + try { + performApiTest(fileUri, null, f, false, true); + } finally { + f.delete(); + } + } + // testFileUriToMissingFileWithMissingParent + { + File f = new File(Environment.getExternalStorageDirectory() + "/somedirthatismissing" + System.currentTimeMillis() + "/somefilethatdoesntexist"); + Uri fileUri = Uri.parse(f.toURI().toString()); + performApiTest(fileUri, null, f, false, true); + } + // testUnrecognizedUri + { + Uri uri = Uri.parse("somescheme://foo"); + performApiTest(uri, null, null, false, false); + } + // testRelativeUri + { + try { + resourceApi.openForRead(Uri.parse("/foo")); + fail("Should have thrown for relative URI 1."); + } catch (Throwable t) { + } + try { + resourceApi.openForRead(Uri.parse("//foo/bar")); + fail("Should have thrown for relative URI 2."); + } catch (Throwable t) { + } + try { + resourceApi.openForRead(Uri.parse("foo.png")); + fail("Should have thrown for relative URI 3."); + } catch (Throwable t) { + } + } + // testPluginOverride + { + Uri uri = Uri.parse("plugin-uri://foohost/android_asset/www/index.html?pluginRewrite=yes"); + performApiTest(uri, "text/plain", null, true, false); + } + // testMainThreadUsage + { + Uri assetUri = Uri.parse("file:///android_asset/www/index.html"); + resourceApi.setThreadCheckingEnabled(true); + try { + resourceApi.openForRead(assetUri); + fail("Should have thrown for main thread check."); + } catch (Throwable t) { + } + } + // testDataUriPlain + { + Uri uri = Uri.parse("data:text/plain;charset=utf-8,pa%20ss"); + OpenForReadResult readResult = resourceApi.openForRead(uri); + assertEquals("text/plain", readResult.mimeType); + String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next(); + assertEquals("pa ss", data); + } + // testDataUriBase64 + { + Uri uri = Uri.parse("data:text/js;charset=utf-8;base64,cGFzcw=="); + OpenForReadResult readResult = resourceApi.openForRead(uri); + assertEquals("text/js", readResult.mimeType); + String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next(); + assertEquals("pass", data); + } + } + + public void testWebViewRequestIntercept() throws Throwable + { + testActivity.onPageFinishedUrl.take(); + execPayload = null; + execStatus = null; + cordovaWebView.sendJavascript( + "var x = new XMLHttpRequest;\n" + + "x.open('GET', 'file:///foo?pluginRewrite=1', false);\n" + + "x.send();\n" + + "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])"); + try { + synchronized (this) { + this.wait(2000); + } + } catch (InterruptedException e) { + } + assertEquals("pass", execPayload); + assertEquals(execStatus.intValue(), 200); + } + + public void testWebViewWhiteListRejection() throws Throwable + { + testActivity.onPageFinishedUrl.take(); + execPayload = null; + execStatus = null; + cordovaWebView.sendJavascript( + "var x = new XMLHttpRequest;\n" + + "x.open('GET', 'http://foo/bar', false);\n" + + "x.send();\n" + + "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])"); + try { + synchronized (this) { + this.wait(2000); + } + } catch (InterruptedException e) { + } + assertEquals("", execPayload); + assertEquals(execStatus.intValue(), 404); + } +} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/SplashscreenTest.java b/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java similarity index 50% rename from test/androidTest/src/org/apache/cordova/test/junit/SplashscreenTest.java rename to test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java index 14da5acd..fc6ce8c3 100644 --- a/test/androidTest/src/org/apache/cordova/test/junit/SplashscreenTest.java +++ b/test/androidTest/src/org/apache/cordova/test/ErrorUrlTest.java @@ -1,4 +1,4 @@ -package org.apache.cordova.test.junit; +package org.apache.cordova.test; /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -21,29 +21,22 @@ package org.apache.cordova.test.junit; */ -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.splashscreen; +public class ErrorUrlTest extends BaseCordovaIntegrationTest { + private static final String START_URL = "file:///android_asset/www/htmlnotfound/index.html"; + private static final String ERROR_URL = "file:///android_asset/www/htmlnotfound/error.html"; -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); + protected void setUp() throws Exception { + super.setUp(); + setUpWithStartUrl(START_URL, "testErrorUrl", ERROR_URL); } -} + public void testUrl() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + assertEquals(ERROR_URL, testActivity.onPageFinishedUrl.take()); + runTestOnUiThread(new Runnable() { + public void run() { + assertEquals(ERROR_URL, testActivity.getCordovaWebView().getUrl()); + } + }); + } +} \ No newline at end of file diff --git a/test/androidTest/src/org/apache/cordova/test/junit/XhrTest.java b/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java similarity index 55% rename from test/androidTest/src/org/apache/cordova/test/junit/XhrTest.java rename to test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java index 16c977f2..36fc3bd3 100644 --- a/test/androidTest/src/org/apache/cordova/test/junit/XhrTest.java +++ b/test/androidTest/src/org/apache/cordova/test/HtmlNotFoundTest.java @@ -1,4 +1,4 @@ -package org.apache.cordova.test.junit; +package org.apache.cordova.test; /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -21,14 +21,21 @@ package org.apache.cordova.test.junit; */ -import org.apache.cordova.test.xhr; +public class HtmlNotFoundTest extends BaseCordovaIntegrationTest { + private static final String START_URL = "file:///android_asset/www/htmlnotfound/index.html"; -import android.test.ActivityInstrumentationTestCase2; - -public class XhrTest extends ActivityInstrumentationTestCase2 { - - public XhrTest() + protected void setUp() throws Exception { + super.setUp(); + setUpWithStartUrl(START_URL); + } + public void testUrl() throws Throwable { - super(xhr.class); + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); + // TODO: Should this be null? Or some other way to indicate it didn't actually load? + runTestOnUiThread(new Runnable() { + public void run() { + assertEquals(START_URL, testActivity.getCordovaWebView().getUrl()); + } + }); } } diff --git a/test/androidTest/src/org/apache/cordova/test/junit/IFrameTest.java b/test/androidTest/src/org/apache/cordova/test/IFrameTest.java similarity index 61% rename from test/androidTest/src/org/apache/cordova/test/junit/IFrameTest.java rename to test/androidTest/src/org/apache/cordova/test/IFrameTest.java index 800deadd..48dae380 100644 --- a/test/androidTest/src/org/apache/cordova/test/junit/IFrameTest.java +++ b/test/androidTest/src/org/apache/cordova/test/IFrameTest.java @@ -1,4 +1,4 @@ -package org.apache.cordova.test.junit; +package org.apache.cordova.test; /* * * Licensed to the Apache Software Foundation (ASF) under one @@ -21,65 +21,44 @@ package org.apache.cordova.test.junit; */ -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.iframe; +import android.test.TouchUtils; + import org.apache.cordova.test.util.Purity; -import android.app.Activity; -import android.app.Instrumentation; -import android.test.ActivityInstrumentationTestCase2; -import android.test.TouchUtils; -import android.widget.FrameLayout; -import android.widget.LinearLayout; +public class IFrameTest extends BaseCordovaIntegrationTest { + private static final String START_URL = "file:///android_asset/www/iframe/index.html"; -public class IFrameTest extends ActivityInstrumentationTestCase2 { - - - private Instrumentation mInstr; - private Activity testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; private TouchUtils touch; private Purity touchTool; - public IFrameTest() { - super("org.apache.cordova.test",iframe.class); - } - - protected void setUp() throws Exception { super.setUp(); - mInstr = this.getInstrumentation(); - testActivity = this.getActivity(); - containerView = (FrameLayout) testActivity.findViewById(android.R.id.content); - innerContainer = (LinearLayout) containerView.getChildAt(0); - testView = (CordovaWebView) innerContainer.getChildAt(0); + setUpWithStartUrl(START_URL); touch = new TouchUtils(); touchTool = new Purity(testActivity, getInstrumentation()); } - public void testIframeDest() throws Throwable - { + public void testIframeDest() throws Throwable { + assertEquals(START_URL, testActivity.onPageFinishedUrl.take()); runTestOnUiThread(new Runnable() { public void run() { - testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');"); + cordovaWebView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');"); } }); sleep(3000); runTestOnUiThread(new Runnable() { public void run() { - testView.sendJavascript("loadUrl('index2.html')"); + cordovaWebView.sendJavascript("loadUrl('index2.html')"); } }); sleep(1000); runTestOnUiThread(new Runnable() { public void run() { - String url = testView.getUrl(); + String url = cordovaWebView.getUrl(); assertTrue(url.endsWith("index.html")); } }); @@ -90,29 +69,29 @@ public class IFrameTest extends ActivityInstrumentationTestCase2 { runTestOnUiThread(new Runnable() { public void run() { - testView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');"); + cordovaWebView.sendJavascript("loadUrl('http://maps.google.com/maps?output=embed');"); } }); sleep(3000); runTestOnUiThread(new Runnable() { public void run() { - testView.sendJavascript("loadUrl('index2.html')"); + cordovaWebView.sendJavascript("loadUrl('index2.html')"); } }); sleep(1000); runTestOnUiThread(new Runnable() { public void run() { - String url = testView.getUrl(); - testView.backHistory(); + String url = cordovaWebView.getUrl(); + cordovaWebView.backHistory(); } }); sleep(1000); runTestOnUiThread(new Runnable() { public void run() { - String url = testView.getUrl(); + String url = cordovaWebView.getUrl(); assertTrue(url.endsWith("index.html")); } }); diff --git a/test/androidTest/src/org/apache/cordova/test/InflateLayoutTest.java b/test/androidTest/src/org/apache/cordova/test/InflateLayoutTest.java new file mode 100644 index 00000000..3899cf1a --- /dev/null +++ b/test/androidTest/src/org/apache/cordova/test/InflateLayoutTest.java @@ -0,0 +1,56 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova.test; + +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; +import android.view.ViewGroup; +import android.widget.FrameLayout; +import android.widget.LinearLayout; + +import org.apache.cordova.AndroidWebView; + +public class InflateLayoutTest extends ActivityInstrumentationTestCase2 { + + private CordovaWebViewTestActivity testActivity; + private ViewGroup innerContainer; + private View testView; + + @SuppressWarnings("deprecation") + public InflateLayoutTest() + { + super("org.apache.cordova.test",CordovaWebViewTestActivity.class); + } + + protected void setUp() throws Exception { + super.setUp(); + testActivity = this.getActivity(); + FrameLayout containerView = (FrameLayout) testActivity.findViewById(android.R.id.content); + innerContainer = (ViewGroup)containerView.getChildAt(0); + testView = innerContainer.getChildAt(0); + } + + public void testBasicLoad() throws Exception { + assertTrue(testView instanceof AndroidWebView); + assertTrue(innerContainer instanceof LinearLayout); + String onPageFinishedUrl = testActivity.onPageFinishedUrl.take(); + assertEquals(CordovaWebViewTestActivity.START_URL, onPageFinishedUrl); + } +} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java b/test/androidTest/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java deleted file mode 100644 index cc90538f..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/BackButtonMultiPageTest.java +++ /dev/null @@ -1,278 +0,0 @@ -package org.apache.cordova.test.junit; -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.backbuttonmultipage; - -import android.test.ActivityInstrumentationTestCase2; -import android.test.UiThreadTest; -import android.view.KeyEvent; -import android.view.View; -import android.view.inputmethod.BaseInputConnection; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2 { - - private int TIMEOUT = 2000; - backbuttonmultipage testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; - - - public BackButtonMultiPageTest() { - super(backbuttonmultipage.class); - } - - @Override - public void setUp() { - testActivity = getActivity(); - containerView = (FrameLayout) testActivity.findViewById(android.R.id.content); - innerContainer = (LinearLayout) containerView.getChildAt(0); - testView = (CordovaWebView) innerContainer.getChildAt(0); - } - - void loadTestPage() { - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html"); - sleep(); - } - - @UiThreadTest - public void testPreconditions(){ - loadTestPage(); - assertNotNull(innerContainer); - assertNotNull(testView); - String url = testView.getUrl(); - assertTrue(url.endsWith("index.html")); - } - - public void testViaHref() throws Throwable { - runTestOnUiThread(new Runnable() { - public void run() - { - loadTestPage(); - testView.sendJavascript("window.location = 'sample2.html';"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", url); - testView.sendJavascript("window.location = 'sample3.html';"); } - }); - - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertEquals("file:///android_asset/www/backbuttonmultipage/sample3.html", url); - assertTrue(testView.backHistory()); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertEquals("file:///android_asset/www/backbuttonmultipage/sample2.html", url); - assertTrue(testView.backHistory()); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertEquals("file:///android_asset/www/backbuttonmultipage/index.html", url); - } - }); - } - - public void testViaLoadUrl() throws Throwable { - runTestOnUiThread(new Runnable() { - public void run() - { - loadTestPage(); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample3.html")); - testView.backHistory(); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - testView.backHistory(); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("index.html")); - testView.backHistory(); - } - }); - } - - public void testViaBackButtonOnView() throws Throwable { - runTestOnUiThread(new Runnable() { - public void run() - { - loadTestPage(); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample3.html")); - BaseInputConnection viewConnection = new BaseInputConnection((View) testView, true); - KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); - KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); - viewConnection.sendKeyEvent(backDown); - viewConnection.sendKeyEvent(backUp); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - BaseInputConnection viewConnection = new BaseInputConnection((View) testView, true); - KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); - KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); - viewConnection.sendKeyEvent(backDown); - viewConnection.sendKeyEvent(backUp); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("index.html")); - } - }); - - } - - public void testViaBackButtonOnLayout() throws Throwable { - runTestOnUiThread(new Runnable() { - public void run() - { - loadTestPage(); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html"); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample3.html")); - BaseInputConnection viewConnection = new BaseInputConnection(containerView, true); - KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); - KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); - viewConnection.sendKeyEvent(backDown); - viewConnection.sendKeyEvent(backUp); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("sample2.html")); - BaseInputConnection viewConnection = new BaseInputConnection(containerView, true); - KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK); - KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK); - viewConnection.sendKeyEvent(backDown); - viewConnection.sendKeyEvent(backUp); - } - }); - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String url = testView.getUrl(); - assertTrue(url.endsWith("index.html")); - } - }); - - } - - private void sleep() { - try { - Thread.sleep(TIMEOUT); - } catch (InterruptedException e) { - fail("Unexpected Timeout"); - } - } - -} - diff --git a/test/androidTest/src/org/apache/cordova/test/junit/CordovaActivityTest.java b/test/androidTest/src/org/apache/cordova/test/junit/CordovaActivityTest.java deleted file mode 100644 index 965e3d27..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/CordovaActivityTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test.junit; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginManager; -import org.apache.cordova.test.MainTestActivity; - -import android.app.Instrumentation; -import android.test.ActivityInstrumentationTestCase2; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class CordovaActivityTest extends ActivityInstrumentationTestCase2 { - - private MainTestActivity testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; - private Instrumentation mInstr; - private int TIMEOUT = 1000; - - @SuppressWarnings("deprecation") - public CordovaActivityTest() - { - super("org.apache.cordova.test",MainTestActivity.class); - } - - protected void setUp() throws Exception { - super.setUp(); - mInstr = this.getInstrumentation(); - 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 testForAndroidWebView() { - String className = testView.getClass().getSimpleName(); - assertTrue(className.equals("AndroidWebView")); - } - - public void testForLinearLayout() { - String className = innerContainer.getClass().getSimpleName(); - assertTrue(className.equals("LinearLayout")); - } - - private void sleep() { - try { - Thread.sleep(TIMEOUT); - } catch (InterruptedException e) { - fail("Unexpected Timeout"); - } - } -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java b/test/androidTest/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java deleted file mode 100644 index a8a53702..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/CordovaResourceApiTest.java +++ /dev/null @@ -1,281 +0,0 @@ - -package org.apache.cordova.test.junit; - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.net.Uri; -import android.os.Environment; -import android.provider.MediaStore; -import android.test.ActivityInstrumentationTestCase2; - -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaResourceApi; -import org.apache.cordova.CordovaResourceApi.OpenForReadResult; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginEntry; -import org.apache.cordova.test.CordovaWebViewTestActivity; -import org.apache.cordova.test.R; -import org.json.JSONArray; -import org.json.JSONException; - -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Scanner; - -public class CordovaResourceApiTest extends ActivityInstrumentationTestCase2 { - - public CordovaResourceApiTest() - { - super(CordovaWebViewTestActivity.class); - } - - CordovaWebView cordovaWebView; - CordovaResourceApi resourceApi; - - private CordovaWebViewTestActivity activity; - String execPayload; - Integer execStatus; - - protected void setUp() throws Exception { - super.setUp(); - activity = this.getActivity(); - cordovaWebView = activity.cordovaWebView; - resourceApi = cordovaWebView.getResourceApi(); - resourceApi.setThreadCheckingEnabled(false); - cordovaWebView.getPluginManager().addService(new PluginEntry("CordovaResourceApiTestPlugin1", new CordovaPlugin() { - @Override - public Uri remapUri(Uri uri) { - if (uri.getQuery() != null && uri.getQuery().contains("pluginRewrite")) { - return cordovaWebView.getResourceApi().remapUri( - Uri.parse("data:text/plain;charset=utf-8,pass")); - } - return null; - } - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - synchronized (CordovaResourceApiTest.this) { - execPayload = args.getString(0); - execStatus = args.getInt(1); - CordovaResourceApiTest.this.notify(); - } - return true; - } - })); - } - - private Uri createTestImageContentUri() { - Bitmap imageBitmap = BitmapFactory.decodeResource(activity.getResources(), R.drawable.icon); - String stored = MediaStore.Images.Media.insertImage(activity.getContentResolver(), - imageBitmap, "app-icon", "desc"); - return Uri.parse(stored); - } - - private void performApiTest(Uri uri, String expectedMimeType, File expectedLocalFile, - boolean expectRead, boolean expectWrite) throws IOException { - uri = resourceApi.remapUri(uri); - assertEquals(expectedLocalFile, resourceApi.mapUriToFile(uri)); - - try { - OpenForReadResult readResult = resourceApi.openForRead(uri); - String mimeType2 = resourceApi.getMimeType(uri); - assertEquals("openForRead mime-type", expectedMimeType, readResult.mimeType); - assertEquals("getMimeType mime-type", expectedMimeType, mimeType2); - readResult.inputStream.read(); - if (!expectRead) { - fail("Expected getInputStream to throw."); - } - } catch (IOException e) { - if (expectRead) { - throw e; - } - } - try { - OutputStream outStream = resourceApi.openOutputStream(uri); - outStream.write(123); - if (!expectWrite) { - fail("Expected getOutputStream to throw."); - } - outStream.close(); - } catch (IOException e) { - if (expectWrite) { - throw e; - } - } - } - - public void testValidContentUri() throws IOException - { - Uri contentUri = createTestImageContentUri(); - File localFile = resourceApi.mapUriToFile(contentUri); - assertNotNull(localFile); - performApiTest(contentUri, "image/jpeg", localFile, true, true); - } - - public void testInvalidContentUri() throws IOException - { - Uri contentUri = Uri.parse("content://media/external/images/media/999999999"); - performApiTest(contentUri, null, null, false, false); - } - - public void testValidAssetUri() throws IOException - { - Uri assetUri = Uri.parse("file:///android_asset/www/index.html?foo#bar"); // Also check for stripping off ? and # correctly. - performApiTest(assetUri, "text/html", null, true, false); - } - - public void testInvalidAssetUri() throws IOException - { - Uri assetUri = Uri.parse("file:///android_asset/www/missing.html"); - performApiTest(assetUri, "text/html", null, false, false); - } - - public void testFileUriToExistingFile() throws IOException - { - File f = File.createTempFile("te s t", ".txt"); // Also check for dealing with spaces. - try { - Uri fileUri = Uri.parse(f.toURI().toString() + "?foo#bar"); // Also check for stripping off ? and # correctly. - performApiTest(fileUri, "text/plain", f, true, true); - } finally { - f.delete(); - } - } - - public void testFileUriToMissingFile() throws IOException - { - File f = new File(Environment.getExternalStorageDirectory() + "/somefilethatdoesntexist"); - Uri fileUri = Uri.parse(f.toURI().toString()); - try { - performApiTest(fileUri, null, f, false, true); - } finally { - f.delete(); - } - } - - public void testFileUriToMissingFileWithMissingParent() throws IOException - { - File f = new File(Environment.getExternalStorageDirectory() + "/somedirthatismissing" + System.currentTimeMillis() + "/somefilethatdoesntexist"); - Uri fileUri = Uri.parse(f.toURI().toString()); - performApiTest(fileUri, null, f, false, true); - } - - public void testUnrecognizedUri() throws IOException - { - Uri uri = Uri.parse("somescheme://foo"); - performApiTest(uri, null, null, false, false); - } - - public void testRelativeUri() - { - try { - resourceApi.openForRead(Uri.parse("/foo")); - fail("Should have thrown for relative URI 1."); - } catch (Throwable t) { - } - try { - resourceApi.openForRead(Uri.parse("//foo/bar")); - fail("Should have thrown for relative URI 2."); - } catch (Throwable t) { - } - try { - resourceApi.openForRead(Uri.parse("foo.png")); - fail("Should have thrown for relative URI 3."); - } catch (Throwable t) { - } - } - - public void testPluginOverride() throws IOException - { - Uri uri = Uri.parse("plugin-uri://foohost/android_asset/www/index.html?pluginRewrite=yes"); - performApiTest(uri, "text/plain", null, true, false); - } - - public void testMainThreadUsage() throws IOException - { - Uri assetUri = Uri.parse("file:///android_asset/www/index.html"); - resourceApi.setThreadCheckingEnabled(true); - try { - resourceApi.openForRead(assetUri); - fail("Should have thrown for main thread check."); - } catch (Throwable t) { - } - } - - - public void testDataUriPlain() throws IOException - { - Uri uri = Uri.parse("data:text/plain;charset=utf-8,pa%20ss"); - OpenForReadResult readResult = resourceApi.openForRead(uri); - assertEquals("text/plain", readResult.mimeType); - String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next(); - assertEquals("pa ss", data); - } - - public void testDataUriBase64() throws IOException - { - Uri uri = Uri.parse("data:text/js;charset=utf-8;base64,cGFzcw=="); - OpenForReadResult readResult = resourceApi.openForRead(uri); - assertEquals("text/js", readResult.mimeType); - String data = new Scanner(readResult.inputStream, "UTF-8").useDelimiter("\\A").next(); - assertEquals("pass", data); - } - - public void testWebViewRequestIntercept() throws IOException - { - cordovaWebView.sendJavascript( - "var x = new XMLHttpRequest;\n" + - "x.open('GET', 'file://foo?pluginRewrite=1', false);\n" + - "x.send();\n" + - "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])"); - execPayload = null; - execStatus = null; - try { - synchronized (this) { - this.wait(2000); - } - } catch (InterruptedException e) { - } - assertEquals("pass", execPayload); - assertEquals(execStatus.intValue(), 200); - } - - public void testWebViewWhiteListRejection() throws IOException - { - cordovaWebView.sendJavascript( - "var x = new XMLHttpRequest;\n" + - "x.open('GET', 'http://foo/bar', false);\n" + - "x.send();\n" + - "cordova.require('cordova/exec')(null,null,'CordovaResourceApiTestPlugin1', 'foo', [x.responseText, x.status])"); - execPayload = null; - execStatus = null; - try { - synchronized (this) { - this.wait(2000); - } - } catch (InterruptedException e) { - } - assertEquals("", execPayload); - assertEquals(execStatus.intValue(), 404); - } -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/CordovaTest.java b/test/androidTest/src/org/apache/cordova/test/junit/CordovaTest.java deleted file mode 100644 index 2e09611f..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/CordovaTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test.junit; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginManager; -import org.apache.cordova.test.CordovaWebViewTestActivity; -import org.apache.cordova.test.R; - -import android.app.Instrumentation; -import android.test.ActivityInstrumentationTestCase2; -import android.view.View; - -public class CordovaTest extends - ActivityInstrumentationTestCase2 { - - private static final long TIMEOUT = 1000; - private CordovaWebViewTestActivity testActivity; - private View testView; - private String rString; - - public CordovaTest() { - super("org.apache.cordova.test.activities", CordovaWebViewTestActivity.class); - } - - protected void setUp() throws Exception { - super.setUp(); - testActivity = this.getActivity(); - testView = testActivity.findViewById(R.id.cordovaWebView); - } - - public void testPreconditions() { - assertNotNull(testView); - } - - public void testForAndroidWebView() { - //Sleep for no reason!!!! - sleep(); - String className = testView.getClass().getSimpleName(); - assertTrue(className.equals("AndroidWebView")); - } - - /* - 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()); - } - - public void testLoadUrl() { - CordovaWebView v = (CordovaWebView) testView; - v.loadUrlIntoView("file:///android_asset/www/index.html"); - sleep(); - String url = v.getUrl(); - boolean result = url.equals("file:///android_asset/www/index.html"); - assertTrue(result); - int visible = v.getVisibility(); - assertTrue(visible == View.VISIBLE); - } - - public void testBackHistoryFalse() { - CordovaWebView v = (CordovaWebView) testView; - // Move back in the history - boolean test = v.backHistory(); - assertFalse(test); - } - - // Make sure that we can go back - public void testBackHistoryTrue() { - this.testLoadUrl(); - CordovaWebView v = (CordovaWebView) testView; - v.loadUrlIntoView("file:///android_asset/www/compass/index.html"); - sleep(); - String url = v.getUrl(); - assertTrue(url.equals("file:///android_asset/www/compass/index.html")); - // Move back in the history - boolean test = v.backHistory(); - assertTrue(test); - sleep(); - url = v.getUrl(); - assertTrue(url.equals("file:///android_asset/www/index.html")); - } - */ - - - private void sleep() { - try { - Thread.sleep(TIMEOUT); - } catch (InterruptedException e) { - fail("Unexpected Timeout"); - } - } -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/ErrorUrlTest.java b/test/androidTest/src/org/apache/cordova/test/junit/ErrorUrlTest.java deleted file mode 100644 index de12bc4b..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/ErrorUrlTest.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.apache.cordova.test.junit; -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.errorurl; - -import android.test.ActivityInstrumentationTestCase2; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class ErrorUrlTest extends ActivityInstrumentationTestCase2 { - - private int TIMEOUT = 1000; - errorurl testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; - - public ErrorUrlTest() { - super("org.apache.cordova.test",errorurl.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() throws Throwable - { - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String good_url = "file:///android_asset/www/htmlnotfound/error.html"; - String url = testView.getUrl(); - assertNotNull(url); - assertEquals(good_url, url); - - } - }); - } - - - private void sleep() { - try { - Thread.sleep(TIMEOUT); - } catch (InterruptedException e) { - fail("Unexpected Timeout"); - } - } - - -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/FixWebView.java b/test/androidTest/src/org/apache/cordova/test/junit/FixWebView.java deleted file mode 100755 index 3b73e29e..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/FixWebView.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test.junit; - -import android.content.Context; -import android.webkit.WebView; - -public class FixWebView extends WebView { - - public FixWebView(Context context) { - super(context); - } - - @Override - public void pauseTimers() { - // Do nothing - } - - /** - * This method is with different signature in order to stop the timers while move application to background - * @param realPause - */ - public void pauseTimers(@SuppressWarnings("unused") boolean realPause) { - super.pauseTimers(); - } - -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java b/test/androidTest/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java deleted file mode 100644 index abc4802a..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/HtmlNotFoundTest.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.apache.cordova.test.junit; -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.htmlnotfound; - -import android.test.ActivityInstrumentationTestCase2; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class HtmlNotFoundTest extends ActivityInstrumentationTestCase2 { - - private int TIMEOUT = 1000; - private htmlnotfound testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; - - public HtmlNotFoundTest() { - super("org.apache.cordova.test",htmlnotfound.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() throws Throwable - { - sleep(); - runTestOnUiThread(new Runnable() { - public void run() - { - String good_url = "file:///android_asset/www/htmlnotfound/error.html"; - 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/androidTest/src/org/apache/cordova/test/junit/IntentUriOverrideTest.java b/test/androidTest/src/org/apache/cordova/test/junit/IntentUriOverrideTest.java deleted file mode 100644 index e84a8dca..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/IntentUriOverrideTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test.junit; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.test.SabotagedActivity; -import org.apache.cordova.test.splashscreen; - -import android.app.Instrumentation; -import android.content.Context; -import android.content.Intent; -import android.content.res.AssetManager; -import android.test.ActivityInstrumentationTestCase2; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - - -public class IntentUriOverrideTest extends ActivityInstrumentationTestCase2 { - - private int TIMEOUT = 1000; - - private SabotagedActivity testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private CordovaWebView testView; - private Instrumentation mInstr; - private String BAD_URL = "file:///sdcard/download/wl-exploit.htm"; - - - @SuppressWarnings("deprecation") - public IntentUriOverrideTest() - { - super("org.apache.cordova.test",SabotagedActivity.class); - } - - - protected void setUp() throws Exception { - super.setUp(); - mInstr = this.getInstrumentation(); - Intent badIntent = new Intent(); - badIntent.setClassName("org.apache.cordova.test", "org.apache.cordova.test.SabotagedActivity"); - badIntent.putExtra("url", BAD_URL); - setActivityIntent(badIntent); - testActivity = 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 testChangeStartUrl() throws Throwable - { - runTestOnUiThread(new Runnable() { - public void run() - { - sleep(); - boolean isBadUrl = testView.getUrl().equals(BAD_URL); - assertFalse(isBadUrl); - } - }); - } - - private void sleep() { - try { - Thread.sleep(TIMEOUT); - } catch (InterruptedException e) { - fail("Unexpected Timeout"); - } - } - - -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/LifecycleTest.java b/test/androidTest/src/org/apache/cordova/test/junit/LifecycleTest.java deleted file mode 100644 index 54235757..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/LifecycleTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.apache.cordova.test.junit; -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - - -import org.apache.cordova.test.lifecycle; - -import android.test.ActivityInstrumentationTestCase2; - -public class LifecycleTest extends ActivityInstrumentationTestCase2 { - - public LifecycleTest() - { - super("org.apache.cordova.test",lifecycle.class); - } -} diff --git a/test/androidTest/src/org/apache/cordova/test/junit/PluginManagerTest.java b/test/androidTest/src/org/apache/cordova/test/junit/PluginManagerTest.java deleted file mode 100644 index bcdead69..00000000 --- a/test/androidTest/src/org/apache/cordova/test/junit/PluginManagerTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test.junit; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginManager; -import org.apache.cordova.test.CordovaWebViewTestActivity; - -import android.test.ActivityInstrumentationTestCase2; -import android.view.View; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class PluginManagerTest extends ActivityInstrumentationTestCase2 { - - private CordovaWebViewTestActivity testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private View testView; - private String rString; - private PluginManager pMan; - - public PluginManagerTest() { - super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.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 = innerContainer.getChildAt(0); - - } - - public void testPreconditions(){ - assertNotNull(innerContainer); - assertNotNull(testView); - } - - - public void testForPluginManager() { - /* - CordovaWebView v = (CordovaWebView) testView; - pMan = v.getPluginManager(); - assertNotNull(pMan); - String className = pMan.getClass().getSimpleName(); - assertTrue(className.equals("PluginManager")); - */ - } - - -} diff --git a/test/assets/www/error.html b/test/assets/www/error.html deleted file mode 100644 index aad167dc..00000000 --- a/test/assets/www/error.html +++ /dev/null @@ -1,8 +0,0 @@ - - - OH NOES! - - -

Things went terribly wrong!

- - \ No newline at end of file diff --git a/test/assets/www/index.html b/test/assets/www/index.html index d4659f7a..f55aa0a9 100755 --- a/test/assets/www/index.html +++ b/test/assets/www/index.html @@ -26,8 +26,8 @@ - - - -

Splash Screen Test

-
-

Cordova:  

-

Deviceready:  

-
-
- You should have seen the splash screen for 2 seconds.
- - diff --git a/test/res/drawable/sandy.jpg b/test/res/drawable/sandy.jpg deleted file mode 100755 index c956d30b33ac2ebf71804af333ee5aa647fd7e25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48450 zcmdS9bx<5z_cq$Y;2Kieqhy>XXm$Y&j7%|(cM)|Mv_uTSC0}23Lpab01AK#pqrYzIZLRhyaE1? zay9#h9RQ|S|8V^u&HncV*cO&<<}e3UV8vz@Zsra!TnEE9=FYC}0037B!{eUr&M*x2 zgJC>Zn1e7J{|8(DjSK%^v%hiEUp5+QuV6OA0Dz2cYU*kY0BG|tJ>@%dYZwpO4GeQQ zTG%=Q0Qw6U7BjaowSZw87-n&BaQcIjVfcmF|KPFyAK28?>|ah(Q|o{6-?6}+gjM|7 z*3J2?srO$u|6iUQ-g>~=>o389ozWfND*fpjSPufb7N)Ni{=v>~|LU{9^p=jA>i_5+ z&6Je?!B(!)YX4wocgg>ORW$z5``Elv`UhLON&U-XXDa`v&;H_f^-$CN2fMvfm-+|$ z*l1|~gDosy|EssMm6rQQZ|g4iZ(a6I3jg{5NCPUsYk&*j0R#YEK-=BY3)Xi4@XE>A z+tt?E#+_0EHrgy%DCHc@*;pvKI5;`}6#xH5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f;^0EAv4wumR&^x#42uKxi1MQM+O+PW*NU062n zz5B=KKkynTspO4~6qws@g__bUGF@0M-k5je{{S7UFnl%f4orsf!{zCTAD^$uMHQ4{ zo77U9v1UJpy85dRwb%ikf=B2703E2;;hw)6;9cqDV75!XfAktCtK~qX#zEi>d0If% zHYI~&B1iuK;wsEO0N0#+*ESq-KY0HD{7n>7QC1%_u#o0}ee z9sdCMnkcQ*6~x`rHW$F!zm!S1vnK%k_x}LmYA^U#+Osn|Ph@ut5xueh0HD!DQ-n;@ zWDBI-+(o! z;$}_Z6$NciLa14R^atBpzAt8?Ieb~p@?O{b5Sci(^hCaRADYo1a~CC!r-U;y)9 SjQ;?@Xri@@RficifB)Hi#mm9~ diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml index 4370357c..894c3362 100644 --- a/test/res/xml/config.xml +++ b/test/res/xml/config.xml @@ -38,7 +38,4 @@ - - - diff --git a/test/src/org/apache/cordova/pluginApi/pluginStub.java b/test/src/org/apache/cordova/pluginApi/pluginStub.java deleted file mode 100644 index b91a7af6..00000000 --- a/test/src/org/apache/cordova/pluginApi/pluginStub.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -/* - * This plugin is a test of all the message callbacks and actions available to plugins - * - */ - -package org.apache.cordova.pluginApi; - -import org.apache.cordova.CordovaPlugin; - -public class pluginStub extends CordovaPlugin { - - public String id; - public Object data; - - public Object onMessage(String id, Object input) - { - this.data = input; - return input; - } -} diff --git a/test/src/org/apache/cordova/test/ActivityPlugin.java b/test/src/org/apache/cordova/test/ActivityPlugin.java index 19a50a2b..c6a96ec0 100755 --- a/test/src/org/apache/cordova/test/ActivityPlugin.java +++ b/test/src/org/apache/cordova/test/ActivityPlugin.java @@ -28,52 +28,40 @@ import android.content.Intent; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.PluginResult; +import org.json.JSONObject; + +import java.util.Collections; +import java.util.Iterator; -/** - * This class provides a service. - */ public class ActivityPlugin extends CordovaPlugin { static String TAG = "ActivityPlugin"; + public static final String BACKBUTTONMULTIPAGE_URL = "file:///android_asset/www/backbuttonmultipage/index.html"; - /** - * Constructor. - */ - public ActivityPlugin() { - } - - /** - * Executes the request and returns PluginResult. - * - * @param action The action to execute. - * @param args JSONArry of arguments for the plugin. - * @param callbackId The callback id used when calling back into JavaScript. - * @return A PluginResult object with a status and message. - */ - public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) { - PluginResult result = new PluginResult(PluginResult.Status.OK, ""); - try { - if (action.equals("start")) { - this.startActivity(args.getString(0)); - callbackContext.sendPluginResult(result); - callbackContext.success(); - return true; - } - } catch (JSONException e) { - result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSON Exception"); - callbackContext.sendPluginResult(result); - return false; + public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + if (action.equals("start")) { + String className = args.isNull(0) ? MainTestActivity.class.getCanonicalName() : args.getString(0); + String startUrl = args.getString(1); + JSONObject extraPrefs = args.getJSONObject(2); + this.startActivity(className, startUrl, extraPrefs); + callbackContext.success(); + return true; } return false; } - // -------------------------------------------------------------------------- - // LOCAL METHODS - // -------------------------------------------------------------------------- - - public void startActivity(String className) { + public void startActivity(String className, String startUrl, JSONObject extraPrefs) throws JSONException { try { - Intent intent = new Intent().setClass(this.cordova.getActivity(), Class.forName(className)); + if (!startUrl.contains(":")) { + startUrl = "file:///android_asset/www/" + startUrl; + } + Intent intent = new Intent(this.cordova.getActivity(), Class.forName(className)); + intent.putExtra("testStartUrl", startUrl); + Iterator iter = extraPrefs.keys(); + while (iter.hasNext()) { + String key = iter.next(); + intent.putExtra(key, extraPrefs.getString(key)); + } LOG.d(TAG, "Starting activity %s", className); this.cordova.getActivity().startActivity(intent); } catch (ClassNotFoundException e) { diff --git a/test/src/org/apache/cordova/test/fullscreen.java b/test/src/org/apache/cordova/test/BaseTestCordovaActivity.java old mode 100755 new mode 100644 similarity index 60% rename from test/src/org/apache/cordova/test/fullscreen.java rename to test/src/org/apache/cordova/test/BaseTestCordovaActivity.java index 0aa1ee99..0a280362 --- a/test/src/org/apache/cordova/test/fullscreen.java +++ b/test/src/org/apache/cordova/test/BaseTestCordovaActivity.java @@ -18,22 +18,33 @@ */ package org.apache.cordova.test; +import android.content.Intent; import android.os.Bundle; -import org.apache.cordova.*; -public class fullscreen extends CordovaActivity { +import org.apache.cordova.CordovaActivity; +import org.apache.cordova.CordovaWebView; + +import java.util.concurrent.ArrayBlockingQueue; + +public class BaseTestCordovaActivity extends CordovaActivity { + public final ArrayBlockingQueue onPageFinishedUrl = new ArrayBlockingQueue(500); + + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + } - // Properties must be set before init() is called, since some are processed during init(). + @Override + public Object onMessage(String id, Object data) { + if ("onPageFinished".equals(id)) { + onPageFinishedUrl.add((String) data); + } + return super.onMessage(id, data); + } - // fullscreen can also be set in cordova.xml. For example, - // - preferences.set("fullscreen", true); - - super.init(); - super.loadUrl("file:///android_asset/www/fullscreen/index.html"); + public CordovaWebView getCordovaWebView() { + return appView; } } diff --git a/test/src/org/apache/cordova/test/CordovaDriverAction.java b/test/src/org/apache/cordova/test/CordovaDriverAction.java deleted file mode 100644 index 0559f5fd..00000000 --- a/test/src/org/apache/cordova/test/CordovaDriverAction.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test; - -import java.util.concurrent.ExecutorService; - -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; - -import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; - - -public class CordovaDriverAction extends Activity implements CordovaInterface { - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - } - - public void startActivityForResult(CordovaPlugin command, Intent intent, - int requestCode) { - // TODO Auto-generated method stub - - } - - public void setActivityResultCallback(CordovaPlugin plugin) { - // TODO Auto-generated method stub - - } - - public Activity getActivity() { - // TODO Auto-generated method stub - return null; - } - - @Deprecated - public Context getContext() { - // TODO Auto-generated method stub - return null; - } - - @Deprecated - public void cancelLoadUrl() { - // TODO Auto-generated method stub - - } - - public Object onMessage(String id, Object data) { - // TODO Auto-generated method stub - return null; - } - - public ExecutorService getThreadPool() { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java index 43e0b2bc..ce9797e8 100644 --- a/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java +++ b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java @@ -19,90 +19,57 @@ package org.apache.cordova.test; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; +import java.util.concurrent.ArrayBlockingQueue; import org.apache.cordova.AndroidChromeClient; +import org.apache.cordova.AndroidWebView; import org.apache.cordova.AndroidWebViewClient; import org.apache.cordova.Config; +import org.apache.cordova.CordovaInterfaceImpl; import org.apache.cordova.CordovaWebView; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.test.R; import android.app.Activity; -import android.content.Context; -import android.content.Intent; import android.os.Bundle; -public class CordovaWebViewTestActivity extends Activity implements CordovaInterface { - public CordovaWebView cordovaWebView; +/** + * Tests creating the views via inflating a layout, and also tests *not* using CordovaActivity. + */ +public class CordovaWebViewTestActivity extends Activity { + private CordovaWebView cordovaWebView; + public final ArrayBlockingQueue onPageFinishedUrl = new ArrayBlockingQueue(5); + public static final String START_URL = "file:///android_asset/www/index.html"; + + protected CordovaInterfaceImpl cordovaInterface = new CordovaInterfaceImpl(this) { + @Override + public Object onMessage(String id, Object data) { + if ("onPageFinished".equals(id)) { + onPageFinishedUrl.add((String) data); + } + return super.onMessage(id, data); + } + }; - private final ExecutorService threadPool = Executors.newCachedThreadPool(); - /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.main); //CB-7238: This has to be added now, because it got removed from somewhere else Config.init(this); - - cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView); - cordovaWebView.init(this, Config.getPluginEntries(), Config.getWhitelist(), + + AndroidWebView webView = (AndroidWebView) findViewById(R.id.cordovaWebView); + cordovaWebView = webView; + cordovaWebView.init(cordovaInterface, Config.getPluginEntries(), Config.getWhitelist(), Config.getExternalWhitelist(), Config.getPreferences()); - cordovaWebView.loadUrl("file:///android_asset/www/index.html"); - + cordovaWebView.loadUrl(START_URL); } - public Context getContext() { - return this; - } - - public void startActivityForResult(CordovaPlugin command, Intent intent, - int requestCode) { - // TODO Auto-generated method stub - - } - - public void setActivityResultCallback(CordovaPlugin plugin) { - // TODO Auto-generated method stub - - } - - //Note: This must always return an activity! - public Activity getActivity() { - return this; - } - - @Deprecated - public void cancelLoadUrl() { - // TODO Auto-generated method stub - - } - - public Object onMessage(String id, Object data) { - // TODO Auto-generated method stub - return null; - } - - public ExecutorService getThreadPool() { - // TODO Auto-generated method stub - return threadPool; - } - - @Override - /** - * The final call you receive before your activity is destroyed. - */ - public void onDestroy() { - super.onDestroy(); - if (cordovaWebView != null) { - // Send destroy event to JavaScript - cordovaWebView.handleDestroy(); - } + public CordovaWebView getCordovaWebView() { + return cordovaWebView; } } diff --git a/test/src/org/apache/cordova/test/MainTestActivity.java b/test/src/org/apache/cordova/test/MainTestActivity.java index 2a0f67e6..45d8309d 100644 --- a/test/src/org/apache/cordova/test/MainTestActivity.java +++ b/test/src/org/apache/cordova/test/MainTestActivity.java @@ -19,14 +19,34 @@ package org.apache.cordova.test; import org.apache.cordova.CordovaActivity; +import org.apache.cordova.CordovaInterfaceImpl; +import org.apache.cordova.CordovaWebView; +import android.content.Intent; import android.os.Bundle; -public class MainTestActivity extends CordovaActivity { +import java.util.concurrent.ArrayBlockingQueue; + +public class MainTestActivity extends BaseTestCordovaActivity { + public static final String START_URL = "file:///android_asset/www/index.html"; + /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - super.loadUrl("file:///android_asset/www/index.html"); + String url = getIntent().getStringExtra("testStartUrl"); + if (url == null) { + url = START_URL; + } + super.loadUrl(url); + } + + @Override protected void loadConfig() { + super.loadConfig(); + // Need to set this explicitly in prefs since it's not settable via bundle extras (for security reasons). + String errorUrl = getIntent().getStringExtra("testErrorUrl"); + if (errorUrl != null) { + preferences.set("errorUrl", errorUrl); + } } } diff --git a/test/src/org/apache/cordova/test/SabotagedActivity.java b/test/src/org/apache/cordova/test/SabotagedActivity.java deleted file mode 100644 index 7f3edc57..00000000 --- a/test/src/org/apache/cordova/test/SabotagedActivity.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.FileOutputStream; - -import org.apache.cordova.Config; -import org.apache.cordova.CordovaActivity; - -import android.content.res.AssetManager; -import android.os.Bundle; -import android.os.Environment; -import android.util.Log; - -public class SabotagedActivity extends CordovaActivity { - - private String BAD_ASSET = "www/error.html"; - private String LOG_TAG = "SabotagedActivity"; - - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - -// copyErrorAsset(); - super.init(); - super.loadUrl(Config.getStartUrl()); - } - - /* - * Sometimes we need to move code around before we can do anything. This will - * copy the bad code out of the assets before we initalize Cordova so that when Cordova actually - * initializes, we have something for it to navigate to. - */ - - private void copyErrorAsset () { - AssetManager assetManager = getAssets(); - String[] files = null; - try { - files = assetManager.list(BAD_ASSET); - } catch (IOException e) { - Log.e(LOG_TAG, e.getMessage()); - } - - for(String filename : files) { - InputStream in = null; - OutputStream out = null; - try { - in = assetManager.open(BAD_ASSET); - out = new FileOutputStream(Environment.getExternalStorageDirectory().toString() +"/" + filename); - copy(in, out); - in.close(); - in = null; - out.flush(); - out.close(); - out = null; - } catch(Exception e) { - Log.e("tag", e.getMessage()); - } - } - } - - - //Quick and Dirty Copy! - private void copy(InputStream in, OutputStream out) throws IOException { - byte[] buffer = new byte[1024]; - int read; - while((read = in.read(buffer)) != -1){ - out.write(buffer, 0, read); - } - } -} diff --git a/test/src/org/apache/cordova/test/backbuttonmultipage.java b/test/src/org/apache/cordova/test/backbuttonmultipage.java deleted file mode 100755 index d744198b..00000000 --- a/test/src/org/apache/cordova/test/backbuttonmultipage.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class backbuttonmultipage extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/background.java b/test/src/org/apache/cordova/test/background.java deleted file mode 100755 index d7ed1018..00000000 --- a/test/src/org/apache/cordova/test/background.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.test; - -import android.os.Bundle; - -import org.apache.cordova.*; - -public class background extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - //super.init(new FixWebView(this), new CordovaWebViewClient(this), new CordovaChromeClient(this)); - preferences.set("keepRunning", false); - super.loadUrl("file:///android_asset/www/background/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/errorurl.java b/test/src/org/apache/cordova/test/errorurl.java deleted file mode 100755 index e946e408..00000000 --- a/test/src/org/apache/cordova/test/errorurl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class errorurl extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - preferences.set("errorUrl", "file:///android_asset/www/htmlnotfound/error.html"); - super.loadUrl("file:///android_asset/www/htmlnotfound/index.html"); - } - - -} diff --git a/test/src/org/apache/cordova/test/htmlnotfound.java b/test/src/org/apache/cordova/test/htmlnotfound.java deleted file mode 100755 index c602922d..00000000 --- a/test/src/org/apache/cordova/test/htmlnotfound.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class htmlnotfound extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.init(); - super.loadUrl("file:///android_asset/www/htmlnotfound/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/iframe.java b/test/src/org/apache/cordova/test/iframe.java deleted file mode 100755 index 3d30cfb1..00000000 --- a/test/src/org/apache/cordova/test/iframe.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class iframe extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.loadUrl("file:///android_asset/www/iframe/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/junit/GapClientTest.java b/test/src/org/apache/cordova/test/junit/GapClientTest.java deleted file mode 100644 index ce6ca8c1..00000000 --- a/test/src/org/apache/cordova/test/junit/GapClientTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.test.junit; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginManager; -import org.apache.cordova.test.CordovaWebViewTestActivity; - -import android.content.Context; -import android.content.res.AssetManager; -import android.content.res.Resources; -import android.test.ActivityInstrumentationTestCase2; -import android.view.View; -import android.widget.FrameLayout; -import android.widget.LinearLayout; - -public class GapClientTest extends ActivityInstrumentationTestCase2 { - - private CordovaWebViewTestActivity testActivity; - private FrameLayout containerView; - private LinearLayout innerContainer; - private View testView; - private String rString; - - public GapClientTest() { - super("org.apache.cordova.test.activities",CordovaWebViewTestActivity.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 = innerContainer.getChildAt(0); - - } - - public void testPreconditions(){ - assertNotNull(innerContainer); - assertNotNull(testView); - } - - public void testForAndroidWebView() { - String className = testView.getClass().getSimpleName(); - assertTrue(className.equals("AndroidWebView")); - } - - -} diff --git a/test/src/org/apache/cordova/test/lifecycle.java b/test/src/org/apache/cordova/test/lifecycle.java deleted file mode 100755 index d1c42129..00000000 --- a/test/src/org/apache/cordova/test/lifecycle.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class lifecycle extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.loadUrl("file:///android_asset/www/lifecycle/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/loading.java b/test/src/org/apache/cordova/test/loading.java deleted file mode 100755 index da2c4ff5..00000000 --- a/test/src/org/apache/cordova/test/loading.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class loading extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - preferences.set("loadingDialog", "Testing,Loading..."); - super.loadUrl("http://www.google.com"); - } -} diff --git a/test/src/org/apache/cordova/test/menus.java b/test/src/org/apache/cordova/test/menus.java index 4c65ed5f..6ef12c5c 100755 --- a/test/src/org/apache/cordova/test/menus.java +++ b/test/src/org/apache/cordova/test/menus.java @@ -28,7 +28,7 @@ import android.view.ContextMenu.ContextMenuInfo; import org.apache.cordova.*; import org.apache.cordova.LOG; -public class menus extends CordovaActivity { +public class menus extends BaseTestCordovaActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/test/src/org/apache/cordova/test/splashscreen.java b/test/src/org/apache/cordova/test/splashscreen.java deleted file mode 100755 index 34051bbf..00000000 --- a/test/src/org/apache/cordova/test/splashscreen.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class splashscreen extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.init(); - - // Show splashscreen - preferences.set("splashscreen", "sandy"); - - super.loadUrl("file:///android_asset/www/splashscreen/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/tests.java b/test/src/org/apache/cordova/test/tests.java deleted file mode 100755 index 64ad56ee..00000000 --- a/test/src/org/apache/cordova/test/tests.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class tests extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.init(); - //super.pluginManager.addService("Activity", "org.apache.cordova.test.ActivityPlugin"); - super.loadUrl("file:///android_asset/www/index.html"); - } -} diff --git a/test/src/org/apache/cordova/test/timeout.java b/test/src/org/apache/cordova/test/timeout.java deleted file mode 100755 index 8a418a30..00000000 --- a/test/src/org/apache/cordova/test/timeout.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class timeout extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.init(); - - // Short timeout to cause error - preferences.set("loadUrlTimeoutValue", 10); - super.loadUrl("http://www.google.com"); - } -} diff --git a/test/src/org/apache/cordova/test/whitelist.java b/test/src/org/apache/cordova/test/whitelist.java deleted file mode 100755 index e2029a99..00000000 --- a/test/src/org/apache/cordova/test/whitelist.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import android.webkit.WebView; - -import org.apache.cordova.*; - -public class whitelist extends MainTestActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.init(); - ((AndroidWebView)appView).setWebViewClient(new TestViewClient(cordovaInterface, ((AndroidWebView)appView))); - super.loadUrl("file:///android_asset/www/whitelist/index.html"); - } - - /** - * This class can be used to override the GapViewClient and receive notification of webview events. - */ - public class TestViewClient extends AndroidWebViewClient { - - public TestViewClient(CordovaInterface ctx, AndroidWebView app) { - super(ctx, app); - } - - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - LOG.d("whitelist", "shouldOverrideUrlLoading(" + url + ")"); - LOG.d("whitelist", "originalUrl=" + view.getOriginalUrl()); - return super.shouldOverrideUrlLoading(view, url); - } - } -} diff --git a/test/src/org/apache/cordova/test/xhr.java b/test/src/org/apache/cordova/test/xhr.java deleted file mode 100755 index 4f73926f..00000000 --- a/test/src/org/apache/cordova/test/xhr.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.test; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class xhr extends CordovaActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - super.loadUrl("file:///android_asset/www/xhr/index.html"); - } -}