4 div
>div{background:lime;width:
100px;height:
20px;border:
1px solid green}
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 -->
13 <div dir=
"rtl" id=
"rtl_in_ltr"></div>
14 <div dir=
"ltr" id=
"ltr_in_ltr"></div>
17 <!-- Boxes inside the right-aligned RTL block should be right-aligned -->
19 <div dir=
"rtl" id=
"rtl_in_rtl"></div>
20 <div dir=
"ltr" id=
"ltr_in_rtl"></div>
23 <!-- Boxes inside the right-aligned LTR block should be right-aligned -->
25 <div dir=
"rtl" id=
"rtl_in_ltr_r"></div>
26 <div dir=
"ltr" id=
"ltr_in_ltr_r"></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>
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");