Commit graph

12 commits

Author SHA1 Message Date
An Ko
52a8739daf Check for errors directly instead of with isError 2014-11-03 16:43:37 +01:00
An Ko
19b937094b Assign to local vars instead of globals
These were being assigned to globals for some reason.

The tests return the same results when they're local, so I'll assume
this was a typo.
2014-11-03 16:06:20 +01:00
An Ko
6d76962bb2 Correspondingly rename xtest callback param
The first parameter is the error param after all.

The test logic is unchanged.
2014-11-03 16:01:05 +01:00
An Ko
c67043f1ed Receive xrandr & dpms exts correctly in tests
This makes tests pass that were failing with null reference errors.

`XClient.require` was passing the callback function to `requireExt`,
which called it with parameters `null, ext` on success. The callback
itself seemed to assume it will get only one parameter, which is either
the extension on an error, hence why it tried to call methods on a
`null`.
2014-11-03 15:52:34 +01:00
Santiago Gimeno
7268da486f Remove unnecessary log 2014-03-11 18:02:46 +01:00
Santiago Gimeno
b6a76b51d7 Some more test fixes
- Fix error.js test.
- Make sure test_runner exits with the correct error code.
- Comment tests not implemented in core-properties.
2014-03-11 17:57:29 +01:00
Santiago Gimeno
7d23cbfb9e Set node version in travis to 0.10
- As the tests were failing due to using setImmediate.
- Remove one log.
2014-03-11 16:26:57 +01:00
Santiago Gimeno
b95302ff1a Add basic RANDR integration test
- Some improvements in test-runner.
2014-03-11 15:59:58 +01:00
Andrey Sidorov
3398921423 fix path 2013-02-19 22:28:13 +11:00
Santiago Gimeno
4508f9e93d Change createClient signature
- The new signature is:

  createClient(options, initCB), where
     - options is an optional object that defines different parameters such as
               display, etc.
     - initCB is an optional callback with the signature: function(err, display)
- The initCB is going to be called with an error ONLY if the connection to the X
  server fails. Further errors in the server connection will be 'emitted'.
- Update tests and test-runner.js accordingly.
- Update README.
2012-12-19 09:34:19 +01:00
Santiago Gimeno
9b8cef815b A couple of fixes in xtest extension
- Return directly in case of error retrieving the extension.
- QueryVersion should be GetVersion and fix its format.
- Add a test for GetVersion.
- Modify test-runner.js so it uses async library to add dynamically the test
  files to be used.
2012-11-26 16:51:56 +01:00
Santiago Gimeno
e6796ab192 Only execute dpms test when we can
- Add test-runner.js to be able to execute the dpms when these
  conditions are complied:
     1 - DPMS extension is supported.
     2 - DPMS version is 1.1.
     3 - DPMS is capable.
2012-11-25 19:35:07 +01:00