| Index: third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo-class.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo-class.html b/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo-class.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6a4badb446dae4fadea80817e85475d963335478
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/selectors/dir-pseudo-class.html
|
| @@ -0,0 +1,39 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| + :dir(RTL) {
|
| + color: red;
|
| + }
|
| + :dir(ltr) {
|
| + color: green;
|
| + }
|
| + :dir( abc) {
|
| + color: yellow;
|
| + }
|
| + :dir(a,b) {
|
| + color: blue;
|
| + }
|
| +</style>
|
| +</head>
|
| +<body>
|
| +<div dir="auto">
|
| + <label id="label1">one</label>
|
| +</div>
|
| +<div>
|
| + <label id="label2">two</label>
|
| +</div>
|
| +<div dir="rtl">
|
| + <label id="label3">three</label>
|
| +</div>
|
| +<script>
|
| +debug('Checks total number of valid rules');
|
| +shouldBe('document.styleSheets[0].cssRules.length', '3');
|
| +
|
| +debug('Checks direction styles are applied correctly based on the computed direction value for each element');
|
| +shouldBeEqualToString('getComputedStyle(document.getElementById("label1")).color', 'rgb(0, 128, 0)');
|
| +shouldBeEqualToString('getComputedStyle(document.getElementById("label2")).color', 'rgb(0, 128, 0)');
|
| +shouldBeEqualToString('getComputedStyle(document.getElementById("label3")).color', 'rgb(255, 0, 0)');
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|