blob: 936711add552763f9728661ce159dd241d6219e6 [file] [log] [blame]
<script src="../../resources/js-test.js"></script>
<script>
description('Tests :first-child rule under DocumentFragment.');
var fragment = document.createDocumentFragment();
var div = document.createElement('div');
var a1 = document.createElement('a');
var a2 = document.createElement('a');
fragment.appendChild(a1);
div.appendChild(a2);
var fragmentSelected = fragment.querySelector('a:first-child');
var elementSelected = div.querySelector('a:first-child');
shouldBe("fragmentSelected", "a1");
shouldBe("elementSelected", "a2");
</script>