We want to flush pending mouse moves before we initiate viewport
dragging.
Before this commit, there were scenarios where the _mouseButtonMask
would track a released button as being down.
Instead of keeping track of button states ourselves by looking at
MouseEvent.button, we can use the MouseEvent.buttons which already
contains the state of all buttons.
There were no test for viewport dragging using gesture previously, so
let's add some.
Note that there currently are some viewport dragging behaviours that we
don't want to have, so some tests have commented out what our desired
behaviour should be.
Previously, these unit tests did not check which events were sent to the
server, only how many events were sent. This commit adds checks to see
that the expected button events are sent.
These functions can be used elsewhere in the tests. We want to use these
in the dragging tests in the future instead of directly calling private
methods.
Since the expected client size wasn't updated when the browser window
resized, noVNC didn't resize the canvas properly when going back to
the exact same dimensions.
Fixes issue #1903
Try to be more consistent in how we capitalize things. Both the "Title
Case" and "Sentence case" styles are popular, so either would work.
Google and Mozilla both prefer "Sentence case", so let's follow them.
The Firefox H.264 decoder on Windows might simply just refuse to deliver
any finished frames. It also doesn't deliver any errors.
Detect this early by expecting a frame after flush() has completed.
Firefox is buggy and reports support for H.264 but then throws errors
once we actually try to decode things. Detect this early by doing a
quick test decode of a single frame.
These failed to test that the data was correctly split as they only
checked the first chunk transmitted.
Use random values to avoid the risk of aligning our test data with the
split boundaries and hence allowing false positives.
We need to call initSetting() even if we don't have any interesting
default to set, as that is what checks if values have been provided as a
query string.
Fixes 96c76f7.
This can be very useful if you have multiple instances of noVNC, and you
want to redirect them to different VNC servers.
The new default settings will have the same behaviour as before for
systems where noVNC is deployed in the root web folder.
karma-sinon-chai is not compatible with Chai 5+, and Karma is no longer
being updated.
Load sinon and chai manually instead, until we can have a long term plan
in place.
sinon might not be loaded at this point, which can cause tests to fail.
We could create the sandbox in one of the hooks instead, but let's
remove the sandbox completely to stay consistent with our other tests.