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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-with-direction.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 #outer1 { direction: rtl; }
13 #outer1:dir(ltr) { background-color: green; }
14 #inner1:dir(ltr) { background-color: green; }
15 #outer1:dir(rtl) { background-color: red; }
16 #inner1:dir(rtl) { background-color: red; }
17
18 #outer2 { direction: ltr; }
19 #outer2:dir(rtl) { background-color: green; }
20 #inner2:dir(rtl) { background-color: green; }
21 #outer2:dir(ltr) { background-color: red; }
22 #inner2:dir(ltr) { background-color: red; }
23
24 #testDiv:dir(ltr) { direction: rtl; }
25 #testDiv:dir(rtl) { direction: ltr; }
26 </style>
27
28 <div id=outer1>
29 <div id=inner1>
30 </div>
31 </div>
32
33 <div id=outer2 dir=rtl>
34 <div id=inner2>
35 </div>
36 </div>
37
38 <div id=testDiv></div>
39
40 <script>
41 test(() => {
42 assert_equals(getComputedStyle(outer1).backgroundColor, "rgb(0, 128, 0)");
43 assert_equals(getComputedStyle(inner1).backgroundColor, "rgb(0, 128, 0)");
44 assert_equals(getComputedStyle(outer2).backgroundColor, "rgb(0, 128, 0)");
45 assert_equals(getComputedStyle(inner2).backgroundColor, "rgb(0, 128, 0)");
46 assert_equals(getComputedStyle(testDiv).direction, "rtl");
47 }, ":dir() does not depend on stylistic states");
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698