OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 description('Test that cycles are not allowed in template content'); | 4 description('Test that cycles are not allowed in template content'); |
5 var template = document.createElement('template'); | 5 var template = document.createElement('template'); |
6 shouldThrow('template.content.appendChild(template)'); | 6 shouldThrow('template.content.appendChild(template)'); |
7 var outerDiv = document.createElement('div'); | 7 var outerDiv = document.createElement('div'); |
8 outerDiv.appendChild(template); | 8 outerDiv.appendChild(template); |
9 shouldThrow('template.content.appendChild(outerDiv)'); | 9 shouldThrow('template.content.appendChild(outerDiv)'); |
10 var innerDiv = template.content.appendChild(document.createElement('div')); | 10 var innerDiv = template.content.appendChild(document.createElement('div')); |
11 shouldThrow('innerDiv.appendChild(template)'); | 11 shouldThrow('innerDiv.appendChild(template)'); |
12 shouldThrow('innerDiv.appendChild(outerDiv)'); | 12 shouldThrow('innerDiv.appendChild(outerDiv)'); |
13 var innerTemplate = innerDiv.appendChild(document.createElement('template')); | 13 var innerTemplate = innerDiv.appendChild(document.createElement('template')); |
14 shouldThrow('innerTemplate.appendChild(outerDiv)'); | 14 shouldThrow('innerTemplate.appendChild(outerDiv)'); |
15 </script> | 15 </script> |
OLD | NEW |