| <div id="container"><span id="foo"></span></div> |
| <script src="../../resources/js-test-pre.js"></script> |
| description('This test makes sure WebKit element.querySelector("#foo") returns a descendent node of the element even when there are multiple elements with the id foo.'); |
| var container = document.getElementById('container'); |
| shouldBe('container.querySelectorAll("#foo").length', '1'); |
| shouldBe('container.querySelectorAll("#foo")[0]', 'container.firstChild'); |
| <script src="../../resources/js-test-post.js"></script> |