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

Unified Diff: third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.html
diff --git a/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.html b/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.html
new file mode 100644
index 0000000000000000000000000000000000000000..8459288fe9c507d44491cbc700a668c344dec836
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo/dir-pseudo-basic.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: red;
+}
+
+#div1:dir(ltr) { background-color: green; }
+#div2:dir(LTR) { background-color: green; }
+#div3:dir(Rtl) { background-color: green; }
+#div4 { background-color: green; }
+
+#div1:dir(rtl) { background-color: red; }
+#div2:dir(rtl) { background-color: red; }
+#div3:dir(ltr) { background-color: red; }
+#div4:dir(lol) { background-color: red; }
+</style>
+
+<div id=div1></div>
+<div id=div2 dir=ltr></div>
+<div id=div3 dir=RTL></div>
+<div id=div4 dir=lol></div>
+
+<script>
+test(() => {
+ assert_equals(getComputedStyle(div1).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(div2).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(div3).backgroundColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(div4).backgroundColor, "rgb(0, 128, 0)");
+}, ":dir() works in basic cases");
+</script>

Powered by Google App Engine
This is Rietveld 408576698