Files
brave-core/test/data/simple_link.html
T
Ivan Efremov 78ac2f902e 8696: Properly tie referrer blocking to shields.
I had to restore referrer blocking in site hacks, because
it is needed for subresource queries (this does not help
us with redirects though).
2020-06-12 23:12:38 +07:00

36 lines
862 B
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Link navigation test</title>
<script>
function run() {
const params = new URLSearchParams(document.location.search);
const policy = params.get('policy');
if (policy) {
const meta = document.createElement("meta");
meta.name = "referrer";
meta.content = policy;
document.head.appendChild(meta);
}
}
</script>
<script>
function clickLink(url) {
link = document.getElementById("link");
link.setAttribute("href", url);
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
0, 0, 0, 0, 0, false, false,
false, false, 0, null);
return link.dispatchEvent(evt);
}
</script>
</head>
<body onload="run()" >
<a href="" id="link">Navigate away</a>
</body>
</html>