blob: 44ccb3bac509be7b7ea760776d42817af394ca2d [file] [log] [blame]
<title>Tests :first-child rule under DocumentFragment</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
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');
assert_equals(fragmentSelected, a1);
assert_equals(elementSelected, a2);
done();
</script>