<!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>