From f5f940a29186a4be4342b9cb3baaee55e5b1d6ff Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Wed, 14 Aug 2019 13:36:42 +0000 Subject: [PATCH] [IMP] tests: disable a few more chrome things * disable background networking like GoogleUrlTracker ... see https://codereview.chromium.org/3312014 * disable backgrounding occluded windows is a CLI swith that was specifically written for tests to avoid non deterministic behavior. To avoid test flakiness, it should come with disable renderer-backgrounding and disable background-throttling as stated here: https://github.com/smooth-code/jest-puppeteer/issues/137 * disable breakpad is used to disable crash reporting, the difference with disable crash-reporter is not clear. see https://peter.sh/experiments/chromium-command-line-switches/ * disable defaults-apps, prevent installation of default apps on the first run * disable dev-shm usage that may cause crashes --- odoo/tests/common.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 6f110619d2c..6485092c6bb 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -578,6 +578,17 @@ class ChromeBrowser(): '--no-default-browser-check': '', '--no-first-run': '', '--disable-extensions': '', + '--disable-background-networking' : '', + '--disable-background-timer-throttling' : '', + '--disable-backgrounding-occluded-windows': '', + '--disable-renderer-backgrounding' : '', + '--disable-breakpad': '', + '--disable-client-side-phishing-detection': '', + '--disable-crash-reporter': '', + '--disable-default-apps': '', + '--disable-dev-shm-usage': '', + '--disable-device-discovery-notifications': '', + '--disable-namespace-sandbox': '', '--user-data-dir': self.user_data_dir, '--disable-translate': '', '--window-size': self.window_size,