diff options
Diffstat (limited to 'testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html')
-rw-r--r-- | testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html new file mode 100644 index 0000000000..1d39781e30 --- /dev/null +++ b/testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html @@ -0,0 +1,27 @@ +<html> + <head> + <title>Referrer Policy: iframes with data url uses no referrer</title> + <link rel="help" href="https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-nested"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/get-host-info.sub.js"></script> + <script src="resources/make-html-script.js"></script> + <meta name="referrer" content="origin"> + </head> + <body onload="runTest()"> + <h1>Referrer Policy: iframes with data url uses no referrer</h1> + <script> + let test = async_test("iframes with data url uses no referrer"); + window.addEventListener("message", test.step_func_done(msg => { + assert_equals(msg.data.referrer, undefined); + })); + + function runTest() { + let iframe = document.createElement("iframe"); + iframe.src = `data:text/html,${createScriptString(get_host_info().REMOTE_ORIGIN)}`; + document.body.appendChild(iframe); + } + </script> + <div id="log"></div> + </body> +</html> |