Add support for origin trials to headless
In crbug.com/1049126, we discovered that origin trials are not enabled when running in headless mode. This was not intentional, as headless should behave the same as regular Chrome with respect to origin trials. The root cause is that origin trials require the embedder (i.e. Chrome) to explicitly opt-in to enable trials. The opt-in is done by providing an implementation of OriginTrialPolicy [1]. It turns out that headless is actually a separate embedder than Chrome, which was missed in the initial implementation. A workaround for the problem has been landed in [2], and merged back to M80. This CL is intended to be merged back to M81. This CL implements the opt-in for the headless embedder, by copying the Chrome embedder implementation. Ideally, headless should re-use the Chrome implementation, but that would require larger changes. The duplication will be addressed in M82 in crbug.com/1049317. [1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/common/origin_trials/origin_trial_policy.h [2] https://chromium-review.googlesource.com/c/chromium/src/+/2039601 Bug: 1049126 Change-Id: Ide596c100baae4b69eab2149169eb92353a7bac7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042382 Commit-Queue: Jason Chase <chasej@chromium.org> Reviewed-by:Mason Freed <masonfreed@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Reviewed-by:
Johannes Henkel <johannes@chromium.org> Cr-Commit-Position: refs/heads/master@{#739253}
Showing
Please register or sign in to comment