[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
This commit is contained in:
Christophe Monniez
2019-08-21 06:15:00 +00:00
parent 4b1245c5ed
commit f5f940a291
+11
View File
@@ -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,