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

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

Issue 1328183002: Implement referrerpolicy attr for iframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update webexposed tests Created 5 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/referrer-policy-attribute-iframe-no-referrer-when-downgrade.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <meta name="referrer" content="origin">
9 <script>
10 async_test(function () {
11 window.onmessage = this.step_func(function (event) {
12 if (event.data.policy === "no-referrer") {
13 assert_equals(event.data.referrer, "");
14 this.done();
15 }
16 });
17 }, "no-referrer attribute on iframe");
18 </script>
19
20 <iframe src="resources/referrer-attr-iframe-target.html#no-referrer"
21 referrerpolicy="no-referrer" />
22
23 <script>
24 async_test(function () {
25 window.onmessage = this.step_func(function (event) {
26 if (event.data.policy === "origin-when-crossorigin") {
27 assert_equals(event.data.referrer, "http://127.0.0.1:8000/");
28 this.done();
29 }
30 });
31 }, "origin-when-crossorigin referrerpolicy attribute on iframe");
32 </script>
33
34 <iframe src="resources/referrer-attr-iframe-target.html#origin-when-crossorigi n"
35 referrerpolicy="origin-when-crossorigin" />
36
37 <script>
38 async_test(function () {
39 window.onmessage = this.step_func(function (event) {
40 if (event.data.policy === "origin") {
41 assert_equals(event.data.referrer, "http://127.0.0.1:8000/");
42 this.done();
43 }
44 });
45 }, "origin referrerpolicy attribute on iframe");
46 </script>
47
48 <iframe src="resources/referrer-attr-iframe-target.html#origin"
49 referrerpolicy="origin" />
50
51 <script>
52 async_test(function () {
53 window.onmessage = this.step_func(function (event) {
54 if (event.data.policy === "unsafe-url") {
55 assert_equals(event.data.referrer, "http://127.0.0.1:8000/security /referrer-policy-attribute-iframe.html");
56 this.done();
57 }
58 });
59 }, "unsafe-url referrerpolicy attribute on iframe");
60 </script>
61
62 <iframe src="http://localhost:8000/security/resources/referrer-attr-iframe-tar get.html#unsafe-url" referrerpolicy="unsafe-url" />
63 </body>
64 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/referrer-policy-attribute-iframe-no-referrer-when-downgrade.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698