Commit e0bd78ea authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[WPT/common/security-features] Use "unset" instead of "None" in filenames

`delivery_value` can be None.

Generated files will be updated after some more changes, not now.

Bug: 906850
Change-Id: Ia40b1cb4a75d14384092fb1fb84c51df8411ef15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1723012
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683393}
parent c5a06211
......@@ -57,6 +57,18 @@ def dump_test_parameters(selection):
selection, indent=2, separators=(',', ': '), sort_keys=True)
def get_test_filename(config, selection):
'''Returns the filname for the main test HTML file'''
selection_for_filename = copy.deepcopy(selection)
# Use 'unset' rather than 'None' in test filenames.
if selection_for_filename['delivery_value'] is None:
selection_for_filename['delivery_value'] = 'unset'
return os.path.join(config.spec_directory,
config.test_file_path_pattern % selection_for_filename)
def handle_deliveries(policy_deliveries):
'''
Generate <meta> elements and HTTP headers for the given list of
......@@ -119,8 +131,7 @@ def generate_selection(config, selection, spec, test_html_template_basename):
selection['sanity_checker_js'] = config.sanity_checker_js
selection['spec_json_js'] = config.spec_json_js
test_filename = os.path.join(config.spec_directory,
config.test_file_path_pattern % selection)
test_filename = get_test_filename(config, selection)
test_headers_filename = test_filename + ".headers"
test_directory = os.path.dirname(test_filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment