Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html

Issue 270503006: Make pseudo-classes selector queries work on DocumentFragment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..72e0aa1ce7ae26b933a316e2033e5d5ab0bda6b7
--- /dev/null
+++ b/LayoutTests/fast/dom/DocumentFragment/sibling-rules-under-document-fragment.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
esprehn 2014/05/08 05:25:11 We usually leave off the <html>, <head> and <body>
Inactive 2014/05/08 13:17:36 Done.
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description('Tests :first-child rule under DocumentFragment.');
+
+var f = document.createDocumentFragment();
+var e = document.createElement('div');
esprehn 2014/05/08 05:25:11 can we call this variable div and the other one fr
Inactive 2014/05/08 13:17:36 Done.
+var a = document.createElement('a');
+var b = document.createElement('a');
+
+f.appendChild(a);
+e.appendChild(b);
+
+var fragmentSelected = f.querySelector('a:first-child');
+var elementSelected = e.querySelector('a:first-child');
+
+shouldBe("fragmentSelected", "a");
+shouldBe("elementSelected", "b");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698