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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-02b.html

Issue 2783663002: [selectors-4] Import more tests from W3C repository (Closed)
Patch Set: Created 3 years, 8 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 <html class="reftest-wait">
3 <head>
4 <meta charset="UTF-8">
5 <title>CSS Test: :dir() selector</title>
6 <link rel="author" title="Astley Chen" href="mailto:aschen@mozilla.com">
7 <link rel="author" title="Mozilla" href="https://www.mozilla.org">
8 <link rel="help" href="https://drafts.csswg.org/selectors-4/#the-dir-pseudo" >
9 <meta name="assert" content="Test checks :dir() basic functions when documen t directionality is dynamically changed from ltr to rtl.">
10 <link rel="match" href="dir-style-02-ref.html">
11 <style>
12 div { text-align: left; }
13 :dir(ltr) { color: blue }
14 :dir(rtl) { color: lime }
15 :dir(foopy) { color: red }
16 </style>
17 <script>
18 function switchDir()
19 {
20 // ensure it's a dynamic change
21 document.documentElement.getBoundingClientRect();
22
23 document.dir = "rtl";
24
25 document.documentElement.removeAttribute("class");
26 }
27 </script>
28 </head>
29 <body onload="switchDir()">
30 <div>This element has default direction.</div>
31 <div dir="ltr">This element is ltr.</div>
32 <div dir="rtl">This element is rtl.</div>
33 <div dir="ltr">
34 <div>This element should inherit ltr.</div>
35 <div dir="ltr">This element is ltr.</div>
36 <div dir="rtl">This element is rtl.</div>
37 </div>
38 <div dir="rtl">
39 <div>This element should inherit rtl.</div>
40 <div dir="ltr">This element is ltr.</div>
41 <div dir="rtl">This element is rtl.</div>
42 </div>
43 <div dir="foopy">This element has an invalid dir attribute and
44 should have default direction.</div>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698