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..d89398148e7bfef10c008eb5c977cfc572e2f0df |
--- /dev/null |
+++ b/LayoutTests/editing/spelling/copy-paste-crash.html |
@@ -0,0 +1,32 @@ |
+<!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/focus-change/Ctrl-V/focus-change/type text. " + |
+ "To test manually, type 'A', Ctrl-A, Ctrl-X, focus the second input, Ctr-V, focus the first input again, " + |
+ "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"); |
+ } |
abarth-chromium
2013/07/17 00:01:00
I'd add a "PASS: Did not crash" message once you'r
please use gerrit instead
2013/07/17 01:11:22
Done.
|
+}); |
+ |
+</script> |
+<script src="../../fast/js/resources/js-test-post.js"></script> |
+</body> |
+</html> |