Bug 133544 - Share mac/editing/spelling/editing-word-with-marker-2.html with other platforms
Summary: Share mac/editing/spelling/editing-word-with-marker-2.html with other platforms
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Grzegorz Czajkowski
URL:
Keywords:
Depends on:
Blocks: 126746 211802
  Show dependency treegraph
 
Reported: 2014-06-05 05:52 PDT by Grzegorz Czajkowski
Modified: 2020-05-12 13:45 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.49 KB, patch)
2014-06-05 05:54 PDT, Grzegorz Czajkowski
darin: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Czajkowski 2014-06-05 05:52:30 PDT
Move mac/editing/spelling/editing-word-with-marker-2.html into common editing/spelling to be available for other platforms.

Additionally, verify spelling markers asynchronously as the sync path it's likely to be removed.

Add test case which tests spelling markers without any selection change.
Comment 1 Grzegorz Czajkowski 2014-06-05 05:54:50 PDT
Created attachment 232541 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-06 09:57:40 PDT
Comment on attachment 232541 [details]
Patch

Rejecting attachment 232541 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 232541, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
Tests/platform/mac/editing/spelling/editing-word-with-marker-2-expected.txt'
patching file LayoutTests/platform/mac/editing/spelling/editing-word-with-marker-2.html
rm 'LayoutTests/platform/mac/editing/spelling/editing-word-with-marker-2.html'
patching file LayoutTests/platform/win/TestExpectations
Hunk #1 succeeded at 2001 (offset 67 lines).

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Darin Adler']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.appspot.com/results/6204263986364416
Comment 3 Grzegorz Czajkowski 2014-06-08 23:59:38 PDT
Committed r169687: <http://trac.webkit.org/changeset/169687>
Comment 4 Daniel Bates 2020-05-12 12:17:23 PDT
Comment on attachment 232541 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232541&action=review

Test is no longer doing what it saids it is doing after this change. Mind boggling that this change also skips or marks the test as failed on all platforms.

> LayoutTests/editing/spelling/editing-word-with-marker-2.html:63
> +var testCases = [

There is no longer a test for adding a space character after the marker, which is what the original test did do.

> LayoutTests/editing/spelling/editing-word-with-marker-2.html:74
> +        misspelledPosition: 7

This is not correct, it should be 9 not 7 because the code ALWAYS types a space character after evaluating updateCaretPosition.
Comment 5 Darin Adler 2020-05-12 12:18:29 PDT
Should we roll it out?
Comment 6 Darin Adler 2020-05-12 12:18:51 PDT
Should we revert this?
Comment 7 Daniel Bates 2020-05-12 12:26:25 PDT
Comment on attachment 232541 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232541&action=review

>> LayoutTests/editing/spelling/editing-word-with-marker-2.html:74
>> +        misspelledPosition: 7
> 
> This is not correct, it should be 9 not 7 because the code ALWAYS types a space character after evaluating updateCaretPosition.

Never mind, I misread, there's a resetText() call between runs.
Comment 8 Daniel Bates 2020-05-12 12:28:44 PDT
(In reply to Darin Adler from comment #5)
> Should we roll it out?

(In reply to Darin Adler from comment #6)
> Should we revert this?

I am going to try to fix up the test. Giving the benefit of doubt to the Grzegorz that it needed to be async because I am NOT planning to test this on Mac myself. I'll let the bots do it.
Comment 9 Daniel Bates 2020-05-12 12:53:44 PDT
Comment on attachment 232541 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232541&action=review

> LayoutTests/editing/spelling/editing-word-with-marker-2.html:82
> +        return setTimeout(checkSpellingMarkerAfterAddingWhitespace(testCase), 0);

This doesn't actually call checkSpellingMarkerAfterAddingWhitespace on the next event loop iteration. It calls it immediately.
Comment 10 Darin Adler 2020-05-12 13:03:18 PDT
Comment on attachment 232541 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232541&action=review

>> LayoutTests/editing/spelling/editing-word-with-marker-2.html:82
>> +        return setTimeout(checkSpellingMarkerAfterAddingWhitespace(testCase), 0);
> 
> This doesn't actually call checkSpellingMarkerAfterAddingWhitespace on the next event loop iteration. It calls it immediately.

And then sets a timer to do whatever the function returns, so I guess execute the string "undefined" or something like that.