From 35785a908175cfe73e0105c2169e6936952ac4c2 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Wed, 17 Oct 2012 11:50:50 -0500 Subject: [PATCH] Add binary/base64 data mode to perf/playback tests. --- include/websock.js | 3 ++- tests/vnc_perf.html | 5 +++-- tests/vnc_playback.html | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/websock.js b/include/websock.js index 782a11940..9d6a30602 100644 --- a/include/websock.js +++ b/include/websock.js @@ -371,8 +371,9 @@ function close() { // Override internal functions for testing // Takes a send function, returns reference to recv function -function testMode(override_send) { +function testMode(override_send, data_mode) { test_mode = true; + mode = data_mode; api.send = override_send; api.close = function () {}; return recv_message; diff --git a/tests/vnc_perf.html b/tests/vnc_perf.html index d75394ec0..10c897172 100644 --- a/tests/vnc_perf.html +++ b/tests/vnc_perf.html @@ -2,7 +2,6 @@ VNC Performance Benchmark - @@ -38,6 +37,8 @@ @@ -201,7 +202,7 @@ } rfb = new RFB({'target': $D('VNC_canvas'), 'updateState': updateState}); - rfb.testMode(send_array); + rfb.testMode(send_array, VNC_frame_encoding); } diff --git a/tests/vnc_playback.html b/tests/vnc_playback.html index 5ef0e4496..18741f74f 100644 --- a/tests/vnc_playback.html +++ b/tests/vnc_playback.html @@ -2,7 +2,6 @@ VNC Playback - @@ -40,6 +39,8 @@ @@ -98,7 +99,7 @@ mode = 'realtime'; } - recv_message = rfb.testMode(send_array); + recv_message = rfb.testMode(send_array, VNC_frame_encoding); next_iteration(); }