diff options
Diffstat (limited to 'mobile/android/tests/browser/robocop/roboextender')
7 files changed, 0 insertions, 194 deletions
diff --git a/mobile/android/tests/browser/robocop/roboextender/Makefile.in b/mobile/android/tests/browser/robocop/roboextender/Makefile.in deleted file mode 100644 index 07d7992ac..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/Makefile.in +++ /dev/null @@ -1,9 +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/. - -TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions - -tools:: - -cp $(DEPTH)/mobile/android/tests/javaaddons/javaaddons-test.apk $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/base diff --git a/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html b/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html deleted file mode 100644 index 9a9456604..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html +++ /dev/null @@ -1,37 +0,0 @@ -<html> - <head> - <title>HomeBanner test page</title> - <meta name="viewport" content="initial-scale=1.0"/> - <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> - <script type="application/javascript"> -Components.utils.import("resource://gre/modules/Messaging.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/Home.jsm"); - -const TEXT = "The quick brown fox jumps over the lazy dog."; - -function start() { - var test = location.hash.substring(1); - window[test](); -} - -var messageId; - -function addMessage() { - messageId = Home.banner.add({ - text: TEXT, - onshown: function() { - Messaging.sendRequest({ type: "TestHomeBanner:MessageShown" }); - }, - ondismiss: function() { - Messaging.sendRequest({ type: "TestHomeBanner:MessageDismissed" }); - } - }); - Messaging.sendRequest({ type: "TestHomeBanner:MessageAdded" }); -} - - </script> - </head> - <body onload="start();"> - </body> -</html> diff --git a/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html b/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html deleted file mode 100644 index 733683c16..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html +++ /dev/null @@ -1,51 +0,0 @@ -<html> - <head> - <title>IconGrid test page</title> - <meta name="viewport" content="initial-scale=1.0"/> - <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> - <script type="application/javascript"> -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/Prompt.jsm"); - -function start() { - var test = location.hash.substring(1); - window[test](); -} - -function test1() { - var p = new Prompt({ - title: "Prompt 1", - buttons: [ - "OK" - ], - }).addIconGrid({ - items: [ - { iconUri: "drawable://alert_camera", name: "Icon 1", selected: true }, - { iconUri: "drawable://alert_download", name: "Icon 2" }, - { iconUri: "drawable://icon", name: "Icon 3" }, - { iconUri: "drawable://icon", name: "Icon 4" }, - { iconUri: "drawable://icon", name: "Icon 5" }, - { iconUri: "drawable://icon", name: "Icon 6" }, - { iconUri: "drawable://icon", name: "Icon 7" }, - { iconUri: "drawable://icon", name: "Icon 8" }, - { iconUri: "drawable://icon", name: "Icon 9" }, - { iconUri: "drawable://icon", name: "Icon 10" }, - { iconUri: "drawable://icon", name: "Icon 11" }, - ] - }); - p.show(function(data) { - sendResult(data.icongrid0 == 10, "Got result " + data.icongrid0); - }); -} - -function sendResult(pass, message) { - setTimeout(function() { - alert((pass ? "PASS " : "FAIL ") + message); - }, 1000); -} - </script> - </head> - <body onload="start();"> - </body> -</html> diff --git a/mobile/android/tests/browser/robocop/roboextender/bootstrap.js b/mobile/android/tests/browser/robocop/roboextender/bootstrap.js deleted file mode 100644 index e903aa3f6..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/bootstrap.js +++ /dev/null @@ -1,65 +0,0 @@ - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -Cu.import("resource://gre/modules/Services.jsm"); - -function loadIntoWindow(window) {} -function unloadFromWindow(window) {} - -function _sendMessageToJava (aMsg) { - return Services.androidBridge.handleGeckoMessage(aMsg); -}; - -/* - bootstrap.js API -*/ -var windowListener = { - onOpenWindow: function(aWindow) { - // Wait for the window to finish loading - let domWindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow); - domWindow.addEventListener("load", function() { - domWindow.removeEventListener("load", arguments.callee, false); - if (domWindow) { - domWindow.addEventListener("scroll", function(e) { - let message = { - type: 'robocop:scroll', - y: XPCNativeWrapper.unwrap(e.target).documentElement.scrollTop, - height: XPCNativeWrapper.unwrap(e.target).documentElement.scrollHeight, - cheight: XPCNativeWrapper.unwrap(e.target).documentElement.clientHeight, - }; - _sendMessageToJava(message); - }); - } - }, false); - }, - onCloseWindow: function(aWindow) { }, - onWindowTitleChange: function(aWindow, aTitle) { } -}; - -function startup(aData, aReason) { - let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); - - // Load into any new windows - wm.addListener(windowListener); - Services.obs.addObserver(function observe(aSubject, aTopic, aData) { - dump("Robocop:Quit received -- requesting quit"); - let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup); - appStartup.quit(Ci.nsIAppStartup.eForceQuit); - }, "Robocop:Quit", false); -} - -function shutdown(aData, aReason) { - // When the application is shutting down we normally don't have to clean up any UI changes - if (aReason == APP_SHUTDOWN) return; - - let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); - - // Stop watching for new windows - wm.removeListener(windowListener); -} - -function install(aData, aReason) { } -function uninstall(aData, aReason) { } - diff --git a/mobile/android/tests/browser/robocop/roboextender/chrome.manifest b/mobile/android/tests/browser/robocop/roboextender/chrome.manifest deleted file mode 100644 index 7467f91a6..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -content roboextender base/
\ No newline at end of file diff --git a/mobile/android/tests/browser/robocop/roboextender/install.rdf b/mobile/android/tests/browser/robocop/roboextender/install.rdf deleted file mode 100644 index cbf66e884..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/install.rdf +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0"?> -<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> - <Description about="urn:mozilla:install-manifest"> - <em:id>roboextender@mozilla.org</em:id> - <em:type>2</em:type> - <em:name>Robocop Extender</em:name> - <em:version>1.0</em:version> - <em:bootstrap>true</em:bootstrap> - <em:creator>Joel Maher</em:creator> - <em:targetApplication> - <Description> - <em:id>toolkit@mozilla.org</em:id> - <em:minVersion>10.0</em:minVersion> - <em:maxVersion>*</em:maxVersion> - </Description> - </em:targetApplication> - </Description> -</RDF> - diff --git a/mobile/android/tests/browser/robocop/roboextender/moz.build b/mobile/android/tests/browser/robocop/roboextender/moz.build deleted file mode 100644 index e2388a2b8..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/moz.build +++ /dev/null @@ -1,12 +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/. - -TEST_HARNESS_FILES.testing.mochitest.extensions['roboextender@mozilla.org'] += [ - 'base/**', - 'bootstrap.js', - 'chrome.manifest', - 'install.rdf', -] |