Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: LayoutTests/http/tests/security/referrer-policy-attribute-onclick.html

Issue 1253413003: Implement referrerpolicy attribute for anchor elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update webexposed layout tests Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>referrerpolicy attribute on click</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <!-- Test that the referrerpolicy does not apply to click event
10 listeners. -->
11 <a href="#"
12 referrerpolicy="never" id="click-me"></a>
13 <script>
14 var elem = document.getElementById("click-me");
15
16 var xhr = new XMLHttpRequest;
17 var xhrDone = (function () {
18 if (xhr.readyState !== 4)
19 return;
20
21 assert_true(xhr.responseText.indexOf(
22 "referrer-policy-attribute-onclick.html") !== -1);
23 done();
24 });
25
26 elem.addEventListener("click", function (event) {
27 done();
28 event.preventDefault();
29 xhr.open("GET", "resources/echo-referrer-header.php", true);
30 xhr.onreadystatechange = xhrDone;
31 xhr.send();
32 return false;
33 });
34
35 elem.click();
36
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698