Show More
@@ -15,11 +15,13 b' casper.notebook_test(function () {' | |||||
15 | this.execute_cell_then(index); |
|
15 | this.execute_cell_then(index); | |
16 |
|
16 | |||
17 | this.then(function () { |
|
17 | this.then(function () { | |
18 | // When running in xvfb, the Slimer window doesn't always have focus |
|
18 | if (this.slimerjs) { | |
19 | // immediately. By clicking on a new element on the page we ccan force |
|
19 | // When running in xvfb, the Slimer window doesn't always have focus | |
20 | // it to gain focus. |
|
20 | // immediately. By clicking on a new element on the page we ccan force | |
21 | this.click_cell_editor(1); |
|
21 | // it to gain focus. | |
22 |
this.click_cell_editor( |
|
22 | this.click_cell_editor(1); | |
|
23 | this.click_cell_editor(0); | |||
|
24 | } | |||
23 |
|
25 | |||
24 | this.validate_notebook_state('initial state', 'edit', 0); |
|
26 | this.validate_notebook_state('initial state', 'edit', 0); | |
25 | this.trigger_keydown('esc'); |
|
27 | this.trigger_keydown('esc'); |
@@ -453,18 +453,15 b' casper.assert_colors_equal = function (hex_color, local_color, msg) {' | |||||
453 |
|
453 | |||
454 | casper.notebook_test = function(test) { |
|
454 | casper.notebook_test = function(test) { | |
455 | // Wrap a notebook test to reduce boilerplate. |
|
455 | // Wrap a notebook test to reduce boilerplate. | |
456 | // |
|
|||
457 | // If you want to read parameters from the commandline, use the following |
|
|||
458 | // (i.e. value=): |
|
|||
459 | // if (casper.cli.options.value) { |
|
|||
460 | // casper.exit(1); |
|
|||
461 | // } |
|
|||
462 | this.open_new_notebook(); |
|
456 | this.open_new_notebook(); | |
463 |
|
457 | |||
464 | // Echo whether or not we are running this test using SlimerJS |
|
458 | // Echo whether or not we are running this test using SlimerJS | |
465 | if (this.evaluate(function(){ |
|
459 | if (this.evaluate(function(){ | |
466 | return typeof InstallTrigger !== 'undefined'; // Firefox 1.0+ |
|
460 | return typeof InstallTrigger !== 'undefined'; // Firefox 1.0+ | |
467 | })) { console.log('This test is running in SlimerJS.'); } |
|
461 | })) { | |
|
462 | console.log('This test is running in SlimerJS.'); | |||
|
463 | this.slimerjs = true; | |||
|
464 | } | |||
468 |
|
465 | |||
469 | // Make sure to remove the onbeforeunload callback. This callback is |
|
466 | // Make sure to remove the onbeforeunload callback. This callback is | |
470 | // responsable for the "Are you sure you want to quit?" type messages. |
|
467 | // responsable for the "Are you sure you want to quit?" type messages. |
General Comments 0
You need to be logged in to leave comments.
Login now