diff options
author | Alan Kligman <ack@mozilla.com> | 2013-08-14 00:58:28 -0400 |
---|---|---|
committer | Alan Kligman <ack@mozilla.com> | 2013-08-14 00:58:28 -0400 |
commit | 2d51d99e4f77aed13d05e40b24976b62f8e926d0 (patch) | |
tree | fd1f92584ff2420134a3499490c9606cc77d809c /tests | |
parent | ddc6000c88caafd7ae53f37728e5b315ddd8f877 (diff) |
Minor fixes for webrtc test.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 2 | ||||
-rw-r--r-- | tests/sockets/webrtc_host.c | 2 | ||||
-rw-r--r-- | tests/test_sockets.py | 12 |
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); |