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/test_sockets.py | |
parent | ddc6000c88caafd7ae53f37728e5b315ddd8f877 (diff) |
Minor fixes for webrtc test.
Diffstat (limited to 'tests/test_sockets.py')
-rw-r--r-- | tests/test_sockets.py | 12 |
1 files changed, 7 insertions, 5 deletions
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); |