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

Unified Diff: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html
diff --git a/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html b/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html
new file mode 100644
index 0000000000000000000000000000000000000000..1c9d329e80751767f0aae462922323b9f92f0cb8
--- /dev/null
+++ b/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<meta charset=utf-8 id=meta>
+<title id=title>Selector: pseudo-classes (:dir(ltr), :dir(rtl))</title>
+<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org" id=link1>
+<link rel=help href="https://html.spec.whatwg.org/multipage/#pseudo-classes" id=link2>
+<script src="../../../../../../resources/testharness.js" id=script1></script>
+<script src="../../../../../../resources/testharnessreport.js" id=script2></script>
+<script src="utils.js" id=script3></script>
+<style id=style>
+ #span1 {direction: rtl;}
+ #span5, #span6 {display: none;}
+</style>
+<div id="log"></div>
+<bdo dir="rtl" id=bdo1>WERBEH</bdo>
+<bdo dir="ltr" id=bdo2>HEBREW</bdo>
+<bdi id=bdi1>HEBREW</bdi>
+<bdi dir="rtl" id=bdi2>WERBEH</bdi>
+<bdi dir="ltr" id=bdi3>HEBREW</bdi>
+<span id=span1>WERBEH</span>
+<span dir="rtl" id=span2>WERBEH</span>
+<span dir="ltr" id=span3>HEBREW</span>
+&#x202E;<span id=span4>WERBEH</span>&#x202C;
+<span dir="rtl" id=span5>WERBEH</span>
+<span dir="ltr" id=span6>HEBREW</span>
+<bdo dir="auto" id=bdo3>HEBREW</bdo>
+<bdo dir="auto" id=bdo4>إيان</bdo>
+<bdo dir="ltr" id=bdo5>עברית</bdo>
+
+<script>
+ testSelector(":dir(rtl)", ["bdo1", "bdi2", "span1", "span2", "span4", "span5", "bdo4"], "':dir(rtl)' matches all elements whose directionality is 'rtl'.");
+ testSelector(":dir(ltr)", ["html", "head", "body", "meta", "title", "link1", "link2", "script1", "script2", "script3", "stlyle", "log", "bdo2", "bdi3", "span3", "span6", "bdo3", "bdo5"], "':dir(ltr)' matches all elements whose directionality is 'ltr'.");
+
+ var bdo = document.createElement("bdo");
+ bdo.setAttribute("dir", "ltr");
+ testSelector(":dir(ltr)", ["meta", "title", "link1", "link2", "script1", "script2", "script3", "stlyle", "log", "bdo2", "bdi3", "span3", "span6", "bdo3"], "':dir(ltr)' doesn't match elements not in the document.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698