Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / css / buffered-rendering.html
blobb01211276332fc4775652838b48d15d732ac05fc
1 <!DOCTYPE html>
2 <html>
3 <style>
4 * { font-size: 16px; }
5 div { font-size: 8px; }
6 </style>
7 <body>
8 <svg><image id="image"></image></svg>
9 <script src="../../resources/js-test.js"></script>
10 <script>
11 description('Test that an SVG image accepts all buffered rendering values');
13 var image = document.getElementById('image');
15 function computedStyle(property, value) {
16 image.style.setProperty(property, value);
17 return getComputedStyle(image).getPropertyValue(property);
20 function test(property, value, expected) {
21 if (expected === null)
22 shouldBeNull('computedStyle("' + property + '", "' + value + '")');
23 else
24 shouldBeEqualToString('computedStyle("' + property + '", "' + value + '")', expected);
27 test("buffered-rendering", "", "auto");
28 test("buffered-rendering", "auto", "auto");
29 test("buffered-rendering", "dynamic", "dynamic");
30 test("buffered-rendering", "static", "static");
32 // negative tests
33 test("buffered-rendering", "0", "static");
34 test("buffered-rendering", "1", "static");
35 test("buffered-rendering", "true", "static");
37 // make sure valid values still work
38 test("buffered-rendering", "dynamic", "dynamic");
40 // more negative tests
41 test("buffered-rendering", "0", "dynamic");
42 test("buffered-rendering", "1", "dynamic");
43 test("buffered-rendering", "true", "dynamic");
44 </script>
45 </body>
46 </html>