Index: LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html |
diff --git a/LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html b/LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..921ed4e8cfe11a71092259a63e2da848238b72d4 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html |
@@ -0,0 +1,18 @@ |
+<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> |