summaryrefslogtreecommitdiff
path: root/tests/test.display.js
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-10-12 17:07:16 +0200
committerPierre Ossman <ossman@cendio.se>2020-06-06 13:23:05 +0200
commit224f95f9974940c4a09f294a989c3d2f32182ebe (patch)
treebe993fca52ef6f3a7d18398e01368944f055da32 /tests/test.display.js
parentf694c32fd5d5c53902a8c2bb4b81a7378276afef (diff)
downloadnovnc-224f95f9974940c4a09f294a989c3d2f32182ebe.tar.gz
Move tile handling to Hextile decoder
It is only used there so no need for it to be in the general Display class.
Diffstat (limited to 'tests/test.display.js')
-rw-r--r--tests/test.display.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/test.display.js b/tests/test.display.js
index a853778..3492f1e 100644
--- a/tests/test.display.js
+++ b/tests/test.display.js
@@ -309,41 +309,6 @@ describe('Display/Canvas Helper', function () {
display.flush();
});
- it('should support drawing tile data with a background color and sub tiles', function () {
- display.startTile(0, 0, 4, 4, [0, 0xff, 0]);
- display.subTile(0, 0, 2, 2, [0xff, 0, 0]);
- display.subTile(2, 2, 2, 2, [0xff, 0, 0]);
- display.finishTile();
- display.flip();
- expect(display).to.have.displayed(checkedData);
- });
-
- // We have a special cache for 16x16 tiles that we need to test
- it('should support drawing a 16x16 tile', function () {
- const largeCheckedData = new Uint8Array(16*16*4);
- display.resize(16, 16);
-
- for (let y = 0;y < 16;y++) {
- for (let x = 0;x < 16;x++) {
- let pixel;
- if ((x < 4) && (y < 4)) {
- // NB: of course IE11 doesn't support #slice on ArrayBufferViews...
- pixel = Array.prototype.slice.call(checkedData, (y*4+x)*4, (y*4+x+1)*4);
- } else {
- pixel = [0, 0xff, 0, 255];
- }
- largeCheckedData.set(pixel, (y*16+x)*4);
- }
- }
-
- display.startTile(0, 0, 16, 16, [0, 0xff, 0]);
- display.subTile(0, 0, 2, 2, [0xff, 0, 0]);
- display.subTile(2, 2, 2, 2, [0xff, 0, 0]);
- display.finishTile();
- display.flip();
- expect(display).to.have.displayed(largeCheckedData);
- });
-
it('should support drawing BGRX blit images with true color via #blitImage', function () {
const data = [];
for (let i = 0; i < 16; i++) {