summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2014-09-19 15:14:34 -0400
committerSolly Ross <sross@redhat.com>2014-09-19 15:14:34 -0400
commit3b4fd003c2ba6e0294282ea203e6ead6e9275317 (patch)
treef13509021f44cefc0369ab823e3c4ccefd8d3aec
parent53762c31fe21a7ac39f124cd3dfb0d3f894ebe7c (diff)
downloadnovnc-3b4fd003c2ba6e0294282ea203e6ead6e9275317.tar.gz
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.
-rw-r--r--tests/test.rfb.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.rfb.js b/tests/test.rfb.js
index 6462587..fb32af0 100644
--- a/tests/test.rfb.js
+++ b/tests/test.rfb.js
@@ -1520,6 +1520,7 @@ describe('Remote Frame Buffer Protocol Client', function() {
});
it('should send a mask of 0 on mouseup', function () {
+ client._mouse_buttonMask = 0x001;
client._mouse._onMouseButton(10, 12, 0, 0x001);
expect(client._sock.send).to.have.been.calledOnce;
var pointer_msg = RFB.messages.pointerEvent(10, 12, 0x000);