[WPT/common/security-features] Merge generate.py (1/2) #16345
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This CL introduces ReferrerPolicy/MixedContentConfig classes in generate.py,
that encapsulates test-specific things, e.g.:
generate_selection()
in generate.py).After this CL, the most part of
{mixed-content,referrer-policy}/generic/tools/generate.py are the same,
except for *Config classes.
This CL leaves the common parts in place in generate.py only for ease of
codereview, and a subsequent CL will merge them to common/.
common/security-features/tools/util.py.
using json.dumps().
This CL doesn't modify the generated files, because
the diffs in generated files don't affect behavior:
comments, location of
\<meta>
, addition of\<meta charset='utf-8'>
,and orders of JSON keys.
I'm planning to larger changes to generated files later, and will
regenerate files after that.
Bug: 906850
Change-Id: Ib509ede41e160b5b03876fe162d1d62c54e13151
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566818
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653782}