]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Recieve challange before expecting callback
authorSamuel Mannehed <samuel@cendio.se>
Tue, 17 Oct 2017 10:29:43 +0000 (12:29 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Tue, 17 Oct 2017 10:29:43 +0000 (12:29 +0200)
After commit abfe5b7a37414bdd073152f55018fd3995aac50d we expect a
challange before sending the callback to the UI. Fixes tests.

tests/test.rfb.js

index ae2ba72487cea20859f958b3d6687c57910e14aa..fa6ba5614e569eff34a833d7fc98aaf6787d3779 100644 (file)
@@ -840,6 +840,10 @@ describe('Remote Frame Buffer Protocol Client', function() {
                     client.set_onPasswordRequired(sinon.spy());
                     send_security(2, client);
 
+                    var challenge = [];
+                    for (var i = 0; i < 16; i++) { challenge[i] = i; }
+                    client._sock._websocket._receive_data(new Uint8Array(challenge));
+
                     var spy = client.get_onPasswordRequired();
                     expect(client._rfb_password.length).to.equal(0);
                     expect(spy).to.have.been.calledOnce;