WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-128246-20140205144518.patch (text/plain), 11.82 KB, created by
Grzegorz Czajkowski
on 2014-02-05 05:45:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Grzegorz Czajkowski
Created:
2014-02-05 05:45:19 PST
Size:
11.82 KB
patch
obsolete
>Subversion Revision: 163431 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ff0800d36b26cd64855119e0c26ccbdea4bcf92d..ab22096132c6c43cde75018beccf9099ec6c3624 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,35 @@ >+2014-02-05 Grzegorz Czajkowski <g.czajkowski@samsung.com> >+ >+ Verify copy/paste of misspellings asynchronously >+ https://bugs.webkit.org/show_bug.cgi?id=128246 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Refactoring two spelling tests that use copy/paste to be able to >+ verify spelling markers asynchronously. >+ Additionally, use evalAndLog() to make test expectation more readable. >+ Fix the description according to the tests. >+ >+ Start off verifying whether spelling marker is available when continuous spell >+ checking (spellcheck attribute, respectively) is on. >+ Without this test case, the tests passed even spellchecking >+ or copy/paste were not implemented (EFL). >+ >+ * editing/spelling/spellcheck-paste-continuous-disabled-expected.txt: >+ * editing/spelling/spellcheck-paste-continuous-disabled.html: >+ Remove unnecessary spellcheck=true attribute. It's default value and we >+ do not manipulate it at all. >+ Add destination element where paste operation is performed. >+ >+ * editing/spelling/spellcheck-paste-disabled-expected.txt: >+ * editing/spelling/spellcheck-paste-disabled.html: >+ Do not turn off continuous spell checking here, spellcheck="false" should >+ guarantee lack of spelling markers. >+ >+ * platform/efl/TestExpectations: >+ Mark spellcheck-paste-continuous-disabled.html as failing since EFL does not >+ implement copy/paste feature. >+ > 2014-02-04 Ryosuke Niwa <rniwa@webkit.org> > > Undelete the "build" directories erroneously removed in r163427. >diff --git a/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled-expected.txt b/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled-expected.txt >index 5660aa872370b16b2ed2764836e48420ba9dc6fd..1380fccf03b7eff1854e161592712a7062b6ffa0 100644 >--- a/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled-expected.txt >+++ b/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled-expected.txt >@@ -1,12 +1,23 @@ >-Test if WebKit does not spellcheck text when pasting text and continuous spellcheck is turned off. To test manually, disable continuous spellcheck, copy the text "zz apple" and paste it to the textarea. When "zz" is not marked as misspelled, this test succeeds. >+Test if WebKit does not spellcheck text when pasting text and continuous spellcheck is turned off. To test manually, copy the text "zz apple", disable continuous spellcheck and paste it to editable element below. When "zz" is not marked as misspelled, this test succeeds. > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS internals.hasSpellingMarker(0, 2) is true >-PASS internals.hasSpellingMarker(0, 2) is false >+document.execCommand("InsertText", false, "z") >+document.execCommand("InsertText", false, "z") >+document.execCommand("InsertText", false, " ") >+document.execCommand("InsertText", false, "a") >+document.execCommand("InsertText", false, "p") >+document.execCommand("InsertText", false, "p") >+document.execCommand("InsertText", false, "l") >+document.execCommand("InsertText", false, "e") >+PASS internals.hasSpellingMarker(0, 2) became true >+document.execCommand('Copy') >+internals.setContinuousSpellCheckingEnabled(false) >+document.execCommand('Paste') >+PASS internals.hasSpellingMarker(0, 2) became different from true > PASS successfullyParsed is true > > TEST COMPLETE > zz apple >- >+zz apple >diff --git a/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled.html b/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled.html >index 07ead04a232be8a864874b397c6659219f736e72..4fcdad1fd59ef5a8ad797bdd5138e4337bf4b787 100644 >--- a/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled.html >+++ b/LayoutTests/editing/spelling/spellcheck-paste-continuous-disabled.html >@@ -6,32 +6,45 @@ > </head> > <body> > <div> >-<div id="src" contenteditable="true" spellcheck="true"></div> >+<div id="src" contenteditable="true"></div> >+<div id="dst" contenteditable="true"></div> > </div> > <script language="javascript"> > description('Test if WebKit does not spellcheck text when pasting text and continuous spellcheck is turned off. ' + >- 'To test manually, disable continuous spellcheck, copy the text "zz apple" and paste it to the textarea. ' + >+ 'To test manually, copy the text "zz apple", disable continuous spellcheck and paste it to editable element below. ' + > 'When "zz" is not marked as misspelled, this test succeeds.'); > >-// Insert a misspelled word to initialize a spellchecker. >+jsTestIsAsync = true; >+ >+if (window.internals) { >+ internals.settings.setUnifiedTextCheckerEnabled(true); >+ internals.settings.setAsynchronousSpellCheckingEnabled(true); >+} >+ > var srcNode = document.getElementById('src'); > srcNode.focus(); >-document.execCommand("InsertText", false, 'z'); >-document.execCommand("InsertText", false, 'z'); >-document.execCommand("InsertText", false, ' '); >-document.execCommand("InsertText", false, 'a'); >-document.execCommand("InsertText", false, 'p'); >-document.execCommand("InsertText", false, 'p'); >-document.execCommand("InsertText", false, 'l'); >-document.execCommand("InsertText", false, 'e'); >-shouldBeTrue('internals.hasSpellingMarker(0, 2)'); >-window.getSelection().selectAllChildren(srcNode); >-document.execCommand('Copy'); >+evalAndLog('document.execCommand("InsertText", false, "z")'); >+evalAndLog('document.execCommand("InsertText", false, "z")'); >+evalAndLog('document.execCommand("InsertText", false, " ")'); >+evalAndLog('document.execCommand("InsertText", false, "a")'); >+evalAndLog('document.execCommand("InsertText", false, "p")'); >+evalAndLog('document.execCommand("InsertText", false, "p")'); >+evalAndLog('document.execCommand("InsertText", false, "l")'); >+evalAndLog('document.execCommand("InsertText", false, "e")'); >+ >+if (window.internals) { >+ shouldBecomeEqual('internals.hasSpellingMarker(0, 2)', 'true', function() { >+ window.getSelection().selectAllChildren(srcNode); >+ evalAndLog("document.execCommand('Copy')"); > >-internals.setContinuousSpellCheckingEnabled(false); >+ evalAndLog("internals.setContinuousSpellCheckingEnabled(false)"); > >-document.execCommand('Paste'); >-shouldBeFalse('internals.hasSpellingMarker(0, 2)'); >+ var dstNode = document.getElementById('dst'); >+ dstNode.focus(); >+ evalAndLog("document.execCommand('Paste')"); >+ shouldBecomeDifferent('internals.hasSpellingMarker(0, 2)', 'true', finishJSTest); >+ }); >+} > > </script> > <script src="../../resources/js-test-post.js"></script> >diff --git a/LayoutTests/editing/spelling/spellcheck-paste-disabled-expected.txt b/LayoutTests/editing/spelling/spellcheck-paste-disabled-expected.txt >index 3761e032ba27c38c38246f04f2598e898ea83dca..311a28936aa3e0afb4c58368ef50e19ec2bb66c9 100644 >--- a/LayoutTests/editing/spelling/spellcheck-paste-disabled-expected.txt >+++ b/LayoutTests/editing/spelling/spellcheck-paste-disabled-expected.txt >@@ -3,11 +3,20 @@ Test if WebKit does not spellcheck text when pasting text to an element having s > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS internals.hasSpellingMarker(0, 2) is true >-PASS internals.hasSpellingMarker(0, 2) is false >+document.execCommand("InsertText", false, "z") >+document.execCommand("InsertText", false, "z") >+document.execCommand("InsertText", false, " ") >+document.execCommand("InsertText", false, "a") >+document.execCommand("InsertText", false, "p") >+document.execCommand("InsertText", false, "p") >+document.execCommand("InsertText", false, "l") >+document.execCommand("InsertText", false, "e") >+PASS internals.hasSpellingMarker(0, 2) became true >+document.execCommand("Copy") >+document.execCommand("Paste") >+PASS internals.hasSpellingMarker(0, 2) became different from true > PASS successfullyParsed is true > > TEST COMPLETE > zz apple >- > zz apple >diff --git a/LayoutTests/editing/spelling/spellcheck-paste-disabled.html b/LayoutTests/editing/spelling/spellcheck-paste-disabled.html >index db97f0d76cf455f3d883ea807d6092184b52388f..44b42e68a0215d707c1757e6e2203e7128fc5c34 100644 >--- a/LayoutTests/editing/spelling/spellcheck-paste-disabled.html >+++ b/LayoutTests/editing/spelling/spellcheck-paste-disabled.html >@@ -6,7 +6,7 @@ > </head> > <body> > <div> >-<div id="src" contenteditable="true" spellcheck="true"></div><br/> >+<div id="src" contenteditable="true" spellcheck="true"></div> > <div id="dst" contenteditable="true" spellcheck="false"></div> > </div> > <script language="javascript"> >@@ -14,25 +14,35 @@ description('Test if WebKit does not spellcheck text when pasting text to an ele > 'To test manually, copy the text "zz apple" and paste it to the textarea. ' + > 'When "zz" is not marked as misspelled, this test succeeds.'); > >-// Insert a misspelled word to initialize a spellchecker. >+jsTestIsAsync = true; >+ >+if (window.internals) { >+ internals.settings.setUnifiedTextCheckerEnabled(true); >+ internals.settings.setAsynchronousSpellCheckingEnabled(true); >+} >+ > var srcNode = document.getElementById('src'); > srcNode.focus(); >-document.execCommand("InsertText", false, 'z'); >-document.execCommand("InsertText", false, 'z'); >-document.execCommand("InsertText", false, ' '); >-document.execCommand("InsertText", false, 'a'); >-document.execCommand("InsertText", false, 'p'); >-document.execCommand("InsertText", false, 'p'); >-document.execCommand("InsertText", false, 'l'); >-document.execCommand("InsertText", false, 'e'); >-shouldBeTrue('internals.hasSpellingMarker(0, 2)'); >-window.getSelection().selectAllChildren(srcNode); >-document.execCommand('Copy'); >+evalAndLog('document.execCommand("InsertText", false, "z")'); >+evalAndLog('document.execCommand("InsertText", false, "z")'); >+evalAndLog('document.execCommand("InsertText", false, " ")'); >+evalAndLog('document.execCommand("InsertText", false, "a")'); >+evalAndLog('document.execCommand("InsertText", false, "p")'); >+evalAndLog('document.execCommand("InsertText", false, "p")'); >+evalAndLog('document.execCommand("InsertText", false, "l")'); >+evalAndLog('document.execCommand("InsertText", false, "e")'); >+ >+if (window.internals) { >+ shouldBecomeEqual('internals.hasSpellingMarker(0, 2)', 'true', function() { >+ window.getSelection().selectAllChildren(srcNode); >+ evalAndLog('document.execCommand("Copy")'); > >-var dstNode = document.getElementById('dst'); >-dstNode.focus(); >-document.execCommand('Paste'); >-shouldBeFalse('internals.hasSpellingMarker(0, 2)'); >+ var dstNode = document.getElementById('dst'); >+ dstNode.focus(); >+ evalAndLog('document.execCommand("Paste")'); >+ shouldBecomeDifferent('internals.hasSpellingMarker(0, 2)', 'true', finishJSTest); >+ }); >+} > > </script> > <script src="../../resources/js-test-post.js"></script> >diff --git a/LayoutTests/platform/efl/TestExpectations b/LayoutTests/platform/efl/TestExpectations >index ea15cb98fb88eeea2628a4b2fbfd6f7b36cd8b88..81edbdf0e542a4b6ca47755961995dd28562b9d1 100644 >--- a/LayoutTests/platform/efl/TestExpectations >+++ b/LayoutTests/platform/efl/TestExpectations >@@ -888,6 +888,7 @@ webkit.org/b/84338 editing/pasteboard/style-from-rules.html [ Failure ] > webkit.org/b/84338 editing/pasteboard/testcase-9507.html [ Failure ] > webkit.org/b/84338 editing/spelling/spellcheck-async-mutation.html [ Failure ] > webkit.org/b/84338 editing/spelling/spellcheck-queue.html [ Failure ] >+webkit.org/b/84338 editing/spelling/spellcheck-paste-continuous-disabled.html [ Failure ] > webkit.org/b/84338 editing/spelling/spellcheck-paste-disabled.html [ Failure ] > webkit.org/b/84338 editing/spelling/spellcheck-paste.html [ Failure ] > webkit.org/b/84338 editing/style/apply-through-end-of-document.html [ Failure ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rniwa
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 128246
: 223228