0
0
mirror of https://github.com/puppeteer/puppeteer synced 2024-06-14 14:02:48 +00:00
puppeteer/third_party/phantomjs/test/module/webpage/callback.js
2017-06-21 14:11:52 -07:00

17 lines
412 B
JavaScript

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);
}, "page.onCallback", { expected_fail : true });