| Index: LayoutTests/imported/web-platform-tests/shadow-dom/shadow-trees/satisfying-matching-criteria/test-012.html
 | 
| diff --git a/LayoutTests/imported/web-platform-tests/shadow-dom/shadow-trees/satisfying-matching-criteria/test-012.html b/LayoutTests/imported/web-platform-tests/shadow-dom/shadow-trees/satisfying-matching-criteria/test-012.html
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..44c441bcd3bd7a2f92ecb824b005942653d9e71a
 | 
| --- /dev/null
 | 
| +++ b/LayoutTests/imported/web-platform-tests/shadow-dom/shadow-trees/satisfying-matching-criteria/test-012.html
 | 
| @@ -0,0 +1,67 @@
 | 
| +<!DOCTYPE html>
 | 
| +<!-- 
 | 
| +Distributed under both the W3C Test Suite License [1] and the W3C
 | 
| +3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
 | 
| +policies and contribution forms [3].
 | 
| +
 | 
| +[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
 | 
| +[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
 | 
| +[3] http://www.w3.org/2004/10/27-testcases
 | 
| + -->
 | 
| +<html>
 | 
| +<head>
 | 
| +<title>Shadow DOM Test: A_04_03_06_08</title>
 | 
| +<link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
 | 
| +<link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#matching-insertion-points">
 | 
| +<meta name="assert" content="Matching Insertion Points: A valid selector fragment may contain a :nth-child() pseudo-class selector">
 | 
| +<script src="../../../../../resources/testharness.js"></script>
 | 
| +<script src="../../../../../resources/testharnessreport.js"></script>
 | 
| +<script src="../../testcommon.js"></script>
 | 
| +<link rel="stylesheet" href="../../../../../resources/testharness.css">
 | 
| +</head>
 | 
| +<body>
 | 
| +<div id="log"></div>
 | 
| +<script>
 | 
| +var A_04_03_06_08_T01 = async_test('A_04_03_06_08_T01');
 | 
| +
 | 
| +
 | 
| +A_04_03_06_08_T01.step(function () {
 | 
| +    var iframe = document.createElement('iframe');
 | 
| +    iframe.src = '../../resources/bobs_page.html';
 | 
| +    document.body.appendChild(iframe);
 | 
| +
 | 
| +    iframe.onload = A_04_03_06_08_T01.step_func(function () {
 | 
| +        try {
 | 
| +
 | 
| +            var d = iframe.contentDocument;
 | 
| +            var ul = d.querySelector('ul.stories');
 | 
| +            var s = ul.createShadowRoot();
 | 
| +
 | 
| +            //make shadow subtree
 | 
| +            var subdiv1 = document.createElement('div');
 | 
| +            subdiv1.innerHTML = '<ul><content select=":nth-child(odd)"></content></ul>';
 | 
| +            s.appendChild(subdiv1);
 | 
| +
 | 
| +            //li1, li3, li5 should be visible, li2, li4, li6 not
 | 
| +            assert_true(d.querySelector('#li1').offsetTop > 0,
 | 
| +                '1-st element should match :nth-child(odd) pseudo-class selector');
 | 
| +            assert_true(d.querySelector('#li3').offsetTop > 0,
 | 
| +            	'3-rd element should match :nth-child(odd) pseudo-class selector');
 | 
| +            assert_true(d.querySelector('#li5').offsetTop > 0,
 | 
| +            	'5-th element should match :nth-child(odd) pseudo-class selector');
 | 
| +            assert_equals(d.querySelector('#li2').offsetTop, 0,
 | 
| +                '2-nd element shouldn\'t match :nth-child() pseudo-class selector');
 | 
| +            assert_equals(d.querySelector('#li4').offsetTop, 0,
 | 
| +            	'4-th element shouldn\'t match :nth-child() pseudo-class selector');
 | 
| +            assert_equals(d.querySelector('#li6').offsetTop, 0,
 | 
| +            	'6-nd element shouldn\'t match :nth-child() pseudo-class selector');
 | 
| +
 | 
| +        } finally {
 | 
| +            iframe.parentNode.removeChild(iframe);
 | 
| +        }
 | 
| +        A_04_03_06_08_T01.done();
 | 
| +    });
 | 
| +});
 | 
| +</script>
 | 
| +</body>
 | 
| +</html>
 | 
| 
 |