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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/selectors-4/focus-within-001.html

Issue 2776693002: [selectors-4] Import W3C Test Suite (Closed)
Patch Set: Created 3 years, 9 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 lang=en>
3 <meta charset="utf-8">
4 <title>Selectors Level 4: focus-within</title>
5 <link rel="author" title="Keyong Li" href="mailto:kli79@bloomberg.net">
6 <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net">
7 <link rel="help" href="https://drafts.csswg.org/selectors-4/#focus-within-pseudo ">
8 <link rel="match" href="focus-within-001-ref.html">
9 <meta name="flags" content="interact">
10 <meta name="assert" content="Test that :focus-within applies to an element with tabindex when :focus applies.">
11 <style>
12 /* Suppress things that cannot be reproduced in the reference file */
13 :focus {
14 outline: none;
15 }
16
17 /* Use blue to indicate that the user needs to pay attention.
18 This element needs to be focused for the test to make sense. */
19 div {
20 border: solid 15px blue;
21 }
22 div:focus {
23 border-color: red;
24 }
25 div:focus-within {
26 border-color: green;
27 }
28 </style>
29 <p>Test passes if, when the element below is focused, it is surrounded by a thic k green border. There must be no red or blue once it is focused.</p>
30 <div id="focusme" class="reftest-wait" onfocus="this.classList.toggle('reftest-w ait');" tabindex="1">Focus this element</div>
31 <script>
32 /* This script is an optional convenience,
33 simply removing the need to manually focus the element.
34 The test is valid even if the script is not run. */
35 var focusme = document.getElementById('focusme');
36 focusme.focus();
37 </script>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698