mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 20:39:03 +00:00
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`.
This commit is contained in:
parent
def55ef359
commit
c67043f1ed
1 changed files with 4 additions and 4 deletions
|
|
@ -15,8 +15,8 @@ var mocha = new Mocha({
|
|||
// 2 - dpms version is 1.1.
|
||||
// 3 - to be dpms capable.
|
||||
var run_dpms_test = function(X, cb) {
|
||||
X.require('dpms', function(ext) {
|
||||
if (!util.isError(ext)) {
|
||||
X.require('dpms', function(err, ext) {
|
||||
if (!util.isError(err)) {
|
||||
dpms = ext;
|
||||
dpms.GetVersion(undefined, undefined, function(err, version) {
|
||||
if (!err && version[0] === 1 && version[1] === 1) {
|
||||
|
|
@ -42,8 +42,8 @@ var run_xtest_test = function(X, cb) {
|
|||
};
|
||||
|
||||
var run_randr_test = function(X, cb) {
|
||||
X.require('randr', function(ext) {
|
||||
if (!util.isError(ext)) {
|
||||
X.require('randr', function(err, ext) {
|
||||
if (!util.isError(err)) {
|
||||
randr = ext;
|
||||
randr.QueryVersion(1, 2, function(err, version) {
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue