Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 9656fc9

Browse files
[WPT/referrer-policy] Regenerate a-tag tests
This CL regenerates a-tag test files that reflects changes [1] and previous changes in https://crbug.com/906850 and removes old files. Purely mechanical. This CL largely renames test file names, and [2] contains old->new file name mapping data. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1586548 [2] https://chromium-review.googlesource.com/c/chromium/src/+/1783799 Bug: 906850 Change-Id: I7eda222fcf0830e5065a0a920a344d06be5d376f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786002 Reviewed-by: Kenichi Ishibashi <[email protected]> Reviewed-by: Hiroki Nakagawa <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/master@{#693546}
1 parent d6b04f2 commit 9656fc9

File tree

123 files changed

+1290
-1601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1290
-1601
lines changed
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
<!DOCTYPE html>
2-
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
33
<html>
44
<head>
55
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
6+
<meta charset='utf-8'>
67
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
7-
<!-- No meta: Referrer policy delivered via HTTP headers. -->
88
<link rel="author" title="Kristijan Burnik" href="[email protected]">
99
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
10-
<meta name="assert" content="The referrer URL is stripped-referrer when a
11-
document served over http requires an http
12-
sub-resource via a-tag using the http-rp
13-
delivery method with no-redirect and when
14-
the target request is same-origin.">
10+
<meta name="assert" content="Referrer Policy: Expects stripped-referrer for a-tag to cross-http origin and no-redirect redirection from http context.">
1511
<script src="/resources/testharness.js"></script>
1612
<script src="/resources/testharnessreport.js"></script>
1713
<script src="/common/security-features/resources/common.js"></script>
18-
<script src="/referrer-policy/generic/referrer-policy-test-case.sub.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
1915
</head>
2016
<body>
2117
<script>
22-
ReferrerPolicyTestCase(
18+
TestCase(
2319
{
24-
"referrer_policy": "no-referrer-when-downgrade",
25-
"delivery_method": "http-rp",
20+
"expectation": "stripped-referrer",
21+
"origin": "cross-http",
2622
"redirection": "no-redirect",
27-
"origin": "same-origin",
28-
"source_protocol": "http",
29-
"target_protocol": "http",
23+
"source_context_list": [],
24+
"source_scheme": "http",
3025
"subresource": "a-tag",
31-
"referrer_url": "stripped-referrer"
26+
"subresource_policy_deliveries": []
3227
},
3328
document.querySelector("meta[name=assert]").content,
3429
new SanityChecker()
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer-when-downgrade
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer-when-downgrade
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
<!DOCTYPE html>
2-
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
33
<html>
44
<head>
55
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
6+
<meta charset='utf-8'>
67
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
7-
<!-- No meta: Referrer policy delivered via HTTP headers. -->
88
<link rel="author" title="Kristijan Burnik" href="[email protected]">
99
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
10-
<meta name="assert" content="The referrer URL is stripped-referrer when a
11-
document served over http requires an http
12-
sub-resource via a-tag using the http-rp
13-
delivery method with no-redirect and when
14-
the target request is cross-origin.">
10+
<meta name="assert" content="Referrer Policy: Expects stripped-referrer for a-tag to cross-https origin and no-redirect redirection from http context.">
1511
<script src="/resources/testharness.js"></script>
1612
<script src="/resources/testharnessreport.js"></script>
1713
<script src="/common/security-features/resources/common.js"></script>
18-
<script src="/referrer-policy/generic/referrer-policy-test-case.sub.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
1915
</head>
2016
<body>
2117
<script>
22-
ReferrerPolicyTestCase(
18+
TestCase(
2319
{
24-
"referrer_policy": "no-referrer-when-downgrade",
25-
"delivery_method": "http-rp",
20+
"expectation": "stripped-referrer",
21+
"origin": "cross-https",
2622
"redirection": "no-redirect",
27-
"origin": "cross-origin",
28-
"source_protocol": "http",
29-
"target_protocol": "http",
23+
"source_context_list": [],
24+
"source_scheme": "http",
3025
"subresource": "a-tag",
31-
"referrer_url": "stripped-referrer"
26+
"subresource_policy_deliveries": []
3227
},
3328
document.querySelector("meta[name=assert]").content,
3429
new SanityChecker()
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer-when-downgrade
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer-when-downgrade
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
<!DOCTYPE html>
2-
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
33
<html>
44
<head>
55
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
6+
<meta charset='utf-8'>
67
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
7-
<!-- No meta: Referrer policy delivered via HTTP headers. -->
88
<link rel="author" title="Kristijan Burnik" href="[email protected]">
99
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
10-
<meta name="assert" content="The referrer URL is stripped-referrer when a
11-
document served over http requires an https
12-
sub-resource via a-tag using the http-rp
13-
delivery method with no-redirect and when
14-
the target request is same-origin.">
10+
<meta name="assert" content="Referrer Policy: Expects stripped-referrer for a-tag to same-http origin and no-redirect redirection from http context.">
1511
<script src="/resources/testharness.js"></script>
1612
<script src="/resources/testharnessreport.js"></script>
1713
<script src="/common/security-features/resources/common.js"></script>
18-
<script src="/referrer-policy/generic/referrer-policy-test-case.sub.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
1915
</head>
2016
<body>
2117
<script>
22-
ReferrerPolicyTestCase(
18+
TestCase(
2319
{
24-
"referrer_policy": "no-referrer-when-downgrade",
25-
"delivery_method": "http-rp",
20+
"expectation": "stripped-referrer",
21+
"origin": "same-http",
2622
"redirection": "no-redirect",
27-
"origin": "same-origin",
28-
"source_protocol": "http",
29-
"target_protocol": "https",
23+
"source_context_list": [],
24+
"source_scheme": "http",
3025
"subresource": "a-tag",
31-
"referrer_url": "stripped-referrer"
26+
"subresource_policy_deliveries": []
3227
},
3328
document.querySelector("meta[name=assert]").content,
3429
new SanityChecker()
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer-when-downgrade
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer-when-downgrade
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
<!DOCTYPE html>
2-
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
33
<html>
44
<head>
55
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer-when-downgrade'</title>
6+
<meta charset='utf-8'>
67
<meta name="description" content="Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.">
7-
<!-- No meta: Referrer policy delivered via HTTP headers. -->
88
<link rel="author" title="Kristijan Burnik" href="[email protected]">
99
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade">
10-
<meta name="assert" content="The referrer URL is stripped-referrer when a
11-
document served over http requires an https
12-
sub-resource via a-tag using the http-rp
13-
delivery method with no-redirect and when
14-
the target request is cross-origin.">
10+
<meta name="assert" content="Referrer Policy: Expects stripped-referrer for a-tag to same-https origin and no-redirect redirection from http context.">
1511
<script src="/resources/testharness.js"></script>
1612
<script src="/resources/testharnessreport.js"></script>
1713
<script src="/common/security-features/resources/common.js"></script>
18-
<script src="/referrer-policy/generic/referrer-policy-test-case.sub.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
1915
</head>
2016
<body>
2117
<script>
22-
ReferrerPolicyTestCase(
18+
TestCase(
2319
{
24-
"referrer_policy": "no-referrer-when-downgrade",
25-
"delivery_method": "http-rp",
20+
"expectation": "stripped-referrer",
21+
"origin": "same-https",
2622
"redirection": "no-redirect",
27-
"origin": "cross-origin",
28-
"source_protocol": "http",
29-
"target_protocol": "https",
23+
"source_context_list": [],
24+
"source_scheme": "http",
3025
"subresource": "a-tag",
31-
"referrer_url": "stripped-referrer"
26+
"subresource_policy_deliveries": []
3227
},
3328
document.querySelector("meta[name=assert]").content,
3429
new SanityChecker()
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer-when-downgrade
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer-when-downgrade
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
3+
<html>
4+
<head>
5+
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
6+
<meta charset='utf-8'>
7+
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
8+
<link rel="author" title="Kristijan Burnik" href="[email protected]">
9+
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
10+
<meta name="assert" content="Referrer Policy: Expects omitted for a-tag to cross-http origin and no-redirect redirection from http context.">
11+
<script src="/resources/testharness.js"></script>
12+
<script src="/resources/testharnessreport.js"></script>
13+
<script src="/common/security-features/resources/common.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
15+
</head>
16+
<body>
17+
<script>
18+
TestCase(
19+
{
20+
"expectation": "omitted",
21+
"origin": "cross-http",
22+
"redirection": "no-redirect",
23+
"source_context_list": [],
24+
"source_scheme": "http",
25+
"subresource": "a-tag",
26+
"subresource_policy_deliveries": []
27+
},
28+
document.querySelector("meta[name=assert]").content,
29+
new SanityChecker()
30+
).start();
31+
</script>
32+
<div id="log"></div>
33+
</body>
34+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
3+
<html>
4+
<head>
5+
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
6+
<meta charset='utf-8'>
7+
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
8+
<link rel="author" title="Kristijan Burnik" href="[email protected]">
9+
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
10+
<meta name="assert" content="Referrer Policy: Expects omitted for a-tag to cross-https origin and no-redirect redirection from http context.">
11+
<script src="/resources/testharness.js"></script>
12+
<script src="/resources/testharnessreport.js"></script>
13+
<script src="/common/security-features/resources/common.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
15+
</head>
16+
<body>
17+
<script>
18+
TestCase(
19+
{
20+
"expectation": "omitted",
21+
"origin": "cross-https",
22+
"redirection": "no-redirect",
23+
"source_context_list": [],
24+
"source_scheme": "http",
25+
"subresource": "a-tag",
26+
"subresource_policy_deliveries": []
27+
},
28+
document.querySelector("meta[name=assert]").content,
29+
new SanityChecker()
30+
).start();
31+
</script>
32+
<div id="log"></div>
33+
</body>
34+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
3+
<html>
4+
<head>
5+
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
6+
<meta charset='utf-8'>
7+
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
8+
<link rel="author" title="Kristijan Burnik" href="[email protected]">
9+
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
10+
<meta name="assert" content="Referrer Policy: Expects omitted for a-tag to same-http origin and no-redirect redirection from http context.">
11+
<script src="/resources/testharness.js"></script>
12+
<script src="/resources/testharnessreport.js"></script>
13+
<script src="/common/security-features/resources/common.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
15+
</head>
16+
<body>
17+
<script>
18+
TestCase(
19+
{
20+
"expectation": "omitted",
21+
"origin": "same-http",
22+
"redirection": "no-redirect",
23+
"source_context_list": [],
24+
"source_scheme": "http",
25+
"subresource": "a-tag",
26+
"subresource_policy_deliveries": []
27+
},
28+
document.querySelector("meta[name=assert]").content,
29+
new SanityChecker()
30+
).start();
31+
</script>
32+
<div id="log"></div>
33+
</body>
34+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
3+
<html>
4+
<head>
5+
<title>Referrer-Policy: Referrer Policy is set to 'no-referrer'</title>
6+
<meta charset='utf-8'>
7+
<meta name="description" content="Check that sub-resource never gets the referrer URL.">
8+
<link rel="author" title="Kristijan Burnik" href="[email protected]">
9+
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer">
10+
<meta name="assert" content="Referrer Policy: Expects omitted for a-tag to same-https origin and no-redirect redirection from http context.">
11+
<script src="/resources/testharness.js"></script>
12+
<script src="/resources/testharnessreport.js"></script>
13+
<script src="/common/security-features/resources/common.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
15+
</head>
16+
<body>
17+
<script>
18+
TestCase(
19+
{
20+
"expectation": "omitted",
21+
"origin": "same-https",
22+
"redirection": "no-redirect",
23+
"source_context_list": [],
24+
"source_scheme": "http",
25+
"subresource": "a-tag",
26+
"subresource_policy_deliveries": []
27+
},
28+
document.querySelector("meta[name=assert]").content,
29+
new SanityChecker()
30+
).start();
31+
</script>
32+
<div id="log"></div>
33+
</body>
34+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Referrer-Policy: no-referrer
21
Access-Control-Allow-Origin: *
2+
Referrer-Policy: no-referrer
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
<!DOCTYPE html>
2-
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using referrer-policy/generic/template/test.release.html.template. -->
2+
<!-- DO NOT EDIT! Generated by referrer-policy/generic/tools/generate.py using common/security-features/tools/template/test.release.html.template. -->
33
<html>
44
<head>
55
<title>Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'</title>
6+
<meta charset='utf-8'>
67
<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.">
7-
<!-- No meta: Referrer policy delivered via HTTP headers. -->
88
<link rel="author" title="Kristijan Burnik" href="[email protected]">
99
<link rel="help" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin">
10-
<meta name="assert" content="The referrer URL is origin when a
11-
document served over http requires an http
12-
sub-resource via a-tag using the http-rp
13-
delivery method with no-redirect and when
14-
the target request is cross-origin.">
10+
<meta name="assert" content="Referrer Policy: Expects origin for a-tag to cross-http origin and no-redirect redirection from http context.">
1511
<script src="/resources/testharness.js"></script>
1612
<script src="/resources/testharnessreport.js"></script>
1713
<script src="/common/security-features/resources/common.js"></script>
18-
<script src="/referrer-policy/generic/referrer-policy-test-case.sub.js"></script>
14+
<script src="/referrer-policy/generic/test-case.sub.js"></script>
1915
</head>
2016
<body>
2117
<script>
22-
ReferrerPolicyTestCase(
18+
TestCase(
2319
{
24-
"referrer_policy": "origin-when-cross-origin",
25-
"delivery_method": "http-rp",
20+
"expectation": "origin",
21+
"origin": "cross-http",
2622
"redirection": "no-redirect",
27-
"origin": "cross-origin",
28-
"source_protocol": "http",
29-
"target_protocol": "http",
23+
"source_context_list": [],
24+
"source_scheme": "http",
3025
"subresource": "a-tag",
31-
"referrer_url": "origin"
26+
"subresource_policy_deliveries": []
3227
},
3328
document.querySelector("meta[name=assert]").content,
3429
new SanityChecker()

0 commit comments

Comments
 (0)