| Index: LayoutTests/editing/execCommand/insert-ordered-list-crash.html
|
| diff --git a/LayoutTests/editing/execCommand/insert-ordered-list-crash.html b/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
|
| index 49a9159a5535f5441eca6a66dc5c7ff5b916beed..70bfb23137a0034d939a9ba9acc8ed6f6a801311 100644
|
| --- a/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
|
| +++ b/LayoutTests/editing/execCommand/insert-ordered-list-crash.html
|
| @@ -1,39 +1,27 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| - <title>Crash issue 344280</title>
|
| + <title>Issue 344280</title>
|
| <script src="../../resources/js-test.js"></script>
|
| </head>
|
| -
|
| <body>
|
| <script>
|
| description('Should not crash if we load a test case from crbug.com/344280.');
|
| +
|
| window.jsTestIsAsync = true;
|
|
|
| - document.addEventListener("DOMContentLoaded", function () {
|
| - document.execCommand("SelectAll", false);
|
| - window.getSelection().deleteFromDocument();
|
| - }, true);
|
| + window.addEventListener('message', didReceiveMessage, false);
|
| +
|
| + var iframe = document.createElement('iframe');
|
| + iframe.src = 'resources/insert-ordered-list-crash-iframe.html';
|
| + document.body.appendChild(iframe);
|
|
|
| - var count = 0;
|
| - document.addEventListener("DOMSubtreeModified", function () {
|
| - count++;
|
| - if (count < 3) {
|
| - var src = event.srcElement;
|
| - src.contentEditable = "true";
|
| - src.innerHTML = '<div></div>';
|
| - document.execCommand('InsertOrderedList', false, false);
|
| - } else if (count == 3) {
|
| - window.finishJSTest();
|
| - }
|
| - }, false);
|
| + function didReceiveMessage(event) {
|
| + shouldBeEqualToString('event.data', 'FINISH');
|
| + document.body.removeChild(iframe);
|
| + testPassed('Did not crash.');
|
| + window.finishJSTest();
|
| + }
|
| </script>
|
| - <h5>
|
| - aa
|
| - <textarea></textarea>
|
| - </h5>
|
| - <dl>
|
| - aa
|
| - </dl>
|
| </body>
|
| </html>
|
|
|