[IMP] PhantomJS UI error reporting

bzr revid: ddm@openerp.com-20131223144603-xxuml794a91nt2sc
This commit is contained in:
ddm
2013-12-23 15:46:03 +01:00
parent dbe5c06d95
commit faae14704d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ class WebsiteUiTest(unittest.TestCase):
class WebsiteUiSuite(unittest.TestSuite):
# timeout is in seconds
def __init__(self, testfile, timeout=10):
def __init__(self, testfile, timeout=10.0):
self.testfile = testfile
self.timeout = timeout
self._test = None
@@ -135,7 +135,7 @@ class WebsiteUiSuite(unittest.TestSuite):
message = args.get('message', "")
result.addFailure(self._test, message)
else:
result.addError(self._test, 'Unexpected message: "%s"' % line)
result.addError(self._test, 'Unexpected JSON: "%s"' % line)
except ValueError:
result.addError(self._test, 'Unexpected message: "%s"' % line)
+1 -1
View File
@@ -8,7 +8,7 @@ page.onError = function(message, trace) {
};
function waitFor(ready, timeout) {
var timeOutMillis = timeout ? timeout*1000 : 10000;
var timeOutMillis = timeout ? Math.round(timeout*1000) : 10000;
var start = new Date().getTime();
var condition = ready();
var interval = setInterval(function() {