Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / masking / parsing-clip-path-iri.html
blob6afc5de64461a022708250ddfc42cce34e4cf8a3
1 <!DOCTYPE html>
2 <html>
3 <style>
4 * { font-size: 16px; }
5 div { font-size: 8px; }
6 </style>
7 <body>
8 <script src="../../resources/js-test.js"></script>
9 <script>
10 description('Test clip-path IRIs');
12 function computedStyle(property, value) {
13 var div = document.createElement("div");
14 document.body.appendChild(div);
15 div.style.setProperty(property, value);
16 var computedValue = getComputedStyle(div).getPropertyValue(property);
17 document.body.removeChild(div);
18 return computedValue;
21 function innerStyle(property, value) {
22 var div = document.createElement("div");
23 div.style.setProperty(property, value);
24 return div.style.getPropertyValue(property);
27 function testComputed(property, value, expected) {
28 shouldBeEqualToString('computedStyle("' + property + '", "' + value + '")', expected);
31 function testInner(property, value, expected) {
32 if (expected === null)
33 shouldBeNull('innerStyle("' + property + '", "' + value + '")');
34 else
35 shouldBeEqualToString('innerStyle("' + property + '", "' + value + '")', expected);
38 testInner("-webkit-clip-path", "url(#clip1)", "url(#clip1)");
39 testInner("-webkit-clip-path", "url(clip.svg#clip1)", "url(clip.svg#clip1)");
41 testComputed("-webkit-clip-path", "url(#clip1)", "url(#clip1)");
42 testComputed("-webkit-clip-path", "url(clip.svg#clip1)", "url(clip.svg#clip1)");
44 </script>
45 </body>
46 </html>