Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / getComputedStyle-border-radius-shorthand.html
index 1719bb2..d88284e 100644 (file)
@@ -7,7 +7,7 @@
 <body>
 <script>
 
-description("Test to make sure border-radius shorthand property returns CSSValueList properly.")
+description("Tests that the border-radius shorthand is computed properly.")
 
 var testContainer = document.createElement("div");
 testContainer.contentEditable = true;
@@ -18,32 +18,11 @@ testContainer.innerHTML = '<div style="width:100px;height:100px"><div id="test">
 e = document.getElementById('test');
 computedStyle = window.getComputedStyle(e, null);
 
-function checkComputedStyleValue() {
-    var before = window.getComputedStyle(e, null).getPropertyValue('border-radius');
-    e.style.background = 'none';
-    e.style.background = before;
-    return (window.getComputedStyle(e, null).getPropertyValue('border-radius') == before);
-}
-
 e.style.borderRadius = "4em";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'64px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "2em 1em 4em / 0.5em 3em";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'32px 16px 64px / 8px 48px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'32px 16px 64px / 8px 48px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'32px 8px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'16px 48px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'64px 8px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'16px 48px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "";
 e.style.borderTopLeftRadius = "4em";
@@ -51,123 +30,39 @@ e.style.borderTopRightRadius = "4em";
 e.style.borderBottomLeftRadius = "4em";
 e.style.borderBottomRightRadius = "4em";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'64px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'1px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'2px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'2px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px 6px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px 6px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px 6px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'6px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px 6px / 4em";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px 6px / 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px 6px / 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'6px 64px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px 6px / 4em 3px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px 6px / 64px 3px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px 6px / 64px 3px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px 3px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'6px 3px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px 6px / 4em 3px 7px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px 6px / 64px 3px 7px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px 6px / 64px 3px 7px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px 3px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px 7px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'6px 3px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "1px 2px 4px 6px / 4em 3px 7px 8px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'1px 2px 4px 6px / 64px 3px 7px 8px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'1px 2px 4px 6px / 64px 3px 7px 8px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'1px 64px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'2px 3px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'4px 7px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'6px 8px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "10px 20px 30px 40px / 15px 25px 35px 45px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'10px 20px 30px 40px / 15px 25px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'10px 20px 30px 40px / 15px 25px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'10px 15px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'20px 25px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'30px 35px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'40px 45px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "10px 20px 30px 40px / 10px 25px 35px 45px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'10px 20px 30px 40px / 10px 25px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'10px 20px 30px 40px / 10px 25px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'10px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'20px 25px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'30px 35px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'40px 45px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "10px 20px 30px 40px / 10px 20px 35px 45px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'10px 20px 30px 40px / 10px 20px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'10px 20px 30px 40px / 10px 20px 35px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'10px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'20px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'30px 35px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'40px 45px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 e.style.borderRadius = "10px 20px 30px 40px / 10px 20px 30px 45px";
 shouldBe("computedStyle.getPropertyValue('border-radius')", "'10px 20px 30px 40px / 10px 20px 30px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').toString()", "'[object CSSValueList]'");
-shouldBe("computedStyle.getPropertyCSSValue('border-radius').cssText", "'10px 20px 30px 40px / 10px 20px 30px 45px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-left-radius').cssText", "'10px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-top-right-radius').cssText", "'20px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-right-radius').cssText", "'30px'");
-shouldBe("computedStyle.getPropertyCSSValue('border-bottom-left-radius').cssText", "'40px 45px'");
-shouldBe("checkComputedStyleValue()", "true");
 
 document.body.removeChild(testContainer);