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

Unified Diff: third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/child-index-no-parent-01.html

Issue 2783663002: [selectors-4] Import more tests from W3C repository (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/child-index-no-parent-01.html
diff --git a/third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/child-index-no-parent-01.html b/third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/child-index-no-parent-01.html
new file mode 100644
index 0000000000000000000000000000000000000000..5ae108b7df2dd09d4dff1b31e40e79fcdb6a4e99
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/selectors4/child-index-no-parent-01.html
@@ -0,0 +1,50 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test: child-indexed selectors should match without a parent element.</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
+<link rel="match" href="child-index-no-parent-01-ref.html">
+<style>
+ :root:first-child #a {
+ color: green;
+ }
+ :root:nth-child(n) #b {
+ color: green;
+ }
+ :root:first-of-type #c {
+ color: green;
+ }
+ :root:nth-of-type(1) #d {
+ color: green;
+ }
+ :root:last-of-type #e {
+ color: green;
+ }
+ :root:last-child #f {
+ color: green;
+ }
+ :root:nth-last-child(1) #g {
+ color: green;
+ }
+ :root:nth-last-of-type(n) #h {
+ color: green;
+ }
+
+ #i {
+ color: green;
+ }
+
+ /* NB: not matching intentionally */
+ :root:nth-last-child(2) #i {
+ color: red;
+ }
+</style>
+<p id="a">Should be green
+<p id="b">Should be green
+<p id="c">Should be green
+<p id="d">Should be green
+<p id="e">Should be green
+<p id="f">Should be green
+<p id="g">Should be green
+<p id="h">Should be green
+<p id="i">Should be green

Powered by Google App Engine
This is Rietveld 408576698