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

Side by Side Diff: LayoutTests/fast/dom/HTMLTemplateElement/importNode.html

Issue 180293002: Add a test for template contents handling in importNode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLTemplateElement/importNode-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <template id="template"><span>Contents</span></template>
3 <script src="../../../resources/js-test.js"></script>
4 <script>
5
6 description('Test that template contents are correctly cloned when the template element is imported.');
7
8 var template = document.getElementById('template');
9 var div = template.appendChild(document.createElement('div'));
10
11 shouldBe('template.content.childNodes.length', '1');
12 var imported = document.importNode(template, true);
13 shouldBe('imported.content.childNodes.length', '1');
14 shouldBe('imported.outerHTML', 'template.outerHTML');
15 shouldNotBe('imported.content.firstChild', 'template.content.firstChild');
16 shouldNotBe('imported.content', 'template.content');
17 shouldBe('imported.firstChild.tagName', '"DIV"');
18 shouldNotBe('imported.firstChild', 'div');
19
20 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLTemplateElement/importNode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698