chromiumSwitches.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.chromiumSwitches = void 0;
  6. /**
  7. * Copyright 2017 Google Inc. All rights reserved.
  8. * Modifications copyright (c) Microsoft Corporation.
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the "License");
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. */
  22. // No dependencies as it is used from the Electron loader.
  23. const chromiumSwitches = exports.chromiumSwitches = ['--disable-field-trial-config',
  24. // https://source.chromium.org/chromium/chromium/src/+/main:testing/variations/README.md
  25. '--disable-background-networking', '--enable-features=NetworkService,NetworkServiceInProcess', '--disable-background-timer-throttling', '--disable-backgrounding-occluded-windows', '--disable-back-forward-cache',
  26. // Avoids surprises like main request not being intercepted during page.goBack().
  27. '--disable-breakpad', '--disable-client-side-phishing-detection', '--disable-component-extensions-with-background-pages', '--disable-component-update',
  28. // Avoids unneeded network activity after startup.
  29. '--no-default-browser-check', '--disable-default-apps', '--disable-dev-shm-usage', '--disable-extensions',
  30. // AvoidUnnecessaryBeforeUnloadCheckSync - https://github.com/microsoft/playwright/issues/14047
  31. // Translate - https://github.com/microsoft/playwright/issues/16126
  32. // HttpsUpgrades - https://github.com/microsoft/playwright/pull/27605
  33. // PaintHolding - https://github.com/microsoft/playwright/issues/28023
  34. '--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding', '--allow-pre-commit-input', '--disable-hang-monitor', '--disable-ipc-flooding-protection', '--disable-popup-blocking', '--disable-prompt-on-repost', '--disable-renderer-backgrounding', '--force-color-profile=srgb', '--metrics-recording-only', '--no-first-run', '--enable-automation', '--password-store=basic', '--use-mock-keychain',
  35. // See https://chromium-review.googlesource.com/c/chromium/src/+/2436773
  36. '--no-service-autorun', '--export-tagged-pdf',
  37. // https://chromium-review.googlesource.com/c/chromium/src/+/4853540
  38. '--disable-search-engine-choice-screen'];