2017-05-11 07:06:41 +00:00
|
|
|
test(function () {
|
|
|
|
var page = require('webpage').create();
|
|
|
|
|
|
|
|
var msgA = "a",
|
|
|
|
msgB = "b",
|
|
|
|
result,
|
|
|
|
expected = msgA + msgB;
|
|
|
|
page.onCallback = function(a, b) {
|
|
|
|
return a + b;
|
|
|
|
};
|
|
|
|
result = page.evaluate(function(a, b) {
|
|
|
|
return window.callPhantom(a, b);
|
|
|
|
}, msgA, msgB);
|
|
|
|
|
|
|
|
assert_equals(result, expected);
|
2017-06-20 21:54:53 +00:00
|
|
|
}, "page.onCallback", { expected_fail : true });
|