summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/fetch/slow.sjs
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-11 08:51:07 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-06-13 11:52:04 +0200
commitbb7060582934f087b71702d1e83f762d5fd6f0af (patch)
treef61da2175542328c6a5e7a69280874dd1298f9b6 /dom/tests/mochitest/fetch/slow.sjs
parent3f3d626434b2533182ca0ee90adc92a1e7db373c (diff)
downloadUXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.gz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.lz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.xz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.zip
Issue #1587 - Part 5: Hook FetchObserver up to the Fetch API
Diffstat (limited to 'dom/tests/mochitest/fetch/slow.sjs')
-rw-r--r--dom/tests/mochitest/fetch/slow.sjs11
1 files changed, 11 insertions, 0 deletions
diff --git a/dom/tests/mochitest/fetch/slow.sjs b/dom/tests/mochitest/fetch/slow.sjs
new file mode 100644
index 000000000..feab0f1fc
--- /dev/null
+++ b/dom/tests/mochitest/fetch/slow.sjs
@@ -0,0 +1,11 @@
+function handleRequest(request, response)
+{
+ response.processAsync();
+
+ timer = Components.classes["@mozilla.org/timer;1"].
+ createInstance(Components.interfaces.nsITimer);
+ timer.init(function() {
+ response.write("Here the content. But slowly.");
+ response.finish();
+ }, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
+}