| <!DOCTYPE html> |
| <html> |
| <body> |
| <p>Tests createContextualFragment does not mark scripts elements it parsed as already started. You should see PASS below:</p> |
| <div id="test"></div> |
| <script> |
| var range = document.createRange(); |
| var node = document.getElementById("test"); |
| var count = 0; |
| range.selectNodeContents(node); |
| node.appendChild(range.createContextualFragment("<script> count++; </script" + ">")); |
| node.textContent = count == 1 ? 'PASS' : 'FAIL - expected one execution but executed ' + count + ' times'; |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| </script> |
| </body> |
| </html> |