summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
commiteda567b364a06e9e63efb865a6b1c73f1cb5232e (patch)
tree912ab15d877f733318e2c0394713bca33b830547 /toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs
parent80eb356d57fc310cdf812cae63de30d6e56c1788 (diff)
downloadUXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.gz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.lz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.xz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.zip
[AllAM] Remove Mozilla Tests
Diffstat (limited to 'toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs')
-rw-r--r--toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs43
1 files changed, 0 insertions, 43 deletions
diff --git a/toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs b/toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs
deleted file mode 100644
index 38bc25d08..000000000
--- a/toolkit/mozapps/webextensions/test/browser/cancelCompatCheck.sjs
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Delay before responding to an HTTP call attempting to read
-// an addon update RDF file
-
-function handleRequest(req, resp) {
- resp.processAsync();
- resp.setHeader("Cache-Control", "no-cache, no-store", false);
- resp.setHeader("Content-Type", "text/xml;charset=utf-8", false);
-
- let file = null;
- getObjectState("SERVER_ROOT", function(serverRoot)
- {
- file = serverRoot.getFile("browser/toolkit/mozapps/extensions/test/browser/browser_bug557956.rdf");
- });
- dump("*** cancelCompatCheck.sjs: " + file.path + "\n");
- let fstream = Components.classes["@mozilla.org/network/file-input-stream;1"].
- createInstance(Components.interfaces.nsIFileInputStream);
- fstream.init(file, -1, 0, 0);
- let cstream = null;
- cstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"].
- createInstance(Components.interfaces.nsIConverterInputStream);
- cstream.init(fstream, "UTF-8", 0, 0);
-
- // The delay can be passed on the query string
- let delay = req.queryString + 0;
-
- timer = Components.classes["@mozilla.org/timer;1"].
- createInstance(Components.interfaces.nsITimer);
- timer.init(function sendFile() {
- dump("cancelCompatCheck: starting to send file\n");
- let str = {};
- let read = 0;
- do {
- // read as much as we can and put it in str.value
- read = cstream.readString(0xffffffff, str);
- resp.write(str.value);
- } while (read != 0);
- cstream.close();
- resp.finish();
- }, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
-}