Chromium Code Reviews| Index: LayoutTests/fast/dom/margin-for-inverted-direction.html |
| diff --git a/LayoutTests/fast/dom/margin-for-inverted-direction.html b/LayoutTests/fast/dom/margin-for-inverted-direction.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b3416042a649e793922df51fff7e5805723de2ff |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/margin-for-inverted-direction.html |
| @@ -0,0 +1,41 @@ |
| +<!DOCTYPE html> |
| + |
| +<style> |
| +div>div,div>table{border:1px black solid;width:50px;height:20px} |
| +</style> |
| + |
| +<script src="../../resources/js-test.js"></script> |
| + |
| +<div align="right"> |
| + <table dir="rtl" border="1" id="rtl_table_in_ltr"><tr><td></td><td></td></tr></table> |
| + <div dir="rtl" id="rtl_div_in_ltr"></div> |
| + <table dir="ltr" border="1" id="ltr_table_in_ltr"><tr><td></td><td></td></tr></table> |
| + <div dir="ltr" id="ltr_div_in_ltr"></div> |
| +</div> |
| + |
| +<div dir="rtl" align="left"> |
| + <table dir="rtl" border="1" id="rtl_table_in_rtl"><tr><td></td><td></td></tr></table> |
| + <div dir="rtl" id="rtl_div_in_rtl"></div> |
| + <table dir="ltr" border="1" id="ltr_table_in_rtl"><tr><td></td><td></td></tr></table> |
| + <div dir="ltr" id="ltr_div_in_rtl"></div> |
| +</div> |
| + |
| +<script> |
| + rtl_table_in_ltr = document.getElementById("rtl_table_in_ltr"); |
| + rtl_div_in_ltr = document.getElementById("rtl_div_in_ltr"); |
| + ltr_table_in_ltr = document.getElementById("ltr_table_in_ltr"); |
| + ltr_div_in_ltr = document.getElementById("ltr_div_in_ltr"); |
| + shouldBe("rtl_table_in_ltr.getBoundingClientRect().right","792"); |
|
mstensho (USE GERRIT)
2014/12/08 10:01:21
Could you set a width on BODY or something, so tha
Kyungtae Kim
2014/12/09 04:53:08
Done. Set a width on BODY.
mstensho (USE GERRIT)
2014/12/09 09:54:41
Acknowledged.
|
| + shouldBe("rtl_div_in_ltr.getBoundingClientRect().right","792"); |
| + shouldBe("ltr_table_in_ltr.getBoundingClientRect().right","792"); |
| + shouldBe("ltr_div_in_ltr.getBoundingClientRect().right","792"); |
| + |
| + rtl_table_in_rtl = document.getElementById("rtl_table_in_rtl"); |
| + rtl_div_in_rtl = document.getElementById("rtl_div_in_rtl"); |
| + ltr_table_in_rtl = document.getElementById("ltr_table_in_rtl"); |
| + ltr_div_in_rtl = document.getElementById("ltr_div_in_rtl"); |
| + shouldBe("rtl_table_in_rtl.getBoundingClientRect().left","8"); |
| + shouldBe("rtl_div_in_rtl.getBoundingClientRect().left","8"); |
| + shouldBe("ltr_table_in_rtl.getBoundingClientRect().left","8"); |
| + shouldBe("ltr_div_in_rtl.getBoundingClientRect().left","8"); |
| +</script> |