]>
git.proxmox.com Git - mirror_novnc.git/blob - tests/test.tight.js
c6823dd5b21b9b9ef5f28c57a4c67b1574f2d81c
1 const expect
= chai
.expect
;
3 import Websock
from '../core/websock.js';
4 import Display
from '../core/display.js';
6 import TightDecoder
from '../core/decoders/tight.js';
8 import FakeWebSocket
from './fake.websocket.js';
10 function testDecodeRect(decoder
, x
, y
, width
, height
, data
, display
, depth
) {
14 sock
.open("ws://example.com");
16 sock
.on('message', () => {
17 decoder
.decodeRect(x
, y
, width
, height
, sock
, display
, depth
);
20 sock
._websocket
._receiveData(new Uint8Array(data
));
25 describe('Tight Decoder', function () {
29 before(FakeWebSocket
.replace
);
30 after(FakeWebSocket
.restore
);
32 beforeEach(function () {
33 decoder
= new TightDecoder();
34 display
= new Display(document
.createElement('canvas'));
38 it
.skip('should handle the Tight encoding', function () {
39 // TODO(directxman12): test this