From aaa80e957548418c94e7a8841cd844c5135af62e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 10 Mar 2014 12:53:34 +0100 Subject: [PATCH] [IMP] phantomjs driver cleanups bzr revid: xmo@openerp.com-20140310115334-vjh7gx5oizdm6s67 --- openerp/tests/phantomtest.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openerp/tests/phantomtest.js b/openerp/tests/phantomtest.js index bfd6fa4d0b2..8099de54bab 100644 --- a/openerp/tests/phantomtest.js +++ b/openerp/tests/phantomtest.js @@ -96,14 +96,17 @@ function PhantomTest() { // ---------------------------------------------------- // run test // ---------------------------------------------------- - this.run = function(url_path, code, ready) { + this.run = function() { + var url_path = this.options.url_path, + code = this.options.code, + ready = this.options.ready; if(self.options.login) { - qp = []; + var qp = []; qp.push('db=' + self.options.db); qp.push('login=' + self.options.login); qp.push('key=' + self.options.password); qp.push('redirect=' + encodeURIComponent(url_path)); - var url_path = "/login?" + qp.join('&'); + url_path = "/login?" + qp.join('&'); } var url = self.origin + url_path; self.page.open(url, function(status) { @@ -132,8 +135,7 @@ function PhantomTest() { // js mode or jsfile mode if(phantom.args.length === 1) { - pt = new PhantomTest(); - pt.run(pt.options.url_path, pt.options.code, pt.options.ready); + new PhantomTest().run(); } // vim:et: