Index: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-right-auto.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-right-auto.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-right-auto.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3490a87492fa66ed32887c66f82b2f1a3e734a87 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-right-auto.html |
@@ -0,0 +1,44 @@ |
+<!DOCTYPE html> |
+<style> |
+ #container { |
+ width: 500px; |
+ } |
+ #container > div { |
+ background-color: red; |
+ position: relative; |
+ left: 5px; |
+ right: auto; |
+ top: 5px; |
+ bottom: 5px; |
+ } |
+</style> |
+<script src="../../../resources/js-test.js"></script> |
+<p> |
+ getComputedStyle should return minus the value of left as right when right is auto. |
+</p> |
+<div id="container"> |
+ <div id=ltr> |
+ If direction of containing block is ltr, bottom and right should be negative |
+ </div> |
+ bottom and right should be negative |
+</div> |
+<div id="container" dir="rtl"> |
+ <div id=rtl> |
+ If direction of containing block is rtl, bottom and right should be negative |
+ </div> |
+ bottom and right should be negative |
+</div> |
+<script> |
+ var ltrElement = document.getElementById("ltr"); |
+ var rtlElement = document.getElementById("rtl"); |
+ |
+ shouldBe("window.getComputedStyle(ltrElement).top", "'5px'"); |
+ shouldBe("window.getComputedStyle(ltrElement).right", "'-5px'"); |
+ shouldBe("window.getComputedStyle(ltrElement).bottom", "'-5px'"); |
+ shouldBe("window.getComputedStyle(ltrElement).left", "'5px'"); |
+ |
+ shouldBe("window.getComputedStyle(rtlElement).top", "'5px'"); |
+ shouldBe("window.getComputedStyle(rtlElement).right", "'-5px'"); |
+ shouldBe("window.getComputedStyle(rtlElement).bottom", "'-5px'"); |
+ shouldBe("window.getComputedStyle(rtlElement).left", "'5px'"); |
+</script> |