summaryrefslogtreecommitdiffstats
path: root/mobile/android/tests/javaaddons
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/android/tests/javaaddons')
-rw-r--r--mobile/android/tests/javaaddons/AndroidManifest.xml.in14
-rw-r--r--mobile/android/tests/javaaddons/Makefile.in11
-rw-r--r--mobile/android/tests/javaaddons/moz.build23
-rw-r--r--mobile/android/tests/javaaddons/res/values/strings.xml3
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java11
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java24
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java59
7 files changed, 0 insertions, 145 deletions
diff --git a/mobile/android/tests/javaaddons/AndroidManifest.xml.in b/mobile/android/tests/javaaddons/AndroidManifest.xml.in
deleted file mode 100644
index b44930b1b..000000000
--- a/mobile/android/tests/javaaddons/AndroidManifest.xml.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.mozilla.javaaddons.test"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-sdk android:minSdkVersion="@MOZ_ANDROID_MIN_SDK_VERSION@"
-#ifdef MOZ_ANDROID_MAX_SDK_VERSION
- android:maxSdkVersion="@MOZ_ANDROID_MAX_SDK_VERSION@"
-#endif
- android:targetSdkVersion="@ANDROID_TARGET_SDK@"/>
-
-</manifest>
diff --git a/mobile/android/tests/javaaddons/Makefile.in b/mobile/android/tests/javaaddons/Makefile.in
deleted file mode 100644
index 4baac3f16..000000000
--- a/mobile/android/tests/javaaddons/Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
-
-ANDROID_EXTRA_JARS := javaaddons-test.jar
-
-include $(topsrcdir)/config/rules.mk
-
-tools libs:: $(ANDROID_APK_NAME).apk
diff --git a/mobile/android/tests/javaaddons/moz.build b/mobile/android/tests/javaaddons/moz.build
deleted file mode 100644
index 2fabebc56..000000000
--- a/mobile/android/tests/javaaddons/moz.build
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-ANDROID_APK_NAME = 'javaaddons-test'
-ANDROID_APK_PACKAGE = 'org.mozilla.javaaddons.test'
-
-jar = add_java_jar('javaaddons-test')
-jar.extra_jars += [
- TOPOBJDIR + '/mobile/android/javaaddons/javaaddons-1.0.jar',
-]
-jar.javac_flags += ['-Xlint:all']
-jar.sources += [
- 'src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java',
- 'src/org/mozilla/javaaddons/test/JavaAddonV0.java',
- 'src/org/mozilla/javaaddons/test/JavaAddonV1.java',
-]
-
-OBJDIR_PP_FILES.mobile.android.tests.javaaddons += [
- 'AndroidManifest.xml.in',
-]
diff --git a/mobile/android/tests/javaaddons/res/values/strings.xml b/mobile/android/tests/javaaddons/res/values/strings.xml
deleted file mode 100644
index e4602bbdf..000000000
--- a/mobile/android/tests/javaaddons/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<resources>
- <string name="app_name">org.mozilla.javaaddons.test</string>
-</resources>
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java
deleted file mode 100644
index 93bf5e7cd..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-public class ClassWithNoRecognizedConstructors {
- public ClassWithNoRecognizedConstructors(int a, String b, boolean c) {
- }
-}
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java
deleted file mode 100644
index f0ea79535..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-
-import java.util.Map;
-
-public class JavaAddonV0 implements Handler.Callback {
- public JavaAddonV0(Map<String, Handler.Callback> callbacks) {
- callbacks.put("JavaAddon:V0", this);
- }
-
- @Override
- public boolean handleMessage(Message message) {
- Log.i("JavaAddon", "handleMessage " + message.toString());
- return true;
- }
-}
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java
deleted file mode 100644
index 803a0d740..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-import android.content.Context;
-import android.util.Log;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventCallback;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventDispatcher;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventListener;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.RequestCallback;
-
-public class JavaAddonV1 implements EventListener, RequestCallback {
- protected final EventDispatcher mDispatcher;
-
- public JavaAddonV1(Context context, EventDispatcher dispatcher) {
- mDispatcher = dispatcher;
- mDispatcher.registerEventListener(this, "JavaAddon:V1");
- }
-
- @Override
- public void handleMessage(Context context, String event, JSONObject message, EventCallback callback) {
- Log.i("JavaAddon", "handleMessage: " + event + ", " + message.toString());
- final JSONObject output = new JSONObject();
- try {
- output.put("outputStringKey", "inputStringKey=" + message.getString("inputStringKey"));
- output.put("outputIntKey", 1 + message.getInt("inputIntKey"));
- } catch (JSONException e) {
- // Should never happen; ignore.
- }
- // Respond.
- if (callback != null) {
- callback.sendSuccess(output);
- }
-
- // And send an independent Gecko event.
- final JSONObject input = new JSONObject();
- try {
- input.put("inputStringKey", "raw");
- input.put("inputIntKey", 3);
- } catch (JSONException e) {
- // Should never happen; ignore.
- }
- mDispatcher.sendRequestToGecko("JavaAddon:V1:Request", input, this);
- }
-
- @Override
- public void onResponse(Context context, JSONObject jsonObject) {
- Log.i("JavaAddon", "onResponse: " + jsonObject.toString());
- // Unregister event listener, so that the JavaScript side can send a test message and
- // check it is not handled.
- mDispatcher.unregisterEventListener(this);
- mDispatcher.sendRequestToGecko("JavaAddon:V1:VerificationRequest", jsonObject, null);
- }
-}