Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / block / align-inverted-direction.html
blob974f9cfe0084bb60e9122b405edcb647b9d24a80
1 <!DOCTYPE html>
3 <style>
4 div>div{background:lime;width:100px;height:20px;border:1px solid green}
5 </style>
7 <script src="../../resources/js-test.js"></script>
9 <body style="width:700px;margin:0px">
11 <!-- Boxes inside the left-aligned LTR block should be left-aligned -->
12 <div>
13 <div dir="rtl" id="rtl_in_ltr"></div>
14 <div dir="ltr" id="ltr_in_ltr"></div>
15 </div>
17 <!-- Boxes inside the right-aligned RTL block should be right-aligned -->
18 <div dir="rtl">
19 <div dir="rtl" id="rtl_in_rtl"></div>
20 <div dir="ltr" id="ltr_in_rtl"></div>
21 </div>
23 <!-- Boxes inside the right-aligned LTR block should be right-aligned -->
24 <div align="right">
25 <div dir="rtl" id="rtl_in_ltr_r"></div>
26 <div dir="ltr" id="ltr_in_ltr_r"></div>
27 </div>
29 <!-- Boxes inside the left-aligned RTL block should be left-aligned -->
30 <div dir="rtl" align="left">
31 <div dir="rtl" id="rtl_in_rtl_l"></div>
32 <div dir="ltr" id="ltr_in_rtl_l"></div>
33 </div>
35 <script>
36 rtl_in_ltr = document.getElementById("rtl_in_ltr");
37 ltr_in_ltr = document.getElementById("ltr_in_ltr");
38 shouldBe("rtl_in_ltr.getBoundingClientRect().left","0");
39 shouldBe("ltr_in_ltr.getBoundingClientRect().left","0");
41 rtl_in_rtl = document.getElementById("rtl_in_rtl");
42 ltr_in_rtl = document.getElementById("ltr_in_rtl");
43 shouldBe("rtl_in_rtl.getBoundingClientRect().right","700");
44 shouldBe("ltr_in_rtl.getBoundingClientRect().right","700");
46 rtl_in_ltr_r = document.getElementById("rtl_in_ltr_r");
47 ltr_in_ltr_r = document.getElementById("ltr_in_ltr_r");
48 shouldBe("rtl_in_ltr_r.getBoundingClientRect().right","700");
49 shouldBe("ltr_in_ltr_r.getBoundingClientRect().right","700");
51 rtl_in_rtl_l = document.getElementById("rtl_in_rtl_l");
52 ltr_in_rtl_l = document.getElementById("ltr_in_rtl_l");
53 shouldBe("rtl_in_rtl_l.getBoundingClientRect().left","0");
54 shouldBe("ltr_in_rtl_l.getBoundingClientRect().left","0");
55 </script>
57 </body>