Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/linking/scripted/a.referrer-invalid-value.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>Invalid referrerPolicy attribute value</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
test(function () {
var elements = ["a"];
for (let i = 0; i < elements.length; 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>