Move cursor URI check to RFB object

Keeps the Display object simpler, and avoids having to abuse a
property to transfer the information.
This commit is contained in:
Pierre Ossman
2017-10-14 16:49:07 +02:00
parent 134ec26ee0
commit fdff59eeb4
5 changed files with 2 additions and 45 deletions

View File

@@ -3,7 +3,6 @@ var expect = chai.expect;
import Base64 from '../core/base64.js';
import Display from '../core/display.js';
import { _forceCursorURIs, browserSupportsCursorURIs } from '../core/util/browsers.js';
import sinon from '../vendor/sinon.js';
@@ -37,26 +36,6 @@ describe('Display/Canvas Helper', function () {
return Base64.decode(data);
}
describe('checking for cursor uri support', function () {
it('should disable cursor URIs if there is no support', function () {
_forceCursorURIs(false);
var display = new Display(document.createElement('canvas'), { viewport: false });
expect(display._cursor_uri).to.be.false;
});
it('should enable cursor URIs if there is support', function () {
_forceCursorURIs(true);
var display = new Display(document.createElement('canvas'), { viewport: false });
expect(display._cursor_uri).to.be.true;
});
it('respect the cursor_uri option if there is support', function () {
_forceCursorURIs(false);
var display = new Display(document.createElement('canvas'), { viewport: false, cursor_uri: false });
expect(display._cursor_uri).to.be.false;
});
});
describe('viewport handling', function () {
var display;
beforeEach(function () {