Make resizeSession setting test more realistic
We shouldn't expect a resize request to be sent if the container didn't change size first.
This commit is contained in:
parent
bbbef2d9fa
commit
70446bf742
|
@ -1082,6 +1082,13 @@ describe('Remote Frame Buffer protocol client', function () {
|
|||
it('should only request a resize when turned on', function () {
|
||||
client.resizeSession = false;
|
||||
expect(RFB.messages.setDesktopSize).to.not.have.been.called;
|
||||
|
||||
container.style.width = '40px';
|
||||
container.style.height = '50px';
|
||||
fakeResizeObserver.fire();
|
||||
clock.tick(1000);
|
||||
expect(RFB.messages.setDesktopSize).to.not.have.been.called;
|
||||
|
||||
client.resizeSession = true;
|
||||
expect(RFB.messages.setDesktopSize).to.have.been.calledOnce;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue