blob: 0512cf31dd8a97101d4d6851a0cede1d02c7f485 [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div style="display:none" id="test">
<div>
<p class="ng" id="target">Cocoa and Cappuccino make us happy.</p>
</div>
</div>
</body>
<script>
description('This test makes sure that querySelector with pseudo-element doesn\'t match anything.');
var target = document.getElementById('target');
shouldBe('document.querySelectorAll("#test p").length', '1');
shouldBe('document.querySelector("#test p")', 'target');
shouldBe('document.querySelectorAll("#test p.ng").length', '1');
shouldBe('document.querySelector("#test p.ng")', 'target');
shouldBe('document.querySelectorAll("#test div p").length', '1');
shouldBe('document.querySelector("#test div p")', 'target');
shouldBe('document.querySelectorAll("#test div p.ng").length', '1');
shouldBe('document.querySelector("#test div p.ng")', 'target');
shouldBe('document.querySelectorAll("#test p:first-line").length', '0');
shouldBeNull('document.querySelector("#test p:first-line")');
</script>
<script src="../../resources/js-test-post.js"></script>
</html>