OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 |
| 5 <style> |
| 6 div { |
| 7 width: 100px; |
| 8 height: 100px; |
| 9 background-color: red; |
| 10 } |
| 11 |
| 12 #div1:dir(ltr) { background-color: green; } |
| 13 #div2:dir(LTR) { background-color: green; } |
| 14 #div3:dir(Rtl) { background-color: green; } |
| 15 #div4 { background-color: green; } |
| 16 |
| 17 #div1:dir(rtl) { background-color: red; } |
| 18 #div2:dir(rtl) { background-color: red; } |
| 19 #div3:dir(ltr) { background-color: red; } |
| 20 #div4:dir(lol) { background-color: red; } |
| 21 </style> |
| 22 |
| 23 <div id=div1></div> |
| 24 <div id=div2 dir=ltr></div> |
| 25 <div id=div3 dir=RTL></div> |
| 26 <div id=div4 dir=lol></div> |
| 27 |
| 28 <script> |
| 29 test(() => { |
| 30 assert_equals(getComputedStyle(div1).backgroundColor, "rgb(0, 128, 0)"); |
| 31 assert_equals(getComputedStyle(div2).backgroundColor, "rgb(0, 128, 0)"); |
| 32 assert_equals(getComputedStyle(div3).backgroundColor, "rgb(0, 128, 0)"); |
| 33 assert_equals(getComputedStyle(div4).backgroundColor, "rgb(0, 128, 0)"); |
| 34 }, ":dir() works in basic cases"); |
| 35 </script> |
OLD | NEW |