Skip to content

Commit 61e55c1

Browse files
committed
Fixed some bugs on tests and removed old browser_basics tests
1 parent 39a5184 commit 61e55c1

File tree

12 files changed

+17
-405
lines changed

12 files changed

+17
-405
lines changed

src/api/setAction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
dop.setAction = function(actions) {
33
var collector = dop.collectFirst(), object_id;
44
for (object_id in actions)
5-
dop.core.setActionLocal(actions[object_id].object, actions[object_id].action);
5+
dop.core.setAction(actions[object_id].object, actions[object_id].action);
66
return collector;
77
};

src/protocol/_onsubscribe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dop.protocol._onsubscribe = function(node, request_id, request, response) {
3737
if (!isObject(object))
3838
request.promise.reject(dop.core.error.reject.OBJECT_NOT_FOUND);
3939
else
40-
request.promise.resolve(object);
40+
request.promise.resolve(dop.getObjectProxy(object));
4141
}
4242
}
4343
}

src/util/sprintf.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11

2-
// dop.util.sprintf = function() {
2+
dop.util.sprintf = function() {
33

4-
// var s = -1, result, str=arguments[0], array = Array.prototype.slice.call(arguments, 1);
5-
// return str.replace(/"/g, "'").replace(/%([0-9]+)|%s/g , function() {
4+
var s = -1, result, str=arguments[0], array = Array.prototype.slice.call(arguments, 1);
5+
return str.replace(/"/g, "'").replace(/%([0-9]+)|%s/g , function() {
66

7-
// result = array[
8-
// (arguments[1] === undefined || arguments[1] === '') ? ++s : arguments[1]
9-
// ];
7+
result = array[
8+
(arguments[1] === undefined || arguments[1] === '') ? ++s : arguments[1]
9+
];
1010

11-
// if (result === undefined)
12-
// result = arguments[0];
11+
if (result === undefined)
12+
result = arguments[0];
1313

14-
// return result;
14+
return result;
1515

16-
// });
16+
});
1717

18-
// };
19-
// // Usage: sprintf('Code error %s for %s', 25, 'Hi') -> "Code error 25 for Hi"
20-
// // Usage2: sprintf('Code error %1 for %0', 25, 'Hi') -> "Code error Hi for 25"
18+
};
19+
// Usage: sprintf('Code error %s for %s', 25, 'Hi') -> "Code error 25 for Hi"
20+
// Usage2: sprintf('Code error %1 for %0', 25, 'Hi') -> "Code error Hi for 25"

test/browser_basics/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/browser_basics/browser/ws.js

Lines changed: 0 additions & 104 deletions
This file was deleted.

test/browser_basics/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

test/browser_basics/index.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

test/browser_basics/server/create.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

test/browser_basics/server/index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)