chromium/third_party/blink/web_tests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html

<!doctype html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body id="target" class="target">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <pre id='console'></pre>
</body>
<script>
description('Test for crbug.com/304069: querySelectorAll regression.');
shouldBe("document.body.querySelectorAll('#target > div').length", "6");
shouldBe("document.body.querySelectorAll('#target').length", "0");
shouldBe("document.body.querySelectorAll('.target > div').length", "6");
shouldBe("document.body.querySelectorAll('.target').length", "0");
shouldBe("document.body.querySelectorAll('body > div').length", "6");
shouldBe("document.body.querySelectorAll('body').length", "0");
shouldBeNull("document.body.querySelector('#target')");
shouldBeNull("document.body.querySelector('.target')");
shouldBeNull("document.body.querySelector('body')");
</script>
</html>