Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1065)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.html

Issue 1898403002: [WIP] Implement :dir() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase... other changes too probably Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698