aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py2
-rw-r--r--tests/sockets/webrtc_host.c2
-rw-r--r--tests/test_sockets.py12
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/runner.py b/tests/runner.py
index af671c11..2c6af351 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -480,7 +480,7 @@ def server_func(dir, q):
if 'report_' in s.path:
q.put(s.path)
else:
- filename = s.path[1:]
+ filename = s.path.split('?')[0][1:]
if os.path.exists(filename):
s.send_response(200)
s.send_header("Content-type", "text/html")
diff --git a/tests/sockets/webrtc_host.c b/tests/sockets/webrtc_host.c
index 410184ad..770e59e0 100644
--- a/tests/sockets/webrtc_host.c
+++ b/tests/sockets/webrtc_host.c
@@ -39,7 +39,7 @@ void iter(void* arg) {
#if EMSCRIPTEN
int result = 1;
- // REPORT_RESULT();
+ REPORT_RESULT();
exit(EXIT_SUCCESS);
emscripten_cancel_main_loop();
#endif
diff --git a/tests/test_sockets.py b/tests/test_sockets.py
index 70679b15..4f6ee2a9 100644
--- a/tests/test_sockets.py
+++ b/tests/test_sockets.py
@@ -223,10 +223,10 @@ class sockets(BrowserCore):
session: undefined,
onpeer: function(peer, route) {
window.open('http://localhost:8888/peer.html?' + route);
- //iframe = document.createElement("IFRAME");
- //iframe.setAttribute("src", "http://localhost:8888/peer.html?" + route);
- //iframe.style.display = "none";
- //document.body.appendChild(iframe);
+ // iframe = document.createElement("IFRAME");
+ // iframe.setAttribute("src", "http://localhost:8888/peer.html?" + route);
+ // iframe.style.display = "none";
+ // document.body.appendChild(iframe);
peer.listen();
},
onconnect: function(peer) {
@@ -236,7 +236,7 @@ class sockets(BrowserCore):
onerror: function(error) {
console.error(error);
}
- }
+ },
};
''')
@@ -251,6 +251,8 @@ class sockets(BrowserCore):
onconnect: function(peer) {
},
ondisconnect: function(peer) {
+ // Calling window.close() from this handler hangs my browser, so run it in the next turn
+ setTimeout(window.close, 0);
},
onerror: function(error) {
console.error(error);