diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/referrer-policy/generic/template | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/generic/template')
9 files changed, 134 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/generic/template/disclaimer.template b/testing/web-platform/tests/referrer-policy/generic/template/disclaimer.template new file mode 100644 index 000000000..66c43ed6f --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/disclaimer.template @@ -0,0 +1 @@ +<!-- DO NOT EDIT! Generated by %(generating_script_filename)s using %(html_template_filename)s. --> diff --git a/testing/web-platform/tests/referrer-policy/generic/template/document.html.template b/testing/web-platform/tests/referrer-policy/generic/template/document.html.template new file mode 100644 index 000000000..141711c14 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/document.html.template @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + <head> + <title>This page reports back it's request details to the parent frame</title> + </head> + <body> + <script> + var result = { + location: document.location.toString(), + referrer: document.referrer.length > 0 ? document.referrer : undefined, + headers: %(headers)s + }; + parent.postMessage(result, "*"); + </script> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/generic/template/script.js.template b/testing/web-platform/tests/referrer-policy/generic/template/script.js.template new file mode 100644 index 000000000..e2edf2181 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/script.js.template @@ -0,0 +1,3 @@ +postMessage({ + "headers": %(headers)s +}, "*"); diff --git a/testing/web-platform/tests/referrer-policy/generic/template/spec_json.js.template b/testing/web-platform/tests/referrer-policy/generic/template/spec_json.js.template new file mode 100644 index 000000000..e4cbd0342 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/spec_json.js.template @@ -0,0 +1 @@ +var SPEC_JSON = %(spec_json)s; diff --git a/testing/web-platform/tests/referrer-policy/generic/template/test.debug.html.template b/testing/web-platform/tests/referrer-policy/generic/template/test.debug.html.template new file mode 100644 index 000000000..0faf63bdd --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/test.debug.html.template @@ -0,0 +1,70 @@ +<!DOCTYPE html> +%(generated_disclaimer)s +<html> + <head> + <title>Referrer-Policy: %(spec_title)s</title>%(meta_delivery_method)s + <meta name="description" content="%(spec_description)s"> + <meta name="assert" content="%(test_description)s"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <!-- Common global functions for referrer-policy tests. --> + <script src="/referrer-policy/generic/common.js"></script> + <!-- The original specification JSON for validating the scenario. --> + <script src="/referrer-policy/spec_json.js"></script> + <!-- Internal checking of the tests --> + <script src="/referrer-policy/generic/sanity-checker.js"></script> + <!-- Simple wrapper API for all referrer-policy test cases. --> + <script src="/referrer-policy/generic/referrer-policy-test-case.js?pipe=sub"></script> + </head> + <body> + <h1>%(spec_title)s</h1> + <h2>%(spec_description)s</h2> + + <p> + <script> + // Show the detailed assertion description of the test. + document.write(document.querySelector("meta[name=assert]").content); + </script> + </p> + + <p>See <a href="%(spec_specification_url)s" target="_blank">specification</a> + details for this test.</p> + + <h3>Scenario outline</h3> + <table> + <tbody> + <tr> + <th>Delivery method</th> + <td>%(delivery_method)s</td> + </tr> + <tr> + <th>Redirection</th> + <td>%(redirection)s</td> + </tr> + <tr> + <th>Origin transition</th> + <td>%(origin)s</td> + </tr> + <tr> + <th>Protocol transition</th> + <td>from %(source_protocol)s to %(target_protocol)s</td> + </tr> + <tr> + <th>Subresource type</th> + <td>%(subresource)s</td> + </tr> + <tr> + <td colspan="2"><hr></td> + </tr> + <tr> + <th>Expected result</th> + <td>Referrer URL should be <strong>%(referrer_url)s</strong></td> + </tr> + <tbody> + </table> + + <script>%(test_js)s</script> + + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/generic/template/test.js.template b/testing/web-platform/tests/referrer-policy/generic/template/test.js.template new file mode 100644 index 000000000..4b01d4d11 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/test.js.template @@ -0,0 +1,15 @@ +ReferrerPolicyTestCase( + { + "referrer_policy": %(referrer_policy_json)s, + "delivery_method": "%(delivery_method)s", + "redirection": "%(redirection)s", + "origin": "%(origin)s", + "source_protocol": "%(source_protocol)s", + "target_protocol": "%(target_protocol)s", + "subresource": "%(subresource)s", + "subresource_path": "%(subresource_path)s", + "referrer_url": "%(referrer_url)s" + }, + document.querySelector("meta[name=assert]").content, + new SanityChecker() +).start(); diff --git a/testing/web-platform/tests/referrer-policy/generic/template/test.release.html.template b/testing/web-platform/tests/referrer-policy/generic/template/test.release.html.template new file mode 100644 index 000000000..0d63fd68a --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/test.release.html.template @@ -0,0 +1,20 @@ +<!DOCTYPE html> +%(generated_disclaimer)s +<html> + <head> + <title>Referrer-Policy: %(spec_title)s</title> + <meta name="description" content="%(spec_description)s">%(meta_delivery_method)s + <link rel="author" title="Kristijan Burnik" href="burnik@chromium.org"> + <link rel="help" href="%(spec_specification_url)s"> + <meta name="assert" content="%(test_description)s"> + <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>%(test_js)s</script> + <div id="log"></div> + </body> +</html> diff --git a/testing/web-platform/tests/referrer-policy/generic/template/test_description.template b/testing/web-platform/tests/referrer-policy/generic/template/test_description.template new file mode 100644 index 000000000..fbc80bb25 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/test_description.template @@ -0,0 +1,5 @@ +The referrer URL is %(referrer_url)s when a +document served over %(source_protocol)s requires an %(target_protocol)s +sub-resource via %(subresource)s using the %(delivery_method)s +delivery method with %(redirection)s and when +the target request is %(origin)s. diff --git a/testing/web-platform/tests/referrer-policy/generic/template/worker.js.template b/testing/web-platform/tests/referrer-policy/generic/template/worker.js.template new file mode 100644 index 000000000..817dd8c87 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/template/worker.js.template @@ -0,0 +1,3 @@ +postMessage({ + "headers": %(headers)s +}); |