<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description('Test that cycles are not allowed in template content');
var template = document.createElement('template');
shouldThrow('template.content.appendChild(template)');
var outerDiv = document.createElement('div');
outerDiv.appendChild(template);
shouldThrow('template.content.appendChild(outerDiv)');
var innerDiv = template.content.appendChild(document.createElement('div'));
shouldThrow('innerDiv.appendChild(template)');
shouldThrow('innerDiv.appendChild(outerDiv)');
var innerTemplate = innerDiv.appendChild(document.createElement('template'));
shouldThrow('innerTemplate.appendChild(outerDiv)');
</script>
<script src="../../../resources/js-test-post.js"></script>
