OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>HTML Templates: Template element as a descendant of the frameset element.
</title> | |
5 <meta name="author" title="Aleksei Yu. Semenov" href="mailto:a.semenov@unipro.ru
"> | |
6 <meta name="assert" content="Template element can be a descendant of the framese
t element"> | |
7 <link rel="help" href="http://www.w3.org/TR/2013/WD-html-templates-20130214/#tem
plate-element"> | |
8 <script src="../../../../../../../resources/testharness.js"></script> | |
9 <script src="../../../../../../../resources/testharnessreport.js"></script> | |
10 <script src='/html/resources/common.js'></script> | |
11 <link rel="stylesheet" href="../../../../../../../resources/testharness.css"> | |
12 </head> | |
13 <body> | |
14 <div id="log"></div> | |
15 <script type="text/javascript"> | |
16 | |
17 testInIFrame('../resources/template-descendant-frameset.html', function(context)
{ | |
18 var doc = context.iframes[0].contentDocument; | |
19 | |
20 var frameset = doc.querySelector('frameset'); | |
21 | |
22 assert_not_equals(frameset.querySelector('template'), null, | |
23 'Template element should be a descendant of the frameset element'); | |
24 | |
25 }, 'Template element as a descendant of the frameset element. Test loading from
a file'); | |
26 | |
27 | |
28 testInIFrame('../resources/template-descendant-frameset.html', function(context)
{ | |
29 var doc = context.iframes[0].contentDocument; | |
30 | |
31 var frameset = doc.querySelector('frameset'); | |
32 | |
33 frameset.innerHTML = ''; | |
34 assert_equals(doc.querySelector('template'), null, | |
35 'Initial conditions are not satisfied'); | |
36 | |
37 frameset.innerHTML = '<template>some text</template>'; | |
38 | |
39 assert_not_equals(frameset.querySelector('template'), null, | |
40 'Template element should be a descendant of the frameset element'); | |
41 | |
42 }, 'Template element as a descendant of the frameset element. ' | |
43 + 'Test template element is assigned to frameset\'s innerHTML)'); | |
44 | |
45 | |
46 testInIFrame('../resources/template-descendant-frameset.html', function(context)
{ | |
47 var doc = context.iframes[0].contentDocument; | |
48 | |
49 var frameset = doc.querySelector('frameset'); | |
50 | |
51 var template = doc.createElement('template'); | |
52 frameset.appendChild(template); | |
53 | |
54 assert_equals(frameset.querySelectorAll('template').length, 2, | |
55 'Template element should be a descendant of the frameset element'); | |
56 | |
57 }, 'Template element as a descendant of the frameset element. ' | |
58 + 'Test template element appended to frameset by appendChild()'); | |
59 | |
60 | |
61 </script> | |
62 </body> | |
63 </html> | |
OLD | NEW |