From 7dae0853ae9eaabe1db2b5fcdc825ea11ac16a47 Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Tue, 10 Feb 2026 11:30:59 +0300 Subject: [PATCH 1/2] feat: add flags suggested in #550 https://github.com/rubycdp/ferrum/issues/550 --- lib/ferrum/browser/options/chrome.rb | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/ferrum/browser/options/chrome.rb b/lib/ferrum/browser/options/chrome.rb index 2d29009b..f628d777 100644 --- a/lib/ferrum/browser/options/chrome.rb +++ b/lib/ferrum/browser/options/chrome.rb @@ -20,7 +20,17 @@ class Chrome < Base "disable-extensions" => nil, "disable-component-extensions-with-background-pages" => nil, "disable-hang-monitor" => nil, - "disable-features" => "site-per-process,IsolateOrigins,TranslateUI,MacAppCodeSignClone", + "disable-features" => %w[ + site-per-process + IsolateOrigins + TranslateUI + Translate + MacAppCodeSignClone + InterestFeedContentSuggestion + OptimizationHints + AcceptCHFrame + MediaRouter + ].join(","), "disable-translate" => nil, "disable-background-networking" => nil, "enable-features" => "NetworkService,NetworkServiceInProcess", @@ -39,7 +49,16 @@ class Chrome < Base "password-store" => "basic", "no-startup-window" => nil, "remote-allow-origins" => "*", - "disable-blink-features" => "AutomationControlled" + "disable-blink-features" => "AutomationControlled", + "allow-pre-commit-input" => nil, + "disable-component-update" => nil, + "disable-crash-reporter" => nil, + "no-crash-upload" => nil, + "disable-field-trial-config" => nil, + "disable-infobars" => nil, + "disable-search-engine-choice-screen" => nil, + "disable-smooth-scrolling" => nil, + "no-default-browser-check" => nil }.freeze MAC_BIN_PATH = [ From 582237be4b276f69c8968dd5076f8273e8508a89 Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Tue, 10 Feb 2026 11:41:17 +0300 Subject: [PATCH 2/2] chore: sort alphabetically --- lib/ferrum/browser/options/chrome.rb | 69 +++++++++++++++------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/lib/ferrum/browser/options/chrome.rb b/lib/ferrum/browser/options/chrome.rb index f628d777..afc99cae 100644 --- a/lib/ferrum/browser/options/chrome.rb +++ b/lib/ferrum/browser/options/chrome.rb @@ -5,21 +5,19 @@ class Browser class Options class Chrome < Base DEFAULT_OPTIONS = { - "headless" => nil, - "hide-scrollbars" => nil, - "mute-audio" => nil, - "enable-automation" => nil, - "disable-web-security" => nil, - "disable-session-crashed-bubble" => nil, + "allow-pre-commit-input" => nil, + "disable-background-networking" => nil, + "disable-background-timer-throttling" => nil, + "disable-backgrounding-occluded-windows" => nil, + "disable-blink-features" => "AutomationControlled", "disable-breakpad" => nil, - "disable-sync" => nil, - "no-first-run" => nil, - "use-mock-keychain" => nil, - "keep-alive-for-test" => nil, - "disable-popup-blocking" => nil, - "disable-extensions" => nil, + "disable-client-side-phishing-detection" => nil, "disable-component-extensions-with-background-pages" => nil, - "disable-hang-monitor" => nil, + "disable-component-update" => nil, + "disable-crash-reporter" => nil, + "disable-default-apps" => nil, + "disable-dev-shm-usage" => nil, + "disable-extensions" => nil, "disable-features" => %w[ site-per-process IsolateOrigins @@ -31,34 +29,39 @@ class Chrome < Base AcceptCHFrame MediaRouter ].join(","), - "disable-translate" => nil, - "disable-background-networking" => nil, - "enable-features" => "NetworkService,NetworkServiceInProcess", - "disable-background-timer-throttling" => nil, - "disable-backgrounding-occluded-windows" => nil, - "disable-client-side-phishing-detection" => nil, - "disable-default-apps" => nil, - "disable-dev-shm-usage" => nil, + "disable-field-trial-config" => nil, + "disable-hang-monitor" => nil, + "disable-infobars" => nil, "disable-ipc-flooding-protection" => nil, + "disable-popup-blocking" => nil, "disable-prompt-on-repost" => nil, "disable-renderer-backgrounding" => nil, + "disable-search-engine-choice-screen" => nil, + "disable-session-crashed-bubble" => nil, "disable-site-isolation-trials" => nil, + "disable-smooth-scrolling" => nil, + "disable-sync" => nil, + "disable-translate" => nil, + "disable-web-security" => nil, + "enable-automation" => nil, + "enable-features" => %w[ + NetworkService + NetworkServiceInProcess + ].join(","), "force-color-profile" => "srgb", + "headless" => nil, + "hide-scrollbars" => nil, + "keep-alive-for-test" => nil, "metrics-recording-only" => nil, - "safebrowsing-disable-auto-update" => nil, - "password-store" => "basic", + "mute-audio" => nil, + "no-crash-upload" => nil, + "no-default-browser-check" => nil, + "no-first-run" => nil, "no-startup-window" => nil, + "password-store" => "basic", "remote-allow-origins" => "*", - "disable-blink-features" => "AutomationControlled", - "allow-pre-commit-input" => nil, - "disable-component-update" => nil, - "disable-crash-reporter" => nil, - "no-crash-upload" => nil, - "disable-field-trial-config" => nil, - "disable-infobars" => nil, - "disable-search-engine-choice-screen" => nil, - "disable-smooth-scrolling" => nil, - "no-default-browser-check" => nil + "safebrowsing-disable-auto-update" => nil, + "use-mock-keychain" => nil }.freeze MAC_BIN_PATH = [