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

Side by Side Diff: LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.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
« no previous file with comments | « no previous file | LayoutTests/editing/undo/undo-set-selection-crash.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
yosin_UTC9 2014/06/11 09:02:51 nit: Could you add <!DOCTYPE html> to make Blink i
Yuta Kitamura 2014/06/12 06:23:25 I thought that was impossible because the original
2 <body>
3 <div contentEditable="true"><select></div>
4 <script type="text/javascript">
5 var div = document.getElementsByTagName('div')[0];
6
7 var selection = window.getSelection();
8
9 div.focus();
10 document.execCommand('SelectAll');
11 document.execCommand('Indent');
12 document.execCommand('Outdent');
13
14 var anotherDocument = document.implementation.createHTMLDocument('');
15 anotherDocument.body.appendChild(selection.getRangeAt(0).extractContents());
16
17 div.contentEditable = false;
18
19 document.execCommand('Undo');
20 document.execCommand('FindString', false, 'x');
21
22 window.setTimeout(notifyFinish, 0);
yosin_UTC9 2014/06/11 09:02:51 Q: Is it better to use jsTestIsAsync and finishJST
Yuta Kitamura 2014/06/12 06:23:25 Fixed by removing iframe file.
23
24 function notifyFinish()
25 {
26 window.parent.postMessage('FINISH', '*');
27 }
28
yosin_UTC9 2014/06/11 09:02:51 nit: Please remove an extra blank line.
Yuta Kitamura 2014/06/12 06:23:25 Fixed by removing iframe file.
29 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/undo/undo-set-selection-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698