summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-21 13:59:33 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-21 13:59:33 +0000
commit0896840ce13ca93bbd4b54810c89ef747a113db6 (patch)
tree278bcdc836a887b16e2f077d355a4a22a85351e7
parent7daf034fd94a8a07f9cbb5d070a085de69d184fd (diff)
downloadnetsurf-test-0896840ce13ca93bbd4b54810c89ef747a113db6.tar.gz
netsurf-test-0896840ce13ca93bbd4b54810c89ef747a113db6.tar.bz2
Fixups for async timeout test
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--cgi-bin/and-then-js-async-cb-adds-timeout.js2
-rwxr-xr-xcgi-bin/and-then-js.cgi6
2 files changed, 3 insertions, 5 deletions
diff --git a/cgi-bin/and-then-js-async-cb-adds-timeout.js b/cgi-bin/and-then-js-async-cb-adds-timeout.js
index b53678b..e232561 100644
--- a/cgi-bin/and-then-js-async-cb-adds-timeout.js
+++ b/cgi-bin/and-then-js-async-cb-adds-timeout.js
@@ -6,6 +6,6 @@
setTimeout(1000, function() {
/* Add a <script> tag */
var script = document.createElement("SCRIPT");
- script.src = "https://test.netsurf-browser.org/hello-world.js";
+ script.src = "https://test.netsurf-browser.org/html/hello-world.js";
document.body.appendChild(script);
});
diff --git a/cgi-bin/and-then-js.cgi b/cgi-bin/and-then-js.cgi
index 1930df3..6c03589 100755
--- a/cgi-bin/and-then-js.cgi
+++ b/cgi-bin/and-then-js.cgi
@@ -16,9 +16,7 @@ print("")
sleep_time = int(qs.get("t", [1])[0])
-print("{}Sleeping for {} seconds".format(prefix, sleep_time))
-
time.sleep(sleep_time)
-print("{}Done sleeping {} seconds".format(prefix,sleep_time))
-
+with open("and-then-js-{}.js".format(content)) as fh:
+ print(fh.read())