diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html')
-rw-r--r-- | testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html b/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html new file mode 100644 index 0000000000..bfdf1166ce --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/subresource-test/attr-referrer-invalid-value.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> + <head> + <title>Invalid referrerPolicy attribute value</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <h1>Invalid referrerPolicy attribute value</h1> + <pre>Running...</pre> + + <script> + test(function () { + var elements = ["iframe", "img", "a", "area", "link", "script"]; + for (var i = 0; i < elements.length; i++) { + var elem = document.createElement(elements[i]); + elem.referrerPolicy = "unsafe-url"; + assert_equals(elem.referrerPolicy, "unsafe-url"); + elem.referrerPolicy = "not-valid-value"; + assert_equals(elem.referrerPolicy, ""); + } + }, "Invalid referrerpolicy values not reflected"); + </script> + </body> +</html> |