blob: 9bc74f54a971ac7bd8da01f3668eb275543c5a5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"];
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>
|