为什么 --browser-test 标志不包含在 Puppeteer 的默认 Chromium 标志列表中?

Why isn't the --browser-test flag included in Puppeteer's default list of Chromium flags?

我很好奇此标志是否对自动化有任何已知的不良影响,或者它是否会使我的测试无效。

我目前正在 运行 使用此标志进行测试,它似乎没有造成任何伤害。是不是被忽略了?

https://peter.sh/experiments/chromium-command-line-switches/#browser-test https://github.com/GoogleChrome/puppeteer/blob/master/lib/Launcher.js#L38

--browser-test 激活了 Chromium 开发人员使用的关于 canvas 重绘的内部测试。

存储库中的一些 older code,给出了这个提示

Tells Content Shell that it's running as a content_browsertest.

并且 Chromium 存储库中的 this issue 包含更多信息:

We need a test that checks canvas capture happens for N times when there are N repaints. This test is not appropriate for webkit layout tests as it is slow and there are mock streams involved.

看起来他们为这个测试添加了一个特殊的标志。

因此,你不应该激活这个标志,因为这个测试是关于开发团队的内部浏览器测试,而不是测试网站。