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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content.html

Issue 1305983002: web-platform-tests: Skip tests for <template>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>HTML Templates: HTML elements in template content</title>
5 <meta name="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
6 <meta name="author" title="Aleksei Yu. Semenov" href="a.semenov@unipro.ru">
7 <meta name="assert" content="Template may contain any element, except the html e lement, the head element, the body element, or the frameset element">
8 <link rel="help" href="http://www.w3.org/TR/2013/WD-html-templates-20130214/#tem plate-element">
9 <script src="../../../../../../../resources/testharness.js"></script>
10 <script src="../../../../../../../resources/testharnessreport.js"></script>
11 <script src='/html/resources/common.js'></script>
12 <link rel="stylesheet" href="../../../../../../../resources/testharness.css">
13 </head>
14 <body>
15 <div id="log"></div>
16 <script type="text/javascript">
17
18 var parameters = [];
19
20 HTML5_ELEMENTS.forEach(function(value) {
21 if (value !== 'body' && value !== 'html' && value !== 'head' && value !== 'f rameset') {
22
23 var doc = newHTMLDocument();
24 var template = doc.createElement('template');
25 var element = doc.createElement(value);
26 template.content.appendChild(element);
27 var valueToTest = template.content.querySelector(value);
28
29 doc.body.appendChild(template);
30
31 parameters.push([
32 'Template may contain ' + value + ' element',
33 valueToTest,
34 null
35 ]);
36 }
37 });
38
39 generate_tests(assert_not_equals, parameters,
40 'Template may contain any element, except the html element, '
41 + 'the head element, the body element, or the frameset element');
42
43
44
45
46 var parameters = [];
47
48 HTML5_ELEMENTS.forEach(function(value) {
49 if (value !== 'body' && value !== 'html' && value !== 'head' && value !== 'fr ameset') {
50
51 var doc = newHTMLDocument();
52
53 if (isVoidElement(value)) {
54 doc.body.innerHTML = '<template><' + value + '/></template>';
55 } else {
56 doc.body.innerHTML = '<template><' + value + '></' + value + '></templa te>';
57 }
58
59 var template = doc.querySelector('template');
60 var element = template.content.querySelector(value);
61
62 parameters.push([
63 'Template may contain ' + value + ' element. '
64 +'The template element and contents are added via body.innerHTML',
65 element,
66 null
67 ]);
68 }
69 });
70
71 generate_tests(assert_not_equals, parameters,
72 'Template may contain any element, except the html element, '
73 + 'the head element, the body element, or the frameset element. '
74 +'The template element and contents are added via body.innerHTML');
75
76 </script>
77 </body>
78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698