Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-border-image-slice.html
blobadf4b61a83699ae73f731e01133b9765b43d97a1
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
10 description("Test to make sure border-image-slice is correctly parsed.")
12 var testContainer = document.createElement("div");
13 document.body.appendChild(testContainer);
15 testContainer.innerHTML = '<div style="width:100px;height:100px"><div id="test">hello</div></div>';
17 e = document.getElementById('test');
18 computedStyle = window.getComputedStyle(e, null);
20 var testValues = [ "10", "30%", "10 10", "10 30%", "30% 30%", "10 10 10", "30% 10 10", "10 30% 10", "30% 30% 30% 10", "10 10 10 10", "30% 30% 30% 10", "30% 30% 30% 30%", "fill 30%", "fill 10", "fill 2 4 8% 16%", "30% fill", "10 fill", "2 4 8% 16% fill", "10 fill 10", "solid", "fill fill" ];
22 var expectedValues = [ "'10'", "'30%'", "'10'", "'10 30%'", "'30%'", "'10'", "'30% 10 10'", "'10 30%'", "'30% 30% 30% 10'", "'10'", "'30% 30% 30% 10'", "'30%'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'100%'", "'100%'", "'100%'" ];
24 for (i = 0; i < testValues.length; i++) {
25 e.style.borderImageSlice = "";
26 e.style.borderImageSlice = testValues[i];
27 shouldBe("computedStyle.getPropertyValue('border-image-slice')", expectedValues[i]);
29 document.body.removeChild(testContainer);
31 </script>
32 </body>
33 </html>