Commit 35785a90 authored by Joel Martin's avatar Joel Martin

Add binary/base64 data mode to perf/playback tests.

parent 6f4b1e40
...@@ -371,8 +371,9 @@ function close() { ...@@ -371,8 +371,9 @@ function close() {
// Override internal functions for testing // Override internal functions for testing
// Takes a send function, returns reference to recv function // Takes a send function, returns reference to recv function
function testMode(override_send) { function testMode(override_send, data_mode) {
test_mode = true; test_mode = true;
mode = data_mode;
api.send = override_send; api.send = override_send;
api.close = function () {}; api.close = function () {};
return recv_message; return recv_message;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<title>VNC Performance Benchmark</title> <title>VNC Performance Benchmark</title>
<link rel="stylesheet" href="../include/base.css">
</head> </head>
<body> <body>
...@@ -38,6 +37,8 @@ ...@@ -38,6 +37,8 @@
<script type="text/javascript"> <script type="text/javascript">
var INCLUDE_URI= "../include/"; var INCLUDE_URI= "../include/";
// TODO: Data file should override
var VNC_frame_encoding = "base64";
</script> </script>
<script src="../include/util.js"></script> <script src="../include/util.js"></script>
<script src="../include/playback.js"></script> <script src="../include/playback.js"></script>
...@@ -201,7 +202,7 @@ ...@@ -201,7 +202,7 @@
} }
rfb = new RFB({'target': $D('VNC_canvas'), rfb = new RFB({'target': $D('VNC_canvas'),
'updateState': updateState}); 'updateState': updateState});
rfb.testMode(send_array); rfb.testMode(send_array, VNC_frame_encoding);
} }
</script> </script>
</html> </html>
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<title>VNC Playback</title> <title>VNC Playback</title>
<link rel="stylesheet" href="../include/plain.css">
</head> </head>
<body> <body>
...@@ -40,6 +39,8 @@ ...@@ -40,6 +39,8 @@
<script type="text/javascript"> <script type="text/javascript">
var INCLUDE_URI= "../include/"; var INCLUDE_URI= "../include/";
// TODO: Data file should override
var VNC_frame_encoding = "base64";
</script> </script>
<script src="../include/util.js"></script> <script src="../include/util.js"></script>
<script src="../include/webutil.js"></script> <script src="../include/webutil.js"></script>
...@@ -98,7 +99,7 @@ ...@@ -98,7 +99,7 @@
mode = 'realtime'; mode = 'realtime';
} }
recv_message = rfb.testMode(send_array); recv_message = rfb.testMode(send_array, VNC_frame_encoding);
next_iteration(); next_iteration();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment