Fix last rect test
Avoid poking in to internals and instead test that the RFB object responds correctly to new messages.
This commit is contained in:
parent
549ccc7121
commit
13fa6b5908
|
|
@ -2873,7 +2873,11 @@ describe('Remote Frame Buffer Protocol Client', function () {
|
||||||
|
|
||||||
it('should handle the last_rect pseudo-encoding', function () {
|
it('should handle the last_rect pseudo-encoding', function () {
|
||||||
sendFbuMsg([{ x: 0, y: 0, width: 0, height: 0, encoding: -224}], [[]], client, 100);
|
sendFbuMsg([{ x: 0, y: 0, width: 0, height: 0, encoding: -224}], [[]], client, 100);
|
||||||
expect(client._FBU.rects).to.equal(0);
|
// Send a bell message and make sure it is parsed
|
||||||
|
let spy = sinon.spy();
|
||||||
|
client.addEventListener("bell", spy);
|
||||||
|
client._sock._websocket._receiveData(new Uint8Array([0x02]));
|
||||||
|
expect(spy).to.have.been.calledOnce;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle the DesktopName pseudo-encoding', function () {
|
it('should handle the DesktopName pseudo-encoding', function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue