From fda40d8927fda5fedbb6c9ca60532b5213071c36 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Mon, 17 Nov 2014 14:19:19 -0500 Subject: [PATCH] Fix broken tests from changing default screen size Commit 795fca23dc6cf124b2e6969ee42bd8e7c836d605 changed the default size from 640 to 240. This broke a couple tests which depended on the default size being 640. Those tests have now been fixed. --- tests/test.rfb.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test.rfb.js b/tests/test.rfb.js index fb32af0f..6233fa8f 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -1083,8 +1083,8 @@ describe('Remote Frame Buffer Protocol Client', function() { it('should send an update request if there is sufficient data', function () { var expected_cdr = { cleanBox: { x: 0, y: 0, w: 0, h: 0 }, - dirtyBoxes: [ { x: 0, y: 0, w: 640, h: 20 } ] }; - var expected_msg = RFB.messages.fbUpdateRequests(expected_cdr, 640, 20); + dirtyBoxes: [ { x: 0, y: 0, w: 240, h: 20 } ] }; + var expected_msg = RFB.messages.fbUpdateRequests(expected_cdr, 240, 20); client._framebufferUpdate = function () { return true; }; client._sock._websocket._receive_data(new Uint8Array([0])); @@ -1099,8 +1099,8 @@ describe('Remote Frame Buffer Protocol Client', function() { it('should resume receiving an update if we previously did not have enough data', function () { var expected_cdr = { cleanBox: { x: 0, y: 0, w: 0, h: 0 }, - dirtyBoxes: [ { x: 0, y: 0, w: 640, h: 20 } ] }; - var expected_msg = RFB.messages.fbUpdateRequests(expected_cdr, 640, 20); + dirtyBoxes: [ { x: 0, y: 0, w: 240, h: 20 } ] }; + var expected_msg = RFB.messages.fbUpdateRequests(expected_cdr, 240, 20); // just enough to set FBU.rects client._sock._websocket._receive_data(new Uint8Array([0, 0, 0, 3]));