| Index: LayoutTests/fast/dom/HTMLTemplateElement/no-form-association.html
|
| diff --git a/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association.html b/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..97b5e0e541e1f4d0dfd2aca6df7077857bc3495f
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association.html
|
| @@ -0,0 +1,24 @@
|
| +<!DOCTYPE html>
|
| +<body>
|
| +<form style="display:none">
|
| +<template id="one"><input></template>
|
| +</form>
|
| +<template id="two"><form><template><input></template></form></template>
|
| +<script src="../../js/resources/js-test-pre.js"></script>
|
| +<script>
|
| +description("Form control elements inside templates should not be associated with forms outside the template");
|
| +
|
| +debug('Form in document, input inside template:');
|
| +var form = document.querySelector('form');
|
| +var input = document.querySelector('#one').content.querySelector('input');
|
| +shouldBe('form.length', '0');
|
| +shouldBeNull('input.form');
|
| +
|
| +debug('\nForm in template, input in sub-template:');
|
| +form = document.querySelector('#two').content.querySelector('form');
|
| +input = document.querySelector('#two').content.querySelector('template').content.querySelector('input');
|
| +shouldBe('form.length', '0');
|
| +shouldBeNull('input.form');
|
| +</script>
|
| +<script src="../../js/resources/js-test-post.js"></script>
|
| +</body>
|
|
|