diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-12-04 12:45:33 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-12-04 14:46:28 +0000 |
| commit | 6245ed2bce4382c3207baf9c6b2d4394384f0b4f (patch) | |
| tree | 6f8025c97e7210e837cc1ba5b2356b6e075893a0 /addons/web_editor/static/src/js/frontend | |
| parent | 46b1218094ec4d3b6e6d0ec4f66a94a587d575bd (diff) | |
[FIX] bus, mail: navigate from tests with mocked bus services
Before this commit, when navigating from test environment (e.g.
page reload), it crashed with following error:
`TypeError: Cannot convert undefined or null to object`
This error comes from mocked bus services in tests: even when they
have been destroyed, they handle the window event 'unload'. They
no longer have a parented parent, so `this.call()` returns
`undefined`, hence the crash.
This commit prevents mocked bus services to listen on window 'unload'
event. Tests must always simulate this window event by explicitly
calling the handler.
closes odoo/odoo#41378
X-original-commit: fd08d04f0a24fea52e7b668b90aec48b33d349a3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/frontend')
0 files changed, 0 insertions, 0 deletions
