Commit Graph

301 Commits

Author SHA1 Message Date
Pierre Ossman 70e6795829 Send data one byte at a time in tests
This makes sure we don't have code assuming that everything is
neatly packaged in a single WebSocket message.
2019-02-15 10:26:27 +01:00
Pierre Ossman 7a1f2e4cf5 Merge branch 'user_getters_and_setters_in_websock' of https://github.com/juanjoDiaz/noVNC 2019-01-08 12:26:17 +01:00
Pierre Ossman e35570227c Use CustomEvent for playback events
Stop abusing Event as that doesn't work everwhere.
2019-01-08 12:25:42 +01:00
Pierre Ossman 568f6567e1 Avoid using String.prototype.startsWith()
IE doesn't support it.
2019-01-08 12:25:01 +01:00
Pierre Ossman 527a1fd0ae Pre-convert recordings for playback
Convert the recordings ahead of time instead of during the playback.
That way we aren't messing up the profiling with time spent converting
data, rather than processing it.
2019-01-08 12:24:39 +01:00
Juanjo Diaz 8a189a6291 Add getters/setter to websock 2018-12-08 17:31:20 +02:00
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Pierre Ossman d105040581 Add tests for Cursor encoding 2018-09-18 11:36:32 +02:00
Pierre Ossman 2c5491e131 Enforce space after function name 2018-09-06 17:34:15 +02:00
Pierre Ossman 3f1cda2e37 Enforce space before code block 2018-09-06 17:29:26 +02:00
Pierre Ossman 0ae5c54ab3 Enforce explicit semi-colons 2018-09-06 17:25:02 +02:00
Pierre Ossman 426a8c927b Enforce curly braces for control statements 2018-09-06 17:22:40 +02:00
Pierre Ossman e777765320 Enforce function names 2018-09-06 16:53:40 +02:00
Pierre Ossman d80d9d3731 Enforce function call spacing 2018-09-06 16:46:38 +02:00
Pierre Ossman 6786fd8719 Enforce comma spacing 2018-09-06 16:43:31 +02:00
Pierre Ossman 7b536961b2 Enforce indentation 2018-09-06 16:37:38 +02:00
Pierre Ossman ce6287574f Merge branch 'hidpi_scale' of https://github.com/CendioOssman/noVNC 2018-08-16 17:50:09 +02:00
Pierre Ossman 7407c1f4e2 Replace bad sinon stub in mouse tests
It screwed up important calls inside the code being tested. Avoid
the stub by creating a temporary element with the desired properties.
2018-08-16 17:36:54 +02:00
Samuel Mannehed 2c0b146630
Merge pull request #1117 from novnc/bug/fix-test-playback
Fix test playback
2018-08-16 15:38:43 +02:00
Pierre Ossman 16f0861501 Support password auth recordings for playback
When password auth is enabled on the server, the RFB object sends a
'credentialsrequired' event to the UI. This commit adds support for
this event to our recoding playback.
2018-08-16 15:36:43 +02:00
Samuel Mannehed b3ac94a978 Remove firebug comments
Firebug is discontinued and it's features are included in browser
development tools now a days.
2018-08-08 14:05:06 +02:00
Solly Ross ee3493c060 Add a record flag to launch.sh
Add the `--record` flag to launch.js, for easy recording when testing.
2018-07-30 11:07:33 -04:00
Solly Ross cccf3b008a Fix perf/playback tool
Somewhere along the way, the refactors broke playback.js.  This fixes
the actual functionality, and makes its JS loading match that in
vnc.html.
2018-07-29 19:14:56 -04:00
Pierre Ossman 7bcdbbc65b Stop transpiling karma tests
This runs our code in the same manner as it would be used if loaded
directly in the browser. Includes the same kind of fallback for older
browsers.
2018-07-16 13:32:35 +02:00
Pierre Ossman 9eaea86234 Don't stub out ES module imports
It is not allowed and only happens to work because babel doesn't
strictly follow the specification. It doesn't seem necessary for the
tests to run, so just remove it.
2018-07-13 15:57:24 +02:00
Pierre Ossman ae2e1ff7bd Move sinon to karma framework
This frees us from manual imports, and makes things less magical
as those aren't ES modules even if the code suggest that the are.
2018-07-13 15:57:24 +02:00
Juanjo Diaz 885363a373 Use the classic `function foo() { ... }` for top level functions or functions that depend on the scope 2018-07-12 19:06:57 +02:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Juanjo Diaz 0e4808bf6f Use ES6 classes
Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
2018-07-12 19:06:57 +02:00
Samuel Mannehed 178b92d380 Add rQshiftStr unit test for large strings 2018-06-15 11:53:51 +02:00
Pierre Ossman 8f47bd296c Work around Siemens touch panel authentication bug
Siemens' touch panels support Tight authentication as well as NOTUNNEL,
but they fail to advertise the latter. Work around this issue by detecting
a Siemens device (through their custom tunnel types) and assume NOTUNNEL
support even if not advertised.
2018-06-07 15:03:34 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Samuel Mannehed 2bb8b28d78 Handle sending large clipboards
Pasting clipboard texts that were larger than 10240 bytes didnt work and
caused a crash in noVNC. This commit fixes the crash and adds handling
for sending large clipboard texts. Fixes issue #1065.
2018-05-07 13:02:51 +02:00
Pierre Ossman 35dd3c2299 Merge branches 'ffalt' and 'altgr' of https://github.com/CendioOssman/noVNC 2018-03-13 16:03:01 +01:00
Pierre Ossman e9118e3bda Get localStorage tests running on more browsers 2018-03-09 12:15:21 +01:00
Pierre Ossman b22c9ef954 Better detection of AltGr on Windows
Try to properly detect the fake CtrlL+AltR sequence Windows sends
when pressing AltGr. This allows us to send more accurate key
events over to the server.
2018-03-09 12:14:23 +01:00
Andrew Webster e0750f9b2c Use localstorage only to initialize settings map
This only reads from localstorage in order to initialize the settings
map.  After initializaton, reads will return the value from the map.

When writing a value, the settings map and the local storage
are updated, unless the setting is a default value or derived from
the query string.

This has a few advantages:
 1. Saved settings will not be overridden by settings specified in
the query string.  This means a setting could be temporarily changed
using the query string, but once removed from the query string, the
setting would return back to what the user selected.
 2. Default values will not be saved.  If a user has always used
the default value for a setting, then they can move to a new version
with different defaults without clearing localstorage.
 3. Changes made to localstorage in a session running in a different
window will not affect the settings in the current window (until
the page is refreshed).

Regarding eraseSetting:

It is possible that another tab could change the value, leading
to an unexpected value change in the tab that deletes.  However,
this function is currently unused, so this will be evaluted if
and when it used.
2018-02-13 10:22:21 -05:00
Solly Ross a4d51bd220
Merge pull request #1009 from juanjoDiaz/move_browser_checks
Move browser checks to browser.js
2018-02-01 10:33:28 -05:00
Juanjo Diaz 9e1bd410aa Remove jshint comments 2018-01-31 07:38:29 -08:00
Juanjo Diaz 59ef29163e Move browser checks to browser.js 2018-01-30 08:35:47 -08:00
Pierre Ossman 609a3fac74 Better cleanup in vnc_playback.html
Makes sure the cleanup is also properly exercised as part of the
testing.
2018-01-26 11:07:58 +01:00
Pierre Ossman a92c33174e Update vnc_playback.html to follow current API
We had tried to update this along the way, but a bunch of things
were overlooked. Should be fully functional again now.
2018-01-26 11:07:14 +01:00
Pierre Ossman 2a4e84ac20 Remove old test pages
These are not maintained or used anymore, so just remove them to
avoid confusion.
2018-01-25 16:14:02 +01:00
Solly Ross af4deba893 Fix slice usage in display tests on IE11
IE11 doesn't support the `slice` method on ArrayBufferViews, so
we have to use the old `Array.prototype.slice.call` trick in the
tests instead.
2018-01-10 11:08:21 -05:00
Pierre Ossman 1f9d0cb12f Add test for 16x16 tiles
We have a special cache and therefore special code paths that need
to be tested when rendering 16x16 tiles.
2017-12-14 12:59:25 +01:00
Pierre Ossman 0880353ba9 Simpler reporting when display output size mismatches 2017-12-14 12:58:57 +01:00
Pierre Ossman 9b84f51685 Move resize handling in to RFB object
Makes the API simpler and makes it easier for other frontends to
get this functionality.
2017-12-06 11:29:57 +01:00
Pierre Ossman bb25d3d6c5 Forced cleanup of RFB objects in tests
We need to make sure RFB objects are properly disposed or they
might have event listeners and other stuff hanging around that can
influence subsequent tests.
2017-11-30 16:15:38 +01:00
Samuel Mannehed 7279364c9a Move localization.js to app
Since it is no longer used in core. Also splits localization tests into
a separate file.
2017-11-14 15:36:12 +01:00