-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathurl-request-modifiers-computed.sub.html
45 lines (39 loc) · 5.19 KB
/
url-request-modifiers-computed.sub.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-5/#request-url-modifiers">
<link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="container" style="font-size: 20">
<div id="target"></div>
</div>
<script>
// No modifiers
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")');
// <crossorigin-modifier> = crossorigin(anonymous | use-credentials)
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(use-credentials))');
// <integrity-modifier> = integrity(<string>)
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar"))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity(""))');
// <referrerpolicy-modifier> = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url)
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(same-origin))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(unsafe-url))');
// Multiple modifiers
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))');
test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))');
</script>