| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>This tests updating the required state of a radio button in the middle of node insertions.<br> |
| The test passes if WebKit does not crash or hit a debug assertion.</p> |
| <div id="result"></div> |
| <style> |
| :indeterminate { color: green; } |
| </style> |
| <script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| const div = document.createElement('div'); |
| |
| const script = document.createElement('script'); |
| script.textContent = 'input.required = true'; |
| div.appendChild(script); |
| |
| const input = document.createElement('input'); |
| input.type = 'radio'; |
| input.name = 'baz'; |
| input.form = 'foo'; |
| div.appendChild(input); |
| |
| const input2 = document.createElement('input'); |
| input2.type = 'radio'; |
| input2.name = 'bar'; |
| input2.form = 'foo'; |
| document.body.appendChild(input2); |
| |
| document.body.appendChild(div); |
| |
| </script> |
| </body> |
| </html> |