]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/test.display.js
Remove many small, obsolete, old browser hacks
[mirror_novnc.git] / tests / test.display.js
index bd5a55f9ba2529c203c5af4f80601b85b18e34aa..c2ccdd8be276de740d0e86ed13d69b14c673b5c0 100644 (file)
@@ -361,27 +361,6 @@ describe('Display/Canvas Helper', function () {
             expect(img.addEventListener).to.have.been.calledOnce;
         });
 
-        it('should wait if an image is incorrectly loaded', function () {
-            const img = { complete: true, width: 0, height: 0, addEventListener: sinon.spy() };
-            display._renderQ = [{ type: 'img', x: 3, y: 4, width: 4, height: 4, img: img },
-                                { type: 'fill', x: 1, y: 2, width: 3, height: 4, color: 5 }];
-            display.drawImage = sinon.spy();
-            display.fillRect = sinon.spy();
-
-            display._scanRenderQ();
-            expect(display.drawImage).to.not.have.been.called;
-            expect(display.fillRect).to.not.have.been.called;
-            expect(img.addEventListener).to.have.been.calledOnce;
-
-            display._renderQ[0].img.complete = true;
-            display._renderQ[0].img.width = 4;
-            display._renderQ[0].img.height = 4;
-            display._scanRenderQ();
-            expect(display.drawImage).to.have.been.calledOnce;
-            expect(display.fillRect).to.have.been.calledOnce;
-            expect(img.addEventListener).to.have.been.calledOnce;
-        });
-
         it('should call callback when queue is flushed', function () {
             display.onflush = sinon.spy();
             display.fillRect(0, 0, 4, 4, [0, 0xff, 0]);