Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials.sub.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>Request URL Modifiers: crossorigin(use-credentials)</title>
<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-crossorigin-modifier">
<link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org">
<link rel="match" href="../url-image-ref.html">
<meta name="assert" content="A url with the request URL modifier crossorigin(use-credentials) requires a response with the appropriate headers.">
<style>
.test {
width: 200px;
height: 200px;
background-color: red;
background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png?pipe=header(Access-Control-Allow-Origin,http://{{hosts[][]}}:{{ports[http][0]}})|header(Access-Control-Allow-Credentials,true)" crossorigin(use-credentials));
}
</style>
</head>
<body>
<p>Test passes if there is a green square.</p>
<div class="test"></div>
</body>
</html>