Commit f2995c61 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Remove redundant test editing/spelling/spellcheck-sequencenum.html

The layout test doesn't test any functionality in our product, but
instead, tests the Internals testing framework.

There is no need to add test for testing framework, so this CL removes
it.

Bug: 757525
Change-Id: I64a2a3f39df3dc9fa7d2cb3595070bb233de96d5
Reviewed-on: https://chromium-review.googlesource.com/627058
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496610}
parent e1e8a765
......@@ -3126,7 +3126,6 @@ crbug.com/591099 editing/spelling/spellcheck-input-search-crash.html [ Failure ]
crbug.com/591099 editing/spelling/spellcheck-paste-disabled.html [ Failure ]
crbug.com/591099 editing/spelling/spellcheck-paste.html [ Failure ]
crbug.com/591099 editing/spelling/spellcheck-queue.html [ Failure ]
crbug.com/591099 editing/spelling/spellcheck-sequencenum.html [ Crash Failure ]
crbug.com/591099 editing/spelling/spellcheck_test.html [ Crash Failure ]
crbug.com/591099 editing/spelling/spelling-backward.html [ Failure ]
crbug.com/591099 editing/spelling/spelling-changed-text.html [ Failure ]
For Bug 73511: Internals should have a method to return the max sequence number of spellcheck request.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS SpellCheck sequence seems working correctly.
PASS SpellCheck sequence seems working correctly.
PASS SpellCheck sequence seems working correctly.
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('For Bug 73511: Internals should have a method to return the max sequence number of spellcheck request.');
if (window.internals)
window.jsTestIsAsync = true;
if (window.testRunner)
testRunner.setMockSpellCheckerEnabled(true);
var testRoot = document.createElement("div");
document.body.insertBefore(testRoot, document.body.firstChild);
var source = document.createElement("div");
source.innerHTML = "foo bar";
testRoot.appendChild(source);
function createInput(testRoot) {
var e = document.createElement('input');
e.setAttribute("type", "text");
testRoot.appendChild(e);
return e;
}
function createTextArea(testRoot) {
var e = document.createElement("textarea");
testRoot.appendChild(e);
return e;
}
function createContentEditable(testRoot) {
var e = document.createElement("div");
e.setAttribute("contentEditable", "true");
testRoot.appendChild(e);
return e;
}
var destinations = [
createInput(testRoot),
createTextArea(testRoot),
createContentEditable(testRoot),
];
var sel = window.getSelection();
var tests = [];
for (var i = 0; i < destinations.length; ++i) {
var t = function(i) {
return function() {
if (!window.internals)
return;
var sequence = internals.lastSpellCheckRequestSequence(document);
var processed = internals.lastSpellCheckProcessedSequence(document);
copyAndPaste(source, destinations[i]);
verify(sequence, processed);
}
}(i);
tests.push(t);
}
function verifyIfAny()
{
var next = tests.shift();
if (next) {
next();
return;
}
testRoot.style.display = "none";
finishJSTest();
}
function copyAndPaste(source, dest)
{
sel.selectAllChildren(source);
document.execCommand("Copy");
if (dest instanceof HTMLInputElement || dest instanceof HTMLTextAreaElement) {
dest.value = "";
dest.focus();
} else {
dest.innerHTML = "";
sel.selectAllChildren(dest);
}
document.execCommand("Paste");
}
function verify(sequence, processed)
{
var nretry = 10;
var nsleep = 1;
function trial() {
var newSequence = internals.lastSpellCheckRequestSequence(document);
var newProcessed = internals.lastSpellCheckProcessedSequence(document);
var verified = newSequence >= sequence && newProcessed >= processed && newSequence == newProcessed;
if (verified) {
testPassed("SpellCheck sequence seems working correctly.");
verifyIfAny();
return;
}
nretry--;
if (0 == nretry) {
testFailed("SpellCheck sequence didn't increase.");
verifyIfAny();
return;
}
nsleep *= 2;
window.setTimeout(trial, nsleep);
};
trial();
}
verifyIfAny();
var successfullyParsed = true;
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment