]> git.proxmox.com Git - mirror_novnc.git/log
mirror_novnc.git
9 years agoMerge pull request #397 from kanaka/refactor/use-object-defineproperty
Solly [Tue, 30 Sep 2014 15:57:10 +0000 (11:57 -0400)]
Merge pull request #397 from kanaka/refactor/use-object-defineproperty

Make Utils.js use Object.define to modify Array

9 years agoMake Utils.js use Object.define to modify Array
Solly Ross [Tue, 23 Sep 2014 02:30:19 +0000 (22:30 -0400)]
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

9 years agoCorrect Travis CI Badge URL
Solly Ross [Tue, 23 Sep 2014 01:49:17 +0000 (21:49 -0400)]
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.

9 years agoAdd support for Relative Paths in the Test Runner
Solly Ross [Tue, 23 Sep 2014 01:42:32 +0000 (21:42 -0400)]
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).

9 years agoFix Race Condition in Display#clear on IE10
Solly Ross [Tue, 23 Sep 2014 01:37:04 +0000 (21:37 -0400)]
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.

9 years agoFixed broken mouse test in test.rfb.js
Solly Ross [Fri, 19 Sep 2014 19:14:34 +0000 (15:14 -0400)]
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.

9 years agoFixed Cursor URI Support Detection
Solly Ross [Fri, 19 Sep 2014 18:51:15 +0000 (14:51 -0400)]
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.

9 years agoFixed presence detection bug in utils.set_defaults
Solly Ross [Fri, 19 Sep 2014 18:48:00 +0000 (14:48 -0400)]
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.

9 years agoFixed Typo Causing MouseUp to not Register
Solly Ross [Fri, 19 Sep 2014 18:17:15 +0000 (14:17 -0400)]
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

9 years agoFix Travis Sauce Tunnel Issues
Solly Ross [Fri, 19 Sep 2014 16:49:32 +0000 (12:49 -0400)]
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.

9 years agoMerge pull request #391 from mandre/fix_invalid_property
Solly [Fri, 19 Sep 2014 16:35:27 +0000 (12:35 -0400)]
Merge pull request #391 from mandre/fix_invalid_property

Fix invalid updateState property on RFB preventing noVNC to load

9 years agoFixed assertion collision issues
Solly Ross [Fri, 19 Sep 2014 16:16:06 +0000 (12:16 -0400)]
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)
9 years agoAdded Sauce Auth Details for Travis CI
Solly Ross [Fri, 19 Sep 2014 15:43:58 +0000 (11:43 -0400)]
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)

9 years agoFix invalid updateState property of RFB
Martin André [Wed, 17 Sep 2014 07:44:21 +0000 (16:44 +0900)]
Fix invalid updateState property of RFB

It was changed to `onUpdateState` in
b1dee9478815b22bf5fee3ee9e44321d4bb46c91.

9 years agoPrevent noVNC loading error when invalid property is set on object
Martin André [Wed, 17 Sep 2014 07:31:12 +0000 (16:31 +0900)]
Prevent noVNC loading error when invalid property is set on object

Util.set_defaults should accommodate with missing properties to prevent
'Uncaught TypeError: Cannot read property 'call' of undefined' error.

9 years agoMerge pull request #368 from DirectXMan12/refactor/cleanup
Solly [Mon, 15 Sep 2014 20:50:20 +0000 (16:50 -0400)]
Merge pull request #368 from DirectXMan12/refactor/cleanup

Cleanup and test all the things (plus ditching Crockford)!

9 years agoAdd support for Travis CI and SauceLabs Testing
Solly Ross [Mon, 23 Jun 2014 23:39:50 +0000 (19:39 -0400)]
Add support for Travis CI and SauceLabs Testing

This adds support for Travis CI and SauceLabs
testing.  Testing on SauceLabs in done via
the Karma test runner.  Note that encrypted
Sauce username and access key values need
to be inserted into .travis.yml as global
environment variables.  Additionally, the
local test runner (which is still useful
for debugging tests and code) was updated
to reflect that the 'node_modules' folder
now gets placed in the root directory.

9 years agoCleanup: UI code
Solly Ross [Sun, 22 Jun 2014 03:26:28 +0000 (23:26 -0400)]
Cleanup: UI code

File: ui.js
Tests Added: False

Changes:
- Fix JSHint errors
- add some curly braces to improve clarity
- move variable declarations to relevant locations instead of at the top
  of methods

9 years agoCleanup: RFB Client
Solly Ross [Thu, 19 Jun 2014 17:27:42 +0000 (13:27 -0400)]
Cleanup: RFB Client

File: rfb.js (also websock.js)
Tests Added: True

Changes:
- De-Crockford-ified rfb.js
- Added methods to websock.js to skip bytes in the receive queue

9 years agoCleanup: Display Helper
Solly Ross [Wed, 11 Jun 2014 17:35:53 +0000 (13:35 -0400)]
Cleanup: Display Helper

File: display.js
Tests Added: True (preliminary)

Changes:
- De-crockford-ified the file

NOTE: the tests included for display.js cover basic functionality, but
are by no means nearly as comprehensive as the ones presented for
rfb.js.

9 years agoCleanup: WebSocket Helper
Solly Ross [Thu, 22 May 2014 20:57:55 +0000 (16:57 -0400)]
Cleanup: WebSocket Helper

File: websock.js
Tests Added: True
Changes:
- Cleaned up JSHint errors
- Converted to normal JS constructor pattern with "private" fields and
  methods now simply being prepended by underscores
- Added a "bind" polyfill for use in PhantomJS 1.x in util.js
- Added FakeWebSocket to fill in for actual WebSocket objects when
  testing
- Made exception handler actually log exception name and message,
  to console, in addition to stack trace

9 years agoCleanup: Webutil code
Solly Ross [Wed, 21 May 2014 19:12:20 +0000 (15:12 -0400)]
Cleanup: Webutil code

File: webutil.js
Tests Added: False
Changes:
- Fixed JSHint Errors (global "use strict", spaces)
- added some newline characters when appropriate for readability
- moved variable declarations to the places they were actually used
  for readability

9 years agoCleanup: Keyboard code
Solly Ross [Tue, 20 May 2014 23:16:01 +0000 (19:16 -0400)]
Cleanup: Keyboard code

File: keyboard.js
Tests Added: False (already present)
Changes:
- Fixed JSHint Errors
- Moved functions outside loops
- Added proper include directives to tests

9 years agoCleanup: Input code
Solly Ross [Tue, 20 May 2014 22:29:52 +0000 (18:29 -0400)]
Cleanup: Input code

File: input.js
Tests Added: False (already present partially -- see below)
Changes:
- Fixed JSHint Errors
- Converted to normal non-Crockford constructors

NOTE: while there are tests for the actual key-detecting functionality,
      the tests do not cover the actual Keyboard and Mouse objects
      themselves.

9 years agoCleanup: Util code
Solly Ross [Wed, 21 May 2014 18:54:28 +0000 (14:54 -0400)]
Cleanup: Util code

File: util.js
Tests Added: True (partial -- for logging and array push methods)
Changes:
- Fixed JSHint Errors (indentation, semicolons, global "use strict")
- Made browser detection methods more readable
- added some newline characters when appropriate for readability
- throw Errors not strings!
- Removed conf_defaults, and added make_properties and set_defaults
  instead (see below)

The removal of conf_defaults and switch to make_properties and
set_defaults is to facilitate the switch over to normal Javascript
constructors instead of Crockford-style constructors.  Now, methods
are added to the objects prototype (and thus make properties is called
outside the constructor).

9 years agoCleanup: DES code
Solly Ross [Tue, 6 May 2014 19:25:05 +0000 (15:25 -0400)]
Cleanup: DES code

File: des.js
Tests Added: False
Changes:
- Fixed JSHint Errors
- Improved whitespace around operators

9 years agoCleanup and Test: base64.js
Solly Ross [Tue, 6 May 2014 19:11:31 +0000 (15:11 -0400)]
Cleanup and Test: base64.js

This is the first commit in a series of commits
which improve the readability of some of the code
and add tests.

File: base64.js
Tests Added: True
Changes:
- Improved indentation
- Fixed JSHint errors
- Moved loop variables to be declared in the loop for better readability
  (N.B. Javascript does not have block scoping, so the variables are
  still technically available outside the loop -- it just makes the code
  clearer to place them inside the loop, since they are only used there)

9 years agoSupport the "NOTUNNEL" tunnel type for TightVNC
Solly Ross [Tue, 20 May 2014 21:03:40 +0000 (17:03 -0400)]
Support the "NOTUNNEL" tunnel type for TightVNC

Previously, tight auth was supported without any support for tunnels,
even the no-op tunnel.  No, the no-op tunnel type is supported.

9 years agoSupport running all tests from the root directory
Solly Ross [Mon, 15 Sep 2014 20:44:36 +0000 (16:44 -0400)]
Support running all tests from the root directory

Previously, if you did not specify a tests file,
you had to be in the 'tests' directory for the
"run all tests" functionality to work.  Now it
will work in any directory.

9 years agofixes an error that was made in the merge with the last sync with websockify.
samhed [Tue, 19 Aug 2014 11:49:55 +0000 (13:49 +0200)]
fixes an error that was made in the merge with the last sync with websockify.

9 years agoFix race condition in test runner
Solly Ross [Tue, 3 Jun 2014 21:42:28 +0000 (17:42 -0400)]
Fix race condition in test runner

Previously, there would be a case where if your tests took
too long to run, the casper test runner would only report
on certain tests.  This has been fixed.

9 years agoOutput error events from provider in test runner
Solly Ross [Tue, 3 Jun 2014 20:58:37 +0000 (16:58 -0400)]
Output error events from provider in test runner

Now, 'error' events from the test runner are output to stderr.
Additionally, when debug is enabled, debug output is logged to
stderr instead of stdout (as was the case previously).

9 years agoFixed typo in run_from_console.js
Solly Ross [Tue, 3 Jun 2014 17:15:02 +0000 (13:15 -0400)]
Fixed typo in run_from_console.js

9 years agoAdd support for injecting test helper files
Solly Ross [Tue, 3 Jun 2014 15:14:42 +0000 (11:14 -0400)]
Add support for injecting test helper files

Now, the phrase `requires test modules: ` may be place in a comment
in a file to require modules local to the test directory, similarly
to the way the `require local modules: ` line may be used to inject
files in the 'include' directory.  This is useful for when common
fakes need to be injected into a test.

9 years agoSupport automatically opening test HTML in browser
Solly Ross [Tue, 3 Jun 2014 15:02:27 +0000 (11:02 -0400)]
Support automatically opening test HTML in browser

When using the '-g' option with run_from_console.js, you can
now pass the '-o' option to automatically open the generated
HTML file in your default browser.  This relies on the 'open'
NPM module.

10 years agoMerge pull request #363 from kosmasgiannis/query_parse
Samuel [Tue, 6 May 2014 07:13:18 +0000 (09:13 +0200)]
Merge pull request #363 from kosmasgiannis/query_parse

Better parsing of query string variables

10 years agoBetter parsing of query string variables
Giannis Kosmas [Mon, 5 May 2014 20:23:48 +0000 (23:23 +0300)]
Better parsing of query string variables

10 years agoFix for scroll offset in Util.getPosition()
Solly Ross [Mon, 5 May 2014 18:29:29 +0000 (14:29 -0400)]
Fix for scroll offset in Util.getPosition()

Previously, Util.getPosition didn't deal with scrolling
particularly well.  This fixes that by calculating the
scroll offset when dealing with getting mouse positions.

Credit to @erikgull and @emmar for the initial version of
the fix.  Credit to Brian Huismanfor the initial code.

Closes #295
Relevant to #258

10 years agoSync with websockify
samhed [Mon, 14 Apr 2014 12:45:15 +0000 (14:45 +0200)]
Sync with websockify
Pull 90b519edf0c1857d

10 years agoCredit for this fix goes to Jesper Dam (https://github.com/Medical-Insight/noVNC...
samhed [Mon, 14 Apr 2014 11:26:52 +0000 (13:26 +0200)]
Credit for this fix goes to Jesper Dam (https://github.com/Medical-Insight/noVNC/tree/fix-ie10-keyboard).

Fix keyboard handling for IE10 (issue #352)
* Keyboard events in IE10 do not provide any useful information on the properties 'which', 'char' or 'charCode'. Instead, it seems to store the char code in the keyCode property.

10 years agoUpdated the comment in vnc.html to reflect the changes made in last commit.
samhed [Mon, 7 Apr 2014 14:58:59 +0000 (16:58 +0200)]
Updated the comment in vnc.html to reflect the changes made in last commit.

10 years agoChanging the type of the keyboardinput element to textarea, fixes issue 356.
samhed [Mon, 7 Apr 2014 14:41:25 +0000 (16:41 +0200)]
Changing the type of the keyboardinput element to textarea, fixes issue 356.
* The on-screen keyboard not closing when pressing Enter is more important than not having textsuggestions etc.

10 years agoFixes issue 344 - problem with backspace on Android.
samhed [Fri, 4 Apr 2014 15:45:04 +0000 (17:45 +0200)]
Fixes issue 344 - problem with backspace on Android.

10 years agoAttempt to change the behavior of the enter/go-key on touch devices, we want it to...
samhed [Fri, 4 Apr 2014 15:42:12 +0000 (17:42 +0200)]
Attempt to change the behavior of the enter/go-key on touch devices, we want it to be Enter.
* This code works in Firefox on Android and on Chrome and Safari on iOS.
* It does not work in Chrome on Android, the enter key is labled "Go" and closes the on screen keyboard when pressed.

10 years agoChange type of keyboardinput to password to make sure that you can write parenthesis...
samhed [Fri, 4 Apr 2014 15:36:17 +0000 (17:36 +0200)]
Change type of keyboardinput to password to make sure that you can write parenthesis on iOS devices.

10 years agoAim to disable text suggestions and the like
samhed [Fri, 4 Apr 2014 15:28:44 +0000 (17:28 +0200)]
Aim to disable text suggestions and the like

10 years agoMake sure that the default value of the hidden input field is a space.
samhed [Fri, 28 Mar 2014 07:54:49 +0000 (08:54 +0100)]
Make sure that the default value of the hidden input field is a space.

10 years agoMerge pull request #347 from dol/fix/better-ws-binarytype-detection
Solly [Wed, 26 Mar 2014 14:58:11 +0000 (10:58 -0400)]
Merge pull request #347 from dol/fix/better-ws-binarytype-detection

Improved websocket binary support detection

10 years agoAdded alt-values to the control-bar buttons.
samhed [Wed, 26 Mar 2014 14:24:50 +0000 (15:24 +0100)]
Added alt-values to the control-bar buttons.
* On slow servers where the button-images can be slowly loaded it can be useful to see some relevant text instead of "Submit query" on every button.

10 years agoAdd a prototype from MDN for indexOf to be used in browsers where it is not supported.
samhed [Wed, 26 Mar 2014 14:22:45 +0000 (15:22 +0100)]
Add a prototype from MDN for indexOf to be used in browsers where it is not supported.

10 years agoRemoved unused code.
samhed [Wed, 26 Mar 2014 10:18:48 +0000 (11:18 +0100)]
Removed unused code.

10 years agoFixed typo in README.
samhed [Mon, 17 Mar 2014 13:24:42 +0000 (14:24 +0100)]
Fixed typo in README.

10 years agoAdded a wrapper for the UTF-8 decoding.
samhed [Fri, 14 Mar 2014 14:18:05 +0000 (15:18 +0100)]
Added a wrapper for the UTF-8 decoding.

10 years agoDecode from UTF-8 to allow unicode characters in the connection name
samhed [Fri, 14 Mar 2014 12:44:10 +0000 (13:44 +0100)]
Decode from UTF-8 to allow unicode characters in the connection name

10 years agoMerge pull request #348 from Medical-Insight/fix-altgr-firefox
Samuel [Wed, 12 Mar 2014 15:51:20 +0000 (16:51 +0100)]
Merge pull request #348 from Medical-Insight/fix-altgr-firefox

Fix altgr firefox

10 years agoBetter browser OS detection.
Jesper Dam [Wed, 12 Mar 2014 10:11:52 +0000 (11:11 +0100)]
Better browser OS detection.

Apparently Firefox on Linux changed the value of navigator.appVersion,
causing our OS detection (used to determine how to interpret different
modifier keys) to fail.

Use navigator.platform instead, which should be more stable.

http://stackoverflow.com/a/19883965/33213

10 years agoBetter key identifiers
Jesper Dam [Wed, 12 Mar 2014 09:08:14 +0000 (10:08 +0100)]
Better key identifiers

Previously we identified keys in keyboard events by the 'key' property
if it was set, and 'keyCode' otherwise.

This turns out to be problematic as Firefox no longer leaves 'key'
undefined (so we fall back to using 'keyCode'), but instead sets 'key'
to 'MozPrintableKey' for all printable keys.

This meant that when (printable) keys are released, we can't match it
against the corresponding keydown event, and instead just send a keyup
event for the last keydown received.

Now, if both 'key' and 'keyCode' are set, use the concatenation of both.
Otherwise prefer 'keyCode', as that is at least unique for every key.

This should let us release the right keys on keyup events.

10 years agoImproved websocket binary support detection
Dominic Luechinger [Tue, 11 Mar 2014 13:29:58 +0000 (14:29 +0100)]
Improved websocket binary support detection

A facke connection to 'wss://localhost:17523' (randomly chosen) to detect
the WebSocket binary support is not the best solution.
First of all, check of prototype has the property 'binaryType'. If not,
perform a dummy connection to 'wss://.' instead of 'wss://localhost:17523'.

This patch was inspired by the discussion and implementation of Modernizr:
https://github.com/Modernizr/Modernizr/issues/370
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/websockets/binary.js

10 years agoMerge pull request #338 from vatesfr/configurable-ws-protocols
Solly [Wed, 19 Feb 2014 23:10:44 +0000 (18:10 -0500)]
Merge pull request #338 from vatesfr/configurable-ws-protocols

WebSocket protocols are now configurable

10 years agoWebSocket protocols are now configurable.
Julien Fontanet [Wed, 19 Feb 2014 18:29:06 +0000 (19:29 +0100)]
WebSocket protocols are now configurable.

10 years agoMerge pull request #242 from Medical-Insight/use-wss-for-binary-detect
Solly [Mon, 17 Feb 2014 23:09:16 +0000 (18:09 -0500)]
Merge pull request #242 from Medical-Insight/use-wss-for-binary-detect

Use wss when creating localhost connection to detect binary support (closes #242)

10 years agoImplement XVP UI in HTML
Malcolm Scott [Sat, 28 Sep 2013 18:25:15 +0000 (19:25 +0100)]
Implement XVP UI in HTML

10 years agoImplement XVP extension (shutdown/reboot/reset)
Malcolm Scott [Sat, 28 Sep 2013 18:24:54 +0000 (19:24 +0100)]
Implement XVP extension (shutdown/reboot/reset)

10 years agoImplement XVP auth
Malcolm Scott [Sat, 28 Sep 2013 16:32:37 +0000 (17:32 +0100)]
Implement XVP auth

10 years agoMerge pull request #327 from devicenull/master
Solly [Mon, 10 Feb 2014 22:21:29 +0000 (17:21 -0500)]
Merge pull request #327 from devicenull/master

Add support for connecting to TightVNC servers

10 years agoMerge pull request #336 from samhed/removeConnectionTimeout
Samuel [Fri, 7 Feb 2014 09:15:04 +0000 (10:15 +0100)]
Merge pull request #336 from samhed/removeConnectionTimeout

Remove the connection timeouts

10 years agoRemoves the connection timeouts to enable slower clients, connections or servers.
samhed [Thu, 6 Feb 2014 15:08:00 +0000 (16:08 +0100)]
Removes the connection timeouts to enable slower clients, connections or servers.

10 years agoAdd support for TightVNC auth type
Brian Rak [Fri, 31 Jan 2014 00:20:41 +0000 (19:20 -0500)]
Add support for TightVNC auth type

10 years agoMerge pull request #329 from Medical-Insight/fix-shift-chars
Solly [Mon, 13 Jan 2014 21:01:16 +0000 (13:01 -0800)]
Merge pull request #329 from Medical-Insight/fix-shift-chars

Fixes #326: correct handling of shift key

10 years agoFix issue #326: correct handling of shift key
Jesper Dam [Mon, 6 Jan 2014 12:59:25 +0000 (13:59 +0100)]
Fix issue #326: correct handling of shift key

When shortcut modifiers (modifier keys such as CTRL, which do not participate in
composing character input) are pressed, we try to suppress the keypress
event, as browsers do not reliably generate it. This means that
subsequent key events are decoded only based on the keydown event.

Due to a type error (comparing a string to a number), shift was
mistakenly treated as a shortcut modifier, preventing text input which
relied on shift, such as _ and %, from being generated.

10 years agoSupport 'requires' Line in Test Runner
Solly Ross [Tue, 17 Dec 2013 23:00:57 +0000 (18:00 -0500)]
Support 'requires' Line in Test Runner

If the files passed to the '-t' option are all '.js' files (or
the 'run all tests' option is used) and the '-i' option is not
passed, all tests will be search for the string
'require local modules: '.  Only the first instance of this string
will be used.  Following the colon should be a list of either local
modules (i.e. files in the '../include/' folder relative to the
test runner's directory, without the '.js' extension) or paths
to other Javascript files.  The list of modules and/or files should
be comma-separated.  These files will then be included in the generated
HTML file for the appropriate tests as if the '-i' option had been used.

10 years agoSupport Running All Tests
Solly Ross [Tue, 17 Dec 2013 23:00:45 +0000 (18:00 -0500)]
Support Running All Tests

Now, if the '-t' option is passed but no tests are listed,
all tests in the same directory as the launcher will be run.
A file is considered a test if it matches the RegEx
/^test\.(\w|\.|-)+\.js$/ (for those who cannot read PCRE,
that's roughly 'test.*.js').

10 years agoSupport Skipped Tests and Fix JSHint Issues
Solly Ross [Tue, 17 Dec 2013 22:56:18 +0000 (17:56 -0500)]
Support Skipped Tests and Fix JSHint Issues

The test runner now will not break when Mocha skips tests,
and will properly report them.  Additionally, several JSHint
warnings were fixed, and a `--debug` option was added to see
output from the provider.

10 years agoKeyboard Handling [8/8]: Introduce substituteCodepoint() to replace code points which...
jalf [Wed, 27 Nov 2013 12:50:53 +0000 (13:50 +0100)]
Keyboard Handling [8/8]: Introduce substituteCodepoint() to replace code points which don't have a keysym with ones that do

For now, the only code points this is done for are {s, S, t, T} with comma below (used in Romanian),
 which are replaced by {s, S, t, T} Cedilla.

10 years agoKeyboard Handling [7/8]: Replace keysym table with optimized version
jalf [Wed, 27 Nov 2013 14:38:20 +0000 (15:38 +0100)]
Keyboard Handling [7/8]: Replace keysym table with optimized version

Regenerate the keysymdef table without -d.

This eliminates keysym names, which are only used for debugging, and shaves ~40kb off the file size

10 years agoKeyboard Handling [6/8]: Update everything to include the new keyboard handling scripts
jalf [Wed, 27 Nov 2013 14:24:05 +0000 (15:24 +0100)]
Keyboard Handling [6/8]: Update everything to include the new keyboard handling scripts

10 years agoKeyboard Handling [5/8]: Update rfb.js to connect mouse events to keyboard handler
jalf [Wed, 27 Nov 2013 14:20:08 +0000 (15:20 +0100)]
Keyboard Handling [5/8]: Update rfb.js to connect mouse events to keyboard handler

This allows the keyboard handler to check modifier key state much more frequently

Since some browsers never send keyup events for modifier keys, we have to
synchronize modifier state whenever we get a mouse or keyboard event

10 years agoKeyboard Handling [4/8]: Update input.html to work with new keyboard handling
jalf [Wed, 27 Nov 2013 14:17:32 +0000 (15:17 +0100)]
Keyboard Handling [4/8]: Update input.html to work with new keyboard handling

Plug new keyboard handling into input.js (which breaks everything else), and update input.html to work with this

10 years agoKeyboard Handling [3/8]: Add unit tests for new keyboard handling
jalf [Wed, 27 Nov 2013 14:14:41 +0000 (15:14 +0100)]
Keyboard Handling [3/8]: Add unit tests for new keyboard handling

Relies on the libraries chai and mocha (available via npm from Node.JS).

Add anything installed via npm to the .gitignore file.

10 years agoKeyboard Handling [2/8]: Core implementation of new keyboard handling
jalf [Wed, 27 Nov 2013 14:12:39 +0000 (15:12 +0100)]
Keyboard Handling [2/8]: Core implementation of new keyboard handling

Add keyboard.js, containing the actual keyboard event parsing code.

10 years agoKeyboard Handling [1/8]: Parse keysymdef.h to produce Unicode -> keysym mappings...
jalf [Wed, 27 Nov 2013 14:07:25 +0000 (15:07 +0100)]
Keyboard Handling [1/8]: Parse keysymdef.h to produce Unicode -> keysym mappings table

Add a node.js-based tool (utils/parse.js) to read keysymdef.h and produce a JavaScript file
mapping Unicode code points to keysyms.

Also add the generated table (include/keysymdef.js).

10 years agoAdd support for Outputting Autogenerated Test HTML
Solly Ross [Wed, 4 Dec 2013 20:39:20 +0000 (15:39 -0500)]
Add support for Outputting Autogenerated Test HTML

This commit introduces two flags, '-g' and '-o' to
the `run_from_console.js`.  Both flags do not run
the tests.  Instead, deal with the autogenerated
HTML.  The former outputs the paths to the autogenerated
HTML temp files, and then pauses the program until Ctrl-C
is pressed (or SIGINT is sent).  The latter outputs the
generated HTML for each files to STDIN with the names
of the tests to which they belong.

10 years agoMerge pull request #322 from DirectXMan12/master
Solly [Wed, 4 Dec 2013 19:09:54 +0000 (11:09 -0800)]
Merge pull request #322 from DirectXMan12/master

Support Running Mocha Tests from the Console

10 years agoSupport Running Mocha Tests from the Console
Solly Ross [Tue, 3 Dec 2013 20:33:34 +0000 (15:33 -0500)]
Support Running Mocha Tests from the Console

Previously, the only way to run the Mocha tests
(in 'test.*.js') is to write a web page to wrap
them (or use a provided one), and then load that
file in a browser.

This commit introduces a series of files to allow
you to run the Mocha tests from the command line
instead.

Normally, Mocha tests can be run from
the command line anyway.  However, since this
project was designed to work in web browsers
and not node, the code doesn't contain the
proper `require` calls, nor does it contain the
proper `module.exports` declarations.  Additionally,
some of the code is dependent on having a browser
environment.

To overcome these issues, a headless browser environment
is used.  The command file introduced in the commit,
`run_from_console.js`, can use one of two environments:
ZombieJS, a pure-javascript headless browser simulator, or
SpookyJS/CasperJS/PhantomJS, an actually WebKit-based
environment.

Because the environment-dependent code is separated
out in to different files ('run_from_console.zombie.js'
and 'run_from_console.casper.js'), the program can be
safely used if only one of the supported environments
is installed.

Additionally, the command will automatically generate
HTML and inject the required tests if there is no
pre-existing HTML file (although you can still use
pre-existing HTML files if you want to).

The required NPM modules for the base program are:

- commander
- ansi
- mocha (must be installed locally for the HTML files to use)
- chai (must be installed locally for the HTML files to use)
- temp

For Zombie, you need:

- zombie
- q

For Casper, you need:

- casperjs (must be installed locally in order to work properly)
- phantomjs
- phantom
- spooky

The command itself can be invoked as

   $ node run_from_console.js -t html_files

or

   $ node run_from_console.js -t js_test_files -i js_required_files

In both cases, the 'files' options should be a comma-separated list of
files.  The first case runs pre-existing HTML files.  The second case
generates HTML files to run the specified Mocha tests, and injects
the requirements specified as well.

Additionally, there are extra arguments that apply to both forms:
'-a' can be used to print all test results, not just the failures,
'-c' may be used to force color to be enabled (when outputting to
a pipe, such as when `less -R` is in use), and '-e' is used to
set the environment.  Use the '-h' or '--help' options to see
a detailed description of all options, and their long-form versions.

10 years agoFix to relfect new github.io page base URL.
Joel Martin [Tue, 29 Oct 2013 19:38:24 +0000 (14:38 -0500)]
Fix to relfect new github.io page base URL.

10 years agoMerge pull request #317 from dosaboy/bugs/add_secure_property_to_token_cookie
Joel Martin [Tue, 29 Oct 2013 14:19:23 +0000 (07:19 -0700)]
Merge pull request #317 from dosaboy/bugs/add_secure_property_to_token_cookie

Adds 'secure' property to 'token' cookie

10 years agoAdds support for secure attribute on token cookie
Takashi Natsume [Mon, 28 Oct 2013 12:02:30 +0000 (12:02 +0000)]
Adds support for secure attribute on token cookie

This patch adds support for the secure attribute on token
cookies (sent by nova-novncproxy). If the https is used
to transfer the cookie, the secure attribute is set thus
restricting server requestes to secure conections only.
This should prevent man-in-the-middle attacks.

10 years agoREADME: add core team and other cleanup.
Joel Martin [Mon, 28 Oct 2013 21:01:40 +0000 (16:01 -0500)]
README: add core team and other cleanup.

- Make the ProjectsCompanies-using-noVNC the canonical source for
  companies/project using noVNC and only give a brief summary here.

- Drop the personal Amazon donate/thanks link. Keep the charities and
  ask for a tweet if so.

10 years agoMerge branch 'master' of github.com:kanaka/noVNC
Joel Martin [Fri, 11 Oct 2013 19:27:12 +0000 (14:27 -0500)]
Merge branch 'master' of github.com:kanaka/noVNC

10 years agoMerge pull request #284 from samhed/ctrlalttabesc
Samuel [Fri, 11 Oct 2013 15:21:59 +0000 (08:21 -0700)]
Merge pull request #284 from samhed/ctrlalttabesc

Support for extra keys such as Ctrl, Alt, Tab and Esc on mobile devices

10 years agoMerge branch 'master' of https://github.com/kanaka/noVNC into ctrlalttabesc
samhed [Fri, 11 Oct 2013 15:20:49 +0000 (17:20 +0200)]
Merge branch 'master' of https://github.com/kanaka/noVNC into ctrlalttabesc

Conflicts:
include/ui.js
vnc.html

10 years agoMerge pull request #282 from samhed/framebufferupdate
Samuel [Thu, 10 Oct 2013 09:45:08 +0000 (02:45 -0700)]
Merge pull request #282 from samhed/framebufferupdate

Allow higher frame rates by using a new approach for framebufferUpdate requests

10 years agoFix so that parentheses can be written from iOS devices.
samhed [Wed, 9 Oct 2013 09:35:43 +0000 (11:35 +0200)]
Fix so that parentheses can be written from iOS devices.
    * changed the type of the input field (which is used for bringing up the
      on-screen keyboards on touch devices) from email to text
    * when typing in an input field of type email the user is not allowed to
      write parentheses on iOS devices, the keys are disabled.
    * tested on iOS 6, iOS 7 and Android 4.3.

10 years agoMerge pull request #304 from samhed/localcursor
Samuel [Wed, 9 Oct 2013 08:44:41 +0000 (01:44 -0700)]
Merge pull request #304 from samhed/localcursor

Enables local cursor by default

10 years agoMerge pull request #303 from retr0h/https-first
Samuel [Wed, 9 Oct 2013 08:38:55 +0000 (01:38 -0700)]
Merge pull request #303 from retr0h/https-first

The https check should come first.

10 years agoMerge pull request #308 from samhed/autoconnect
Joel Martin [Fri, 4 Oct 2013 20:29:24 +0000 (13:29 -0700)]
Merge pull request #308 from samhed/autoconnect

Autoconnect option as URL query

10 years agoMerge pull request #301 from samhed/chromkeyboard
Joel Martin [Fri, 4 Oct 2013 20:17:47 +0000 (13:17 -0700)]
Merge pull request #301 from samhed/chromkeyboard

Fixes the onscreen keyboard in Chrome on Android

10 years agoAutoconnect option as URL query
samhed [Fri, 4 Oct 2013 15:59:03 +0000 (17:59 +0200)]
Autoconnect option as URL query

10 years agoOn touch devices the default should be to use a remote cursor.
samhed [Tue, 24 Sep 2013 09:19:17 +0000 (11:19 +0200)]
On touch devices the default should be to use a remote cursor.

10 years agoEnables local cursor by default.
samhed [Mon, 23 Sep 2013 09:48:16 +0000 (11:48 +0200)]
Enables local cursor by default.