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

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

Issue 2486693002: Convert editing/spelling/copy-paste-crash.html with spellcheck_test (Closed)
Patch Set: Convert copy-paste-crash.html Created 4 years, 1 month 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 | third_party/WebKit/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: third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash.html b/third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash.html
index 23f7b869982b43edf1baa21fe3d6455cf8d79fab..4f655d0e327a1655a185a10f7c66ca10dbbef779 100644
--- a/third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash.html
+++ b/third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash.html
@@ -1,32 +1,28 @@
<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/util.js"></script>
-</head>
-<body>
-<div id="container">
- <input id="destination" type="text" name="type" value="">
-</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script src="spellcheck_test.js"></script>
<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");
-});
-
+spellcheck_test(
+ '<input type="text">',
+ document => {
+ document.querySelector('input').focus();
+ document.execCommand('insertText', false, 'A');
+ },
+ '<input type="text" value="A">',
+ {
+ title: 'Initial setup.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => {
+ document.execCommand('selectAll');
+ document.execCommand('cut');
+ document.execCommand('paste');
+ document.execCommand('insertText', false, 'A');
+ },
+ '<input type="text" value="AA">',
+ 'Spell check does not crash after Ctrl-X/Ctrl-V/type text in ASAN.')
+ });
</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/spelling/copy-paste-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698