<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<details style="display:none">
<summary>Click me</summary>
Blah, blah, ...
</detail>

<script>
test(() => {
  const summary = document.querySelector('summary');
  const details = document.querySelector('details');
  assert_false(details.open);
  summary.click();
  assert_true(details.open);
  summary.click();
  assert_false(details.open);
}, 'click() on hidden SUMMARY should toggle DETAILS.');
</script>
