Add referrer-policy tests

This commit is contained in:
Stian Lund
2021-03-19 15:49:40 +01:00
parent b8791ad9bd
commit 00ca827ea7
10 changed files with 145 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">default</a></h1>
<br>This should be same as "strict-origin-when-cross-origin".
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Referrer-policy test page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<iframe width="500" height="300" src="default.html"></iframe>
<iframe width="500" height="300" src="no-referrer.html"></iframe>
<iframe width="500" height="300" src="no-referrer-when-downgrade.html"></iframe>
<iframe width="500" height="300" src="origin.html"></iframe>
<iframe width="500" height="300" src="origin-when-cross-origin.html"></iframe>
<iframe width="500" height="300" src="same-origin.html"></iframe>
<iframe width="500" height="300" src="strict-origin.html"></iframe>
<iframe width="500" height="300" src="strict-origin-when-cross-origin.html"></iframe>
<iframe width="500" height="300" src="unsafe-url.html"></iframe>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="no-referrer-when-downgrade">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">no-referrer-when-downgrade</a></h1>
<br>This should show full URL.
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="no-referrer">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">no-referrer</a></h1>
<br>This should show no referrer / hidden
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="origin-when-cross-origin">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">origin-when-cross-origin</a></h1>
<br>This should show host/domain only.
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="origin">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">origin</a></h1>
<br>This should show host/domain only.
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="same-origin">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">same-origin</a></h1>
<br>This should show no referrer / hidden
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="strict-origin-when-cross-origin">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">strict-origin-when-cross-origin</a></h1>
<br>This should show host/domain only.
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="strict-origin">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">strict-origin</a></h1>
<br>This should show host/domain only.
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="referrer" content="unsafe-url">
<link rel="icon" href="/favicon.ico" sizes="32x32" />
<link rel="stylesheet" type="text/css" media="screen, projection" href="/style.css" />
</head>
<body>
<h1><a href="https://www.whatismyreferer.com">unsafe-url</a></h1>
<br>This should show full URL.
</body>
</html>