Commit 3b4fd003 authored by Solly Ross's avatar Solly Ross

Fixed broken mouse test in test.rfb.js

Because we use the XOR (`^`) operator, the button mask must be
set before a MouseUp event happens, otherwise we'll send a pointer
event like it was a MouseDown event.  The button mask was not set
in one of the tests, so the test was failing.
parent 53762c31
...@@ -1520,6 +1520,7 @@ describe('Remote Frame Buffer Protocol Client', function() { ...@@ -1520,6 +1520,7 @@ describe('Remote Frame Buffer Protocol Client', function() {
}); });
it('should send a mask of 0 on mouseup', function () { it('should send a mask of 0 on mouseup', function () {
client._mouse_buttonMask = 0x001;
client._mouse._onMouseButton(10, 12, 0, 0x001); client._mouse._onMouseButton(10, 12, 0, 0x001);
expect(client._sock.send).to.have.been.calledOnce; expect(client._sock.send).to.have.been.calledOnce;
var pointer_msg = RFB.messages.pointerEvent(10, 12, 0x000); var pointer_msg = RFB.messages.pointerEvent(10, 12, 0x000);
......
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