| Index: third_party/WebKit/LayoutTests/external/wpt/referrer-policy/css-integration/internal-import-stylesheet.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/referrer-policy/css-integration/internal-import-stylesheet.html b/third_party/WebKit/LayoutTests/external/wpt/referrer-policy/css-integration/internal-import-stylesheet.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..90003547f4d4e2048cc33f7125d756d42507140d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/referrer-policy/css-integration/internal-import-stylesheet.html
|
| @@ -0,0 +1,45 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| + <head>
|
| + <title>CSS integration - image from imported stylesheet (internal)</title>
|
| + <script src="/resources/testharness.js"></script>
|
| + <script src="/resources/testharnessreport.js"></script>
|
| + <script src="/common/utils.js"></script>
|
| + <!-- Common global functions for referrer-policy tests. -->
|
| + <script src="/referrer-policy/generic/common.js"></script>
|
| + <meta name="referrer" content="origin">
|
| + </head>
|
| + <body>
|
| + <p>Check that resources from stylesheets (imported from internal
|
| + stylesheets) are loaded with the referrer and referrer policy from the
|
| + document.</p>
|
| +
|
| + <div class="styled"></div>
|
| +
|
| + <script>
|
| + var css_test = async_test("Image from imported stylesheet (internal).");
|
| + var id = token();
|
| + var url_prefix = location.protocol + "//www1." + location.hostname + ":" + location.port + "/referrer-policy/generic/subresource/";
|
| + var css_url = url_prefix + "stylesheet.py?id=" + id;
|
| + var img_url = url_prefix + "image.py?report-headers&id=" + id;
|
| +
|
| + var style = document.createElement("style");
|
| + style.type = 'text/css';
|
| + style.appendChild(document.createTextNode("@import url('" + css_url + "');"));
|
| + document.head.appendChild(style);
|
| + css_test.step_timeout(
|
| + queryXhr.bind(this, img_url,
|
| + function(message) {
|
| + css_test.step(function() {
|
| + assert_own_property(message, "headers");
|
| + assert_own_property(message, "referrer");
|
| + assert_equals(message.referrer, css_url);
|
| + });
|
| + css_test.done();
|
| + }),
|
| + 1000);
|
| + </script>
|
| +
|
| + <div id="log"></div>
|
| + </body>
|
| +</html>
|
|
|