[go: nahoru, domu]

Skip to content

Commit

Permalink
Add binary/base64 data mode to perf/playback tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanaka committed Oct 17, 2012
1 parent 6f4b1e4 commit 35785a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/websock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions tests/vnc_perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<title>VNC Performance Benchmark</title>
<link rel="stylesheet" href="../include/base.css">
</head>
<body>

Expand Down Expand Up @@ -38,6 +37,8 @@

<script type="text/javascript">
var INCLUDE_URI= "../include/";
// TODO: Data file should override
var VNC_frame_encoding = "base64";
</script>
<script src="../include/util.js"></script>
<script src="../include/playback.js"></script>
Expand Down Expand Up @@ -201,7 +202,7 @@
}
rfb = new RFB({'target': $D('VNC_canvas'),
'updateState': updateState});
rfb.testMode(send_array);
rfb.testMode(send_array, VNC_frame_encoding);
}
</script>
</html>
5 changes: 3 additions & 2 deletions tests/vnc_playback.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<title>VNC Playback</title>
<link rel="stylesheet" href="../include/plain.css">
</head>
<body>

Expand Down Expand Up @@ -40,6 +39,8 @@

<script type="text/javascript">
var INCLUDE_URI= "../include/";
// TODO: Data file should override
var VNC_frame_encoding = "base64";
</script>
<script src="../include/util.js"></script>
<script src="../include/webutil.js"></script>
Expand Down Expand Up @@ -98,7 +99,7 @@
mode = 'realtime';
}

recv_message = rfb.testMode(send_array);
recv_message = rfb.testMode(send_array, VNC_frame_encoding);
next_iteration();
}

Expand Down

0 comments on commit 35785a9

Please sign in to comment.