aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-08-23 18:12:02 -0700
committerAnthony Pesch <inolen@gmail.com>2013-08-23 18:12:19 -0700
commit63e5aee15fae754383edfd9f3faa5b161efeeef3 (patch)
tree07a60570c381ef60cf27a8082e2fa2c588574854
parent51278aa1eb63648b883d93102bc7126e8fb123b1 (diff)
add USE_IFRAME define to support compiled servers
-rw-r--r--tests/sockets/test_enet_client.c2
-rw-r--r--tests/test_sockets.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/sockets/test_enet_client.c b/tests/sockets/test_enet_client.c
index bf14375c..afcdcae8 100644
--- a/tests/sockets/test_enet_client.c
+++ b/tests/sockets/test_enet_client.c
@@ -93,6 +93,7 @@ int main (int argc, char ** argv)
}
#if EMSCRIPTEN
+#if USE_IFRAME
emscripten_run_script("console.log('adding iframe');"
"var iframe = document.createElement('iframe');"
"iframe.src = 'server.html';"
@@ -101,6 +102,7 @@ int main (int argc, char ** argv)
"document.body.appendChild(iframe);"
"console.log('added.');");
#endif
+#endif
#if EMSCRIPTEN
emscripten_set_main_loop(main_loop, 3, 1);
diff --git a/tests/test_sockets.py b/tests/test_sockets.py
index 4e8bbd75..82ddc6fe 100644
--- a/tests/test_sockets.py
+++ b/tests/test_sockets.py
@@ -179,7 +179,7 @@ class sockets(BrowserCore):
try:
proc = make_relay_server(2234, 2236)
pids.append(proc.pid)
- self.btest(os.path.join('sockets', 'test_enet_client.c'), expected='0', args=['-DSOCKK=2237'] + enet)
+ self.btest(os.path.join('sockets', 'test_enet_client.c'), expected='0', args=['-DSOCKK=2237', '-DUSE_IFRAME'] + enet)
finally:
clean_pids(pids);