Address comments

pull/37/head
jon 12 years ago
parent 1c228ca0ab
commit 19cf386a20

@ -17,7 +17,7 @@ casper.notebook_test(function () {
this.then(function () {
if (this.slimerjs) {
// When running in xvfb, the Slimer window doesn't always have focus
// immediately. By clicking on a new element on the page we ccan force
// immediately. By clicking on a new element on the page we can force
// it to gain focus.
this.click_cell_editor(1);
this.click_cell_editor(0);

@ -464,7 +464,7 @@ casper.notebook_test = function(test) {
}
// Make sure to remove the onbeforeunload callback. This callback is
// responsable for the "Are you sure you want to quit?" type messages.
// responsible for the "Are you sure you want to quit?" type messages.
// PhantomJS ignores these prompts, SlimerJS does not which causes hangs.
this.then(function(){
this.evaluate(function(){

@ -257,12 +257,10 @@ class JSController(TestController):
def wait(self, *pargs, **kwargs):
"""Wait for the JSController to finish"""
ret = super(JSController, self).wait(*pargs, **kwargs)
# If this is a SlimerJS controller, echo the captured output.
# If this is a SlimerJS controller, check the captured stdout for
# errors. Otherwise, just return the return code.
if self.engine == 'slimerjs':
# Echo captured output.
stdout = bytes_to_str(self.stdout)
print(stdout)
# Return True if a failure occured.
return self.slimer_failure.search(strip_ansi(stdout))
else:
return ret
@ -376,7 +374,7 @@ def prepare_controllers(options):
else:
js_testgroups = all_js_groups()
engine = 'phantomjs' if have['phantomjs'] and not options.slimerjs else 'slimerjs'
engine = 'slimerjs' if options.slimerjs else 'phantomjs'
c_js = [JSController(name, engine=engine) for name in js_testgroups]
c_py = [PyTestController(name, options) for name in py_testgroups]

Loading…
Cancel
Save