Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: LayoutTests/editing/undo/undo-set-selection-crash.html

Issue 326323003: Fix a crash caused by invalid selection set by Undo command. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>FormatBlock crash</title>
5 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
6 </head> 5 </head>
7 <body> 6 <body>
8 <script> 7 <script>
9 description('Should not crash if we load a test case from crbug.com/345005.'); 8 description('Undo command should not make a selection anchored in another docume nt.');
10 9
11 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
12 11
13 window.addEventListener('message', didReceiveMessage, false); 12 window.addEventListener('message', didReceiveMessage, false);
14 13
15 var iframe = document.createElement('iframe'); 14 var iframe = document.createElement('iframe');
16 iframe.src = 'resources/format-block-crash-iframe.html'; 15 iframe.src = 'resources/undo-set-selection-crash-iframe.html';
17 document.body.appendChild(iframe); 16 document.body.appendChild(iframe);
18 17
19 function didReceiveMessage(event) 18 function didReceiveMessage(event)
20 { 19 {
21 shouldBeEqualToString('event.data', 'FINISH'); 20 shouldBeEqualToString('event.data', 'FINISH');
22 document.body.removeChild(iframe); 21 document.body.removeChild(iframe);
23 testPassed('Did not crash.'); 22 testPassed('Did not crash.');
24 window.finishJSTest(); 23 window.finishJSTest();
25 } 24 }
26 </script> 25 </script>
27 </body> 26 </body>
28 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698