Title: [242531] trunk/LayoutTests
Revision
242531
Author
commit-qu...@webkit.org
Date
2019-03-05 23:37:20 -0800 (Tue, 05 Mar 2019)

Log Message

Add referrer-policy tests
https://bugs.webkit.org/show_bug.cgi?id=195269

Patch by Rob Buis <rb...@igalia.com> on 2019-03-05
Reviewed by Daniel Bates.

The tests in http/tests/referrer-policy do not test all referrer-policy
values, add the remaining values.

* http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http-expected.txt: Added.
* http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html: Added.
* http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https-expected.txt: Added.
* http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html: Added.
* http/tests/referrer-policy/no-referrer-when-downgrade/same-origin-expected.txt: Added.
* http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html: Added.
* http/tests/referrer-policy/no-referrer/cross-origin-http-http-expected.txt: Added.
* http/tests/referrer-policy/no-referrer/cross-origin-http-http.html: Added.
* http/tests/referrer-policy/no-referrer/cross-origin-http.https-expected.txt: Added.
* http/tests/referrer-policy/no-referrer/cross-origin-http.https.html: Added.
* http/tests/referrer-policy/no-referrer/same-origin-expected.txt: Added.
* http/tests/referrer-policy/no-referrer/same-origin.html: Added.
* http/tests/referrer-policy/origin/cross-origin-http-http-expected.txt: Added.
* http/tests/referrer-policy/origin/cross-origin-http-http.html: Added.
* http/tests/referrer-policy/origin/cross-origin-http.https-expected.txt: Added.
* http/tests/referrer-policy/origin/cross-origin-http.https.html: Added.
* http/tests/referrer-policy/origin/same-origin-expected.txt: Added.
* http/tests/referrer-policy/origin/same-origin.html: Added.
* http/tests/referrer-policy/unsafe-url/cross-origin-http-http-expected.txt: Added.
* http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html: Added.
* http/tests/referrer-policy/unsafe-url/cross-origin-http.https-expected.txt: Added.
* http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html: Added.
* http/tests/referrer-policy/unsafe-url/same-origin-expected.txt: Added.
* http/tests/referrer-policy/unsafe-url/same-origin.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (242530 => 242531)


--- trunk/LayoutTests/ChangeLog	2019-03-06 05:48:29 UTC (rev 242530)
+++ trunk/LayoutTests/ChangeLog	2019-03-06 07:37:20 UTC (rev 242531)
@@ -1,3 +1,38 @@
+2019-03-05  Rob Buis  <rb...@igalia.com>
+
+        Add referrer-policy tests
+        https://bugs.webkit.org/show_bug.cgi?id=195269
+
+        Reviewed by Daniel Bates.
+
+        The tests in http/tests/referrer-policy do not test all referrer-policy
+        values, add the remaining values.
+
+        * http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html: Added.
+        * http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html: Added.
+        * http/tests/referrer-policy/no-referrer-when-downgrade/same-origin-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html: Added.
+        * http/tests/referrer-policy/no-referrer/cross-origin-http-http-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer/cross-origin-http-http.html: Added.
+        * http/tests/referrer-policy/no-referrer/cross-origin-http.https-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer/cross-origin-http.https.html: Added.
+        * http/tests/referrer-policy/no-referrer/same-origin-expected.txt: Added.
+        * http/tests/referrer-policy/no-referrer/same-origin.html: Added.
+        * http/tests/referrer-policy/origin/cross-origin-http-http-expected.txt: Added.
+        * http/tests/referrer-policy/origin/cross-origin-http-http.html: Added.
+        * http/tests/referrer-policy/origin/cross-origin-http.https-expected.txt: Added.
+        * http/tests/referrer-policy/origin/cross-origin-http.https.html: Added.
+        * http/tests/referrer-policy/origin/same-origin-expected.txt: Added.
+        * http/tests/referrer-policy/origin/same-origin.html: Added.
+        * http/tests/referrer-policy/unsafe-url/cross-origin-http-http-expected.txt: Added.
+        * http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html: Added.
+        * http/tests/referrer-policy/unsafe-url/cross-origin-http.https-expected.txt: Added.
+        * http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html: Added.
+        * http/tests/referrer-policy/unsafe-url/same-origin-expected.txt: Added.
+        * http/tests/referrer-policy/unsafe-url/same-origin.html: Added.
+
 2019-03-05  Eric Liang  <ericli...@apple.com>
 
         AX: Add remote search support for keyboard focusable element search type

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of no-referrer referrer policy when cross origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http-http.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer referrer policy when cross origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the empty string
+    shouldBeEqualToString("referrer", "");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: The page at about:blank was allowed to display insecure content from http://localhost:8000/referrer-policy/resources/document.html.
+
+Tests the behavior of no-referrer referrer policy when cross origin from HTTPS to HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/cross-origin-http.https.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer referrer policy when cross origin from HTTPS to HTTP.");
+jsTestIsAsync = true;
+
+if (window.internals)
+    internals.settings.setAllowDisplayOfInsecureContent(true);
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the empty string
+    shouldBeEqualToString("referrer", "");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of no-referrer referrer policy when same origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer/same-origin.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer referrer policy when same origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the empty string
+    shouldBeEqualToString("referrer", "");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of no-referrer-when-downgrade referrer policy when cross origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer-when-downgrade'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer-when-downgrade referrer policy when cross origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the full URL
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/referrer-policy/no-referrer-when-downgrade/cross-origin-http-http.html");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: The page at about:blank was allowed to display insecure content from http://localhost:8000/referrer-policy/resources/document.html.
+
+Tests the behavior of no-referrer-when-downgrade referrer policy when cross origin from HTTPS to HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/cross-origin-http.https.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer-when-downgrade'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer-when-downgrade referrer policy when cross origin from HTTPS to HTTP.");
+jsTestIsAsync = true;
+
+if (window.internals)
+    internals.settings.setAllowDisplayOfInsecureContent(true);
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the empty string
+    shouldBeEqualToString("referrer", "");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of no-referrer-when-downgrade referrer policy when same origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/referrer-policy/no-referrer-when-downgrade/same-origin.html"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/no-referrer-when-downgrade/same-origin.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='no-referrer-when-downgrade'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of no-referrer-when-downgrade referrer policy when same origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the full URL
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/referrer-policy/no-referrer-when-downgrade/same-origin.html");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of origin referrer policy when cross origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http-http.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='origin'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of origin referrer policy when cross origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the origin
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: The page at about:blank was allowed to display insecure content from http://localhost:8000/referrer-policy/resources/document.html.
+
+Tests the behavior of origin referrer policy when cross origin from HTTPS to HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "https://127.0.0.1:8443/"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/cross-origin-http.https.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='origin'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of origin referrer policy when cross origin from HTTPS to HTTP.");
+jsTestIsAsync = true;
+
+if (window.internals)
+    internals.settings.setAllowDisplayOfInsecureContent(true);
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the origin
+    shouldBeEqualToString("referrer", "https://127.0.0.1:8443/");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of origin referrer policy when same origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/origin/same-origin.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='origin'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of origin referrer policy when same origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the origin
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of unsafe-url referrer policy when cross origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/referrer-policy/unsafe-url/cross-origin-http-http.html"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http-http.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='unsafe-url'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of unsafe-url referrer policy when cross origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the full URL
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/referrer-policy/unsafe-url/cross-origin-http-http.html");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: The page at about:blank was allowed to display insecure content from http://localhost:8000/referrer-policy/resources/document.html.
+
+Tests the behavior of unsafe-url referrer policy when cross origin from HTTPS to HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "https://127.0.0.1:8443/referrer-policy/unsafe-url/cross-origin-http.https.html"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/cross-origin-http.https.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='unsafe-url'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of unsafe-url referrer policy when cross origin from HTTPS to HTTP.");
+jsTestIsAsync = true;
+
+if (window.internals)
+    internals.settings.setAllowDisplayOfInsecureContent(true);
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the full URL
+    shouldBeEqualToString("referrer", "https://127.0.0.1:8443/referrer-policy/unsafe-url/cross-origin-http.https.html");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin-expected.txt (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin-expected.txt	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,10 @@
+Tests the behavior of unsafe-url referrer policy when same origin.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS referrer is "http://127.0.0.1:8000/referrer-policy/unsafe-url/same-origin.html"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin.html (0 => 242531)


--- trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/referrer-policy/unsafe-url/same-origin.html	2019-03-06 07:37:20 UTC (rev 242531)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name='referrer' content='unsafe-url'>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests the behavior of unsafe-url referrer policy when same origin.");
+jsTestIsAsync = true;
+
+window._onmessage_ = function(event) {
+    referrer = event.data.referrer;
+    // Should be the full URL
+    shouldBeEqualToString("referrer", "http://127.0.0.1:8000/referrer-policy/unsafe-url/same-origin.html");
+    finishJSTest();
+}
+</script>
+<iframe src=""
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to