blob: 3fb52ed71293e3e643162a7714400cffd110c4cc [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<div style="display: none">
<span id="lower1">lower 1</span><br>
<span id="lower2">lower 2</span><br>
<span id="UPPER1">UPPER 1</span><br>
<span id="UPPER2">UPPER 2</span><br>
</div>
<script>
shouldBe("document.querySelector('#lower1').textContent", "'lower 1'");
shouldBeNull("document.querySelector('#LOWER2')");
shouldBe("document.querySelector('#UPPER1').textContent", "'UPPER 1'");
shouldBeNull("document.querySelector('#upper2')");
shouldBeTrue("document.getElementById('lower1').matches('#lower1')");
shouldBeFalse("document.getElementById('lower2').matches('#LOWER2')");
shouldBeTrue("document.getElementById('UPPER1').matches('#UPPER1')");
shouldBeFalse("document.getElementById('UPPER2').matches('#upper2')");
shouldBeTrue("document.getElementById('lower1').webkitMatchesSelector('#lower1')");
shouldBeFalse("document.getElementById('lower2').webkitMatchesSelector('#LOWER2')");
shouldBeTrue("document.getElementById('UPPER1').webkitMatchesSelector('#UPPER1')");
shouldBeFalse("document.getElementById('UPPER2').webkitMatchesSelector('#upper2')");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>