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

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

Issue 1614343002: Implement CSS4 pseudo-class :dir() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated layout tests Created 4 years, 10 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 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 :dir(RTL) {
6 color: red;
7 }
8 :dir(ltr) {
9 color: green;
10 }
11 :dir( abc) {
12 color: yellow;
13 }
14 :dir(a,b) {
15 color: blue;
16 }
17 </style>
18 </head>
19 <body>
20 <div dir="auto">
21 <label id="label1">one</label>
22 </div>
23 <div>
24 <label id="label2">two</label>
25 </div>
26 <div dir="rtl">
27 <label id="label3">three</label>
28 </div>
29 <script>
30 debug('Checks total number of valid rules');
31 shouldBe('document.styleSheets[0].cssRules.length', '3');
32
33 debug('Checks direction styles are applied correctly based on the computed direc tion value for each element');
34 shouldBeEqualToString('getComputedStyle(document.getElementById("label1")).color ', 'rgb(0, 128, 0)');
35 shouldBeEqualToString('getComputedStyle(document.getElementById("label2")).color ', 'rgb(0, 128, 0)');
36 shouldBeEqualToString('getComputedStyle(document.getElementById("label3")).color ', 'rgb(255, 0, 0)');
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698