Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / aspect-ratio-inheritance.html
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <div style="-webkit-aspect-ratio: 1 / 2;">
4   <div id="aspectRatioTest"></div>
5 </div>
6 <script>
7     function testComputedValue(elementId, value, styleAttribute)
8     {
9         var div = document.getElementById(elementId);
10         div.style[styleAttribute] = value;
11         var computedValue = window.getComputedStyle(div)[styleAttribute];
12         return computedValue;
13     }
14     shouldBeEqualToString('testComputedValue("aspectRatioTest", "1 / 4", "-webkit-aspect-ratio")', '1/4');
15     shouldBeEqualToString('testComputedValue("aspectRatioTest", "inherit", "-webkit-aspect-ratio")', '1/2');
16     shouldBeEqualToString('testComputedValue("aspectRatioTest", "none", "-webkit-aspect-ratio")', 'none');
17 </script>