mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
18 lines
420 B
JavaScript
18 lines
420 B
JavaScript
//! unsupported
|
|
test(function () {
|
|
var page = require('webpage').create();
|
|
|
|
var msg = "message",
|
|
value = "value",
|
|
result,
|
|
expected = "extra-value";
|
|
page.onPrompt = function(msg, value) {
|
|
return "extra-"+value;
|
|
};
|
|
result = page.evaluate(function(m, v) {
|
|
return window.prompt(m, v);
|
|
}, msg, value);
|
|
|
|
assert_equals(result, expected);
|
|
}, "page.onPrompt");
|