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

Unified Diff: LayoutTests/editing/spelling/copy-paste-crash.html

Issue 19275006: Fix a use-after-free in spellcheck client (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 7 years, 5 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/spelling/copy-paste-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/spelling/copy-paste-crash.html
diff --git a/LayoutTests/editing/spelling/copy-paste-crash.html b/LayoutTests/editing/spelling/copy-paste-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..ac590c2e011315682627be8a315da5a30b53b0b2
--- /dev/null
+++ b/LayoutTests/editing/spelling/copy-paste-crash.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/util.js"></script>
+</head>
+<body>
+<div id="container">
+ <input id="destination" type="text" name="type" value="">
+</div>
+
+<script>
+
+description("Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN. " +
+ "To test manually, type 'A', Ctrl-A, Ctrl-X, Ctrl-V, and start typing again. " +
+ "The test succeeds when there's no crash in the last step.");
+
+initSpellTest("destination", "A", function(textNode) {
+ var behaviors = ["win", "mac"];
+ for (var i = 0; i < behaviors.length; i++) {
+ internals.settings.setEditingBehavior(behaviors[i]);
+ document.execCommand("SelectAll");
+ document.execCommand("Cut");
+ document.execCommand("Paste");
+ document.execCommand("InsertText", false, "A");
+ }
+ log("PASS Did not crash");
+});
+
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/spelling/copy-paste-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698