Skip to content
Browse files

[FIX] tests: avoid check document.readyState of about:blank

In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.

When no 'ready' code is given it defaults to check the
'document.readyState' status.

In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.

With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.

cherry-pick of 03a8819

closes #31936

Signed-off-by: Christophe Simonis <>
  • Loading branch information...
d-fence committed Jan 26, 2019
1 parent 4e39328 commit 2c9505fda7f2eb473c008ef9af46380a7670d80a
Showing with 1 addition and 1 deletion.
  1. +1 −1 odoo/tests/
@@ -804,7 +804,7 @@ def browser_js(self, url_path, code, ready='', login=None, timeout=60, **kw):
if['logfile']:'Starting screen cast')
self.browser.navigate_to(url, wait_stop=not bool(ready))

# Needed because tests like test01.js (qunit tests) are passing a ready
# code = ""

0 comments on commit 2c9505f

Please sign in to comment.
You can’t perform that action at this time.