Commit Graph

1035 Commits

Author SHA1 Message Date
Jesper Dam (jalfd) 1188993c0f Update tests/input.html to include keysym.js instead of keysymdef.js 2015-02-17 13:36:22 -05:00
Solly Ross 4e534a804e Update package.json to specify version 0.5.1
The current noVNC release is 0.5.1, but package.json still
says version 0.5.0.  This fixes that.

Fixes #441
2015-02-16 17:13:00 -05:00
Solly Ross 6f5148648b Remove local copies of websockify
This commit removes local copies of websockify.
Instead `utils/launch.sh` performs the following logic:

If `utils/websockify` exists, use `utils/websockify/run` (if the latter
does not exist, or is not executable, fail, since this is probably a
mistake).

Otherwise, check to see if websockify is installed somewhere (try
`which websockify`).  If it is, use that.  Otherwise, clone
websockify from github, and tell git to ignore that directory.

Packaged versions of noVNC should simply list websockify as a
requirement.  The debian packaging has been updated to reflect
this.

Closes #433
2015-02-16 17:09:58 -05:00
Solly f675e03ccc Merge pull request #444 from samhed/extdesktop
Support ExtendedDesktopSize and SetDesktopSize
2015-02-10 11:31:37 -05:00
samhed 4dec490aae Support automatic resize [Part 4/4]: unit tests
* Added new tests for the setDesktopSize encoding
* Added new tests for the ExtendedDesktopSize encoding
2015-02-10 17:06:55 +01:00
samhed f8b399d7df Support automatic resize [Part 3/4]: ui.js
* Added a resize request (setDesktopSize) triggered when connecting and by
  changes to the browser window's size.
* Hid the view-drag-hand when the display area is the same or smaller than the
  remote session size.
* Added a setting for the automatic resize feature.
* Updated vnc.html and vnc_auto.html to reflect the changes to the UI.
2015-02-10 17:05:58 +01:00
Samuel 757653c007 Merge pull request #443 from fzylogic/master
keysym.js needs inclusion in debian's install list
2015-02-07 03:13:41 +01:00
Jeremy Hanmer a2158362d9 keysym.js needs inclusion in debian's install list 2015-02-06 14:24:47 -08:00
samhed b0ec6509f1 Support automatic resize [Part 2/4]: rfb.js
* Support sending the setDesktopSize encoding (client -> server)
* Support recieving the ExtendedDesktopSize encoding (server <- client)
2015-02-06 17:06:48 +01:00
samhed 636be753b2 Support automatic resize [Part 1/4]: display.js
* Split viewportChange into two functions, one for changing size and the other for changing position.
* Modified viewport code to be capable of changing to a bigger size in the context of a
  client-initiated resize.
* Made clearer distinctions between when viewport-clipping or not.
* Added public function for telling when viewport-clipping.
* Updated tests that were using viewportChange.
2015-02-06 16:54:14 +01:00
samhed 5b7598ac6b Use our own event registration function for keyboardinputReset. 2015-02-06 15:53:10 +01:00
Solly a437079307 Merge pull request #427 from jswanner/register-listeners
Unregister event listeners from websock.
2015-02-04 11:09:37 -05:00
samhed e9f55ea0f8 Fixes issue #435 - added missing comma in keysym.js 2015-02-03 13:04:16 +01:00
Nathaniel Bibler 455f8f3fd0 Replace custom getPosition algorithms with getBoundingClientRect. 2015-01-26 11:46:44 -05:00
samhed b804b3e458 Fixes #428 - hides the local cursor when using the server-side cursor. 2015-01-15 16:27:18 +01:00
Jacob Swanner 155d78b399 Unregister event listeners from websock.
Prevents possible memory and event notification leaks when tearing down
connection and reestablishing a new one.
2015-01-08 15:25:55 -05:00
Alexander Clouter dc4b6301c8 slip in PATH for 'npm test' as not everyone has karma
So people can follow the 'unit tests' instructions, we need
to make sure PATH includes the karma bin directory otherwise
we see the following:
----
aclouter@stevemcqueen:/usr/src/aten-ikvm/noVNC$ npm test

> noVNC@0.5.0 test /usr/src/aten-ikvm/noVNC
> karma start karma.conf.js

sh: 1: karma: not found
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
----
2014-12-04 21:18:16 +00:00
Samuel fc00821eba Merge pull request #420 from julien-f/patch-1
Loads keysym.js
2014-11-29 10:46:27 +01:00
Julien Fontanet 0331495382 Loads keysym.js
Without it, `XK_ISO_Level3_Shift` (at least) is undefined.
2014-11-28 16:35:55 +01:00
samhed 282834caf1 Fixes #309, make use of keysym.js
Bonus 3 bug fixes:
 * Meta is 0xFFE7 not 0xFE07
 * Super_L is 0xFFEB not 0xFFEC
 * Super_R is 0xFFEC not 0xFFED
2014-11-26 09:24:13 +01:00
samhed ed7f8c3886 Add ISO Level 3 Shift (AltGr) to keysym.js 2014-11-26 09:22:12 +01:00
Solly Ross 4865278dee Fixed Erroneous HEXTILE test
The HEXTILE test which tested for a background tile followed
by an empty tile was only wide enough to actually test for one
tile, thus not actually testing the functionality.  It now actually
uses two tiles, thus actually testing the functionality.
2014-11-24 15:19:04 -05:00
Samuel b2e8311de6 Merge pull request #416 from detain/master
Fix for typo from a recent pull
2014-11-23 17:19:58 +01:00
Joe Huss df89129ff0 Fix for typo from a recent pull
There is a minor typo in the recent pull  Simple fix.
2014-11-23 07:22:39 -05:00
Solly Ross 1f84c99938 Merge "pull-request/412" (ramondeklein/noVNC)
Closes #412
2014-11-17 20:02:42 -05:00
Ramon de Klein 40ac6f0ab6 Don't draw "blank" HEXTILE tiles with random data
Previously, if a HEXTILE tiles was received with a subencoding
of 0x00, it would draw a rectangle using data from the render
queue, which would result in random colored blocks when using
the HEXTILE encoding.  This is the result of a miscopy during
the refactoring.  It now has the correct functionality according
to the RFB protocol specification, which is to draw a rectangle
with the last set background color.

Closes #411
2014-11-17 20:01:28 -05:00
Solly Ross c42ea22525 Fix Karma sinon-chai version issues
Previously, we were using the karma-sinon-chai package to
provide sinon-chai to karma.  This used an older version of
sinon-chai, and looks to be no longer maintained (it's been
a month since sinon-chai was updated).  A new package,
karma-sinon-chai-latest, is now used.  This package uses the
latest version of sinon-chai and sinon, just like karma-chai
uses the latest version of chai.
2014-11-17 17:52:33 -05:00
Solly Ross fda40d8927 Fix broken tests from changing default screen size
Commit 795fca23dc changed the default
size from 640 to 240.  This broke a couple tests which depended on
the default size being 640.  Those tests have now been fixed.
2014-11-17 14:19:19 -05:00
samhed bd6874e087 We should use the globally declared UI variable 2014-11-13 17:22:48 +01:00
samhed 795fca23dc Modify minimum width of clear to accomodate smaller screens 2014-11-11 16:29:06 +01:00
Solly a86f97e284 Merge pull request #410 from kanaka/docs/contributing-guidelines
Added in guidelines for contributing to noVNC
2014-11-06 11:15:11 -05:00
Solly Ross dbaf49f570 Added in guidelines for contributing to noVNC
In CONTRIBUTING.md, you can now find a set of guidelines for
contributing to the noVNC project.  They detail coding style
information, requirements for pull requests, and how to run
the unit tests.
2014-11-02 13:27:06 -05:00
Solly Ross ec31f82eda Fix Cursor Issue When Using True Color
This fixes an issue where, when using true color, the changeCursor
function would not actually write the cursor to the target array.

Fixes #407
2014-10-29 19:18:34 -04:00
Samuel e2f1ff8048 Merge pull request #402 from julien-f/patch-1
Fix subprotocols
2014-10-01 16:46:35 +02:00
Julien Fontanet 58ca1978ea Fix subprotocols
Broken by b1dee94788
2014-10-01 16:30:39 +02:00
Solly Ross 3257d9f265 Force Travis to use Node 0.11.13
The latest version of Node.js has a bug that
affects the Karma test runner.  A patch has been
merged to Karma, but has not landed in a version
yet.  Until a new version of Karma is released,
we should keep node at 0.11.13.

See karma-runner/karma#1182

(cherry picked from commit 9af2346a0cead634f3af5f390770ea65929c1f4a)
2014-09-30 12:21:03 -04:00
Solly 2930403a11 Merge pull request #397 from kanaka/refactor/use-object-defineproperty
Make Utils.js use Object.define to modify Array
2014-09-30 11:57:10 -04:00
Solly Ross f9fd0313b8 Make Utils.js use Object.define to modify Array
Previously, we were modifying Array's prototype using
simple assignment.  This can mess with enumeration/iteration.
Thus, we now use Object.defineProperty with enumerable set to
false.

See #366
2014-09-22 22:30:19 -04:00
Solly Ross 58529d347b Correct Travis CI Badge URL
The readme was using the URL for the 'refactor/cleanup'
branch, which doesn't exist anymore.  It now uses
the badge for the master branch as it should.
2014-09-22 21:49:17 -04:00
Solly Ross b11bb5c385 Add support for Relative Paths in the Test Runner
This patch adds support for using relative paths
with the '-r' or '--relative' methods.  This can
be useful if you want to output HTML (with the
'--output-html' option) and use it in a webpage.

Additionally, the '-o' was removed from the documentation
of '--output-html', since it hasn't worked for that in a
while ('-o' means open in browser instead).
2014-09-22 21:42:32 -04:00
Solly Ross 0b0b0433b5 Fix Race Condition in Display#clear on IE10
There was a race condition in Display#clear on IE10
because we resize and then clear that causes the canvas
to not actually end up cleared.  Clearing the current
viewport first solves the issue.  It doesn't appear to
affect other platforms, so it's inside a engine check
(`Util.Engine.trident === 6`).  Once we stop supporting
IE10, we should just remove this, because it's not the best
to have Engine-specific code.
2014-09-22 21:37:04 -04:00
Solly Ross 3b4fd003c2 Fixed broken mouse test in test.rfb.js
Because we use the XOR (`^`) operator, the button mask must be
set before a MouseUp event happens, otherwise we'll send a pointer
event like it was a MouseDown event.  The button mask was not set
in one of the tests, so the test was failing.
2014-09-19 15:14:34 -04:00
Solly Ross 53762c31fe Fixed Cursor URI Support Detection
There was a bug in cursor URI support detection due to the way
set_defaults now works -- the code was checking for `null`, whereas
when not set, options default to `undefined` unless otherwise
specified.  The code now checks for either `null` or `undefined`.
Tests have been added to ensure that this works properly.
2014-09-19 14:51:15 -04:00
Solly Ross cfc02e5e2b Fixed presence detection bug in utils.set_defaults
Previously, Utils.set_defaults was using `if(conf[keys[i]])`
to check for the presence of a configuration key.  This would
fail if `conf[keys[i]]` happened to be false.  Instead, we now
use `if(keys[i] in conf)`, which simply checks for the presence
of the key in the conf object.
2014-09-19 14:48:00 -04:00
Solly Ross d02a99f0c8 Fixed Typo Causing MouseUp to not Register
There was a typo in one of the instances of the _buttonMask field
(it was written as _buttonMaks), causing MouseUp to never be sent.
This has been rectified, and the unit tests for the mouse handler
have been changed to check for explicitly sending mouseup and
mousedown.

Fixes #393
2014-09-19 14:18:45 -04:00
Solly Ross f0e4548b16 Fix Travis Sauce Tunnel Issues
Travis is failing because Sauce can't find the appropriate tunnelid.
This should fix that but setting the tunnel id to be the Travis
job number.
2014-09-19 12:56:53 -04:00
Solly e4e9a9b97f Merge pull request #391 from mandre/fix_invalid_property
Fix invalid updateState property on RFB preventing noVNC to load
2014-09-19 12:35:27 -04:00
Solly Ross 2c9623b5a7 Fixed assertion collision issues
When run via karma, all the tests are loaded into the same page.
This was causing a collision in the 'displayed' assertion dealing
with using viewportLoc.

The assertions are now in their own file, pulled in by tests that
need them.  Additionally, several tests which only set fb_width
and fb_height were correct to set viewportLoc as well.

Closes #392

Also-Authored-By: Martin André (github: mandre)
2014-09-19 12:16:06 -04:00
Solly Ross f8f95d6023 Added Sauce Auth Details for Travis CI
This will enable Travis CI to run tests on Sauce Labs
(thanks to OpenSauce, their free program for Open
Source Software)
2014-09-19 11:43:58 -04:00
Martin André 77bd04f833 Fix invalid updateState property of RFB
It was changed to `onUpdateState` in
b1dee94788.
2014-09-17 16:56:13 +09:00