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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/editing/undo/undo-set-selection-crash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html
diff --git a/LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html b/LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..7abbbeb3657877d5ba35fc0d18caccbd502d526d
--- /dev/null
+++ b/LayoutTests/editing/undo/resources/undo-set-selection-crash-iframe.html
@@ -0,0 +1,31 @@
+<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
+<body>
+<div contentEditable="true"><select></div>
+<script type="text/javascript">
+var div = document.getElementsByTagName('div')[0];
+
+var selection = window.getSelection();
+
+div.focus();
+document.execCommand('SelectAll');
+document.execCommand('Indent');
+document.execCommand('Outdent');
+
+var anotherDocument = document.implementation.createHTMLDocument('');
+anotherDocument.body.appendChild(selection.getRangeAt(0).extractContents());
+
+div.contentEditable = false;
+
+document.execCommand('Undo');
+document.execCommand('FindString', false, 'x');
+
+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.
+
+function notifyFinish()
+{
+ window.parent.postMessage('FINISH', '*');
+}
+
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.
+</script>
+</body>
+</html>
« 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