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

Side by Side Diff: third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/focus-within-2.html

Issue 2783663002: [selectors-4] Import more tests from W3C repository (Closed)
Patch Set: Created 3 years, 8 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>
3 <head>
4 <meta charset="utf-8">
5 <title>CSS Test: :focus-within selector</title>
6 <link rel="author" title="Ethan Lin" href="mailto:ethlin@mozilla.com">
7 <link rel="author" title="Mozilla" href="https://www.mozilla.org">
8 <link rel="help" href="https://drafts.csswg.org/selectors-4/#focus-within-ps eudo">
9 <meta name="assert" content="Test checks :focus-within should not apply afte r element removed.">
10 <link rel="match" href="focus-within-2-ref.html">
11 <meta name="flags" content="interact">
12 <style type="text/css">
13 div {
14 border: solid 15px green;
15 outline: none;
16 }
17 div:focus-within {
18 border-color: red;
19 }
20 </style>
21 </head>
22 <body>
23 <p>Test passes if, when the element is focused and then removed, the outer e lement should change to green.</p>
24 <div id="parent">
25 <div id="child" tabindex="1"></div>
26 </div>
27 <script>
28 var child = document.getElementById('child');
29 child.focus();
30 document.body.offsetWidth;
31 var parent = document.getElementById("parent");
32 parent.removeChild(child);
33 document.body.offsetWidth;
34 </script>
35 </body>
36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698