3 Distributed under both the W3C Test Suite License [1] and the W3C
4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
5 policies and contribution forms [3].
7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
9 [3] http://www.w3.org/2004/10/27-testcases
13 <title>Shadow DOM Test: A_09_00_02</title>
14 <link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
15 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#html-elements-and-their-shadow-trees">
16 <meta name="assert" content="HTML Elements and Their Shadow Trees: Elements that have no fallback content should allow the shadow tree to contain no insertion points or an insertion point that matches nothing">
17 <script src="../../../../resources/testharness.js"></script>
18 <script src="../../../../resources/testharnessreport.js"></script>
19 <script src="../testcommon.js"></script>
20 <link rel="stylesheet" href="../../../../resources/testharness.css">
26 test(unit(function (ctx) {
28 var d = newRenderedHTMLDocument(ctx);
31 var el = d.createElement('img');
32 d.body.appendChild(el);
34 var s = el.createShadowRoot();
36 s.innerHTML = '<content id="cont" select="#shadow"></content>';
38 assert_true(s.querySelector('#cont') != null, 'img should allow one insertion point ' +
39 'that matches nothing');
41 }), 'A_09_00_02_T01');
45 test(unit(function (ctx) {
47 var d = newRenderedHTMLDocument(ctx);
50 var el = d.createElement('embed');
51 d.body.appendChild(el);
53 var s = el.createShadowRoot();
55 s.innerHTML = '<content id="cont" select="#shadow"></content>';
57 assert_true(s.querySelector('#cont') != null, 'embed should allow one insertion point ' +
58 'that matches nothing');
60 }), 'A_09_00_02_T02');
64 test(unit(function (ctx) {
66 var d = newRenderedHTMLDocument(ctx);
69 var el = d.createElement('input');
70 d.body.appendChild(el);
72 var s = el.createShadowRoot();
74 s.innerHTML = '<content id="cont" select="#shadow"></content>';
76 assert_true(s.querySelector('#cont') != null, 'input should allow one insertion point ' +
77 'that matches nothing');
79 }), 'A_09_00_02_T03');