Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
2010-09-03 Hironori Bono <hbono@chromium.org>
Reviewed by Kent Tamura. Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests and implements it for Mac. https://bugs.webkit.org/show_bug.cgi?id=41832 * editing/spelling/spelling-contenteditable-expected.txt: Added the expected result for spelling-contenteditable.html. * editing/spelling/spelling-contenteditable.html: Added a text test of spellcheker APIs for contenteditable <div> elements. * editing/spelling/spelling-textarea-expected.txt: Added the expected result for spelling-textarea.html. * editing/spelling/spelling-textarea.html: Added a text test of spellchecker APIs for <textarea> elements. * platform/chromium/test_expectations.txt: Skipped the new tests because textInputController.hasSpelingMarker() is not implemented. * platform/gtk/Skipped: ditto. * platform/qt/Skipped: ditto. * platform/win/Skipped: ditto. 2010-09-03 Hironori Bono <hbono@chromium.org> Reviewed by Kent Tamura. Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests and implements it for Mac. https://bugs.webkit.org/show_bug.cgi?id=41832 Tests: editing/spelling/spelling-contenteditable.html editing/spelling/spelling-textarea.html * WebCore.exp.in: Exported symbols used by [WebFrame hasSpellingMarker:length:]. 2010-09-03 Hironori Bono <hbono@chromium.org> Reviewed by Kent Tamura. Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests and implements it for Mac. https://bugs.webkit.org/show_bug.cgi?id=41832 * WebView/WebFrame.mm: Implemented [WebFrame hasSpellingMarker:length:]. (spellingNode): (-[WebFrame hasSpellingMarker:length:]): * WebView/WebFramePrivate.h: Added [WebFrame hasSpellingMarker:length:] so TextInputController can use it. 2010-09-03 Hironori Bono <hbono@chromium.org> Reviewed by Kent Tamura. Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests and implements it for Mac. https://bugs.webkit.org/show_bug.cgi?id=41832 * DumpRenderTree/mac/TextInputController.m: Added [TextInputController hasSpellingMarker:length:] and bind it so we can call it from JavaScript. (+[TextInputController isSelectorExcludedFromWebScript:]): (+[TextInputController webScriptNameForSelector:]): (-[TextInputController hasSpellingMarker:length:]): Canonical link: https://commits.webkit.org/57480@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
9c96ba6
commit 8bfb9d6
Showing
16 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
LayoutTests/editing/spelling/spelling-contenteditable-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
This tests we can write text tests for spellcheckers. To test manually, type 'zz ' in the contenteditable <div> element and see they are marked as misspelled. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
zz | ||
PASS 'zz' is marked as misspelled. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
39 changes: 39 additions & 0 deletions
39
LayoutTests/editing/spelling/spelling-contenteditable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../js/resources/js-test-style.css"> | ||
<script src="../../fast/js/resources/js-test-pre.js" language="javascript" type="text/javascript"></script> | ||
<script src="../editing.js" language="javascript" type="text/javascript"></script> | ||
<title>Editing Test</title> | ||
</head> | ||
<body> | ||
<p id="description"></p> | ||
<div id="test" contenteditable="true"></div> | ||
<div id="console"></div> | ||
<script language="javascript" type="text/javascript"> | ||
description('This tests we can write text tests for spellcheckers. To test manually, type \'zz \' in the contenteditable <div> element and see they are marked as misspelled.'); | ||
|
||
function logResult(result) { | ||
if (result) | ||
testPassed('\'zz\' is marked as misspelled.'); | ||
else | ||
testPassed('\'zz\' is not marked as misspelled.'); | ||
} | ||
|
||
if (window.layoutTestController) { | ||
// Type the test text 'zz '. | ||
document.getElementById('test').focus(); | ||
typeCharacterCommand('z'); | ||
typeCharacterCommand('z'); | ||
typeCharacterCommand(' '); | ||
|
||
// Test the above 'zz' is marked as misspelled. We test it only on platforms that implement | ||
// textInputController.hasSpellingMarker() to avoid exceptions. | ||
if (textInputController && textInputController.hasSpellingMarker) | ||
logResult(textInputController.hasSpellingMarker(0, 2)); | ||
} | ||
|
||
var successfullyParsed = true; | ||
</script> | ||
<script src="../../fast/js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
LayoutTests/editing/spelling/spelling-textarea-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
This tests we can write text tests for spellcheckers. To test manually, type 'zz ' in the <textarea> element and see they are marked as misspelled. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
|
||
PASS 'zz' is marked as misspelled. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../js/resources/js-test-style.css"> | ||
<script src="../../fast/js/resources/js-test-pre.js" language="javascript" type="text/javascript"></script> | ||
<script src=../editing.js language="javascript" type="text/javascript"></script> | ||
<title>Editing Test</title> | ||
</head> | ||
<body> | ||
<p id="description"></p> | ||
<textarea id="test" cols="80" rows="10"></textarea> | ||
<div id="console"></div> | ||
<script language="javascript" type="text/javascript"> | ||
description('This tests we can write text tests for spellcheckers. To test manually, type \'zz \' in the <textarea> element and see they are marked as misspelled.'); | ||
|
||
function logResult(result) { | ||
if (result) | ||
testPassed('\'zz\' is marked as misspelled.'); | ||
else | ||
testPassed('\'zz\' is not marked as misspelled.'); | ||
} | ||
|
||
if (window.layoutTestController) { | ||
// Type the test text 'zz '. | ||
document.getElementById('test').focus(); | ||
typeCharacterCommand('z'); | ||
typeCharacterCommand('z'); | ||
typeCharacterCommand(' '); | ||
|
||
// Test the above 'zz' is marked as misspelled. We test it only on platforms that implement | ||
// textInputController.hasSpellingMarker() to avoid exceptions. | ||
if (textInputController && textInputController.hasSpellingMarker) | ||
logResult(textInputController.hasSpellingMarker(0, 2)); | ||
} | ||
|
||
var successfullyParsed = true; | ||
</script> | ||
<script src="../../fast/js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters