Chromium Code Reviews| Index: LayoutTests/editing/inserting/insert-with-mutation-event.html |
| diff --git a/LayoutTests/editing/inserting/insert-with-mutation-event.html b/LayoutTests/editing/inserting/insert-with-mutation-event.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e4c5d97174b3fa2806659e4c8e65a4257a7cf688 |
| --- /dev/null |
| +++ b/LayoutTests/editing/inserting/insert-with-mutation-event.html |
| @@ -0,0 +1,22 @@ |
| +<!DOCTYPE html> |
| +<body> |
| +<div id="sample" contenteditable="true"> |
| +foo |
| +<div id="test" style="font-weight:bold">bar</div> |
| +</div> |
| +</body> |
| +<script> |
| +if (window.testRunner) |
| + testRunner.dumpAsText(); |
| +function $(id) { return document.getElementById(id); } |
| +window.getSelection().collapse($('test'), 0); |
| +document.execCommand('Delete'); |
| +var sample = $('sample'); |
| +sample.addEventListener('DOMSubtreeModified', function () { |
| + // Move nodes being processed by 'InsertText' to another document. |
| + var anotherDoc = document.implementation.createDocument('', null); |
| + anotherDoc.adoptNode(sample); |
| +}); |
| +document.execCommand('InsertText', false, 'ab123cd'); |
| +document.body.textContent = 'PASS; NOT CRASHED'; |
| +</script> |
|
tkent
2014/01/29 08:22:01
I don't understand how recursive execCommand happe
yosin_UTC9
2014/01/29 09:13:30
This test is checks mutation event handler not to
|