Skip to content

Commit

Permalink
HTML: add a test for :heading
Browse files Browse the repository at this point in the history
Part of whatwg/html#3499.

This does not yet test :heading().
  • Loading branch information
zcorpan committed Jun 8, 2018
1 parent 7684fe3 commit a72a06f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions html/semantics/selectors/pseudo-classes/heading.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>:heading pseudo-class</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<hgroup></hgroup>
<hgroup><h1></h1></hgroup>
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
<h7></h7>
<script>
test(() => {
assert_array_equals(document.querySelectorAll(':heading'), document.querySelectorAll('hgroup, body > h1, h2, h3, h4, h5, h6'));
})
</script>

0 comments on commit a72a06f

Please sign in to comment.