【问题标题】:enable Chrome flags from the command line从命令行启用 Chrome 标志
【发布时间】:2018-06-18 19:48:18
【问题描述】:

我想在启动 chrome 时启用一个标志(启用令牌绑定)。 我可以使用 chrome://flags 页面来做到这一点。但是对于运行测试,我需要从命令行进行。

我试过了

chrome --enable-features=token-binding

chrome --enable-token-binding

他们都没有工作。

【问题讨论】:

  • 试试--flag-switches-begin --enable-features=token-binding --flag-switches-end
  • @wOxx 不起作用。
  • 听起来像一个错误。尝试报告crbug.com

标签: google-chrome google-chrome-devtools


【解决方案1】:
  1. 转到 chrome://version
  2. 查找命令行参数:

命令行 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --enable-audio-service-sandbox --flag-switches-begin --enable-features=CookiesWithoutSameSiteMustBeSecure,SameSiteByDefaultCookies --flag -switches-end --enable-audio-service-sandbox

使用所有参数运行上述命令,您的 chrome 实例将预设所有设置。

【讨论】:

  • 这不再有效。知道为什么吗? chrome 是否已弃用此功能?
  • @Matthew 看起来 chrome 已经完全禁用了它。
  • ? @#$%^&*(*&^%$ 哈哈,谢谢确认!
【解决方案2】:

试试--flag-switches-begin --enable-token-binding --flag-switches-end

模式是--flag-switches 开始和结束标记标志。然后是作为参数提供的标志的名称,以 -- 为前缀。

【讨论】:

    【解决方案3】:

    在 Chrome 版本 70 中移除了令牌绑定

    https://www.chromestatus.com/feature/5097603234529280

    mayankSinha 的答案适用于他提到的标志。请注意更改后的命名约定:“小写由 - 分割”约定更改为 CamelCase。

    即same-site-by-default-cookies(如 chrome://flags 所示)变为 SameSiteByDefaultCookies

    【讨论】:

      猜你喜欢
      • 2012-10-20
      • 2015-10-09
      • 2014-05-22
      • 1970-01-01
      • 2013-02-07
      • 1970-01-01
      • 2013-10-04
      • 1970-01-01
      • 2020-03-04
      相关资源
      最近更新 更多