Index: LayoutTests/fast/dom/HTMLTemplateElement/importNode.html |
diff --git a/LayoutTests/fast/dom/HTMLTemplateElement/importNode.html b/LayoutTests/fast/dom/HTMLTemplateElement/importNode.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d7119f59e43da9b5fcf4f0ed930346d09bc0eaaf |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLTemplateElement/importNode.html |
@@ -0,0 +1,20 @@ |
+<!DOCTYPE html> |
+<template id="template"><span>Contents</span></template> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+ |
+description('Test that template contents are correctly cloned when the template element is imported.'); |
+ |
+var template = document.getElementById('template'); |
+var div = template.appendChild(document.createElement('div')); |
+ |
+shouldBe('template.content.childNodes.length', '1'); |
+var imported = document.importNode(template, true); |
+shouldBe('imported.content.childNodes.length', '1'); |
+shouldBe('imported.outerHTML', 'template.outerHTML'); |
+shouldNotBe('imported.content.firstChild', 'template.content.firstChild'); |
+shouldNotBe('imported.content', 'template.content'); |
+shouldBe('imported.firstChild.tagName', '"DIV"'); |
+shouldNotBe('imported.firstChild', 'div'); |
+ |
+</script> |