diff options
Diffstat (limited to 'chrome/test/data/click-noreferrer-links.html')
-rw-r--r-- | chrome/test/data/click-noreferrer-links.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/test/data/click-noreferrer-links.html b/chrome/test/data/click-noreferrer-links.html new file mode 100644 index 0000000..f6ae295 --- /dev/null +++ b/chrome/test/data/click-noreferrer-links.html @@ -0,0 +1,37 @@ +<html> + + <head><title>Click noreferrer links</title> + <script> + function simulateClick(target) { + var evt = document.createEvent("MouseEvents"); + evt.initMouseEvent("click", true, true, window, + 0, 0, 0, 0, 0, false, false, + false, false, 0, null); + + return target.dispatchEvent(evt); + } + + function clickNoRefTargetBlankLink() { + return simulateClick(document.getElementById("noref_and_tblank_link")); + } + + function clickTargetBlankLink() { + return simulateClick(document.getElementById("tblank_link")); + } + + function clickNoRefLink() { + return simulateClick(document.getElementById("noref_link")); + } + + </script> + </head> + +<a href="https://127.0.0.1:9443/files/title2.html" id="noref_and_tblank_link" + rel="noreferrer" target="_blank">rel=noreferrer and target=_blank</a><br> +<a href="https://127.0.0.1:9443/files/title2.html" id="tblank_link" + target="_blank">target=_blank</a><br> +<a href="https://127.0.0.1:9443/files/title2.html" id="noref_link" + rel="noreferrer">rel=noreferrer</a><br> + +</html> + |