aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py')
m---------tests/wpt/web-platform-tests0
-rw-r--r--tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py12
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests b/tests/wpt/web-platform-tests
deleted file mode 160000
-Subproject 29dfb8944e535d439ca94cf7d1b1d9138a8ad11
diff --git a/tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py b/tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py
new file mode 100644
index 00000000000..0e709445c59
--- /dev/null
+++ b/tests/wpt/web-platform-tests/XMLHttpRequest/resources/trickle.py
@@ -0,0 +1,12 @@
+import time
+
+def main(request, response):
+ delay = float(request.GET.first("ms", 500)) / 1E3
+ count = int(request.GET.first("count", 50))
+ time.sleep(delay)
+ response.headers.set("Content-type", "text/plain")
+ response.write_status_headers()
+ time.sleep(delay);
+ for i in xrange(count):
+ response.writer.write_content("TEST_TRICKLE\n")
+ time.sleep(delay)