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

Unified Diff: LayoutTests/fast/css/nth-child-and-nth-type-child.html

Issue 1096813005: Extending the NthIndexCache to support caching for the type of index. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Layout Tests Created 5 years, 8 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/css/nth-child-and-nth-type-child.html
diff --git a/LayoutTests/fast/css/nth-child-and-nth-type-child.html b/LayoutTests/fast/css/nth-child-and-nth-type-child.html
new file mode 100644
index 0000000000000000000000000000000000000000..665aca7a5bad9c7bf7e7c103c531d0472b533b47
--- /dev/null
+++ b/LayoutTests/fast/css/nth-child-and-nth-type-child.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<html>
+<head>
rune 2015/05/04 08:32:48 Drop html, head, and body tags.
+ <style type="text/css">
+ :nth-child(2){color:red;}
+ :nth-of-type(2){color:green;}
+ p:nth-child(2n){color:blue;}
+ div:nth-of-type(2n+1){color:yellow;}
+ </style>
+</head>
+<body>
+ <div>
+ <p>
+ This should be yellow, as this will inherit property of div.
+ </p>
+ <p>
+ This should be blue, as this is even child of type p.
+ </p>
+ <p>
+ This should be yellow, as this will inherit property of div.
+ </p>
+ <div>
+ This should be yellow, as it odd child of its own type.
+ </div>
+ </div>
+ <div>
+ This should be green, as this is 2nd child of its own type.
+ <p>
+ This should be green, as this will inherit property of div.
+ </p>
+ <p>
+ This should be blue, as this is the even child of div.
+ </p>
+ <p>
+ This should be green, as this is the odd child of its own type.
+ </p>
+ <p>
+ This should be blue, as this is the even child of paragraph.
+ </p>
+ </div>
+ <div>
+ This should be yellow, as this odd child of its own type.
+ <p>
+ This should be yellow,as this inherit property of div.
+ </p>
+ <span>This should be red,as this is the second child of div </span>
+ <span>This should be green, as this is the second child of its own type </span>
+ <div>
+ <span>This should be yellow,as this will inherit property of div i.e yellow as odd of its own type <i>and </i> <i>this should be green and italic </i></span>
+ </div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698