fixes an error that was made in the merge with the last sync with websockify.
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.
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.
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)
Cleanup: DES code

File: des.js
Tests Added: False
Changes:
- Fixed JSHint Errors
- Improved whitespace around operators
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).
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.
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
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
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
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.
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
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
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.
Merge pull request #368 from DirectXMan12/refactor/cleanup

Cleanup and test all the things (plus ditching Crockford)!
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.
Fix invalid updateState property of RFB

It was changed to `onUpdateState` in
b1dee9478815b22bf5fee3ee9e44321d4bb46c91.
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)
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)
Merge pull request #391 from mandre/fix_invalid_property

Fix invalid updateState property on RFB preventing noVNC to load