tests: Update comment about common.keypress

(imported from commit c58d850ba4fa291e62ffdf56d8e647688940a3ed)
This commit is contained in:
Keegan McAllister 2013-03-20 19:07:30 -04:00
parent 83f1071259
commit 7e348783e6
1 changed files with 2 additions and 2 deletions

View File

@ -120,8 +120,8 @@ exports.get_rendered_messages = function (table) {
};
// Inject key presses by running some jQuery code in page context.
// If we upgrade to CasperJS 1.0 and PhantomJS 1.7+, we can do this
// in a more straightforward way.
// PhantomJS and CasperJS don't provide a clean way to insert key
// presses by code, only strings of printable characters.
exports.keypress = function (code) {
casper.evaluate(function (code) {
$('body').trigger($.Event('keydown', { which: code }));