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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/dir-style-04.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 on runtime a dded elements.">
10 <link rel="match" href="dir-style-04-ref.html">
11 <style>
12 :dir(ltr) { color: blue }
13 :dir(rtl) { color: lime }
14 div { text-align: left; }
15 </style>
16 <script>
17 function appendChildren(e)
18 {
19 // ensure it's a dynamic change
20 document.documentElement.getBoundingClientRect();
21
22 var x = document.createElement("span");
23 x.innerHTML = "This span should inherit dir from the parent. ";
24
25 var y = document.createElement("span");
26 y.innerHTML = "This span should inherit dir from the grandparent.";
27
28 var div = document.getElementById(e);
29
30 x.appendChild(y);
31 div.appendChild(x);
32
33 document.documentElement.removeAttribute("class");
34 }
35 </script>
36 </head>
37 <body onload="appendChildren('d1');appendChildren('d2');">
38 <div id="d1" dir="ltr">This element is ltr. </div>
39 <div id="d2" dir="rtl">This element is rtl. </div>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698