Bug 1516306 [wpt PR 14664] - [wpt/referrer-policy] Fix generator to support expansion=override, a=testonly
authorHiroshige Hayashizaki <hiroshige@chromium.org>
Thu, 31 Jan 2019 17:20:45 +0000
changeset 457786 990ddc0267859f9f7ee9f1fdaa74d11c27a2dbd7
parent 457785 0ea5f5f93dd0b1195ede8ce0295f981b68923fb4
child 457787 71bb8a987a27e1d609b35d8af6e6e1fcff5ce018
push id111763
push userjames@hoppipolla.co.uk
push dateThu, 07 Feb 2019 22:12:57 +0000
treeherdermozilla-inbound@c983e907bbfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1516306, 14664, 906850, 1389926, 621270
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516306 [wpt PR 14664] - [wpt/referrer-policy] Fix generator to support expansion=override, a=testonly Automatic update from web-platform-tests [wpt/referrer-policy] Fix generator to support expansion=override Manual changes: generic/tools/generate.py. All others are generated. Previously, when there are two entries under "test_expansion" in spec.src.json with the same selection path, preceding one with expansion=default and folllowing one with expansion=override, two test files for each entry are generated. This caused duplicated test files (with different names and the same contents) in ToT, and would cause conflicting test files if we enable referrer-policy tests on HTTPS. This CL suppresses generating test files for the overridden entries, e.g. only generates one test file for the folllowing entry with expansion=override in the example case above. Bug: 906850 Change-Id: Ic294adc3d240f937e37d4df6c1acc60e9ead7d80 Reviewed-on: https://chromium-review.googlesource.com/c/1389926 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Emily Stark <estark@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#621270} -- wpt-commits: c4ec2756e41cd11c049f5194157aad0ef86ddcac wpt-pr: 14664
testing/web-platform/tests/referrer-policy/generic/tools/generate.py
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html.headers
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html.headers
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html
--- a/testing/web-platform/tests/referrer-policy/generic/tools/generate.py
+++ b/testing/web-platform/tests/referrer-policy/generic/tools/generate.py
@@ -1,12 +1,13 @@
 #!/usr/bin/env python
 
 from __future__ import print_function
 
+import copy
 import os, sys, json
 from common_paths import *
 import spec_validator
 import argparse
 
 
 def expand_test_expansion_pattern(spec_test_expansion, test_expansion_schema):
     expansion = {}
@@ -137,31 +138,43 @@ def generate_test_source_files(spec_json
         excluded_expansion = \
             expand_test_expansion_pattern(excluded_pattern,
                                           test_expansion_schema)
         for excluded_selection in permute_expansion(excluded_expansion):
             excluded_selection_path = selection_pattern % excluded_selection
             exclusion_dict[excluded_selection_path] = True
 
     for spec in specification:
+        # Used to make entries with expansion="override" override preceding
+        # entries with the same |selection_path|.
+        output_dict = {}
+
         for spec_test_expansion in spec['test_expansion']:
             expansion = expand_test_expansion_pattern(spec_test_expansion,
                                                       test_expansion_schema)
             for selection in permute_expansion(expansion):
                 selection_path = selection_pattern % selection
                 if not selection_path in exclusion_dict:
-                    subresource_path = \
-                        spec_json["subresource_path"][selection["subresource"]]
-                    generate_selection(selection,
-                                       spec,
-                                       subresource_path,
-                                       html_template)
+                    if selection_path in output_dict:
+                        if spec_test_expansion['expansion'] != 'override':
+                            print("Error: %s's expansion is default but overrides %s" % (selection['name'], output_dict[selection_path]['name']))
+                            sys.exit(1)
+                    output_dict[selection_path] = copy.deepcopy(selection)
                 else:
                     print('Excluding selection:', selection_path)
 
+        for selection_path in output_dict:
+            selection = output_dict[selection_path]
+            subresource_path = \
+                spec_json["subresource_path"][selection["subresource"]]
+            generate_selection(selection,
+                           spec,
+                           subresource_path,
+                           html_template)
+
 
 def main(target):
     spec_json = load_spec_json();
     spec_validator.assert_valid_spec_json(spec_json)
     generate_test_source_files(spec_json, target)
 
 
 if __name__ == '__main__':
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via iframe-tag using the attr-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "attr-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "iframe-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/document.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via img-tag using the attr-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "attr-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "img-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/image.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via script-tag using the attr-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "attr-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "script-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/script.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <!-- No meta: Referrer policy delivered via HTTP headers. -->
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via fetch-request using the http-rp
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "http-rp",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "fetch-request",
-          "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html.headers
+++ /dev/null
@@ -1,2 +0,0 @@
-Referrer-Policy: origin-when-cross-origin
-Access-Control-Allow-Origin: *
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <!-- No meta: Referrer policy delivered via HTTP headers. -->
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via iframe-tag using the http-rp
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "http-rp",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "iframe-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/document.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
+++ /dev/null
@@ -1,2 +0,0 @@
-Referrer-Policy: origin-when-cross-origin
-Access-Control-Allow-Origin: *
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <!-- No meta: Referrer policy delivered via HTTP headers. -->
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via img-tag using the http-rp
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "http-rp",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "img-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/image.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
+++ /dev/null
@@ -1,2 +0,0 @@
-Referrer-Policy: origin-when-cross-origin
-Access-Control-Allow-Origin: *
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <!-- No meta: Referrer policy delivered via HTTP headers. -->
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via script-tag using the http-rp
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "http-rp",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "script-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/script.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html.headers
+++ /dev/null
@@ -1,2 +0,0 @@
-Referrer-Policy: origin-when-cross-origin
-Access-Control-Allow-Origin: *
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <!-- No meta: Referrer policy delivered via HTTP headers. -->
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via xhr-request using the http-rp
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "http-rp",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "xhr-request",
-          "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html.headers
+++ /dev/null
@@ -1,2 +0,0 @@
-Referrer-Policy: origin-when-cross-origin
-Access-Control-Allow-Origin: *
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <meta name="referrer" content="origin-when-cross-origin">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via fetch-request using the meta-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "meta-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "fetch-request",
-          "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/iframe-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <meta name="referrer" content="origin-when-cross-origin">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via iframe-tag using the meta-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "meta-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "iframe-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/document.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/img-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <meta name="referrer" content="origin-when-cross-origin">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via img-tag using the meta-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "meta-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "img-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/image.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/script-tag/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <meta name="referrer" content="origin-when-cross-origin">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via script-tag using the meta-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "meta-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "script-tag",
-          "subresource_path": "/referrer-policy/generic/subresource/script.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-https/xhr-request/swap-origin-redirect/same-origin-upgrade.http.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
-<html>
-  <head>
-    <title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
-    <meta name="description" content="Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.">
-    <meta name="referrer" content="origin-when-cross-origin">
-    <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org">
-    <link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
-    <meta name="assert" content="The referrer URL is origin when a
-                                 document served over http requires an https
-                                 sub-resource via xhr-request using the meta-referrer
-                                 delivery method with swap-origin-redirect and when
-                                 the target request is same-origin.">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <!-- TODO(kristijanburnik): Minify and merge both: -->
-    <script src="/referrer-policy/generic/common.js"></script>
-    <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script>
-  </head>
-  <body>
-    <script>
-      ReferrerPolicyTestCase(
-        {
-          "referrer_policy": "origin-when-cross-origin",
-          "delivery_method": "meta-referrer",
-          "redirection": "swap-origin-redirect",
-          "origin": "same-origin",
-          "source_protocol": "http",
-          "target_protocol": "https",
-          "subresource": "xhr-request",
-          "subresource_path": "/referrer-policy/generic/subresource/xhr.py",
-          "referrer_url": "origin"
-        },
-        document.querySelector("meta[name=assert]").content,
-        new SanityChecker()
-      ).start();
-      </script>
-    <div id="log"></div>
-  </body>
-</html>