diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-pseudo/active-selection-031.html')
-rw-r--r-- | testing/web-platform/tests/css/css-pseudo/active-selection-031.html | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-pseudo/active-selection-031.html b/testing/web-platform/tests/css/css-pseudo/active-selection-031.html new file mode 100644 index 0000000000..c7d79c8ac9 --- /dev/null +++ b/testing/web-platform/tests/css/css-pseudo/active-selection-031.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Pseudo-Elements Test: active selection and vertical writing-modes</title> + + <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling"> + <link rel="match" href="reference/active-selection-031-ref.html"> + + + <link rel="stylesheet" href="support/highlights.css"> + <style> + div > div + { + color: red; + float: left; + font-size: 32px; + margin-left: 16px; + } + + div.vrl + { + writing-mode: vertical-rl; + } + + div.vlr + { + writing-mode: vertical-lr; + } + + div.mixed + { + text-orientation: mixed; + } + + div.sideways + { + text-orientation: sideways; + } + + div.upright + { + text-orientation: upright; + } + + div::selection + { + background-color: yellow; + color: green; + } + </style> + + <script> + function startTest() + { + var targetRange = document.createRange(); + /* We first create an empty range */ + + targetRange.selectNodeContents(document.getElementById("test")); + /* Then we set the range boundaries to the contents of div#test */ + + window.getSelection().addRange(targetRange); + /* Finally, we now add such range of content into a selection */ + } + </script> + + <body onload="startTest();"> + + <p>Test passes if each glyph of the 6 "Selected Text" is green and if there is <strong>no red</strong>. + + <div id="test" class="highlight_reftest"> + + <div class="vrl mixed">Selected Text</div> + + <div class="vrl sideways">Selected Text</div> + + <div class="vrl upright">Selected Text</div> + + <div class="vlr mixed">Selected Text</div> + + <div class="vlr sideways">Selected Text</div> + + <div class="vlr upright">Selected Text</div> + + </div> |